Git histories keep near-duplicate code that snapshot dedupers miss
Original title: Git History Is a Pangenome: Repetition in Code Training Corpora and What Deduplication Removes, Keeps and Misses
A typical repository history equals about 19 copies of current code, and exact-match deduplication removes none of them.
The paper measures repetition when code models train on full repository histories, using 306 public repositories, 25 mature projects, and the 12 repositories behind SWE-bench. A typical history equals about 19 copies of current code and a mature one about 89, because edits change few lines. Exact-match deduplication removes none of those copies. Near-duplicate grouping across versions cuts repetition to about two copies, but common keep-one rules ignore dates, so half of files keep an old version. Merged SWE-bench fixes persist in a median of 18 later versions.
- Nine tokens in ten of a changed file already existed before the edit.
- Sorting newest-first before deduplication avoids keeping stale file versions.
- Removing benchmark fixes requires checking every later version, not one snapshot.
- The authors release measurement instruments and frozen outputs.
From the original article
1 min read at arxiv.orgCode models are increasingly trained on the full history of software repositories, every version of every file, rather than on a single snapshot. The tools that deduplicate training data were built for snapshots, and what they do to a history has not been measured. We measured it on a pre-registered random sample of 306 public repositories, 25 mature projects, and the 12 repositories behind the SWE-bench benchmark.
By Saurabh Chopra · arxiv.org
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.