一句话:提出更贴近实际的在线即时软件缺陷预测人工标注流程,并设计靶向标注方法以节省人工检查且保持预测性能。
现有在线即时软件缺陷预测(JIT-SDP)研究通常假设开发者不会在缺陷诱导预测后立即检查变更,导致训练样本延迟生成。但实际开发中,开发者会检查部分被预测为缺陷诱导的变更。本文提出更现实的人工标注流程,考虑 JIT-SDP 模型在开发中的部署,并分析其对预测性能的影响;同时提出靶向标注方法以节省人工检查。基于 14 个 GitHub 项目的实验表明,现实标注流程显著优于延迟标注,说明已有工作可能低估 JIT-SDP 性能;靶向标注能在保持预测性能的同时减少人工投入,因为它优先推荐检查更可能诱导缺陷的变更。研究鼓励采用更现实的标注方法以更接近真实评估。
Just-in-Time Software Defect Prediction (JIT-SDP) can be seen as an online learning problem where additional software changes produced over time may be labeled and used to create training examples. These training examples form a data stream that can be used to update JIT-SDP models in an attempt to avoid models becoming obsolete and poorly performing. However, labeling procedures adopted in existing online JIT-SDP studies implicitly assume that practitioners would not inspect software changes upon a defect-inducing prediction, delaying the production of training examples. This is inconsistent with a real-world scenario where practitioners would adopt JIT-SDP models and inspect certain software changes predicted as defect-inducing to check whether they really induce defects. Such inspection means that some software changes would be labeled much earlier than assumed in existing work, potentially leading to different JIT-SDP models and performance results. This paper aims at formulating a more practical human labeling procedure that takes into account the adoption of JIT-SDP models during the software development process. It then analyses whether and to what extent it would impact the predictive performance of JIT-SDP models. We also propose a new method to target the labeling of software changes with the aim of saving human inspection effort. Experiments based on 14 GitHub projects revealed that adopting a more realistic labeling procedure led to significantly higher predictive performance than when delaying the labeling process, meaning that existing work may have been underestimating the performance of JIT-SDP. In addition, our proposed method to target the labeling process was able to reduce human effort while maintaining predictive performance by recommending practitioners to inspect software changes that are more likely to induce defects. We encourage the adoption of more realistic human labeling methods in research studies to obtain an evaluation of JIT-SDP predictive performance that is closer to reality.