An Empirical Evaluation of Impact of Refactoring On Internal and External Measures of Code Quality

Refactoring is the process of improving the design of existing code by changing its internal structure without affecting its external behaviour, with the main aims of improving the quality of software product. Therefore, there is a belief that refactoring improves quality factors such as understandability, flexibility, and reusability. However, there is limited empirical evidence to support such assumptions. The objective of this study is to validate/invalidate the claims that refactoring improves software quality. The impact of selected refactoring techniques was assessed using both external and internal measures. Ten refactoring techniques were evaluated through experiments to assess external measures: Resource Utilization, Time Behaviour, Changeability and Analysability which are ISO external quality factors and five internal measures: Maintainability Index, Cyclomatic Complexity, Depth of Inheritance, Class Coupling and Lines of Code. The result of external measures did not show any improvements in code quality after the refactoring treatment. However, from internal measures, maintainability index indicated an improvement in code quality of refactored code than non-refactored code and other internal measures did not indicate any positive effect on refactored code

[1]  Tom Mens,et al.  A survey of software refactoring , 2004, IEEE Transactions on Software Engineering.

[2]  Joost Visser,et al.  A Practical Model for Measuring Maintainability , 2007, 6th International Conference on the Quality of Information and Communications Technology (QUATIC 2007).

[3]  Tom Mens,et al.  Refactoring: Current Research and Future Trends , 2003, LDTA@ETAPS.

[4]  Rafa E. Al-Qutaish Quality Models in Software Engineering Literature: An Analytical and Comparative Study , 2010 .

[5]  Joost Visser,et al.  A Practical Model for Measuring Maintainability , 2007 .

[6]  Takeo Imai,et al.  A quantitative evaluation of maintainability enhancement by refactoring , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[7]  S. H. Kannangara,et al.  Impact of refactoring on external code quality improvement: An empirical evaluation , 2013, 2013 International Conference on Advances in ICT for Emerging Regions (ICTer).

[8]  Alberto Sillitti,et al.  Does Refactoring Improve Reusability? , 2006, ICSR.

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

[10]  Claes Wohlin,et al.  Using Students as Subjects—A Comparative Study of Students and Professionals in Lead-Time Impact Assessment , 2000, Empirical Software Engineering.

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

[12]  Jan Verelst,et al.  Refactoring - improving coupling and cohesion of existing code , 2004, 11th Working Conference on Reverse Engineering.

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

[14]  Petra Kaufmann,et al.  Experimental And Quasi Experimental Designs For Research , 2016 .

[15]  Raed Shatnawi,et al.  An Empirical Assessment of Refactoring Impact on Software Quality Using a Hierarchical Quality Model , 2011 .

[16]  Witold Pedrycz,et al.  A Case Study on the Impact of Refactoring on Quality and Productivity in an Agile Team , 2008, CEE-SET.

[17]  Bart Du Bois,et al.  Describing the impact of refactoring on internal program quality , 2003 .

[18]  Roger S. Pressman,et al.  Software Engineering: A Practitioner's Approach , 1982 .

[19]  Magnus Andersson,et al.  Object-Oriented Design Quality Metrics , 2004 .