IEEE Access (Jan 2025)

A File-Statement Approach for Bug Localization: Optimizing IRBL and Combination Strategy

  • Zhonghao Guo,
  • Xinyue Xu,
  • Xiangxian Chen,
  • Chenge Geng

DOI
https://doi.org/10.1109/access.2025.3577608
Journal volume & issue
Vol. 13
pp. 104159 – 104172

Abstract

Read online

One of the main objectives of software testing is to locate the position of bugs. Bug localization is generally categorized into statement-level and file-level localization. File-level bug localization is typically performed using information retrieval-based bug localization (IRBL) methods. However, when used alone, file-level bug localization can only identify bugs at the file level and has low accuracy, limiting its practicality. Integrating file-level and statement-level bug localization can produce more precise results. To address these limitations, this study proposes a novel hierarchical bug localization framework that integrates multiple localization techniques across the file and statement levels. First, we present AS_IRBL, an enhanced IRBL method that introduces two innovations: a word-attention component that selectively amplifies the weight of key terms in bug reports, and a complex-word segmentation component that improves semantic matching by decomposing compound identifiers. These enhancements lead to significantly improved file-level localization performance. Second, we introduce C_FF_S, a new cross-level integration strategy that hierarchically combines file-level and statement-level localization results. Unlike prior approaches, C_FF_S uses an activation-based weighting mechanism to adjust statement-level suspicion scores according to file-level confidence, enabling context-aware and more accurate bug localization. Experimental results on the Defects4J benchmark demonstrate the effectiveness of our method: AS_IRBL improves MAP by 30.44% and Einspect@n by 31.89% over baseline IRBL. C_FF_S outperforms existing combination strategies, with MAP, MRR, and Einspect@n increased by 6.08%, 7.31%, and 7.58%, respectively. These results confirm the novelty and practical value of our hierarchical and mechanism-driven approach to multi-level bug localization.

Keywords