Do code clones matter?
By Elmar Jürgens, F. Deißenböck, B. Hummel, Stefan Wagner. 2009 IEEE 31st International Conference on Software Engineering, 2009
489 citations recorded by the source corpus.
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.
Subfields: Information Systems, Software, Signal Processing
View Paper: https://www.semanticscholar.org/paper/65f5ba6c95888ce66a84bf91f3505e42ffd141db
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Information Systems
- Chanchal Kumar Roy
- James R. Cordy
- Rainer Koschke
- Baishakhi Ray
- Peng Liu
- Satish Narayanasamy
- Michael J. Cafarella
- Abbas Heydarnoori
In Software
- Chanchal Kumar Roy
- James R. Cordy
- Rainer Koschke
- Peng Liu
- Satish Narayanasamy
- Michael J. Cafarella
- Yingjun Zhang
- Baishakhi Ray
In Signal Processing
- Chanchal Kumar Roy
- James R. Cordy
- Rainer Koschke
- Peng Liu
- Satish Narayanasamy
- Michael J. Cafarella
- Mark D. Plumbley
- Yingjun Zhang
Citations in the corpus
- Achieving accuracy and scalability simultaneously in detecting application clones on Android markets (2014, background): “Code clones, or similar fragments of source code, bring unwanted problems such as inconsistencies [21], potential bugs [38] and code smells [14].”
- Using web corpus statistics for program analysis (2014, methodology): “Existing plagiarism detection algorithms can be categorized into one of the following types: string-based, token-based [7, 11, 22, 25], abstract-syntax-tree-based [4, 10], and program-dependence-graph-based [6, 13, 16].”
- Cross-project code clones in GitHub (2018, background): “So, programmers opportunistically reuse code and do so frequently (Juergens et al. 2009).”
- Comparison and evaluation of code clone detection techniques and tools: A qualitative approach (2009, background): “While such cloning is often intentional [64] and can be useful in many ways [3, 61], it can be also be harmful in software maintenance and evolution [56].”
- Best Practices for Scientific Computing (2012, background): “Avoiding ‘‘code clones’’ has been shown to reduce error rates [50]: when a change is made or a bug is fixed, that change or fix takes effect everywhere, and people’s mental model of the program (i.”