Skip to main content

Avoiding Code Pitfalls in Aspect-Oriented Programming

  • Conference paper
Programming Languages (SBLP 2014)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8771))

Included in the following conference series:

Abstract

Aspect-Oriented Programming (AOP) is a maturing technique that requires a good comprehension of which types of mistakes programmers make during the development of applications. Unfortunately, the lack of such knowledge seems to represent one of the reasons for the cautious adoption of AOP in real software development projects. Based on a series of experiments, this paper reports a catalogue of code pitfalls that are likely to lead programmers to make mistakes in AOP. Each experiment required the aspectization (i.e. refactoring) of a crosscutting concern in one object-oriented application. Six rounds of the experiment provided us with the data of 80 aspect-oriented (AO) implementations where three crosscutting concerns were aspectized in three applications. We developed a prototype tool to warn programmers of the code pitfalls during refactoring activities.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.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.

Similar content being viewed by others

References

  1. Results of Avoiding Code Pitfalls in Aspect-Oriented Programming (2014), http://www.dcc.ufmg.br/~figueiredo/aop/mistakes

  2. AJDT: AspectJ Development Tools, http://www.eclipse.org/ajdt/

  3. Alexander, R.T., Bieman, J.M., Andrews, A.A.: Towards the Systematic Testing of Aspect-Oriented Programs. Colorado State University, TR CS-04-105 (2004)

    Google Scholar 

  4. Alves, P., Santos, A., Figueiredo, E., Ferrari, F.: How do Programmers Learn AOP: An Exploratory Study of Recurring Mistakes. In: LA-WASP 2011 (2011)

    Google Scholar 

  5. Baekken, J., Alexander, R.: A Candidate Fault Model for AspectJ Pointcuts. In: International Symposium on Software Reliability Engineering (ISSRE), pp. 169–178 (2006)

    Google Scholar 

  6. Brinkley, D., Ceccato, M., Harman, M., Ricca, F., Tonella, P.: Tool-Supported Refactoring of Existing Object-Oriented Code into Aspects. IEEE Transactions on Software Engineering (TSE) 32(17), 698–717 (2006)

    Article  Google Scholar 

  7. Burrows, R., Taiani, F., Garcia, A., Ferrari, F.C.: Reasoning about Faults in Aspect-Oriented Programs: A Metrics-based Evaluation. In: ICPC, pp. 131–140 (2011)

    Google Scholar 

  8. Castor Filho, F., Cacho, N., Figueiredo, E., Garcia, A., Rubira, C., Amorin, J., Silva, H.: On the Modularization and Reuse of Exception Handling with Aspects. Software: Practice and Experience 39(17), 1377–1417 (2009)

    Google Scholar 

  9. Coelho, R., Rashid, A., Garcia, A., Ferrari, F., Cacho, N., Kulesza, U., von Staa, A., Lucena, C.: Assessing the Impact of Aspects on Exception Flows: An Exploratory Study. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 207–234. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  10. Ferrari, F., Burrows, R., Lemos, O., Garcia, A., Maldonado, J.: Characterising Faults in Aspect-Oriented Programs: Towards Filling the Gap between Theory and Practice. In: Brazilian Symposium on Software Engineering (SBES), pp. 50–59 (2010)

    Google Scholar 

  11. Ferrari, F., Maldonado, J., Rashid, A.: Mutation Testing for Aspect-Oriented Programs. In: International Conference on Software Testing (ICST), pp. 52–61 (2008)

    Google Scholar 

  12. Figueiredo, E., Garcia, A., Maia, M., Ferreira, G., Nunes, C., Whittle, J.: On the Impact of Crosscutting Concern Projection on Code Measurement. In: AOSD, pp. 81–92 (2011)

    Google Scholar 

  13. Figueiredo, E., et al.: Evolving Software Product Lines with Aspects: An Empirical Study on Design Stability. In: Int’l Conference on Software Engineering (ICSE), pp. 261–270 (2008)

    Google Scholar 

  14. Figueiredo, E., et al.: On the Maintainability of Aspect-Oriented Software: A Concern-Oriented Measurement Framework. In: CSMR, pp. 183–192 (2008)

    Google Scholar 

  15. Filman, R.E., Friedman, D.: Aspect-Oriented Programming is Quantification and Obliviousness. Aspect-Oriented Software Development, pp. 21–35. Addison-Wesley (2004)

    Google Scholar 

  16. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999)

    Google Scholar 

  17. IEEE Standard Glossary for Software Engineering Terminology. Standard 610.12, Institute of Electrical and Electronic Engineers, New York, USA (1990)

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  20. Lemos, O., Ferrari, F., Silveira, F., Garcia, A.: Development of Auxiliary Functions: Should You Be Agile? An Empirical Assessment of Pair Programming and Test-First Programming. In: ICSE, pp. 529–539 (2012)

    Google Scholar 

  21. Macia, I., Garcia, A., von Staa, A.: An Exploratory Study of Code Smells in Evolving Aspect-Oriented Systems. In: AOSD, pp. 203–214 (2011)

    Google Scholar 

  22. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall (2000)

    Google Scholar 

  23. Mezini, M., Ostermann, K.: Conquering Aspects with Caesar. In: AOSD (2003)

    Google Scholar 

  24. Monteiro, M.P., Fernandes, J.M.: Towards a Catalogue of Refactorings and Code Smells for AspectJ. In: Rashid, A., Akşit, M. (eds.) Transactions on Aspect-Oriented Software Development I. LNCS, vol. 3880, pp. 214–258. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  25. Nunes, C., Garcia, A., Figueiredo, E., Lucena, C.: Revealing Mistakes in Concern Mapping Tasks: An Experimental Evaluation. In: CSMR, pp. 101–110 (2011)

    Google Scholar 

  26. Piveta, E., Hecht, M., Pimenta, M., Price, R.: Detecting Bad Smells in AspectJ. Journal of Universal Computer Science 12(7), 811–827 (2006)

    Google Scholar 

  27. Rashid, A., et al.: Aspect-Oriented Programming in Practice: Tales from AOSE-Europe. IEEE Computer 43(2), 19–26 (2010)

    Article  Google Scholar 

  28. Robillard, M., Murphy, G.: Representing Concerns in Source Code. ACM Transactions on Software Engineering and Methodology (TOSEM) 16, 1 (2007)

    Article  Google Scholar 

  29. Robillard, M.P., Weigand-Warr, F.: ConcernMapper: Simple View-based Separation of Scattered Concerns. In: OOPSLA Workshops, pp. 65–69 (2005)

    Google Scholar 

  30. Soloway, E., Ehrlich, K.: Empirical Studies of Programming Knowledge. IEEE Transactions on Software Engineering (TSE), 595–609 (1984)

    Google Scholar 

  31. Spohrer, J., Soloway, E.: Novice Mistakes: Are the folk Wisdoms Correct? Communications of the ACM 29(7) (1986)

    Google Scholar 

  32. Munhoz, F., et al.: Inquiring the Usage of Aspect-Oriented Programming: An Empirical Study. In: International Conference on Software Maintenance (ICSM), pp. 137–146 (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Alves, P., Figueiredo, E., Ferrari, F. (2014). Avoiding Code Pitfalls in Aspect-Oriented Programming. In: Quintão Pereira, F.M. (eds) Programming Languages. SBLP 2014. Lecture Notes in Computer Science, vol 8771. Springer, Cham. https://doi.org/10.1007/978-3-319-11863-5_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-11863-5_3

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-11862-8

  • Online ISBN: 978-3-319-11863-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics