Code-Enhanced Cross-Perspective Bug Question Retrieval
Open Access
- 28 January 2026
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
- Vol. 35 (10) , 1-29
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.Keywords
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:
- Automatic recognizing relevant fragments of APIs using API referencesAutomated Software Engineering, 2023
- Retrieval Contrastive Learning for Aspect-Level Sentiment ClassificationInformation Processing & Management, 2023
- Summarizing source code through heterogeneous feature fusion and extractionInformation Fusion, 2023
- Papers with code or without code? Impact of GitHub repository usability on the diffusion of machine learning researchInformation Processing & Management, 2023
- Summarizing source code with Heterogeneous Syntax Graph and dual positionInformation Processing & Management, 2023
- An Analysis of the Automatic Bug Fixing Performance of ChatGPT2023
- Improving topic disentanglement via contrastive learningInformation Processing & Management, 2022
- Momentum Contrast for Unsupervised Visual Representation Learning2020
- AnswerBot: Automated generation of answer summary to developers' technical questions2017
- Some Simple Effective Approximations to the 2-Poisson Model for Probabilistic Weighted Retrieval1994