Refactoring of Crosscutting Concerns with Metaphor-Based Heuristics

It has been advocated that Aspect-Oriented Programming (AOP) is an effective technique to improve software maintainability through explicit support for modularising crosscutting concerns. However, in order to take the advantages of AOP, there is a need for supporting the systematic refactoring of crosscutting concerns to aspects. Existing techniques for aspect-oriented refactoring are too fine-grained and do not take the concern structure into consideration. This paper presents two categories towards a metaphor-based classification of crosscutting concerns driven by their manifested shapes through a system's modular structure. The proposed categories provide an intuitive and fundamental terminology for detecting concern-oriented design flaws and identifying refactorings in terms of recurring crosscutting structures. On top of this classification, we define a suite of metaphor-based refactorings to guide the ''aspectisation'' of each concern category. We evaluate our technique by classifying concerns of 23 design patterns and by proposing refactorings to aspectise them according to observations made in previous empirical studies. Based on our experience, we also determine a catalogue of potential additional categories and heuristics for refactoring of crosscutting concerns.

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

[2]  Arie van Deursen,et al.  An approach to aspect refactoring based on crosscutting concern types , 2005, ACM SIGSOFT Softw. Eng. Notes.

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

[4]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[5]  Cláudio Sant'Anna,et al.  On the Maintainability of Aspect-Oriented Software: A Concern-Oriented Measurement Framework , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[6]  Carlos José Pereira de Lucena,et al.  Composing design patterns: a scalability study of aspect-oriented programming , 2006, AOSD.

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

[8]  Stéphane Ducasse,et al.  Distribution Map , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

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

[10]  Jan Hannemann Aspect-Oriented Refactoring : Classification and Challenges , 2006 .

[11]  Cecília M. F. Rubira,et al.  Exceptions and aspects: the devil is in the details , 2006, SIGSOFT '06/FSE-14.

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

[13]  L. Moonen,et al.  An approach to aspect refactoring based on crosscutting concern types , 2005, MACS@ICSE.

[14]  Radu Marinescu,et al.  Detection strategies: metrics-based rules for detecting design flaws , 2004, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[15]  Cecília M. F. Rubira,et al.  Extracting Error Handling to Aspects: A Cookbook , 2007, 2007 IEEE International Conference on Software Maintenance.

[16]  Stéphane Ducasse,et al.  Object-Oriented Metrics in Practice , 2005 .

[17]  G.C. Murphy,et al.  Identifying, Assigning, and Quantifying Crosscutting Concerns , 2007, First International Workshop on Assessment of Contemporary Modularization Techniques (ACoM '07).

[18]  Granville Miller Refactoring with Aspects , 2003, XP.

[19]  João M. Fernandes,et al.  Towards a Catalogue of Refactorings and Code Smells for AspectJ , 2006, LNCS Trans. Aspect Oriented Softw. Dev..

[20]  Zhao Jianjun,et al.  Refactoring Aspect - Oriented Programs , 2004 .

[21]  Gregor Kiczales,et al.  Design pattern implementation in Java and aspectJ , 2002, OOPSLA '02.

[22]  Oscar Nierstrasz,et al.  On the effectiveness of clone detection by string matching , 2006, J. Softw. Maintenance Res. Pract..

[23]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[24]  Carlos José Pereira de Lucena,et al.  Modularizing design patterns with aspects: a quantitative study , 2005, AOSD '05.

[25]  Rachel Harrison,et al.  Evolution in software systems: foundations of the SPE classification scheme: Research Articles , 2006 .

[26]  Cláudio Sant'Anna,et al.  Evolving software product lines with aspects , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.