{"title":"基于代码复杂度分析提高代码克隆检测的准确性和效率","authors":"Haochen Jin, Zhanqi Cui, Shifan Liu, Liwei Zheng","doi":"10.1109/DSA56465.2022.00017","DOIUrl":null,"url":null,"abstract":"Code cloning is a common activity in software development, which refers to the copying and reusing of code fragments with appropriate modifications. In the era of big code, some code clone detection techniques are no longer suitable for large-scale software or repositories. Code clone filtering can not only significantly improve the efficiency of code clone detection but also effectively improve the accuracy of code clone detection. In this paper, we propose CCFilter which is a code clone filtering tool based on code complexity analysis. In CCFilter, the code complexity of all functions is analyzed, and the functions to be checked are filtered according to the threshold of complexity before detecting code clones. In order to evaluate CCFilter's performance, a set of experiments is conducted. CCFilter is more accurate and efficient than a filtering strategy based on code size. The experimental results also show that filtering improves the scalability and efficiency of code clone detection.","PeriodicalId":208148,"journal":{"name":"2022 9th International Conference on Dependable Systems and Their Applications (DSA)","volume":"23 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Improving Code Clone Detection Accuracy and Efficiency based on Code Complexity Analysis\",\"authors\":\"Haochen Jin, Zhanqi Cui, Shifan Liu, Liwei Zheng\",\"doi\":\"10.1109/DSA56465.2022.00017\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Code cloning is a common activity in software development, which refers to the copying and reusing of code fragments with appropriate modifications. In the era of big code, some code clone detection techniques are no longer suitable for large-scale software or repositories. Code clone filtering can not only significantly improve the efficiency of code clone detection but also effectively improve the accuracy of code clone detection. In this paper, we propose CCFilter which is a code clone filtering tool based on code complexity analysis. In CCFilter, the code complexity of all functions is analyzed, and the functions to be checked are filtered according to the threshold of complexity before detecting code clones. In order to evaluate CCFilter's performance, a set of experiments is conducted. CCFilter is more accurate and efficient than a filtering strategy based on code size. The experimental results also show that filtering improves the scalability and efficiency of code clone detection.\",\"PeriodicalId\":208148,\"journal\":{\"name\":\"2022 9th International Conference on Dependable Systems and Their Applications (DSA)\",\"volume\":\"23 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-08-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 9th International Conference on Dependable Systems and Their Applications (DSA)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/DSA56465.2022.00017\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 9th International Conference on Dependable Systems and Their Applications (DSA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/DSA56465.2022.00017","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Improving Code Clone Detection Accuracy and Efficiency based on Code Complexity Analysis
Code cloning is a common activity in software development, which refers to the copying and reusing of code fragments with appropriate modifications. In the era of big code, some code clone detection techniques are no longer suitable for large-scale software or repositories. Code clone filtering can not only significantly improve the efficiency of code clone detection but also effectively improve the accuracy of code clone detection. In this paper, we propose CCFilter which is a code clone filtering tool based on code complexity analysis. In CCFilter, the code complexity of all functions is analyzed, and the functions to be checked are filtered according to the threshold of complexity before detecting code clones. In order to evaluate CCFilter's performance, a set of experiments is conducted. CCFilter is more accurate and efficient than a filtering strategy based on code size. The experimental results also show that filtering improves the scalability and efficiency of code clone detection.