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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Results of Avoiding Code Pitfalls in Aspect-Oriented Programming (2014), http://www.dcc.ufmg.br/~figueiredo/aop/mistakes
AJDT: AspectJ Development Tools, http://www.eclipse.org/ajdt/
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)
Alves, P., Santos, A., Figueiredo, E., Ferrari, F.: How do Programmers Learn AOP: An Exploratory Study of Recurring Mistakes. In: LA-WASP 2011 (2011)
Baekken, J., Alexander, R.: A Candidate Fault Model for AspectJ Pointcuts. In: International Symposium on Software Reliability Engineering (ISSRE), pp. 169–178 (2006)
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)
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)
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)
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)
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)
Ferrari, F., Maldonado, J., Rashid, A.: Mutation Testing for Aspect-Oriented Programs. In: International Conference on Software Testing (ICST), pp. 52–61 (2008)
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)
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)
Figueiredo, E., et al.: On the Maintainability of Aspect-Oriented Software: A Concern-Oriented Measurement Framework. In: CSMR, pp. 183–192 (2008)
Filman, R.E., Friedman, D.: Aspect-Oriented Programming is Quantification and Obliviousness. Aspect-Oriented Software Development, pp. 21–35. Addison-Wesley (2004)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley (1999)
IEEE Standard Glossary for Software Engineering Terminology. Standard 610.12, Institute of Electrical and Electronic Engineers, New York, USA (1990)
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)
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)
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)
Macia, I., Garcia, A., von Staa, A.: An Exploratory Study of Code Smells in Evolving Aspect-Oriented Systems. In: AOSD, pp. 203–214 (2011)
Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall (2000)
Mezini, M., Ostermann, K.: Conquering Aspects with Caesar. In: AOSD (2003)
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)
Nunes, C., Garcia, A., Figueiredo, E., Lucena, C.: Revealing Mistakes in Concern Mapping Tasks: An Experimental Evaluation. In: CSMR, pp. 101–110 (2011)
Piveta, E., Hecht, M., Pimenta, M., Price, R.: Detecting Bad Smells in AspectJ. Journal of Universal Computer Science 12(7), 811–827 (2006)
Rashid, A., et al.: Aspect-Oriented Programming in Practice: Tales from AOSE-Europe. IEEE Computer 43(2), 19–26 (2010)
Robillard, M., Murphy, G.: Representing Concerns in Source Code. ACM Transactions on Software Engineering and Methodology (TOSEM) 16, 1 (2007)
Robillard, M.P., Weigand-Warr, F.: ConcernMapper: Simple View-based Separation of Scattered Concerns. In: OOPSLA Workshops, pp. 65–69 (2005)
Soloway, E., Ehrlich, K.: Empirical Studies of Programming Knowledge. IEEE Transactions on Software Engineering (TSE), 595–609 (1984)
Spohrer, J., Soloway, E.: Novice Mistakes: Are the folk Wisdoms Correct? Communications of the ACM 29(7) (1986)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)