Advertisement

Automated Software Engineering

, Volume 16, Issue 2, pp 323–356 | Cite as

An integrated crosscutting concern migration strategy and its semi-automated application to JHotDraw

  • Marius MarinEmail author
  • Arie van Deursen
  • Leon Moonen
  • Robin van der Rijst
Open Access
Article

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.

Keywords

Program analysis Code refactoring Cross cutting concerns Concern modeling Aspect-oriented programming Reverse engineering Software engineering 

References

  1. 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) CrossRefGoogle Scholar
  2. 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) CrossRefGoogle Scholar
  3. 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) CrossRefGoogle Scholar
  4. 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) Google Scholar
  5. 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) CrossRefGoogle Scholar
  6. 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) CrossRefGoogle Scholar
  7. 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) CrossRefGoogle Scholar
  8. Filman, R.E., Elrad, T., Clarke, S., Akşit, M. (eds.): Aspect-Oriented Software Development. Addison-Wesley, Reading (2005) Google Scholar
  9. 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) Google Scholar
  10. 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) Google Scholar
  11. 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) CrossRefGoogle Scholar
  12. 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) CrossRefGoogle Scholar
  13. 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) CrossRefGoogle Scholar
  14. 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) CrossRefGoogle Scholar
  15. Kellens, A., Mens, K., Tonella, P.: A survey of automated code-level aspect mining techniques. Trans. Asp. Oriented Softw. Dev. 4640, 143–162 (2007) CrossRefGoogle Scholar
  16. Laddad, R.: AspectJ in Action—Practical Aspect Oriented Programming. Manning Publications Co. (2003) Google Scholar
  17. Lesiecki, N.: Aop@work: Enhance design patterns with AspectJ. www-128.ibm.com/developerworks (May 2005)
  18. 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) Google Scholar
  19. 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) CrossRefGoogle Scholar
  20. 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) Google Scholar
  21. Marin, M., van Deursen, A., Moonen, L.: Identifying crosscutting concerns using fan-in analysis. ACM Trans. Softw. Eng. Methodol. 17(1), 1–37 (2007a) CrossRefGoogle Scholar
  22. 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) CrossRefGoogle Scholar
  23. 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) CrossRefGoogle Scholar
  24. 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) Google Scholar
  25. 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) Google Scholar
  26. 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) CrossRefGoogle Scholar
  27. Robillard, M.P., Murphy, G.C.: Representing concerns in source code. ACM Trans. Softw. Eng. Methodol. 16(1), 3 (2007) CrossRefGoogle Scholar
  28. 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) Google Scholar
  29. 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) CrossRefGoogle Scholar
  30. 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) CrossRefGoogle Scholar
  31. 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) Google Scholar
  32. 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) CrossRefGoogle Scholar
  33. 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) Google Scholar
  34. 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 Google Scholar

Copyright information

© The Author(s) 2009

Authors and Affiliations

  • Marius Marin
    • 1
    Email author
  • Arie van Deursen
    • 2
  • Leon Moonen
    • 3
  • Robin van der Rijst
    • 2
  1. 1.Technology ArchitectureAccentureAmsterdamThe Netherlands
  2. 2.Delft University of TechnologyDelftThe Netherlands
  3. 3.Simula Research LaboratoryLysakerNorway

Personalised recommendations