A Catalog of Object-Relational Mapping Code Smells for Java - Loli, Samuel; Teixeira, Leopoldo; Cartaxo, Bruno (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2020: Anais do XXXIV Simpósio Brasileiro de Engenharia de Software, 2020)
Bad choices during software development might lead to maintenance and performance issues. Code smells are typically used to indicate such problems. A number of smells have been proposed, usually focused on generic code problems. In this work, we focus on the specifics of Object-Relational Mapping (ORM) code in Java. Developers use ORM frameworks to abstract the complexity of accessing a database. However, when poorly used, frameworks can lead to problems that might affect the overall performance of the system. Therefore, we present a catalog of eight smells extracted from the state of research and practice, through a combination of rapid review and grey literature review. For each smell, we also present a suggested solution and rationale. To evaluate the catalog, we conducted a survey with 86 respondents. The majority of the respondents agree both that the code smells are a problem, as well as that the suggested solution is adequate. In conclusion, this work contributes with a systematic way of describing ORM code smells and an initial catalog, which can be useful for researchers and practitioners, positively evaluated by our initial results.