arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.12519cs.SEcs.IR
收藏

基于信息检索的多视图自适应对比学习用于故障定位

Multi-View Adaptive Contrastive Learning for Information Retrieval Based Fault Localization

School of Computer Science, Wuhan University(武汉大学计算机学院);School of Cyber Science and Technology, Hubei University(湖北大学网络空间安全学院)

Chunying Zhou, Xiaoyuan Xie, Gong Chen, Peng He, Bing Li

AI总结:

本文提出MACL-IRFL方法,通过多视图自适应对比学习提升软件故障定位的准确性。

摘要:

大多数研究集中在基于信息检索的技术用于故障定位,这些研究为bug报告和源代码文件构建了表示,并通过相似性测量匹配它们的语义向量。然而,此类方法往往忽略了某些有用的信息,这些信息可能有助于提高定位性能,例如1)bug报告与源代码文件之间的交互关系;2)bug报告之间的相似性关系;3)源代码文件之间的共引用关系。在本文中,我们提出了一种新的方法,名为基于信息检索的多视图自适应对比学习用于故障定位(MACL-IRFL),以学习上述关系用于软件故障定位。具体而言,我们首先从报告-代码交互视图、报告-报告相似性视图和代码-代码共引用视图分别生成数据增强,并采用图神经网络在嵌入过程中聚合bug报告或源代码文件的三种视图信息。此外,我们跨这些视图进行对比学习。我们的对比学习任务设计将迫使bug报告的表示编码来自报告-报告和报告-代码视图共享的信息,以及源代码文件的表示编码来自代码-代码和报告-代码视图共享的信息,从而减轻来自辅助信息的噪声。最后,为了评估我们的方法性能,我们在五个开源Java项目上进行了广泛的实验。结果表明,我们的模型在Accuracy@1、MAP和MRR上比最佳基线提高了28.93%、25.57%和20.35%。

英文摘要:

Most studies focused on information retrieval-based techniques for fault localization, which built representations for bug reports and source code files and matched their semantic vectors through similarity measurement. However, such approaches often ignore some useful information that might help improve localization performance, such as 1) the interaction relationship between bug reports and source code files; 2) the similarity relationship between bug reports; and 3) the co-citation relationship between source code files. In this paper, we propose a novel approach named Multi-View Adaptive Contrastive Learning for Information Retrieval Fault Localization (MACL-IRFL) to learn the above-mentioned relationships for software fault localization. Specifically, we first generate data augmentations from report-code interaction view, report-report similarity view and code-code co-citation view separately, and adopt graph neural network to aggregate the information of bug reports or source code files from the three views in the embedding process. Moreover, we perform contrastive learning across these views. Our design of contrastive learning task will force the bug report representations to encode information shared by report-report and report-code views,and the source code file representations shared by code-code and report-code views, thereby alleviating the noise from auxiliary information. Finally, to evaluate the performance of our approach, we conduct extensive experiments on five open-source Java projects. The results show that our model can improve over the best baseline up to 28.93%, 25.57% and 20.35% on Accuracy@1, MAP and MRR, respectively.

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

↑