Illustration and Detection of Exception Handling Bad Smells

Sandhya Tarwani, Anuradha Chug · International Conference on Computing for Sustainable Global Development · 2021

Code smells signal that something is wrong in the source code that requires immediate attention. Over the years, many research studies have been carried out in this field using various tools and techniques. Exception handling is a powerful mechanism for handling run-time errors, which improves the robustness to enhance software's quality. However, exception handling design problem is the least explored research area that requires sincere intervention. It is often ignored by the developers, thereby having a negative impact on the software concerning reliability, maintainability, etc. In order to understand the exception handling design smells, nine different types of smells, namely careless cleanup, dummy handler, empty catch block, exception thrown in finally block, nested try statement, unprotected main, return code, ignored checked exception and catch clause as spare handler in java have been illustrated to provide a clear view of these smells with the help of the proposed design template. This design template will help software practitioners understand exception handling bad smells more efficiently. The suggested refactoring can further be applied to improve the source code and hence software maintainability.

Read the paper · More papers on PaperTik