An Empirical Exploration of Refactoring effect on Software Quality using External Quality Factors

Quality software are robust, reliable and easy to maintain, and therefore reduces the cost of software maintenance. Since software systems undergo modifications, improvements and enhancements to cope with evolving requirements, quality of software can be decreased. While software system is evolving, Refactoring is one of the methods which have been applied with the purpose of improving the software quality. Refactoring is defined as the process of improving the design of the existing code by changing its internal structure without affecting its external behavior, with the main aims of improving the quality of software product. Therefore, there is 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. Experimental research approach was used to achieve the objective and ten selected refactoring techniques were used for the analysis. The overall impact of selected refactoring techniques and the impact of individual refactoring technique was assessed based on external measures namely; analyzability, changeability, time behavior and resource utilization. After analyzing the experimental results, overall analysis ended up with the result that refactoring deteriorate the code quality. However, individual analysis shows that some refactoring techniques improve the code quality while rest is deteriorating the code quality. Furthermore, among the tested ten refactoring techniques, “Replace Conditional with Polymorphism” ranked in the highest as having high percentage of improvement in code quality and “Introduce Null Object” was ranked as worst which is having highest percentage of deteriorate of code quality among the analyzed ten refactoring techniques.

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

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

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

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

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

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

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

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

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

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

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

[12]  Fatma Dandashi,et al.  A method for assessing the reusability of object-oriented code using a validated set of automated measurements , 2002, SAC '02.

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

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

[15]  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).

[16]  R HerrinWilliam Software maintenance costs , 1985 .