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

By Cristina Videira Lopes, Petr Maj, Pedro Martins, Vaibhav Pratap Singh Saini, Di Yang, Jakub Zitny, Hitesh Sajnani, Jan Vitek. 2017

210 citations recorded by the source corpus.

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.

Subfields: Information Systems, Software, Program Analysis & Verification, Signal Processing

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Information Systems

  1. Uri Alon
  2. Miltiadis Allamanis
  3. Eran Yahav
  4. Charles Sutton
  5. Prem Devanbu
  6. Omer Levy
  7. Marc Brockschmidt
  8. Toufique Ahmed

In Software

  1. Charles Sutton
  2. Miltiadis Allamanis
  3. Prem Devanbu
  4. Marc Brockschmidt
  5. Toufique Ahmed
  6. Earl T. Barr
  7. Uri Alon
  8. Georgios Gousios

In Program Analysis & Verification

  1. Prem Devanbu
  2. Eran Yahav
  3. Uri Alon
  4. Marc Brockschmidt
  5. Omer Levy
  6. Miltiadis Allamanis
  7. Charles Sutton
  8. Kensen Shi

In Signal Processing

  1. Uri Alon
  2. Eran Yahav
  3. Omer Levy
  4. Shaked Brody
  5. Miltiadis Allamanis
  6. Prem Devanbu
  7. Kensen Shi
  8. Marc Brockschmidt

Citations in the corpus