JMigBench: A Benchmark for Evaluating LLMs on Source Code Migration (Java 8 to Java 11)

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Amin, Nishil, Fei, Zhiwei, Li, Xiang, Petke, Justyna, Ye, He
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866918331221540864
author Amin, Nishil
Fei, Zhiwei
Li, Xiang
Petke, Justyna
Ye, He
author_facet Amin, Nishil
Fei, Zhiwei
Li, Xiang
Petke, Justyna
Ye, He
contents We build a benchmark to evaluate large language models (LLMs) for source code migration tasks, specifically upgrading functions from Java 8 to Java 11. We first collected a dataset of function pairs from open-source repositories, but limitations in data quality led us to construct a refined dataset covering eight categories of deprecated APIs. Using this dataset, the Mistral Codestral model was evaluated with CodeBLEU and keyword-based metrics to measure lexical and semantic similarity as well as migration correctness. Results show that the evaluated model (Mistral Codestral) can handle trivial one-to-one API substitutions with moderate success, achieving identical migrations in 11.11% of the cases, but it struggles with more complex migrations such as CORBA or JAX-WS. These findings suggest Mistral Codestral can partially reduce developer effort by automating repetitive migration tasks but cannot yet replace humans within the scope of the JMigBench benchmark. The benchmark and analysis provide a foundation for future work on expanding datasets, refining prompting strategies, and improving migration performance across different LLMs.
format Preprint
id arxiv_https___arxiv_org_abs_2602_09930
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle JMigBench: A Benchmark for Evaluating LLMs on Source Code Migration (Java 8 to Java 11)
Amin, Nishil
Fei, Zhiwei
Li, Xiang
Petke, Justyna
Ye, He
Software Engineering
We build a benchmark to evaluate large language models (LLMs) for source code migration tasks, specifically upgrading functions from Java 8 to Java 11. We first collected a dataset of function pairs from open-source repositories, but limitations in data quality led us to construct a refined dataset covering eight categories of deprecated APIs. Using this dataset, the Mistral Codestral model was evaluated with CodeBLEU and keyword-based metrics to measure lexical and semantic similarity as well as migration correctness. Results show that the evaluated model (Mistral Codestral) can handle trivial one-to-one API substitutions with moderate success, achieving identical migrations in 11.11% of the cases, but it struggles with more complex migrations such as CORBA or JAX-WS. These findings suggest Mistral Codestral can partially reduce developer effort by automating repetitive migration tasks but cannot yet replace humans within the scope of the JMigBench benchmark. The benchmark and analysis provide a foundation for future work on expanding datasets, refining prompting strategies, and improving migration performance across different LLMs.
title JMigBench: A Benchmark for Evaluating LLMs on Source Code Migration (Java 8 to Java 11)
topic Software Engineering
url https://arxiv.org/abs/2602.09930