首个面向代码仓库级缺陷定位的图神经网络基准,提升修复准确率。
GREPO: A Benchmark for Graph Neural Networks on Repository-Level Bug Localization
- 构建基于图结构的仓库级缺陷定位数据集,支持直接输入GNN
- 涵盖86个Python仓库、47294个修复任务,验证了GNN显著优于传统检索方法
- 适合从事软件工程与图学习交叉研究的开发者使用
仓库级缺陷定位——即识别修复缺陷所需修改的代码位置——是软件工程中的关键挑战。标准大语言模型因上下文窗口限制,难以处理完整代码仓库,常依赖关键词匹配、文本相似性或简单图启发式方法(如广度优先搜索)。图神经网络(GNN)因其能建模全局依赖关系而具有潜力,但其应用受限于缺乏专用基准。为此,我们提出GREPO,首个面向仓库规模缺陷定位的GNN基准。GREPO包含86个Python仓库和47294个修复任务,提供可直接用于GNN处理的图结构数据。对多种GNN架构的评估显示,其性能显著优于现有信息检索基线。本工作凸显了GNN在缺陷定位中的潜力,并确立GREPO作为未来研究的基础资源。代码已开源:https://github.com/qingpingmo/GREPO。
原文摘要 · Abstract (English)
Repository-level bug localization-the task of identifying where code must be modified to fix a bug-is a critical software engineering challenge. Standard Large Language Modles (LLMs) are often unsuitable for this task due to context window limitations that prevent them from processing entire code repositories. As a result, various retrieval methods are commonly used, including keyword matching, text similarity, and simple graph-based heuristics such as Breadth-First Search. Graph Neural Networks (GNNs) offer a promising alternative due to their ability to model complex, repository-wide dependencies; however, their application has been hindered by the lack of a dedicated benchmark. To address this gap, we introduce GREPO, the first GNN benchmark for repository-scale bug localization tasks. GREPO comprises 86 Python repositories and 47294 bug-fixing tasks, providing graph-based data structures ready for direct GNN processing. Our evaluation of various GNN architectures shows outstanding performance compared to established information retrieval baselines. This work highlights the potential of GNNs for bug localization and established GREPO as a foundation resource for future research, The code is available at https://github.com/qingpingmo/GREPO.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。