Issue No.04 - July/August (2009 vol.35)
Hamid Abdul Basit , Lahore University of Management Sciences, Lahore
DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/TSE.2009.16
Code clones are similar program structures recurring in variant forms in software system(s). Several techniques have been proposed to detect similar code fragments in software, so-called simple clones. Identification and subsequent unification of simple clones is beneficial in software maintenance. Even further gains can be obtained by elevating the level of code clone analysis. We observed that recurring patterns of simple clones often indicate the presence of interesting higher-level similarities that we call structural clones. Structural clones show a bigger picture of similarity situation than simple clones alone. Being logical groups of simple clones, structural clones alleviate the problem of huge number of clones typically reported by simple clone detection tools, a problem that is often dealt with postdetection visualization techniques. Detection of structural clones can help in understanding the design of the system for better maintenance and in reengineering for reuse, among other uses. In this paper, we propose a technique to detect some useful types of structural clones. The novelty of our approach includes the formulation of the structural clone concept and the application of data mining techniques to detect these higher-level similarities. We describe a tool called Clone Miner that implements our proposed technique. We assess the usefulness and scalability of the proposed techniques via several case studies. We discuss various usage scenarios to demonstrate in what ways the knowledge of structural clones adds value to the analysis based on simple clones alone.
Design concepts, maintainability, restructuring, reverse engineering, reengineering, reusable software.
Hamid Abdul Basit, "A Data Mining Approach for Detecting Higher-Level Clones in Software", IEEE Transactions on Software Engineering, vol.35, no. 4, pp. 497-514, July/August 2009, doi:10.1109/TSE.2009.16