An evaluation of clone detection techniques for crosscutting concerns

Code implementing a crosscutting concern is often spread over many different parts of an application. Identifying such code automatically greatly improves both the maintainability and the evolvability of the application. First of all, it allows a developer to more easily find the places in the code that must be changed when the concern changes, and thus makes such changes less time consuming and less prone to errors. Second, it allows a developer to refactor the code, so that it uses modern and more advanced abstraction mechanisms, thereby restoring its modularity. We evaluate the suitability of clone detection as a technique for the identification of crosscutting concerns. To that end, we manually identify four specific concerns in an industrial C application, and analyze to what extent clone detection is capable of finding these concerns. We consider our results as a stepping stone toward an automated "concern miner" based on clone detection.

[1]  Yun Yang,et al.  Problems creating task-relevant clone detection reference data , 2003, 10th Working Conference on Reverse Engineering, 2003. WCRE 2003. Proceedings..

[2]  Brenda S. Baker,et al.  On finding duplication and near-duplication in large software systems , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

[3]  Shinji Kusumoto,et al.  CCFinder: A Multilinguistic Token-Based Code Clone Detection System for Large Scale Source Code , 2002, IEEE Trans. Software Eng..

[4]  William G. Griswold,et al.  AspectBrowser: Tool Support for Managing Dispersed Aspects , 1999 .

[5]  Stéphane Ducasse,et al.  Tool Support for Refactoring Duplicated OO Code , 1999, ECOOP Workshops.

[6]  Hans-Arno Jacobsen,et al.  A Prism for Research in Software Modularization Through Aspect Mining ∗ , 2003 .

[7]  Serge Demeyer,et al.  Reconstruction of successful software evolution using clone detection , 2003, Sixth International Workshop on Principles of Software Evolution, 2003. Proceedings..

[8]  Gregor Kiczales,et al.  Using aspectC to improve the modularity of path-specific customization in operating system code , 2001, ESEC/FSE-9.

[9]  Stéphane Ducasse,et al.  A language independent approach for detecting duplicated code , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[10]  Ettore Merlo,et al.  Experiment on the automatic detection of function clones in a software system using metrics , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[11]  Susan Horwitz,et al.  Using Slicing to Identify Duplication in Source Code , 2001, SAS.

[12]  J. Howard Johnson,et al.  Identifying redundancy in source code using fingerprints , 1993, CASCON.

[13]  Gregor Kiczales,et al.  Overcoming the Prevalent Decomposition in Legacy Code , 2001 .

[14]  Richard C. Holt Binary Relational Algebra Applied to Software Architecture , 1996 .

[15]  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).

[16]  Jens Krinke,et al.  Identifying similar code with program dependence graphs , 2001, Proceedings Eighth Working Conference on Reverse Engineering.