According to the authors, code refactoring aims at “improving the design of existing code by changing its internal structure without [modifying] its external behavior.” The decisions of where the software should be refactored and which refactorings should be applied are not trivial, and some approaches have emerged aimed at automating this decision.
Search-based techniques define the refactoring problem as an optimization problem, where the goal is to automatically find a refactoring solution that optimizes one or several objectives. This paper proposes a multi-criteria search-based refactoring solution that considers four objectives: minimizing the number or design defects, minimizing the number of code changes, preserving the semantic coherence of the program with respect to the domain semantics, and maximizing the consistency with the history of previously applied code changes.
It is a quite long and dense paper mainly oriented toward researchers in the field. The first part is devoted to explaining how the refactoring process has been modeled as a multi-objective problem, and several interesting metrics are proposed to measure design coherence. Then, the adaptation of the NSGA-II multi-objective search technique for its application to the refactoring problem is detailed. After that, the experiment that was carried out to evaluate the feasibility and efficiency of the approach is described.
Evidence suggests that this solution outperforms other approaches, is useful for software engineers in real-world settings, and has a bigger impact on the improvement of the design quality of the system than other existing approaches. An industrial case study was also performed to evaluate the efficiency of the refactoring tool in practice, demonstrating that the tool can provide similar refactorings to the ones that can be manually suggested, and in a faster way.
It is a methodologically sound work and a step forward toward the automation of refactoring, with practical utility in real-world projects.