Skip to main content
QUICK REVIEW

[论文解读] A Case Study on the Impact of Similarity Measure on Information Retrieval based Software Engineering Tasks

Md. Masudur Rahman, Saikat Chakraborty|arXiv (Cornell University)|Aug 8, 2018
Software Engineering Research参考文献 8被引用 3
一句话总结

本文研究了不同相似性度量对软件工程任务中信息检索(IR)性能的影响,评估了在文本和代码资源上使用VSM、LSI、BM25和WMD的表现。研究发现,上下文感知模型(LSI、WMD)在文本上表现更优,而词袋模型在代码上表现更佳,BM25在混合文本与代码任务中表现最佳,表明模型选择必须根据资源类型进行,以提升SE工具的有效性。

ABSTRACT

Information Retrieval (IR) plays a pivotal role in diverse Software Engineering (SE) tasks, e.g., bug localization and triaging, code retrieval, requirements analysis, etc. The choice of similarity measure is the core component of an IR technique. The performance of any IR method critically depends on selecting an appropriate similarity measure for the given application domain. Since different SE tasks operate on different document types like bug reports, software descriptions, source code, etc. that often contain non-standard domain-specific vocabulary, it is essential to understand which similarity measures work best for different SE documents. This paper presents two case studies on the effect of different similarity measure on various SE documents w.r.t. two tasks: (i) project recommendation: finding similar GitHub projects and (ii) bug localization: retrieving buggy source file(s) correspond to a bug report. These tasks contain a diverse combination of textual (i.e. description, readme) and code (i.e. source code, API, import package) artifacts. We observe that the performance of IR models varies when applied to different artifact types. We find that, in general, the context-aware models achieve better performance on textual artifacts. In contrast, simple keyword-based bag-of-words models perform better on code artifacts. On the other hand, the probabilistic ranking model BM25 performs better on a mixture of text and code artifacts. We further investigate how such an informed choice of similarity measure impacts the performance of SE tools. In particular, we analyze two previously proposed tools for project recommendation and bug localization tasks, which leverage diverse software artifacts, and observe that an informed choice of similarity measure indeed leads to improved performance of the existing SE tools.

研究动机与目标

  • 理解相似性度量选择如何影响在多样化软件工程资源上的IR性能。
  • 评估VSM、LSI、BM25和WMD在不同类型SE文档(文本型与代码型)上的有效性。
  • 探究基于资源类型选择相似性度量是否能提升现有基于IR的SE工具在项目推荐与错误定位中的性能。
  • 为实现SE工具最优性能,提供将相似性度量与文档类型相匹配的实证指导。

提出的方法

  • 开展了两项案例研究:项目推荐(1,832个GitHub项目)与错误定位(1,100个错误报告)。
  • 评估了四种相似性度量:向量空间模型(VSM)、潜在语义索引(LSI)、BM25和词移距离(WMD)。
  • 所有模型均采用标准化预处理(去除停用词、词干还原)以确保公平比较。
  • 使用标准IR评估指标(如精确率、召回率、MAP)对标注的相关性判断进行性能测量。
  • 分别分析了模型在纯文本、纯代码及混合文本-代码资源上的表现。
  • 通过使用优化后的相似性度量,重新评估了两项现有SE工具(用于项目推荐与错误定位),以评估性能提升效果。

实验结果

研究问题

  • RQ1在不同类型的软件资源上,哪种相似性度量在基于IR的项目推荐中表现最佳?
  • RQ2在从错误报告中检索存在错误的源文件时,IR模型的性能如何变化?
  • RQ3基于资源类型选择相似性度量是否能提升现有SE工具的性能?
  • RQ4上下文感知模型(LSI、WMD)与基于关键词的模型(VSM、BM25)在代码与自然语言资源上的表现如何比较?

主要发现

  • 上下文感知模型(如LSI和WMD)在纯文本资源(如错误报告和项目描述)上表现更优。
  • 简单的词袋模型(如VSM)在代码资源上表现更优,原因在于源代码结构清晰、歧义性低。
  • BM25在混合文本与代码资源上表现出最佳整体性能,有效平衡了多种文档类型的检索效果。
  • 通过使用任务特定的相似性度量重新配置现有SE工具,实现了可测量的性能提升,验证了明智模型选择的影响。
  • 本研究证实,没有一种相似性度量在所有资源类型上均表现最优,模型选择必须基于数据并考虑资源类型特征。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。