Are Classical Clone Detectors Good Enough For the AI Era?
- URL: http://arxiv.org/abs/2509.25754v1
- Date: Tue, 30 Sep 2025 04:19:17 GMT
- Title: Are Classical Clone Detectors Good Enough For the AI Era?
- Abstract summary: Increasing adoption of AI-generated code has reshaped modern software development.<n> AI-generated clones exhibit systematic syntactic patterns and semantic differences learned from large-scale training data.<n>Classical code clone detection tools have historically been validated primarily on human-authoreds.
- Score: 5.2308433103996625
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: The increasing adoption of AI-generated code has reshaped modern software development, introducing syntactic and semantic variations in cloned code. Unlike traditional human-written clones, AI-generated clones exhibit systematic syntactic patterns and semantic differences learned from large-scale training data. This shift presents new challenges for classical code clone detection (CCD) tools, which have historically been validated primarily on human-authored codebases and optimized to detect syntactic (Type 1-3) and limited semantic clones. Given that AI-generated code can produce both syntactic and complex semantic clones, it is essential to evaluate the effectiveness of classical CCD tools within this new paradigm. In this paper, we systematically evaluate nine widely used CCD tools using GPTCloneBench, a benchmark containing GPT-3-generated clones. To contextualize and validate our results, we further test these detectors on established human-authored benchmarks, BigCloneBench and SemanticCloneBench, to measure differences in performance between traditional and AI-generated clones. Our analysis demonstrates that classical CCD tools, particularly those enhanced by effective normalization techniques, retain considerable effectiveness against AI-generated clones, while some exhibit notable performance variation compared to traditional benchmarks. This paper contributes by (1) evaluating classical CCD tools against AI-generated clones, providing critical insights into their current strengths and limitations; (2) highlighting the role of normalization techniques in improving detection accuracy; and (3) delivering detailed scalability and execution-time analyses to support practical CCD tool selection.
Related papers
- Semantic Code Clone Detection: Are We There Yet? [30.160018956984853]
Code clone detection has been extensively studied for decades.<n>Recent approaches have reported remarkably high performance for semantic (Type-4) clones on benchmark datasets.<n>We present the first systematic empirical study investigating the generalizability of state-of-the-art semantic code clone detectors.
arXiv Detail & Related papers (2026-06-24T01:11:40Z) - Zero-shot Evaluation of Deep Learning for Java Code Clone Detection [0.3158660750994145]
We investigate the generalizability of DL-based clone detectors for Java.<n>Our experiments demonstrate that the models' generalizability to unseen code is limited.<n> conventional clone detector NiCad even outperforms the DL-based clone detectors in such a zero-shot evaluation scenario.
arXiv Detail & Related papers (2026-04-15T12:17:40Z) - HyClone: Bridging LLM Understanding and Dynamic Execution for Semantic Code Clone Detection [3.2167919219391474]
Code clone detection is a critical task in software engineering, aimed at identifying duplicated or similar code fragments within or across software systems.<n>Recent advances in large language models (LLMs) have shown promise in understanding code semantics.<n>We propose a novel two-stage framework that combines LLM-based screening with execution-based validation for detecting semantic clones in Python programs.
arXiv Detail & Related papers (2025-08-02T13:11:56Z) - CCL-LGS: Contrastive Codebook Learning for 3D Language Gaussian Splatting [53.15827818829865]
Methods that rely on 2D priors are prone to a critical challenge: cross-view semantic inconsistencies.<n>We propose CCL-LGS, a novel framework that enforces view-consistent semantic supervision by integrating multi-view semantic cues.<n>Our framework explicitly resolves semantic conflicts while preserving category discriminability.
arXiv Detail & Related papers (2025-05-26T19:09:33Z) - Regulatory DNA sequence Design with Reinforcement Learning [56.20290878358356]
We propose a generative approach that leverages reinforcement learning to fine-tune a pre-trained autoregressive model.<n>We evaluate our method on promoter design tasks in two yeast media conditions and enhancer design tasks for three human cell types.
arXiv Detail & Related papers (2025-03-11T02:33:33Z) - Detecting Essence Code Clones via Information Theoretic Analysis [28.696542467142983]
Code cloning involves replicating code fragments to save time but often at the expense of software maintainability and quality.<n>"essence clones" are a complex subtype of Type-3 clones characterized by sharing critical logic despite different peripheral codes.<n>Traditional techniques often fail to detect essence clones due to their syntactic focus.<n>We introduce ECScan, a novel detection tool that leverages information theory to assess the semantic importance of code lines.
arXiv Detail & Related papers (2025-02-26T15:23:40Z) - Assessing the Code Clone Detection Capability of Large Language Models [0.0]
The evaluation involves testing the models on a variety of code pairs of different clone types and levels of similarity.
Findings indicate that GPT-4 consistently surpasses GPT-3.5 across all clone types.
arXiv Detail & Related papers (2024-07-02T16:20:44Z) - Hyperparameters in Continual Learning: A Reality Check [50.784080714897776]
Continual learning (CL) aims to train a model on a sequence of tasks while balancing the trade-off between plasticity (learning new tasks) and stability (retaining prior knowledge)
arXiv Detail & Related papers (2024-03-14T03:13:01Z) - Using a Nearest-Neighbour, BERT-Based Approach for Scalable Clone
Detection [0.0]
SSCD is a BERT-based clone detection approach that targets high recall of Type 3 and Type 4 clones at scale.
It does so by computing a representative embedding for each code fragment and finding similar fragments using a nearest neighbour search.
This paper details the approach and an empirical assessment towards configuring and evaluating that approach in industrial setting.
arXiv Detail & Related papers (2023-09-05T12:38:55Z) - GPTCloneBench: A comprehensive benchmark of semantic clones and
cross-language clones using GPT-3 model and SemanticCloneBench [1.8687918300580921]
We present a comprehensive semantic clone and cross-language clone benchmark, GPTCloneBench by exploiting SemanticCloneBench and OpenAI's GPT-3 model.
From 79,928 clone pairs of GPT-3 output, we created a benchmark with 37,149 true semantic clone pairs, 19,288 false semantic pairs(Type-1/Type-2), and 20,770 cross-language clones across four languages (Java, C, C#, and Python)
arXiv Detail & Related papers (2023-08-26T21:50:34Z) - A Stable, Fast, and Fully Automatic Learning Algorithm for Predictive
Coding Networks [65.34977803841007]
Predictive coding networks are neuroscience-inspired models with roots in both Bayesian statistics and neuroscience.
We show how by simply changing the temporal scheduling of the update rule for the synaptic weights leads to an algorithm that is much more efficient and stable than the original one.
arXiv Detail & Related papers (2022-11-16T00:11:04Z) - ASTRO: An AST-Assisted Approach for Generalizable Neural Clone Detection [12.794933981621941]
Most neural clone detection methods do not generalize beyond the scope of clones that appear in the training dataset.
We present an Abstract Syntax Tree (AST) assisted approach for generalizable neural clone detection, or ASTRO.
Our experimental results show that ASTRO improves state-of-the-art neural clone detection approaches in both recall and F-1 scores.
arXiv Detail & Related papers (2022-08-17T04:50:51Z) - Object-Aware Regularization for Addressing Causal Confusion in Imitation
Learning [131.1852444489217]
This paper presents Object-aware REgularizatiOn (OREO), a technique that regularizes an imitation policy in an object-aware manner.
Our main idea is to encourage a policy to uniformly attend to all semantic objects, in order to prevent the policy from exploiting nuisance variables strongly correlated with expert actions.
arXiv Detail & Related papers (2021-10-27T01:56:23Z) - Semantic Clone Detection via Probabilistic Software Modeling [69.43451204725324]
This article contributes a semantic clone detection approach that detects clones that have 0% syntactic similarity.
We present SCD-PSM as a stable and precise solution to semantic clone detection.
arXiv Detail & Related papers (2020-08-11T17:54:20Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.