AYAT: A Lightweight and Efficient Code Clone Detection Technique

Yasir Giani, Luo Ping, Syed Asad Shah
{"title":"AYAT: A Lightweight and Efficient Code Clone Detection Technique","authors":"Yasir Giani, Luo Ping, Syed Asad Shah","doi":"10.1109/ACCC58361.2022.00015","DOIUrl":null,"url":null,"abstract":"Code clones make software maintenance more challenging. Detecting bugs in large systems may significantly increase maintenance costs. Despite the fact that several techniques for clone identification have been proposed over the years, the accuracy and scalability of clone detection techniques remain hot research areas. Previously, Akram et al. proposed the DroidCC hybrid technique, where tokens were encoded into MD5 hash values by encoding them into 128-bit fingerprints, and clones were identified by matching identical hash values. Encoding tokens into MD5 hash values take more time due to the large fingerprint size of MD5 hash values. Due to the enormous chunk size, DroidCC cannot achieve higher accuracy. To overcome the weakness of the DroidCC technique, We proposed a novel AYAT a lightweight hybrid technique to detect clones at the fragment level. To speed up the detection process, we converted tokens into 32-bit polynomial values, and we set the chunk size to 5 lines per chunk to improve accuracy. We tested our technique on 10,968 java projects against 4.98 million lines of code. In comparison to the well-known DroidCC technique, it is significantly faster and more efficient. Our examination demonstrates that precision is significantly improved despite sacrificing scalability. AYAT code cloning detection technique has outscored DroidCC in every aspect.","PeriodicalId":285531,"journal":{"name":"2022 3rd Asia Conference on Computers and Communications (ACCC)","volume":"22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 3rd Asia Conference on Computers and Communications (ACCC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ACCC58361.2022.00015","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Code clones make software maintenance more challenging. Detecting bugs in large systems may significantly increase maintenance costs. Despite the fact that several techniques for clone identification have been proposed over the years, the accuracy and scalability of clone detection techniques remain hot research areas. Previously, Akram et al. proposed the DroidCC hybrid technique, where tokens were encoded into MD5 hash values by encoding them into 128-bit fingerprints, and clones were identified by matching identical hash values. Encoding tokens into MD5 hash values take more time due to the large fingerprint size of MD5 hash values. Due to the enormous chunk size, DroidCC cannot achieve higher accuracy. To overcome the weakness of the DroidCC technique, We proposed a novel AYAT a lightweight hybrid technique to detect clones at the fragment level. To speed up the detection process, we converted tokens into 32-bit polynomial values, and we set the chunk size to 5 lines per chunk to improve accuracy. We tested our technique on 10,968 java projects against 4.98 million lines of code. In comparison to the well-known DroidCC technique, it is significantly faster and more efficient. Our examination demonstrates that precision is significantly improved despite sacrificing scalability. AYAT code cloning detection technique has outscored DroidCC in every aspect.
轻量级、高效的代码克隆检测技术
代码克隆使软件维护更具挑战性。在大型系统中检测bug可能会显著增加维护成本。尽管多年来已经提出了几种克隆鉴定技术,但克隆检测技术的准确性和可扩展性仍然是研究的热点。此前,Akram等人提出了DroidCC混合技术,通过将令牌编码为128位指纹,将其编码为MD5哈希值,通过匹配相同的哈希值来识别克隆。将令牌编码为MD5哈希值需要更多的时间,因为MD5哈希值的指纹大小较大。由于庞大的块大小,DroidCC无法达到更高的精度。为了克服DroidCC技术的缺点,我们提出了一种新的AYAT技术,一种轻量级的混合技术,用于在片段级别检测克隆。为了加快检测过程,我们将令牌转换为32位多项式值,并将块大小设置为每个块5行,以提高准确性。我们在10,968个java项目上对498万行代码测试了我们的技术。与众所周知的DroidCC技术相比,它明显更快、更高效。我们的研究表明,尽管牺牲了可伸缩性,但精度得到了显著提高。AYAT代码克隆检测技术在各个方面都超过了DroidCC。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
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学术文献互助群
群 号:481959085
Book学术官方微信