Skip to main content

Towards a Catalogue of Refactorings and Code Smells for AspectJ

  • Conference paper
Transactions on Aspect-Oriented Software Development I

Part of the book series: Lecture Notes in Computer Science ((TAOSD,volume 3880))

Abstract

In this paper, we contribute to the characterisation of a programming style specific to aspect-oriented programming. For this purpose, we present a collection of refactorings for aspect-oriented source code, comprising refactorings to enable extraction to aspects of crosscutting concerns from object-oriented legacy code, the subsequent tidying up of the extracted aspects and factoring out of common code from similar aspects to superaspects. The second group of refactorings is documented in detail. In addition, we propose some new aspect-oriented code smells, including one smell that is specific to aspect modules. We also propose a reinterpretation of some of the traditional object-oriented code smells in the light of aspect-orientation, to detect the presence of crosscutting concerns.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Beck, K.: Extreme programming explained: Embrace change. Addison-Wesley, Reading (2000)

    Google Scholar 

  2. Bracha, G., Cook, W.: Mixin-based inheritance. In: ECOOP/OOPSLA1990: Proceedings of Conference on Object-Oriented Programming: Systems, Languages, and Applications and European Conference on Object-Oriented Programming, pp. 303–311. ACM Press, New York (1990)

    Chapter  Google Scholar 

  3. Cole, L., Borba, P.: Deriving refactorings for AspectJ. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 123–134. ACM Press, New York (2005)

    Google Scholar 

  4. Colyer, A., Clement, A.: Large-scale AOSD for middleware. In: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development (AOSD 2004), pp. 56–65. ACM Press, New York (2004)

    Chapter  Google Scholar 

  5. Cooper, J.: Java design patterns: A tutorial. Addison-Wesley, Reading (2000), Also available at: http://www.patterndepot.com/put/8/DesignJava.PDF

    Google Scholar 

  6. qDeursen, A., Marin, M., Moonen, L.: Aspect mining and Refactoring. In: REFACE 2003 Workshop on REFactoring: Achievements, Challenges, Effects(November 2003), Waterloo, Canada (2003)

    Google Scholar 

  7. Dijkstra, E.: Go-to statement considered harmful. Communications of the ACM 11(3), 147–148 (1968)

    Article  Google Scholar 

  8. Eckel, B.: Thinking in Patterns, revision 0.9. book in progress (2003), Available at: www.pythoncriticalmass.com/downloads/TIPatterns-0.9.zip

  9. Filman, R.E., Friedman, D.P.: Aspect-oriented programming is quantification and obliviousness. In: Workshop on Advanced Separation of Concerns at OOPSLA 2000, Minneapolis (2000)

    Google Scholar 

  10. Fowler, M., et al.: Refactoring – Improving the Design of Existing Code. Addison-Wesley, Reading (2000)

    MATH  Google Scholar 

  11. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns. In: Elements of Reusable Object-Oriented Software, Addison-Wesley, Reading (1995)

    Google Scholar 

  12. Garcia, A., Sant’Anna, C., Figueiredo, E., Kulesza, U., Lucena, C., Staa, A.: Modularizing design patterns with aspects: A quantitative study. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 3–14. ACM Press, New York (2005)

    Google Scholar 

  13. Griswold, W.G.: Program restructuring as an aid to software maintenance. PhD Thesis, University of Washington, USA (1991)

    Google Scholar 

  14. Griswold W.G., Sullivan K.J., Song Y., Cai Y., Shonle M., Tewari N., Rajan H.: Modular software design with crosscutting interfaces. IEEE Software, Special Issue on Aspect-Oriented Programming (2006)

    Google Scholar 

  15. Hanenberg, S., Oberschulte, C., Unland, R.: Refactoring of Aspect-Oriented Software, Net.Objectdays (2003), Erfurt, Germany (2003)

    Google Scholar 

  16. Hannemann, J., Kiczales, G.: Design pattern implementation in Java and AspectJ. In: OOPSLA 2002: Proceedings of the 17th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pp. 161–173. ACM, New York (2002)

    Chapter  Google Scholar 

  17. Hannemann, J., Murphy, G., Kiczales, G.: Role-based refactoring of crosscutting concerns. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development, pp. 135–146. ACM, New York (2005)

    Google Scholar 

  18. Iwamoto, M., Zhao, J.: Refactoring aspect-oriented programs. In: 4th AOSD Modelling With UML Workshop at UML 2003, San Francisco, USA (2003)

    Google Scholar 

  19. Jacobson, I., Christerson, M., Jonsson, P., Övergaard, G.: Object-oriented software engineering: A use case driven approach. Addison-Wesley, Reading (1992)

    MATH  Google Scholar 

  20. Kang, K.C., Cohen, S.G., Hess, J.A., Novak, W.E., Peterson, A.: Feature-oriented Domain Analysis Feasibility Study, SEI, Technical Report CMU/SEI-90-TR-21 (1990)

    Google Scholar 

  21. Kerievsky, J.: Refactoring to patterns. Addison-Wesley, Reading (2004)

    Book  Google Scholar 

  22. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  23. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  24. Koppen, C., Störzer, M.: PCDiff: Attacking the fragile pointcut problem. In: EIWAS 2004: Interactive Workshop on Aspects in Software, Berlin, Germany (2004)

    Google Scholar 

  25. Laddad, R.: Aspect-oriented refactoring, parts 1 and 2. The Server Side (2003), http://www.theserverside.com/

  26. Laddad, R.: AspectJ in Action – Practical Aspect-Oriented Programming, Manning, Greenwich, CT, USA (2003)

    Google Scholar 

  27. Monteiro, M.P.: Refactorings to Evolve Object-Oriented Systems with Aspect-Oriented Concepts. Ph.D. Thesis, Universidade do Minho, Portugal (2005)

    Google Scholar 

  28. Monteiro, M.P., Fernandes, J.M.: Object-to-aspect refactorings for feature extraction. In: AOSD 2004: Industry Track Paper at the 3rd International Conference on Aspect-Oriented Software Development,, Lancaster, UK (2004)

    Google Scholar 

  29. Monteiro, M.P., Fernandes, J.M.: Refactoring a java code base to AspectJ – An illustrative example. In: ICSM 2005: Proceedings of the IEEE International Conference on Software Maintenance 2005, Budapest, Hungary (2005)

    Google Scholar 

  30. Monteiro, M.P., Fernandes, J.M.: Towards a catalogue of aspect-oriented refactorings. In: AOSD 2005: Proceedings of the 4th International Conference on Aspect-Oriented Software Development,, pp. 111–122. ACM Press, New York (2005)

    Google Scholar 

  31. Opdyke, W.F.: Refactoring object-oriented frameworks. Ph.D. Thesis, University of Illinois at Urbana-Champaign, USA (1992)

    Google Scholar 

  32. Orleans, D.: Separating behavioral concerns with predicate dispatch, or, if statement considered harmful. In: Workshop on Advanced Separation of Concerns in Object-Oriented Systems at OOPSLA 2001, Tampa Bay, USA (2001)

    Google Scholar 

  33. Sabbah, D.: Aspects – From promise to reality. In: AOSD 2004: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pp. 1–2. ACM Press, New York (2004)

    Google Scholar 

  34. Sullivan, K.J., Griswold, W.G., Song, Y., Cai, Y., Shonle, M., Tewari, N., Rajan, H.: Information hiding interfaces for aspect-oriented design. In: ESEC/FSE 2005 Proceedings of the Joint 10th European Software Engineering Conference and 13th ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 166–175. ACM Press, New York (2005)

    Google Scholar 

  35. Tonella, P., Ceccato, M.: Migrating interface implementation to aspects. In: ICSM 2004 Proceedings of 20th IEEE International Conference on Software Maintenance, Chicago, USA, pp. 220–229. IEEE Computer Society, Los Alamitos (2004)

    Chapter  Google Scholar 

  36. Tourwé, T., Brichau, J., Gybels, K.: On the existence of the AOSD-Evolution paradox. In: Workshop on Software-Engineering Properties of Languages for Aspect Technologies at AOSD 2003, Boston, USA (2003)

    Google Scholar 

  37. Wake, W.: Refactoring workbook. Addison-Wesley, Reading (2004)

    Google Scholar 

  38. Zhang, C., Jacobsen, H.-A.: Quantifying aspects in middleware platforms. In: AOSD 2003: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development, pp. 130–139. ACM, Boston (2003)

    Google Scholar 

  39. Zhao, J.: Towards a Metrics Suite for Aspect-Oriented Software. Technical-Report, SE-2002-136-25, Information Processing Society of Japan (IPSJ) (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Monteiro, M.P., Fernandes, J.M. (2006). Towards a Catalogue of Refactorings and Code Smells for AspectJ. In: Rashid, A., Aksit, M. (eds) Transactions on Aspect-Oriented Software Development I. Lecture Notes in Computer Science, vol 3880. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11687061_7

Download citation

  • DOI: https://doi.org/10.1007/11687061_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-32972-5

  • Online ISBN: 978-3-540-32974-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics