This paper describes a multi-objective genetic algorithm used to automate software refactoring. The approach is validated using a set of open source Java programs with a purpose built tool, MultiRefactor. The tool uses a metric function to measure quality in a software system and tests a second objective to measure the amount of code coverage of the applied refactorings by analyzing the code elements they have been applied to. The multi-objective setup will refactor the input program to improve its quality using the quality objective, while also maximizing the code coverage of the refactorings applied to the software. An experiment has been constructed to measure the multi-objective approach against the alternative mono-objective approach that does not use an objective to measure refactoring coverage. The two approaches are tested on six different open source Java programs. The multi-objective approach is found to give significantly better refactoring coverage scores across all inputs in a similar time, while also generating improvements in the quality scores.
Mohan, M., Greer, D., & McMullan, P. (2019). Maximizing Refactoring Coverage in an Automated Maintenance Approach using Multi-Objective Optimization. In Proceddings of the 3rd International Workshop on Refactoring (IWOR) (pp. 31-38). IEEE . https://doi.org/10.1109/IWoR.2019.00014