{"title":"A qualitative approach for refactoring of code clone opportunities using graph and tree methods","authors":"Chaitanya Kulkarni","doi":"10.1109/INCITE.2016.7857608","DOIUrl":null,"url":null,"abstract":"Reusing of code has been a very common practice in software development. This practice has been implemented to reduce programming time and efforts greatly. This copying and pasting behavior of programmers leads to cloning of codes and therefore has a very serious impact on the maintenance of the software systems. Many clone detection tool has been proposed to find out the copied code. However, refactoring of code is still a challenging part as most of the ongoing tools depend on detection of clone rather than the ability to make decision on refactorability. These tools do not guarantee whether such codes can be safely refactored or not. Our aim mainly lies on detecting the possibility of refactoring a code. To find out whether the code clone can be securely refactored or not, three methods are applied: Nesting Structure Mapping, Statement Mapping and Precondition Examination. In order to refactor the code, we apply some techniques like Pull-Up Method and Push-Down Method. In our approach, we have tried to find the refactorable code using the methods and also refactored the code so as to remove the problem of code cloning.","PeriodicalId":59618,"journal":{"name":"下一代","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2016-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"下一代","FirstCategoryId":"1092","ListUrlMain":"https://doi.org/10.1109/INCITE.2016.7857608","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2
Abstract
Reusing of code has been a very common practice in software development. This practice has been implemented to reduce programming time and efforts greatly. This copying and pasting behavior of programmers leads to cloning of codes and therefore has a very serious impact on the maintenance of the software systems. Many clone detection tool has been proposed to find out the copied code. However, refactoring of code is still a challenging part as most of the ongoing tools depend on detection of clone rather than the ability to make decision on refactorability. These tools do not guarantee whether such codes can be safely refactored or not. Our aim mainly lies on detecting the possibility of refactoring a code. To find out whether the code clone can be securely refactored or not, three methods are applied: Nesting Structure Mapping, Statement Mapping and Precondition Examination. In order to refactor the code, we apply some techniques like Pull-Up Method and Push-Down Method. In our approach, we have tried to find the refactorable code using the methods and also refactored the code so as to remove the problem of code cloning.