Does the Act of Refactoring Really Make Code Simpler ? A Preliminary Study

Refactoring is the act of changing software code, usually to improve internal code quality, without changing its external behavior. Soetens and Demeyer (2010) analyzed one software and showed that code refactoring did not imply in better result for code quality metrics. In this work, we extend Soetens and Demeyer study, mining data from 256 software projects from Apache Software Foundation, using MetricMiner, a web application focused on supporting mining software repositories studies. The quantitative analysis showed that refactoring indeed does not decrease Cyclomatic Complexity. On the other hand, the qualitative analysis showed that a refactoring tends to improve code in terms of readability and maintainability.

[1]  M.M. Lehman,et al.  Programs, life cycles, and laws of software evolution , 1980, Proceedings of the IEEE.

[2]  Harald C. Gall,et al.  Mining Software Evolution to Predict Refactoring , 2007, First International Symposium on Empirical Software Engineering and Measurement (ESEM 2007).

[3]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[4]  Mohammad Alshayeb,et al.  Empirical investigation of refactoring effect on software quality , 2009, Inf. Softw. Technol..

[5]  Stephan Diehl,et al.  Comparison of similarity metrics for refactoring detection , 2011, MSR '11.

[6]  Tom Mens,et al.  Does God Class Decomposition Affect Comprehensibility? , 2006, IASTED Conf. on Software Engineering.

[7]  Diomidis Spinellis,et al.  Refactoring--Does It Improve Software Quality? , 2007, Fifth International Workshop on Software Quality (WoSQ'07: ICSE Workshops 2007).

[8]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.

[9]  Andrew P. Black,et al.  How We Refactor, and How We Know It , 2012, IEEE Trans. Software Eng..

[10]  Audris Mockus,et al.  Refactoring for changeability: a way to go? , 2005, 11th IEEE International Software Metrics Symposium (METRICS'05).

[11]  Serge Demeyer,et al.  Studying the Effect of Refactorings: A Complexity Metrics Perspective , 2010, 2010 Seventh International Conference on the Quality of Information and Communications Technology.

[12]  Andrew P. Black,et al.  How we refactor, and how we know it , 2009, 2009 IEEE 31st International Conference on Software Engineering.