Affiliation:
1. Software PErformance, Analysis, and Reliability (SPEAR) lab, Concordia University, Canada
2. Software Engineering and Testing (SET) lab, Indian Institute of Technology Gandhinagar, India
Abstract
Database-backed applications rely on the database access code to interact with the underlying database management systems (DBMSs). Although many prior studies aim at database access issues like SQL anti-patterns or SQL code smells, there is a lack of study of database access bugs during the maintenance of database-backed applications. In this paper, we empirically investigate 423 database access bugs collected from seven large-scale Java open source applications that use relational database management systems (e.g., MySQL or PostgreSQL). We study the characteristics (e.g., occurrence and root causes) of the bugs by manually examining the bug reports and commit histories. We find that the number of reported database and non-database access bugs share a similar trend but their modified files in bug fixing commits are different. Additionally, we generalize categories of the root causes of database access bugs, containing five main categories (SQL queries, Schema, API, Configuration, SQL query result) and 25 unique root causes. We find that the bugs pertaining to SQL queries, Schema, and API cover 84.2% of database access bugs across all studied applications. In particular, SQL queries bug (54%) and API bug (38.7%) are the most frequent issues when using JDBC and Hibernate, respectively. Finally, we provide a discussion on the implications of our findings for developers and researchers.
Publisher
Association for Computing Machinery (ACM)
Reference75 articles.
1. [n. d.]. channable/dbcritic. https://github.com/channable/dbcritic. (Accessed on 03/25/2023).
2. [n. d.]. DB OPTIMIZATION SERVICE - Holistic.dev. https://holistic.dev/. (Accessed on 03/25/2023).
3. 2009. What Java ORM do you prefer and why? https://stackoverflow.com/questions/452385/what-java-orm-do-you-prefer-and-why
4. 2012. JPA or JDBC how are they different? https://stackoverflow.com/questions/11881548/jpa-or-jdbc-how-are-they-different/
5. 2021. Replication Package. https://github.com/SPEAR-SE/empirical-db-issue-data