Exception Miner: Multi-language Static Analysis Tool to Identify Exception Handling Anti-Patterns - Souza, Jairo; Alves, Tales; Oliveira, Robson; Teixeira, Leopoldo; Fonseca, Baldoino (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2024: Anais do XXXVIII Simpósio Brasileiro de Engenharia de SoftwareDO - 10.5753/sbes.2024.3573, 2024)
Exception handling is a technique used to manage errors or exceptional events that occur during program execution and disrupt the standard flow of the program. Although this method is beneficial, developers often neglect proper exception handling. Misuse of exception handling mechanisms can lead to exception handling anti-patterns in the source code, negatively impacting software quality. Additionally, many projects nowadays are built using multiple languages, which increases the complexity of identifying these anti-patterns and the workload involved in configuring various linters or detection tools. To address this gap, we developed a tool that identifies exception handling anti-patterns in three popular languages: Java, TypeScript, and Python. To evaluate our tool, we conducted an empirical study on 11 multi-language projects to investigate the occurrence of exception handling patterns across different languages. Our results demonstrated that the occurrence of exception handling anti-patterns is similar between Python and TypeScript. However, in Java, exception handling anti-patterns occur up to four times more frequently in the analyzed projects. The tool is available on GitHub1, along with a video2 demonstrating its use.