Improving Bug Localization with Character-Level Convolutional Neural Network and Recurrent Neural Network.
Abstract
Background: Automated bug localization in large amounts of source files for bug reports is a crucial task in software engineering. However, the different representations of bug reports and source files limited the accuracy of the existing bug localization techniques. Aims: We propose a novel deep learning-based model to improve the accuracy of bug localization for bug reports by expressing them in character and analyzing them with a language model. Method: The proposed model is composed of two main parts: character-level convolutional neural network (CNN) and recurrent neural network (RNN) language model. Both bug reports and source files are expressed in a character level and then input into a CNN, whose output is given to an RNN encoder-decoder architecture. Results: The results of preliminary experiments show that the proposed model achieves comparable or even higher accuracy than the existing machine translation-based bug localization technique. Conclusion: The proposed model is capable of automatically localizing buggy files for bug reports and achieves better accuracy by analyzing them in character level where both bug reports and source code can be expressed. Index Terms-bug localization, convolutional neural network, recurrent neural network, deep learning II. T HE P ROPOSED M ODEL This section describes the proposed model whose overview is illustrated in Figure 1. I. I NTRODUCTION AND M OTIVATION Automatically localizing buggy files for bug reports remains a significant task in software project teams, especially those involving hundreds of thousands of source files. It is painstaking for developers to search all source files for bugfixing. The automated bug localization techniques are thus proposed to rank the source files and recommend the top relevant files to developers. However, bug reports are written in natural languages while source files are written in code tokens. The different expressions between them have been empirically demonstrated to be responsible for the low accuracy of the existing bug localization techniques [1], [2], [3], [4]. Ye et al. [2] tried to bridge the lexical gap by adding the semantic similarity between bug reports and source files i