Method-Level Bug Prediction Using Code Commit Information
-
Graphical Abstract
-
Abstract
Software bug prediction is a vital aspect of software quality assurance and has become a key research area in software engineering. However, current prediction technologies face two main challenges: First, coarse-grained bug prediction often fails to meet the practical needs of industry. Second, existing models have limited adaptability to dynamic development processes and rely heavily on static code features and historical data, making it difficult to effectively capture code changes and commit information. To tackle these issues, this paper presents a method-level bug prediction framework that utilizes multi-dimensional commit features to improve prediction accuracy. The primary innovation lies in introducing a novel set of features derived from code commit information, which are combined with traditional code and historical features to create a more comprehensive feature space. This model significantly outperforms existing technologies across 17 open-source projects. SHAP-based feature importance analysis further confirms that the commit features possess strong predictive capabilities while enhancing model interpretability. By identifying key features, the model is streamlined without compromising efficiency or accuracy. Experimental results show that incorporating code commit information increases AUC value by an average of 4.3%, F1 score by 8.4%, and MCC value by 17.7%.
-
-