{"title":"MIRROR: multi-objective refactoring recommendation via correlation analysis","authors":"Yang Zhang, Ke Guan, Lining Fang","doi":"10.1007/s10515-023-00400-1","DOIUrl":null,"url":null,"abstract":"<div><p>Refactoring is a critical but complex process to improve code quality by altering software structure without changing the observable behavior. Search-based approaches have been proposed to recommend refactoring solutions. However, existing works tend to leverage all the sub-attributes in an objective and ignore the relationship between the sub-attributes. Furthermore, the types of refactoring operations in the existing works can be further augmented. To this end, this paper proposes a novel approach, called <span>MIRROR</span>, to recommend refactoring by employing a multi-objective optimization across three objectives: (i) improving quality, (ii) removing code smell, and (iii) maximizing the similarity to refactoring history. Unlike previous works, <span>MIRROR</span> provides a way to further optimize attributes in each objective. To be more specific, given an objective, <span>MIRROR</span> investigates the possible correlations among attributes and selects those attributes with low correlations as the representation of this objective. <span>MIRROR</span> is evaluated on 6 real-world projects by answering 6 research questions. The experimental results demonstrate that <span>MIRROR</span> recommends an average of 43 solutions for each project. Furthermore, we compare <span>MIRROR</span> against existing tools <span>JMove</span> and <span>QMove</span>, and show that the F1 of <span>MIRROR</span> is 5.63% and 3.75% higher than that of <span>JMove</span> and <span>QMove</span>, demonstrating the effectiveness of <span>MIRROR</span>.</p></div>","PeriodicalId":55414,"journal":{"name":"Automated Software Engineering","volume":"31 1","pages":""},"PeriodicalIF":2.0000,"publicationDate":"2023-10-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Automated Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/10.1007/s10515-023-00400-1","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Refactoring is a critical but complex process to improve code quality by altering software structure without changing the observable behavior. Search-based approaches have been proposed to recommend refactoring solutions. However, existing works tend to leverage all the sub-attributes in an objective and ignore the relationship between the sub-attributes. Furthermore, the types of refactoring operations in the existing works can be further augmented. To this end, this paper proposes a novel approach, called MIRROR, to recommend refactoring by employing a multi-objective optimization across three objectives: (i) improving quality, (ii) removing code smell, and (iii) maximizing the similarity to refactoring history. Unlike previous works, MIRROR provides a way to further optimize attributes in each objective. To be more specific, given an objective, MIRROR investigates the possible correlations among attributes and selects those attributes with low correlations as the representation of this objective. MIRROR is evaluated on 6 real-world projects by answering 6 research questions. The experimental results demonstrate that MIRROR recommends an average of 43 solutions for each project. Furthermore, we compare MIRROR against existing tools JMove and QMove, and show that the F1 of MIRROR is 5.63% and 3.75% higher than that of JMove and QMove, demonstrating the effectiveness of MIRROR.
期刊介绍:
This journal details research, tutorial papers, survey and accounts of significant industrial experience in the foundations, techniques, tools and applications of automated software engineering technology. This includes the study of techniques for constructing, understanding, adapting, and modeling software artifacts and processes.
Coverage in Automated Software Engineering examines both automatic systems and collaborative systems as well as computational models of human software engineering activities. In addition, it presents knowledge representations and artificial intelligence techniques applicable to automated software engineering, and formal techniques that support or provide theoretical foundations. The journal also includes reviews of books, software, conferences and workshops.