Tracking Code Clones in Evolving Software

  • Authors:
  • Ekwa Duala-Ekoko;Martin P. Robillard

  • Affiliations:
  • McGill University, Canada;McGill University, Canada

  • Venue:
  • ICSE '07 Proceedings of the 29th international conference on Software Engineering
  • Year:
  • 2007

Quantified Score

Hi-index 0.02

Visualization

Abstract

Code clones are generally considered harmful in software development, and the predominant approach is to try to eliminate them through refactoring. However, recent research has provided evidence that it may not always be practical, feasible, or cost-effective to eliminate certain clone groups. We propose a technique for tracking clones in evolving software. Our technique relies on the concept of abstract clone region descriptors (CRD), which describe clone regions within methods in a robust way that is independent from the exact text of the clone region or its location in a file. We present our definition of CRDs, and describe a complete clone tracking system capable of producing CRDs from the output of a clone detection tool, notify developers of modifications to clone regions, and support the simultaneous editing of clone regions. We report on two experiments and a case study conducted to assess the performance and usefulness of our approach.