By Foyzur Rahman, Christian Bird, and Premkumar Devanbu

Published in Proceedings of the Seventh Working Conference on Mining Software Repositories

MSR Best Paper Award

Clones are generally considered bad programming practice in software engineering folklore. They are identified as a bad smell and a major contributor to project maintenance difficulties. Clones inherently cause code bloat, thus increasing project size and maintenance costs. In this work, we try to validate the conventional wisdom empirically to see whether cloning makes code more defect prone.
This paper analyses relationship between cloning and defect proneness. We find that, first, the great majority of bugs are not significantly associated with clones. Second, we find that clones may be less defect prone than non-cloned code. Finally, we find little evidence that clones with more copies are actually more error prone. Our findings don’t support the claim that clones are really a “bad smell”. Perhaps we can clone, and breathe easy, at the same time.

@INPROCEEDINGS{rahman2010cws,
author = {Foyzur Rahman and Christian Bird and Premkumar Devanbu},
title = {{Clones: What \emph{is} that Smell?}},
booktitle = {Proceedings of the Seventh Working Conference on Mining Software
Repositories},
year = {2010},
publisher = {IEEE Computer Society},
location = {Cape Town, South Africa}
}


Clones: What \emphis that Smell? (MSR 10)