Semantic Drift in Bug Resolution: How Behavioral Signals Propagate from Reports to Tests and Patches
Wendkûuni C. Ouédraogo, Yinghua Li, Xueqi Dang, Paweł Borsukiewicz, Liang Xiao, Lingfeng Bao, Anil Koyuncu, Jacques Klein, David Lo, Tegawendé F. Bissyandé
Abstract
Desc2Fix is a framework for measuring semantic alignment between bug reports, triggering tests, and developer-written fixes. Alignment is operationalized through structured behavioral anchors (e.g., reproduction steps, API/exception cues, expected vs. actual behavior), deterministic similarity metrics (ROUGE, SBERT, CodeBERT, OpenAI embeddings), and LLM-based judgments grounded in coverage, correctness, and specificity. Our analysis covers 2,857 report-test-patch triplets from Defects4J and SWT-Bench using two widely adopted instruction-tuned LLMs from distinct model families. LLMs reliably extract structured signals (up to 90% completeness) and exhibit strong cross-model consistency, yielding a stable semantic input contract for downstream reasoning. However, alignment is highly representation-sensitive: lexical similarity alone is insufficient, full diffs provide the most stable basis for judging report-patch correspondence, and structured summaries trade surface overlap for stronger correspondence at the level of individual actions and entities. Across more than 182,000 LLM-based alignment judgments, both models exhibit systematic optimism relative to humans (1-2 points on 5-point scales) and only modest rank agreement, motivating bias-aware evaluation. Behavioral alignment is measurable but not reducible to similarity, and structured anchors combined with embedding-based proxies provide reproducible signals for ranking and filtering tests and patches. Desc2Fix could support more reliable test generation, fault localization, patch ranking, and bug report authoring.
Create a lesson
Related papers
Generating Property-Based Regression Tests from Source Code Semantics
Shared title terminologycs.SEClemens Bauer, Johann Glock, Martin Pinzger
DiffTestGen: Change-Directed LLM-Based Testing for Exposing Behavioral Differences
Shared title terminologycs.SEHuimin Hu, Cristian Cadar, Michael Pradel
How Much Do Coding Agents Over-Edit, and Why? An Empirical Study of Unneeded Edits in Repository-Level Agent Patches
Shared title terminologycs.SEAakash Goel, Benjamin Steenhoek, Yu Hu
Evaluating More with Less: Black-Box Test Selection for AI Agents
Shared title terminologycs.SEAli Asgari, Mitchell Olsthoorn, Arie van Deursen et al.
SmartLens: Turning AI Agent Changes into Learning, Review, and Risk Signals in the IDE
Shared title terminologycs.SEVahid Etemadi, Gregorio Robles
SimFusion: Multi-Fidelity Simulation-based Testing of Automated Driving Systems
Shared title terminologycs.SELev Sorokin, Berfin Dinler, Alessio Gambi et al.