[Paper Review] A Case Study on the Impact of Similarity Measure on Information Retrieval based Software Engineering Tasks
This paper investigates how different similarity measures impact information retrieval (IR) performance in software engineering tasks, evaluating VSM, LSI, BM25, and WMD across textual and code artifacts. It finds that context-aware models (LSI, WMD) excel on text, while bag-of-words models outperform on code, and BM25 achieves the best balance on mixed-text-and-code tasks, demonstrating that model choice must be guided by artifact type to improve SE tool effectiveness.
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.
Motivation & Objective
- To understand how similarity measure choice affects IR performance across diverse software engineering artifacts.
- To evaluate the effectiveness of VSM, LSI, BM25, and WMD on different types of SE documents (textual and code-based).
- To investigate whether informed similarity measure selection can improve existing IR-based SE tools for project recommendation and bug localization.
- To provide empirical guidance on matching similarity measures to document types for optimal SE tool performance.
Proposed method
- Conducted two case studies: project recommendation (1,832 GitHub projects) and bug localization (1,100 bug reports).
- Evaluated four similarity measures: Vector Space Model (VSM), Latent Semantic Indexing (LSI), BM25, and Word Mover’s Distance (WMD).
- Used standardized preprocessing (stopword removal, stemming) across all models to ensure fair comparison.
- Measured performance using standard IR evaluation metrics (e.g., precision, recall, MAP) on labeled relevance judgments.
- Analyzed model performance separately on pure text, pure code, and mixed text-code artifacts.
- Re-evaluated two existing SE tools (for project recommendation and bug localization) using optimized similarity measures to assess performance gains.
Experimental results
Research questions
- RQ1Which similarity measure performs best for IR-based project recommendation across different types of software artifacts?
- RQ2How does the performance of IR models vary when retrieving buggy source files from bug reports?
- RQ3Does selecting a similarity measure based on artifact type lead to improved performance in existing SE tools?
- RQ4How do context-aware models (LSI, WMD) compare to keyword-based models (VSM, BM25) on code vs. natural language artifacts?
Key findings
- Context-aware models like LSI and WMD achieve superior performance on purely textual artifacts such as bug reports and project descriptions.
- Simple bag-of-words models like VSM outperform on code artifacts due to the structured, low-ambiguity nature of source code.
- BM25 demonstrates the best overall performance on mixed-text-and-code artifacts, balancing effectiveness across diverse document types.
- Reconfiguring existing SE tools with task-specific similarity measures led to measurable performance improvements, validating the impact of informed model selection.
- The study confirms that no single similarity measure is optimal across all artifact types, and model choice must be data-driven and artifact-aware.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.