太琐碎,无法测试?逆向缺陷预测识别低故障风险方法
Too Trivial To Test? An Inverse View on Defect Prediction to Identify Methods with Low Fault Risk
摘要:
背景测试资源通常是有限的,因此通常不可能在发布之前完全测试应用程序。为了解决资源稀缺的问题,开发团队可以应用缺陷预测来识别容易出错的代码区域。然而,在跨项目预测场景中,缺陷预测往往精度较低。目的。我们对缺陷预测采取了相反的观点,目的是确定在测试时可以推迟的方法,因为它们几乎不包含任何错误,因为它们的代码是“微不足道的”。我们希望这种方法的特点可能是独立于项目的,所以我们的方法可以提高跨项目的预测。法我们计算代码度量,并应用关联规则挖掘来创建用于识别具有低故障风险的方法的规则。我们进行了实证研究,以评估我们的方法与六个Java开源项目包含精确的故障数据的方法级。结果我们的研究结果表明,逆缺陷预测可以识别约。32-44%的项目方法具有低故障风险;平均而言,它们包含故障的可能性比其他方法低六倍。在具有更大、更多样化训练集的跨项目预测中,识别出的方法包含错误的可能性甚至低11倍。结论.反向缺陷预测通过识别测试活动中优先级较低的方法来支持测试资源的有效分配,并且非常适用于跨项目预测场景。
英文摘要:
Background. Test resources are usually limited and therefore it is often not possible to completely test an application before a release. To cope with the problem of scarce resources, development teams can apply defect prediction to identify fault-prone code regions. However, defect prediction tends to low precision in cross-project prediction scenarios. Aims. We take an inverse view on defect prediction and aim to identify methods that can be deferred when testing because they contain hardly any faults due to their code being "trivial". We expect that characteristics of such methods might be project-independent, so that our approach could improve cross-project predictions. Method. We compute code metrics and apply association rule mining to create rules for identifying methods with low fault risk. We conduct an empirical study to assess our approach with six Java open-source projects containing precise fault data at the method level. Results. Our results show that inverse defect prediction can identify approx. 32-44% of the methods of a project to have a low fault risk; on average, they are about six times less likely to contain a fault than other methods. In cross-project predictions with larger, more diversified training sets, identified methods are even eleven times less likely to contain a fault. Conclusions. Inverse defect prediction supports the efficient allocation of test resources by identifying methods that can be treated with less priority in testing activities and is well applicable in cross-project prediction scenarios.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。