ABSTRACT
Aspects allow a developer to externally add new functionality to a program. This additional functionality may also throw new exceptions that will flow through the program execution until they are handled. Moreover, aspects can also be used to handle exceptions thrown by base code or even other aspects. Unfortunately, exceptions thrown by aspects --- or exceptions that should be handled by them --- may flow through the program execution in unexpected ways leading to failures such as uncaught exceptions or exceptions being caught by the wrong handlers. In a previous empirical study we investigated the causes of such failures in Aspect-Oriented programs. In this paper we present causes of such failures as a catalogue of bug patterns for exception handling in Aspect-Oriented programs.
- S. Wagner, F. Deissenboeck, M. Aichner, J. Wimmer M. Schwalb. An Evaluation of Two Bug Pattern Tools for Java, 2008 International Conference on Software Testing, Verification, and Validation, 2008, pp. 248--257. Google ScholarDigital Library
- P. Louridas. Static Code Analysis. IEEE Software 23(4), p. 58--61, 2006. Google ScholarDigital Library
- E. Allen. Bug Patterns In Java. APress, 2002. Google ScholarDigital Library
- Y. Nir, E. Farchi, and S. Ur. Concurrent bug patterns and how to test them. In International. Parallel and Distributed Processing Symposium, IPDPS 2003. Google ScholarDigital Library
- FindBugs#8482; - Find Bugs in Java Programs. On site: http://findbugs.sourceforge.net/bugDescriptions.htmlGoogle Scholar
- http://www.eclipse.org/aspectjGoogle Scholar
- http://www.jboss.org/jbossaop/Google Scholar
- http://www.springframework.org/Google Scholar
- A. Colyer, A. Clement, "Large-Scale AOSD for Middleware", Proc. AOSD Conf., 2004, ACM, pp. 56--65. Google ScholarDigital Library
- Glassbox Inspector. https://glassbox-inspector.dev.java.net/Google Scholar
- G. Kiczales; J. Lamping; A. Mendhekar; C. Maeda; C. Lopes; J. Loingtier; J. Irwin. Aspect-Oriented Programming. In: Proceedings of the European Conference of Object-Oriented Programming (ECOOP'97), Springer-Verlag, 1997, p. 220--242.Google Scholar
- S. Zhang; J. Zhao. On Identifying Bug Patterns in Aspect-Oriented Programs. In: Proceedings of the Computer Software and Applications Conference (COMPSAC 2007), 2007, p. 431--438. Google ScholarDigital Library
- R. Coelho, A. Rashid, A. Garcia, F. Ferrari, N. Cacho, U. Kulesza, A. von Staa, C. Lucena, Assessing the Impact of Aspects on Exception Flows: An Exploratory Study, ECOOP 2008. Google ScholarDigital Library
- M. Mezini; K. Ostermann. Conquering Aspects with Caesar. In: Proceedings of the Proceedings of the 2nd International Conference on Aspect-oriented Software Development, Boston, Massachusetts, ACM Press, 2003, p. 90--99 Google ScholarDigital Library
- S. Soares; P. Borba; E. Laureano: Distribution and Persistence as Aspects. In: Software: Practice and Experience, Wiley, vol. 36 (7), (2006) 711--759. Google ScholarDigital Library
- F. Buschmann; R. Meunier; H. Rohnert; P. Sommerlad; M. Stal. Pattern-Oriented Software Architecture, Volume 1: A System of Patterns. Wiley, 1996. Google ScholarDigital Library
- T. Massoni; V. Alves; S. Soares; P. Borba. PDC: Persistent Data Collections pattern. In: Proceedings of the In First Latin American Conference on Pattern Languages of Programming --- SugarLoafPLoP, University of Sao Paulo Magazine - ICMC, 2001, p. 311--326.Google Scholar
- F. Filho, A. Garcia, C. Rubira, The Error Handling Aspect Pattern, SugarLoafPlop 2007.Google Scholar
- A. Garcia; C. Rubira. A Comparative Study of Exception Handling Mechanisms for Building Dependable Object-Oriented Software. Journal of Systems and Software, 59 (6), 2001, p. 197--222 Google ScholarDigital Library
- A. Colyer, et al. Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools. Addison-Wesley, 2004. Google ScholarDigital Library
- J. Goodenough. Exception Handling: Issues and a Proposed Notation. Communications of the ACM, 18(12), p. 683--696, 1975. Google ScholarDigital Library
- R. Miller; A. Tripathi. Issues with Exception Handling in Object-Oriented Systems. In: Proceedings of the European Conference on Object Oriented Programming (ECOOP'97), Springer, 1997, p. 85--103.Google Scholar
- R. Filman, T. Elrad, S. Clarke, M. Aksit, Aspect-Oriented Software Development, Addison-Wesley, 2005. Google ScholarDigital Library
- C. Clifton G. T. Leavens, J. Noble. MAO: Ownership and Effects for More Effective Reasoning about Aspects. In: Proceedings of the European Conference on Object Oriented Programming (ECOOP), Springer, 2007, p. 451--475. Google ScholarDigital Library
Index Terms
- A catalogue of bug patterns for exception handling in aspect-oriented programs
Recommendations
Efficient Java exception handling in just-in-time compilation
Research ArticlesJava uses exceptions to provide elegant error handling capabilities during program execution. However, the presence of exception handlers complicates the job of the just-in-time (JIT) compiler, while exceptions are rarely used in most programs. This ...
Error handling as an aspect
BPAOSD '07: Proceedings of the 2nd workshop on Best practices in applying aspect-oriented software developmentOne of the fundamental motivations for employing exception handling in the development of robust applications is to lexically separate error handling code from the normal code so that they can be independently modified. However, experience has shown ...
On the modularization and reuse of exception handling with aspects
This paper presents an in-depth study of the adequacy of the AspectJ language for modularizing and reusing exception-handling code. The study consisted of refactoring existing applications so that the code responsible for implementing error-handling ...
Comments