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:
- 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.
- 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.
- 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.
- 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.
- 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.
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.
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