{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,14]],"date-time":"2026-03-14T21:03:40Z","timestamp":1773522220098,"version":"3.50.1"},"reference-count":75,"publisher":"Association for Computing Machinery (ACM)","issue":"7","license":[{"start":{"date-parts":[[2024,9,27]],"date-time":"2024-09-27T00:00:00Z","timestamp":1727395200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2024,9,30]]},"abstract":"<jats:p>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 DBMSs (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, and 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.<\/jats:p>","DOI":"10.1145\/3672449","type":"journal-article","created":{"date-parts":[[2024,6,13]],"date-time":"2024-06-13T17:56:59Z","timestamp":1718301419000},"page":"1-25","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["An Empirical Study on the Characteristics of Database Access Bugs in Java Applications"],"prefix":"10.1145","volume":"33","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-8956-730X","authenticated-orcid":false,"given":"Wei","family":"Liu","sequence":"first","affiliation":[{"name":"Software PErformance, Analysis, and Reliability (SPEAR) lab, Concordia University, Montreal, QC, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-0703-8728","authenticated-orcid":false,"given":"Shouvick","family":"Mondal","sequence":"additional","affiliation":[{"name":"Software Engineering and Testing (SET) lab, Indian Institute of Technology Gandhinagar, Palaj, India"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4027-0905","authenticated-orcid":false,"given":"Tse-Hsun (Peter)","family":"Chen","sequence":"additional","affiliation":[{"name":"Software PErformance, Analysis, and Reliability (SPEAR) lab, Concordia University, Montreal, QC, Canada"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,9,27]]},"reference":[{"key":"e_1_3_2_2_2","unstructured":"channable\/dbcritic. 2021. Retrieved March 25 2023 from https:\/\/github.com\/channable\/dbcritic"},{"key":"e_1_3_2_3_2","unstructured":"Holistic.dev. 2021. DB OPTIMIZATION SERVICE Retrieved March 25 2023 from https:\/\/holistic.dev\/"},{"key":"e_1_3_2_4_2","unstructured":"Stackoverflow. 2009. What Java ORM Do You Prefer and Why? Retrieved from https:\/\/stackoverflow.com\/questions\/452385\/what-java-orm-do-you-prefer-and-why"},{"key":"e_1_3_2_5_2","unstructured":"Stackoverflow. 2012. JPA or JDBC How are They Different? Retrieved from https:\/\/stackoverflow.com\/questions\/11881548\/jpa-or-jdbc-how-are-they-different\/"},{"key":"e_1_3_2_6_2","unstructured":"Replication Package. 2021. An Empirical Study on the Characteristics of Database Access Bugs in Java Applications. Retrieved from https:\/\/github.com\/SPEAR-SE\/empirical-db-issue-data"},{"key":"e_1_3_2_7_2","unstructured":"PYPL. 2022. PYPL PopularitY of Programming Language Index. Retrieved December 21 2022 from https:\/\/pypl.github.io\/PYPL.html"},{"key":"e_1_3_2_8_2","unstructured":"ADempiere. 2021. ADempiere Business Suite. Retrieved from https:\/\/github.com\/adempiere\/adempiere"},{"key":"e_1_3_2_9_2","first-page":"272","volume-title":"Proceedings of the ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE \u201916)","author":"Ahadi Alireza","year":"2016","unstructured":"Alireza Ahadi, Julia Prior, Vahid Behbood, and Raymond Lister. 2016. Students\u2019 semantic mistakes in writing seven different types of SQL queries. In Proceedings of the ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE \u201916). ACM, New York, NY, 272\u2013277."},{"key":"e_1_3_2_10_2","doi-asserted-by":"publisher","DOI":"10.1002\/eng2.12441"},{"key":"e_1_3_2_11_2","doi-asserted-by":"publisher","DOI":"10.1145\/3293455"},{"key":"e_1_3_2_12_2","doi-asserted-by":"publisher","DOI":"10.1145\/3391533"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2018.00233"},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","DOI":"10.1109\/QSIC.2004.1357967"},{"key":"e_1_3_2_15_2","unstructured":"BroadleafCommerce. 2021. BroadleafCommerce - Enterprise eCommerce Framework Based on Spring. Retrieved from https:\/\/github.com\/BroadleafCommerce\/BroadleafCommerce"},{"key":"e_1_3_2_16_2","unstructured":"JRebel by Perforce. 2014. Java Tools and Technologies Landscape 2014. Retrieved from https:\/\/www.jrebel.com\/resources\/java-tools-and-technologies-landscape-2014"},{"key":"e_1_3_2_17_2","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3180202"},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1109\/QSIC.2005.27"},{"key":"e_1_3_2_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/2950290.2950303"},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/2889160.2889228"},{"key":"e_1_3_2_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/2568225.2568259"},{"key":"e_1_3_2_22_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2016.2553039"},{"key":"e_1_3_2_23_2","doi-asserted-by":"publisher","DOI":"10.1145\/2901739.2901758"},{"key":"e_1_3_2_24_2","doi-asserted-by":"publisher","DOI":"10.1145\/2499370.2462180"},{"key":"e_1_3_2_25_2","doi-asserted-by":"publisher","DOI":"10.1177\/001316446002000104"},{"key":"e_1_3_2_26_2","series-title":"Cengage Learning","volume-title":"Database Systems: Design, Implementation, & Management","author":"Coronel C.","year":"2018","unstructured":"C. Coronel and S. Morris. 2018. Database Systems: Design, Implementation, & Management (13 ed.). Cengage Learning, Chapter 15."},{"key":"e_1_3_2_27_2","first-page":"3231","article-title":"Schema evolution in wikipedia - toward a web information system benchmark","volume":"1","author":"Curino Carlo","year":"2008","unstructured":"Carlo Curino, Hyun J. Moon, Letizia Tanca, and Carlo Zaniolo. 2008. Schema evolution in wikipedia - toward a web information system benchmark. In ICEIS, Vol. 1. Jos\u00e9 Cordeiro and Joaquim Filipe (Eds.), 3231\u20133332.","journal-title":"ICEIS"},{"key":"e_1_3_2_28_2","volume-title":"Statistics Without Maths for Psychology","author":"Dancey Christine","year":"2007","unstructured":"Christine Dancey. 2007. Statistics Without Maths for Psychology. Pearson\/Prentice Hall, Harlow, England New York."},{"key":"e_1_3_2_29_2","unstructured":"DBeaver. 2021. Free Universal Database Tool and SQL Client. Retrieved from https:\/\/github.com\/dbeaver\/dbeaver"},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","DOI":"10.1145\/3318464.3389754"},{"key":"e_1_3_2_31_2","unstructured":"dotCMS. 2021. Source Code for dotCMS Hybrid Content Management System. Retrieved from https:\/\/github.com\/dotCMS\/core"},{"key":"e_1_3_2_32_2","doi-asserted-by":"publisher","DOI":"10.1145\/1273463.1273484"},{"key":"e_1_3_2_33_2","unstructured":"GitHub. 2022. The Top Programming Languages. Retrieved from https:\/\/octoverse.github.com\/2022\/top-programming-languages Last accessed Nov. 2022."},{"key":"e_1_3_2_34_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICDE.2010.5447862"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2006.27"},{"key":"e_1_3_2_36_2","unstructured":"Hibernate. 2021. Built-in Constraints. Retrieved from https:\/\/docs.jboss.org\/hibernate\/validator\/6.0\/reference\/en-US\/html_single\/#section-builtin-constraints"},{"key":"e_1_3_2_37_2","unstructured":"Hibernate. 2021. HQL and JPQL. Retrieved from https:\/\/docs.jboss.org\/hibernate\/orm\/5.3\/userguide\/html_single\/Hibernate_User_Guide.html#hql"},{"key":"e_1_3_2_38_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380395"},{"key":"e_1_3_2_39_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2010.62"},{"key":"e_1_3_2_40_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICST.2013.47"},{"key":"e_1_3_2_41_2","volume-title":"SQL Antipatterns: Avoiding the Pitfalls of Database Programming","author":"Karwin B.","year":"2010","unstructured":"B. Karwin. 2010. SQL Antipatterns: Avoiding the Pitfalls of Database Programming. Pragmatic Bookshelf."},{"key":"e_1_3_2_42_2","doi-asserted-by":"publisher","DOI":"10.2307\/2529310"},{"key":"e_1_3_2_43_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME.2019.00015"},{"key":"e_1_3_2_44_2","unstructured":"ManageForce. 2016. System Failure - The Cost of Database Downtime. Retrieved from http:\/\/www.manageforce.com\/blog\/dba-suffering-from-system-failure-infographic Last accessed Nov. 2021."},{"key":"e_1_3_2_45_2","doi-asserted-by":"publisher","DOI":"10.1145\/1368088.1368150"},{"key":"e_1_3_2_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/2818639"},{"key":"e_1_3_2_47_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2017.2786286"},{"key":"e_1_3_2_48_2","unstructured":"metasfresh. 2021. We do Open Source ERP - Fast Flexible & Free Software to Scale Your Business. Retrieved from https:\/\/github.com\/metasfresh\/metasfresh"},{"key":"e_1_3_2_49_2","doi-asserted-by":"publisher","DOI":"10.1109\/QRS.2016.38"},{"key":"e_1_3_2_50_2","unstructured":"Microsoft. 2019. getMoreResults Skips resultsets[BUG] #969. Retrieved from https:\/\/github.com\/microsoft\/mssql-jdbc\/issues\/969"},{"key":"e_1_3_2_51_2","doi-asserted-by":"publisher","DOI":"10.1145\/3379597.3387467"},{"key":"e_1_3_2_52_2","unstructured":"MySQL. 2022. MySQL Connectors. Retrieved from https:\/\/www.mysql.com\/products\/connector\/"},{"key":"e_1_3_2_53_2","doi-asserted-by":"publisher","DOI":"10.1145\/3183440.3183496"},{"key":"e_1_3_2_54_2","unstructured":"Openfire. 2021. An XMPP Server Licensed Under the Open Source Apache License. Retrieved from https:\/\/github.com\/igniterealtime\/Openfire"},{"key":"e_1_3_2_55_2","unstructured":"OpenMRS. 2021. OpenMRS API and Web Application Code. Retrieved from https:\/\/github.com\/openmrs\/openmrs-core"},{"key":"e_1_3_2_56_2","unstructured":"Oracle. 2021. Java Software. Retrieved from https:\/\/www.oracle.com\/java\/ Last accessed Nov. 2021."},{"key":"e_1_3_2_57_2","unstructured":"Oracle. 2021. MySQL. Retrieved from https:\/\/www.mysql.com\/"},{"key":"e_1_3_2_58_2","doi-asserted-by":"publisher","DOI":"10.1145\/2491529"},{"key":"e_1_3_2_59_2","unstructured":"PostgreSQL. 2022. Software Catalogue - Drivers and Interfaces. Retrieved from https:\/\/www.postgresql.org\/download\/products\/2-drivers-and-interfaces\/"},{"key":"e_1_3_2_60_2","doi-asserted-by":"publisher","DOI":"10.1145\/2491411.2491431"},{"key":"e_1_3_2_61_2","unstructured":"Redgate. [n. d.]. 119 SQL Code Smells. Retrieved from https:\/\/www.red-gate.com\/library\/119-sql-code-smells"},{"key":"e_1_3_2_62_2","doi-asserted-by":"publisher","DOI":"10.31274\/etd-180810-3283"},{"key":"e_1_3_2_63_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME46990.2020.00016"},{"key":"e_1_3_2_64_2","doi-asserted-by":"publisher","DOI":"10.1145\/3183519.3183529"},{"key":"e_1_3_2_65_2","unstructured":"SlashData. 2022. State of the Developer Nation. Retrieved from https:\/\/slashdata-website-cms.s3.amazonaws.com\/sample_reports\/VZtJWxZw5Q9NDSAQ.pdf"},{"key":"e_1_3_2_66_2","doi-asserted-by":"publisher","DOI":"10.1145\/1029894.1029929"},{"key":"e_1_3_2_67_2","doi-asserted-by":"publisher","DOI":"10.1109\/MUTATION.2006.13"},{"key":"e_1_3_2_68_2","doi-asserted-by":"publisher","DOI":"10.5555\/1857982.1857985"},{"key":"e_1_3_2_69_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.infsof.2006.06.009"},{"key":"e_1_3_2_70_2","doi-asserted-by":"publisher","DOI":"10.1145\/3314221.3314588"},{"key":"e_1_3_2_71_2","doi-asserted-by":"publisher","DOI":"10.1109\/QSIC.2014.26"},{"key":"e_1_3_2_72_2","doi-asserted-by":"publisher","DOI":"10.1145\/3132847.3132954"},{"key":"e_1_3_2_73_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377812.3390798"},{"key":"e_1_3_2_74_2","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3180194"},{"key":"e_1_3_2_75_2","doi-asserted-by":"publisher","DOI":"10.1002\/stvr.462"},{"key":"e_1_3_2_76_2","volume-title":"CRC Standard Probability and Statistics Tables and Formulae","author":"Zwillinger Daniel","year":"2000","unstructured":"Daniel Zwillinger and Stephen Kokoska. 2000. CRC Standard Probability and Statistics Tables and Formulae. Chapman & Hall\/CRC, Boca Raton."}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3672449","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3672449","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T00:58:01Z","timestamp":1750294681000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3672449"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,9,27]]},"references-count":75,"journal-issue":{"issue":"7","published-print":{"date-parts":[[2024,9,30]]}},"alternative-id":["10.1145\/3672449"],"URL":"https:\/\/doi.org\/10.1145\/3672449","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,9,27]]},"assertion":[{"value":"2023-01-20","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-05-22","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-09-27","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}