A Comprehensive Study of LLM-Based Code Clone Detection

Read full text Summarise with VIRAT
Authors: Zhixuan Wu
Cited by: 0
References: 12

Summary

No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.

Summarise with VIRAT Free to try with your Science Catalogs account.

Abstract

Large language models (LLMs) have strong code-understanding skills, so they are well-suited for code clone detection. This is a key code analysis task that shortens development cycles, improves code quality and reduces security vulnerabilities. Recent studies use prompt engineering, parameter fine-tuning and retrieval-augmented generation (RAG) to raise detection accuracy and stability, but systematic surveys on LLM-based clone detection are still not many. To fill this gap, we do a full survey and empirical analysis of LLMs in clone detection, with a focus on Java programs. First, we review existing methods from multiple dimensions, classifying them by methodological techniques and task requirements. To make the study reliable, we collect datasets of typical clone fragments from different perspectives and conduct unified evaluations on ten models of three types: traditional code analysis, specialized pre-trained deep learning models and general-purpose LLMs. We also use various prompting strategies to ensure fair and comparable assessments. We sum up the strengths and limitations of current methods and point out future research directions. Experiments show that for current clone detection tasks, general-purpose LLMs achieve the best overall performance, specialized deep models perform inconsistently in different settings, and traditional analysis methods do worse. However, the effectiveness of LLMs is still affected by task configuration and prompt design, which means there is much room to improve their robustness and consistency.

Fields of Study & Subjects

Software Engineering Research Topic Modeling Software Testing and Debugging Techniques

Publication details

Journal / source
Applied and Computational Engineering
Volume
227
Issue
1
Pages
46–56
Publication date
16 March 2026
Language
EN