| As the continuous iterative development of software,the software structure will become chaotic,the cost of software maintenance and the difficulty of system maintenance will increase,and the software quality will be affected to some extent.For large-scale complex software systems,it is difficult to refactor them manually and ensure that the refactoring solution is universal.To reduce this cost,automatic refactoring is proven to be an effective solution.In the literature,one of the most typical automatic refactoring approaches is the search-based refactoring.This approach refactors software according to some predefined objectives.Existing studies show that the selection of objectives plays a decisive role in the search process.Although many quality objectives and non-quality objectives are proposed,there is no research to compare the effectiveness of these objectives in the same evaluation framework;they also did not analyze whether the combination of quality objectives and non-quality objectives can have better results.In this paper,we study the software refactoring of different target combinations based on search methods.We systematically analyze the effects of different types of refactoring objectives on generating refactoring results satisfying the developer’s expectations,and the effect of combinations of different types of refactoring objectives.To answer these questions,this paper designs a search-based multi-objective software refactoring evaluation framework.Under the framework,this paper investigates the impact of the combination of seven different objectives on software refactoring with six open-source software projects of different scales;the software quality before and after refactoring is evaluated using a variety of indicators that are consistent with the expectations of developers,and the effectiveness of different optimization target combinations is also analyzed,and analyze the distribution of the refactoring results of some target combinations.The experimental results show that the combination of quality objectives and non-quality objectives can better improve the effectiveness of software refactoring than using one of the two types of objectives alone;the combination of Quality objective and the Similarity with Recorded Code Changes objective has a good effect on the improvement of refactoring.In addition,it is verified in genetic algorithm and random search algorithm,which proves that the experimental conclusion has certain universality.The types and frequency of refactoring operation types are systematically analyzed in six open-source software projects. |