采用偏最小二乘回归与判别分析进行缺陷预测
Employing Partial Least Squares Regression with Discriminant Analysis for Bug Prediction
AI总结:
本文首次将化学计量学方法偏最小二乘判别分析(PLS-DA)引入软件维护领域,利用静态源代码度量预测Java程序缺陷,实验表明该方法在无需重采样时性能优于现有技术,且训练更快、完整性指标最优。
摘要:
预测源代码的缺陷倾向一直是一个主要的研究课题。估计软件系统中最可能包含缺陷的部分,有助于集中测试精力、降低成本并提高产品质量。过去几十年中,人们提出了许多预测模型和方法,试图基于静态源代码度量、变更和历史度量或两者的结合来预测有缺陷的代码元素。然而,这个问题目前仍没有普遍的最佳解决方案,因为最合适的特征和模型因数据集而异,并取决于我们使用它们的上下文。因此,对这一主题进行新颖的方法探索和进一步研究是非常必要的。在本文中,我们采用一种化学计量学方法——偏最小二乘结合判别分析(PLS-DA),利用静态源代码度量来预测Java程序中易出缺陷的类。据我们所知,PLS-DA以前从未在软件维护领域被用作预测软件错误的统计方法。此外,我们使用了严格的统计处理,包括自助法重采样、随机化(置换)检验,以及用于呈现软件工程结果的评估方法。我们表明,在不应用数据重采样的情况下,我们基于PLS-DA的预测模型实现了优于最先进方法的性能(即在90%置信水平下F-measure为0.44-0.47),而在最大的开放缺陷数据集上应用上采样时,其表现与其他方法相当,同时模型训练速度显著更快,从而更容易找到最优参数。在完整性方面(即衡量预测为有缺陷的Java类中所包含的缺陷数量),PLS-DA优于所有其他算法:在不重采样和上采样的情况下,它分别找到了总缺陷的69.3%和79.4%。
英文摘要:
Forecasting defect proneness of source code has long been a major research concern. Having an estimation of those parts of a software system that most likely contain bugs may help focus testing efforts, reduce costs, and improve product quality. Many prediction models and approaches have been introduced during the past decades that try to forecast bugged code elements based on static source code metrics, change and history metrics, or both. However, there is still no universal best solution to this problem, as most suitable features and models vary from dataset to dataset and depend on the context in which we use them. Therefore, novel approaches and further studies on this topic are highly necessary. In this paper, we employ a chemometric approach - Partial Least Squares with Discriminant Analysis (PLS-DA) - for predicting bug prone Classes in Java programs using static source code metrics. To our best knowledge, PLS-DA has never been used before as a statistical approach in the software maintenance domain for predicting software errors. In addition, we have used rigorous statistical treatments including bootstrap resampling and randomization (permutation) test, and evaluation for representing the software engineering results. We show that our PLS-DA based prediction model achieves superior performances compared to the state-of-the-art approaches (i.e. F-measure of 0.44-0.47 at 90% confidence level) when no data re-sampling applied and comparable to others when applying up-sampling on the largest open bug dataset, while training the model is significantly faster, thus finding optimal parameters is much easier. In terms of completeness, which measures the amount of bugs contained in the Java Classes predicted to be defective, PLS-DA outperforms every other algorithm: it found 69.3% and 79.4% of the total bugs with no re-sampling and up-sampling, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。