Logo image
Hallucination Inspector: A Fact-Checking Judge for API Migration
Conference presentation   Open access

Hallucination Inspector: A Fact-Checking Judge for API Migration

Marcos David Tileria Palacios, Santanu Kumar Dash, Profir-Petru Partachi and Earl T. Barr
Association for Computing Machinery (ACM)
International Conference on Evaluation and Assessment in Software Engineering (EASE 2026), 2026 (Glasgow, Scotland, UK, 09/06/2026–12/06/2026)
2026

Abstract

software maintenence tools API migration Documentation Hallucination detection
Large Language Models (LLMs) are increasingly deployed in automated software engineering for tasks such as API migration. While LLMs are able to identify migration patterns, they often make mistakes and fail to produce correct glue code to invoke the new API in place of the old one. We call this issue Scaffolding Hallucination, a failure mode where models generate incorrect calling contexts by inventing Phantom Symbols—such as imaginary imports, construc-tors, and constants—that do not exist in the API specification. In this paper, we show that standard metrics cannot be relied upon to detect these instances of hallucination. We propose Hallucination Inspector, a static analysis tool to detect Scaffolding Hallucination in LLM-generated code. Our approach includes a lightweight evaluation framework that verifies symbols extracted from the abstract syntax tree against a knowledge base derived directly from software documentation for the API. A preliminary evaluation on An-droid API migrations demonstrates that our approach successfully identifies hallucinations and significantly reduces false positives compared to standard metrics and probabilistic judges.
pdf
hinspector630.38 kBDownloadView
Open Access CC BY-ND V4.0
url
https://conf.researchr.org/home/ease-2026View
Event Website Conference website

Metrics

1 Record Views

Details

Logo image

Usage Policy