Unveiling Exception Handling Guidelines Adopted by Java Developers

01/25/2019
by   Hugo Melo, et al.
0

Despite being an old language feature, Java exception handling code is one of the least understood parts of many systems. Several studies have analyzed the characteristics of exception handling code, trying to identify common practices or even link such practices to software bugs. Few works, however, have investigated exception handling issues from the point of view of developers. None of the works have focused on discovering exception handling guidelines adopted by current systems -- which are likely to be a driver of common practices. In this work, we conducted a qualitative study based on semi-structured interviews and a survey whose goal was to investigate the guidelines that are (or should be) followed by developers in their projects. Initially, we conducted semi-structured interviews with seven experienced developers, which were used to inform the design of a survey targeting a broader group of Java developers (i.e., a group of active Java developers from top-starred projects on GitHub). We emailed 863 developers and received 98 valid answers. The study shows that exception handling guidelines usually exist (70 exception handling guidelines related to seven different categories. We also investigated how such guidelines are disseminated to the project team and how compliance between code and guidelines is verified; we could observe that according to more than half of respondents the guidelines are both disseminated and verified through code inspection or code review. Our findings provide software development teams with a means to improve exception handling guidelines based on insights from the state of practice of 87 software projects.

READ FULL TEXT
research
08/18/2023

How Do Java Developers Reuse StackOverflow Answers in Their GitHub Projects?

StackOverflow (SO) is a widely used question-and-answer (Q&A) website fo...
research
07/09/2021

An Empirical Study of Data Constraint Implementations in Java

Software systems are designed according to guidelines and constraints de...
research
03/28/2018

Are There Functionally Similar Code Clones in Practice?

Having similar code fragments, also called clones, in software systems c...
research
11/23/2022

Guidelines for Developing Bots for GitHub

Projects on GitHub rely on the automation provided by software developme...
research
06/21/2022

To What Extent Cognitive-Driven Development Improves Code Readability?

Cognitive-Driven Development (CDD) is a coding design technique that aim...
research
08/24/2023

Understanding Solidity Event Logging Practices in the Wild

Writing logging messages is a well-established conventional programming ...
research
05/04/2022

An Empirical Study on Maintainable Method Size in Java

Code metrics have been widely used to estimate software maintenance effo...

Please sign up or login with your details

Forgot password? Click here to reset