Recommendation system for software refactoring using innovization and interactive dynamic optimization

We propose a novel recommendation tool for software refactoring that dynamically adapts and suggests refactorings to developers interactively based on their feedback and introduced code changes. Our approach starts by finding upfront a set of non-dominated refactoring solutions using NSGA-II to improve software quality, reduce the number of refactorings and increase semantic coherence. The generated non-dominated refactoring solutions are analyzed using our innovization component to extract some interesting common features between them. Based on this analysis, the suggested refactorings are ranked and suggested to the developer one by one. The developer can approve, modify or reject each suggested refactoring, and this feedback is used to update the ranking of the suggested refactorings. After a number of introduced code changes, a local search is performed to update and adapt the set of refactoring solutions suggested by NSGA-II. We evaluated this tool on four large open source systems and one industrial project provided by our partner. Statistical analysis of our experiments over 31 runs shows that the dynamic refactoring approach performed significantly better than three other search-based refactoring techniques, manual refactorings, and one refactoring tool not based on heuristic search.

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

[2]  Gabriele Bavota,et al.  Putting the Developer in-the-Loop: An Interactive GA for Software Re-modularization , 2012, SSBSE.

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

[4]  David Lo,et al.  Active refinement of clone anomaly reports , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[5]  Houari A. Sahraoui,et al.  A Cooperative Parallel Search-Based Software Engineering Approach for Code-Smells Detection , 2014, IEEE Transactions on Software Engineering.

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

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

[8]  Edmund K. Burke,et al.  The efficiency of indicator-based local search for multi-objective combinatorial optimisation problems , 2011, Journal of Heuristics.

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

[10]  Mark Harman,et al.  Search-based software engineering , 2001, Inf. Softw. Technol..

[11]  Deepak Goyal,et al.  A hierarchical model for object-oriented design quality assessment , 2015 .

[12]  Aravind Srinivasan,et al.  Innovization: innovating design principles through optimization , 2006, GECCO.

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

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

[15]  DebK.,et al.  A fast and elitist multiobjective genetic algorithm , 2002 .

[16]  David Lo,et al.  Interactive fault localization leveraging simple user feedback , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[17]  Miryung Kim,et al.  Template-based reconstruction of complex refactorings , 2010, 2010 IEEE International Conference on Software Maintenance.

[18]  Phil McMinn,et al.  Supervised software modularisation , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).