Improving IR-based Bug Localization with Semantics-Driven Query Reduction

📅 2025-10-05
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Software fault localization faces significant challenges due to the high heterogeneity and semantic ambiguity of bug reports; existing information retrieval (IR)-based approaches neglect code context and semantics, while large language models (LLMs) exhibit poor task adaptability and prohibitive computational overhead. To address these limitations, we propose IQLoc—a novel query reformulation method that deeply integrates Transformer-based semantic reasoning into a traditional IR framework. IQLoc supports adaptive query simplification and enhancement tailored to diverse report types (e.g., stack-trace-rich or purely natural-language reports). It leverages program semantic analysis for precise query rewriting and introduces Bench4BL+, an enhanced benchmark for bug localization. Extensive experiments demonstrate that IQLoc achieves substantial improvements over state-of-the-art baselines: +60.59% in Mean Average Precision (MAP), +64.58% in Mean Reciprocal Rank (MRR), and up to +100.90% in HIT@K.

Technology Category

Application Category

📝 Abstract
Despite decades of research, software bug localization remains challenging due to heterogeneous content and inherent ambiguities in bug reports. Existing methods such as Information Retrieval (IR)-based approaches often attempt to match source documents to bug reports, overlooking the context and semantics of the source code. On the other hand, Large Language Models (LLM) (e.g., Transformer models) show promising results in understanding both texts and code. However, they have not been yet adapted well to localize software bugs against bug reports. They could be also data or resource-intensive. To bridge this gap, we propose, IQLoc, a novel bug localization approach that capitalizes on the strengths of both IR and LLM-based approaches. In particular, we leverage the program semantics understanding of transformer-based models to reason about the suspiciousness of code and reformulate queries during bug localization using Information Retrieval. To evaluate IQLoc, we refine the Bench4BL benchmark dataset and extend it by incorporating ~30% more recent bug reports, resulting in a benchmark containing ~7.5K bug reports. We evaluated IQLoc using three performance metrics and compare it against four baseline techniques. Experimental results demonstrate its superiority, achieving up to 58.52% and 60.59% in MAP, 61.49% and 64.58% in MRR, and 69.88% and 100.90% in HIT@K for the test bug reports with random and time-wise splits, respectively. Moreover, IQLoc improves MAP by 91.67% for bug reports with stack traces, 72.73% for those that include code elements, and 65.38% for those containing only descriptions in natural language. By integrating program semantic understanding into Information Retrieval, IQLoc mitigates several longstanding challenges of traditional IR-based approaches in bug localization.
Problem

Research questions and friction points this paper is trying to address.

Improving bug localization by combining IR and LLM approaches
Addressing semantic gaps in traditional bug report matching methods
Reducing resource requirements while maintaining localization accuracy
Innovation

Methods, ideas, or system contributions that make the work stand out.

Combines IR and LLM strengths for bug localization
Uses transformer models to understand code semantics
Reformulates queries with program semantics during retrieval
🔎 Similar Papers
No similar papers found.