Title :
Code clone detection using coarse and fine-grained hybrid approaches
Author :
Abdullah Sheneamer;Jugal Kalita
Author_Institution :
Department of Computer Science, University of Colorado at Colorado Springs, USA
Abstract :
If two fragments of source code are identical to each other, they are called code clones. Code clones introduce difficulties in software maintenance and cause bug propagation. Coarse-grained clone detectors have higher precision than fine-grained, but fine-grained detectors have higher recall than coarse-grained. In this paper, we present a hybrid clone detection technique that first uses a coarse-grained technique to analyze clones effectively to improve precision. Subsequently, we use a fine-grained detector to obtain additional information about the clones and to improve recall. Our method detects Type-1 and Type-2 clones using hash values for blocks, and gapped code clones (Type-3) using block detection and subsequent comparison between them using Levenshtein distance and Cosine measures with varying thresholds.
Conference_Titel :
Intelligent Computing and Information Systems (ICICIS), 2015 IEEE Seventh International Conference on
Print_ISBN :
978-1-5090-1949-6
DOI :
10.1109/IntelCIS.2015.7397263