Abstract
In this paper we propose a systematic strategy for migrating crosscutting concerns in existing object-oriented systems to aspect-oriented programming solutions. The proposed strategy consists of four steps: mining, exploration, documentation and refactoring of crosscutting concerns. We discuss in detail a new approach to refactoring to aspect-oriented programming that is fully integrated with our strategy, and apply the whole strategy to an object-oriented system, namely the JHotDraw framework.
Moreover, we present a method to semi-automatically perform the aspect-introducing refactorings based on identified crosscutting concern sorts which is supported by a prototype tool called sair. We perform an exploratory case study in which we apply this tool on the same object-oriented system and compare its results with the results of manual migration in order to assess the feasibility of automated aspect refactoring. Both the refactoring tool sair and the results of the manual migration are made available as open-source, the latter providing the largest aspect-introducing refactoring available to date.
We report on our experiences with conducting both case studies and reflect on the success and challenges of the migration process.
Article PDF
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
References
Binkley, D., Ceccato, M., Harman, M., Ricca, F., Tonella, P.: Tool-supported refactoring of existing object-oriented code into aspects. IEEE Trans. Softw. Eng. 32(9), 698–717 (2006)
Breu, S., Zimmermann, T.: Mining aspects from version history. In: Proceedings of the 21st International Conference on Automated Software Engineering (ASE), pp. 221–230. IEEE Computer Society, New York (2006)
Bruntink, M.: Reengineering idiomatic exception handling in legacy C code. In: Proceedings of the 12th European Conference on Software Maintenance and Reengineering (CSMR’08), pp. 133–142. IEEE Computer Society Press, New York (2008)
Bruntink, M., van Deursen, A., Tourwé, T.: Isolating idiomatic crosscutting concerns. In: Proceedings of the International Conference on Software Maintenance (ICSM’05), pp. 37–46. IEEE Computer Society, New York (2005)
Ceccato, M., Marin, M., Mens, K., Moonen, L., Tonella, P., Tourwé, T.: Applying and combining three different aspect mining techniques. Softw. Qual. J. 14(3), 209–231 (2006)
Cole, L., Borba, P.: Deriving refactorings for AspectJ. In: Proceedings of the 4th International Conference on Aspect-Oriented Software Development (AOSD), pp. 123–134. ACM, New York (2005)
Ettinger, R., Verbaere, M.: Untangling: a slice extraction refactoring. In: Proceedings of the 3rd International Conference on Aspect-oriented Software Development (AOSD), pp. 93–101. ACM Press, New York (2004)
Filman, R.E., Elrad, T., Clarke, S., Akşit, M. (eds.): Aspect-Oriented Software Development. Addison-Wesley, Reading (2005)
Hajiyev, E., Verbaere, M., de Moor, O. (eds.): Codequest: Scalable source code queries with datalog. In: Proceedings of the 20th European Conference on Object-Oriented Programming (ECOOP), pp. 2–27 (2006)
Hanenberg, S., Oberschulte, C., Unland, R.: Refactoring of aspect-oriented software. In: Proceedings of the 4th Annual International Conference on Object-Oriented and Internet-based Technologies, Concepts, and Applications for a Networked World(Net.ObjectDays), pp. 19–35. Springer, New York (2003)
Hannemann, J., Kiczales, G.: Design pattern implementation in Java and AspectJ. In: Proceedings of 17th Conference on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA), pp. 161–173. ACM Press, New York (2002)
Hannemann, J., Murphy, G.C., Kiczales, G.: Role-based refactoring of crosscutting concerns. In: Proceedings of the 4th International Conference on Aspect-Oriented Software Development (AOSD), pp. 135–146. ACM Press, New York (2005)
Harrison, W., Ossher, H., Sutton, S., Tarr, P.: Concern modeling in the concern manipulation environment. In: MACS ’05: Proceedings of the 2005 workshop on Modeling and analysis of concerns in software, pp. 1–5. ACM Press, New York (2005)
Janzen, D., De Volder, K.: Navigating and querying code without getting lost. In: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD), pp. 178–187. ACM Press, New York (2003)
Kellens, A., Mens, K., Tonella, P.: A survey of automated code-level aspect mining techniques. Trans. Asp. Oriented Softw. Dev. 4640, 143–162 (2007)
Laddad, R.: AspectJ in Action—Practical Aspect Oriented Programming. Manning Publications Co. (2003)
Lesiecki, N.: Aop@work: Enhance design patterns with AspectJ. www-128.ibm.com/developerworks (May 2005)
Marin, M.: An integrated system to manage crosscutting concerns in source code. PhD thesis, Faculty of Electrical Engineering, Mathematics, and Computer Science, Delft University of Technology (January 2008)
Marin, M., Moonen, L., van Deursen, A.: A classification of crosscutting concerns. In: Proceedings of the 21st International Conference on Software Maintenance (ICSM), pp. 673–677. IEEE Computer Society, New York (2005)
Marin, M., Moonen, L., van Deursen, A.: A common framework for aspect mining based on crosscutting concern sorts. In: Proceedings of the 13th Working Conference on Reverse Engineering (WCRE), pp. 29–38. IEEE Computer Society, New York (2006)
Marin, M., van Deursen, A., Moonen, L.: Identifying crosscutting concerns using fan-in analysis. ACM Trans. Softw. Eng. Methodol. 17(1), 1–37 (2007a)
Marin, M., Moonen, L., van Deursen, A.: Documenting typical crosscutting concerns. In: Di Penta, M., Maletic, J.I. (eds.) Proceedings 14th Working Conference on Reverse Engineering (WCRE), pp. 31–40. IEEE Computer Society, New York (2007b)
Marin, M., Moonen, L., van Deursen, A.: An integrated crosscutting concern migration strategy and its application to JHotDraw. In: Korel, B., Godfrey, M.W. (eds.) Proceedings of the 7th International Working Conference on Source Code Analysis and Manipulation (SCAM), pp. 101–110. IEEE Computer Society, New York (2007c)
Marin, M., Moonen, L., van Deursen, A.: SoQueT: Query-based documentation of crosscutting concerns. In: Proceedings of the 29th International Conference on Software Engineering (ICSE). IEEE Computer Society, New York (2007d)
Mens, K., Poll, B., González, S.: Using intentional source-code views to aid software maintenance. In: Proceedings of the 19th International Conference on Software Maintenance (ICSM), pp. 169–178. IEEE Computer Society, Washington (2003)
Monteiro, M.P., Fernandes, J.M.: Towards a catalog of aspect-oriented refactorings. In: Proceedings of the 4th International Conference on Aspect-Oriented Software Development (AOSD), pp. 111–122. ACM Press, New York (2005)
Robillard, M.P., Murphy, G.C.: Representing concerns in source code. ACM Trans. Softw. Eng. Methodol. 16(1), 3 (2007)
Robillard, M.P., Murphy, G.C.: Concern graphs: finding and describing concerns using structural program dependencies. In: Proceedings of the 24th International Conference on Software Engineering (ICSE), pp. 406–416. ACM Press, New York (2002)
Shepherd, D., Palm, J., Pollock, L., Chu-Carroll, M.: Timna: a framework for automatically combining aspect mining analyses. In: Proceedings of the 20th International Conference on Automated Software Engineering (ASE), pp. 184–193. ACM Press, New York (2005)
Storzer, M., Forster, F.: Detecting precedence-related advice interference. In: Proceedings of the 21st International Conference on Automated Software Engineering (ASE), pp. 317–322. IEEE Computer Society, New York (2006)
Tarr, P., Harrison, W., Ossher, H.: Pervasive query support in the concern manipulation environment. Technical Report RC23343, IBM TJ Watson Research Center, Yorktown Heights, NY (2004)
Tonella, P., Ceccato, M.: Migrating interface implementation to aspects. In: Proceedings of the 20th International Conference on Software Maintenance (ICSM), pp. 220–229. IEEE Computer Society, New York (2004)
van der Rijst, R.: Sort-based refactoring of crosscutting concerns to aspects. Master’s thesis, Faculty of Electrical Engineering, Mathematics, and Computer Science, Delft University of Technology (2008)
van Deursen, A., Marin, M., Moonen, L.: Aspect mining and refactoring. In: Thavildari, L., Kontogiannis, K. (eds.) Proc. WCRE Workshop on REFactoring: Achievements, Challenges, Effects, Waterloo, Canada, 2003. University of Waterloo
Author information
Authors and Affiliations
Corresponding author
Additional information
M. Marin is a guest at Delft University of Technology.
Rights and permissions
Open Access This is an open access article distributed under the terms of the Creative Commons Attribution Noncommercial License (https://creativecommons.org/licenses/by-nc/2.0), which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.
About this article
Cite this article
Marin, M., van Deursen, A., Moonen, L. et al. An integrated crosscutting concern migration strategy and its semi-automated application to JHotDraw . Autom Softw Eng 16, 323–356 (2009). https://doi.org/10.1007/s10515-009-0051-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10515-009-0051-2