[Paper Review] Connecting Software Metrics across Versions to Predict Defects
This paper proposes a novel defect prediction approach using Historical Version Sequence of Metrics (HVSM), which captures the temporal evolution of software modules across continuous versions. By leveraging Recurrent Neural Networks (RNN) to model HVSM sequences, the method achieves significantly better effort-aware ranking performance than baseline models across 9 open-source projects.
Accurate software defect prediction could help software practitioners allocate test resources to defect-prone modules effectively and efficiently. In the last decades, much effort has been devoted to build accurate defect prediction models, including developing quality defect predictors and modeling techniques. However, current widely used defect predictors such as code metrics and process metrics could not well describe how software modules change over the project evolution, which we believe is important for defect prediction. In order to deal with this problem, in this paper, we propose to use the Historical Version Sequence of Metrics (HVSM) in continuous software versions as defect predictors. Furthermore, we leverage Recurrent Neural Network (RNN), a popular modeling technique, to take HVSM as the input to build software prediction models. The experimental results show that, in most cases, the proposed HVSM-based RNN model has a significantly better effort-aware ranking effectiveness than the commonly used baseline models.
Motivation & Objective
- To address the limitation of existing defect predictors—code metrics and process metrics—in capturing the temporal evolution of software modules over project versions.
- To propose a new defect predictor, Historical Version Sequence of Metrics (HVSM), that integrates static and change metrics across multiple continuous versions of a file.
- To improve defect prediction performance by modeling the sequential nature of software evolution using Recurrent Neural Networks (RNN).
- To evaluate the proposed HVSM-RNN model in within-project defect prediction (WPDP) scenarios with a focus on cost-effectiveness and ranking effectiveness.
- To demonstrate statistically significant superiority of the HVSM-RNN model over 7 widely used baseline classifiers in effort-aware defect prediction.
Proposed method
- Construct the historical version sequence of metrics (HVSM) for each file by collecting its code and process metrics across a sequence of continuous software versions.
- Extract HVSMs using both code metrics (e.g., CK and McCabe features) and process metrics (e.g., change frequency, ownership) to represent static and dynamic characteristics over time.
- Apply Recurrent Neural Networks (RNN) to model the sequential input of HVSMs, enabling the handling of variable-length sequences typical in long-lived files.
- Train the RNN model end-to-end using file-level defect labels to predict defect proneness based on historical metric trends.
- Use standard evaluation metrics such as AUC and ACC (with 20% effort threshold) to assess ranking effectiveness in effort-aware scenarios.
- Apply non-parametric statistical tests (Wilcoxon signed-rank test, Cliff’s delta δ, and Scott-Knott test) to validate the statistical significance of performance differences.
Experimental results
Research questions
- RQ1Can the integration of historical metric sequences across multiple software versions improve defect prediction performance compared to static or pairwise change metrics?
- RQ2Does modeling the temporal evolution of software modules using RNN lead to better effort-aware ranking effectiveness in defect prediction?
- RQ3How does the HVSM-RNN model compare to 7 established baseline classifiers (e.g., Naive Bayes, Random Forest, Spectral Clustering) in terms of AUC and ACC in within-project defect prediction?
- RQ4Is the performance gain of the HVSM-RNN model statistically significant when evaluated using non-parametric tests across multiple open-source projects?
- RQ5Can HVSM-based features effectively capture evolving defect-prone patterns that are missed by traditional code or process metrics alone?
Key findings
- The HVSM-RNN model achieved the highest average AUC across all 9 projects, indicating superior discrimination between buggy and clean files.
- In effort-aware evaluation (ACC at 20% effort), the RNN model ranked at the top in the Scott-Knott test, demonstrating statistically significant superiority over baseline models.
- The Win/Tie/Loss analysis using the Wilcoxon signed-rank test and Cliff’s delta δ confirmed that the HVSM-RNN model significantly outperformed most baseline classifiers in terms of ranking effectiveness.
- The proposed method showed distinct advantages in capturing long-term evolution trends of files, which static or pairwise metrics fail to represent.
- The RNN model effectively handled variable-length HVSM inputs, overcoming a key limitation of traditional classifiers that require fixed-length input.
- The results suggest that using code metrics to construct HVSMs yields better performance than relying solely on process metrics in the RNN framework.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.