Improving bug localization with word embedding and enhanced convolutional neural networks.
Abstract
Syntax Tree (AST) detection, respectively. The same word-embedding technique (word2vec) is then applied to transform the preprocessed words from bug reports and source files into vectors. Later, the features of these vectors are extracted by one CNN. However, the use of the same word-embedding technique and CNN to deal with bug reports and source files ignored the differences between them and thus limited the performance of DeepLocator. Although the motivation for this work is somewhat derived from Xiao et al. [47], the fundamental differences between the two studies are as follows. (1) This paper uses two different word-embedding techniques (Sent2Vec and combined word2vec) to convert bug reports and source files, respectively, into vectors. (2) All code tokens are transformed in this paper, instead of some AST nodes parsed from the source files in [47]. (3) Two CNNs are used to extract features from the vectors of bug reports and source files before they are supplied to the proposed enhanced CNN. (4) We report better results and new analyses and show the visualization of the learned vectors to demonstrate the effectiveness of the word-embedding techniques for bug localization. The remainder of this paper is structured as follows. Section 2 reviews the preliminary knowledge related to DeepLoc. Section 3 gives a tft , d = log (ft , d ) + 1 (3) Inspired by Croft et al.'s work [8], we propose an rTF-IDuF to further improve the model's performance: N wtf − idf = (log (ft , d ) + 1) × log ⎜⎛ u ⎞⎟ n ⎝ t,u ⎠ (4) where ft, d is the frequency of term t appearing in document d, Nu refers to the total number of documents in user collections, and nt, u reflects the number of documents in user collections that contain term t. In reality, a complete corpus is not always available. In addition, the bug reports for different projects usually differ in their writing style and contexts. Therefore, it is convenient and reasonable to apply rTF-IDuF, which focuses on personal collections and is used in this paper. 2.2. Word embedding 1 Word embedding refers to the distributed representations of words https://github.com/yanxiao6/BugLocalization-dataset. 18