instance_id stringlengths 19 52 | repo stringclasses 23
values | language stringclasses 1
value | base_commit stringlengths 40 40 | merge_commit stringlengths 40 40 | refactoring_types listlengths 1 235 | refactoring_descriptions listlengths 1 235 | file_path stringlengths 32 161 | source_code_before stringlengths 0 582k | source_code_after stringlengths 74 582k | diff stringlengths 409 110k | is_pure_refactoring null | compile_before null | compile_after null | FAIL_TO_PASS null | PASS_TO_PASS null | created_at timestamp[s]date 2007-01-01 21:39:28 2026-05-20 09:53:24 | repo_license stringclasses 2
values | lines_changed int64 1 799 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Aiven-Open__http-connector-for-apache-kafka-a6905ff3 | Aiven-Open/http-connector-for-apache-kafka | java | 712c44ccf6505b7c815bcfb2160badcc92d05a02 | a6905ff36fb6db5395a27c9653859ea2ebad6e25 | [
"Extract Variable",
"Add Parameter",
"Add Parameter",
"Add Method Annotation",
"Add Method Annotation",
"Remove Method Annotation"
] | [
"Extract Variable configMap : Map<String,String> in method package refreshAccessToken(configuredErrorCodes String, sendErrorCode String) : void from class io.aiven.kafka.connect.http.sender.OAuth2HttpSenderTest",
"Add Parameter configuredErrorCodes : String in method package refreshAccessToken(configuredErrorCode... | src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java | /*
* Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | /*
* Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | diff --git a/src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java b/src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java
index 0e2e924..4a51c6c 100644
--- a/src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java
+++ b/src/main/java/io/aiven/kafka/connect/http/config/HttpSin... | null | null | null | null | null | 2025-12-24T16:18:30 | Apache-2.0 | 100 |
Aiven-Open__http-connector-for-apache-kafka-7247fdf9 | Aiven-Open/http-connector-for-apache-kafka | java | fd722fbffa96aca9a42f37a5032d3a7a45a34208 | 7247fdf99667ac0841153bb4af361fa9a9e581bf | [
"Extract Method",
"Extract Method",
"Move Attribute"
] | [
"Extract Method private configureProxy(config HttpSinkConfig, clientBuilder HttpClient.Builder) : void extracted from package buildHttpClient(config HttpSinkConfig) : HttpClient in class io.aiven.kafka.connect.http.sender.HttpSenderFactory",
"Extract Method private configureSsl(config HttpSinkConfig, clientBuilde... | src/test/java/io/aiven/kafka/connect/http/sender/HttpSenderFactoryTest.java | /*
* Copyright 2024 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | /*
* Copyright 2024 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | diff --git a/build.gradle.kts b/build.gradle.kts
index 3fa7c84..77df4ca 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -135,6 +135,8 @@ dependencies {
testImplementation("org.mockito:mockito-core:$mockitoVersion")
testImplementation("org.mockito:mockito-junit-jupiter:$mockitoVersion")
testImplem... | null | null | null | null | null | 2025-10-07T13:50:13 | Apache-2.0 | 577 |
Aiven-Open__http-connector-for-apache-kafka-9b949707 | Aiven-Open/http-connector-for-apache-kafka | java | ad0abbe5a727a102cb66a38977a1d41e4550de9a | 9b949707343d5f617068b3f4dc4d45a18fba8639 | [
"Add Parameter",
"Add Class Annotation",
"Change Attribute Access Modifier",
"Remove Attribute Modifier",
"Add Parameter",
"Add Parameter",
"Add Parameter"
] | [
"Add Parameter decimalFormat : DecimalFormat in method public JsonRecordValueConverter(decimalFormat DecimalFormat) from class io.aiven.kafka.connect.http.converter.JsonRecordValueConverter",
"Add Class Annotation @ExtendWith(MockitoExtension.class) in class io.aiven.kafka.connect.http.converter.RecordValueConver... | src/test/java/io/aiven/kafka/connect/http/converter/RecordValueConverterTest.java | /*
* Copyright 2021 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | /*
* Copyright 2021 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | diff --git a/build.gradle.kts b/build.gradle.kts
index 63d167e..7cb35c1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -125,11 +125,11 @@ dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("org.slf4j:slf4j-api:$slf4japiVersion")
- testRunt... | null | null | null | null | null | 2025-02-26T12:14:06 | Apache-2.0 | 319 |
Aiven-Open__http-connector-for-apache-kafka-6b15652f | Aiven-Open/http-connector-for-apache-kafka | java | a9a9a6e701f89fe642f95034ebdc41a4f212ca9e | 6b15652f04bffddbd4d0803768e6b8e12a919cab | [
"Extract Method"
] | [
"Extract Method private getAllSerializableImplementedInterfaces(recordClazz Class<?>) : List<Class<?>> extracted from public convert(record SinkRecord) : String in class io.aiven.kafka.connect.http.converter.RecordValueConverter"
] | src/main/java/io/aiven/kafka/connect/http/converter/RecordValueConverter.java | /*
* Copyright 2021 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | /*
* Copyright 2021 Aiven Oy and http-connector-for-apache-kafka project contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | diff --git a/src/main/java/io/aiven/kafka/connect/http/converter/RecordValueConverter.java b/src/main/java/io/aiven/kafka/connect/http/converter/RecordValueConverter.java
index 0324f30..29a4425 100644
--- a/src/main/java/io/aiven/kafka/connect/http/converter/RecordValueConverter.java
+++ b/src/main/java/io/aiven/kafka/... | null | null | null | null | null | 2024-05-21T10:22:29 | Apache-2.0 | 103 |
Aiven-Open__http-connector-for-apache-kafka-f9b8b9ae | Aiven-Open/http-connector-for-apache-kafka | java | 29287f39211ff0cfde4676c1ccb5441c8f3788a3 | f9b8b9aeb39470a20ecd5ba430b30d9c4afd2880 | [
"Extract Method"
] | ["Extract Method package buildHttpClient(config HttpSinkConfig) : HttpClient extracted from public c(...TRUNCATED) | src/main/java/io/aiven/kafka/connect/http/sender/HttpSenderFactory.java | "/*\n * Copyright 2023 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "/*\n * Copyright 2023 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "diff --git a/src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java b/src/main/java/i(...TRUNCATED) | null | null | null | null | null | 2024-01-05T20:21:38 | Apache-2.0 | 152 |
Aiven-Open__http-connector-for-apache-kafka-5401d270 | Aiven-Open/http-connector-for-apache-kafka | java | 796d961063b3e58668b66e013227abe3bfb0e7fa | 5401d2706390682ca4c3e8d5c8ae3ccf2e2e4687 | [
"Add Class Modifier"
] | [
"Add Class Modifier final in class io.aiven.kafka.connect.http.config.HttpSinkConfig"
] | src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java | "/*\n * Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "/*\n * Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "diff --git a/build.gradle b/build.gradle\ndeleted file mode 100644\nindex ad346b4..0000000\n--- a/b(...TRUNCATED) | null | null | null | null | null | 2024-02-29T07:49:54 | Apache-2.0 | 547 |
Aiven-Open__http-connector-for-apache-kafka-88f7b260 | Aiven-Open/http-connector-for-apache-kafka | java | 0620e1d17be86e531dbd81eb477c749edc4de456 | 88f7b26099e19980196b7b41bb00485fd83219c8 | [
"Rename Method",
"Rename Variable",
"Rename Method",
"Split Method"
] | ["Rename Method private handleMissingConfigurationForOAuth2() : void renamed to private validateOAut(...TRUNCATED) | src/test/java/io/aiven/kafka/connect/http/sender/request/OAuth2AccessTokenRequestFormTest.java | "/*\n * Copyright 2023 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "/*\n * Copyright 2023 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "diff --git a/src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java b/src/main/java/i(...TRUNCATED) | null | null | null | null | null | 2023-09-25T09:33:22 | Apache-2.0 | 64 |
Aiven-Open__http-connector-for-apache-kafka-2d1de716 | Aiven-Open/http-connector-for-apache-kafka | java | e841c6e5ea2da60280a9c73cc719ab7dc3014daa | 2d1de71654996621f567e376fc9e7e9a49a24f19 | ["Rename Class","Rename Method","Rename Method","Rename Method","Rename Attribute","Rename Attribute(...TRUNCATED) | ["Rename Class io.aiven.kafka.connect.http.sender.request.OAuth2Form renamed to io.aiven.kafka.conne(...TRUNCATED) | src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java | "/*\n * Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "/*\n * Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "diff --git a/src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java b/src/main/java/i(...TRUNCATED) | null | null | null | null | null | 2023-07-25T14:25:56 | Apache-2.0 | 266 |
Aiven-Open__http-connector-for-apache-kafka-e841c6e5 | Aiven-Open/http-connector-for-apache-kafka | java | b941824c1090437f280579f3b6ee9875f0e80239 | e841c6e5ea2da60280a9c73cc719ab7dc3014daa | ["Remove Class Annotation","Rename Method","Add Attribute Modifier","Add Attribute Modifier","Add At(...TRUNCATED) | ["Remove Class Annotation @Builder in class io.aiven.kafka.connect.http.sender.request.OAuth2Form","(...TRUNCATED) | src/main/java/io/aiven/kafka/connect/http/sender/request/OAuth2Form.java | "/*\n * Copyright 2021 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "/*\n * Copyright 2021 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "diff --git a/build.gradle b/build.gradle\nindex 2e2b161..2d55182 100644\n--- a/build.gradle\n+++ b/(...TRUNCATED) | null | null | null | null | null | 2023-07-13T13:02:04 | Apache-2.0 | 153 |
Aiven-Open__http-connector-for-apache-kafka-b941824c | Aiven-Open/http-connector-for-apache-kafka | java | 6e6c34339cd17b4793d5d322a6f2293a0383bec9 | b941824c1090437f280579f3b6ee9875f0e80239 | ["Extract Method","Extract Variable","Move Method","Move Method","Add Method Modifier","Extract Clas(...TRUNCATED) | ["Extract Method private handleMissingConfigurationForOAuth2() : void extracted from private validat(...TRUNCATED) | src/main/java/io/aiven/kafka/connect/http/config/HttpSinkConfig.java | "/*\n * Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "/*\n * Copyright 2019 Aiven Oy and http-connector-for-apache-kafka project contributors\n *\n * Lic(...TRUNCATED) | "diff --git a/build.gradle b/build.gradle\nindex 2d55182..2e2b161 100644\n--- a/build.gradle\n+++ b/(...TRUNCATED) | null | null | null | null | null | 2023-06-29T15:56:46 | Apache-2.0 | 374 |
Java Refactoring Benchmark
Task
Given a Java source file before a refactoring and the refactoring type, produce the refactored file.
Schema
instance_id— unique identifierrepo— GitHub repo (owner/name)language— "java"base_commit— parent SHA (before state)merge_commit— commit where refactoring was appliedrefactoring_types— list of RefactoringMiner type names detected in this commitrefactoring_descriptions— corresponding human-readable descriptionsfile_path— primary changed Java file (most lines changed)source_code_before— full file content before refactoringsource_code_after— full file content after refactoring (ground truth)diff— full unified diff of the commit (all changed files)is_pure_refactoring— null = not yet checked; true = no extraneous changescompile_before/compile_after— null = not yet verifiedPASS_TO_PASS/FAIL_TO_PASS— null = not yet verifiedcreated_at— commit timestamp (ISO 8601)repo_license— SPDX license of the source repolines_changed— total lines changed in the commit
Split
test: 5857 instances from 23 repos
Refactoring types
{ "Change Variable Type": 2443, "Add Method Annotation": 2338, "Change Return Type": 1690, "Change Parameter Type": 1595, "Extract Method": 1398, "Add Parameter": 1351, "Rename Method": 1306, "Extract Variable": 1283, "Change Method Access Modifier": 1183, "Rename Variable": 1089, "Remove Method Annotation": 1018, "Change Attribute Type": 957, "Rename Parameter": 852, "Remove Thrown Exception Type": 738, "Add Attribute Modifier": 656, "Remove Parameter": 611, "Inline Variable": 595, "Extract And Move Method": 586, "Change Attribute Access Modifier": 572, "Rename Attribute": 517, "Move Method": 510, "Add Class Annotation": 419, "Pull Up Method": 392, "Encapsulate Attribute": 310, "Modify Method Annotation": 287, "Move Class": 282, "Add Attribute Annotation": 270, "Add Method Modifier": 263, "Add Thrown Exception Type": 238, "Rename Class": 235, "Change Class Access Modifier": 224, "Modify Class Annotation": 213, "Replace Variable With Attribute": 212, "Remove Attribute Modifier": 211, "Inline Method": 207, "Move Code": 196, "Remove Class Annotation": 192, "Parameterize Variable": 186, "Add Parameter Modifier": 185, "Pull Up Attribute": 182, "Invert Condition": 175, "Remove Method Modifier": 174, "Add Parameter Annotation": 168, "Move Attribute": 155, "Extract Attribute": 154, "Add Variable Modifier": 148, "Extract Class": 144, "Remove Attribute Annotation": 142, "Move And Rename Method": 133, "Change Thrown Exception Type": 128, "Move And Inline Method": 128, "Push Down Method": 127, "Remove Parameter Modifier": 109, "Assert Throws": 105, "Remove Parameter Annotation": 90, "Replace Generic With Diamond": 90, "Replace Attribute With Variable": 84, "Move And Rename Class": 81, "Move Source Folder": 81, "Localize Parameter": 80, "Merge Conditional": 80, "Add Class Modifier": 71, "Split Conditional": 70, "Replace Anonymous With Lambda": 59, "Remove Class Modifier": 57, "Extract Superclass": 56, "Remove Variable Modifier": 55, "Extract Fixture": 52, "Replace Conditional With Ternary": 48, "Inline Attribute": 43, "Modify Attribute Annotation": 41, "Replace Anonymous With Class": 37, "Try With Resources": 32, "Change Type Declaration Kind": 31, "Merge Parameter": 28, "Push Down Attribute": 25, "Extract Interface": 24, "Parameterize Attribute": 23, "Reorder Parameter": 23, "Split Parameter": 20, "Split Method": 16, "Rename Package": 14, "Merge Variable": 14, "Move And Rename Attribute": 13, "Extract Subclass": 12, "Move Package": 11, "Replace Loop With Pipeline": 10, "Replace Pipeline With Loop": 10, "Parameterize Test": 9, "Remove Variable Annotation": 9, "Merge Attribute": 9, "Merge Catch": 9, "Split Attribute": 8, "Add Variable Annotation": 7, "Modify Parameter Annotation": 6, "Replace Conditional With Assumption": 6, "Merge Class": 5, "Replace Attribute": 5, "Collapse Hierarchy": 4, "Merge Method": 3, "Split Class": 2, "Split Variable": 1 }
Detection
Mined using RefactoringMiner 3.1.3.
- Downloads last month
- 5