{"title":"基于代码克隆检测的遗留软件复用模型研究","authors":"Meng Fanqi, Kan Yunqi","doi":"10.1109/CICN.2013.107","DOIUrl":null,"url":null,"abstract":"The construction of large-scale engineering project usually relies on the development of many new software systems, whereas it would be very expensive and time consuming if these new software systems are completely developed anew. In order to solve the problem, a model of legacy software reuse is proposed in this paper. The model is based on code clone detection. Firstly, code clone in source code of legacy software is detected by means of code clone detection tool. Secondly, abstract syntax trees of the functions which contain code clone are created. Thirdly, the degree of variation between the functions which contain the code clone belongs to the same clone set is calculated according to their abstract syntax trees, and then some functions whose similarities of abstract syntax trees are in the allowed range are combined. Finally, the combined functions and other frequently invoked functions are refactored into new functions or encapsulated into new classes, and all of these functions or classes can be reused as components in the development of new software systems. The test result shows that the reuse method based on this model can shrink the scope for searching the reusable component in legacy software systems, and thus improve the efficiency of legacy software reuse.","PeriodicalId":415274,"journal":{"name":"2013 5th International Conference on Computational Intelligence and Communication Networks","volume":"128 ","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-09-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Research on the Model of Legacy Software Reuse Based on Code Clone Detection\",\"authors\":\"Meng Fanqi, Kan Yunqi\",\"doi\":\"10.1109/CICN.2013.107\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The construction of large-scale engineering project usually relies on the development of many new software systems, whereas it would be very expensive and time consuming if these new software systems are completely developed anew. In order to solve the problem, a model of legacy software reuse is proposed in this paper. The model is based on code clone detection. Firstly, code clone in source code of legacy software is detected by means of code clone detection tool. Secondly, abstract syntax trees of the functions which contain code clone are created. Thirdly, the degree of variation between the functions which contain the code clone belongs to the same clone set is calculated according to their abstract syntax trees, and then some functions whose similarities of abstract syntax trees are in the allowed range are combined. Finally, the combined functions and other frequently invoked functions are refactored into new functions or encapsulated into new classes, and all of these functions or classes can be reused as components in the development of new software systems. The test result shows that the reuse method based on this model can shrink the scope for searching the reusable component in legacy software systems, and thus improve the efficiency of legacy software reuse.\",\"PeriodicalId\":415274,\"journal\":{\"name\":\"2013 5th International Conference on Computational Intelligence and Communication Networks\",\"volume\":\"128 \",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2013-09-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2013 5th International Conference on Computational Intelligence and Communication Networks\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/CICN.2013.107\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2013 5th International Conference on Computational Intelligence and Communication Networks","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CICN.2013.107","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Research on the Model of Legacy Software Reuse Based on Code Clone Detection
The construction of large-scale engineering project usually relies on the development of many new software systems, whereas it would be very expensive and time consuming if these new software systems are completely developed anew. In order to solve the problem, a model of legacy software reuse is proposed in this paper. The model is based on code clone detection. Firstly, code clone in source code of legacy software is detected by means of code clone detection tool. Secondly, abstract syntax trees of the functions which contain code clone are created. Thirdly, the degree of variation between the functions which contain the code clone belongs to the same clone set is calculated according to their abstract syntax trees, and then some functions whose similarities of abstract syntax trees are in the allowed range are combined. Finally, the combined functions and other frequently invoked functions are refactored into new functions or encapsulated into new classes, and all of these functions or classes can be reused as components in the development of new software systems. The test result shows that the reuse method based on this model can shrink the scope for searching the reusable component in legacy software systems, and thus improve the efficiency of legacy software reuse.