计算机科学
控制流程
杠杆(统计)
控制流程图
图形
软件错误
人工智能
机器学习
调用图
人工神经网络
程序理解
知识图
抽象语法树
源代码
数据挖掘
软件
语法
理论计算机科学
软件系统
程序设计语言
作者
Jian Zhang,Xu Wang,Hongyu Zhang,Hailong Sun,Xudong Li,Chunming Hu,Yang Liu
标识
DOI:10.1145/3597926.3598142
摘要
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.
科研通智能强力驱动
Strongly Powered by AbleSci AI