Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

CS4570 Java Refactoring Benchmark

A benchmark of Java refactoring commits mined from GitHub repositories, split into high-resource and low-resource tiers based on repository popularity. Built for the TU Delft CS4570 ML for Software Engineering course (2026).

Dataset split

Tier Repositories Instances Star range
High-resource 57 618 1000-7298
Low-resource ~60 198 13-90
Total 816

Use the resource_tier field to filter by tier. repo_stars and repo_forks are included for fine-grained popularity analysis.

Construction

Each instance is a single-file refactoring commit that was:

  1. Detected by RefactoringMiner 3.1.3 as containing at least one Java refactoring operation
  2. Verified by building the project before and after the commit using Docker (Maven/Gradle, JDK 17/21)
  3. Filtered to commits where the project compiles and tests pass both before and after (pure refactorings)

High-resource repos have >=1000 stars and >=10 contributors; low-resource repos have <100 stars.

Fields

Field Type Description
instance_id string Unique identifier
repo string owner/repo identifier
resource_tier string "high" or "low"
repo_stars int or null GitHub star count at collection time
repo_forks int or null GitHub fork count at collection time
language string Always "java"
base_commit string Parent commit SHA
merge_commit string Refactoring commit SHA
refactoring_types list[str] Refactoring type labels from RefactoringMiner
refactoring_descriptions list[str] or null Human-readable descriptions (HR only)
file_path string Java file path that was refactored
source_code_before string File content at base commit
source_code_after string File content at merge commit
diff string Unified diff between before and after
is_pure_refactoring bool or null True if only refactoring operations changed
compile_before bool or null Project compiled at base commit
compile_after bool or null Project compiled at merge commit
tests_pass_before bool or null All tests pass at base commit
tests_pass_after bool or null All tests pass at merge commit
FAIL_TO_PASS list[str] Tests failing before, passing after
PASS_TO_PASS list[str] Tests passing both before and after
created_at string or null Commit timestamp (ISO 8601)
repo_license string or null SPDX license identifier
lines_changed int or null Lines changed in the refactoring

Refactoring types

Top types across both tiers: Extract Method, Rename Method, Rename Variable, Rename Parameter, Extract Variable, Inline Variable, Change Variable Type, Add Parameter, Add Method Annotation, Rename Attribute.

66 unique refactoring types in total.

Usage

from datasets import load_dataset

ds = load_dataset("Maxros/test", split="test")

# Filter by tier
hr = ds.filter(lambda x: x["resource_tier"] == "high")
lr = ds.filter(lambda x: x["resource_tier"] == "low")

Citation

TU Delft CS4570 -- ML for Software Engineering benchmark, 2026.
Downloads last month
71