Distinguishing copies from originals in software clones

  • Authors:
  • Jens Krinke;Nicolas Gold;Yue Jia;David Binkley

  • Affiliations:
  • King's College London;King's College London;King's College London;Loyola University Maryland, Baltimore, MD

  • Venue:
  • Proceedings of the 4th International Workshop on Software Clones
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Cloning is widespread in today's systems where automated assistance is required to locate cloned code. Although the evolution of clones has been studied for many years, no attempt has been made so far to automatically distinguish the original source code leading to cloned copies. This paper presents an approach to classify the clones of a clone pair based on the version information available in version control systems. This automatic classification attempts to distinguish the original from the copy. It allows for the fact that the clones may be modified and thus consist of lines coming from different versions. An evaluation, based on two case studies, shows that when comments are ignored and a small tolerance is accepted, for the majority of clone pairs the proposed approach can automatically distinguish between the original and the copy.