Is Exception Handling a Reusable Aspect?
Resumo
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.
Palavras-chave:
Measurement, Java, Software, Positron emission tomography, Programming, Feature extraction, Computer architecture, aspect-oriented prograaming, exception handling, exception handling reuse
Publicado
28/09/2014
Como Citar
ALMEIDA, Adauto; BARREIROS, Emanoel; SARAIVA, Juliana; CASTOR, Fernando; SOARES, Sérgio.
Is Exception Handling a Reusable Aspect?. In: SIMPÓSIO BRASILEIRO DE COMPONENTES, ARQUITETURAS E REUTILIZAÇÃO DE SOFTWARE (SBCARS), 8. , 2014, Maceió/AL.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2014
.
p. 32-41.