On the Structural Code Clone Detection Problem: A Survey and Software Metric Based Approach - Kapdan, Mustafa; Aktas, Mehmet; Yigit, Melike (SPRINGER-VERLAG BERLIN, 2014)
Unnecessary repeated codes (clones) have not been well documented and are difficult to maintain. Code clones may become an important problem in software development cycle and they must be fixed in all occurrences. This condition increases significantly software maintenance costs and required effort/duration for understanding the code. Over the years, many techniques have been proposed in order to minimize or prevent the code cloning problems. The main focus of these techniques is on the detection of clones. In such studies, code cloning is studied under two main categories: simple and structural. Simple clone is defined as the similarity that arises from the repetition of the code snippet in the software. Structural clone is defined as the similarity in software structure (i.e. design patterns and object oriented programming class relations). Simple clone detection techniques fail to determine the reasons of code repetition whether it is due to design or not, as they do not look at the code from a wider perspective for repetitive code snippets. In this study, we survey the existing structural clones approaches. We also introduce an approach that utilizes software quality metrics for detecting the structural code clones.
Keywords: Code Clone; Simple Code Clone; Structural Code Clone; Software Metrics; Object Oriented Metrics; PATTERNS; Computer Science