M. Ichii, Daisuke Shimbara, Yasufumi Suzuki, H. Ogawa
{"title":"Refactoring verification using model transformation","authors":"M. Ichii, Daisuke Shimbara, Yasufumi Suzuki, H. Ogawa","doi":"10.1145/2975945.2975950","DOIUrl":null,"url":null,"abstract":"Software refactoring is an effective way for dealing with technical debt accumulated in a software system; however, regression risk prevents developers from refactoring their code. Herein, we propose an approach to check the equivalence of source code before and after refactoring using the AST-based model extracted from source code. In order to detect unintended changes to the program structure, our approach first transforms the model from the refactored code in accordance with the refactoring pattern so that the refactoring is cancelled, and then compares it with the model from the code before refactoring. We also built a tool named POM/EQ based on the Eclipse Modeling Framework for checking C/C++ source code. As a result of the case study using the tool, we successfully checked 56 % of the refactoring changes that are performed on an industrial product.","PeriodicalId":433677,"journal":{"name":"Proceedings of the 1st International Workshop on Software Refactoring","volume":"56 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-09-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 1st International Workshop on Software Refactoring","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2975945.2975950","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
Software refactoring is an effective way for dealing with technical debt accumulated in a software system; however, regression risk prevents developers from refactoring their code. Herein, we propose an approach to check the equivalence of source code before and after refactoring using the AST-based model extracted from source code. In order to detect unintended changes to the program structure, our approach first transforms the model from the refactored code in accordance with the refactoring pattern so that the refactoring is cancelled, and then compares it with the model from the code before refactoring. We also built a tool named POM/EQ based on the Eclipse Modeling Framework for checking C/C++ source code. As a result of the case study using the tool, we successfully checked 56 % of the refactoring changes that are performed on an industrial product.