Skip to content
Open access

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

Jun 2026 · Proceedings of the ACM on Software Engineering · Vol 3, pp. 2790 - 2812 · 2 citations · 60 references
Computer Science

TL;DR

RepoReasoner is introduced, a benchmark for evaluating repository-level code reasoning that 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.

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.

Read PDF

Similar papers

Preprint Aug 2026

Function-Level Execution Feedback for Code Preference Optimization

STEP-KTODER is proposed, a framework for code preference optimization that defines steps as module-level functions in decomposed multi-function programs and assigns binary correctness labels via automatically generated unit tests and shows that execution-based labels are essential.

Idris Nechnech, Sehwan Kim, Jimin Seo et al. · 0 citations
#software testing Preprint Aug 2026

XREPOTEST: Benchmarking Multilingual Repository-Level Unit Test Generation for Large Language Models

XREPOTEST is introduced, a multilingual repository-level benchmark for unit test generation spanning five underexplored languages: Rust, Go, Julia, PHP, and Ruby, and Invocation Rate is proposed to assess whether generated tests meaningfully exercise the intended functionality.

L. Dung, Dong Cao Van, Nam Le Hai et al. · 0 citations
Preprint Aug 2026

Evaluating Language Models on Cross-Language Code Functional Equivalence

This work investigates whether LLMs can accurately judge functional equivalence across different programming languages in human-written code, a setting that requires deeper reasoning beyond superficial similarity, and identifies a difficulty-dependent breakdown in equivalence judgment.

Hui Sun, Anderson G. Uchôa, Rohit Gheyi et al. · 0 citations
Open access Aug 2026

CodeVulReason: Incentivizing reasoning for code vulnerability detection

This paper introduces CodeVulReason, a unified framework for enhancing the reasoning capabilities of large language models (LLMs) in code vulnerability detection (CVD), and proposes S-LoRA, a parameter-efficient fine-tuning method that optimizes Low-Rank Adaptation (LoRA) rank allocation through a statistically grounded stability-aware importance scoring mechanism.

Zhengye Li, Kenny Zhu · 0 citations
Book Open access Jul 2026

RepoFuse: A Dual-Context Approach to Repository-Level Code Completion at Industrial Scale

RepoFuse, a dual-context framework deployed at Ant Group serving 10,000+ developers across 50+ million lines of code, is presented, demonstrating that principled context categorization enables practical repository-level completion at industrial scale.

Ming Liang, Xiaoheng Xie, Gehao Zhang et al. · 0 citations
Preprint Jul 2026

From Failing to Passing: Evolving Natural Language Prompt Optimization Rules for LLM Code Generation

This work introduces a search-based approach that identifies and evolves a set of natural language transformation rules with strong downstream effects on coding performance, and proposes DUALFIX, a staged repair pipeline that combines the evolved transformation rules with execution-feedback repair, addressing both specification-level and implementation-level failures.

Amal Akli, Melissa Akli, Cedric Richter et al. · 0 citations