arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.10675cs.SE
收藏

基于RNN和注意力混合模型的故障定位方法

Locating Faulty Methods with a Mixed RNN and Attention Model

Shouliang Yang, Junming Cao, Hushuang Zeng, Beijun Shen, Hao Zhong

摘要:

基于IR的错误定位方法通过比较错误报告和源代码来定位错误文件,取得了很好的效果。不幸的是,它们在定位错误方法时变得不那么有效。我们进行了初步的研究,探讨其挑战,并确定三个问题:语义差距问题,表示稀疏问题,和单一的修订问题。为了解决这些问题,我们提出了MRAM,一个混合的RNN和注意力模型,它结合了错误修复功能和方法结构化功能,以探索方法和错误报告之间的隐式和显式相关性,用于方法级故障定位任务。我们模型的核心思想是:(1)根据代码、提交和过去的错误报告构建代码修订图,揭示方法之间的潜在关系,以增强短方法,并提供代码的所有修订和过去的修复,以训练更准确的模型;(2)嵌入三种方法结构化特征(令牌序列,API调用序列和注释)与RNN和软注意力联合表示源方法并获得其与错误报告的隐式相关性;以及(3)集成多版本错误修复功能,该功能提供错误报告和方法之间的显式关联,以提高性能。我们已经实现了MRAM,并在五个开源项目上进行了受控实验。与最先进的方法相比,当数据集包含(不包含)本地错误报告时,我们的MRAM将MRR值提高了3.8 - 5.1%(3.7 - 5.4%)。我们的统计测试表明我们的改进是显著的

英文摘要:

IR-based fault localization approaches achieves promising results when locating faulty files by comparing a bug report with source code. Unfortunately, they become less effective to locate faulty methods. We conduct a preliminary study to explore its challenges, and identify three problems: the semantic gap problem, the representation sparseness problem, and the single revision problem. To tackle these problems, we propose MRAM, a mixed RNN and attention model, which combines bug-fixing features and method structured features to explore both implicit and explicit relevance between methods and bug reports for method level fault localization task. The core ideas of our model are: (1) constructing code revision graphs from code, commits and past bug reports, which reveal the latent relations among methods to augment short methods and as well provide all revisions of code and past fixes to train more accurate models; (2) embedding three method structured features (token sequences, API invocation sequences, and comments) jointly with RNN and soft attention to represent source methods and obtain their implicit relevance with bug reports; and (3) integrating multirevision bug-fixing features, which provide the explicit relevance between bug reports and methods, to improve the performance. We have implemented MRAM and conducted a controlled experiment on five open-source projects. Comparing with stateof-the-art approaches, our MRAM improves MRR values by 3.8- 5.1% (3.7-5.4%) when the dataset contains (does not contain) localized bug reports. Our statistics test shows that our improvements are significant

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑