HBSniff: A Static Analysis Tool for Java Hibernate Object-Relational Mapping Code Smell Detection

Zijie Huang,Zhiqing Shao,Guisheng Fan,Huiqun Yu,Kang Yang,Ziyi Zhou
DOI: https://doi.org/10.1016/j.scico.2022.102778
IF: 1.039
2022-01-01
Science of Computer Programming
Abstract:Code smells are symptoms of sub-optimal software design and implementation choices. Detection tools were actively developed for general code smell related to coupling and cohesion issues, but such tools cannot capture domain-specific problems. In this work, we fill the gap in data persistence and query code quality by proposing HBSniff, i.e., a static analysis tool for detecting 14 code smells as well as 4 mapping metrics in Java Hibernate Object-Relational Mapping (ORM) codes. HBSniff is tested, documented, and manually validated. It also generates readable and customizable reports for every project. Moreover, it is beneficial to Mining Software Repository (MSR) research requiring large-scale analysis since project compilation is not needed for detection.
What problem does this paper attempt to address?