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

SWE-bench-java: A GitHub Issue Resolving Benchmark for Java

Daoguang Zan, Zhirong Huang, Ailun Yu, Shaoxin Lin, Yifan Shi, Wei Liu, Dong Chen, Zongshuai Qi, Hao Yu, Lei Yu, Dezhi Ran, Muhan Zeng, Bo Shen, Pan Bian, Guangtai Liang, Bei Guan, Pengjie Huang, Tao Xie, Yongji Wang, Qianxiang WangarXiv 2024 · DOI

Introduction

In the past year, the evaluation of Large Language Models (LLMs) for software engineering has shifted from simple code generation tasks, such as "HumanEval" snippets, to the more complex challenge of issue resolving. This task requires an AI agent to ingest a bug report, navigate a large-scale codebase, and submit a functional, verified patch. While the original SWE-bench established this paradigm for Python, the enterprise world relies heavily on Java for finance, cloud infrastructure, and mobile development.

This paper introduces SWE-bench-java, the first major expansion of the SWE-bench framework into the Java ecosystem. By curating 91 manually verified real-world GitHub issues across six popular repositories, the researchers provide a rigorous testing ground for autonomous AI programmers in a language characterized by strict typing, verbose boilerplate, and complex dependency management (Maven/Gradle).

Methodology

Building a reliable benchmark for Java required more than a simple port of Python scripts. The authors developed a specialized pipeline to ensure every issue is reproducible and verifiable:

  1. Candidate Collection: The team aggregated candidates from high-star GitHub repositories and the Defects4J database, narrowing an initial pool of 70 candidates down to 19 high-quality open-source projects.
  2. Environment Standardization: To handle Java's environmental sensitivities, the researchers used Docker to containerize each issue. The pipeline automatically identifies the required JDK version and build tool (Maven or Gradle) through static code analysis.
  3. Fail-to-Pass (FTP) Extraction: A bug is only considered "real" if the included tests fail before the patch is applied and pass immediately after.
  4. Manual Verification: To ensure the "verified" status, ten experienced Java developers reviewed the issues using a three-point questionnaire. This process filtered out ambiguous descriptions and poor test coverage, resulting in a final set of 91 high-quality instances.
  5. Agent Adaptation: The researchers adapted SWE-agent, a framework providing LLMs with a terminal-like interface, to operate within these containerized Java environments.

Benchmark Composition

The primary contribution is the SWE-bench-java-verified dataset. It consists of 91 issues sourced from six prominent repositories, including google/gson, apache/dubbo, and several fasterxml/jackson modules.

Distribution of the 91 verified issues across the six selected Java repositories.

As shown in the distribution, jackson-databind represents over half of the dataset, reflecting its complexity and the frequency of real-world issues in high-utility libraries.

Analysis and Observations

Several key insights emerged from the benchmarking process:

  • The Verbosity Correlation: Models like DeepSeek-V2 performed significantly better on repositories with detailed natural language descriptions (e.g., googlecontainertools/jib). Conversely, performance plummeted when descriptions were sparse, suggesting that for Java, an AI's natural language understanding (NLU) is as critical as its logic.
  • Architectural Complexity: Java's branching and merging patterns in large projects proved more complex than the Python projects in the original SWE-bench. The authors had to refine collection scripts to correctly identify "base commits" for these enterprise-grade repositories.
  • The Autonomy Gap: Even state-of-the-art models currently resolve fewer than 10% of these issues. This highlights a persistent struggle with the "architectural" thinking required to navigate and modify large-scale Java projects compared to writing isolated functions.

Evaluation and Results

The researchers evaluated several leading models using the SWE-agent framework. The primary metric was the Resolved Rate (%), representing the percentage of issues where the AI generated a patch that passed all tests.

Performance of various LLMs on the SWE-bench-java-verified benchmark using the SWE-agent framework.

DeepSeek-V2-0628 emerged as the top performer, resolving 9.89% of issues. GPT-4o followed with a 6.59% resolution rate, while smaller or older models like GPT-4o-mini and Doubao-pro struggled significantly, each resolving only a single issue (1.10%). These results indicate that SWE-bench-java provides a "high ceiling" for future research in autonomous software engineering.

Limitations and Future Work

While a significant step forward, the authors acknowledge several limitations. The manual verification process is labor-intensive, which currently limits the dataset to 91 issues. Additionally, the initial SWE-agent implementation for Java was unoptimized; better-tuned environment configurations are expected to yield higher resolution rates. Future work aims to expand this framework to other major languages like Go, Rust, and C++ to create a truly universal benchmark for AI software engineers.

Summary updated

BibTeX
@misc{zan2024swe,
  author = {Daoguang Zan and Zhirong Huang and Ailun Yu and Shaoxin Lin and Yifan Shi and Wei Liu and Dong Chen and Zongshuai Qi and Hao Yu and Lei Yu and Dezhi Ran and Muhan Zeng and Bo Shen and Pan Bian and Guangtai Liang and Bei Guan and Pengjie Huang and Tao Xie and Yongji Wang and Qianxiang Wang},
  title = {{SWE-bench-java: A GitHub Issue Resolving Benchmark for Java}},
  year = {2024},
  eprint = {2408.14354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.14354},
}
Figure