Automatically locating buggy changesets associated with bug reports is crucial in the software development process. Deep Learning (DL)-based techniques show promising results by leveraging structural information from the code and learning links between changesets and bug reports. However, since source code associated with changesets evolves, the performance of such models tends to degrade over time due to concept drift. Aiming to address this challenge, in this paper, we evaluate the potential of using Continual Learning (CL) techniques in multiple sub-tasks setting for bug localization (each of which operates on either stationary or non-stationary data), comparing it against a bug localization technique that leverages the BERT model, a deep reinforcement learning-based technique that leverages the A2C algorithm, and a DL-based function-level interaction model for semantic bug localization. Additionally, we enhanced the CL techniques by using logistic regression to identify and integrate the most significant bug-inducing factors. Our empirical evaluation across seven widely used software projects shows that CL techniques perform better than DL-based techniques by up to 61% in terms of Mean Reciprocal Rank (MRR), 44% in terms of Mean Average Precision (MAP), 83% in terms of top@1, 56% in terms of top@5, and 66% in terms of top@10 metrics in non-stationary setting. Further, we show that the CL techniques we studied are effective at localizing changesets relevant to a bug report while being able to mitigate catastrophic forgetting across the studied tasks and require up to 5x less computational effort during training. Our findings demonstrate the potential of adopting CL for bug localization in non-stationary settings, and we hope it helps to improve bug localization activities in Software Engineering using CL techniques.
翻译:在软件开发过程中,自动定位与缺陷报告相关联的错误变更集至关重要。基于深度学习的技术通过利用代码的结构信息并学习变更集与缺陷报告之间的关联,已展现出有前景的结果。然而,由于与变更集相关的源代码会不断演化,此类模型的性能往往会因概念漂移而随时间下降。为应对这一挑战,本文评估了在多个子任务设置(每个子任务处理静态或非静态数据)中应用持续学习技术进行缺陷定位的潜力,并将其与一种利用BERT模型的缺陷定位技术、一种利用A2C算法的基于深度强化学习的技术,以及一种基于深度学习的函数级交互语义缺陷定位模型进行了比较。此外,我们通过使用逻辑回归识别并整合最显著的缺陷诱发因素,对持续学习技术进行了增强。我们在七个广泛使用的软件项目上进行的实证评估表明,在非静态设置下,持续学习技术在平均倒数排名上优于基于深度学习的技术高达61%,在平均精度均值上高达44%,在top@1指标上高达83%,在top@5指标上高达56%,在top@10指标上高达66%。此外,我们证明所研究的持续学习技术能够有效定位与缺陷报告相关的变更集,同时能够缓解跨研究任务的灾难性遗忘,并且在训练期间所需的计算量最多可减少5倍。我们的研究结果证明了在非静态设置中采用持续学习进行缺陷定位的潜力,并希望这有助于利用持续学习技术改进软件工程中的缺陷定位活动。