Toward Declarative Auditing of Java Software for Graceful Exception Handling
Despite their language-integrated design, Java exceptions can be difficult to use effectively. Although Java exceptions are syntactically straightforward, negligent practices often result in code logic that is not only inelegant but also unsafe. This paper explores the challenge of auditing Java software to enhance the effectiveness and safety of its exception logic. We revisit common anti-patterns associated with Java exception usage and argue that, for auditing, their detection requires a more nuanced approach than mere identification. Specifically, we investigate whether reporting such anti-patterns can be prioritized for subsequent examination. We prototype our approach as Händel, in which anti-patterns and their priority, or weight, are expressed declaratively using probabilistic logic programming. Evaluation with representative open-source code bases suggests Händel’s promise in detecting, reporting, and ranking the anti-patterns, thus helping streamline Java software auditing to ensure the safety and quality of exception-handling logic.
Authors
- Eli Tilevich (ORCID: https://orcid.org/0000-0003-2415-6926)
- Leo St. Amour
Institutions
- Virginia Tech (US)
Publication Details
- Published
- 2024-09-13
- DOI
- https://doi.org/10.1145/3679007.3685057
- Citations
- 2
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 1.56