Relation of code clones and change couplings

  • Authors:
  • Reto Geiger;Beat Fluri;Harald C. Gall;Martin Pinzger

  • Affiliations:
  • s.e.a.l. – software evolution and architecture lab, Department of Informatics, University of Zurich, Switzerland;s.e.a.l. – software evolution and architecture lab, Department of Informatics, University of Zurich, Switzerland;s.e.a.l. – software evolution and architecture lab, Department of Informatics, University of Zurich, Switzerland;s.e.a.l. – software evolution and architecture lab, Department of Informatics, University of Zurich, Switzerland

  • Venue:
  • FASE'06 Proceedings of the 9th international conference on Fundamental Approaches to Software Engineering
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Code clones have long been recognized as bad smells in software systems and are considered to cause maintenance problems during evolution. It is broadly assumed that the more clones two files share, the more often they have to be changed together. This relation between clones and change couplings has been postulated but neither demonstrated nor quantified yet. However, given such a relation it would simplify the identification of restructuring candidates and reduce change couplings. In this paper, we examine this relation and discuss if a correlation between code clones and change couplings can be verified. For that, we propose a framework to examine code clones and relate them to change couplings taken from release history analysis. We validated our framework with the open source project Mozilla and the results of the validation show that although the relation is statistically unverifiable it derives a reasonable amount of cases where the relation exists. Therefore, to discover clone candidates for restructuring we additionally propose a set of metrics and a visualization technique. This allows one to spot where a correlation between cloning and change coupling exists and, as a result, which files should be restructured to ease further evolution.