Skip to main content

Assessing the Impact of Aspects on Exception Flows: An Exploratory Study

  • Conference paper
ECOOP 2008 – Object-Oriented Programming (ECOOP 2008)

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

Included in the following conference series:

Abstract

Exception handling mechanisms are intended to support the development of robust software. However, the implementation of such mechanisms with aspect-oriented (AO) programming might lead to error-prone scenarios. As aspects extend or replace existing functionality at specific join points in the code execution, aspects’ behavior may bring new exceptions, which can flow through the program execution in unexpected ways. This paper presents a systematic study that assesses the error proneness of AOP mechanisms on exception flows of evolving programs. The analysis was based on the object-oriented and the aspect-oriented versions of three medium-sized systems from different application domains. Our findings show that exception handling code in AO systems is error-prone, since all versions analyzed presented an increase in the number of uncaught exceptions and exceptions caught by the wrong handler. The causes of such problems are characterized and presented as a catalogue of bug patterns.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. Aldrich, J.: Open Modules: Modular Reasoning about Advice. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 144–168. Springer, Heidelberg (2005)

    Google Scholar 

  2. Allen, E.: Bug patterns in Java, 2nd edn. Apress (2002)

    Google Scholar 

  3. Assessing the Impact of Aspects on Exception Flows: An Empirical Study, http://www.inf.puc-rio.br/~roberta/aop_exceptions

  4. Cabral, B., Marques, P.: Exception Handling: A Field Study in Java and.NET. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 151–175. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  5. Cacho, N., Castor Filho, F., Garcia, A., Figueiredo, E.: EJFlow: Taming Exceptional Control Flows in Aspect-Oriented Programming. In: Proc. of AOSD 2008 (2008)

    Google Scholar 

  6. Castor Filho, F., Cacho, N., Figueiredo, E., Maranhão, R., Garcia, A., Rubira, C.: Exceptions and Aspects: The Devil is in the Details. In: 13th ACM SIGSOFT (2006)

    Google Scholar 

  7. Castor Filho, F., Garcia, A., Rubira, C.: Extracting Error Handling to Aspects: A Cookbook. In: ICSM 2007 (2007)

    Google Scholar 

  8. Clifton, C., Leavens, G.T.: Observers and Assistants: A Proposal for Modular Aspect-Oriented Reasoning. In: Workshop on Foundations of Aspect Languages (2002)

    Google Scholar 

  9. Figueiredo, E., et al.: Evolving Software Product Lines with Aspects: An Empirical Study on Design Stability. In: Proc. of ICSE 2008 (2008)

    Google Scholar 

  10. Fu, C., Milanova, A., Ryder, B.G., Wonnacott, D.: Robustness Testing of Java Server Applications. IEEE Trans. Software Engineering 31(4), 292–311 (2005)

    Article  Google Scholar 

  11. Fu, C., Ryder, B.G.: Exception-Chain Analysis: Revealing Exception Handling Architecture in Java Server Applications. In: ICSE 2007, pp. 230–239. ACM Press, New York (2007)

    Google Scholar 

  12. Garcia, A., et al.: A Comparative Study of Exception Handling Mechanisms for Building Dependable Object-Oriented Software. Journal of Systems and Software 59(6), 197–222 (2001)

    Article  Google Scholar 

  13. Garcia, A., Sant’Anna, C., Figueiredo, E., Kulesza, U., Lucena, C.J.P., von Staa, A.: Modularizing Design Patterns with Aspects: A Quantitative Study. In: AOSD 2005, pp. 3–14 (2005)

    Google Scholar 

  14. Greenwood, P., et al.: On the Impact of Aspectual Decompositions on Design Stability: An Empirical Study. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 176–200. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  15. Hannemann, J., Kiczales, G.: Design Pattern Implementation in Java and AspectJ. In: OOPSLA 2002, pp. 161–173. ACM Press, New York (2002)

    Chapter  Google Scholar 

  16. JHotDraw as Open-Source Project (accessed 19/12/2007), http://www.jhotdraw.org/

  17. Jo, J., Chang, B., Yi, K., Choe, K.: An Uncaught Exception Analysis for Java. Journal of Systems and Software 72(1), 59–69 (2004)

    Article  Google Scholar 

  18. Katz, S.: Aspect Categories and Classes of Temporal Properties. In: Rashid, A., Aksit, M. (eds.) Transactions on Aspect-Oriented Software Development I. LNCS, vol. 3880, pp. 106–134. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  19. Krishnamurthi, S., Fisler, K., Greenberg, M.: Verifying Aspect Advice Modularly. In: FSE 2004, pp. 137–146. ACM Press, New York (2004)

    Google Scholar 

  20. Lippert, M., Lopes, C.: A Study on Exception Detection and Handling Using Aspect-Oriented Programming. In: Proc. of ICSE 2000, pp. 418–427. ACM Press, New York (2000)

    Chapter  Google Scholar 

  21. Marin, M., Moonen, L., van Deursen, A.: An Integrated Crosscutting Concern Migration Strategy and its Application to JHotDraw. In: SCAM 2007, pp. 101–110. IEEE Comp. Soc, Los Alamitos (2007)

    Google Scholar 

  22. McCune, T.: Exception Handling Antipatterns (2006) (accessed 19/12/2007), http://today.java.net/pub/a/today/006/04/06/exception-handling-antipatterns.html

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

    Google Scholar 

  24. Miller, R., Tripathi, A.: Issues with Exception Handling in Object-Oriented Systems. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 85–103. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

  25. Molesini, A., Garcia, A., Chavez, C., Batista, T.: On the Quantitative Analysis of Architecture Stability in Aspectual Decompositions. In: WICSA 2008 (2008)

    Google Scholar 

  26. Rashid, A., Chitchyan, R.: Persistence as an Aspect. In: AOSD 2003, pp. 120–129 (2003)

    Google Scholar 

  27. Rinard, M., Salcianu, A., Bugrara, S.: A Classification System and Analysis for Aspect-Oriented Programs. In: FSE 2004, pp. 147–158. ACM Pres, New York (2004)

    Google Scholar 

  28. Robillard, M., Murphy, G.: Static Analysis to Support the Evolution of Exception Structure in Object-Oriented Systems. ACM Trans. Softw. Eng. Methodol. 12(2), 191–221 (2003)

    Article  Google Scholar 

  29. Robillard, M., Murphy., G.: Analyzing Exception Flow in Java Programs. In: Nierstrasz, O., Lemoine, M. (eds.) ESEC 1999 and ESEC-FSE 1999. LNCS, vol. 1687, pp. 322–337. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  30. Robillard, M., Murphy., G.: Designing Robust Java Programs with Exceptions. In: Proc. of FSE 2000, pp. 2–10. ACM Press, New York (2000)

    Google Scholar 

  31. Soares, S., Borba, P., Laureano, E.: Distribution and Persistence as Aspects. Software Practice and Experience 36(7), 711–759 (2006)

    Article  Google Scholar 

  32. The Soot Framework (accessed 19/12/2007) (2007), http://www.sable.mcgill.ca/soot

  33. The AspectJ Project (accessed 19/12/2007) (2007), http://www.eclipse.org/aspectj/

  34. van Dooren, M., Steegmans, E.: Combining the Robustness of Checked Exceptions with the Flexibility of Unchecked Exceptions Using Anchored Exception Declarations. In: Proc. of OOPSLA 2005, pp. 455–471. ACM Press, New York (2005)

    Chapter  Google Scholar 

  35. Filman, R., Elrad, T., Clarke, S., Aksit, M.: Aspect-Oriented Software Development. Addison-Wesley, Reading (2005)

    Google Scholar 

  36. Bruntink, M., Deursen, A., Tourwé, T.: Discovering faults in idiom-based exception handling. In: ICSE 2006, pp. 242–251 (2006)

    Google Scholar 

  37. Alexander, R.T., Bieman, J.M., Andrews, A.A.: Towards the Systematic Testing of Aspect-Oriented Programs. Report CS-04-105, Dept. of Computer Science, Colorado State University, Fort Collins/Colorado - USA (2004)

    Google Scholar 

  38. Ceccato, M., Tonella, P., Ricca, F.: Is AOP Code Easier or Harder to Test than OOP Code? In: Proc. of WTAOP 2005 (2005)

    Google Scholar 

  39. Bækken, J.S.: A Fault Model for Pointcuts and Advice in AspectJ Programs. Master’s thesis, School of Electrical Engineering and Computer Science, Washington State University, Pullman/WA - USA (2006)

    Google Scholar 

  40. Zhang, S., Zhao, J.: On Identifying Bug Patterns in Aspect-Oriented Programs. In: Proc. of COMPSAC 2007, pp. 431–438. IEEE Computer Society, Los Alamitos (2007)

    Google Scholar 

  41. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J., Irwin, J.: Aspect-Oriented Programming. In: ECOOP (1997)

    Google Scholar 

  42. Wohlin, C., Runeson, P., Host, M., Ohlsson, M.C., Regnell, B., Wesslen, A.: Experimentation in Software Engineering - An Introduction. Kluwer Academic Publishers, Dordrecht (2000)

    MATH  Google Scholar 

  43. Ferrari, F.C., Maldonado, J.C., Rashid, A.: Mutation Testing for Aspect-Oriented Programs. In: Proc. of ICST 2008. IEEE Computer Society Press, Los Alamitos (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Vitek

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Coelho, R. et al. (2008). Assessing the Impact of Aspects on Exception Flows: An Exploratory Study. In: Vitek, J. (eds) ECOOP 2008 – Object-Oriented Programming. ECOOP 2008. Lecture Notes in Computer Science, vol 5142. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70592-5_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-70592-5_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-70591-8

  • Online ISBN: 978-3-540-70592-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics