NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Can Language Models Replace Programmers for Coding? REPOCOD Says 'Not Yet'

Shanchao Liang, Nan Jiang, Yiran Hu, Lin TanACL 2025

Abstract

While Large Language Models (LLMs) have mastered standalone coding puzzles, they often fail when faced with the complexities of real-world software development. This paper introduces REPOCOD, a rigorous new benchmark for repository-level code generation. REPOCOD requires models to generate complex, multi-dependency functions within large-scale projects. Our evaluation reveals that even state-of-the-art models like GPT-4o solve less than 30% of these tasks, with performance dropping significantly as code complexity increases.

Introduction: The Gap Between Puzzles and Production

Most existing coding benchmarks, such as HumanEval, evaluate LLMs on "standalone" tasks—short, self-contained functions that do not require knowledge of an external codebase. However, professional programming occurs within massive repositories where functions depend on custom classes, internal APIs, and configurations spread across dozens of files.

Existing repository-level benchmarks often rely on simple single-line completions or synthetic examples. REPOCOD addresses these shortcomings by focusing on whole-function generation within 11 popular, well-maintained Python projects (e.g., scikit-learn, flask, astropy). The goal is to generate code that passes actual developer-written test cases, moving beyond "fuzzy" metrics like BLEU scores toward functional correctness.

Methodology: Building a Repository-Level Benchmark

The authors developed an automated three-stage pipeline to construct REPOCOD, ensuring high-quality tasks and efficient evaluation.

  1. Repository Selection: 11 high-star Python repositories were selected to provide a diverse and realistic testing ground.
  2. Target Function Selection: Using static and dynamic analysis, the pipeline identifies functions that are actively invoked by existing test suites and possess substantial documentation.
  3. Relevant Test Collection: To optimize evaluation, a "fail-to-pass" approach was used. By temporarily replacing a target function with an assertion failure, the system identifies exactly which tests in the suite are relevant to that specific function.
The REPOCOD benchmark construction pipeline (a) and the resulting instance structure (b).

The REPOCOD Dataset

The benchmark consists of two primary components:

  • REPOCOD: 980 whole-function generation tasks across repositories averaging over 2,600 files. Each task is associated with an average of 314 test cases.
  • REPOCOD-LITE: A curated "hard mode" subset of 200 tasks designed for faster evaluation of the most challenging logical problems.

Compared to existing benchmarks like CoderEval or DevEval, REPOCOD tasks are significantly more complex, with solutions averaging 331 tokens.

Key Insights and Results

The evaluation of various LLMs using Retrieval-Augmented Generation (RAG) yielded several critical insights:

The Complexity Wall

Model performance is inversely proportional to code complexity. For functions with high cyclomatic complexity (numerous logical branches), even the best models achieved only a 7% pass rate. This suggests that current LLMs struggle with deep logical reasoning in a repository context.

Retrieval is Not the Only Bottleneck

Even in "Oracle" settings—where the model is provided with the exact dependencies it needs—performance remains low. This indicates that the primary challenge is not just finding the right context, but reasoning about how to use it effectively. Interestingly, for commercial models, simply providing the "Current File" context often outperformed more complex RAG techniques.

Performance Summary

No model achieved more than a 28.6% pass@1 score (GPT-4o in an oracle setting). Under standard RAG conditions, the best score was 27.4%. Commercial models (GPT-4o, Claude 3.5 Sonnet) significantly outperformed open-source alternatives like CodeLlama and DeepSeekCoder, none of which surpassed the 20% mark.

Conclusion and Future Work

REPOCOD demonstrates that LLMs are not yet ready to replace human programmers for complex, repository-level tasks. While they are helpful assistants, their reasoning capabilities hit a ceiling when faced with real-world software architecture.

Future work includes expanding REPOCOD to other languages like Java and C++, increasing repository diversity, and further exploring agentic frameworks that allow models to browse repositories iteratively. While agentic approaches show promise, they currently struggle to outperform well-tuned RAG setups, highlighting the need for fundamental improvements in LLM reasoning.

Summary updated

BibTeX
@inproceedings{liang2025can,
  author = {Shanchao Liang and Nan Jiang and Yiran Hu and Lin Tan},
  title = {{Can Language Models Replace Programmers for Coding? REPOCOD Says 'Not Yet'}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure