Fine-Grained Bug Localization Based on Rich Context using Attention Tree-GRU

Yaqiang Zhao, Xiaozhuo Li, Wei Deng, Ying Li, Xiaobo Guo, Qing Tian, Fan Ying · 2024

Information retrieval(IR) based bug localization technology is a relatively recognized lightweight location method. Most IR bug localization methods solve the problem of semantic difference between natural language in the bug report(BR) and code language in source code based on semantic intelligibility, and use semantic similarity to construct IR model to directly locate source code faults through bug report. At present, most IR bug localization results are files, but this kind of location method has been questioned for its result usefulness by many articles in terms of localization granularity and form intelligibility. By observing the process of bug generation and repair in the evolution program, we propose an IR bug localization technology based on system experience and repair experience, which realizes fine-grained and interpretable bug localization in the form of Diff-Bug link. Through the relationship between diff code and bug, the source of bug in the software evolution process is explained, and the interpretability of the results in bug localization is achieved by simulating the execution path, combined with the code structure information to enrich the code semantics, and through the BERT and Attention Tree-GRU respectively to deal with the semantic representation of the two languages, using the Pseudo-Siamese Network(PSN) to guide the semantic extraction of code language with natural language semantics, solve the problem of expression differences cross languages, and achieve semantic correspondence between fine-grained code and natural language, so this method is called Interpretable bug localization (IBL). Based on the bug data set including Jena, mahout and other projects, the accuracy of IBL is better than the traditional file-level IR based bug localization method. It can not only effectively locate program faults at a fine-grained level, but also assist programmers in effectively understanding the causes of bugs. Compared with the IR bug localization method unilaterally considering the lexical semantic information in the source code or only using the report as the single source of information, the IBL method has a better application effect.

Read the paper · More papers on PaperTik