RepoReasoner: Evaluating Repository-Level Code Reasoning Ability of Long-Context Language Models

πŸ“… 2026-07-28
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
Existing code reasoning benchmarks are largely confined to the function level, failing to capture the cross-file dependencies and complexity inherent in real-world software development. This work proposes RepoReasoner, the first repository-level benchmark for evaluating large language models’ cross-file reasoning capabilities through two tasks: Output Prediction and Call Chain Prediction. The framework leverages pytest-based dynamic execution traces to extract ground-truth call chains and employs LLM-based rewriting of inputs and outputs to mitigate memorization bias, forming a multi-stage data processing pipeline. Experimental results show that even the best-performing model achieves only 69.1% Pass@1 on Output Prediction under oracle context; Call Chain Prediction exhibits high precision but low recall, with performance highly sensitive to contextual noise.
πŸ“ Abstract
Recent large language models (LLMs) have shown strong performance on software engineering tasks, yet most existing benchmarks evaluate code reasoning at the function level, where all relevant information is localized. This setting fails to reflect real-world development, which requires reasoning across multiple files and complex dependency structures. We introduce RepoReasoner, a benchmark for evaluating repository-level code reasoning. It assesses two complementary abilities: Output Prediction, which measures fine-grained, stateful execution reasoning across files, and Call Chain Prediction, which evaluates high-level architectural dependency understanding under noisy context. Our benchmark is constructed through a multi-stage pipeline that leverages dynamic tracing of pytest executions to obtain ground-truth call chains, along with LLM-based I/O rewriting to reduce memorization effects. We evaluate seven state-of-the-art LLMs. Even under oracle context, the best-performing model achieves only 69.1% Pass@1 on Output Prediction, indicating that cross-file reasoning remains a major challenge. In Call Chain Prediction, models exhibit high precision but low recall, suggesting limited multi-hop dependency understanding. Furthermore, performance drops on rewritten data reveal partial reliance on memorization, and longer contexts do not consistently improve results due to noise. These findings highlight fundamental limitations in current LLMs' repository-level reasoning and motivate future work on structured architectural understanding and cross-file inference.
Problem

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

repository-level reasoning
code reasoning
large language models
cross-file reasoning
software engineering
Innovation

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

repository-level reasoning
cross-file code understanding
call chain prediction
dynamic tracing
LLM benchmarking
πŸ”Ž Similar Papers
No similar papers found.