Code2Bench: Scaling Source and Rigor for Dynamic Benchmark Construction

Zhe Zhang, Runlin Liu, Aishan Liu, Xingyu Liu, Xiang Gao +1 more
8/10/2025
cs.SEcs.AI

No official code found. Best implementation: Code2Bench/Code2Bench (10 stars, Apache-2.0, last commit 2026-02-06).

Abstract

The evaluation of code-generating Large Language Models (LLMs) is fundamentally constrained by two intertwined challenges: a reliance on static, easily contaminated problem sources and the use of superficial, low-rigor testing. This paper introduces a new benchmark construction philosophy, Dual Scaling, designed to systematically address both limitations. Our approach involves continuously scaling the source of problems from dynamic, real-world code repositories and systematically scaling the rigor of tests via automated, high-coverage Property-Based Testing (PBT). We instantiate this philosophy in CODE2BENCH, an end-to-end framework that leverages Scope Graph analysis for principled dependency classification and a 100% branch coverage quality gate to ensure test suite integrity. Using this framework, we construct CODE2BENCH-2509, a new benchmark suite with native instances in both Python and Java. Our extensive evaluation of 10 state-of-the-art LLMs on CODE2BENCH-2509, powered by a novel "diagnostic fingerprint" visualization, yields three key insights: (1) models exhibit a fundamental performance gap, excelling at API application (Weakly Self-Contained tasks) but struggling with algorithmic synthesis (Self-Contained tasks); (2) a model's performance is profoundly shaped by the target language's ecosystem, a nuance we are the first to systematically quantify; and (3) our rigorous, scaled testing is critical in uncovering an "illusion of correctness" prevalent in simpler benchmarks. Our work presents a robust, scalable, and diagnostic paradigm for the next generation of LLM evaluation in software engineering. The code, data, and results are available at https://code2bench.github.io/.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Code2Bench: Scaling Source and Rigor for Dynamic Benchmark Construction

100Go, HTMLMay 11, 20258 months agoApache-2.0

Similar Papers

Cite this paper

@article{zhang2025codebench,
  title  = {Code2Bench: Scaling Source and Rigor for Dynamic Benchmark Construction},
  author = {Zhe Zhang and Runlin Liu and Aishan Liu and Xingyu Liu and Xiang Gao and Hailong Sun},
  year   = {2025},
  eprint = {2508.07180},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.07180v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.07180.svg)](https://codeofpaper.com/paper/2508.07180)

Discussion