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

Ingo Scholtes, M. S. Zanetti, C. Tessone, F. Schweitzer
{"title":"Automated software remodularization based on move refactoring: a complex systems approach","authors":"Ingo Scholtes, M. S. Zanetti, C. Tessone, F. Schweitzer","doi":"10.1145/2577080.2577097","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":357928,"journal":{"name":"Proceedings of the 13th international conference on Modularity","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-04-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"28","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 13th international conference on Modularity","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2577080.2577097","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 28

Abstract

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.
基于移动重构的自动化软件重构:一种复杂的系统方法
模块化设计是复杂软件系统的理想特性,它可以显著提高软件系统的可理解性、可维护性和质量。虽然许多软件系统最初是以模块化的方式创建的,但随着时间的推移,模块化通常会随着组件在创建它们的上下文中被重用而退化。在本文中,我们提出了一种基于移动重构的自动化策略来重新模块化软件,即在不改变源代码的任何其他方面的情况下在包之间移动类。从复杂系统的角度来看,我们的方法是基于应用于软件模块化结构动力学及其与n态自旋模型(称为Potts模型)的关系的复杂网络理论。在我们的方法中,节点在模块之间的概率移动,其概率非线性取决于其相邻邻居的数量和模块成员,这些邻居由软件依赖关系的底层网络定义。为了验证我们的方法,我们将其应用于39个Java开源项目的数据集,以优化它们的模块化。将开发人员生成的源代码与我们的方法所产生的优化代码进行比较,我们发现模块化(即根据复杂网络研究的标准度量进行量化)平均提高了166+- 77%。为了便于我们的方法在实际研究中的应用,我们提供了一个免费的Eclipse插件。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信