J2KMigBench tests how well LLMs migrate Java to Kotlin
A new benchmark built from real migration pull requests shows two leading models completing most tasks, but many accepted solutions convert only a fraction of the requested files.
In plain words
Migrating a codebase from Java to Kotlin means rewriting files so the program still builds and behaves the same. The authors built a benchmark from real migration work to test whether large language models can do this. The two models they tested passed most tasks, yet some solutions converted only one file where many were requested.
What was announced
The benchmark, J2KMigBench, draws its tasks from real migration pull requests. Each task gives the model the original Java code, a specification grounded in the source and the pull request, and an offline build environment in which the developer's own Kotlin code is withheld. A migration counts as incomplete if any requested Java file is not replaced with its Kotlin counterpart, and existing callers, build configurations and tests all constrain the translation.
From 383 candidate pull requests, the authors' checks produced 31 evaluable tasks across six repositories covering 167 target files. They evaluated Gemini 3.8 Flash and GPT-6.1 Terra with OpenHands under identical task budgets, requiring compilation, preserved baseline tests, and conversion of every requested file. Gemini resolved 25 tasks (80.6%) and Terra 26 (83.9%), at mean costs of USD 1.25 and USD 0.15 respectively. Six patches compiled and kept tests passing while converting at most one target file. Gemini converted more files overall and came closer to the developer's Kotlin, with mean token edit similarity of 0.57 versus 0.53. The authors also observed differing null-handling and accessor choices between the models, without claiming a ranking of idiomatic style.
What it does not show
- The results cover only two models on 31 tasks from six repositories, so the scores may not generalize to other models or codebases.
- The abstract reports the authors' own evaluation; no independent confirmation of the results is available.
- The benchmark's scope is abstract-level; full task details and analysis are not included in the supplied source.
Sources
Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 5 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.