SourcererCC
Hitesh Sajnani, Vaibhav Saini, Jeffrey Svajlenko et al. · Proceedings/Proceedings - International Conference on Software Engineering · 2016
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.
Cited by 447 works. doi:10.1145/2884781.2884877
Authors
References
- CCFinder: a multilinguistic token-based code clone detection system for large scale source code
- Computing Science and Statistics
- DECKARD: Scalable and Accurate Tree-Based Detection of Code Clones
- Understanding bag-of-words model: a statistical framework
- Comparison and evaluation of code clone detection techniques and tools: A qualitative approach
- Comparison and Evaluation of Clone Detection Tools
- On the naturalness of software
- A Primitive Operator for Similarity Joins in Data Cleaning
- Efficient similarity joins for near duplicate detection
- Achieving accuracy and scalability simultaneously in detecting application clones on Android markets