CoChat

DéjàVu: a map of code duplicates on GitHub

Open access
Lopes, Cristina V., Maj, Petr, Martins, Pedro, Saini, Vaibhav, Yang, Di, Zitny, Jakub, Sajnani, Hitesh, Vitek, Jan · 2017 · Proceedings of the ACM on Programming Languages

The DOI matches its Crossref record; 27 of the 27 references it cites were found in a registry or an index.

Abstract

Previous studies have shown that there is a non-trivial amount of duplication in source code. This paper analyzes a corpus of 4.5 million non-fork projects hosted on GitHub representing over 428 million files written in Java, C++, Python, and JavaScript. We found that this corpus has a mere 85 million unique files. In other words, 70% of the code on GitHub consists of clones of previously created files. There is considerable variation between language ecosystems. JavaScript has the highest rate of file duplication, only 6% of the files are distinct. Java, on the other hand, has the least duplication, 60% of files are distinct. Lastly, a project-level analysis shows that between 9% and 31% of the projects contain at least 80% of files that can be found elsewhere. These rates of duplication have implications for systems built on open source software as well as for researchers interested in analyzing large code bases. As a concrete artifact of this study, we have created DéjàVu, a publicly available map of code duplicates in GitHub repositories.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1145/3133908

Cites

27 of 27 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 27 references

Research works printed but not linked: 6

  1. John W. Creswell. 2014. Research Design: ualitative, uantitative, and Mixed Methods Approaches. SAGE.
  2. Robert Dyer, Hoan Anh Nguyen, Hridesh Rajan, and Tien N. Nguyen. 2013. Boa: A Language and Infrastructure for Analyzing Ultra-large-scale Sotware Repositories. In International Conference on Sotware Engineering (ICSE). http: //dl.acm.org/citation.cfm?id=2486788.2486844
  3. R. Koschke. 2007. Survey of research on sotware clones. In Duplication, Redundancy, and Similarity in Sotware (Dagstuhl Seminar Proceedings 06301).
  4. C. K. Roy and J. R. Cordy. 2007. A survey on sotware clone detection research. Technical Report 541. ueens University.
  5. C. K. Roy and J. R. Cordy. 2010. Near-miss Function Clones in Open Source Sotware: An Empirical Study. J. Sotw. Maint. Evol. 22, 3 (2010). https://doi.org/10.1002/smr.v22:3 · doi:10.1002/smr.v22:3
  6. Johnny Saldaña. 2009. The Coding Manual for ualitative Researchers. SAGE.

Cited by

  • PaLM: Scaling Language Modeling with Pathways

    Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung, H. W., Sutton, C., Gehrmann, S., et al. (2022) · arXiv · doi:10.48550/arxiv.2204.02311 · Cited by 2,590

    “Further, we remove duplicates based on Levenshtein distance between the files because duplicate files are known to be common in source code repositories (Lopes et al., 2017; Allamanis, 2019).”
    Method
  • code2vec: Learning distributed representations of code

    Alon, U., Zilberstein, M., Levy, O., & Yahav, E. (2019) · Proceedings of the ACM on Programming Languages · doi:10.1145/3290353 · Cited by 962

    “Reducing duplications Following recent work which found a large amount of code duplication in GitHub [Lopes et al. 2017], we took the top-ranked and most popular projects, in which we observed duplication to be less of a problem (Lopes et al.”
    BackgroundMethodInfluential
  • CodeSearchNet Challenge: Evaluating the State of Semantic Code Search

    Husain, H., Wu, H.-H., Gazit, T., Allamanis, M., & Brockschmidt, M. (2019) · arXiv · doi:10.48550/arxiv.1909.09436 · Cited by 483

    “on or toString in Java. •We remove duplicates from the dataset by identifying (near) duplicate functions and only keeping one copy of them (we use the methods described in Allamanis [1], Lopes et al. [18]). This removes multiple versions of auto-generated code and cases of copy & pasting. The filtered corpus and t…”
    Method
  • The adverse effects of code duplication in machine learning models of code

    Allamanis, M. (2019) · Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software · doi:10.1145/3359591.3359735 · Cited by 284

  • Structured Neural Summarization

    Fernandes, P., Allamanis, M., & Brockschmidt, M. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1811.01824 · Cited by 142

    “This eludes to a potential issue, described by Lopes et al. (2017).”
    Background

See all 207

Metadata

Authors
Lopes, C. V., Maj, P., Martins, P., Saini, V., Yang, D., Zitny, J., Sajnani, H., & Vitek, J.
Affiliations
  • University of California, Irvine (US)
  • Czech Technical University in Prague (CZ)
  • Czech Technical University, Czechia
  • Microsoft (United States) (US)
  • Northeastern University, USA
Venue
Proceedings of the ACM on Programming Languages
Published
2017-10-12
Volume
1
Issue
OOPSLA
Pages
1-28
ISSN
2475-1421 (ISSN-L)
OpenAlex
W2762844179
Cited by
183
References
27
Citations by year
2026: 14 · 2025: 14 · 2024: 17 · 2023: 22 · 2022: 26 · 2021: 32 · 2020: 19 · 2019: 22 · 2018: 16
FWCI
29.07
Type
journal article
Language
en
Open access
Locations
Proceedings of the ACM on Programming Languages (publishedVersion, cc-by)
Funders
  • National Science Foundation (1544542)
  • European Commission (HORIZON2020, 695412)
  • Office of Naval Research (503353)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Computer Science Applications › Open Source Software Innovations
  • Social Sciences › Business, Management and Accounting › Marketing › Copyright and Intellectual Property
Keywords
code duplication, software clones, GitHub, open source software, programming language comparison, Java, C++, Python, JavaScript, DejaVu

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: DéjàVu: a map of code duplicates on GitHub. https://app.cochat.ai/papers/10.1145/3133908
The paper
Lopes, C. V., Maj, P., Martins, P., Saini, V., Yang, D., Zitny, J., Sajnani, H., & Vitek, J. (2017). DéjàVu: a map of code duplicates on GitHub. Proceedings of the ACM on Programming Languages. https://doi.org/10.1145/3133908

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.