A parallel and efficient approach to large scale clone detection
Authors:
- 25 March 2015
- journal article
- research article
- Published by Wiley in Journal of Software: Evolution and Process
- Vol. 27 (6) , 402-429
Abstract
We propose a new token‐based approach for large ‐scale code clone detection, which is based on a filtering heuristic that reduces the number of token comparisons when the two code blocks are compared. We also present a MapReduce based parallel algorithm that uses the filtering heuristic and scales to thousands of projects. The filtering heuristic is generic and can also be used in conjunction with other token‐based approaches. In that context, we demonstrate how it can increase the retrieval speed and decrease the memory usage of the index‐based approaches. In our experiments on 36 open source Java projects, we found that: (i) filtering reduces token comparisons by a factor of 10, and thus increasing the speed of clone detection by a factor of 1.5; (ii) the speed‐up and scale‐up of the parallel approach using filtering is near‐linear on a cluster of 2–32 nodes for 150–2800 projects; and (iii) filtering decreases the memory usage of index‐based approach by half and the search time by a factor of 5. Copyright © 2015 John Wiley & Sons, Ltd.Keywords
This publication has 27 references indexed in Scilit:
- LHDiff: A Language-Independent Hybrid Approach for Tracking Source Code Lines2013
- DedoopProceedings of the VLDB Endowment, 2012
- On the Effectiveness of Simhash for Detecting Near-Miss Clones in Large Scale Software Systems2011
- The NiCad Clone Detector2011
- Comparison and evaluation of code clone detection techniques and tools: A qualitative approachScience of Computer Programming, 2009
- CloneDetective - A workbench for clone detection research2009
- Comparison and Evaluation of Clone Detection ToolsIEEE Transactions on Software Engineering, 2007
- DECKARD: Scalable and Accurate Tree-Based Detection of Code Clones29th International Conference on Software Engineering (ICSE'07), 2007
- CCFinder: a multilinguistic token-based code clone detection system for large scale source codeIEEE Transactions on Software Engineering, 2002
- Experiment on the automatic detection of function clones in a software system using metrics1996