Code clones in feature-oriented software product lines

  • Authors:
  • Sandro Schulze;Sven Apel;Christian Kästner

  • Affiliations:
  • University of Magdeburg, Magdeburg, Germany;University of Passau, Passau, Germany;Philipps University Marburg, Marburg, Germany

  • Venue:
  • GPCE '10 Proceedings of the ninth international conference on Generative programming and component engineering
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Some limitations of object-oriented mechanisms are known to cause code clones (e.g., extension using inheritance). Novel programming paradigms such as feature-oriented programming (FOP) aim at alleviating these limitations. However, it is an open issue whether FOP is really able to avoid code clones or whether it even facilitates (FOP-related) clones. To address this issue, we conduct an empirical analysis on ten feature-oriented software product lines with respect to code cloning. We found that there is a considerable number of clones in feature-oriented software product lines and that a large fraction of these clones is FOP-related (i.e., caused by limitations of feature-oriented mechanisms). Based on our results, we initiate a discussion on the reasons for FOP-related clones and on how to cope with them. We show by means of examples how such clones can be removed by applying refactorings.