Cloning by accident: an empirical study of source code cloning across software systems

Authors: R. Al-Ekram C. Kapser R. Holt M. Godfrey

Venue: ESEM   2005 International Symposium on Empirical Software Engineering, 2005., 2005

Year: 2005

Abstract: One of the key goals of open source development is the sharing of knowledge, experience, and solutions that pertain to a software system and its problem domain. Source code cloning is one way in which expertise can be reused across systems; cloning is known to have been used in several open source projects, such as the SCSI drivers of the Linux kernel. In this paper, we discuss two case studies in which we performed clone detection on several open source systems within the same domain. In the first case study we examined nine text editors written in C, and in the second study we examined eight X-Windows window managers written in C and C++. To our surprise, we found little evidence of "true" cloning activity, but we did notice a significant number of "accidental" clones - that is, code fragments that are similar due to the precise protocols they must use when interacting with a given API or set of libraries. We further discuss the nature of "true" versus "accidental" clones, as well as the details of our case studies.

BibTeX:

@inproceedings{r.al-ekram2005cbaaesosccass,
    author = "R. Al-Ekram and C. Kapser and R. Holt and M. Godfrey",
    title = "Cloning by accident: an empirical study of source code cloning across software systems",
    year = "2005",
    booktitle = "Proceedings of 2005 International Symposium on Empirical Software Engineering, 2005."
}

Plain Text:

R. Al-Ekram, C. Kapser, R. Holt, and M. Godfrey, "Cloning by accident: an empirical study of source code cloning across software systems," 2005 International Symposium on Empirical Software Engineering, 2005.