The Just-In-Time (JIT) defect prediction model serves as a critical tool for ensuring the quality of software development and enhancing software performance. It assists development teams in promptly identifying and addressing potential issues by predicting whether code submissions may introduce defects. However, due to the existence of data noise and insufficient semantic connections in real-world scenarios, existing approaches face challenges in accurately identifying the code commits that introduce defects and capturing the potential semantic relationships. To address these challenges, we propose the BIC- Hunter(Bug-Inducing Commits Hunter) model, which mitigates data noise and improves semantic understanding, thereby enhancing the accuracy of bug-inducing commit identification. BIC - Hunter model consists of two components: a data denoising component and a semantic relationship capturing component. Specifically, the data denoising component addresses the challenges posed by inaccurate annotations and inconsistencies in real-world data, enhancing the reliability of training data and improving overall model robustness. The semantic relation- ship capturing component constructs homogeneous graphs and applies graph convolutional networks to facilitate a more comprehensive analysis of code context, enabling the identification of defects caused by code commits and enhancing the confidence in pinpointing their root causes. Experimental studies on a large-scale dataset integrated from three open-source datasets show that BIC- Hunter exhibits outstanding performance. BIC- Hunter outperforms the state-of-the-art by 6.16%, 7.13%, and 5.53% on Recall@1, Recall@2, and Recall@3, respectively, while the MFR index increases by 8.43% to 32.82%. These results demonstrate the superior capability of our method in identifying bug-inducing commits.
翻译:即时缺陷预测模型是保障软件开发质量、提升软件性能的关键工具,通过预测代码提交是否可能引入缺陷,协助开发团队及时识别和解决潜在问题。然而,实际场景中数据噪声的存在以及语义关联的不足,使得现有方法难以准确识别引入缺陷的代码提交并捕获其潜在语义关系。为解决这些挑战,我们提出BIC-Hunter(缺陷引入提交猎手)模型,该模型通过缓解数据噪声并增强语义理解能力,从而提升缺陷引入提交识别的准确性。BIC-Hunter模型包含两个组件:数据去噪组件和语义关系捕获组件。具体而言,数据去噪组件应对真实场景中标注不准确和数据不一致的挑战,增强训练数据的可靠性并提升模型整体鲁棒性;语义关系捕获组件通过构建同构图并应用图卷积网络,促进对代码上下文的全面分析,从而识别代码提交引起的缺陷,并提升定位根因的置信度。在由三个开源数据集集成的大规模数据集上的实验表明,BIC-Hunter展现出卓越性能。相较于现有最优方法,BIC-Hunter在Recall@1、Recall@2和Recall@3指标上分别提升6.16%、7.13%和5.53%,同时MFR指标提升幅度介于8.43%至32.82%之间。这些结果证明了本方法在识别缺陷引入提交方面的优越能力。