sliuxl commited on
Commit
9f120fb
Β·
1 Parent(s): 8bfa077

Initial commit: Add test (demo with 3 rows) dataset and update README.md.

Browse files
Files changed (2) hide show
  1. README.md +117 -3
  2. test.csv +4 -0
README.md CHANGED
@@ -1,3 +1,117 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ dataset_info:
4
+ features:
5
+ - name: repo
6
+ dtype: string
7
+ - name: base_commit
8
+ dtype: string
9
+ - name: num_java_files
10
+ dtype: int32
11
+ - name: num_loc
12
+ dtype: int32
13
+ - name: num_pom_xml
14
+ dtype: int32
15
+ - name: num_src_test_java_files
16
+ dtype: int32
17
+ - name: num_test_cases
18
+ dtype: int32
19
+ - name: license
20
+ dtype: string
21
+ splits:
22
+ - name: test
23
+ num_examples: 3
24
+ programming_languages: [java]
25
+ tags:
26
+ - coding
27
+ - code-migration
28
+ - java
29
+ - amazon
30
+ - amazon-science
31
+ - aws
32
+ ---
33
+
34
+ # MIGRATION-BENCH
35
+ <table>
36
+ <tr>
37
+ <td style="padding: 0;">
38
+ <a href="https://huggingface.co/collections/AmazonScience/migrationbench-68125452fc21a4564b92b6c3">
39
+ <img src="https://img.shields.io/badge/-MIGRATION--BENCH-4d5eff?style=for-the-badge&logo=huggingface&logoColor=ffffff&labelColor" alt="MIGRATION-BENCH">
40
+ </a>
41
+ </td>
42
+ <td style="padding: 0;">
43
+ <a href="https://github.com/amazon-science/self_debug">
44
+ <img src="https://img.shields.io/badge/Code-000000?style=for-the-badge&logo=github&logoColor=white" alt="Code">
45
+ </a>
46
+ </td>
47
+ <td style="padding: 0; padding-left: 10px; vertical-align: middle;">
48
+ <a href="https://huggingface.co/datasets/AmazonScience/migration-bench-java-full">
49
+ <img src="https://img.shields.io/badge/-java--full-8a98ff?style=flat&logo=huggingface&logoColor=ffffff&labelColor" alt="java-full">
50
+ </a>
51
+ </td>
52
+ <td style="padding: 0; vertical-align: middle;">
53
+ <a href="https://huggingface.co/datasets/AmazonScience/migration-bench-java-selected">
54
+ <img src="https://img.shields.io/badge/-java--selected-8a98ff?style=flat&logo=huggingface&logoColor=ffffff&labelColor" alt="java-selected">
55
+ </a>
56
+ </td>
57
+ <td style="padding: 0; vertical-align: middle;">
58
+ <a href="https://huggingface.co/datasets/AmazonScience/migration-bench-java-utg">
59
+ <img src="https://img.shields.io/badge/-java--utg-8a98ff?style=flat&logo=huggingface&logoColor=ffffff&labelColor" alt="java-utg">
60
+ </a>
61
+ </td>
62
+ </tr>
63
+ </table>
64
+
65
+
66
+ ## 1. πŸ“– Overview
67
+
68
+ [πŸ€— MIGRATION-BENCH](https://huggingface.co/collections/AmazonScience/migrationbench-68125452fc21a4564b92b6c3)
69
+ is a large-scale code migration benchmark dataset at the **repository** level,
70
+ across multiple programming languages.
71
+
72
+ - Current and initial release includes `java 8` repositories with the `maven` build system, as of May 2025.
73
+
74
+
75
+ ## 2. Datasets
76
+
77
+ There are three datasets in [πŸ€— MIGRATION-BENCH](https://huggingface.co/collections/AmazonScience/migrationbench-68125452fc21a4564b92b6c3):
78
+ - All repositories included in the datasets are available on GitHub, under the `MIT` or `Apache-2.0` license.
79
+
80
+ | Index | Dataset | Size | Notes |
81
+ |-------|-----------------------------------------------|-------|-----------------------------------------------------------------------------------------------------|
82
+ | 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 |
83
+ | 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) |
84
+ | 3 | [πŸ€— `AmazonScience/migration-bench-java-utg`](https://huggingface.co/datasets/AmazonScience/migration-bench-java-selected) | 4,814 | The unit test generation (utg) dataset, **disjoint** with [πŸ€— `migration-bench-java-full`](https://huggingface.co/datasets/AmazonScience/migration-bench-java-full)|
85
+
86
+
87
+ ## 3. Metadata
88
+
89
+ Metadata is provided in the `csv` file for each dataset:
90
+
91
+ 1. `repo (str)`: The original repo URL without the `https://github.com/` prefix
92
+ 1. `base_commit (str)`: Base commit id
93
+ - 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
94
+ - It is the starting point for code migration from `java 8`
95
+ 1. `num_java_files (int)`: Number of `*.java` files in the repository at `base_commit`, similarly for all other `num_*` columns
96
+ 1. `num_loc (int)`: Lines of code for the repository
97
+ 1. `num_pom_xml (int)`: Number of modules (`pom.xml` files) in the repository
98
+ 1. `num_src_test_java_files (int)`: Number of `*.java` files in the dedicated `src/test/` directory
99
+ 1. `num_test_cases (int)`: Number of test cases, based on running the `mvn -f test .` command in the root directory
100
+ - Non negative values indicate number of test cases is parsed correctly from the output
101
+ - Negative values means it's unable to parse the output: `[INFO] Results:` (`-2`) or `[INFO] Tests run:` (`-1`) regex is missing
102
+ 1. `license (str)`: The license of the repository, either `MIT` or `Apache2.0` for the whole dataset
103
+
104
+ ### 3.1 Parsing Java Test Cases
105
+
106
+ Here is a sample `maven -f test .` command output to get valid `num_test_cases`:
107
+
108
+ ```
109
+ ...
110
+ [INFO] Results:
111
+ [INFO]
112
+ [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
113
+ ...
114
+ ```
115
+
116
+
117
+ ## 4. πŸ“š Citation
test.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ repo,base_commit,num_java_files,num_loc,num_pom_xml,num_src_test_java_files,num_test_cases,license
2
+ 15093015999/EJServer,7e51c59e090484ae4573290099b6936855554064,68,10089,1,1,1,MIT
3
+ 284885166/spring-boot-hashids,4973285e49b48be7b10818fae530159c55af267a,11,614,3,0,1,Apache-2.0
4
+ adlered/Picuang,8c361437de5fe56f45ff6cf6785a033a8e267d2a,25,1500,1,1,1,Apache-2.0