Upload 3 files
Browse files- .gitattributes +1 -0
- README.md +148 -0
- dataset_info.json +136 -0
- test.jsonl +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
test.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- code
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- code
|
| 9 |
+
- refactoring
|
| 10 |
+
- java
|
| 11 |
+
- benchmark
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Java Refactoring Benchmark
|
| 15 |
+
|
| 16 |
+
## Task
|
| 17 |
+
Given a Java source file before a refactoring and the refactoring type, produce the refactored file.
|
| 18 |
+
|
| 19 |
+
## Schema
|
| 20 |
+
- `instance_id` — unique identifier
|
| 21 |
+
- `repo` — GitHub repo (owner/name)
|
| 22 |
+
- `language` — "java"
|
| 23 |
+
- `base_commit` — parent SHA (before state)
|
| 24 |
+
- `merge_commit` — commit where refactoring was applied
|
| 25 |
+
- `refactoring_types` — list of RefactoringMiner type names detected in this commit
|
| 26 |
+
- `refactoring_descriptions` — corresponding human-readable descriptions
|
| 27 |
+
- `file_path` — primary changed Java file (most lines changed)
|
| 28 |
+
- `source_code_before` — full file content before refactoring
|
| 29 |
+
- `source_code_after` — full file content after refactoring (ground truth)
|
| 30 |
+
- `diff` — full unified diff of the commit (all changed files)
|
| 31 |
+
- `is_pure_refactoring` — null = not yet checked; true = no extraneous changes
|
| 32 |
+
- `compile_before` / `compile_after` — null = not yet verified
|
| 33 |
+
- `PASS_TO_PASS` / `FAIL_TO_PASS` — null = not yet verified
|
| 34 |
+
- `created_at` — commit timestamp (ISO 8601)
|
| 35 |
+
- `repo_license` — SPDX license of the source repo
|
| 36 |
+
- `lines_changed` — total lines changed in the commit
|
| 37 |
+
|
| 38 |
+
## Split
|
| 39 |
+
- `test`: 5857 instances from 23 repos
|
| 40 |
+
|
| 41 |
+
## Refactoring types
|
| 42 |
+
{
|
| 43 |
+
"Change Variable Type": 2443,
|
| 44 |
+
"Add Method Annotation": 2338,
|
| 45 |
+
"Change Return Type": 1690,
|
| 46 |
+
"Change Parameter Type": 1595,
|
| 47 |
+
"Extract Method": 1398,
|
| 48 |
+
"Add Parameter": 1351,
|
| 49 |
+
"Rename Method": 1306,
|
| 50 |
+
"Extract Variable": 1283,
|
| 51 |
+
"Change Method Access Modifier": 1183,
|
| 52 |
+
"Rename Variable": 1089,
|
| 53 |
+
"Remove Method Annotation": 1018,
|
| 54 |
+
"Change Attribute Type": 957,
|
| 55 |
+
"Rename Parameter": 852,
|
| 56 |
+
"Remove Thrown Exception Type": 738,
|
| 57 |
+
"Add Attribute Modifier": 656,
|
| 58 |
+
"Remove Parameter": 611,
|
| 59 |
+
"Inline Variable": 595,
|
| 60 |
+
"Extract And Move Method": 586,
|
| 61 |
+
"Change Attribute Access Modifier": 572,
|
| 62 |
+
"Rename Attribute": 517,
|
| 63 |
+
"Move Method": 510,
|
| 64 |
+
"Add Class Annotation": 419,
|
| 65 |
+
"Pull Up Method": 392,
|
| 66 |
+
"Encapsulate Attribute": 310,
|
| 67 |
+
"Modify Method Annotation": 287,
|
| 68 |
+
"Move Class": 282,
|
| 69 |
+
"Add Attribute Annotation": 270,
|
| 70 |
+
"Add Method Modifier": 263,
|
| 71 |
+
"Add Thrown Exception Type": 238,
|
| 72 |
+
"Rename Class": 235,
|
| 73 |
+
"Change Class Access Modifier": 224,
|
| 74 |
+
"Modify Class Annotation": 213,
|
| 75 |
+
"Replace Variable With Attribute": 212,
|
| 76 |
+
"Remove Attribute Modifier": 211,
|
| 77 |
+
"Inline Method": 207,
|
| 78 |
+
"Move Code": 196,
|
| 79 |
+
"Remove Class Annotation": 192,
|
| 80 |
+
"Parameterize Variable": 186,
|
| 81 |
+
"Add Parameter Modifier": 185,
|
| 82 |
+
"Pull Up Attribute": 182,
|
| 83 |
+
"Invert Condition": 175,
|
| 84 |
+
"Remove Method Modifier": 174,
|
| 85 |
+
"Add Parameter Annotation": 168,
|
| 86 |
+
"Move Attribute": 155,
|
| 87 |
+
"Extract Attribute": 154,
|
| 88 |
+
"Add Variable Modifier": 148,
|
| 89 |
+
"Extract Class": 144,
|
| 90 |
+
"Remove Attribute Annotation": 142,
|
| 91 |
+
"Move And Rename Method": 133,
|
| 92 |
+
"Change Thrown Exception Type": 128,
|
| 93 |
+
"Move And Inline Method": 128,
|
| 94 |
+
"Push Down Method": 127,
|
| 95 |
+
"Remove Parameter Modifier": 109,
|
| 96 |
+
"Assert Throws": 105,
|
| 97 |
+
"Remove Parameter Annotation": 90,
|
| 98 |
+
"Replace Generic With Diamond": 90,
|
| 99 |
+
"Replace Attribute With Variable": 84,
|
| 100 |
+
"Move And Rename Class": 81,
|
| 101 |
+
"Move Source Folder": 81,
|
| 102 |
+
"Localize Parameter": 80,
|
| 103 |
+
"Merge Conditional": 80,
|
| 104 |
+
"Add Class Modifier": 71,
|
| 105 |
+
"Split Conditional": 70,
|
| 106 |
+
"Replace Anonymous With Lambda": 59,
|
| 107 |
+
"Remove Class Modifier": 57,
|
| 108 |
+
"Extract Superclass": 56,
|
| 109 |
+
"Remove Variable Modifier": 55,
|
| 110 |
+
"Extract Fixture": 52,
|
| 111 |
+
"Replace Conditional With Ternary": 48,
|
| 112 |
+
"Inline Attribute": 43,
|
| 113 |
+
"Modify Attribute Annotation": 41,
|
| 114 |
+
"Replace Anonymous With Class": 37,
|
| 115 |
+
"Try With Resources": 32,
|
| 116 |
+
"Change Type Declaration Kind": 31,
|
| 117 |
+
"Merge Parameter": 28,
|
| 118 |
+
"Push Down Attribute": 25,
|
| 119 |
+
"Extract Interface": 24,
|
| 120 |
+
"Parameterize Attribute": 23,
|
| 121 |
+
"Reorder Parameter": 23,
|
| 122 |
+
"Split Parameter": 20,
|
| 123 |
+
"Split Method": 16,
|
| 124 |
+
"Rename Package": 14,
|
| 125 |
+
"Merge Variable": 14,
|
| 126 |
+
"Move And Rename Attribute": 13,
|
| 127 |
+
"Extract Subclass": 12,
|
| 128 |
+
"Move Package": 11,
|
| 129 |
+
"Replace Loop With Pipeline": 10,
|
| 130 |
+
"Replace Pipeline With Loop": 10,
|
| 131 |
+
"Parameterize Test": 9,
|
| 132 |
+
"Remove Variable Annotation": 9,
|
| 133 |
+
"Merge Attribute": 9,
|
| 134 |
+
"Merge Catch": 9,
|
| 135 |
+
"Split Attribute": 8,
|
| 136 |
+
"Add Variable Annotation": 7,
|
| 137 |
+
"Modify Parameter Annotation": 6,
|
| 138 |
+
"Replace Conditional With Assumption": 6,
|
| 139 |
+
"Merge Class": 5,
|
| 140 |
+
"Replace Attribute": 5,
|
| 141 |
+
"Collapse Hierarchy": 4,
|
| 142 |
+
"Merge Method": 3,
|
| 143 |
+
"Split Class": 2,
|
| 144 |
+
"Split Variable": 1
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
## Detection
|
| 148 |
+
Mined using RefactoringMiner 3.1.3.
|
dataset_info.json
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"total_records": 5857,
|
| 3 |
+
"test_count": 5857,
|
| 4 |
+
"skipped_commits": 0,
|
| 5 |
+
"skip_reasons": {},
|
| 6 |
+
"repos": [
|
| 7 |
+
"Aiven-Open/http-connector-for-apache-kafka",
|
| 8 |
+
"ExpediaGroup/waggle-dance",
|
| 9 |
+
"Mastercard/client-encryption-java",
|
| 10 |
+
"SeanDragon/protools",
|
| 11 |
+
"allure-framework/allure-java",
|
| 12 |
+
"etcd-io/jetcd",
|
| 13 |
+
"hibernate/hibernate-tools",
|
| 14 |
+
"jenkinsci/ansible-plugin",
|
| 15 |
+
"jenkinsci/pipeline-as-yaml-plugin",
|
| 16 |
+
"kobylynskyi/graphql-java-codegen",
|
| 17 |
+
"logfellow/logstash-logback-encoder",
|
| 18 |
+
"meilisearch/meilisearch-java",
|
| 19 |
+
"modcluster/mod_cluster",
|
| 20 |
+
"mvel/mvel",
|
| 21 |
+
"pivovarit/throwing-function",
|
| 22 |
+
"prometheus/client_java",
|
| 23 |
+
"sdstoehr/har-reader",
|
| 24 |
+
"selenide/selenide",
|
| 25 |
+
"servertap-io/servertap",
|
| 26 |
+
"shrinkwrap/resolver",
|
| 27 |
+
"smallrye/smallrye-fault-tolerance",
|
| 28 |
+
"spring-io/github-changelog-generator",
|
| 29 |
+
"spring-projects/spring-vault"
|
| 30 |
+
],
|
| 31 |
+
"repo_count": 23,
|
| 32 |
+
"refactoring_type_counts": {
|
| 33 |
+
"Change Variable Type": 2443,
|
| 34 |
+
"Add Method Annotation": 2338,
|
| 35 |
+
"Change Return Type": 1690,
|
| 36 |
+
"Change Parameter Type": 1595,
|
| 37 |
+
"Extract Method": 1398,
|
| 38 |
+
"Add Parameter": 1351,
|
| 39 |
+
"Rename Method": 1306,
|
| 40 |
+
"Extract Variable": 1283,
|
| 41 |
+
"Change Method Access Modifier": 1183,
|
| 42 |
+
"Rename Variable": 1089,
|
| 43 |
+
"Remove Method Annotation": 1018,
|
| 44 |
+
"Change Attribute Type": 957,
|
| 45 |
+
"Rename Parameter": 852,
|
| 46 |
+
"Remove Thrown Exception Type": 738,
|
| 47 |
+
"Add Attribute Modifier": 656,
|
| 48 |
+
"Remove Parameter": 611,
|
| 49 |
+
"Inline Variable": 595,
|
| 50 |
+
"Extract And Move Method": 586,
|
| 51 |
+
"Change Attribute Access Modifier": 572,
|
| 52 |
+
"Rename Attribute": 517,
|
| 53 |
+
"Move Method": 510,
|
| 54 |
+
"Add Class Annotation": 419,
|
| 55 |
+
"Pull Up Method": 392,
|
| 56 |
+
"Encapsulate Attribute": 310,
|
| 57 |
+
"Modify Method Annotation": 287,
|
| 58 |
+
"Move Class": 282,
|
| 59 |
+
"Add Attribute Annotation": 270,
|
| 60 |
+
"Add Method Modifier": 263,
|
| 61 |
+
"Add Thrown Exception Type": 238,
|
| 62 |
+
"Rename Class": 235,
|
| 63 |
+
"Change Class Access Modifier": 224,
|
| 64 |
+
"Modify Class Annotation": 213,
|
| 65 |
+
"Replace Variable With Attribute": 212,
|
| 66 |
+
"Remove Attribute Modifier": 211,
|
| 67 |
+
"Inline Method": 207,
|
| 68 |
+
"Move Code": 196,
|
| 69 |
+
"Remove Class Annotation": 192,
|
| 70 |
+
"Parameterize Variable": 186,
|
| 71 |
+
"Add Parameter Modifier": 185,
|
| 72 |
+
"Pull Up Attribute": 182,
|
| 73 |
+
"Invert Condition": 175,
|
| 74 |
+
"Remove Method Modifier": 174,
|
| 75 |
+
"Add Parameter Annotation": 168,
|
| 76 |
+
"Move Attribute": 155,
|
| 77 |
+
"Extract Attribute": 154,
|
| 78 |
+
"Add Variable Modifier": 148,
|
| 79 |
+
"Extract Class": 144,
|
| 80 |
+
"Remove Attribute Annotation": 142,
|
| 81 |
+
"Move And Rename Method": 133,
|
| 82 |
+
"Change Thrown Exception Type": 128,
|
| 83 |
+
"Move And Inline Method": 128,
|
| 84 |
+
"Push Down Method": 127,
|
| 85 |
+
"Remove Parameter Modifier": 109,
|
| 86 |
+
"Assert Throws": 105,
|
| 87 |
+
"Remove Parameter Annotation": 90,
|
| 88 |
+
"Replace Generic With Diamond": 90,
|
| 89 |
+
"Replace Attribute With Variable": 84,
|
| 90 |
+
"Move And Rename Class": 81,
|
| 91 |
+
"Move Source Folder": 81,
|
| 92 |
+
"Localize Parameter": 80,
|
| 93 |
+
"Merge Conditional": 80,
|
| 94 |
+
"Add Class Modifier": 71,
|
| 95 |
+
"Split Conditional": 70,
|
| 96 |
+
"Replace Anonymous With Lambda": 59,
|
| 97 |
+
"Remove Class Modifier": 57,
|
| 98 |
+
"Extract Superclass": 56,
|
| 99 |
+
"Remove Variable Modifier": 55,
|
| 100 |
+
"Extract Fixture": 52,
|
| 101 |
+
"Replace Conditional With Ternary": 48,
|
| 102 |
+
"Inline Attribute": 43,
|
| 103 |
+
"Modify Attribute Annotation": 41,
|
| 104 |
+
"Replace Anonymous With Class": 37,
|
| 105 |
+
"Try With Resources": 32,
|
| 106 |
+
"Change Type Declaration Kind": 31,
|
| 107 |
+
"Merge Parameter": 28,
|
| 108 |
+
"Push Down Attribute": 25,
|
| 109 |
+
"Extract Interface": 24,
|
| 110 |
+
"Parameterize Attribute": 23,
|
| 111 |
+
"Reorder Parameter": 23,
|
| 112 |
+
"Split Parameter": 20,
|
| 113 |
+
"Split Method": 16,
|
| 114 |
+
"Rename Package": 14,
|
| 115 |
+
"Merge Variable": 14,
|
| 116 |
+
"Move And Rename Attribute": 13,
|
| 117 |
+
"Extract Subclass": 12,
|
| 118 |
+
"Move Package": 11,
|
| 119 |
+
"Replace Loop With Pipeline": 10,
|
| 120 |
+
"Replace Pipeline With Loop": 10,
|
| 121 |
+
"Parameterize Test": 9,
|
| 122 |
+
"Remove Variable Annotation": 9,
|
| 123 |
+
"Merge Attribute": 9,
|
| 124 |
+
"Merge Catch": 9,
|
| 125 |
+
"Split Attribute": 8,
|
| 126 |
+
"Add Variable Annotation": 7,
|
| 127 |
+
"Modify Parameter Annotation": 6,
|
| 128 |
+
"Replace Conditional With Assumption": 6,
|
| 129 |
+
"Merge Class": 5,
|
| 130 |
+
"Replace Attribute": 5,
|
| 131 |
+
"Collapse Hierarchy": 4,
|
| 132 |
+
"Merge Method": 3,
|
| 133 |
+
"Split Class": 2,
|
| 134 |
+
"Split Variable": 1
|
| 135 |
+
}
|
| 136 |
+
}
|
test.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:817899f57a72bd1b14dd3b61e8358aec003283f2f6baaffbeaab0e6f7d90ed8e
|
| 3 |
+
size 222621550
|