iCoRe: An Iterative Correlation-Aware Retriever for Bug Reproduction Test Generation

📅 2026-04-21
📈 Citations: 0
Influential: 0
📄 PDF

career value

192K/year
🤖 AI Summary
This work addresses the challenge of automatically generating defect-reproducing tests from issue descriptions, a task hindered by insufficient code context retrieval in existing approaches. The authors propose an iterative, relation-aware context retrieval method that explicitly models three key couplings: between source code and test cases, between semantic and function-call structures, and between retrieval and generation processes. By differentiating the retrieval requirements for these two types of code and integrating semantic information, call-graph analysis, and execution feedback into a closed-loop optimization framework, the approach significantly improves defect reproduction accuracy. Evaluated on SWT-bench Lite and TDD-bench Verified, the method achieves Fail-to-Pass rates of 42.0% and 52.8%, respectively, representing relative improvements of 19.7%–31.7% over current state-of-the-art techniques.

Technology Category

Application Category

📝 Abstract
Automatically generating bug reproduction tests (BRT) from issue descriptions is crucial for software maintenance. LLM-based approaches have shown great potential for this task. Their effectiveness heavily relies on retrieving high-quality context from the codebase. The retrieval phase of existing approaches relies on either traditional methods like BM25 or LLM-driven strategies. LLM-based retrieval strategies typically equip an LLM with tools to autonomously explore the repository or select the most relevant files and code snippets from a provided list as context. However, these retrieval methods suffer from three key limitations: 1) They often employ a unified strategy for retrieving both source code and test cases, overlooking their distinct retrieval requirements. 2) They focus solely on semantic similarity while ignoring function call relationships, leading to irrelevant context. 3) The retrieval lacks a feedback loop from the generation phase, preventing it from refining the context based on execution results. These limitations collectively result in low-quality context, thereby hindering the accuracy of bug reproduction. To address these challenges, we propose iCoRe, an iterative, correlation-aware context retrieval approach explicitly aware of three key correlations: 1) between source code and test cases, which requires differentiated retrieval, 2) between textual semantics and function call structures for accurate relevance assessment, and 3) between the retrieval and generation phases, which enables iterative feedback and refinement. To evaluate iCoRe, we integrate it with an LLM-based BRT generator and conduct a comprehensive evaluation on the SWT-bench Lite and TDD-bench Verified benchmarks. Experimental results show that our method achieves a Fail-to-Pass rate of 42.0% and 52.8% respectively, representing 19.7%-31.7% relative improvements over existing retrieval methods.
Problem

Research questions and friction points this paper is trying to address.

bug reproduction test generation
context retrieval
LLM-based software maintenance
function call relationships
retrieval-generation feedback
Innovation

Methods, ideas, or system contributions that make the work stand out.

iterative retrieval
correlation-aware
bug reproduction test
function call structure
LLM-based code generation