SIMCOPILOT: Evaluating Large Language Models for Copilot-Style Code Generation

Mingchao Jiang, Abhinav Jain, Sophia Zorek, Chris JermainearXiv 2025 · DOI

Abstract

SimCopilot is a novel benchmark designed to evaluate Large Language Models (LLMs) in realistic, interactive "Copilot-style" code generation scenarios. Unlike traditional benchmarks that focus on standalone functions, SimCopilot utilizes real-world complex codebases to test contextual understanding and long-distance dependency management. Our findings reveal a "HumanEval Mirage," where models excelling in standard benchmarks often fail in project-level tasks.

Introduction

Most AI-for-code benchmarks, such as HumanEval or MBPP, evaluate models on a narrow use case: writing short, standalone functions from detailed English descriptions. In professional software development, tools like GitHub Copilot are used interactively within large, complex codebases. A developer might be mid-file and require the AI to fill an else block or call a project-specific API defined elsewhere.

Current benchmarks suffer from two major issues: contamination, where models have seen benchmark solutions during training, and a lack of context, failing to test "cross-file" logic or local variable scopes. SimCopilot addresses these by simulating a "pair programmer" environment using real projects.

Methods

The researchers developed a two-stage pipeline to simulate realistic coding tasks. First, Abstract Syntax Trees (AST) are used to identify semantically meaningful blocks—such as loops, functions, and conditionals—within real projects.

The SimCopilot evaluation workflow, from code extraction to final testing.

As shown in Figure 1, a human annotator selects a block to omit. For completion tasks, code is truncated; for infill tasks, a "hole" is created. A specialized post-processor then cleans the LLM's output, removing "chatter" to ensure the code can be re-inserted and validated against a suite of unit tests.

Datasets and Contamination Control

The benchmark introduces two sub-benchmarks:

  • SimCopilotJ (Java): 569 tasks from academic projects (~7,700 lines).
  • SimCopilotP (Python): 594 tasks covering algorithms, computer vision, and neural networks.

To prevent memorization, the repositories used were not publicly accessible prior to the study, ensuring a rigorous test of the models' reasoning rather than retrieval.

Key Insights and Results

The evaluation of 12 state-of-the-art models revealed several critical insights:

The "HumanEval Mirage"

Model rankings on SimCopilot often reverse compared to standard benchmarks. For instance, while Llama 3.3 70B outscores Claude 3 Opus on HumanEval, Claude 3 Opus significantly outperforms Llama on SimCopilot's realistic Python completion tasks (67.4% vs 53.7%). This suggests that standard benchmarks fail to measure true project-level utility.

Contextual Sensitivity

Models are highly sensitive to proximity. Performance drops significantly as the distance between the target code and explanatory comments increases. Furthermore, models consistently perform better at infilling than completion. Having the "right-hand side" context—the code following the gap—provides vital clues about logic and variable types.

Pass rates across Python and Java for Infill and Completion tasks, categorized by code block length.

Model Performance

As illustrated in Figure 5, OpenAI’s o3-mini (high) and Anthropic’s Claude 3.7 Sonnet lead the field, particularly in infill tasks where success rates reach the mid-80% range. The performance gap is notably wider than in traditional benchmarks; in Java infill, the gap between the top model and Llama 3.1 8B exceeded 50 percentage points.

Conclusion

SimCopilot highlights that "Variable Hallucination" and syntax errors remain persistent challenges for LLMs in complex environments. While the current benchmark uses binary success metrics and relatively small codebases, it provides a more accurate reflection of real-world AI assistance. Future work will expand the benchmark to include more languages like C++ and Rust, and explore more nuanced evaluation metrics.

Summary updated

BibTeX
@misc{jiang2025simcopilot,
  author = {Mingchao Jiang and Abhinav Jain and Sophia Zorek and Chris Jermaine},
  title = {{SIMCOPILOT: Evaluating Large Language Models for Copilot-Style Code Generation}},
  year = {2025},
  eprint = {2505.21514},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.21514},
}
Figure