On the association between code cloning and fault-proneness: An empirical investigation
Mahmoud O. Elish · 2017 Computing Conference · 2017
During software development projects, the reuse of code fragments with or without modification by copying and pasting is a common practice, which is known as code clones. It has been an arguable issue whether cloning has a harmful impact or not on software development and the quality of the produced software. This paper empirically explores the association between code clones and fault-proneness of object-oriented classes. An empirical investigation was conducted using data from more than 3000 classes in five open source software projects. It was found that classes with clones are significantly more fault-prone than the classes without clones. In addition, the classes with intra-class clones, regardless of whether they also have inter-class clones or not, were found to be significantly more fault-prone than the classes with inter-class clones only. Moreover, among the groups of classes that have only one type of clones, the group of classes with Type II clones was found to be the most fault-prone. Furthermore, the groups of classes that contain more than one type of clones where Type I is among them were found to be more fault-prone than the groups of classes with only one type of clones.