An Empirical Study of the Fault-Proneness of Clone Mutation and Clone Migration

TitleAn Empirical Study of the Fault-Proneness of Clone Mutation and Clone Migration
Publication TypeConference Proceedings
Year of Publication2013
AuthorsXie, S, Khomh, F, Zou, Y
Refereed DesignationRefereed
Secondary Title10th Working Conference on Mining Software Repositories
Date Published05/2013
Abstract

When implementing new features into a software system, developers may duplicate several lines of code to reuse some existing code segments. This action creates code clones in the software system. The literature has documented different types of code clone (e.g., Type-1, Type-2, and Type-3). Once created, code clones evolve as they are modified during both the development and maintenance phases of the software system. The evolution of code clones across the revisions of a software system is known as a clone genealogy. Existing work has investigated the fault-proneness of Type-1 and Type-2 clone genealogies. In this study, we investigate clone genealogies containing Type-3 clones. We analyze three long lived software systems APACHE-ANT, ARGOUML, and JBOSS, which are all written in JAVA. Using the NICAD clone detection tool, we build clone genealogies and examine two evolutionary phenomena on clones: the mutation of the type of a clone during the evolution of a system, and the migration of clone segments across the repositories of a software system. Results show that 1) mutation and migration occur frequently in software systems; 2) the mutation of a clone group to Type-2 or Type-3 clones increases the risk for faults; 3) increasing the distance between code segments in a clone group also increases the risk for faults. Index Terms: Types of clones; clone genealogy; clone migration; fault-proneness.

Full Text