Method-level code clone detection through LWH (Light Weight Hybrid) approach
Keywords:
Clone detection, Function clones, Source code metrics, String-matchingAbstract
BackgroundMany researchers have investigated different techniques to automatically detect duplicate code in programs exceeding thousand lines of code. These techniques have limitations in finding either the structural or functional clones.;
MethodsWe propose a LWH (Light Weight Hybrid) approach combining textual analysis and metrics for the detection of method-level syntactic and semantic clones in C and Java projects. This approach has been experimenting for the detection of all four types of clones by a specific set of metrics assessment and textual comparison. A tool named CloneManager has been developed in Java to support the experiments carried out and to validate the proposed approach.;
ResultsA benchmark dataset widely referred in the literature and medium to large size open-source projects developed in C or Java. Java is used for the experiments.;
ConclusionsThe results show that the proposed approach is able to detect all four types of clones accurately with the precision and recall values ranging from 88% to 100%.;