Continuously Learning Bug Locations
Paulina Stevia Nouwou Mindom, Leuson Da Silva, Amin Nikanjam, Foutse Khomh
TL;DR
This work tackles bug localization under non-stationary data by evaluating DRL-based continual learning approaches (CLEAR and EWC) against strong DL baselines. It formulates bug localization as two sequential DRL tasks (ranking changeset-files and hunks) and enhances CL with logistic-regression-derived bug-inducing factors integrated into the reward. Across seven Apache projects, CL methods improve robustness to concept drift, achieving substantial gains in top-k metrics and up to 5x faster training, while preserving performance on stationary data. The findings suggest that continual learning can effectively adapt bug localization models to evolving code, with potential applicability to other software engineering tasks facing concept drift.
Abstract
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.
