arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.04468cs.SE
收藏

通过语义驱动的查询缩减改进基于信息检索的Bug定位

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

Dalhousie University(达尔豪斯大学)

Asif Mohammed Samir, Mohammad Masudur Rahman

AI总结:

本文提出IQLoc方法,结合信息检索与大语言模型的优势,通过语义理解优化查询,提升Bug定位的准确性和效率,实验结果表明其在多个评估指标上均优于现有方法。

摘要:

尽管数十年的研究,软件Bug定位仍具挑战性,由于bug报告内容异质性和内在歧义。现有方法如基于信息检索(IR)的方法通常尝试匹配源文档到bug报告,忽视了源代码的上下文和语义。另一方面,大语言模型(LLMs)(如Transformer模型)在理解文本和代码方面表现出色。然而,它们尚未很好地适应使用bug报告进行软件Bug定位,且可能数据或资源消耗大。为弥合这一差距,我们提出IQLoc,一种结合IR和LLMs优势的新方法。特别地,我们利用基于Transformer模型的代码语义理解能力来推断可疑性,并重新表述搜索查询,从而通过信息检索增强Bug定位。为了评估IQLoc,我们优化了Bench4BL基准数据集,并通过加入约30%的最新bug报告扩展它,得到包含约7500个bug报告的基准。我们使用三种性能指标评估IQLoc,并与八种基线技术进行比较。实验结果表明其优越性,达到测试bug报告中随机和时间分割下的MAP最高100.40%和78.08%,MRR最高61.49%和64.58%,HIT@K最高76.98%和100.90%。此外,IQLoc在包含堆栈跟踪的bug报告中将MAP提高118.70%,包含代码元素的提高111.87%,仅包含自然语言描述的提高127.45%。通过将程序语义理解整合到信息检索中,IQLoc缓解了传统IR方法在Bug定位中的多个长期挑战。

英文摘要:

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 (LLMs) (e.g., Transformer models) show promising results in understanding both texts and code. However, they have not yet been adapted well to localize software bugs using bug reports. They could also be data or resource-intensive. To bridge this gap, we propose, IQLoc, a novel approach that capitalizes on the strengths of both IR and LLMs for bug localization. In particular, we leverage the transformer-based model's understanding of code semantics to reason about its suspiciousness and to reformulate search queries and thus enhance 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 eight baseline techniques. Experimental results demonstrate its superiority, achieving up to 100.40% and 78.08% in MAP, 61.49% and 64.58% in MRR, and 76.98% and 100.90% in HIT@K for the test bug reports with random and time-wise splits, respectively. Moreover, IQLoc improves MAP by 118.70% for bug reports with stack traces, 111.87% for those that include code elements, and 127.45% 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑