arrow
返回

Exploring the Boundaries Between LLM Code Clone Detection and Code Similarity Assessment on Human and AI-Generated Code

delete2025-02-13
delete0
delete
OA
AI
Z
Zixian Zhang *
T
Takfarinas Saber
DOI:10.3390/bdcc9020041delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
As Large Language Models (LLMs) continue to advance, their capabilities in code clone detection have garnered significant attention. While much research has assessed LLM performance on human-generated code, the proliferation of LLM-generated code raises critical questions about their ability to detect clones across both human- and LLM-created codebases, as this capability remains largely unexplored. This paper addresses this gap by evaluating two versions of LLaMA3 on these distinct types of datasets. Additionally, we perform a deeper analysis beyond simple prompting, examining the nuanced relationship between code cloning and code similarity that LLMs infer. We further explore how fine-tuning impacts LLM performance in clone detection, offering new insights into the interplay between code clones and similarity in human versus AI-generated code. Our findings reveal that LLaMA models excel in detecting syntactic clones but face challenges with semantic clones. Notably, the models perform better on LLM-generated datasets for semantic clones, suggesting a potential bias. The fine-tuning technique enhances the ability of LLMs to comprehend code semantics, improving their performance in both code clone detection and code similarity assessment. Our results offer valuable insights into the effectiveness and characteristics of LLMs in clone detection and code similarity assessment, providing a foundation for future applications and guiding further research in this area.
Keyword:
code clone detection
code similarity
large language model
fine-tuning
LLM-generated code

期刊

B
Big Data and Cognitive Computing
IF:
4.4
论文数:
1.3K
被引数:
2.4K

机构

暂无机构信息
引用论文

引用论文

Improvements to code2vec: Generating path vectors using RNN
err2023-09-01
err0
PREAI
errSun, Xuekai; Liu, Chunling; Dong, Weiyu; Liu, Tieming
err分享
err收藏
The Interface of Child Mental Health and Juvenile Diabetes Mellitus
err2015-03-01
err0
PREAI
errSandra L. Fritsch; Mark W. Overton; Douglas R. Robbins
err分享
err收藏
Comparison and evaluation of clone detection tools克隆检测工具的比较与评价
err2007-09-01
err510
errOAAI
errBellon, Stefan; Koschke, Rainer; Antoniol, Giuliano; Krinke, Jens; Merlo, Ettore
err分享
err收藏
err分享
err收藏
学者 查看更多内容