SourcererCC: Scaling Code Clone Detection to Big-Code

By Hitesh Sajnani, Vaibhav Pratap Singh Saini, Jeffrey Svajlenko, Chanchal Kumar Roy, Cristina Videira Lopes. 2015

641 citations recorded by the source corpus.

Despite a decade of active research, there has been a marked lack in clone detection techniques that scale to large repositories for detecting near-miss clones. In this paper, we present a token-based clone detector, SourcererCC, that can detect both exact and near-miss clones from large inter-project repositories using a standard workstation. It exploits an optimized inverted-index to quickly query the potential clones of a given code block. Filtering heuristics based on token ordering are used to significantly reduce the size of the index, the number of code-block comparisons needed to detect the clones, as well as the number of required token-comparisons needed to judge a potential clone. We evaluate the scalability, execution time, recall and precision of SourcererCC, and compare it to four publicly available and state-of-the-art tools. To measure recall, we use two recent benchmarks: (1) a big benchmark of real clones, BigCloneBench, and (2) a Mutation/Injection-based framework of thousands of fine-grained artificial clones. We find SourcererCC has both high recall and precision, and is able to scale to a large inter-project repository (25K projects, 250MLOC) using a standard workstation.

Subfields: Information Systems, Software, Natural Language Processing, Code Generation & Program Synthesis, 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. Miltiadis Allamanis
  2. Hongyu Zhang
  3. Baishakhi Ray
  4. Ge Li
  5. Michele Tufano
  6. Artur Andrzejak
  7. Lutz Büch
  8. Gabriele Bavota

In Software

  1. Miltiadis Allamanis
  2. Artur Andrzejak
  3. Lutz Büch
  4. Ge Li
  5. Hongyu Zhang
  6. Michele Tufano
  7. Gabriele Bavota
  8. Baishakhi Ray

In Natural Language Processing

  1. Miltiadis Allamanis
  2. Baishakhi Ray
  3. Hongyu Zhang
  4. Bowen Zhou
  5. Bing Xiang
  6. Gabriele Bavota
  7. Michele Tufano
  8. Ge Li

In Code Generation & Program Synthesis

  1. Miltiadis Allamanis
  2. Hongyu Zhang
  3. Baishakhi Ray
  4. Ge Li
  5. Artur Andrzejak
  6. Lutz Büch
  7. Huihui Wei
  8. Ming Li

In Signal Processing

  1. Miltiadis Allamanis
  2. Artur Andrzejak
  3. Lutz Büch
  4. Ge Li
  5. Hongyu Zhang
  6. Gang Zhao
  7. Jeff Huang
  8. Baishakhi Ray

Citations in the corpus