Automated software remodularization based on move refactoring: a complex systems approach

Automated software remodularization based on move refactoring: a complex systems approach
复制标题

基于移动重构的自动化软件重新模块化:一种复杂的系统方法

DOI:
10.1145/2577080.2577097
复制
发表时间:
2014
期刊:
Proceedings of the 13th international conference on Modularity
影响因子:
--
通讯作者:
F. Schweitzer
F. Schweitzer
中科院分区:
--
文献类型:
--
作者:
Ingo Scholtes;M. S. Zanetti;C. Tessone;F. Schweitzer

文献摘要

被引文献

相似文献

模块化设计是复杂软件系统的理想特征,可以显着提高其可理解性,可维护性和质量。尽管许多软件系统最初都是以模块化的方式创建的,但随着时间的流逝,模块化通常会降低,因为组件在创建的上下文之外重新使用。在本文中,我们提出了一种自动化策略,以基于移动重构进行重塑软件,即在软件包之间移动类,而无需更改源代码的其他任何方面。从复杂的系统角度来看,我们的方法基于复杂的网络理论应用于软件模块化结构的动力学及其与称为Potts模型的N状态旋转模型的关系。在我们的方法中,节点在模块之间概率移动,其概率非线性取决于其相邻邻居的数字和模块成员资格,而这些邻居的数字和模块成员是由软件依赖项的基础网络定义的。为了验证我们的方法,我们将其应用于39个Java开源项目的数据集,以优化其模块化。将开发人员生成的源代码与我们的方法产生的优化代码进行比较,我们发现模块化(即根据复杂网络研究的标准度量量化)平均提高了166+-77%。为了促进我们的方法在实践研究中的应用,我们提供了免费的Eclipse插件。
Modular design is a desirable characteristic of complex software systems that can significantly improve their comprehensibility, maintainability and thus quality. While many software systems are initially created in a modular way, over time modularity typically degrades as components are reused outside the context where they were created. In this paper, we propose an automated strategy to remodularize software based on move refactoring, i.e. moving classes between packages without changing any other aspect of the source code. Taking a complex systems perspective, our approach is based on complex networks theory applied to the dynamics of software modular structures and its relation to an n-state spin model known as the Potts Model. In our approach, nodes are probabilistically moved between modules with a probability that nonlinearly depends on the number and module membership of their adjacent neighbors, which are defined by the underlying network of software dependencies. To validate our method, we apply it to a dataset of 39 Java open source projects in order to optimize their modularity. Comparing the source code generated by the developers with the optimized code resulting from our approach, we find that modularity (i.e. quantified in terms of a standard measure from the study of complex networks) improves on average by 166+-77 percent. In order to facilitate the application of our method in practical studies, we provide a freely available Eclipse plug-in.