skip to main content
10.1145/2577080.2577097acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

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

Published: 22 April 2014 Publication History

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.

References

[1]
H. Abdeen, S. Ducasse, H. Sahraoui, and I. Alloui. Automatic package coupling and cycle minimization. In Reverse Engineering, 2009. WCRE'09. 16th Working Conference on, pages 103--112. IEEE, 2009.
[2]
D. Ancona and E. Zucca. True modules for java-like languages. In ECOOP 2001Object-Oriented Programming, pages 354--380. Springer, 2001.
[3]
N. Anquetil and J. Laval. Legacy software restructuring: Analyzing a concrete case. In Software Maintenance and Reengineering (CSMR), 2011 15th European Conference on, pages 279--286. IEEE, 2011.
[4]
G. Antoniol, M. Di Penta, and M. Neteler. Moving to smaller libraries via clustering and genetic algorithms. In Software Maintenance and Reengineering, 2003. Proceedings. Seventh European Conference on, pages 307--316. IEEE, 2003.
[5]
M. Bastian, S. Heymann, and M. Jacomy. Gephi: An open source software for exploring and manipulating networks. In Proceedings of the ICWSM '09. AAAI, 2009.
[6]
G. Bavota, A. De Lucia, A. Marcus, and R. Oliveto. Software remodularization based on structural and semantic metrics. In Reverse Engineering (WCRE), 2010 17th Working Conference on, pages 195--204. IEEE, 2010.
[7]
F. Beck and S. Diehl. On the congruence of modularity and code coupling. In Proceedings of the 19th ACM SIGSOFT symposium and the 13th European conference on Foundations of software engineering, pages 354--364. ACM, 2011.
[8]
E. Bertin. A concise introduction to the statistical physics of complex systems. Springer, 2012.
[9]
K. Blincoe, G. Valetto, and S. Goggins. Proximity: a measure to quantify the need for developers' coordination. In Proceedings of the ACM 2012 conference on Computer Supported Cooperative Work, pages 1351--1360. ACM, 2012.
[10]
S. Bryton and F. B. e. Abreu. Modularity-oriented refactoring. In Software Maintenance and Reengineering, 2008. CSMR 2008. 12th European Conference on, pages 294--297. IEEE, 2008.
[11]
J. Cruz and C. Dorea. Simple conditions for the convergence of simulated annealing type algorithms. Journal of applied probability, pages 885--892, 1998.
[12]
J. S. Davis. Effect of modularity on maintainability of rule-based systems. International Journal of Man-Machine Studies, 32(4):439--447, 1990.
[13]
E. W. Dijkstra. On the role of scientific thought. In Selected Writings on Computing: A Personal Perspective, pages 60--66. Springer, 1982.
[14]
D. Doval, S. Mancoridis, and B. S. Mitchell. Automatic clustering of software systems using a genetic algorithm. In Software Technology and Engineering Practice, 1999. STEP'99. Proceedings, pages 73--81. IEEE, 1999.
[15]
B. Du Bois, S. Demeyer, and J. Verelst. Refactoring-improving coupling and cohesion of existing code. In Reverse Engineering, 2004. Proceedings. 11th Working Conference on, pages 144--151. IEEE, 2004.
[16]
M. Fowler. Refactoring: improving the design of existing code. Addison-Wesley Professional, 1999.
[17]
M. M. Geipel. Modularity, dependence and change. Advances in Complex Systems, 15(06), 2012.
[18]
M. M. Geipel and F. Schweitzer. The link between dependency and co-change: Empirical evidence. IEEE Transactions on Software Engineering, 38(6):1432--1444, 2012.
[19]
V. Granville, M. Kriv´anek, and J.-P. Rasson. Simulated annealing: A proof of convergence. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 16(6):652--656, 1994.
[20]
R. Hall, K. Pauls, S. McCulloch, and D. Savage. OSGi in action: Creating modular applications in Java. Manning Publications Co., 2011.
[21]
E. Hautus. Improving java software through package structure analysis. In The 6th IASTED International Conference Software Engineering and Applications, 2002.
[22]
S. Kirkpatrick, D. G. Jr., and M. P. Vecchi. Optimization by simmulated annealing. science, 220(4598):671--680, 1983.
[23]
R. Koschke. Atomic architectural component recovery for program understanding and evolution. In Software Maintenance, 2002. Proceedings. International Conference on, pages 478--481. IEEE, 2002.
[24]
W. Li and S. Henry. Object-oriented metrics that predict maintainability. Journal of systems and software, 23(2):111--122, 1993.
[25]
K. Mahdavi, M. Harman, and R. M. Hierons. A multiple hill climbing approach to software module clustering. In Software Maintenance, 2003. ICSM 2003. Proceedings. International Conference on, pages 315--324. IEEE, 2003.
[26]
N. Metropolis, A.W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equation of state calculations by fast computing machines. The journal of chemical physics, 21:1087, 1953.
[27]
D. Mitra, F. Romeo, and A. Sangiovanni-Vincentelli. Convergence and finite-time behavior of simulated annealing. In Decision and Control, 1985 24th IEEE Conference on, volume 24, pages 761--767. IEEE, 1985.
[28]
M. E. J. Newman. Mixing patterns in networks. Phy. Review E, 67: 026126, 2003.
[29]
M. E. J. Newman and M. Girvan. Finding and evaluating community structure in networks. Physical Review E, 69:026113, 2004.
[30]
D. L. Parnas. On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12):1053--1058, 1972.
[31]
D. L. Parnas, P. C. Clements, and D. M. Weiss. The modular structure of complex systems. Software Engineering, IEEE Transactions on, 11 (3):259--266, 1985.
[32]
S. Parsa and O. Bushehrian. Genetic clustering with constraints. Journal of research and practice in information technology, 39(1):47--60, 2007.
[33]
D. Poshyvanyk and A. Marcus. The conceptual coupling metrics for object-oriented systems. In Software Maintenance, 2006. ICSM'06. 22nd IEEE International Conference on, pages 469--478. IEEE, 2006.
[34]
W. P. Stevens, G. J. Myers, and L. L. Constantine. Structured design. IBM Systems Journal, 13(2):115--139, 1974.
[35]
E. Tempero, C. Anslow, J. Dietrich, T. Han, J. Li, M. Lumpe, H. Melton, and J. Noble. Qualitas corpus: A curated collection of java code for empirical studies. In 2010 APSEC, pages 336--345, 2010.
[36]
J. Tessier. The dependency finder user manual. . Dependency Finder (2001-2012). Revised BSD License., 2012.
[37]
C. J. Tessone, M. M. Geipel, and F. Schweitzer. Sustainable growth in complex networks. EPL (Europhysics Letters), 96:58005, 2011.
[38]
Y. Umeda, S. Fukushige, K. Tonoike, and S. Kondoh. Product modularity for life cycle design. CIRP Annals-Manufacturing Technology, 57(1):13--16, 2008.
[39]
G. Valetto, M. Helander, K. Ehrlich, S. Chulani, M. Wegman, and C.Williams. Using software repositories to investigate socio-technical congruence in development projects. In MSR '07, pages 25--25. IEEE, 2007.
[40]
F. Y.Wu. The potts model. Reviews of Modern Physics, 54:235, 1982.
[41]
J. Wu, A. E. Hassan, and R. C. Holt. Comparison of clustering algorithms in the context of software evolution. In Software Maintenance, 2005. ICSM'05. Proceedings of the 21st IEEE International Conference on, pages 525--535. IEEE, 2005.
[42]
M. S. Zanetti. The co-evolution of socio-technical structures in sustainable software development: Lessons from the open source software communities. In Proceedings of the 34th ICSE, pages 1587--1590. IEEE Press, 2012.
[43]
M. S. Zanetti. A complex systems approach to software engineering. PhD thesis, Diss., Eidgenössische Technische Hochschule ETH Zürich, Nr. 21653, 2013, 2013.
[44]
M. S. Zanetti and F. Schweitzer. A network perspective on software modularity. In Architecture of Computing Systems (ARCS) Workshops 2012, pages 175--186. GI, IEEE, 2012.

Cited By

View all
  • (2024)A systematic review of refactoring opportunities by software antipattern detectionAutomated Software Engineering10.1007/s10515-024-00443-y31:2Online publication date: 15-May-2024
  • (2023)RMT: A Semi-Automated Tool for Refactoring Design PatternsProceedings of the XXXVII Brazilian Symposium on Software Engineering10.1145/3613372.3613416(77-82)Online publication date: 25-Sep-2023
  • (2023)From Inheritance to Mockito: An Automatic Refactoring ApproachIEEE Transactions on Software Engineering10.1109/TSE.2022.323185049:4(2791-2814)Online publication date: 1-Apr-2023
  • Show More Cited By

Index Terms

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

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    MODULARITY '14: Proceedings of the 13th international conference on Modularity
    April 2014
    264 pages
    ISBN:9781450327725
    DOI:10.1145/2577080
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Sponsors

    • AOSA: Aspect-Oriented Software Association

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 22 April 2014

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. complex networks
    2. refactoring
    3. remodularization

    Qualifiers

    • Research-article

    Conference

    MODULARITY '14
    Sponsor:
    • AOSA

    Acceptance Rates

    MODULARITY '14 Paper Acceptance Rate 21 of 60 submissions, 35%;
    Overall Acceptance Rate 41 of 139 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)11
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 13 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)A systematic review of refactoring opportunities by software antipattern detectionAutomated Software Engineering10.1007/s10515-024-00443-y31:2Online publication date: 15-May-2024
    • (2023)RMT: A Semi-Automated Tool for Refactoring Design PatternsProceedings of the XXXVII Brazilian Symposium on Software Engineering10.1145/3613372.3613416(77-82)Online publication date: 25-Sep-2023
    • (2023)From Inheritance to Mockito: An Automatic Refactoring ApproachIEEE Transactions on Software Engineering10.1109/TSE.2022.323185049:4(2791-2814)Online publication date: 1-Apr-2023
    • (2023)Timetable Generator for Educational Institute Using Genetic Algorithm2023 3rd International Conference on Technological Advancements in Computational Sciences (ICTACS)10.1109/ICTACS59847.2023.10389824(19-24)Online publication date: 1-Nov-2023
    • (2023)Improving Software Modularity Using Software Remodularization: Challenges and OpportunitiesITM Web of Conferences10.1051/itmconf/2023540100854(01008)Online publication date: 4-Jul-2023
    • (2023)MIRROR: multi-objective refactoring recommendation via correlation analysisAutomated Software Engineering10.1007/s10515-023-00400-131:1Online publication date: 21-Oct-2023
    • (2022)Analysis of a many-objective optimization approach for identifying microservices from legacy systemsEmpirical Software Engineering10.1007/s10664-021-10049-727:2Online publication date: 1-Feb-2022
    • (2021)An automatic refactoring framework for replacing test-production inheritance by mocking mechanismProceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3468264.3468590(540-552)Online publication date: 20-Aug-2021
    • (2021)Deep analysis of quality of primary studies on assessing the impact of refactoring on software qualityMaterials Today: Proceedings10.1016/j.matpr.2020.11.217Online publication date: Jan-2021
    • (2020)Software Remodularization Using Tabu SearchProceedings of the 2020 International Conference on Internet Computing for Science and Engineering10.1145/3424311.3424321(25-29)Online publication date: 14-Jan-2020
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media