Revisiting Exception Handling Practices with Exception Flow Analysis

08/02/2017
by   Guilherme B. de Pádua, et al.
0

Modern programming languages, such as Java and C#, typically provide features that handle exceptions. These features separate error-handling code from regular source code and aim to assist in the practice of software comprehension and maintenance. Having acknowledged the advantages of exception handling features, their misuse can still cause reliability degradation or even catastrophic software failures. Prior studies on exception handling aim to understand the practices of exception handling in its different components, such as the origin of the exceptions and the handling code of the exceptions. Yet, the observed findings were scattered and diverse. In this paper, to complement prior research findings on exception handling, we study its features by enriching the knowledge of handling code with a flow analysis of exceptions. Our case study is conducted with over 10K exception handling blocks, and over 77K related exception flows from 16 open-source Java and C# (.NET) libraries and applications. Our case study results show that each try block has up to 12 possible potentially recoverable yet propagated exceptions. More importantly, 22 (average of 1.39 and max of 34). Such results highlight the additional challenge of composing quality exception handling code. To make it worse, we confirm that there is a lack of documentation of the possible exceptions and their sources. However, such critical information can be identified by exception flow analysis on well- documented API calls (e.g., JRE and .NET documentation). Finally, we observe different strategies in exception handling code between Java and C#. Our findings highlight the opportunities of leveraging automated software analysis to assist in exception handling practices and signify the need of more further in-depth studies on exception handling practice.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 7

05/02/2021

Assessing Exception Handling Testing Practices in Open-Source Libraries

Modern programming languages (e.g., Java and C#) provide features to sep...
07/06/2018

On the Use of Context in Recommending Exception Handling Code Examples

Studies show that software developers often either misuse exception hand...
05/14/2018

A Chaos Engineering System for Live Analysis and Falsification of Exception-handling in the JVM

Software systems contain resilience code to handle those failures and un...
08/19/2019

Recommendation of Exception Handling Code in Mobile App Development

In modern programming languages, exception handling is an effective mech...
10/19/2002

User software for the next generation

New generations of neutron scattering sources and instrumentation are pr...
01/25/2019

Unveiling Exception Handling Guidelines Adopted by Java Developers

Despite being an old language feature, Java exception handling code is o...
10/25/2017

Exhaustive Exploration of the Failure-oblivious Computing Search Space

High-availability of software systems requires automated handling of cra...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.