Sub-clones: Considering the Part Rather than the Whole.
Robert Tairas, Jeff Gray · 2010
Abstract- Researchers have proposed various automated clone detection tools that can assist programmers in finding code clones (i.e., duplicated sections of code). Such tools can serve as input into the process of clone removal through refactoring activities. In this paper, we consider the scenario in which an automated clone detection tool was used to find code clones as part of the clone refactoring process. Actual refactorings associated with the detected clones were obtained from changes identified between consecutive versions of open source software artifacts. Based on two separate studies, observations reveal instances of sub-clone refactoring where only part of the clone ranges are actually refactored. We conclude that sub-clone refactoring should be considered to augment refactoring performed on the entire clone.