On the Evolution of Exception Usage in Java Projects

Osman, Haidar; Chis, Andrei; Schärer, Jakob; Ghafari, Mohammad; Nierstrasz, Oscar Marius (February 2017). On the Evolution of Exception Usage in Java Projects. In: 24th International Conference on Software Analysis, Evolution and Reengineering (SANER) (pp. 422-426). IEEE 10.1109/SANER.2017.7884646

[img] Text
07884646.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (272kB) | Request a copy

Programming languages use exceptions to handle abnormal situations during the execution of a program. While programming languages often provide a set of standard exceptions, developers can further create custom exceptions to capture relevant data about project- and domain-specific errors. We hypothesize that, given their usefulness, custom exceptions are used increasingly as software systems mature. To assess this claim, we empirically analyze the evolution of exceptions and exception-handling code within four, popular and long-lived Java systems. We observe that indeed the amount of error-handling code, together with the number of custom exceptions and their usage in catch handlers and throw statements increase as projects evolve. However, we find that the usage of standard exceptions increases more than the usage of custom exceptions in both catch handlers and throw statements. A preliminary manual analysis of throw statements reveals that developers encode the domain information into the standard Java exceptions as custom string error messages instead of relying on custom exception classes.

Item Type:

Conference or Workshop Item (Paper)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG)

UniBE Contributor:

Osman, Haidar; Schärer, Jakob; Ghafari, Mohammad and Nierstrasz, Oscar Marius

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

Publisher:

IEEE

Submitter:

Oscar Marius Nierstrasz-Margiotta

Date Deposited:

11 Apr 2018 11:38

Last Modified:

11 Apr 2018 11:46

Publisher DOI:

10.1109/SANER.2017.7884646

BORIS DOI:

10.7892/boris.113141

URI:

https://boris.unibe.ch/id/eprint/113141

Actions (login required)

Edit item Edit item
Provide Feedback