Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,195 +1,59 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- code
|
| 4 |
-
license:
|
| 5 |
task_categories:
|
|
|
|
| 6 |
- text-generation
|
| 7 |
tags:
|
| 8 |
-
- code
|
| 9 |
- refactoring
|
|
|
|
| 10 |
- java
|
| 11 |
-
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
dtype: string
|
| 16 |
-
- name: commit
|
| 17 |
-
dtype: string
|
| 18 |
-
- name: commit_url
|
| 19 |
-
dtype: string
|
| 20 |
-
- name: repo_url
|
| 21 |
-
dtype: string
|
| 22 |
-
- name: refactoring_count
|
| 23 |
-
dtype: int64
|
| 24 |
-
- name: refactoring_types
|
| 25 |
-
list: string
|
| 26 |
-
- name: compile_before
|
| 27 |
-
dtype: bool
|
| 28 |
-
- name: compile_after
|
| 29 |
-
dtype: bool
|
| 30 |
-
- name: tests_pass_before
|
| 31 |
-
dtype: bool
|
| 32 |
-
- name: tests_pass_after
|
| 33 |
-
dtype: bool
|
| 34 |
-
- name: test_count_before
|
| 35 |
-
dtype: int64
|
| 36 |
-
- name: test_count_after
|
| 37 |
-
dtype: int64
|
| 38 |
-
- name: pass_to_pass_tests
|
| 39 |
-
list: string
|
| 40 |
-
- name: fail_to_pass_tests
|
| 41 |
-
list: string
|
| 42 |
-
- name: is_pass_to_pass
|
| 43 |
-
dtype: bool
|
| 44 |
-
- name: pass_to_pass_count
|
| 45 |
-
dtype: int64
|
| 46 |
-
- name: fail_to_pass_count
|
| 47 |
-
dtype: int64
|
| 48 |
-
splits:
|
| 49 |
-
- name: train
|
| 50 |
-
num_bytes: 272840030
|
| 51 |
-
num_examples: 983
|
| 52 |
-
download_size: 272741252
|
| 53 |
-
dataset_size: 272840030
|
| 54 |
-
configs:
|
| 55 |
-
- config_name: default
|
| 56 |
-
data_files:
|
| 57 |
-
- split: train
|
| 58 |
-
path: data/train-*
|
| 59 |
---
|
| 60 |
|
| 61 |
-
# Java Refactoring Benchmark
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
|
|
|
| 65 |
|
| 66 |
-
##
|
| 67 |
-
|
| 68 |
-
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
- `refactoring_descriptions` — corresponding human-readable descriptions
|
| 74 |
-
- `file_path` — primary changed Java file (most lines changed)
|
| 75 |
-
- `source_code_before` — full file content before refactoring
|
| 76 |
-
- `source_code_after` — full file content after refactoring (ground truth)
|
| 77 |
-
- `diff` — full unified diff of the commit (all changed files)
|
| 78 |
-
- `is_pure_refactoring` — null = not yet checked; true = no extraneous changes
|
| 79 |
-
- `compile_before` / `compile_after` — null = not yet verified
|
| 80 |
-
- `PASS_TO_PASS` / `FAIL_TO_PASS` — null = not yet verified
|
| 81 |
-
- `created_at` — commit timestamp (ISO 8601)
|
| 82 |
-
- `repo_license` — SPDX license of the source repo
|
| 83 |
-
- `lines_changed` — total lines changed in the commit
|
| 84 |
|
| 85 |
-
##
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
-
## Refactoring
|
| 89 |
-
|
| 90 |
-
"Change Variable Type": 2443,
|
| 91 |
-
"Add Method Annotation": 2338,
|
| 92 |
-
"Change Return Type": 1690,
|
| 93 |
-
"Change Parameter Type": 1595,
|
| 94 |
-
"Extract Method": 1398,
|
| 95 |
-
"Add Parameter": 1351,
|
| 96 |
-
"Rename Method": 1306,
|
| 97 |
-
"Extract Variable": 1283,
|
| 98 |
-
"Change Method Access Modifier": 1183,
|
| 99 |
-
"Rename Variable": 1089,
|
| 100 |
-
"Remove Method Annotation": 1018,
|
| 101 |
-
"Change Attribute Type": 957,
|
| 102 |
-
"Rename Parameter": 852,
|
| 103 |
-
"Remove Thrown Exception Type": 738,
|
| 104 |
-
"Add Attribute Modifier": 656,
|
| 105 |
-
"Remove Parameter": 611,
|
| 106 |
-
"Inline Variable": 595,
|
| 107 |
-
"Extract And Move Method": 586,
|
| 108 |
-
"Change Attribute Access Modifier": 572,
|
| 109 |
-
"Rename Attribute": 517,
|
| 110 |
-
"Move Method": 510,
|
| 111 |
-
"Add Class Annotation": 419,
|
| 112 |
-
"Pull Up Method": 392,
|
| 113 |
-
"Encapsulate Attribute": 310,
|
| 114 |
-
"Modify Method Annotation": 287,
|
| 115 |
-
"Move Class": 282,
|
| 116 |
-
"Add Attribute Annotation": 270,
|
| 117 |
-
"Add Method Modifier": 263,
|
| 118 |
-
"Add Thrown Exception Type": 238,
|
| 119 |
-
"Rename Class": 235,
|
| 120 |
-
"Change Class Access Modifier": 224,
|
| 121 |
-
"Modify Class Annotation": 213,
|
| 122 |
-
"Replace Variable With Attribute": 212,
|
| 123 |
-
"Remove Attribute Modifier": 211,
|
| 124 |
-
"Inline Method": 207,
|
| 125 |
-
"Move Code": 196,
|
| 126 |
-
"Remove Class Annotation": 192,
|
| 127 |
-
"Parameterize Variable": 186,
|
| 128 |
-
"Add Parameter Modifier": 185,
|
| 129 |
-
"Pull Up Attribute": 182,
|
| 130 |
-
"Invert Condition": 175,
|
| 131 |
-
"Remove Method Modifier": 174,
|
| 132 |
-
"Add Parameter Annotation": 168,
|
| 133 |
-
"Move Attribute": 155,
|
| 134 |
-
"Extract Attribute": 154,
|
| 135 |
-
"Add Variable Modifier": 148,
|
| 136 |
-
"Extract Class": 144,
|
| 137 |
-
"Remove Attribute Annotation": 142,
|
| 138 |
-
"Move And Rename Method": 133,
|
| 139 |
-
"Change Thrown Exception Type": 128,
|
| 140 |
-
"Move And Inline Method": 128,
|
| 141 |
-
"Push Down Method": 127,
|
| 142 |
-
"Remove Parameter Modifier": 109,
|
| 143 |
-
"Assert Throws": 105,
|
| 144 |
-
"Remove Parameter Annotation": 90,
|
| 145 |
-
"Replace Generic With Diamond": 90,
|
| 146 |
-
"Replace Attribute With Variable": 84,
|
| 147 |
-
"Move And Rename Class": 81,
|
| 148 |
-
"Move Source Folder": 81,
|
| 149 |
-
"Localize Parameter": 80,
|
| 150 |
-
"Merge Conditional": 80,
|
| 151 |
-
"Add Class Modifier": 71,
|
| 152 |
-
"Split Conditional": 70,
|
| 153 |
-
"Replace Anonymous With Lambda": 59,
|
| 154 |
-
"Remove Class Modifier": 57,
|
| 155 |
-
"Extract Superclass": 56,
|
| 156 |
-
"Remove Variable Modifier": 55,
|
| 157 |
-
"Extract Fixture": 52,
|
| 158 |
-
"Replace Conditional With Ternary": 48,
|
| 159 |
-
"Inline Attribute": 43,
|
| 160 |
-
"Modify Attribute Annotation": 41,
|
| 161 |
-
"Replace Anonymous With Class": 37,
|
| 162 |
-
"Try With Resources": 32,
|
| 163 |
-
"Change Type Declaration Kind": 31,
|
| 164 |
-
"Merge Parameter": 28,
|
| 165 |
-
"Push Down Attribute": 25,
|
| 166 |
-
"Extract Interface": 24,
|
| 167 |
-
"Parameterize Attribute": 23,
|
| 168 |
-
"Reorder Parameter": 23,
|
| 169 |
-
"Split Parameter": 20,
|
| 170 |
-
"Split Method": 16,
|
| 171 |
-
"Rename Package": 14,
|
| 172 |
-
"Merge Variable": 14,
|
| 173 |
-
"Move And Rename Attribute": 13,
|
| 174 |
-
"Extract Subclass": 12,
|
| 175 |
-
"Move Package": 11,
|
| 176 |
-
"Replace Loop With Pipeline": 10,
|
| 177 |
-
"Replace Pipeline With Loop": 10,
|
| 178 |
-
"Parameterize Test": 9,
|
| 179 |
-
"Remove Variable Annotation": 9,
|
| 180 |
-
"Merge Attribute": 9,
|
| 181 |
-
"Merge Catch": 9,
|
| 182 |
-
"Split Attribute": 8,
|
| 183 |
-
"Add Variable Annotation": 7,
|
| 184 |
-
"Modify Parameter Annotation": 6,
|
| 185 |
-
"Replace Conditional With Assumption": 6,
|
| 186 |
-
"Merge Class": 5,
|
| 187 |
-
"Replace Attribute": 5,
|
| 188 |
-
"Collapse Hierarchy": 4,
|
| 189 |
-
"Merge Method": 3,
|
| 190 |
-
"Split Class": 2,
|
| 191 |
-
"Split Variable": 1
|
| 192 |
-
}
|
| 193 |
|
| 194 |
-
##
|
| 195 |
-
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- code
|
| 4 |
+
license: cc-by-4.0
|
| 5 |
task_categories:
|
| 6 |
+
- text-classification
|
| 7 |
- text-generation
|
| 8 |
tags:
|
|
|
|
| 9 |
- refactoring
|
| 10 |
+
- software-engineering
|
| 11 |
- java
|
| 12 |
+
- testing
|
| 13 |
+
pretty_name: CS4570 Java Refactoring Benchmark (High-Resource)
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1K<n<10K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# CS4570 Java Refactoring Benchmark — High-Resource Tier
|
| 19 |
+
|
| 20 |
+
This dataset contains Java refactoring commits mined from **57 high-resource GitHub repositories** (≥1000 stars, ≥10 contributors).
|
| 21 |
|
| 22 |
+
Each commit was:
|
| 23 |
+
1. Detected by **RefactoringMiner 3.1.3** as containing at least one Java refactoring operation
|
| 24 |
+
2. Verified by building the project and running its test suite **before and after** the commit using Docker (Maven/Gradle with JDK17/21)
|
| 25 |
|
| 26 |
+
## Statistics
|
| 27 |
+
| Metric | Value |
|
| 28 |
+
|--------|-------|
|
| 29 |
+
| Repositories | 57 |
|
| 30 |
+
| Total commits with tests | 983 |
|
| 31 |
+
| PASS_TO_PASS commits | 981 |
|
| 32 |
+
| Unique refactoring types | 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
## Fields
|
| 35 |
+
| Field | Type | Description |
|
| 36 |
+
|-------|------|-------------|
|
| 37 |
+
| `repo` | string | `owner_repo` identifier |
|
| 38 |
+
| `commit` | string | Git commit SHA |
|
| 39 |
+
| `commit_url` | string | GitHub URL to the commit |
|
| 40 |
+
| `repo_url` | string | GitHub URL to the repository |
|
| 41 |
+
| `refactoring_count` | int | Number of refactorings in this commit |
|
| 42 |
+
| `refactoring_types` | list[str] | Refactoring type labels from RefactoringMiner |
|
| 43 |
+
| `compile_before` | bool | Did the project compile at the parent commit? |
|
| 44 |
+
| `compile_after` | bool | Did the project compile after this commit? |
|
| 45 |
+
| `tests_pass_before` | bool | Did ALL tests pass before? |
|
| 46 |
+
| `tests_pass_after` | bool | Did ALL tests pass after? |
|
| 47 |
+
| `test_count_before` | int | Number of tests before |
|
| 48 |
+
| `test_count_after` | int | Number of tests after |
|
| 49 |
+
| `pass_to_pass_tests` | list[str] | Tests that pass both before and after |
|
| 50 |
+
| `fail_to_pass_tests` | list[str] | Tests that fail before but pass after |
|
| 51 |
+
| `is_pass_to_pass` | bool | At least one P2P test exists |
|
| 52 |
+
| `pass_to_pass_count` | int | Number of P2P tests |
|
| 53 |
+
| `fail_to_pass_count` | int | Number of F2P tests |
|
| 54 |
|
| 55 |
+
## Refactoring Types
|
| 56 |
+
Top types: Extract Variable, Add Method Annotation, Rename Variable, Rename Method, Inline Variable, Rename Parameter, Change Variable Type, Add Variable Modifier, Extract Method, Rename Attribute
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
+
## Citation
|
| 59 |
+
TU Delft CS4570 — ML for Software Engineering benchmark, 2026.
|