Code Clones in Feature-Oriented Software Product Lines

kaestner@cs.cmu.edu (S. Schulze, S. Apel, C. Kästner)
Sat, 05 Mar 2016 18:41:39 -0500

Sandro Schulze, Sven Apel, and Christian Kästner. Code Clones in Feature-Oriented Software Product Lines. In Proceedings of the 9th ACM International Conference on Generative Programming and Component Engineering (GPCE), pages 103--112, New York, NY: ACM Press, October 2010.

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-specific) 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 amount of clones in feature-oriented software product lines and that a large fraction of these clones is FOP-specific (i.e., caused by limitations of feature-oriented mechanisms). Based on our results, we initiate a discussion on the reasons for FOP-specific clones and on how to cope with them. We exemplary show how such clones can be removed by the application of refactoring.