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

HumanEvo: An Evolution-aware Benchmark for More Realistic Evaluation of Repository-level Code Generation

Dewu Zheng, Yanlin Wang, Ensheng Shi, Ruikai Zhang, Yuchi Ma, Hongyu Zhang, Zibin Zheng

TL;DR

Current benchmarks evaluate repository-level code generation by providing Large Language Models (LLMs) with context from the latest version of a project, ignoring how software naturally evolves over time. This paper introduces HumanEvo, a benchmark that rolls back repositories to their exact historical state prior to a function's creation, revealing that traditional "evolution-ignored" evaluations overestimate LLM performance by up to 61.1%.

What Problem Does This Paper Address?

When software engineers use LLMs for repository-level code generation, the model relies on the surrounding project context to generate accurate code. To evaluate this capability, existing benchmarks sample historical functions from real-world repositories but supply the model with context from the latest version of the codebase.

The authors term this the evolution-ignored phenomenon, which introduces two severe flaws:

  1. Future Context Leakage: The LLM receives code snippets or APIs that were actually written after the target function was committed. This gives the model an unrealistic advantage (see Figure 1).
  2. Useful Context Missing: Code that existed when the developer originally wrote the function might have been deleted or refactored in later versions, depriving the LLM of necessary context (see Figure 2).

To address this, the paper introduces an evolution-aware evaluation approach that accurately simulates the state of a repository at the exact moment a developer wrote the code.

Fig. 1. Example 1: future context leakage.

Methods

The authors developed a rigorous data construction pipeline to build an evolution-aware benchmark:

  • Repository Rollback: For every programming task, the evaluation framework uses Git metadata to roll back the entire repository to the base commit right before the target function was originally introduced.
  • Execution-Based Filtering: To ensure test reliability, the authors split Pull Request (PR) patches into production and test code. They execute the test suite twice—once without the production patch (verifying it fails) and once with it (verifying it passes)—ensuring a strict "fail-to-pass" transition.
  • Context Acquisition Strategies: The benchmark evaluates LLMs using both retrieval-based context (RAG using Jaccard similarity) and static analysis-based context (extracting local, import, sibling, or similar files).

Datasets

The paper introduces HumanEvo, a novel repository-level code generation benchmark consisting of 400 task instances (200 Python and 200 Java) curated from 30 high-quality, real-world open-source projects.

HumanEvo distinguishes itself from existing datasets (like CoderEval or RepoEval) by providing:

  • Exact repository states via historical commits.
  • Manual categorization by dependency levels: standalone (built-ins only), intra-class (dependent on the same class), and inter-class (dependent on other files/classes).
  • Two distinct styles of human-annotated docstrings (Brief and Detailed) to evaluate how prompt descriptions affect generation.
Fig. 3. Task instance overview.

Key Insights and Ideas

  • The Illusion of Capability: Evaluating LLMs on the latest repository versions creates a false sense of security. The performance inflation is primarily driven by future context leakage, meaning models are frequently "cheating" by looking at future code.
  • Dependencies Compound the Issue: The negative impact of ignoring evolution is much harsher on complex code. For functions with cross-file (inter-class) dependencies, performance dropped by an average of 30.9% when switching to the realistic evolution-aware setting, compared to only a 14.0% drop for intra-class tasks. As codebases grow, they naturally contain more reference material, giving evolution-ignored setups an progressively unfair advantage.
  • Docstring Style Matters, But Doesn't Fix the Flaw: While detailed docstrings generally improve LLM performance over brief ones by providing clearer implementation logic, they do not change the underlying trend: performance remains artificially inflated across both styles if software evolution is ignored.

Key Results

The authors evaluated seven mainstream LLMs (including CodeLlama, DeepSeekCoder, GPT-3.5-Turbo, and GPT-4).

  • Performance Overestimation: Previous evaluation methods overestimated LLM success rates by 10.0% to 61.1% depending on the model and context retrieval method.
  • The Evolution Gap: As shown when testing models across incremental project versions (from evo0 representing the true historical state up to evo10 representing later versions), the model's performance artificially climbs simply because it gains access to more future context (see Figure 5).
LLM performance across different project versions

Limitations and Future Work

The authors note a few limitations in their current work:

  • Language Support: HumanEvo currently only supports Python and Java. The authors plan to expand the benchmark to include more programming languages.
  • Prompt Formats: The study did not experiment with every possible prompt configuration, leaving room to optimize how context is presented to the models.
  • Data Leakage Risk: Because the benchmark uses public GitHub data prior to 2023, some code may already exist in the pre-training sets of the studied LLMs. The authors mitigated this by manually rewriting all docstrings and open-sourcing an automated pipeline to continuously update the dataset with newer PRs.

Summary updated

BibTeX
@inproceedings{zheng2025humanevo,
  author = {Dewu Zheng and Yanlin Wang and Ensheng Shi and Ruikai Zhang and Yuchi Ma and Hongyu Zhang and Zibin Zheng},
  title = {{HumanEvo: An Evolution-aware Benchmark for More Realistic Evaluation of Repository-level Code Generation}},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00228},
}
Figure