Identifying refactoring opportunities in object-oriented code: A systematic literature review

Abstract Context Identifying refactoring opportunities in object-oriented code is an important stage that precedes the actual refactoring process. Several techniques have been proposed in the literature to identify opportunities for various refactoring activities. Objective This paper provides a systematic literature review of existing studies identifying opportunities for code refactoring activities. Method We performed an automatic search of the relevant digital libraries for potentially relevant studies published through the end of 2013, performed pilot and author-based searches, and selected 47 primary studies (PSs) based on inclusion and exclusion criteria. The PSs were analyzed based on a number of criteria, including the refactoring activities, the approaches to refactoring opportunity identification, the empirical evaluation approaches, and the data sets used. Results The results indicate that research in the area of identifying refactoring opportunities is highly active. Most of the studies have been performed by academic researchers using nonindustrial data sets. Extract Class and Move Method were found to be the most frequently considered refactoring activities. The results show that researchers use six primary existing approaches to identify refactoring opportunities and six approaches to empirically evaluate the identification techniques. Most of the systems used in the evaluation process were open-source, which helps to make the studies repeatable. However, a relatively high percentage of the data sets used in the empirical evaluations were small, which limits the generality of the results. Conclusions It would be beneficial to perform further studies that consider more refactoring activities, involve researchers from industry, and use large-scale and industrial-based systems.

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

[2]  Amela Karahasanovic,et al.  A survey of controlled experiments in software engineering , 2005, IEEE Transactions on Software Engineering.

[3]  Shinji Kusumoto,et al.  Identifying, Tailoring, and Suggesting Form Template Method Refactoring Opportunities with Program Dependence Graph , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.

[4]  Gabriele Bavota,et al.  Automating extract class refactoring: an improved method and its evaluation , 2013, Empirical Software Engineering.

[5]  Bing Li,et al.  Refactoring Software Packages via Community Detection in Complex Software Networks , 2013, Int. J. Autom. Comput..

[6]  Mohammed Misbhauddin,et al.  UML model refactoring: a systematic literature review , 2013, Empirical Software Engineering.

[7]  Pearl Brereton,et al.  Lessons from applying the systematic literature review process within the software engineering domain , 2007, J. Syst. Softw..

[8]  William G. Griswold,et al.  Automated support for program refactoring using invariants , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[9]  A. Ananda Rao,et al.  Identifying Clusters of Concepts in a Low Cohesive Class for Extract Class Refactoring Using Metrics Supplemented Agglomerative Clustering Technique , 2012, ArXiv.

[10]  Gabriele Bavota,et al.  Identifying method friendships to remove the feature envy bad smell: NIER track , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

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

[12]  Jehad Al Dallal Constructing models for predicting extract subclass refactoring opportunities using object-oriented quality metrics , 2012, Inf. Softw. Technol..

[13]  Tao Xie,et al.  Automated detection of api refactorings in libraries , 2007, ASE '07.

[14]  Tom Mens,et al.  Identifying refactoring opportunities using logic meta programming , 2003, Seventh European Conference onSoftware Maintenance and Reengineering, 2003. Proceedings..

[15]  Eduardo Kessler Piveta,et al.  Improving the search for refactoring opportunities on object-oriented and aspect-oriented software , 2009 .

[16]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[17]  Alexander Chatzigeorgiou,et al.  Identification of extract method refactoring opportunities for the decomposition of methods , 2011, J. Syst. Softw..

[18]  Ralph E. Johnson,et al.  The role of refactorings in API evolution , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[19]  Jacob Cohen A Coefficient of Agreement for Nominal Scales , 1960 .

[20]  Lindsay Groves,et al.  A Dual Clustering Approach to the Extract Class Refactoring , 2011, SEKE.

[21]  Pearl Brereton,et al.  Performing systematic literature reviews in software engineering , 2006, ICSE.

[22]  Alexander Chatzigeorgiou,et al.  Identification of Extract Method Refactoring Opportunities , 2009, 2009 13th European Conference on Software Maintenance and Reengineering.

[23]  Alexander Chatzigeorgiou,et al.  JDeodorant: Identification and Removal of Feature Envy Bad Smells , 2007, ICSM.

[24]  Alexander Chatzigeorgiou,et al.  Identification of Move Method Refactoring Opportunities , 2009, IEEE Transactions on Software Engineering.

[25]  Weifeng Pan,et al.  Refactoring packages of object-oriented software using genetic algorithm based community detection technique , 2013, Int. J. Comput. Appl. Technol..

[26]  Mohammad Alshayeb,et al.  Software refactoring at the class level using clustering techniques , 2011 .

[27]  Jing Liu,et al.  Class structure refactoring of object-oriented softwares using community detection in dependency networks , 2009, Frontiers of Computer Science in China.

[28]  Eleni Stroulia,et al.  Identification and application of Extract Class refactorings in object-oriented systems , 2012, J. Syst. Softw..

[29]  Tracy Hall,et al.  Code Bad Smells: a review of current knowledge , 2011, J. Softw. Maintenance Res. Pract..

[30]  Ricardo Terra,et al.  Recommending Move Method refactorings using dependency sets , 2013, 2013 20th Working Conference on Reverse Engineering (WCRE).

[31]  Mohammad Alshayeb,et al.  Software refactoring at the function level using new Adaptive K-Nearest Neighbor algorithm , 2010, Adv. Eng. Softw..

[32]  Shinji Kusumoto,et al.  A metric-based approach to identifying refactoring opportunities for merging code clones in a Java software system , 2008 .

[33]  Shinji Kusumoto,et al.  Move code refactoring with dynamic analysis , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

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

[35]  Istvan Gergely Czibula,et al.  Improving Systems Design Using a Clustering Approach , 2006 .

[36]  Lionel C. Briand,et al.  A Precise Method-Method Interaction-Based Cohesion Metric for Object-Oriented Classes , 2012, TSEM.

[37]  Tom Mens,et al.  Beyond the refactoring browser: advanced tool support for software refactoring , 2003, Sixth International Workshop on Principles of Software Evolution, 2003. Proceedings..

[38]  J. R. Landis,et al.  The measurement of observer agreement for categorical data. , 1977, Biometrics.

[39]  Zhendong Niu,et al.  Identification of generalization refactoring opportunities , 2013, Automated Software Engineering.

[40]  Shinji Kusumoto,et al.  A visualization method of program dependency graph for identifying extract method opportunity , 2011, WRT '11.

[41]  Shinji Kusumoto,et al.  ARIES: Refactoring support environment based on code clone analysis , 2004, IASTED Conf. on Software Engineering and Applications.

[42]  Gabriele Bavota,et al.  Identifying Extract Class refactoring opportunities using structural and semantic cohesion measures , 2011, J. Syst. Softw..

[43]  Marouane Kessentini,et al.  A New Design Defects Classification: Marrying Detection and Correction , 2012, FASE.

[44]  Jeffrey G. Gray,et al.  Increasing clone maintenance support by unifying clone detection and refactoring activities , 2012, Inf. Softw. Technol..

[45]  Gabriele Bavota,et al.  Improving software modularization via automated analysis of latent topics and dependencies , 2014, TSEM.

[46]  Istvan Gergely Czibula,et al.  Hierarchical Clustering Based Automatic Refactorings Detection , 2008 .

[47]  Ruben Wangberg A Literature Review on Code Smells and Refactoring , 2010 .

[48]  Alexander Chatzigeorgiou,et al.  Identification of refactoring opportunities introducing polymorphism , 2010, J. Syst. Softw..

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

[50]  Jörg Sander,et al.  Decomposing object-oriented class modules using an agglomerative clustering technique , 2009, 2009 IEEE International Conference on Software Maintenance.

[51]  Gabriele Bavota,et al.  Playing with refactoring: Identifying extract class opportunities through game theory , 2010, 2010 IEEE International Conference on Software Maintenance.

[52]  Stas Negara,et al.  A Comparative Study of Manual and Automated Refactorings , 2013, ECOOP.

[53]  Gabriele Bavota,et al.  Using structural and semantic measures to improve software modularization , 2012, Empirical Software Engineering.

[54]  Johannes Stammel,et al.  Search-based determination of refactorings for improving the class structure of object-oriented systems , 2006, GECCO.

[55]  Gabriele Bavota,et al.  Methodbook: Recommending Move Method Refactorings via Relational Topic Models , 2014, IEEE Transactions on Software Engineering.

[56]  Richard Torkar,et al.  Software fault prediction metrics: A systematic literature review , 2013, Inf. Softw. Technol..

[57]  Eleni Stroulia,et al.  JDeodorant: identification and application of extract class refactorings , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[58]  Jing Wang,et al.  Identifying the move method refactoring opportunities based on evolutionary algorithm , 2013, Int. J. Model. Identif. Control..

[59]  Mohammad Alshayeb,et al.  Software refactoring at the package level using clustering techniques , 2011, IET Softw..

[60]  Ewan D. Tempero,et al.  The CRSS Metric for Package Design Quality , 2007, ACSC.

[61]  Zhendong Niu,et al.  Identifying Fragments to be Extracted from Long Methods , 2009, 2009 16th Asia-Pacific Software Engineering Conference.

[62]  G. Serban,et al.  Restructuring software systems using clustering , 2007, 2007 22nd international symposium on computer and information sciences.

[63]  Emerson R. Murphy-Hill,et al.  Comparing approaches to analyze refactoring activity on software repositories , 2013, J. Syst. Softw..

[64]  Liming Zhao,et al.  Predicting Classes in Need of Refactoring : An Application of Static Metrics , 2006 .

[65]  Doo-Hwan Bae,et al.  Automated scheduling for clone‐based refactoring using a competent GA , 2011, Softw. Pract. Exp..