基于代码复杂度分析提高代码克隆检测的准确性和效率

Haochen Jin, Zhanqi Cui, Shifan Liu, Liwei Zheng
{"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}
引用次数: 1

摘要

代码克隆是软件开发中的一种常见活动,它指的是对代码片段进行适当修改后的复制和重用。在大代码时代,一些代码克隆检测技术已经不再适用于大型软件或存储库。代码克隆过滤不仅能显著提高代码克隆检测的效率,还能有效提高代码克隆检测的准确性。本文提出了基于代码复杂度分析的代码克隆过滤工具CCFilter。在CCFilter中,首先分析所有函数的代码复杂度,然后根据复杂度阈值对要检查的函数进行过滤,然后再检测代码克隆。为了评估CCFilter的性能,进行了一组实验。CCFilter比基于代码大小的过滤策略更准确、更有效。实验结果还表明,该方法提高了代码克隆检测的可扩展性和效率。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信