| 
							 | 
						--- | 
					
					
						
						| 
							 | 
						license: apache-2.0 | 
					
					
						
						| 
							 | 
						dataset_info: | 
					
					
						
						| 
							 | 
						  features: | 
					
					
						
						| 
							 | 
						  - name: repo | 
					
					
						
						| 
							 | 
						    dtype: string | 
					
					
						
						| 
							 | 
						  - name: base_commit | 
					
					
						
						| 
							 | 
						    dtype: string | 
					
					
						
						| 
							 | 
						  - name: num_java_files | 
					
					
						
						| 
							 | 
						    dtype: int32 | 
					
					
						
						| 
							 | 
						  - name: num_loc | 
					
					
						
						| 
							 | 
						    dtype: int32 | 
					
					
						
						| 
							 | 
						  - name: num_pom_xml | 
					
					
						
						| 
							 | 
						    dtype: int32 | 
					
					
						
						| 
							 | 
						  - name: num_src_test_java_files | 
					
					
						
						| 
							 | 
						    dtype: int32 | 
					
					
						
						| 
							 | 
						  - name: num_test_cases | 
					
					
						
						| 
							 | 
						    dtype: int32 | 
					
					
						
						| 
							 | 
						  - name: license | 
					
					
						
						| 
							 | 
						    dtype: string | 
					
					
						
						| 
							 | 
						  splits: | 
					
					
						
						| 
							 | 
						  - name: test | 
					
					
						
						| 
							 | 
						    num_examples: 5102 | 
					
					
						
						| 
							 | 
						programming_languages: | 
					
					
						
						| 
							 | 
						- java | 
					
					
						
						| 
							 | 
						tags: | 
					
					
						
						| 
							 | 
						- coding | 
					
					
						
						| 
							 | 
						- code-migration | 
					
					
						
						| 
							 | 
						- java | 
					
					
						
						| 
							 | 
						- amazon | 
					
					
						
						| 
							 | 
						- amazon-science | 
					
					
						
						| 
							 | 
						- aws | 
					
					
						
						| 
							 | 
						task_categories: | 
					
					
						
						| 
							 | 
						- text-generation | 
					
					
						
						| 
							 | 
						--- | 
					
					
						
						| 
							 | 
						 | 
					
					
						
						| 
							 | 
						# MigrationBench | 
					
					
						
						| 
							 | 
						<table> | 
					
					
						
						| 
							 | 
						  <tr> | 
					
					
						
						| 
							 | 
						    <td style="padding: 0;"> | 
					
					
						
						| 
							 | 
						      <a href="https://huggingface.co/collections/AmazonScience/migrationbench-68125452fc21a4564b92b6c3"> | 
					
					
						
						| 
							 | 
						        <img src="https://img.shields.io/badge/-π€ MigrationBench-4d5eff?style=flatten&labelColor" alt="MigrationBench (Hugging Face)"> | 
					
					
						
						| 
							 | 
						      </a> | 
					
					
						
						| 
							 | 
						    </td> | 
					
					
						
						| 
							 | 
						    <td style="padding: 0;"> | 
					
					
						
						| 
							 | 
						      <a href="https://github.com/amazon-science/MigrationBench"> | 
					
					
						
						| 
							 | 
						        <img src="https://img.shields.io/badge/MigrationBench-000000?style=flatten&logo=github" alt="MigrationBench (GitHub)"> | 
					
					
						
						| 
							 | 
						      </a> | 
					
					
						
						| 
							 | 
						    </td> | 
					
					
						
						| 
							 | 
						    <td style="padding: 0;"> | 
					
					
						
						| 
							 | 
						      <a href="https://github.com/amazon-science/SDFeedback"> | 
					
					
						
						| 
							 | 
						        <img src="https://img.shields.io/badge/SDFeedback-000000?style=flatten&logo=github&logoColor=white" alt="SDFeedback (GitHub)"> | 
					
					
						
						| 
							 | 
						      </a> | 
					
					
						
						| 
							 | 
						    </td> | 
					
					
						
						| 
							 | 
						    <td style="padding: 0;"> | 
					
					
						
						| 
							 | 
						      <a href="https://arxiv.org/abs/2505.09569"> | 
					
					
						
						| 
							 | 
						        <img src="https://img.shields.io/badge/arXiv-2505.09569-b31b1b.svg?style=flatten" alt="MigrationBench (arXiv)"> | 
					
					
						
						| 
							 | 
						      </a> | 
					
					
						
						| 
							 | 
						    </td> | 
					
					
						
						| 
							 | 
						    <td style="padding: 0; padding-left: 10px; vertical-align: middle;"> | 
					
					
						
						| 
							 | 
						      <a href="https://huggingface.co/datasets/AmazonScience/migration-bench-java-full"> | 
					
					
						
						| 
							 | 
						        <img src="https://img.shields.io/badge/-π€ java--full-8a98ff?style=flat&labelColor" alt="java-full"> | 
					
					
						
						| 
							 | 
						      </a> | 
					
					
						
						| 
							 | 
						    </td> | 
					
					
						
						| 
							 | 
						    <td style="padding: 0; vertical-align: middle;"> | 
					
					
						
						| 
							 | 
						      <a href="https://huggingface.co/datasets/AmazonScience/migration-bench-java-selected"> | 
					
					
						
						| 
							 | 
						        <img src="https://img.shields.io/badge/-π€ java--selected-8a98ff?style=flat&labelColor" alt="java-selected"> | 
					
					
						
						| 
							 | 
						      </a> | 
					
					
						
						| 
							 | 
						    </td> | 
					
					
						
						| 
							 | 
						    <td style="padding: 0; vertical-align: middle;"> | 
					
					
						
						| 
							 | 
						      <a href="https://huggingface.co/datasets/AmazonScience/migration-bench-java-utg"> | 
					
					
						
						| 
							 | 
						        <img src="https://img.shields.io/badge/-π€ java--utg-8a98ff?style=flat&labelColor" alt="java-utg"> | 
					
					
						
						| 
							 | 
						      </a> | 
					
					
						
						| 
							 | 
						    </td> | 
					
					
						
						| 
							 | 
						  </tr> | 
					
					
						
						| 
							 | 
						</table> | 
					
					
						
						| 
							 | 
						 | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						## 1. π Overview | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						[π€ MigrationBench](https://huggingface.co/collections/AmazonScience/migrationbench-68125452fc21a4564b92b6c3) | 
					
					
						
						| 
							 | 
						is a large-scale code migration benchmark dataset at the **repository** level, | 
					
					
						
						| 
							 | 
						across multiple programming languages. | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						- Current and initial release includes `java 8` repositories with the `maven` build system, as of May 2025. | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						## 2. Datasets | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						There are three datasets in [π€ MigrationBench](https://huggingface.co/collections/AmazonScience/migrationbench-68125452fc21a4564b92b6c3): | 
					
					
						
						| 
							 | 
						- All repositories included in the datasets are available on GitHub, under the `MIT` or `Apache-2.0` license. | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						| Index | Dataset                                       | Size  | Notes                                                                                               | | 
					
					
						
						| 
							 | 
						|-------|-----------------------------------------------|-------|-----------------------------------------------------------------------------------------------------| | 
					
					
						
						| 
							 | 
						| 1     | [π€ `AmazonScience/migration-bench-java-full`](https://huggingface.co/datasets/AmazonScience/migration-bench-java-full)         | 5,102 | Each repo has a test directory or at least one test case                              | | 
					
					
						
						| 
							 | 
						| 2     | [π€ `AmazonScience/migration-bench-java-selected`](https://huggingface.co/datasets/AmazonScience/migration-bench-java-selected) |   300 | A **subset** of [π€ `migration-bench-java-full`](https://huggingface.co/datasets/AmazonScience/migration-bench-java-full)                                          | | 
					
					
						
						| 
							 | 
						| 3     | [π€ `AmazonScience/migration-bench-java-utg`](https://huggingface.co/datasets/AmazonScience/migration-bench-java-utg)           | 4,814 | The unit test generation (utg) dataset, **disjoint** with [π€ `migration-bench-java-full`](https://huggingface.co/datasets/AmazonScience/migration-bench-java-full)| | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						## 3. Metadata | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						Metadata is provided in the `csv` file for each dataset: | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						1. `repo (str)`: The original repo URL without the `https://github.com/` prefix | 
					
					
						
						| 
							 | 
						1. `base_commit (str)`: Base commit id | 
					
					
						
						| 
							 | 
						    - At this commit with `java 8` and `maven`, the repository is able to (1) compile and (2) pass existing unit tests and integration tests if any | 
					
					
						
						| 
							 | 
						    - It is the starting point for code migration from `java 8` | 
					
					
						
						| 
							 | 
						1. `num_java_files (int)`: Number of `*.java` files in the repository at `base_commit`, similarly for all other `num_*` columns | 
					
					
						
						| 
							 | 
						1. `num_loc (int)`: Lines of code for the repository | 
					
					
						
						| 
							 | 
						1. `num_pom_xml (int)`: Number of modules (`pom.xml` files) in the repository | 
					
					
						
						| 
							 | 
						1. `num_src_test_java_files (int)`: Number of `*.java` files in the dedicated `src/test/` directory | 
					
					
						
						| 
							 | 
						1. `num_test_cases (int)`: Number of test cases, based on running the `mvn -f test .` command in the root directory | 
					
					
						
						| 
							 | 
						    - Non negative values indicate number of test cases is parsed correctly from the output | 
					
					
						
						| 
							 | 
						    - Negative values means it's unable to parse the output: `[INFO] Results:` (`-2`) or `[INFO] Tests run:` (`-1`) regex is missing | 
					
					
						
						| 
							 | 
						1. `license (str)`: The license of the repository, either `MIT` or `Apache2.0` for the whole dataset | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						### 3.1 Parsing Java Test Cases | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						Here is a sample `maven -f test .` command output to get valid `num_test_cases`: | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						``` | 
					
					
						
						| 
							 | 
						... | 
					
					
						
						| 
							 | 
						[INFO] Results: | 
					
					
						
						| 
							 | 
						[INFO] | 
					
					
						
						| 
							 | 
						[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 | 
					
					
						
						| 
							 | 
						... | 
					
					
						
						| 
							 | 
						``` | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						## 4. π Citation | 
					
					
						
						| 
							 | 
						
 | 
					
					
						
						| 
							 | 
						```bibtex | 
					
					
						
						| 
							 | 
						@misc{liu2025migrationbenchrepositorylevelcodemigration, | 
					
					
						
						| 
							 | 
						      title={MigrationBench: Repository-Level Code Migration Benchmark from Java 8}, | 
					
					
						
						| 
							 | 
						      author={Linbo Liu and Xinle Liu and Qiang Zhou and Lin Chen and Yihan Liu and Hoan Nguyen and Behrooz Omidvar-Tehrani and Xi Shen and Jun Huan and Omer Tripp and Anoop Deoras}, | 
					
					
						
						| 
							 | 
						      year={2025}, | 
					
					
						
						| 
							 | 
						      eprint={2505.09569}, | 
					
					
						
						| 
							 | 
						      archivePrefix={arXiv}, | 
					
					
						
						| 
							 | 
						      primaryClass={cs.SE}, | 
					
					
						
						| 
							 | 
						      url={https://arxiv.org/abs/2505.09569}, | 
					
					
						
						| 
							 | 
						} | 
					
					
						
						| 
							 | 
						``` | 
					
					
						
						| 
							 | 
						
 |