生产中会破裂吗?Python系统中残余缺陷的度量驱动预测
Will It Break in Production? Metric-Driven Prediction of Residual Defects in Python Systems
AI总结:
本文研究了如何利用现代机器学习和深度学习预测Python系统发布后的残余缺陷,发现基于度量的监督模型在预测召回率上表现优异,且过程指标和代码规模是关键预测因素。
摘要:
Python的动态性质使测试复杂化,并增加了某些缺陷逃过检测的可能性,因此有效的故障预测变得至关重要。我们检查是否可以使用现代ML和DL来预测发布后的故障。使用包含超过4000个标记故障的平衡数据集,结合83个产品、过程、统计和Python特定的度量以及标准化的代码表示,我们进行了跨项目实验。LLMs和无监督模型无法区分残余和非残余故障,而监督的度量驱动模型(随机森林、XGBoost、CatBoost)表现更好,召回率高达0.85-0.9,将假阴性减少了一个数量级。过程指标,特别是年龄、 churn 和开发者活动,加上类和文件大小,始终证明是最具预测性的。值得注意的是,主成分分析显示度量和代码嵌入占据表示空间的不同区域,表明它们捕捉的是互补而非冗余的信息。
英文摘要:
Python's dynamic nature complicates testing and increases the possibility that some defects evade detection, so an effective fault prediction becomes essential. We examine whether post-release faults can be predicted using modern ML and DL. Using a balanced dataset of over 4,000 labeled faults with 83 product, process, statistical, and Python-specific metrics plus normalized code representations, we conduct cross-project experiments. LLMs and unsupervised models fail to distinguish residual from non-residual faults, while supervised metric-based models (RandomForest, XGBoost, CatBoost) perform far better, yielding a 0.85-0.9 recall and cutting false negatives by an order of magnitude. Process metrics, especially age, churn, and developer-activity, alongside class and file size, consistently prove most predictive. Notably, the Principal Component Analysis shows that metrics and code embeddings occupy distinct regions of the representation space, suggesting that they capture complementary rather than redundant information.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。