University of Saskatchewan
Toward a Human-Centric Just-In-Time Runtime Error Prediction
Abstract
dc:description.abstractJust-in-time bug prediction aims to identify potential runtime errors before code is committed, enabling earlier intervention and improving software reliability. While static analysis tools such as SonarQube detect certain issues, many context-sensitive runtime bugs still escape detection until execution. Large language models (LLMs) offer new opportunities to detect such faults directly from source code, yet their systematic application to runtime error prediction at the token level remains underexplored. This thesis presents a three-phase framework for token-level just-in-time runtime error prediction. Phase one, addresses data scarcity by generating a synthetic corpus of buggy–fixed Java method pairs for three prevalent runtime errors, NullPointerException, IllegalStateException, and AssertionError, using zero-shot and few-shot prompting with GPT-4o. Outputs are validated through manual inspection and cross-validation with LLaMA-3 (8B) and Claude-opus-4, supported by static tools (CK, Tree-Sitter), ensuring syntactic correctness and semantic realism. Phase two, fine-tunes transformer models (CodeBERT, CodeT5, CodeGPT) for token classification, aiming to localize potentially buggy patterns statically from source code alone. Augmenting inputs with Abstract Syntax Tree (AST) embeddings and node types improves localization, with CodeBERT achieving the highest F1 scores for NullPointerException cases. Data generated through zero-shot prompting shows stronger generalization to unseen scenarios. Phase three integrates the best-performing model into a Visual Studio Code extension that provides method-level, inline feedback as developers write code. In a user study and comparison with SonarQube, the extension identified subtle, context-specific patterns beyond the reach of rule-based analysis while maintaining low cognitive load through human–computer interaction–informed design. Together, these phases deliver a validated dataset, an empirical evaluation of structure-aware LLMs for token-level runtime bug localization, and a deployable IDE assistant, advancing the state of AI-driven just-in-time bug prediction.
Degree
thesis:*- Name thesis:degree_name
- Master of Science (M.Sc.)
- Level thesis:degree_level
- Masters
- Discipline thesis:degree_discipline
- Computer Science
- Department thesis:degree_department
- Computer Science
- Grantor
- University of Saskatchewan
- Year dc:date.issued
- 2025
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Eslamloo, Parnian
- Advisor dc:contributor.advisor
-
- Roy, Banani
- Committee members dc:contributor.committeemember
-
- Rochan, Mirgank
- Gutwin, Carl
Subjects
dc:subject × 1Rights
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/10388/17342