LLMLoc: A Structure-Aware Retrieval System for Zero-Shot Bug Localization
Bug localization is a critical task in large-scale software maintenance, as it reduces exploration costs and enhances system reliability. However, existing approaches face limitations due to semantic mismatches between bug reports and source code, insufficient use of structural information, and instability in candidate rankings. To address these challenges, this paper proposes LLMLoc, a system that integrates traditional statistical methods with semantic retrieval, centered on a Structure-Aware Semantic Retrieval (SASR) framework. Experiments on all 835 bugs from the Defects4J dataset show that LLMLoc achieves relative improvements of 3.4 percentage points in Mean Average Precision (MAP) and 29.8 percent in Mean Reciprocal Rank (MRR) compared with state-of-the-art LLM-based methods. These results show that combining structural cues with semantic representations provides more effective retrieval than relying on LLM inference alone. Furthermore, by stabilizing Top-K candidate sets, LLMLoc reduces ranking instability and delivers practical benefits even in real-world maintenance environments with insufficient testing resources.
Authors
- Geunseok Yang (ORCID: https://orcid.org/0000-0001-5677-5129)
- Gi‐Moon Nam (ORCID: https://orcid.org/0000-0001-9775-6549)
Institutions
- Hankyong National University (KR)
Publication Details
- Journal
- Electronics
- Published
- 2025-11-05
- DOI
- https://doi.org/10.3390/electronics14214343
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00