Mining and tracking in evolving software

Every large program contains a small fraction of functionality that resists clean encapsulation. Code for, e.g., debugging or locking is hard to keep hidden using objectoriented mechanisms alone. This problem gave rise to aspect-oriented programming: such cross-cutting functionality is factored out into so-called aspects and these are woven back into mainline code during compilation. However, for existing software systems to benefit from AOP, the cross-cutting concerns must be identified first (aspect mining) before the system can be re-factored into an aspect-oriented design. This thesis on mining and tracking cross-cutting concerns makes three contributions: firstly, it presents aspect mining as both a theoretical idea and a practical and scalable application. By analysing where developers add code to a program, our history-based aspect mining (HAM) identifies and ranks cross-cutting concerns. Its effectiveness and high precision was evaluated using industrial-sized open-source projects such as Eclipse. Secondly, the thesis takes the work on software evolution one step further. Knowledge about a concern’s implementation can become invalid as the system evolves. We address this problem by defining structural and textual patterns among the elements identified as relevant to a concern’s implementation. The inferred patterns are documented as rules that describe a concern in a formal (intensional) rather than a merely textual (extensional) manner. These rules can then be used to track an evolving concern’s implementation in conjunction with the development history. Finally, we implemented this technique for Java in an Eclipse plug-in called ISIS4J and evaluated it using a number of concerns. For that we again used the development history of an open-source project. The evaluation shows not only the effectiveness of our approach, but also to what extent our approach supports the tracking of a concern’s implementation despite, e.g., program code extensions or refactorings.

[1]  Rainer Koschke,et al.  Locating Features in Source Code , 2003, IEEE Trans. Software Eng..

[2]  Rick Kazman,et al.  Architecture, design, implementation , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[3]  Silvia Breu Towards Hybrid Aspect Mining: Static Extensions to Dynamic Aspect Mining , 2004 .

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

[5]  N. Loughran,et al.  Mining Aspects , 2002 .

[6]  Audris Mockus,et al.  Does Code Decay? Assessing the Evidence from Change Management Data , 2001, IEEE Trans. Software Eng..

[7]  Charles L. Forgy,et al.  Rete: a fast algorithm for the many pattern/many object pattern match problem , 1991 .

[8]  Kim Mens,et al.  IntensiVE, a toolsuite for documenting and checking structural source-code regularities , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[9]  Lori Pollock,et al.  Ophir: A Framework for Automatic Mining and Refactoring of Aspects , 2003 .

[10]  Kris De Volder,et al.  Navigating and querying code without getting lost , 2003, AOSD '03.

[11]  Mark Harman,et al.  Tool-Supported Refactoring of Existing Object-Oriented Code into Aspects , 2006, IEEE Transactions on Software Engineering.

[12]  Elliot Soloway,et al.  Designing documentation to compensate for delocalized plans , 1988, CACM.

[13]  Michael W. Godfrey,et al.  Using origin analysis to detect merging and splitting of source code entities , 2005, IEEE Transactions on Software Engineering.

[14]  Martin P. Robillard Tracking Concerns in Evolving Source Code: An Empirical Study , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[15]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[16]  Wei Zhao,et al.  SNIAFL: towards a static non-interactive approach to feature location , 2004, Proceedings. 26th International Conference on Software Engineering.

[17]  Chadd C. Williams,et al.  Automatic mining of source code repositories to improve bug finding techniques , 2005, IEEE Transactions on Software Engineering.

[18]  Jens Krinke,et al.  Aspect mining using event traces , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

[19]  Bernhard Ganter,et al.  Formal Concept Analysis: Mathematical Foundations , 1998 .

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

[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]  Rainer Koschke,et al.  On dynamic feature location , 2005, ASE.

[23]  Chadd C. Williams,et al.  Recovering system specific rules from software repositories , 2005, MSR '05.

[24]  Alexander Egyed,et al.  STRADA: A Tool for Scenario-Based Feature-to-Code Trace Detection and Analysis , 2007, 29th International Conference on Software Engineering (ICSE'07 Companion).

[25]  Martin P. Robillard,et al.  Representing concerns in source code , 2007, TSEM.

[26]  Jens Krinke,et al.  Control-Flow-Graph-Based Aspect Mining , 2004 .

[27]  Jian Pei,et al.  MAPO: mining API usages from open source repositories , 2006, MSR '06.

[28]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

[29]  Benjamin Livshits,et al.  DynaMine: finding common error patterns by mining software revision histories , 2005, ESEC/FSE-13.

[30]  Kim Mens,et al.  Mining aspectual views using formal concept analysis , 2004, Source Code Analysis and Manipulation, Fourth IEEE International Workshop on.

[31]  Silvia Breu,et al.  Extending dynamic aspect mining with static information , 2005, Fifth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM'05).

[32]  Martin P. Robillard,et al.  Inferring structural patterns for concern traceability in evolving software , 2007, ASE.

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

[34]  Thomas Zimmermann,et al.  Preprocessing CVS Data for Fine-Grained Analysis , 2004, MSR.

[35]  Mariano Ceccato,et al.  Aspect mining through the formal concept analysis of execution traces , 2004, 11th Working Conference on Reverse Engineering.

[36]  Leon Moonen,et al.  A common framework for aspect mining based on crosscutting concern sorts , 2006, 2006 13th Working Conference on Reverse Engineering.

[37]  Alexander Egyed,et al.  Supporting Software Understanding with Automated Requirements Traceability , 2005, Int. J. Softw. Eng. Knowl. Eng..

[38]  Mark Harman,et al.  Automated refactoring of object oriented code into aspects , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[39]  Christian Lindig Fast Concept Analysis , 2000 .

[40]  Arie van Deursen,et al.  Identifying aspects using fan-in analysis , 2004, 11th Working Conference on Reverse Engineering.

[41]  William G. Griswold,et al.  Exploiting the map metaphor in a tool for software evolution , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[42]  Thomas Zimmermann,et al.  Mining eclipse for cross-cutting concerns , 2006, MSR '06.

[43]  Martin P. Robillard,et al.  ConcernMapper: simple view-based separation of scattered concerns , 2005, eclipse '05.

[44]  Yann-Gaël Guéhéneuc,et al.  Combining Probabilistic Ranking and Latent Semantic Indexing for Feature Identification , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[45]  Hans-Arno Jacobsen,et al.  Quantifying aspects in middleware platforms , 2003, AOSD '03.

[46]  Arie van Deursen,et al.  A classification of crosscutting concerns , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[47]  Thomas Zimmermann,et al.  Mining Aspects from Version History , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[48]  William G. Griswold,et al.  Dynamically discovering likely program invariants to support program evolution , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[49]  Arie van Deursen,et al.  An evaluation of clone detection techniques for crosscutting concerns , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[50]  Martin P. Robillard,et al.  Concern graphs: finding and describing concerns using structural program dependencies , 2002, Proceedings of the 24th International Conference on Software Engineering. ICSE 2002.