arXiv:2409.12519cs.SEcs.IR2024-09中稿 · Automated Software…被引 2

通过多视图对比学习提升缺陷定位准确率

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

  • 从报告-代码、报告-报告、代码-代码三方面生成数据增强
  • 在五个Java项目上提升准确率最高达28.93%
  • 适合关注软件缺陷定位与表示学习的研究者

现有基于信息检索的缺陷定位方法通常仅构建缺陷报告与源码文件的语义向量并进行相似性匹配,但忽略了三类关键信息:1)缺陷报告与源码文件间的交互关系;2)缺陷报告之间的相似性;3)源码文件间的共引关系。本文提出一种名为MACL-IRFL的新方法,通过多视图自适应对比学习,分别从报告-代码交互、报告-报告相似性和代码-代码共引三个视角生成数据增强,并利用图神经网络在嵌入过程中聚合三视图信息。同时,在跨视图间执行对比学习,迫使报告表示编码报告-报告与报告-代码共享信息,源码表示编码代码-代码与报告-代码共享信息,从而降低辅助信息带来的噪声。在五个开源Java项目上的实验表明,该模型在Accuracy@1、MAP和MRR指标上相比最优基线分别提升28.93%、25.57%和20.35%。

原文摘要 · Abstract (English)

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.

缺陷定位对比学习图神经网络

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。