SWINGARENA: Adversarial Programming Arena for Long-context GitHub Issue Solving

Wendong Xu, Jing Xiong, Chenyang Zhao, Qiujiang Chen, Haoran Wang, Hui Shen, Zhongwei Wan, Jianbo Dai, Taiqiang Wu, He Xiao, Chaofan Tao, Zhuoqing Mao, Ying Sheng, Zhijiang Guo, Hongxia Yang, Bei Yu, Lingpeng Kong, Quanquan Gu, Ngai WongICLR 2026

Evaluating how well a Large Language Model (LLM) can write code is notoriously difficult. Early benchmarks like HumanEval tested models on isolated, bite-sized Python functions. Newer benchmarks like SWE-Bench stepped up the realism by using real GitHub issues, but they still rely on static, pre-written unit tests and mostly focus on Python.

Real-world software engineering is highly iterative, collaborative, and multi-lingual. A developer submits a Pull Request (PR), a Continuous Integration (CI) pipeline runs a gauntlet of tests and linters, and human reviewers actively try to find edge cases the developer missed. Current benchmarks fail to capture this dynamic, adversarial environment. An LLM that aces a static benchmark might completely fall apart when faced with the strict formatting, security, and multi-file architectural demands of a professional codebase.

To address this, researchers have introduced SwingArena, a new adversarial evaluation framework that tests LLMs on real-world software engineering tasks by pitting them against each other within actual CI pipelines.

The SwingArena Methodology

To simulate the real-world developer workflow, SwingArena introduces two main innovations: an adversarial CI arena and a multi-language retrieval system.

The SwingArena framework architecture, illustrating the adversarial submitter-reviewer loop and the RACG module.
  1. The Adversarial CI Arena: The framework assigns two LLMs to play a game. The Submitter model reads a GitHub issue and generates a code patch. The Reviewer model analyzes the patch and writes a targeted, adversarial unit test to break it. Both the patch and the test are then executed inside a real, Dockerized CI pipeline (e.g., GitHub Actions) that enforces compilation, linters, and existing repository tests. The models take turns across multiple rounds, iteratively refining their code based on CI feedback.
  2. Retrieval-Augmented Code Generation (RACG): Because real repositories are massive, LLMs cannot process the entire codebase at once. The authors built a multi-language RACG pipeline supporting C++, Python, Rust, and Go. It uses BM25 to find relevant files, parses them into syntax-aware chunks (like functions or classes), and uses a dense reranker (CodeBERT) to pack the most critical context into the LLM's token budget.

To power this arena, the researchers curated a CI-grounded dataset of 2,300 real GitHub issues and PRs across the four supported languages. After rigorous filtering—including native CI checks, LLM-as-a-judge evaluations, and human expert audits—the final benchmark consists of 400 high-quality instances (100 per language).

Key Insights and Results

The adversarial setup revealed that models do not just vary in raw intelligence; they exhibit distinct coding strategies or "personalities."

Adversarial matchup results showcasing Win Rates and Submitter Pass Rates (SPR) across different LLMs.
  • Aggressive vs. Cautious Coders: GPT-4o acts as an "aggressive patcher." It produces patches that frequently beat the reviewer's tests, dominating head-to-head matchups with win rates between 90% and 97%. However, it breaks native CI checks more often, with a Submitter CI Pass Rate (SPR) hovering around 0.55. Conversely, models like DeepSeek and Gemini are "cautious and reliable." They prioritize code that cleanly passes CI formatting and compilation gates, with DeepSeek achieving an SPR of up to 0.66, even if they win slightly fewer adversarial battles.
  • Multi-Language Mastery: DeepSeek-V3 achieved the highest average Best@3 score (0.59) across all languages, showing particularly strong generalization in Rust (0.58) and Go (0.61).
  • The Multi-File Blindspot: When models fail, 31% of the time it is due to cross-file consistency issues. Models excel at local reasoning to fix immediate bugs but struggle with architectural reasoning, such as updating corresponding header files or downstream dependencies.
  • Ignoring the "Boring" Stuff: 24% of failures occurred because models violated non-functional requirements. They wrote functionally correct code that failed strict repository linters, style guides, or security gates, highlighting a gap between raw coding ability and professional software engineering practices.
  • Retrieval Matters: The RACG module significantly boosted performance across the board. In C++, for example, using RACG raised the Best@3 score from 0.38 to 0.42 and the adversarial win rate from 0.77 to 0.84 compared to running without it.

Limitations and Future Work

Simulating full Dockerized CI pipelines iteratively is computationally expensive, which limits the scale at which this benchmark can be run. Additionally, the RACG module is currently capped at retrieving the top 5 files to save tokens. If a bug requires coordinated changes across a highly distributed codebase with loose textual associations, the retrieval system can fail to provide the necessary context (accounting for about 26% of observed failures).

Future work will explore more dynamic, agentic retrieval methods where the LLM can iteratively search the codebase itself, as well as hybrid retrieval systems that understand the structural graph of the code rather than relying solely on text similarity.

Summary updated

BibTeX
@inproceedings{xu2026swingarena,
  author = {Wendong XU and Jing Xiong and Chenyang Zhao and Qiujiang Chen and Haoran Wang and Hui Shen and Zhongwei Wan and Jianbo Dai and Taiqiang Wu and He Xiao and Chaofan Tao and Zhuoqing Mao and Ying Sheng and Zhijiang Guo and Hongxia Yang and Bei Yu and Lingpeng Kong and Quanquan Gu and Ngai Wong},
  title = {{SWINGARENA: Adversarial Programming Arena for Long-context GitHub Issue Solving}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=YuxgSGFaqb},
}
Figure