A robust multi-objective approach to balance severity and importance of refactoring opportunities

Refactoring large systems involves several sources of uncertainty related to the severity levels of code smells to be corrected and the importance of the classes in which the smells are located. Both severity and importance of identified refactoring opportunities (e.g. code smells) are difficult to estimate. In fact, due to the dynamic nature of software development, these values cannot be accurately determined in practice, leading to refactoring sequences that lack robustness. In addition, some code fragments can contain severe quality issues but they are not playing an important role in the system. To address this problem, we introduced a multi-objective robust model, based on NSGA-II, for the software refactoring problem that tries to find the best trade-off between three objectives to maximize: quality improvements, severity and importance of refactoring opportunities to be fixed. We evaluated our approach using 8 open source systems and one industrial project, and demonstrated that it is significantly better than state-of-the-art refactoring approaches in terms of robustness in all the experiments based on a variety of real-world scenarios. Our suggested refactoring solutions were found to be comparable in terms of quality to those suggested by existing approaches, better prioritization of refactoring opportunities and to carry an acceptable robustness price.

[1]  Arthur J. Riel,et al.  Object-Oriented Design Heuristics , 1996 .

[2]  Mark Harman,et al.  Experimental assessment of software metrics using automated refactoring , 2012, Proceedings of the 2012 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement.

[3]  Alexander Chatzigeorgiou,et al.  Investigating the evolution of code smells in object-oriented systems , 2014, Innovations in Systems and Software Engineering.

[4]  Hans-Georg Beyer,et al.  Actuator Noise in Recombinant Evolution Strategies on General Quadratic Fitness Models , 2004, GECCO.

[5]  Gail C. Murphy,et al.  ClassCompass: A software design mentoring system , 2007, JERC.

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

[7]  Lionel C. Briand,et al.  A practical guide for using statistical tests to assess randomized algorithms in software engineering , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[8]  Jürgen Branke,et al.  Evolutionary optimization in uncertain environments-a survey , 2005, IEEE Transactions on Evolutionary Computation.

[9]  Indraneel Das,et al.  ROBUSTNESS OPTIMIZATION FOR CONSTRAINED NONLINEAR PROGRAMMING PROBLEMS , 2000 .

[10]  Houari A. Sahraoui,et al.  Design Defects Detection and Correction by Example , 2011, 2011 IEEE 19th International Conference on Program Comprehension.

[11]  Adrian Trifu,et al.  Towards Automated Restructuring of Object Oriented Systems , 2007, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[12]  Jerffeson Souza,et al.  A scenario-based robust model for the next release problem , 2013, GECCO '13.

[13]  Jean-Marc Jézéquel,et al.  Refactoring UML Models , 2001, UML.

[14]  Carl G. Davis,et al.  A Hierarchical Model for Object-Oriented Design Quality Assessment , 2002, IEEE Trans. Software Eng..

[15]  Foutse Khomh,et al.  Numerical Signatures of Antipatterns: An Approach Based on B-Splines , 2010, 2010 14th European Conference on Software Maintenance and Reengineering.

[16]  Bernhard Sendhoff,et al.  Robust Optimization - A Comprehensive Survey , 2007 .

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

[18]  Yi Sun,et al.  Some Code Smells Have a Significant but Small Effect on Faults , 2014, TSEM.

[19]  Mark Kent O'Keeffe,et al.  Search-based refactoring for software maintenance , 2008, J. Syst. Softw..

[20]  Robert L. Glass,et al.  Loyal Opposition - Frequently Forgotten Fundamental Facts about Software Engineering , 2001, IEEE Softw..

[21]  Bernhard Sendhoff,et al.  Trade-Off between Performance and Robustness: An Evolutionary Multiobjective Approach , 2003, EMO.

[22]  A. Vargha,et al.  A Critique and Improvement of the CL Common Language Effect Size Statistics of McGraw and Wong , 2000 .

[23]  Kalyanmoy Deb,et al.  A fast and elitist multiobjective genetic algorithm: NSGA-II , 2002, IEEE Trans. Evol. Comput..

[24]  Mark Harman,et al.  Genetic and Evolutionary Computation Conference , 2006 .

[25]  Gabriele Bavota,et al.  Detecting bad smells in source code using change history information , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[26]  Daniela Cruzes,et al.  Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems , 2010, 2010 IEEE International Conference on Software Maintenance.

[27]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[28]  Thomas J. Mowbray,et al.  AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis , 1998 .

[29]  Yuanyuan Zhang,et al.  Search-based software engineering: Trends, techniques and applications , 2012, CSUR.

[30]  Bente Anda,et al.  Assessing Software System Maintainability using Structural Measures and Expert Assessments , 2007, 2007 IEEE International Conference on Software Maintenance.

[31]  Mohamed Wiem Mkaouer,et al.  A Robust Multi-objective Approach for Software Refactoring under Uncertainty , 2014, SSBSE.

[32]  Giuliano Antoniol,et al.  A robust search-based approach to project management in the presence of abandonment, rework, error and uncertainty , 2004, 10th International Symposium on Software Metrics, 2004. Proceedings..

[33]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

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

[35]  Lily Rachmawati,et al.  Multiobjective Evolutionary Algorithm With Controllable Focus on the Knees of the Pareto Front , 2009, IEEE Transactions on Evolutionary Computation.

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

[37]  Radu Marinescu,et al.  Detection strategies: metrics-based rules for detecting design flaws , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[38]  Xiaodong Li,et al.  A Non-dominated Sorting Particle Swarm Optimizer for Multiobjective Optimization , 2003, GECCO.

[39]  Houari A. Sahraoui,et al.  Maintainability defects detection and correction: a multi-objective approach , 2013, Automated Software Engineering.

[40]  M. Mäntylä,et al.  Subjective evaluation of software evolvability using code smells: An empirical study , 2006, Empirical Software Engineering.

[41]  Alberto Bacchelli,et al.  On the Impact of Design Flaws on Software Defects , 2010, 2010 10th International Conference on Quality Software.

[42]  Bahman Zamani,et al.  SMELL DETECTION IN UML DESIGNS WHICH UTILIZE PATTERN LANGUAGES , 2009 .

[43]  Edward Yourdon,et al.  Object-oriented design , 1991, Yourdon Press Computing Series.

[44]  Iman Hemati Moghadam,et al.  Automated Refactoring Using Design Differencing , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.

[45]  Radu Marinescu,et al.  InCode: Continuous Quality Assessment and Improvement , 2010, 2010 14th European Conference on Software Maintenance and Reengineering.

[46]  Mark Harman,et al.  10 th International Software Metrics Symposium (METRICS 2004) , 2004 .

[47]  Mika Mäntylä,et al.  Comparing and experimenting machine learning techniques for code smell detection , 2015, Empirical Software Engineering.

[48]  Yann-Gaël Guéhéneuc,et al.  DECOR: A Method for the Specification and Detection of Code and Design Smells , 2010, IEEE Transactions on Software Engineering.

[49]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

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

[51]  Giuliano Antoniol,et al.  Software project planning for robustness and completion time in the presence of uncertainty using multi objective search based software engineering , 2009, GECCO.

[52]  Betty H. C. Cheng,et al.  On the use of genetic programming for automated refactoring and the introduction of design patterns , 2010, GECCO '10.

[53]  K. Deb,et al.  Understanding knee points in bicriteria problems and their implications as preferred solution principles , 2011 .

[54]  Aiko Yamashita,et al.  Assessing the Capability of Code Smells to Support Software Maintainability Assessments: Empirical Inquiry and Methodological Approach , 2012 .

[55]  Mark Harman,et al.  Pareto optimal search based refactoring at the design level , 2007, GECCO '07.

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

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

[58]  Houari A. Sahraoui,et al.  Can metrics help to bridge the gap between the improvement of OO design quality and its automation? , 2000, Proceedings 2000 International Conference on Software Maintenance.

[59]  Giuliano Antoniol,et al.  A robust search-based approach to project management in the presence of abandonment, rework, error and uncertainty , 2004 .

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

[61]  Aiko Fallas Yamashita,et al.  Do code smells reflect important maintainability aspects? , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

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