Project-Aware Validation in Software Defect Prediction: A Controlled Simulation and Real-World Benchmark Study of Evaluation Optimism
Abstract Context. Software defect prediction studies often use pooled random train/test splits even when observations come from heterogeneous projects. Objective. We quantify the resulting evaluation optimism and test whether its direction is observable in real project histories. Method. We combine a controlled simulation, which isolates project-level covariate shift and concept drift under identical data-generating mechanisms, with a secondary analysis of a published real-world benchmark covering 11 open-source projects in just-in-time (JIT) defect prediction. For the real-world analysis, we extract the within-project ROC-AUC values and project-level cross-project ROC-AUC matrix reported by Kamei et al. (2016), then compute a pre-specified gap as within-project AUC minus the median cross-project AUC for each target project. Results. In simulation, pooled random splitting exceeds leave-project-out area under the receiver operating characteristic curve (ROC-AUC) by 0.019 for logistic regression, 0.033 for random forest, and 0.031 for histogram-based gradient boosting. In the real-world benchmark, the gap is positive for all 11 projects, ranges from 0.060 to 0.165, and has mean 0.093 (95% confidence interval 0.073-0.113; Wilcoxon signed-rank p = 0.00049). Conclusions. Both evidence streams support the same methodological warning: validation that mixes observations across project boundaries can produce systematically more optimistic estimates than evaluation on unseen projects. The real-world analysis strengthens external validity but is explicitly a secondary analysis of a published AUC matrix, not a new raw-data re-execution; therefore it does not justify treating the simulated 0.02-0.03 effect as a universal constant.
- Link
- https://doi.org/10.21203/rs.3.rs-10975428/v1
- Found by
- Crossref
- Authors
- Vladimir Tomilov
- Organizations
- Independent Researcher
- Categories
- benchmark, evaluation
- Published
- 2026-09-10
- Last seen by the radar
- 2026-09-12
- Citations
- 0
- Radar score
- 35.50 / 100 (how it is scored)
- Why it scored so
- Matched: benchmark, evaluat; Primary record: Crossref