RLocator: Reinforcement Learning for Bug Localization

  • 2024-09-30 16:29:35
  • Partha Chakraborty, Mahmoud Alfadel, Meiyappan Nagappan
  • 0

Abstract

Software developers spend a significant portion of time fixing bugs in theirprojects. To streamline this process, bug localization approaches have beenproposed to identify the source code files that are likely responsible for aparticular bug. Prior work proposed several similarity-based machine-learningtechniques for bug localization. Despite significant advances in thesetechniques, they do not directly optimize the evaluation measures. We arguethat directly optimizing evaluation measures can positively contribute to theperformance of bug localization approaches. Therefore, In this paper, weutilize Reinforcement Learning (RL) techniques to directly optimize the rankingmetrics. We propose RLocator, a Reinforcement Learning-based bug localizationapproach. We formulate RLocator using a Markov Decision Process (MDP) tooptimize the evaluation measures directly. We present the technique andexperimentally evaluate it based on a benchmark dataset of 8,316 bug reportsfrom six highly popular Apache projects. The results of our evaluation revealthat RLocator achieves a Mean Reciprocal Rank (MRR) of 0.62, a Mean AveragePrecision (MAP) of 0.59, and a Top 1 score of 0.46. We compare RLocator withtwo state-of-the-art bug localization tools, FLIM and BugLocator. Ourevaluation reveals that RLocator outperforms both approaches by a substantialmargin, with improvements of 38.3% in MAP, 36.73% in MRR, and 23.68% in the TopK metric. These findings highlight that directly optimizing evaluation measuresconsiderably contributes to performance improvement of the bug localizationproblem.

 

Quick Read (beta)

loading the full paper ...