arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.02435cs.SE
收藏

IRJIT:一种用于即时软件缺陷预测的简单在线信息检索方法

IRJIT: A Simple, Online, Information Retrieval Approach for Just-In-Time Software Defect Prediction

Hareem Sahar, Abdul Ali Bangash, Abram Hindle, Denilson Barbosa

AI总结:

本文提出 IRJIT,利用源代码信息检索和历史提交相似性实现在线、可解释的 JIT-SDP,在 10 个开源数据集上性能可比且速度最高提升 112 倍。

摘要:

即时软件缺陷预测(JIT-SDP)通过在代码提交签入时识别缺陷,防止缺陷被引入软件。当前的软件缺陷预测方法依赖于变更度量等人工构建特征,并涉及训练成本高昂的机器学习或深度学习模型。这些模型通常包含大量训练过程,可能需要显著的计算资源和时间。当新样本出现并尝试实时更新模型时,这些特征会带来挑战,可能影响其适用于快速在线缺陷预测的能力。此外,对复杂底层模型的依赖使这些方法通常可解释性较差,这意味着开发者无法理解模型预测背后的原因。由于开发者对其结果缺乏信任,不可解释的方法可能无法在真实开发环境中被采用。为解决这些局限,我们提出一种名为 IRJIT 的方法,该方法对源代码采用信息检索技术,并根据新提交与过去有缺陷或无缺陷提交的相似性,将其标记为有缺陷或干净。IRJIT 方法是在线且可解释的,因为它能够从新数据中学习,而无需昂贵的重新训练,并且开发者可以查看支持某项预测的文档,从而获得额外上下文。通过在项目内设置下评估 10 个开源数据集,我们表明该方法比最先进的机器学习和深度学习方法最快快 112 倍,可在提交级和代码行级提供可解释性,并且具有与最先进方法相当的性能。

英文摘要:

Just-in-Time software defect prediction (JIT-SDP) prevents the introduction of defects into the software by identifying them at commit check-in time. Current software defect prediction approaches rely on manually crafted features such as change metrics and involve expensive to train machine learning or deep learning models. These models typically involve extensive training processes that may require significant computational resources and time. These characteristics can pose challenges when attempting to update the models in real-time as new examples become available, potentially impacting their suitability for fast online defect prediction. Furthermore, the reliance on a complex underlying model makes these approaches often less explainable, which means the developers cannot understand the reasons behind models' predictions. An approach that is not explainable might not be adopted in real-life development environments because of developers' lack of trust in its results. To address these limitations, we propose an approach called IRJIT that employs information retrieval on source code and labels new commits as buggy or clean based on their similarity to past buggy or clean commits. IRJIT approach is online and explainable as it can learn from new data without expensive retraining, and developers can see the documents that support a prediction, providing additional context. By evaluating 10 open-source datasets in a within project setting, we show that our approach is up to 112 times faster than the state-of-the-art ML and DL approaches, offers explainability at the commit and line level, and has comparable performance to the state-of-the-art.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑