Authors: Michael W. Godfrey Cory J. Kapser
Venue: Code Clone Analysis: Researches, Tools, and Practices, pp. To appear, 2021
Year: 2021
Abstract: The practice of copy-paste-edit—also known as code cloning—has always been popular with software developers; however, evidence suggests that code cloning also carried risks: code bloat, creeping system fragility and design drift, increased bugginess, and inconsistent maintenance are all possible side effects of code cloning. Early research into this practice often tacitly assumed that it was always problematic, and sought to identify instances of it (“clone detection”) for later elimination. However, our studies of how cloning has been practised in the development of several large open-source systems suggested a more nuanced view might be appropriate: we found that code cloning seems to be practised for a variety of reasons, and sometimes with principled engineering goals in mind. That is, the idea that “code cloning is uniformly harmful to software system quality” is itself harmful. We argue instead that code clone instances should be evaluated along a number of criteria—such as developer intent, likely risk, and mitigation strategies—before any refactoring action is taken. Also, after some years of reflection on our original studies, we further suggest that instead of concentrating only on source code and other technical artifacts, there is much to be gained by shifting our focus to studying how developers perceive and practice code cloning.
BibTeX:
@inproceedings{michaelw.godfrey2021sciasdd,
author = "Michael W. Godfrey and Cory J. Kapser",
title = "Sometimes, cloning is a sound design decision!",
year = "2021",
pages = "To appear",
booktitle = "Code Clone Analysis: Researches, Tools, and Practices"
}
Plain Text:
Michael W. Godfrey and Cory J. Kapser, "Sometimes, cloning is a sound design decision!," Code Clone Analysis: Researches, Tools, and Practices, pp. To appear