OPSC: Catching the ``Oops'' in JDBC PreparedStatements with Static Code Analysis

We introduce the Optional Prepared Statement Checker (OPSC, "OOP-see"), a novel type checker designed to identify errors in the use of JDBC. OPSC bridges the gap between SQL and Java types by statically verifying that the correct Java types are used when sending input parameters or retrieving results from a database. This allows OPSC to detect type mismatches at compile time, preventing issues that might otherwise surface as runtime errors in production. Unlike the Java compiler, which is limited to checking Java code, OPSC can also uncover issues not detectable by existing tools. Our early prototype successfully checks JDBC code across multiple Java projects from textbooks, identifying type mismatches that other state-of-the-art tools cannot detect.

Publication Details

Journal
Gesellschaft für Informatik (GI)
Published
2025-01-01
DOI
https://doi.org/10.18420/btw2025-64
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

OPSC: Catching the ``Oops'' in JDBC PreparedStatements with Static Code Analysis

Gesellschaft für Informatik (GI)
Logic, programming, and type systems
article

OPSC: Catching the ``Oops'' in JDBC PreparedStatements with Static Code Analysis

article en

Abstract

We introduce the Optional Prepared Statement Checker (OPSC, "OOP-see"), a novel type checker designed to identify errors in the use of JDBC. OPSC bridges the gap between SQL and Java types by statically verifying that the correct Java types are used when sending input parameters or retrieving results from a database. This allows OPSC to detect type mismatches at compile time, preventing issues that might otherwise surface as runtime errors in production. Unlike the Java compiler, which is limited to checking Java code, OPSC can also uncover issues not detectable by existing tools. Our early prototype successfully checks JDBC code across multiple Java projects from textbooks, identifying type mismatches that other state-of-the-art tools cannot detect.

Gesellschaft für Informatik (GI)
Openalex Percentile: Top 78%
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

OPSC: Catching the ``Oops'' in JDBC PreparedStatements with Static Code Analysis · Gesellschaft für Informatik (GI) (2025) | TGRS Research Map | TGRS