Lune

ISSTA2023Top-tier venue

Detecting Condition-Related Bugs with Control Flow Graph Neural Network

Jian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun, Xudong Liu, Chunming Hu, Yang Liu

Abstract

Automated bug detection is essential for high-quality software development and has attracted much attention over the years. Among the various bugs, previous studies show that the condition expressions are quite error-prone and the condition-related bugs are commonly found in practice. Traditional approaches to automated bug detection are usually limited to compilable code and require tedious manual effort. Recent deep learning-based work tends to learn general syntactic features based on Abstract Syntax Tree (AST) or apply the existing Graph Neural Networks over program graphs. However, AST-based neural models may miss important control flow information of source code, and existing Graph Neural Networks for bug detection tend to learn local neighbourhood structure information. Generally, the condition-related bugs are highly influenced by control flow knowledge, therefore we propose a novel CFG-based Graph Neural Network (CFGNN) to automatically detect condition-related bugs, which includes a graph-structured LSTM unit to efficiently learn the control flow knowledge and long-distance context information. We also adopt the API-usage attention mechanism to leverage the API knowledge. To evaluate the proposed approach, we collect real-world bugs in popular GitHub repositories and build a large-scale condition-related bug dataset. The experimental results show that our proposed approach significantly outperforms the state-of-the-art methods for detecting condition-related bugs.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Learning to Locate and Describe Vulnerabilities cites VulCNN: An Image-inspired Scalable Vulnerability Detection System
  • Learning to Locate and Describe Vulnerabilities cites Retrieval-based neural source code summarization
  • Learning to Locate and Describe Vulnerabilities cites Vulnerability detection with fine-grained interpretations
  • Three Heads Are Better Than One: A Multi-perspective Reasoning Framework for Enhanced Vulnerability Detection cites VulCNN: An Image-inspired Scalable Vulnerability Detection System
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Learning to Locate and Describe VulnerabilitiesJian Zhang, Shangqing Liu, Xu Wang, Tianlin Li et al.ASE 2023 · 8 citations
  2. Three Heads Are Better Than One: A Multi-perspective Reasoning Framework for Enhanced Vulnerability DetectionXin Peng, Bo Lin, Jing Wang, Xiaoling Li et al.FSE 2026 · 1 citation
  3. AGNNCert: Defending Graph Neural Networks against Arbitrary Perturbations with Deterministic CertificationJiate Li, Binghui WangUSENIX Security 2025

Builds on7

  1. A Security Analysis of HoneywordsDing Wang, Haibo Cheng, Ping Wang, Jeff Yan et al.NDSS 2018 · 1,102 citations
  2. Generalization and Representational Limits of Graph Neural NetworksVikas K. Garg, Stefanie Jegelka, Tommi S. JaakkolaICML 2020 · 363 citations
  3. Vulnerability detection with fine-grained interpretationsYi Li, Shaohua Wang, Tien N. NguyenFSE 2021 · 283 citations
  4. Retrieval-based neural source code summarizationJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun et al.ICSE 2020 · 242 citations
  5. VulCNN: An Image-inspired Scalable Vulnerability Detection SystemYueming Wu, Deqing Zou, Shihan Dou, Wei Yang et al.ICSE 2022 · 141 citations

Related papers

  1. Control Flow Graph Embedding Based on Multi-Instance Decomposition for Bug LocalizationXuan Huo, Ming Li, Zhi-Hua ZhouAAAI 2020 · 46 citations
  2. Learning semantic program embeddings with graph interval neural networkYu Wang, Ke Wang, Fengjuan Gao, Linzhang WangOOPSLA 2020 · 61 citations
  3. MVD: Memory-Related Vulnerability Detection Based on Flow-Sensitive Graph Neural NetworksSicong Cao, Xiaobing Sun, Lili Bo, Rongxin Wu et al.ICSE 2022 · 100 citations
  4. Path-sensitive code embedding via contrastive learning for software vulnerability detectionXiao Cheng, Guanqin Zhang, Haoyu Wang, Yulei SuiISSTA 2022 · 98 citations
  5. GraphSPD: Graph-Based Security Patch Detection with Enriched Code SemanticsShu Wang, Xinda Wang, Kun Sun, Sushil Jajodia et al.S&P 2023
Dusk over the sea between two cliffs drawn in fine vertical lines