With the rapid advancement of artificial intelligence, learning based fault localization has emerged as a critical research area in software testing. Existing methods, including traditional statistical and machine learning based approaches, have significantly improved fault localization by representing program features with deep learning models. However, these methods still encounter challenges such as difficulties in processing complex program structures, dependency on high-quality test suites, and limited generalization across diverse software projects. This paper presents Contast, a graph-based fault localization method that integrates abstract syntax trees (ASTs), path-attention mechanisms, and graph neural networks (GNNs) to address these challenges and improve prediction performance. By incorporating AST path-contexts, node coverage information, and bug reports, Contast effectively captures structural, contextual and behavioral features of programs. The synergy between the path-attention model and GNNs enables precise identification and localization of faulty statements within programs, demonstrating its strength in addressing structural complexity. Empirical evaluations show that Contast outperforms state-of-the-art graph-based and learning-based methods in both localization capability and computational cost. Notably, Contast achieves 91.54% accuracy on the \(\texttt{Chart}\) project and even delivers improvements of up to 22.01% on the \(\texttt{Mockito}\) project in terms of recall. Moreover, Contast significantly reduces training times across projects, emphasizing its practical advantages of code and graph processing in large-scale applications. These results highlight Contast as an effective and efficient solution for fault localization in modern software testing.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

CONTAST: Graph Embedding Based Fault Localization Integrating AST and Context-Awareness

  • Haodong He,
  • Tingting Wu,
  • Qi Jin,
  • Zuohua Ding

摘要

With the rapid advancement of artificial intelligence, learning based fault localization has emerged as a critical research area in software testing. Existing methods, including traditional statistical and machine learning based approaches, have significantly improved fault localization by representing program features with deep learning models. However, these methods still encounter challenges such as difficulties in processing complex program structures, dependency on high-quality test suites, and limited generalization across diverse software projects. This paper presents Contast, a graph-based fault localization method that integrates abstract syntax trees (ASTs), path-attention mechanisms, and graph neural networks (GNNs) to address these challenges and improve prediction performance. By incorporating AST path-contexts, node coverage information, and bug reports, Contast effectively captures structural, contextual and behavioral features of programs. The synergy between the path-attention model and GNNs enables precise identification and localization of faulty statements within programs, demonstrating its strength in addressing structural complexity. Empirical evaluations show that Contast outperforms state-of-the-art graph-based and learning-based methods in both localization capability and computational cost. Notably, Contast achieves 91.54% accuracy on the \(\texttt{Chart}\) project and even delivers improvements of up to 22.01% on the \(\texttt{Mockito}\) project in terms of recall. Moreover, Contast significantly reduces training times across projects, emphasizing its practical advantages of code and graph processing in large-scale applications. These results highlight Contast as an effective and efficient solution for fault localization in modern software testing.