Lune

FSE2025Top-tier venue

An Empirical Study of Code Clones from Commercial AI Code Generators

Weibin Wu, Haoxuan Hu, Zhaoji Fan, Yitong Qiao, Yizhan Huang, Yichen Li, Zibin Zheng, Michael R. Lyu

Abstract

Deep learning (DL) has revolutionized various software engineering tasks. Particularly, the emergence of AI code generators has pushed the boundaries of automatic programming to synthesize entire programs based on user-defined specifications in natural language. However, it remains a mystery if these AI code generators rely on the copy-and-paste programming practice, resulting in code clone concerns. In this work, to comprehensively study the code cloning behavior of AI code generators, we conduct an empirical study on three state-of-the-art commercial AI code generators to investigate the existence of all types of clones, which remains underexplored. Our experimental results show that the total Type-1 and Type-2 clone rates of the state-of-the-art commercial AI code generators can reach up to 7.50%, indicating marked code clone issues. Furthermore, it is observed that AI code generators risk infringing copyrights and propagating buggy and vulnerable code resulting from cloning code and show a certain degree of stability in generating code clones.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Ref4D-VideoBench: Four-Dimensional Reference-Based Evaluation of Text-to-Video Generative ModelsJiajia Wei, YuJia He, Yuhan Hou, Hang Qi et al.CVPR 2026
  2. QRShield: Exploiting Vulnerabilities of Latent Diffusion Models for Preventing AI Art PlagiarismXunyue Mo, Weibin Wu, Qingrui Tu, Hang Wang et al.AAAI 2026

Related papers

  1. A Comprehensive Study on Code Clones in Automated Driving SoftwareRan Mo, Yingjie Jiang, Wenjing Zhan, Dongyu Wang et al.ASE 2023 · 4 citations
  2. Imitation Game: Reproducing Deep Learning Bugs Leveraging an Intelligent AgentMehil Shah, Mohammad Masudur Rahman, Foutse KhomhICSE 2026
  3. An Empirical Study on Automatically Detecting AI-Generated Source Code: How Far are We?Hyunjae Suh, Mahan Tafreshipour, Jiawei Li, Adithya Bhattiprolu et al.ICSE 2025 · 2 citations
  4. An In-Depth Study on Deep Learning Model CloningBin Hu, Xiancong Pan, Dongjin Yu, Tianyi HuICML 2026
  5. Licoeval: Evaluating LLMs on License Compliance in Code GenerationWeiwei Xu, Kai Gao, Hao He, Minghui ZhouICSE 2025 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines