Is Exception Handling a Reusable Aspect?

A number of studies have evaluated the impact of modularizing the exception handling concern using aspect-oriented programming (AOP). Even though some of these studies have claimed that reuse through AOP is possible and advantageous in some cases, they have not focused specifically on reuse, often using the overall number of lines of code as a proxy for it. This has produced often contradictory results that are difficult to understand and extrapolate. In this paper we describe a study whose goal is to answer the question in the title of the paper. We have extracted exception handlers from 10 distinct applications to AspectJ aspects and, whenever possible, reused the handlers that were duplicated throughout each application. We have also collected a number of metrics from these systems and analyzed whether there is a relationship between the exception handling strategies that an application employs and the extent to which handlers implementing them are reusable. We discuss some scenarios and complicating factors related to reuse and present solutions that we have found to circumvent these complications. We also analyze limitations of current AspectJ constructs.

[1]  W. Marsden I and J , 2012 .

[2]  Paulo Marques,et al.  Exception Handling: A Field Study in Java and .NET , 2007, ECOOP.

[3]  Cecília M. F. Rubira,et al.  Exceptions and aspects: the devil is in the details , 2006, SIGSOFT '06/FSE-14.

[4]  Eduardo Figueiredo,et al.  EJFlow: taming exceptional control flows in aspect-oriented programming , 2008, AOSD.

[5]  Patrick Th. Eugster,et al.  Towards reusable components with aspects , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[6]  Paulo Marques,et al.  A Case for Automatic Exception Handling , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[7]  Fernando Castor Filho,et al.  New exception interfaces for Java-like languages , 2013, SAC '13.

[8]  Carlos José Pereira de Lucena,et al.  Assessing the Impact of Aspects on Exception Flows: An Exploratory Study , 2008, ECOOP.

[9]  Hridesh Rajan,et al.  On exceptions, events and observer chains , 2013, AOSD.

[10]  G.C. Murphy,et al.  Identifying, Assigning, and Quantifying Crosscutting Concerns , 2007, First International Workshop on Assessment of Contemporary Modularization Techniques (ACoM '07).

[11]  Sérgio Soares,et al.  Assessing Intra-application Exception Handling Reuse with Aspects , 2009, 2009 XXIII Brazilian Symposium on Software Engineering.

[12]  Uirá Kulesza,et al.  In-depth characterization of exception flows in software product lines: an empirical study , 2013, Journal of Software Engineering Research and Development.

[13]  Francisco Dantas,et al.  Exception Flows Made Explicit: An Exploratory Study , 2009, 2009 XXIII Brazilian Symposium on Software Engineering.

[14]  Fernando Castor,et al.  On Inter-Application Reuse of Exception Handling Aspects , 2010 .

[15]  Patrick Th. Eugster,et al.  Trading obliviousness for modularity with cooperative aspect-oriented programming , 2013, TSEM.

[16]  Cristina V. Lopes,et al.  A study on exception detection and handling using aspect-oriented programming , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[17]  David Lorge Parnas,et al.  Response to undesired events in software systems , 1976, ICSE '76.

[18]  Brian Randell,et al.  The Evolution of the Recovery Block Concept , 1994 .

[19]  Flaviu Cristian A Recovery Mechanism for Modular Software , 1979, ICSE.

[20]  Elmar Jürgens,et al.  Do code clones matter? , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[21]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[22]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.