Clone Smells in Software Evolution

Abstract

Although source code cloning (copy&paste programming) represents a significant threat to the maintainability of a software system, problems usually start to arise only when the system evolves. Most of the related research papers tackle the question of finding code clones in one particular version of the software only, leaving the dynamic behavior of the clones out of consideration. Eliminating these clones in large software systems often seems absolutely hopeless, as there might exist several thousands of them. Alternatively, tracking the evolution of individual clones can be used to identify those occurrences that could really cause problems in the future versions. In this paper we present an approach for mapping clones from one particular version of the software to another one, based on a similarity measure. This mapping is used to define conditions under which clones become suspicious (or “smelly”) compared to their other occurrences. Accordingly, these conditions introduce the notion of dynamic clone smells. The usefulness of these smells is validated on the Mozilla Firefox internet browser, where the approach was able to find specific bugs that resulted from neglecting earlier copy&paste activities.

Publication
Proceedings of the 2007 IEEE International Conference on Software Maintenance (ICSM 2007), Paris, France, Pages 24–33

BibTeX:

@InProceedings{BFG07,
    author    = {Bakota, Tibor and Ferenc, Rudolf and Gyim\'othy, Tibor},
    title     = {Clone Smells in Software Evolution},
    booktitle = {Proceedings of the 2007 {IEEE} International Conference on Software Maintenance (ICSM 2007)},
    year      = {2007},
    pages     = {24--33},
    address   = {Paris, France},
    month     = oct,
    publisher = {IEEE Computer Society},
    doi       = {10.1109/ICSM.2007.4362615},
    keywords  = {Mozilla Firefox Internet browser, software evolution, source code cloning, software maintenance},
    url       = {http://ieeexplore.ieee.org/document/4362615/},
}