Managing big clones to ease evolution: Linux kernel example

Successful software is often enhanced and adapted to the needs of new users. During evolution, a software system grows in size, becomes more complex, and costly to maintain. In this paper, we point to big clones-large granular duplicated program structures such as files or directories-as one of many reasons why this happens. Using the Linux kernel as an example, we show that big clones arise in the Linux kernel despite careful architecture design and a systematic approach for managing variability. We propose a solution to avoid these big clones by representing them as generalized templates in ART (Adaptive Reuse Technique). ART templates are constructed on top of the Linux code, without conflicts with the state-of-art techniques and tools used to manage the Linux kernel. Benefits include simplification of the Linux kernel due to non-redundancy, easier comprehension, and traceability of the change impact during evolution. The proposed technique is general and the Linux example discussed in this paper also illustrates general phenomena.

[1]  Frederick P. Brooks,et al.  No Silver Bullet: Essence and Accidents of Software Engineering , 1987 .

[2]  Asim Kadav,et al.  Understanding modern device drivers , 2012, ASPLOS XVII.

[3]  Stan Jarzabek,et al.  Industrial experience with building a web portal product line using a lightweight, reactive approach , 2005, ESEC/FSE-13.

[4]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[5]  Sven Apel,et al.  Code clones in feature-oriented software product lines , 2010, GPCE '10.

[6]  Michael W. Godfrey,et al.  "Cloning Considered Harmful" Considered Harmful , 2006, 2006 13th Working Conference on Reverse Engineering.

[7]  Jaakko Järvi,et al.  A comparative study of language support for generic programming , 2003, OOPSLA 2003.

[8]  Stan Jarzabek,et al.  Eliminating redundancies with a "composition with adaptation" meta-programming technique , 2003, ESEC/FSE-11.

[9]  Katsuro Inoue,et al.  Analysis of the Linux Kernel Evolution Using Code Clone Coverage , 2007, Fourth International Workshop on Mining Software Repositories (MSR'07:ICSE Workshops 2007).

[10]  Stan Jarzabek,et al.  University-Industry Collaboration Journey towards Product Lines , 2011, ICSR.

[11]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[12]  Rainer Koschke,et al.  An evaluation of code similarity identification for the grow-and-prune model , 2009, J. Softw. Maintenance Res. Pract..

[13]  Krzysztof Czarnecki,et al.  An Exploratory Study of Cloning in Industrial Software Product Lines , 2013, 2013 17th European Conference on Software Maintenance and Reengineering.

[14]  Rainer Koschke Identifying and Removing Software Clones , 2008, Software Evolution.

[15]  Nikolaos Tsantalis,et al.  Unification and refactoring of clones , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[16]  Sven Apel,et al.  Granularity in software product lines , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[17]  Don Batory,et al.  Scaling step-wise refinement , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[18]  Weishan Zhang,et al.  XVCL: XML-based variant configuration language , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[19]  Miryung Kim,et al.  An empirical study of code clone genealogies , 2005, ESEC/FSE-13.

[20]  E. Dijkstra On the Role of Scientific Thought , 1982 .

[21]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[22]  Sven Apel,et al.  Variational Data Structures: Exploring Tradeoffs in Computing with Variability , 2014, Onward!.

[23]  Claire Le Goues,et al.  The case for software evolution , 2010, FoSER '10.

[24]  Edsger W. Dijkstra,et al.  Selected Writings on Computing: A personal Perspective , 1982, Texts and Monographs in Computer Science.

[25]  Stan Jarzabek,et al.  A Data Mining Approach for Detecting Higher-Level Clones in Software , 2009, IEEE Transactions on Software Engineering.

[26]  Krzysztof Czarnecki,et al.  Evolution of the Linux Kernel Variability Model , 2010, SPLC.

[27]  M. Di Penta,et al.  Identifying clones in the Linux kernel , 2001, Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation.

[28]  Paul Clements,et al.  Software product lines - practices and patterns , 2001, SEI series in software engineering.

[29]  Michael W. Godfrey,et al.  A Study of Cloning in the Linux SCSI Drivers , 2011, 2011 IEEE 11th International Working Conference on Source Code Analysis and Manipulation.

[30]  Stan Jarzabek,et al.  A Case Study of Variation Mechanism in an Industrial Product Line , 2009, ICSR.

[31]  David R. Musser,et al.  STL tutorial and reference guide - C++ programming with the standard template library , 1996, Addison-Wesley professional computing series.

[32]  Stan Jarzabek,et al.  Things structural clones tell that simple clones don't , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[33]  Joseph A. Goguen,et al.  Parameterized Programming , 1984, IEEE Transactions on Software Engineering.

[34]  Michael W. Godfrey,et al.  Toward a Taxonomy of Clones in Source Code: A Case Study , 2003 .

[35]  R. Koschke,et al.  Frontiers of software clone management , 2008, 2008 Frontiers of Software Maintenance.

[36]  Sven Apel,et al.  A Case Study Implementing Features Using AspectJ , 2007, 11th International Software Product Line Conference (SPLC 2007).

[37]  Rainer Koschke,et al.  Extending the reflexion method for consolidating software variants into product lines , 2007, 14th Working Conference on Reverse Engineering (WCRE 2007).