SourcererCC: Scaling Code Clone Detection to Big Code
Open accessThe DOI matches its OpenAlex record; 28 of the 28 references it cites were found in a registry or an index.
Abstract
Despite a decade of active research, there is a marked lack in clone detectors that scale to very large repositories of source code, in particular for detecting near-miss clones where significant editing activities may take place in the cloned code. We present SourcererCC, a token-based clone detector that targets three clone types, and exploits an index to achieve scalability to large inter-project repositories using a standard workstation. SourcererCC uses 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 large 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 (250MLOC) using a standard workstation.
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.
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
Understanding bag-of-words model: a statistical framework
Zhang, Y., Jin, R., & Zhou, Z.-H. (2010) · International Journal of Machine Learning and Cybernetics · doi:10.1007/s13042-010-0001-0 · Cited by 1,384 · cited 1×
“9 1 Similar to the popular bag-of-words model [39] in Information Retrieval Clone Pair : A pair of code fragments that are similar, specified by the triple ( f 1 , f 2 , φ ), including the similar code fragments f 1 and f 2 , and their clone type φ .”
BackgroundDECKARD: Scalable and Accurate Tree-Based Detection of Code Clones
Jiang, L., Misherghi, G., Su, Z., & Glondu, S. (2007) · 29th International Conference on Software Engineering (ICSE'07) · doi:10.1109/icse.2007.30 · Cited by 1,039
Comparison and evaluation of code clone detection techniques and tools: A qualitative approach
Roy, C. K., Cordy, J. R., & Koschke, R. (2009) · Science of Computer Programming · doi:10.1016/j.scico.2009.02.007 · Cited by 1,001
Self-citationA Survey on Software Clone Detection Research
Roy, C. K., & Cordy, J. R. (2007) · QSpace (Queen's University Library) · Cited by 967
Self-citationComparison and Evaluation of Clone Detection Tools
Bellon, S., Koschke, R., Antoniol, G., Krinke, J., & Merlo, E. (2007) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2007.70725 · Cited by 782
On the naturalness of software
Hindle, A., Barr, E. T., Su, Z., Gabel, M., & Dévanbu, P. (2012) · doi:10.5555/2337223.2337322 · Cited by 541
Efficient similarity joins for near duplicate detection
Xiao, C., Wang, W., Lin, X., & Yu, J. X. (2008) · Proceedings of the 17th international conference on World Wide Web · doi:10.1145/1367497.1367516 · Cited by 455
Software clone detection: A systematic review
Rattan, D., Bhatia, R., & Singh, M. (2013) · Information and Software Technology · doi:10.1016/j.infsof.2013.01.008 · Cited by 415
Towards a Big Data Curated Benchmark of Inter-project Code Clones
Svajlenko, J., Islam, J. F., Keivanloo, I., Roy, C. K., & Mia, M. M. (2014) · 2014 IEEE International Conference on Software Maintenance and Evolution · doi:10.1109/icsme.2014.77 · Cited by 339
Self-citationAchieving accuracy and scalability simultaneously in detecting application clones on Android markets
Chen, K., Liu, P., & Zhang, Y. (2014) · Proceedings of the 36th International Conference on Software Engineering · doi:10.1145/2568225.2568286 · Cited by 287
Cordy, J. R., & Roy, C. K. (2011) · 2011 IEEE 19th International Conference on Program Comprehension · doi:10.1109/icpc.2011.26 · Cited by 256
Self-citationGöde, N., & Koschke, R. (2009) · 2009 13th European Conference on Software Maintenance and Reengineering · doi:10.1109/csmr.2009.20 · Cited by 222
A 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
Self-citationEvaluating 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 10×
“SourcererCC has poor recall for the MT3 and WT3/T4, which is expected as these clones fall outside the range of syntactical clone detectors [34].”
BackgroundMethodResultInfluentialSelf-citationEvaluating clone detection tools for use during preventative maintenance
Burd, E., & Bailey, J. (2003) · IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM) · doi:10.1109/scam.2002.1134103 · Cited by 164
Index-based code clone detection: incremental, distributed, scalable
Hummel, B., Juergens, E., Heinemann, L., & Conradt, M. (2010) · IEEE International Conference on Software Maintenance (ICSM) · doi:10.1109/icsm.2010.5609665 · Cited by 160
The vision of software clone management: Past, present, and future (Keynote paper)
Roy, C. K., Zibran, M. F., & Koschke, R. (2014) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/csmr-wcre.2014.6747168 · Cited by 157
Self-citationSearching for better configurations: a rigorous approach to clone evaluation
Wang, T., Harman, M., Jia, Y., & Krinke, J. (2013) · Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering · doi:10.1145/2491411.2491420 · Cited by 147 · cited 1×
“[38], clone detection studies are affected by the configurations of the tools, and SourcererCC is no exception.”
BackgroundEvaluating Modern Clone Detection Tools
Svajlenko, J., & Roy, C. K. (2014) · 2014 IEEE International Conference on Software Maintenance and Evolution · doi:10.1109/icsme.2014.54 · Cited by 120
Self-citationCode siblings: Technical and legal implications of copying code between applications
Germán, D. M., Penta, M. D., Guéhéneuc, Y., & Antoniol, G. (2009) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2009.5069483 · Cited by 110
Near‐miss function clones in open source software: an empirical study
Roy, C. K., & Cordy, J. R. (2009) · Journal of Software Maintenance and Evolution Research and Practice · doi:10.1002/smr.416 · Cited by 96
Self-citationLarge-Scale Inter-System Clone Detection Using Suffix Trees
Koschke, R. (2012) · Euromicro Conference on Software Maintenance and Reengineering (CSMR) · doi:10.1109/csmr.2012.37 · Cited by 69
SHINOBI: A Tool for Automatic Code Clone Detection in the IDE
Kawaguchi, S., Yamashina, T., Uwano, H., Fushida, K., Kamei, Y., Nagura, M., & Iida, H. (2009) · Working Conference on Reverse Engineering (WCRE) · doi:10.1109/wcre.2009.36 · Cited by 61
(2013) · doi:10.5555/2662708.2662710 · Cited by 34
An empirical assessment of Bellon's clone benchmark
Charpentier, A., Falleri, J., Lo, D., & Réveillère, L. (2015) · International Conference on Evaluation and Assessment in Software Engineering (EASE) · doi:10.1145/2745802.2745821 · Cited by 25
Big data clone detection using classical detectors: an exploratory study
Svajlenko, J., Keivanloo, I., & Roy, C. K. (2014) · Journal of Software Evolution and Process · doi:10.1002/smr.1662 · Cited by 20
Self-citationScaling classical clone detection tools for ultra-large datasets: an exploratory study
Svajlenko, J., Keivanloo, I., & Roy, C. K. (2013) · International Workshop on Software Clones · doi:10.5555/2662708.2662714 · Cited by 19
Self-citation
Cited by
VulDeePecker: A Deep Learning-Based System for Vulnerability Detection
Li, Z., Zou, D., Xu, S., Ou, X., Jin, H., Wang, S., Deng, Z., & Zhong, Y. (2018) · Proceedings 2018 Network and Distributed System Security Symposium · doi:10.14722/ndss.2018.23158 · Cited by 898
A Novel Neural Source Code Representation Based on Abstract Syntax Tree
Zhang, J., Wang, X., Zhang, H., Sun, H., Wang, K., & Liu, X. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2019.00086 · Cited by 655
An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
Tufano, M., Watson, C., Bavota, G., Penta, M. D., White, M., & Poshyvanyk, D. (2019) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3340544 · Cited by 370
DeepWukong: Statically Detecting Software Vulnerabilities Using Deep Graph Neural Network
Cheng, X., Wang, H., Hua, J., Xu, G., & Sui, Y. (2021) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3436877 · Cited by 335
Shaping program repair space with existing patches and similar code
Jiang, J., Xiong, Y., Zhang, H., Gao, Q., & Chen, X. (2018) · Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3213846.3213871 · Cited by 329
Metadata
- Authors
- Sajnani, H., Saini, V., Svajlenko, J., Roy, C. K., & Lopes, C. V.
- Venue
- arXiv (Cornell University)
- Publisher
- arXiv
- Published
- 2015
- Pages
- 1157-1168
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 1512.06448
- OpenAlex
- W2286236884
- Cited by
- 280
- References
- 28
- Type
- posted content
- Language
- en
- Open access
- green
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.