Computing Structural Types of Clone Syntactic Blocks
Authors:
- Ettore MerloEMEttore Merlo
- Thierry LavoieTLThierry Lavoie
- 1 January 2009
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 274-278
Abstract
A clone classification scheme is presented based on the structure of the abstract syntax tree (AST) of a system and on the similarity measures between syntactic blocks of source code. Syntactic blocks in a system may represent classes, methods, statement blocks, and so on. An inclusion relation may exist between the source code lines of some of these blocks, depending of the syntactic structure of the source code. For example, a block corresponding to a method body may contain several possibly nested statement blocks.This paper introduces an algorithm to identify different types of clone relations between blocks that are either method bodies or statement blocks. Clone relation types between these blocks are interesting because they indicate properties of the structural relation of these clones and may give hints on re-factoring opportunities. The proposed structural type clone classification scheme has been investigated on two open source Java systems, Tomcat and Eclipse. Experimental results are presented. Execution time performance of clone classification has been measured and reported. Results and further proposed research are discussed.Keywords
This publication has 20 references indexed in Scilit:
- Empirical evaluation of clone detection using syntax suffix treesEmpirical Software Engineering, 2008
- Efficient token based clone detection with flexible tokenization2007
- Tracking Code Clones in Evolving Software29th International Conference on Software Engineering (ICSE'07), 2007
- A novel approach to optimize clone refactoring activity2006
- On the effectiveness of clone detection by string matchingJournal of Software Maintenance and Evolution: Research and Practice, 2005
- Clone detection using abstract syntax trees2002
- Advanced clone-analysis to support object-oriented system refactoring2002
- Analyzing cloning evolution in the Linux kernelInformation and Software Technology, 2002
- CCFinder: a multilinguistic token-based code clone detection system for large scale source codeIEEE Transactions on Software Engineering, 2002
- Pattern matching for clone and concept detectionAutomated Software Engineering, 1996