DéjàVu: a map of code duplicates on GitHub
Open accessThe 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.
Integrity signals
Registry
Cites
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.
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?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Allamanis (2019) and Lopes et al. (2017) highlight the large fraction of near-duplicates present in code datasets and how they can inflate performance metrics.”
From The BigScience ROOTS Corpus: A 1.6TB Composite Multilingual Dataset (2023) · cites this paper as Lopes et al. (2017)
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“De-duplication is key: Code duplication in machine learning models can deceptively inflate performance metrics a lot, when compared to de-duplicated datasets [7,46,59].”
From Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization) (2024) · cites this paper as [46]
Experimental — accuracy not yet measured
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
CCFinder: a multilinguistic token-based code clone detection system for large scale source code
Kamiya, T., Kusumoto, S., & Inoue, K. (2002) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2002.1019480 · Cited by 1,711 · cited 2×
“One of the earliest studies of inter-project cloning, [Kamiya et al. 2002] analyzed clones across three different operating systems.”
BackgroundThe DaCapo benchmarks: java benchmarking development and analysis
Blackburn, S. M., Garner, R., Hoffmann, C., Khang, A. M., McKinley, K. S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S. Z., et al. (2006) · Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications · doi:10.1145/1167473.1167488 · Cited by 1,600
The promises and perils of mining GitHub
Kalliamvakou, E., Gousios, G., Blincoe, K., Singer, L., German, D. M., & Damian, D. (2014) · Proceedings of the 11th Working Conference on Mining Software Repositories · doi:10.1145/2597073.2597074 · Cited by 770 · cited 2×
“[Kalliamvakou et al. 2014] manually analyzed a sample of 434 GitHub repositories and found that approximately 37% of them were not used for software development.”
MethodSourcererCC: scaling code clone detection to big-code
Sajnani, H., Saini, V., Svajlenko, J., Roy, C. K., & Lopes, C. V. (2016) · Proceedings of the 38th International Conference on Software Engineering · doi:10.1145/2884781.2884877 · Cited by 447 · cited 1×
“The pipeline we used includes SourcererCC, a token-based code clone detection tool that is freely available and has been compared to other similar tools using those benchmarks [Sajnani 2016; Sajnani et al. 2016].”
MethodSelf-citationThe GHTorent dataset and tool suite
Gousios, G. (2013) · 2013 10th Working Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2013.6624034 · Cited by 399 · cited 1×
“The GitHub projects were downloaded using the GHTorrent database and network [Gousios 2013] which contains meta-data such as number of stars, commits, commiters, whether projects are forks, main programming language, date of creation, etc., as well as download links.”
MethodA large scale study of programming languages and code quality in github
Ray, B., Posnett, D., Filkov, V., & Devanbu, P. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635922 · Cited by 389 · cited 1×
“[Ray et al. 2014] studied software quality using the top 50 most popular projects in 17 languages.”
Understanding the Factors That Impact the Popularity of GitHub Repositories
Borges, H., Hora, A., & Valente, M. T. (2016) · 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME) · doi:10.1109/icsme.2016.31 · Cited by 312 · cited 3×
“Consider for instance a subset that focuses on the most active projects, as done in [Borges et al. 2016], by filtering on the number of stars or commits a project has.”
BackgroundInfluentialSourcererCC: Scaling Code Clone Detection to Big Code
Sajnani, H., Saini, V., Svajlenko, J., Roy, C. K., & Lopes, C. V. (2015) · arXiv (Cornell University) · doi:10.48550/arxiv.1512.06448 · Cited by 280 · cited 1×
“The pipeline we used includes SourcererCC, a token-based code clone detection tool that is freely available and has been compared to other similar tools using those benchmarks [Sajnani 2016; Sajnani et al. 2016].”
MethodSelf-citationA Mutation/Injection-Based Automatic Framework for Evaluating Code Clone Detection Tools
Roy, C. K., & Cordy, J. R. (2009) · 2009 International Conference on Software Testing, Verification, and Validation Workshops · doi:10.1109/icstw.2009.18 · Cited by 193
Evaluating clone detection tools with BigCloneBench
Svajlenko, J., & Roy, C. K. (2015) · 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME) · doi:10.1109/icsm.2015.7332459 · Cited by 172 · cited 1×
“There are also benchmarks for assessing the performance of tools [Roy and Cordy 2009; Svajlenko and Roy 2015].”
Method
Research works printed but not linked: 6
- John W. Creswell. 2014. Research Design: ualitative, uantitative, and Mixed Methods Approaches. SAGE.
- 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
- R. Koschke. 2007. Survey of research on sotware clones. In Duplication, Redundancy, and Similarity in Sotware (Dagstuhl Seminar Proceedings 06301).
- C. K. Roy and J. R. Cordy. 2007. A survey on sotware clone detection research. Technical Report 541. ueens University.
- 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
- 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).”
Methodcode2vec: 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.”
BackgroundMethodInfluentialCodeSearchNet 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…”
MethodThe 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).”
BackgroundAroma: code recommendation via structural code search
Luan, S., Yang, D., Barnaby, C., Sen, K., & Chandra, S. (2019) · Proceedings of the ACM on Programming Languages · doi:10.1145/3360578 · Cited by 104
Self-citationCodeSearchNet Challenge: Evaluating the State of Semantic Code Search
Husain, H., Wang, H.-H., Gazit, T., Allamanis, M., & Brockschmidt, M. (2019) · Zenodo (CERN European Organization for Nuclear Research) · doi:10.5281/zenodo.7908467 · Cited by 144
Allamanis, M., Barr, E. T., Ducousso, S., & Gao, Z. (2020) · Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3385412.3385997 · Cited by 92
“Similar to the observations of Lopes et al. [44], we find a substantial number of (near) code duplicates in our corpus — more than 133k files.”
ResultGenerative Code Modeling with Graphs
Brockschmidt, M., Allamanis, M., Gaunt, A. L., & Polozov, O. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1805.08490 · Cited by 67
“Dataset We have collected a dataset for our ExprGen task from 593 highly-starred open-source C# projects on GitHub, removing any near-duplicate files, following the work of Lopes et al. (2017). We parsed all C# files and identified all expressions of the fragment that we are considering (i.”
MethodGuidelines for empirical studies in software engineering involving large language models
Baltes, S., Angermeir, F., Arora, C., Muñoz Barón, M., Chen, C., Böhme, L., Calefato, F., Ernst, N., Falessi, D., Fitzgerald, B., et al. (2027) · Empirical Software Engineering · doi:10.1007/s10664-026-10922-3 · Cited by 3
DOBF: A Deobfuscation Pre-Training Objective for Programming Languages
Rozière, B., Lachaux, M.-A., Szafraniec, M., & Lample, G. (2021) · neural information processing systems · doi:10.48550/arxiv.2102.07492 · Cited by 176
“[37] and Allamanis [3], we remove duplicate files.”
BackgroundMethodAutomatic Semantic Augmentation of Language Model Prompts (for Code Summarization)
Ahmed, T., Pai, K. S., Devanbu, P., & Barr, E. (2024) · Proceedings of the IEEE/ACM 46th International Conference on Software Engineering · doi:10.1145/3597503.3639183 · Cited by 112
“De-duplication is key: Code duplication in machine learning models can deceptively inflate performance metrics a lot, when compared to de-duplicated datasets [7, 46, 59].”
ResultLearning-Based Recursive Aggregation of Abstract Syntax Trees for Code Clone Detection
Buch, L., & Andrzejak, A. (2019) · 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2019.8668039 · Cited by 93
“This problem is likely to become even more relevant in the future, due to today’s ease of online collaboration and code distribution via open-source code repositories [3], question-answering forums [4], and app stores [5].”
BackgroundType4Py: practical deep similarity learning-based type inference for python
Mir, A. M., Latoškinas, E., Proksch, S., & Gousios, G. (2022) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3510003.3510124 · Cited by 117
“On GitHub, Python projects often have file-level duplicates [28] and also code duplication has a negative effect on the performance of ML models when evaluating them on unseen code samples [1].”
BackgroundUsage and attribution of Stack Overflow code snippets in GitHub projects
Baltes, S., & Diehl, S. (2018) · Empirical Software Engineering · doi:10.1007/s10664-018-9650-5 · Cited by 116
“Because many files on GitHub are duplicates (Gharehyazie et al, 2017; Lopes et al, 2017), we distinguish between the number of distinct referencing files , meaning the number of distinct files in which a URL was present in a source code comment, and the number of distinct referencing lines , meaning…”
BackgroundNasrabadi, M. Z., Parsa, S. A., Ramezani, M., Roy, C. K., & Ekhtiarzadeh, M. (2023) · Journal of Systems and Software · doi:10.1016/j.jss.2023.111796 · Cited by 132
Fast and Memory-Efficient Neural Code Completion
Svyatkovskiy, A., Lee, S., Hadjitofi, A., Riechert, M., Franco, J. V., & Allamanis, M. (2021) · 2021 IEEE/ACM 18th International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr52588.2021.00045 · Cited by 95
When and How to Make Breaking Changes: Policies and Practices in 18 Open Source Software Ecosystems
Bogart, C., Kästner, C., Herbsleb, J. D., & Thung, F. (2021) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3447245 · Cited by 115
“Previous research has also mapped cloning behaviors [33, 49].”
BackgroundA general path-based representation for predicting program properties
Alon, U., Zilberstein, M., Levy, O., & Yahav, E. (2018) · ACM SIGPLAN Notices · doi:10.1145/3296979.3192412 · Cited by 122
(2023) · doi:10.1145/3510003.3510060 · Cited by 88
“This is often because developers copy and paste code snippets and source files from other projects [39].”
BackgroundTowards Understanding Third-party Library Dependency in C/C++ Ecosystem
Tang, W., Xu, Z., Liu, C., Wu, J., Yang, S., Li, Y., Luo, P., & Liu, Y. (2022) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3551349.3560432 · Cited by 102
“A large number of existing researches [26, 32, 36, 49] conducted code clone detection to extract TPL dependencies in C/C++ repositories.”
BackgroundNeural reverse engineering of stripped binaries using augmented control flow graphs
David, Y., Alon, U., & Yahav, E. (2020) · Proceedings of the ACM on Programming Languages · doi:10.1145/3428293 · Cited by 84
“Following Lopes et al. [2017] and Allamanis [2018], who pointed out the existence of code duplication in open-source datasets and its adverse effects, we created the train, validation and test sets from completely separate projects and packages.”
MethodA general path-based representation for predicting program properties
Alon, U., Zilberstein, M., Levy, O., & Yahav, E. (2018) · Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3192366.3192412 · Cited by 79
“The amounts of data used for the experimental evaluation of each language. problem (Lopes et al. [29] measured duplication across all the code in GitHub).”
MethodInfluentialSiamese: scalable and incremental code clone search via multiple code representations
Ragkhitwetsagul, C., & Krinke, J. (2019) · Empirical Software Engineering · doi:10.1007/s10664-019-09697-7 · Cited by 96
An Empirical Study of Refactorings and Technical Debt in Machine Learning Systems
Tang, Y., Khatchadourian, R., Bagherzadeh, M., Singh, R., Stewart, A., & Raja, A. (2021) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse43902.2021.00033 · Cited by 101
“While our findings coincide with those of Lopes et al. [59], i.e., there is a non-trivial amount of code duplication, their findings are inter-project focused, whereas ours are intra -project.”
BackgroundResultBinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching
Jiang, L., An, J.-W., Huang, H., Tang, Q., Nie, S., Wu, S., & Zhang, Y. (2024) · International Conference on Software Engineering · doi:10.1145/3597503.3639100 · Cited by 95
“However, noticing that in general source functions are extensively cloned across various TPLs [38, 49, 57, 60] in the large-scale dataset, such internal code clones [13] can lead to inevitable false positives if we retain all their included TPLs.”
BackgroundMethodCENTRIS: A Precise and Scalable Approach for Identifying Modified Open-Source Software Reuse
Woo, S., Park, S.-H., Kim, S., Lee, H., & Oh, H. (2021) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse43902.2021.00083 · Cited by 100
“We set the similarity threshold to 50%, 80%, and 100% in DejaVu (refer to [11]) and analyzed the number of correct target software and OSS component pairs from their results where the similarity score exceeded the selected threshold.”
BackgroundMethodInfluentialCAT-LM Training Language Models on Aligned Code And Tests
Rao, N., Jain, K., Alon, U., Goues, C. L., & Hellendoorn, V. J. (2023) · 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase56229.2023.00193 · Cited by 45
On the Impact of Programming Languages on Code Quality: A Reproduction Study
Berger, E. D., Hollenbeck, C., Maj, P., Vitek, O., & Vitek, J. (2019) · ACM Transactions on Programming Languages and Systems · doi:10.1145/3340571 · Cited by 83
“GitHub has large numbers of duplicate and partially duplicated projects [18] and too many throwaway projects for this to yield the intended result.”
BackgroundSelf-citationCross-Language Clone Detection by Learning Over Abstract Syntax Trees
Pérez, D., & Chiba, S. (2019) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2019.00078 · Cited by 87
“These techniques work especially well for type III copy-paste induced code clones and are able to scale very well, as shown in [27].”
MethodKondo, M., Oliva, G. A., Jiang, Z. M., Hassan, A. E., & Mizuno, O. (2020) · Empirical Software Engineering · doi:10.1007/s10664-020-09852-5 · Cited by 71
“Lopes et al. (2017) highlights that researchers should be aware of the actual lack of project diversity in GitHub (especially for the JavaScript language).”
BackgroundSoftware Composition Analysis for Vulnerability Detection: An Empirical Study on Java Projects
Zhao, L., Chen, S., Xu, Z., Liu, C., Zhang, L., Wu, J., Sun, J., & Liu, Y. (2023) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3611643.3616299 · Cited by 65
“Even if the project contents are not changed, dependency trees could change if new versions satisfying dependency constraints are released [51].”
BackgroundDavis, J. C., Michael, L. G., IV, Coghlan, C. A., Servant, F., & Lee, D. (2019) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3338906.3338909 · Cited by 80
“Multiple studies estimate that more than 50% of the code in GitHub is duplicated [58, 64], with similar ratios for Android applications [80].”
BackgroundThe BigScience ROOTS Corpus: A 1.6TB Composite Multilingual Dataset
Laurençon, H., Saulnier, L., Wang, T., Akiki, C., del Moral, A. V., Scao, T. L., Von Werra, L., Mou, C., Ponferrada, E. G., Nguyen, H., et al. (2023) · arXiv · doi:10.48550/arxiv.2303.03915 · Cited by 93
“Indonesian News Corpus id Rahutomo and Miqdad Muadz Muzad (2018) IndoNLI id Mahendra et al. (2021) Indosum id Kurniawan and Louvan (2018) KALIMAT ar El-Haj and Koulali (2013) KSUCCA ar Alrabiah et al.”
BackgroundMultilingual training for software engineering
Ahmed, T., & Devanbu, P. (2022) · Proceedings of the 44th International Conference on Software Engineering · doi:10.1145/3510003.3510049 · Cited by 57
“Sadly, there is a large amount of copied code on GitHUB [46]; inattentively combining different datasets harvested from GitHUB can lead to undesirable levels of duplication in the merged dataset.”
BackgroundUnsupervised translation of programming languages
Roziere, B. (2026) · doi:10.70675/416f6582z4576z444eza710z5e930d59bf97 · Cited by 57
The three pillars of machine programming
Gottschlich, J., Solar-Lezama, A., Tatbul, N., Carbin, M., Rinard, M., Barzilay, R., Amarasinghe, S. P., Tenenbaum, J. B., & Mattson, T. (2018) · ACM SIGPLAN International Workshop on Machine Learning and Programming Languages (MAPL) · doi:10.1145/3211346.3211355 · Cited by 65
Bogomolov, E., Kovalenko, V., Rebryk, Y., Bacchelli, A., & Bryksin, T. (2021) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3468264.3468606 · Cited by 66
“Recent studies on open-source Java projects show that up to 20% of methods can be copied from other sources [29], 6% of Java projects are 100% clones of other projects, and 14% contain more than 50% of cloned code [40].”
Cross-language code search using static and dynamic analyses
Mathew, G., & Stolee, K. T. (2021) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3468264.3468538 · Cited by 59
“The growing prominence of large online code repositories and the repetitive nature of source code [48, 70] lead to the presence of large quantities of potentially similar code across languages, providing a viable platform for code-to-code search.”
BackgroundOSSFP: Precise and Scalable C/C++ Third-Party Library Detection using Fingerprinting Functions
Wu, J., Xu, Z., Tang, W., Zhang, L., Wu, Y., Liu, C., Sun, K., Zhao, L., & Liu, Y. (2023) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse48619.2023.00034 · Cited by 63
“2) Generalizability: For the popular programming language like Java, C/C++, Python, and JavaScript, DéjàVu [1] has shown that 70% of the source code on GitHub are clones”
BackgroundLibDX: A Cross-Platform and Accurate System to Detect Third-Party Libraries in Binary Code
Tang, W., Luo, P., Fu, J., & Zhang, D. (2020) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner48275.2020.9054845 · Cited by 66
“D´ej`aVu [30] has found that 70% of the code on GitHub consists of clones.”
BackgroundInfluentialTreeCen: Building Tree Graph for Scalable Semantic Code Clone Detection
Hu, Y., Zou, D., Peng, J., Wu, Y., Shan, J., & Jin, H. (2022) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3551349.3556927 · Cited by 61
“Besides, several works [36], [41], [44], [40] construct publicly available clone detectors at file granularity for code repositories.”
BackgroundPublic git archive: a big code dataset for all
Markovtsev, V., & Long, W. (2018) · Proceedings of the 15th International Conference on Mining Software Repositories · doi:10.1145/3196398.3196464 · Cited by 39
“Finally, there will be duplicate files across different repositories [20].”
BackgroundEnergy Refactorings for Android in the Large and in the Wild
Couto, M., Saraiva, J., & Fernandes, J. P. (2020) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner48275.2020.9054858 · Cited by 45
“Therefore, we followed an alternative approach to obtain a representative set of Android applications: we have taken the MUSE repository [43], [44] as a starting point for our work.”
MethodA structural model for contextual code changes
Brody, S., Alon, U., & Yahav, E. (2020) · Proc. ACM Program. Lang. · doi:10.1145/3428283 · Cited by 45
“Following recent work on the adverse effects of code duplication [Allamanis 2019; Lopes et al. 2017], we split the dataset into training-validation-test by project .”
MethodIdentifying Challenges for OSS Vulnerability Scanners - A Study & Test Suite
Dann, A., Plate, H., Hermann, B., Ponta, S. E., & Bodden, E. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2021.3101739 · Cited by 42
“[18] found that source-code clones and modified”
Multi-threshold token-based code clone detection
Golubev, Y., Poletansky, V., Povarov, N. I., & Bryksin, T. (2021) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner50967.2021.00053 · Cited by 49
“Several studies have shown that a significant part of modern software code consists of clones [1], [2].”
BackgroundAnalyzing and Supporting Adaptation of Online Code Examples
Zhang, T., Yang, D., Lopes, C. V., & Kim, M. (2019) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse.2019.00046 · Cited by 52
“To account for internal duplication in GitHub [20], we choose non-fork projects only and further remove duplicated GitHub files using the same file hashing method as in [20], since such file duplication may skew our analysis.”
MethodSelf-citationMemorization and Generalization in Neural Code Intelligence Models
Rabin, M. R. I., Hussain, A., Alipour, M. A., & Hellendoorn, V. J. (2022) · Information and Software Technology · doi:10.1016/j.infsof.2022.107066 · Cited by 48
“[27] found that 70% of source code files on the GitHub had clones of previously created files.”
BackgroundConvolutional neural networks for enhanced classification mechanisms of metamodels
Nguyen, P. T., Ruscio, D. D., Pierantonio, A., Rocco, J. D., & Iovino, L. (2020) · Journal of Systems and Software · doi:10.1016/j.jss.2020.110860 · Cited by 40
An Experience with Code-Size Optimization for Production iOS Mobile Applications
Chabbi, M., Lin, J., & Barik, R. (2021) · Proceedings of the CGO/Proceedings of the ... CGO · doi:10.1109/cgo51591.2021.9370306 · Cited by 36
“AST: Static clone detection tools such as SourcerCC [46] and PMD [40] tokenize the source files and, by using a similarity measure, can identify clones at a finer granularity.”
MethodSequence Model Design for Code Completion in the Modern IDE
Aye, G. A., & Kaiser, G. E. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2004.05249 · Cited by 17
“source code models [4, 23].”
Mossad: defeating software plagiarism detection
Devore-McDonald, B., & Berger, E. D. (2020) · Proceedings of the ACM on Programming Languages · doi:10.1145/3428206 · Cited by 35
“We evaluated SourcererCC [Sajnani et al. 2015], a recent code clone detector used to map code duplicates on Github [Lopes et al. 2017], in an effort to defeat Mossad.”
MethodCiniselli, M., Pascarella, L., & Bavota, G. (2022) · Proceedings of the 19th International Conference on Mining Software Repositories · doi:10.1145/3524842.3528440 · Cited by 26
“[42] and used in the construction of the CodeSearchNet database [25] to identify near-duplicates in our fine-tuning dataset.”
MethodMartins, P., Achar, R., & Lopes, C. V. (2018) · International Conference on Mining Software Repositories (MSR) · doi:10.1145/3196398.3196450 · Cited by 33
“All the 50,000 Java projects provided come with GitHub origin information, which means that analyses on them can be cross-referenced with other tools operating on GitHub, such as Boa [2] or the map of GitHub clones D´ej`aVu[7].”
MethodSelf-citationManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inference
Mir, A. M., Latoškinas, E., & Gousios, G. (2021) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr52588.2021.00079 · Cited by 43
A Study of Potential Code Borrowing and License Violations in Java Projects on GitHub
Golubev, Y., Eliseeva, M., Povarov, N. I., & Bryksin, T. (2020) · International Conference on Mining Software Repositories (MSR) · doi:10.1145/3379597.3387455 · Cited by 35
“Previous studies have shown that a large percent of modern software consists of clones [3, 13, 22].”
BackgroundResultActive Learning of Discriminative Subgraph Patterns for API Misuse Detection
Kang, H. J., & Lo, D. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2021.3069978 · Cited by 37
“As the majority of files on GitHub are clones [42], we perform a file-level code clone de-duplication to avoid wasted effort and space storing redundant information.”
MethodResultImport2vec: Learning Embeddings for Software Libraries
Theeten, B., Vandeputte, F., & Cutsem, T. V. (2019) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2019.00014 · Cited by 36
“As GitHub is known to contain significant amounts of duplicate code [5], we also removed projects that import exactly the same set of imports across all source files (projects which we dub import clones ).”
BackgroundSAGA: Efficient and Large-Scale Detection of Near-Miss Clones with GPU Acceleration
Li, G., Wu, Y., Roy, C. K., Sun, J., Peng, X., Zhan, N., Hu, B., & Ma, J. (2020) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner48275.2020.9054832 · Cited by 39
“clone detection tools, previous studies are limited to either clones in a small code base (less than 6,000 Java projects) [36] or clones at file granularity [37], [38].”
BackgroundStandUp4NPR: Standardizing SetUp for Empirically Comparing Neural Program Repair Systems
Zhong, W., Ge, H., Ai, H., Li, C., Liu, K., Ge, J., & Luo, B. (2022) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3551349.3556943 · Cited by 35
Open Source License Inconsistencies on GitHub
Wolter, T., Barcomb, A., Riehle, D., & Harutyunyan, N. (2022) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3571852 · Cited by 27
“[40] showed that from 428 million iles hosted on GitHub, only 85 million were unique.”
BackgroundOn Inter-Dataset Code Duplication and Data Leakage in Large Language Models
López, J. A. H., Chen, B., Saad, M., Sharma, T., & Varró, D. (2024) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2024.3504286 · Cited by 43
“Moreover, there is a substantial amount of duplication within G IT H UB as noted by various researchers [19], [20], [21].”
BackgroundMethodDeep security analysis of program code: A systematic literature review
Sonnekalb, T., Heinze, T. S., & Mäder, P. (2021) · Empirical Software Engineering · doi:10.1007/s10664-021-10029-x · Cited by 30
“However, project selection and data filtering play a vital role in separating large numbers of redundant and toy projects from projects containing production code and being well suited for training (Lopes et al. 2017; Kalliamvakou et al. 2014).”
BackgroundCapturing source code semantics via tree-based convolution over API-enhanced AST
Chen, L., Ye, W., & Zhang, S. (2019) · ACM International Conference on Computing Frontiers (CF) · doi:10.1145/3310273.3321560 · Cited by 35
Jupyter Notebooks on GitHub: Characteristics and Code Clones
Källén, M., & Wrigstad, T. (2021) · The Art Science and Engineering of Programming · doi:10.22152/programming-journal.org/2021/5/15 · Cited by 24
CNEPS: A Precise Approach for Examining Dependencies among Third-Party C/C++ Open-Source Components
Na, Y., Woo, S., Lee, J., & Lee, H. (2024) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3597503.3639209 · Cited by 27
Evaluation of a machine learning classifier for metamodels
Nguyen, P. T., Rocco, J. D., Iovino, L., Ruscio, D. D., & Pierantonio, A. (2021) · Software & Systems Modeling · doi:10.1007/s10270-021-00913-x · Cited by 27
“Concerning duplicates in modeling repositories, a recent work [50] reveals that there is a substantial amount of clones.”
BackgroundStudying the characteristics of AIOps projects on GitHub
Aghili, R., Li, H., & Khomh, F. (2023) · Empirical Software Engineering · doi:10.1007/s10664-023-10382-z · Cited by 26
“Many studies also have used GitHub as a source for mining software repositories (Businge et al. 2019; Coelho et al. 2018; Guzman et al. 2014; Horschig et al. 2018; Kallis et al. 2021; Lopes et al. 2017; Manes and Baysal 2021; Subramanian et al. 2020; Vadlamani and Baysal 2020; Wessel et al. 2018).”
MethodJust-in-time code duplicates extraction
AlOmar, E. A., Ivanov, A., Kurbatova, Z., Golubev, Y., Mkaouer, M. W., Ouni, A., Bryksin, T., Nguyen, L., Kini, A., & Thakur, A. (2023) · Information and Software Technology · doi:10.1016/j.infsof.2023.107169 · Cited by 24
“The threat of duplicate code can easily introduce data leakage when appearing in both training and testing data [4, 5].”
BackgroundAn Analysis of x86-64 Inline Assembly in C Programs
Rigger, M., Marr, S., Kell, S., Leopoldseder, D., & Mössenböck, H. (2018) · ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE) · doi:10.1145/3186411.3186418 · Cited by 27
“In order to avoid personal forks, experiments, duplicate projects and the like [32, 41], we did not consider projects that had fewer than 10 stars.”
BackgroundA Convolutional Neural Network for Language-Agnostic Source Code Summarization
Moore, J., Gelman, B. U., & Slater, D. (2019) · International Conference on Evaluation of Novel Approaches to Software Engineering · doi:10.5220/0007678100150026 · Cited by 22
Thongtanunam, P., Shang, W., & Hassan, A. E. (2018) · Empirical Software Engineering · doi:10.1007/s10664-018-9645-2 · Cited by 24
“Several studies investigate the presence of clones in large software systems (Ducasse et al. 1999; Kamiya et al. 2002; Lopes et al. 2017).”
BackgroundA Large-Gap Clone Detection Approach Using Sequence Alignment via Dynamic Parameter Optimization
Liu, J., Wang, T., Feng, C., Wang, H., & Li, D. (2019) · IEEE Access · doi:10.1109/access.2019.2940710 · Cited by 21
“[10] analyzed millions of open source projects on GitHub and found that developers are more likely to reuse code with extensions (e.”
BackgroundAST-path Based Compare-Aggregate Network for Code Clone Detection
Liang, H., & Ai, L. (2021) · International Joint Conference on Neural Networks (IJCNN) · doi:10.1109/ijcnn52387.2021.9534099 · Cited by 25
Towards exploring the code reuse from stack overflow during software development
Huang, Y., Xu, F., Zhou, H.-J., Chen, X., Zhou, X., & Wang, T. (2022) · IEEE International Conference on Program Comprehension (ICPC) · doi:10.1145/3524610.3527923 · Cited by 24
“One statistical survey[22] of the open source community GitHub shows that 70% of the code on GitHub consists of clones of previously created files.”
BackgroundA deep learner model for multi-language webshell detection
Hannousse, A., Nait-Hamoud, M. C., & Yahiouche, S. (2022) · International Journal of Information Security · doi:10.1007/s10207-022-00615-5 · Cited by 19
“This issue has been already noticed in [2,16] for works developing machine learning models for analyzing codes collected from popular data sources such as GitHub.”
BackgroundThe Next 7000 Programming Languages
Chatley, R., Donaldson, A. F., & Mycroft, A. (2019) · Lecture notes in computer science · doi:10.1007/978-3-319-91908-9_15 · Cited by 27
Automatically Identifying CVE Affected Versions With Patches and Developer Logs
He, Y., Wang, Y., Zhu, S., Wang, W., Zhang, Y., Li, Q., & Yu, A. (2023) · IEEE Transactions on Dependable and Secure Computing · doi:10.1109/tdsc.2023.3264567 · Cited by 18
“were presently available as of 2020, as reported by Lopes [2].”
MethodSoft-Labeled Contrastive Pre-Training for Function-Level Code Representation
Li, X., Guo, D., Gong, Y., Lin, Y., Shen, Y., Qiu, X., Jiang, D., Chen, W., & Duan, N. (2022) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2022.findings-emnlp.9 · Cited by 27
Corrective commit probability: a measure of the effort invested in bug fixing
Amit, I., & Feitelson, D. G. (2021) · Software Quality Journal · doi:10.1007/s11219-021-09564-z · Cited by 24
“Such code cloning is prevalent and might impact analysis (Gharehyazie et al., 2019; Lopes et al., 2017; Allamanis, 2019).”
BackgroundSame File, Different Changes: The Potential of Meta-Maintenance on GitHub
Hata, H., Kula, R. G., Ishio, T., & Treude, C. (2021) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse43902.2021.00076 · Cited by 23
“a large number of projects included copies of libraries [5]–[7].”
BackgroundLanguage usage analysis for EMF metamodels on GitHub
Babur, Ö., Constantinou, E., & Serebrenik, A. (2023) · Empirical Software Engineering · doi:10.1007/s10664-023-10368-x · Cited by 17
An empirical study of code reuse between GitHub and stack overflow during software development
Chen, X., Xu, F., Huang, Y., Zhou, X., & Zheng, Z. (2024) · Journal of Systems and Software · doi:10.1016/j.jss.2024.111964 · Cited by 21
GreenSource: A Large-Scale Collection of Android Code, Tests and Energy Metrics
Rua, R., Couto, M., & Saraiva, J. (2019) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2019.00035 · Cited by 14
“After a thorough research, we considered the MUSE repository [17], [18]: a very large collection of Java projects obtained from different online platforms, such as GitHub or GitLab.”
BackgroundMethodCasting about in the dark: an empirical study of cast operations in Java programs
Mastrangelo, L., Hauswirth, M., & Nystrom, N. (2019) · Proceedings of the ACM on Programming Languages · doi:10.1145/3360584 · Cited by 20
“Lopes et al. [2017] conducted a study to measure code duplication in GitHub .”
BackgroundHelping or not helping? Why and how trivial packages impact the npm ecosystem
Chen, X., Abdalkareem, R., Mujahid, S., Shihab, E., & Xia, X. (2021) · Empirical Software Engineering · doi:10.1007/s10664-020-09904-w · Cited by 21
“Although there have been some studies that examine duplicated repositories on GitHub (e.g. Lopes et al. 2017; Gharehyazie et al. 2017), we are not aware of any study that investigates or proposes techniques to detect duplicate ecosystem packages.”
BackgroundLaw Smells - Defining and Detecting Problematic Patterns in Legal Drafting
Coupette, C., Hartung, D., Beckedorf, J., Böther, M., & Katz, D. M. (2021) · Artificial Intelligence and Law · doi:10.1007/s10506-022-09315-w · Cited by 14
“2017), repetition and duplicated code (Lopes et al. 2017), or component size and open source model (Stamelos et al.”
BackgroundPromoting open science in test-driven software experiments
Kessel, M., & Atkinson, C. (2024) · Journal of Systems and Software · doi:10.1016/j.jss.2024.111971 · Cited by 13
Do Java programmers write better Python? Studying off-language code quality on GitHub
Horschig, S., Mattis, T., & Hirschfeld, R. (2018) · International Conference on Art, Science, and Engineering of Programming (<Programming>) · doi:10.1145/3191697.3214341 · Cited by 13
An exploratory study on the predominant programming paradigms in Python code
Dyer, R., & Chauhan, J. (2022) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3540250.3549158 · Cited by 13
“[20]) and keep only one instance from each set.”
BackgroundBeyond Dependencies: The Role of Copy-Based Reuse in Open Source Software Development
Jahanshahi, M., Reid, D., & Mockus, A. (2025) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3715907 · Cited by 18
“Both copy-based reuse and clone detection address code duplication but differ significantly in their methodologies and scopes.”
Towards Mining OSS Skills from GitHub Activity
Liang, J. T., Zimmermann, T., & Ford, D. (2022) · IEEE/ACM International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER) · doi:10.1109/icse-nier55298.2022.9793514 · Cited by 14
ManyTypes4TypeScript: a comprehensive TypeScript dataset for sequence-based type inference
Jesse, K., & Dévanbu, P. (2022) · International Conference on Mining Software Repositories (MSR) · doi:10.1145/3524842.3528507 · Cited by 13
“Lopes et al.[19] identified a large amount of near-duplicate code on GitHub; Allamanis [3] released a tool based on Jaccard similarity to help the community avoid this issue.”
MethodPalsberg, J., & Lopes, C. V. (2018) · Companion Proceedings for the ISSTA/ECOOP Workshops · doi:10.1145/3236454.3236501 · Cited by 12
“Our preliminary work on SourcererCC [13] shows only 60 percent of Java files are distinct.”
BackgroundMethodInfluentialSelf-citationOpen Source, Hidden Costs: A Systematic Literature Review on OSS License Management
Li, B., Liu, C., Fan, L., Chen, S., Zhang, Z., & Liu, Z. (2025) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2025.3586411 · Cited by 19
“Approximately 70% of the code on GitHub actually consists of code clones from existing repositories [2], or even code snippets posted on Stack Overflow [3].”
On cloud computing infrastructure for existing code-clone detection algorithms
Walker, A., & Cerny, T. (2020) · ACM SIGAPP Applied Computing Review · doi:10.1145/3392350.3392351 · Cited by 11
Code2Img: Tree-Based Image Transformation for Scalable Code Clone Detection
Hu, Y., Fang, Y., Sun, Y., Jia, Y., Wu, Y., Zou, D., & Jin, H. (2023) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2023.3295801 · Cited by 7
Neural Reverse Engineering of Stripped Binaries
David, Y., Alon, U. S., & Yahav, E. (2019) · Cited by 11
AntiCopyPaster: Extracting Code Duplicates As Soon As They Are Introduced in the IDE
AlOmar, E. A., Ivanov, A., Kurbatova, Z., Golubev, Y., Mkaouer, M. W., Ouni, A., Bryksin, T., Nguyen, L., Kini, A., & Thakur, A. (2022) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3551349.3559537 · Cited by 11
“Prior research showed that a significant percentage of computer code consists of duplicate code [8, 12], i.”
Background
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
- hybrid
- doi.org
- Licence
- 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
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.