Page 206 - 《软件学报》2026年第5期
P. 206
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
2026,37(5):2085−2102 [doi: 10.13328/j.cnki.jos.007458] [CSTR: 32375.14.jos.007458] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
*
基于图 Transformer 的变更集错误定位方法
刘 浩 1 , 杜军威 1 , 李玉莹 1 , 房敏营 1 , 贾学海 2
1
(青岛科技大学 数据科学学院, 山东 青岛 266061)
2
(青岛科技大学 信息科学技术学院, 山东 青岛 266061)
通信作者: 杜军威, E-mail: dujunwei@qust.edu.cn; 李玉莹, E-mail: Liyy@qust.edu.cn
摘 要: 错误定位是软件维护过程中的关键环节, 如何提升自动化故障定位的有效性和效率是软件工程领域的研
究焦点之一. 随着开源软件数量激增且软件热更新需求增多, 面向变更集的自动化错误定位成为软件质量保障的
重要手段. 传统基于信息检索的错误定位方法只能表征自身文本信息, 未能充分考虑变更集中的结构和语义变化,
无法直接应用于变更集的错误定位任务. 因此, 提出一种基于图 Transformer 的变更集错误定位方法, 使用基于变
更信息抽象语法树表征代码结构变化信息, 并从局部和全局角度表征变更代码和错误报告的语义信息, 进而实现
变更集中错误信息的匹配和定位. 对来自 6 个错误诱发变更集的错误报告和变更进行测试, 与最先进模型相比,
MAP 和 MRR 指标分别提升 11.4% 和 12.9%, 证明了该方法的有效性.
关键词: 错误定位; 图表示; 错误诱发变更集; 抽象语法树; 错误报告
中图法分类号: TP311
中文引用格式: 刘浩, 杜军威, 李玉莹, 房敏营, 贾学海. 基于图Transformer的变更集错误定位方法. 软件学报, 2026, 37(5): 2085–2102.
http://www.jos.org.cn/1000-9825/7458.htm
英文引用格式: Liu H, Du JW, Li YY, Fang MY, Jia XH. Change Set Bug Localization Method Based on Graph Transformer. Ruan
Jian Xue Bao/Journal of Software, 2026, 37(5): 2085–2102 (in Chinese). http://www.jos.org.cn/1000-9825/7458.htm
Change Set Bug Localization Method Based on Graph Transformer
1
1
1
1
LIU Hao , DU Jun-Wei , LI Yu-Ying , FANG Min-Ying , JIA Xue-Hai 2
1
(College of Data Science, Qingdao University of Science & Technology, Qingdao 266061, China)
2
(College of Information Science and Technology, Qingdao University of Science & Technology, Qingdao 266061, China)
Abstract: Bug localization is a critical aspect of software maintenance, and improving the effectiveness and efficiency of automated fault
localization has become a central research focus in software engineering. With the surge in open-source software and the increasing
demand for software hot updates, automated bug localization focused on change sets has become a key tool for software quality assurance.
Traditional bug localization methods based on information retrieval can only represent textual information and fail to fully account for
structural and semantic changes within change sets, making them unsuitable for direct application in change set bug localization tasks.
Therefore, this study proposes a method for change set bug localization based on graph Transformer, which uses an abstract syntax tree to
represent change information and capture code structure changes. The method represents both local and global semantic information of the
changed code and bug reports, enabling the matching and localization of bug information within change sets. It is tested on bug reports
and changes from six sets of bug-inducing change sets. Compared to the state-of-the-art models, the proposed method demonstrates
improvements of 11.4% and 12.9% in MAP and MRR metrics, respectively, validating the efficacy of the proposed approach.
Key words: bug localization; graph representation; bug-inducing change set; abstract syntax tree (AST); bug report
* 基金项目: 国家自然科学基金 (62202253, 6217072142); 山东省自然科学基金 (ZR2024QF199, ZR2021MF092, ZR2022MF326, ZR2021QF074)
收稿时间: 2024-12-09; 修改时间: 2025-01-27, 2025-03-27; 采用时间: 2025-04-29; jos 在线出版时间: 2025-09-10
CNKI 网络首发时间: 2025-09-11

