Capturing the Long-Distance Dependency in the Control Flow Graph via Structural-Guided Attention for Bug Localization
Open accessThe DOI matches its Crossref record; 38 of the 38 references it cites were found in a registry or an index.
Abstract
To alleviate the burden of software maintenance, bug localization, which aims to automatically locate the buggy source files based on the bug report, has drawn significant attention in the software mining community. Recent studies indicate that the program structure in source code carries more semantics reflecting the program behavior, which is beneficial for bug localization. Benefiting from the rich structural information in the Control Flow Graph (CFG), CFG-based bug localization methods have achieved the state-of-the-art performance. Existing CFG-based methods extract the semantic feature from the CFG via the graph neural network. However, the step-wise feature propagation in the graph neural network suffers from the problem of information loss when the propagation distance is long, while the long-distance dependency is rather common in the CFG. In this paper, we argue that the long-distance dependency is crucial for feature extraction from the CFG, and propose a novel bug localization model named sgAttention. In sgAttention, a particularly designed structural-guided attention is employed to globally capture the information in the CFG, where features of irrelevant nodes are masked for each node to facilitate better feature extraction from the CFG. Experimental results on four widely-used open-source software projects indicate that sgAttention averagely improves the state-of-the-art bug localization methods by 32.9\% and 29.2\% and the state-of-the-art pre-trained models by 5.8\% and 4.9\% in terms of MAP and MRR, respectively.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“mainstream methods based on LLMs often overlook code structural knowledge, whose effectiveness has been validated in prior studies [11], [12], [65].”
From Post-Incorporating Code Structural Knowledge Into Pretrained Models via ICL for Code Translation (2025) · cites this paper as [11]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404
Exploiting Generative AI to Scale up Intelligent Tutoring Systems
Jakubův, J., Chvalovský, K., Goertzel, Z., Kaliszyk, C., Olšák, M., Piotrowski, B., Schulz, S., Suda, M., & Urban, J. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.itp.2023.19 · Cited by 76,658
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018) · arXiv · doi:10.48550/arxiv.1810.04805 · Cited by 73,173
Decoupled Weight Decay Regularization
Loshchilov, I., & Hutter, F. (2017) · arXiv · doi:10.48550/arxiv.1711.05101 · Cited by 12,522
CodeBERT: A Pre-Trained Model for Programming and Natural Languages
Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., et al. (2020) · Findings of the Association for Computational Linguistics: EMNLP 2020 · doi:10.18653/v1/2020.findings-emnlp.139 · Cited by 2,824
Populating a Release History Database from version control and bug tracking systems
Fischer, M., Pinzger, M., & Gall, H. (2004) · International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings. · doi:10.1109/icsm.2003.1235403 · Cited by 525
Zhou, J., Zhang, H., & Lo, D. (2012) · 2012 34th International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2012.6227210 · Cited by 507
Do Transformers Really Perform Badly for Graph Representation
Ying, C., Cai, T., Luo, S., Zheng, S., Ke, G., He, D., Shen, Y., & Liu, T. (2021) · neural information processing systems · Cited by 489
Poshyvanyk, D., Gueheneuc, Y.-G., Marcus, A., Antoniol, G., & Rajlich, V. (2007) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2007.1016 · Cited by 469
Improving bug localization using structured information retrieval
Saha, R. K., Lease, M., Khurshid, S., & Perry, D. E. (2013) · 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2013.6693093 · Cited by 390
Research works printed but not linked: 4
- Daya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng, Duyu Tang, Shujie Liu, Long Zhou, Nan Duan, Alexey Svyatkovskiy, Shengyu Fu, Michele Tufano, Shao Kun Deng, Colin B. Clement, Dawn Drain, Neel Sundaresan, Jian Yin, Daxin Jiang, and Ming Zhou. GraphCodeBERT: Pre-training code representations with data flow. In 9th International Conference on Learning Representations, Virtual Event. OpenReview.net, 2021.
- Xuan Huo, Ferdian Thung, Ming Li, David Lo, and Shu-Ting Shi. Deep transfer bug local- ization. IEEE Transactions on Software Engineering, 47(7):1368-1380, 2019.
- Kochhar et al., 2014] Pavneet Singh Kochhar, Yuan Tian, and David Lo. Potential biases in bug localization: Do they matter? In Proceedings of the 29th ACM/IEEE Inter- national Conference on Automated Software Engineering, page 803-814, Vasteras, Sweden, 2014.
- Lam et al., 2015] An N. Lam, Anh T. Nguyen, Hoan A. Nguyen, and Tien N. Nguyen. Combining deep learning with information retrieval to localize buggy files for bug reports (n). In 30th IEEE/ACM International Conference on Automated Software Engineering, Lincoln, NE, USA, pages 476-481, 2015.
Cited by
When Deep Learning Meets Information Retrieval-based Bug Localization: A Survey
Niu, F., Li, C., Liu, K., Xia, X., & Lo, D. (2025) · ACM Computing Surveys · doi:10.1145/3734217 · Cited by 29
“There are different variant of BERT, including basic BERT [29, 43], CodeBERT [24, 88, 185, 191], ALBERT [51] and ColBERT [28].”
InfluentialPre-training Code Representation with Semantic Flow Graph for Effective Bug Localization
Du, Y., & Yu, Z. (2023) · Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3611643.3616338 · Cited by 19
Self-citationHu, X., Niu, F., Chen, J., Zhou, X., Zhang, J., He, J., Xia, X., & Lo, D. (2025) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3786771 · Cited by 15
Beyond Lexical Consistency: Preserving Semantic Consistency for Program Translation
Du, Y., Ma, Y.-F., Xie, Z., & Li, M. (2023) · Proceedings · doi:10.1109/icdm58522.2023.00018 · Cited by 12
Self-citationA Joint Learning Model with Variational Interaction for Multilingual Program Translation
Du, Y., Sun, H., & Li, M. (2024) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3691620.3695553 · Cited by 14
“Feng et al. [11] proposed Code-BERT, which is a Bert-like model pre-trained in an open-source GitHub repository and used in many down-stream tasks, and then much relevant research emerged [9, 12, 26].”
Self-citationPost-Incorporating Code Structural Knowledge Into Pretrained Models via ICL for Code Translation
Du, Y., Sun, H., & Li, M. (2025) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2025.3605768
Self-citationDuaLoc: Dual-Encoder Bug Localization with Bug-Report-Conditioned Attention and Contrastive Learning
Al-batlaa, A., & Abdullah-Al-Wadud, M. (2026) · Electronics · doi:10.3390/electronics15173978
Shen, X., Xi, S.-Z., Du, Y., & Li, M. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2609.26388
“Other work incorporates program structure, including graph, control-flow, and data-flow information [21, 37, 54].”
Self-citation
Metadata
- Authors
- Ma, Y.-F., Du, Y., & Li, M.
- Affiliations
- Nanjing University (CN)
- Venue
- Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence
- Published
- 2023-08
- Pages
- 2242-2250
- OpenAlex
- W4385767751
- Cited by
- 4
- References
- 38
- Citations by year
- 2026: 1 · 2025: 1 · 2024: 1 · 2023: 1
- FWCI
- 1.03
- Type
- conference paper
- Language
- en
- Open access
- bronze
- doi.org
- Locations
- International Joint Conference on Artificial Intelligence (publishedVersion)
- Funders
- National Natural Science Foundation of China (62076121, 61921006)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
- Physical Sciences › Computer Science › Software › Software Reliability and Analysis Research
- Keywords
- bug localization, control flow graph, long-distance dependencies, graph neural networks, bug reports, source code structure, feature propagation
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.