Aspectizing Exception Handling: A Quantitative Study

  • Fernando Castor Filho
  • Cecília Mary F. Rubira
  • Raquel de A. Maranhão Ferreira
  • Alessandro Garcia
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4119)


It is usually assumed that the implementation of exception handling can be better modularized by the use of aspect-oriented programming (AOP). However, the trade-offs involved in using AOP with this goal are not yet well-understood. To the best of our knowledge, no work in the literature has attempted to assess whether AOP really promotes an enhancement in well-understood quality attributes other than separation of concerns, when used for modularizing non-trivial exception handling code. This paper presents a quantitative study of the adequacy of aspects for modularizing exception handling code. The study consisted in refactoring part of a real object-oriented system so that the code responsible for handling exceptions was moved to aspects. We employed a suite of metrics to measure quality attributes of the original and refactored systems, including coupling, cohesion, and conciseness. We found that AOP improved separation of concerns between exception handling code and normal application code. However, contradicting the general intuition, the aspect-oriented version of the system did not present significant gains for any of the four size metrics we employed.


Exception Handling Size Metrics Java Compiler Concern Diffusion Handling Code 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Anderson, T., Lee, P.A.: Fault Tolerance: Principles and Practice, 2nd edn. Springer, Heidelberg (1990)MATHGoogle Scholar
  2. 2.
    Cacho, N., Sant’Anna, C., Figueiredo, E., Garcia, A., Batista, T., Lucena, C.: Composing design patterns: A scalability study of aspect-oriented programming. In: Proceedings of the ACM Conference on Aspect-Oriented Software Development (AOSD 2006), Bonn, Germany (March 2006)Google Scholar
  3. 3.
    Campbell, R.H., Randell, B.: Error recovery in asynchronous systems. IEEE Transactions on Software Engineering SE-12(8), 811–826 (1986)Google Scholar
  4. 4.
    Filho, F.C., de Guerra, P.A.C., Pagano, V.A., Rubira, C.M.F.: A systematic approach for structuring exception handling in robust component-based software. Journal of the Brazilian Computer Society 10(3), 5–19 (2005)Google Scholar
  5. 5.
    Filho, F.C., et al.: Exceptions and aspects: The devil is in the details. Technical Report IC-06-08, State University of Campinas, Brazil (2006)Google Scholar
  6. 6.
    Filho, F.C., Rubira, C.M.F.: Implementing coordinated error recovery for distributed object-oriented systems with AspectJ. Journal of Universal Computer Science 10(7), 843–858 (2004)Google Scholar
  7. 7.
    Chidamber, S., Kemerer, C.: A metrics suite for oo design. IEEE Transactions on Software Engineering 20(6), 476–493 (1994)CrossRefGoogle Scholar
  8. 8.
    Fenton, N., Pfleeger, S.L.: Software Metrics: A Rigorous Practical Approach. PWS (1997)Google Scholar
  9. 9.
    Filman, R., Friedman, D.: Aspect-oriented programming is quantification and obliviousness. In: Proceedings of the Workshop on Advanced Separation of Concerns, OOPSLA 2000 (October 2000)Google Scholar
  10. 10.
    Frader, P., Südolt, M.: An aspect language for robust programming. In: Proceedings of the ECOOP 1999 Workshop on Aspect-Oriented Programming, Lisbon, Portugal (June 1999)Google Scholar
  11. 11.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Software Systems. Addison-Wesley, Reading (1995)Google Scholar
  12. 12.
    Garcia, A., Sant’Anna, C., Chavez, C., Silva, V., Lucena, C., von Staa, A.: Separation of concerns in multi-agent systems: An empirical study. In: Lucena, C., Garcia, A., Romanovsky, A., Castro, J., Alencar, P.S.C. (eds.) SELMAS 2003. LNCS, vol. 2940, pp. 49–72. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Garcia, A., Sant’Anna, C., Figueiredo, E., Kulesza, U., Lucena, C., von Staa, A.: Modularizing design patterns with aspects: A quantitative study. In: Proceedings of the 4th ACM Conference on Aspect-Oriented Software Development, Chicago, IL, USA, pp. 3–14 (March 2005)Google Scholar
  14. 14.
    Godil, I., Jacobsen, H.: Horizontal decomposition of prevlayer. In: Proceedings of CASCON 2005. Richmond Hill, Canada (2005)Google Scholar
  15. 15.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  16. 16.
    Kienzle, J., Guerraoui, R.: Aop: Does it make sense? the case of concurrency and failures. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 37–61. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  17. 17.
    Kulesza, U., Sant’Anna, C., Garcia, A., Lucena, C.: Aspectization of persistence and distribution: Quantifying the effects of aop. In: 5th ACM/IEEE International Symposium on Empirical Software Engineering, Rio de Janeiro, Brazil (2006)Google Scholar
  18. 18.
    Laddad, R.: AspectJ in Action. Manning (2003)Google Scholar
  19. 19.
    Lippert, M., Lopes, C.V.: A study on exception detection and handling using aspect-oriented programming. In: Proceedings of the 22nd International Conference on Software Engineering (ICSE 2000), Limerick, Ireland, pp. 418–427 (June 2000)Google Scholar
  20. 20.
    Monteiro, M.P., Fernandes, J.M.: Towards a catalog of aspect-oriented refactorings. In: Proceedings of AOSD 2005, pp. 111–122 (March 2005)Google Scholar
  21. 21.
    Murphy, G., Walker, R., Baniassad, E., Robillard, M., Kersten, M.: Does aspect-oriented programming work? Communications of the ACM 44(10), 75–77 (2001)CrossRefGoogle Scholar
  22. 22.
    Rajan, H., Sullivan, K.: Eos: Instance-level aspects for integrated system design. In: Proceedings of Joint European Conference on Software Engineering/SIGSOFT Symposium on Foundations of Software Engineering (ESEC/FSE 2003), Helsinki, Finland (September 2003)Google Scholar
  23. 23.
    Sant’Anna, C., Garcia, A., Chavez, C., Lucena, C., von Staa, A.: On the reuse and maintanance of aspect-oriented software: An assessment framework. In: Proceedings of the 17th Brazilian Symposium on Software Engineering, pp. 19–34 (October 2003)Google Scholar
  24. 24.
    Soares, S.: An Aspect-Oriented Implementation Method. PhD thesis, Federal University of Pernambuco, Recife, Brazil (2004)Google Scholar
  25. 25.
    Soares, S., Laureano, E., Borba, P.: Implementing distribution and persistence aspects with aspectj. In: Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2002), Seattle, USA, pp. 174–190 (November 2002)Google Scholar
  26. 26.
    Sullivan, K.J., Griswold, W.G., Song, Y., Cai, Y., Shonle, M., Tewari, N., Rajan, H.: Information hiding interfaces for aspect-oriented design. In: Proceedings of the 10th European Software Engineering Conference held jointly with 13th ACM SIGSOFT International Symposium on Foundations of Software Engineering, Lisbon, Portugal, pp. 166–175 (September 2005)Google Scholar
  27. 27.
    Tigris. aopmetrics home page (2005), Address:
  28. 28.
    Viega, J., Voas, J.M.: Can aspect-oriented programming lead to more reliable software. IEEE Software 17(6), 19–21 (2000)CrossRefGoogle Scholar
  29. 29.
    Zuse, H.: History of software measurement (2005), Address:

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Fernando Castor Filho
    • 1
  • Cecília Mary F. Rubira
    • 1
  • Raquel de A. Maranhão Ferreira
    • 1
  • Alessandro Garcia
    • 2
  1. 1.Institute of ComputingState University of CampinasCampinasBrazil
  2. 2.Computing DepartmentLancaster UniversityLancasterUK

Personalised recommendations