Development and Benchmarking of Multilingual Code Clone Detector

Wenqing Zhu, Norihiro Yoshida, Toshihiro Kamiya, Eunjong Choi, Hiroaki Takada
{"title":"Development and Benchmarking of Multilingual Code Clone Detector","authors":"Wenqing Zhu, Norihiro Yoshida, Toshihiro Kamiya, Eunjong Choi, Hiroaki Takada","doi":"arxiv-2409.06176","DOIUrl":null,"url":null,"abstract":"The diversity of programming languages is growing, making the language\nextensibility of code clone detectors crucial. However, this is challenging for\nmost existing clone detection detectors because the source code handler needs\nmodifications, which require specialist-level knowledge of the targeted\nlanguage and is time-consuming. Multilingual code clone detectors make it\neasier to add new language support by providing syntax information of the\ntarget language only. To address the shortcomings of existing multilingual\ndetectors for language scalability and detection performance, we propose a\nmultilingual code block extraction method based on ANTLR parser generation, and\nimplement a multilingual code clone detector (MSCCD), which supports the most\nsignificant number of languages currently available and has the ability to\ndetect Type-3 code clones. We follow the methodology of previous studies to\nevaluate the detection performance of the Java language. Compared to ten\nstate-of-the-art detectors, MSCCD performs at an average level while it also\nsupports a significantly larger number of languages. Furthermore, we propose\nthe first multilingual syntactic code clone evaluation benchmark based on the\nCodeNet database. Our results reveal that even when applying the same detection\napproach, performance can vary markedly depending on the language of the source\ncode under investigation. Overall, MSCCD is the most balanced one among the\nevaluated tools when considering detection performance and language\nextensibility.","PeriodicalId":501278,"journal":{"name":"arXiv - CS - Software Engineering","volume":"27 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-09-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Software Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2409.06176","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The diversity of programming languages is growing, making the language extensibility of code clone detectors crucial. However, this is challenging for most existing clone detection detectors because the source code handler needs modifications, which require specialist-level knowledge of the targeted language and is time-consuming. Multilingual code clone detectors make it easier to add new language support by providing syntax information of the target language only. To address the shortcomings of existing multilingual detectors for language scalability and detection performance, we propose a multilingual code block extraction method based on ANTLR parser generation, and implement a multilingual code clone detector (MSCCD), which supports the most significant number of languages currently available and has the ability to detect Type-3 code clones. We follow the methodology of previous studies to evaluate the detection performance of the Java language. Compared to ten state-of-the-art detectors, MSCCD performs at an average level while it also supports a significantly larger number of languages. Furthermore, we propose the first multilingual syntactic code clone evaluation benchmark based on the CodeNet database. Our results reveal that even when applying the same detection approach, performance can vary markedly depending on the language of the source code under investigation. Overall, MSCCD is the most balanced one among the evaluated tools when considering detection performance and language extensibility.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
多语言代码克隆检测器的开发与基准测试
编程语言的多样性与日俱增,使得代码克隆检测器的语言扩展性变得至关重要。然而,这对大多数现有的克隆检测器来说是个挑战,因为源代码处理程序需要修改,这需要目标语言的专业知识,而且非常耗时。多语言代码克隆检测器只提供目标语言的语法信息,因此更容易添加新的语言支持。针对现有多语言检测器在语言可扩展性和检测性能方面的不足,我们提出了基于 ANTLR 解析器生成的多语言代码块提取方法,并实现了多语言代码克隆检测器(MSCCD),该检测器支持目前最重要的语言数量,并具有检测第 3 类代码克隆的能力。我们采用以往研究的方法来评估 Java 语言的检测性能。与十种最先进的检测器相比,MSCCD 的性能处于平均水平,同时它支持的语言数量也大大增加。此外,我们还提出了首个基于 CodeNet 数据库的多语言句法代码克隆评估基准。我们的结果表明,即使采用相同的检测方法,性能也会因所调查源代码的语言不同而有明显差异。总体而言,考虑到检测性能和语言扩展性,MSCCD 是受评工具中最均衡的一种。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Promise and Peril of Collaborative Code Generation Models: Balancing Effectiveness and Memorization Shannon Entropy is better Feature than Category and Sentiment in User Feedback Processing Motivations, Challenges, Best Practices, and Benefits for Bots and Conversational Agents in Software Engineering: A Multivocal Literature Review A Taxonomy of Self-Admitted Technical Debt in Deep Learning Systems Investigating team maturity in an agile automotive reorganization
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1