Software bug prediction aims to automatically identify code modules likely to contain defects, improving quality and reducing testing costs. Traditional methods use static code metrics (complexity, churn) with classical machine learning, but these often ignore inter-module relationships. Recently, deep learning (DL) techniques have shown promise by learning features from code text and structure. In particular, Graph Neural Networks (GNNs) can model software as graphs (e.g. classes/modules as nodes and dependencies as edges) to capture rich semantics. This paper reviews both traditional and DL-based defect prediction approaches, with emphasis on innovative GNN models using static analysis and code dependency graphs. We summarize that DL models (e.g. LSTM, CNN) often outperform conventional ML, and that GNNs leveraging code structure yield further gains in accuracy and F1 score. In existing studies, LSTM-based classifiers achieved ~87% accuracy, and multi-view GNN approaches report 17–45% relative F1 improvement. These results suggest that combining static metrics with code dependency graphs in GNN frameworks can significantly enhance bug prediction.
Article Link: