Is cloned code older than non-cloned code?

  • Authors:
  • Jens Krinke

  • Affiliations:
  • University College London, London, United Kingdom

  • Venue:
  • Proceedings of the 5th International Workshop on Software Clones
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

It is still a debated question whether cloned code causes increased maintenance efforts. If cloned code is more stable than non-cloned code, i.e. it is changed less often, it will require less maintenance efforts. The more stable cloned code is, the longer it will not have been changed, so the stability can be estimated through the code's age. This paper presents a study on the average age of cloned code. For three large open source systems, the age of every line of source code is computed as the date of the last change in that line. In addition, every line is categorized whether it belongs to cloned code as detected by a clone detector. The study shows that on average, cloned code is older than non-cloned code. Moreover, if a file has cloned code, the average age of the cloned code of the file is lower than the average age of the non-cloned code in the same file. The results support the previous findings that cloned code is more stable than non-cloned code.