A Low Similarity Score Does Not Show Independence after Source-Conditioned Repository Rewriting
Micheline Bénédicte Moumoula, Serge Lionel Nikiema, Tailia Malloy, Abdoul Kader Kaboré, Jacques Klein, Tegawendé F. Bissyande
Abstract
Maintainers sometimes cite a low token-similarity score as evidence that an LLM-assisted rewrite of a copyleft project is independent of the original. We test what such a score can support under source-conditioned rewriting: a coding agent keeps the original in its working copy, rewrites the repository, and iterates until a fixed behavioural harness passes, with no human edit to the code. On 69 rewrites of six copyleft Python projects we find that: 182~Agent-only rewriting is inexpensive and often yields low scores. Every controlled rewrite passes the harness after repair, usually within half an hour for the initial rewrite. Under a ground-up rearchitecture prompt, most rewrites fall below 25\% JPlag similarity and still pass the harness. 183~A single low score is an unreliable witness. Identical project--agent--prompt configurations produce wide spreads in similarity; run-to-run variation dominates project and agent effects, and in more than a third of configurations the three repeats straddle the threshold. Rewrites retain more of the original's imports and fingerprint facts than unrelated projects do, yet hand-written independent implementations of the same task often retain as much, and neither signal separates the two groups better than chance. Thus a low score on one rewrite is weak evidence of independence: another run of the same agent may score high. Claims based on similarity should report repeated generations, and candidate provenance signals should be checked against same task independent implementations, not only against unrelated projects.
Create a lesson
Related papers
AI-Generated Code Issues: A Taxonomy from Repository Histories, AI Conversations, and Developer Interviews
Shared title terminologycs.SERosalia Tufano, Nargiz Humbatova, Daniele Bifolco et al.
Generating Property-Based Regression Tests from Source Code Semantics
Shared title terminologycs.SEClemens Bauer, Johann Glock, Martin Pinzger
DesignEvo: Recovering and Tracking Repository-Level Implemented Design Systems Across Commits
Shared title terminologycs.SEMingyue Yuan, Jinbo Yang, Jieshan Chen et al.
Diffs Are Cheap, Show Me the Trajectory: An Empirical Study of Trajectory-Informed Code Review
Shared title terminologycs.SEZijian Luo, Pengfei Gao, Dayi Lin et al.
RepoClean: Evaluating Coding Agents on Repository-Level Obsolete Code Cleanup
Shared title terminologycs.SEHongyixuan Yuan, Qixing Zhou, Pengcheng Huang et al.
LLM-Assisted Software Migration: from Module-Level Transformation to Repository-Level Integration
Shared title terminologycs.SEYanan Zhang, Shengqi Liu, Tao Zhang et al.