Tool-Supported Refactoring of Existing Object-Oriented Code into Aspects

Aspect-oriented programming (AOP) provides mechanisms for the separation of crosscutting concerns - functionalities scattered through the system and tangled with the base code. Existing systems are a natural testbed for the AOP approach since they often contain several crosscutting concerns which could not be modularized using traditional programming constructs. This paper presents an automated approach to the problem of migrating systems developed according to the object-oriented programming (OOP) paradigm into aspect-oriented programming (AOP). A simple set of six refactorings has been defined to transform OOP to AOP and has been implemented in the AOP-migrator tool, an Eclipse plug-in. A set of enabling transformations from OOP to OOP complement the initial set of refactorings. The paper presents the results of four case studies, which use the approach to migrate selected crosscutting concerns from medium-sized Java programs (in the range of 10K to 40K lines of code) into equivalent programs in AspectJ. The case study results show the feasibility of the migration and indicate the importance of the enabling transformations as a preprocessing step

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

[2]  Paulo Borba Refactoring and Code Generation Tools for AspectJ , 2002 .

[3]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[4]  João M. Fernandes,et al.  Towards a catalog of aspect-oriented refactorings , 2005, AOSD '05.

[5]  João M. Fernandes,et al.  Refactoring a Java code base to AspectJ: an illustrative example , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[6]  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.

[7]  Andy Kellens,et al.  An Experiment in Using Inductive Logic Programming to Uncover Pointcuts , 2004 .

[8]  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.

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

[10]  Arie van Deursen,et al.  Aspect Mining and Refactoring , 2003 .

[11]  Paulo Borba,et al.  Deriving refactorings for AspectJ , 2005, AOSD '05.

[12]  Mark Harman,et al.  A post-placement side-effect removal algorithm , 2002, International Conference on Software Maintenance, 2002. Proceedings..

[13]  Chris Verhoef,et al.  9210: The Zip Code of Another IT-Soap , 2004, Software Quality Journal.

[14]  Arie van Deursen,et al.  Isolating idiomatic crosscutting concerns , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[15]  Mark Harman,et al.  Testability transformation , 2004, IEEE Transactions on Software Engineering.

[16]  Mariano Ceccato,et al.  A qualitative comparison of three aspect mining techniques , 2005, 13th International Workshop on Program Comprehension (IWPC'05).

[17]  Aniello Cimitile,et al.  Decomposing legacy programs: a first step towards migrating to client-server platforms , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[18]  Marius Marin Refactoring JHOTDRAW’s Undo concern to ASPECTJ , 2005 .

[19]  Adrian M. Colyer,et al.  Aspect-oriented programming with AspectJ , 2005, IBM Syst. J..

[20]  Martin P. Ward Assembler to C migration using the FermaT transformation system , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[21]  Mariano Ceccato,et al.  Refactoring the aspectizable interfaces: an empirical assessment , 2005, IEEE Transactions on Software Engineering.

[22]  Mark Harman,et al.  An Empirical Investigation of the Influence of a Type of Side Effects on Program Comprehension , 2003, IEEE Trans. Software Eng..

[23]  Gregor Kiczales,et al.  Role-based refactoring of crosscutting concerns , 2005, AOSD '05.

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

[25]  Stefan Hanenberg,et al.  Refactoring of Aspect-Oriented Software , 2003 .

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

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

[28]  Andy Kellens,et al.  Inductively Generated Pointcuts to Support Refactoring to Aspects , 2004 .

[29]  Magiel Bruntink,et al.  Predicting class testability using object-oriented metrics , 2004 .

[30]  Ramnivas Laddad Aspect Oriented Refactoring , 2008 .

[31]  Emily Hill,et al.  Design and Evaluation of an Automated Aspect Mining Tool , 2004, Software Engineering Research and Practice.

[32]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

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

[34]  Arie van Deursen,et al.  Identifying objects using cluster and concept analysis , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

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

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