Do code clones matter?
Top Cited Papers
Open Access
- 1 January 2009
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 02705257,p. 485-495
Abstract
Code cloning is not only assumed to inflate maintenance costs but also considered defect-prone as inconsistent changes to code duplicates can lead to unexpected behavior. Consequently, the identification of duplicated code, clone detection, has been a very active area of research in recent years. Up to now, however, no substantial investigation of the consequences of code cloning on program correctness has been carried out. To remedy this shortcoming, this paper presents the results of a large-scale case study that was undertaken to find out if inconsistent changes to cloned code can indicate faults. For the analyzed commercial and open source systems we not only found that inconsistent changes to clones are very frequent but also identified a significant number of faults induced by such changes. The clone detection tool used in the case study implements a novel algorithm for the detection of inconsistent clones. It is available as open source to enable other researchers to use it as basis for further investigations.Keywords
All Related Versions
This publication has 23 references indexed in Scilit:
- CloneDetective - A workbench for clone detection research2009
- NICAD: Accurate Detection of Near-Miss Intentional Clones Using Flexible Pretty-Printing and Code Normalization2008
- CReN2007
- Context-based detection of clone-related bugs2007
- "Cloning Considered Harmful" Considered Harmful2006
- Approximate string-matching over suffix trees2005
- An empirical study of code clone genealogies2005
- Software quality analysis by code clones in industrial legacy software2003
- On detection of gapped code clones using gap locations2002
- On-line construction of suffix treesAlgorithmica, 1995