Abstract
The bug question retrieval task aims to identify the most relevant questions from databases to find solutions for specific bugs. Existing methods often treat this as a text matching problem, primarily focusing on leveraging semantic similarities between bug descriptions for retrieval. However, these methods often overlook the semantic gap posed by users describing bugs from different perspectives, which significantly hampers their retrieval performance. To address this challenge, we first propose the Cross-Perspective Retrieval (CPR) model, which integrates a Semantic Association Module and an Information Fusion Module to align descriptions effectively, utilizing code as auxiliary information. The Semantic Association Module establishes semantic connections between descriptions by extracting implicit information from the code and developing a coherent semantic context. Meanwhile, the Information Fusion Module employs modality contrastive learning to integrate information from both the code and the descriptions. Furthermore, we introduce CPRSearchNet, a new dataset specifically designed for cross-perspective bug question retrieval. CPRSearchNet comprises 8,785 samples, each including bug descriptions from three distinct perspectives alongside the corresponding code context, thereby filling a critical gap in existing datasets. Experiments demonstrate that the CPR significantly outperforms existing baselines in the cross-perspective bug question retrieval task, resulting in substantial improvements in R@K and MRR.
Funding Information
  • National Natural Science Foundation of China (62402185, 62476097)
  • Guangdong Provincial Fund for Basic and Applied Basic Research—Regional Joint Fund Project (2023B1515120078)
  • Guangdong Provincial Natural Science Foundation for Outstanding Youth Team Project (2024B1515040010)
  • Fundamental Research Funds for the Central Universities, South China University of Technology (x2rjD2250190, 2025ZYGXZR064)
  • Science and Technology Planning Project of Guangdong Province (2025B0101120003)

This publication has 39 references indexed in Scilit: