TY - GEN
T1 - On the relationship of inconsistent software clones and faults
T2 - 23rd IEEE International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
AU - Wagner, Stefan
AU - Abdulkhaleq, Asim
AU - Kaya, Kamer
AU - Paar, Alexander
N1 - Publisher Copyright:
© 2016 Institute of Electrical and Electronics Engineers Inc.. All rights reserved.
PY - 2016/5/20
Y1 - 2016/5/20
N2 - Background: Code cloning - copying and reusing pieces of source code - is a common phenomenon in software development in practice. There have been several empirical studies on the effects of cloning, but there are contradictory results regarding the connection of cloning and faults. Objective: Our aim is to clarify the relationship between code clones and faults. In particular, we focus on inconsistent (or type-3) clones in this work. Method: We conducted a case study with TWT GmbH where we detected the code clones in three Java systems, set them into relation to information from issue tracking and version control and interviewed three key developers. Results: Of the type-3 clones, 17 % contain faults. Developers modified most of the type-3 clones simultaneously and thereby fixed half of the faults in type-3 clones consistently. Type-2 clones with faults all evolved to fixed type-3 clones. Clone length is only weakly correlated with faultiness. Conclusion: There are indications that the developers in two cases have been aware of clones. It might be a reason for the weak relationship between type-3 clones and faults. Hence, it seems important to keep developers aware of clones, potentially with new tool support. Future studies need to investigate if the rate of faults in type-3 clones justifies using them as cues in defect detection.
AB - Background: Code cloning - copying and reusing pieces of source code - is a common phenomenon in software development in practice. There have been several empirical studies on the effects of cloning, but there are contradictory results regarding the connection of cloning and faults. Objective: Our aim is to clarify the relationship between code clones and faults. In particular, we focus on inconsistent (or type-3) clones in this work. Method: We conducted a case study with TWT GmbH where we detected the code clones in three Java systems, set them into relation to information from issue tracking and version control and interviewed three key developers. Results: Of the type-3 clones, 17 % contain faults. Developers modified most of the type-3 clones simultaneously and thereby fixed half of the faults in type-3 clones consistently. Type-2 clones with faults all evolved to fixed type-3 clones. Clone length is only weakly correlated with faultiness. Conclusion: There are indications that the developers in two cases have been aware of clones. It might be a reason for the weak relationship between type-3 clones and faults. Hence, it seems important to keep developers aware of clones, potentially with new tool support. Future studies need to investigate if the rate of faults in type-3 clones justifies using them as cues in defect detection.
UR - http://www.scopus.com/inward/record.url?scp=85049202432&partnerID=8YFLogxK
U2 - 10.1109/SANER.2016.94
DO - 10.1109/SANER.2016.94
M3 - Conference contribution
AN - SCOPUS:85049202432
T3 - 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
SP - 79
EP - 89
BT - 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, SANER 2016
PB - Institute of Electrical and Electronics Engineers Inc.
Y2 - 14 March 2016 through 18 March 2016
ER -