# Towards Understanding the Capability of Large Language Models on Code Clone Detection: A Survey

arXiv: https://arxiv.org/abs/2308.01191 · HTML: https://mlsanity.com/paper/2308.01191/

## Key facts

- Cited by 15 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 2 Aug 2023.

## Built on by (most cited first, 15 of 15)

- [Large Language Models for Software Engineering: A Systematic Literature Review](https://mlsanity.com/paper/2308.10620/) (2023)
- [Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code](https://mlsanity.com/paper/2311.07989/) (2023)
- [Improving RL Exploration for LLM Reasoning through Retrospective Replay](https://mlsanity.com/paper/2504.14363/) (2025)
- [Investigating the Efficacy of Large Language Models for Code Clone Detection](https://mlsanity.com/paper/2401.13802/) (2024)
- [Is Functional Correctness Enough to Evaluate Code Language Models? Exploring Diversity of Generated Codes](https://mlsanity.com/paper/2408.14504/) (2024)
- [DocFusion: A Unified Framework for Document Parsing Tasks](https://mlsanity.com/paper/2412.12505/) (2024)
- [The Struggles of LLMs in Cross-lingual Code Clone Detection](https://mlsanity.com/paper/2408.04430/) (2024)
- [MCGMark: An Encodable and Robust Online Watermark for Tracing LLM-Generated Malicious Code](https://mlsanity.com/paper/2408.01354/) (2024)
- [Integrating Large Language Models and Reinforcement Learning for Non-Linear Reasoning](https://mlsanity.com/paper/2410.13501/) (2024)
- [Beyond Keywords: A Context-based Hybrid Approach to Mining Ethical Concern-related App Reviews](https://mlsanity.com/paper/2411.07398/) (2024)
- [Selecting and Combining Large Language Models for Scalable Code Clone Detection](https://mlsanity.com/paper/2510.15480/) (2025)
- [One Model, Many Skills: Parameter-Efficient Fine-Tuning for Multitask Code Analysis](https://mlsanity.com/paper/2603.09978/) (2026)
- [LLMSniffer: Detecting LLM-Generated Code via GraphCodeBERT and Supervised Contrastive Learning](https://mlsanity.com/paper/2604.16058/) (2026)
- [Standing on the Shoulders of Giants: Stabilized Knowledge Distillation for Cross--Language Code Clone Detection](https://mlsanity.com/paper/2605.02860/) (2026)
- [A Unified Model for Cross-Domain Clone Detection via Model Merging](https://mlsanity.com/paper/2608.04215/) (2026)

## Abstract (arXiv)

Code cloning, the duplication of code fragments, is common in software development. While some reuse aids productivity, excessive cloning hurts maintainability and introduces bugs. Hence, automatic code clone detection is vital. Meanwhile, large language models (LLMs) possess diverse code-related knowledge, making them versatile for various software engineering challenges. However, LLMs' performance in code clone detection is unclear and needs more study for accurate assessment. In this paper, we provide the first comprehensive evaluation of LLMs for clone detection, covering different clone types, languages, and prompts. We find advanced LLMs excel in detecting complex semantic clones, surpassing existing methods. Adding intermediate reasoning steps via chain-of-thought prompts noticeably enhances performance. Additionally, representing code as vector embeddings, especially with text encoders, effectively aids clone detection.Lastly, the ability of LLMs to detect code clones differs among various programming languages. Our study suggests that LLMs have potential for clone detection due to their language capabilities, offering insights for developing robust LLM-based methods to enhance software engineering.
