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
research
05/02/2021

Assessing Exception Handling Testing Practices in Open-Source Libraries

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

On the Use of Context in Recommending Exception Handling Code Examples

Studies show that software developers often either misuse exception hand...
research
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...
research
08/19/2019

Recommendation of Exception Handling Code in Mobile App Development

In modern programming languages, exception handling is an effective mech...
research
08/17/2022

When malloc() Never Returns NULL – Reliability as an Illusion

For decades, the guidance given to software engineers has been to check ...
research
10/19/2002

User software for the next generation

New generations of neutron scattering sources and instrumentation are pr...
research
01/24/2023

Bridging Swift Error Handling Model to C++

Error handling is the process of responding to and recovering from error...

Please sign up or login with your details

Forgot password? Click here to reset