Skip to content
JournalsWorldThe Global Research Discovery Platform
Featured Dataset

SWE-Refactor: A Repository-Aware Benchmark for Evaluating LLMs on Real-World Code Refactoring

SWE-Refactor SWE-Refactor is a new benchmark for evaluating LLM-based code refactoring. It contains 1099 real-world, pure refactorings collected from 18 Java projects. Each refactoring instance is verif

👤
Creatoranonymous
📅
Published2026-10-06
🔗
DOI10.5281/zenodo.23194601
📊
Downloads407
⚖️
Licensecc-by-4.0
File Size222.5 MB
Data TypeDataset
Published2026
Licensecc-by-4.0
Total Views2,323
Total Downloads407

SWE-Refactor

SWE-Refactor is a new benchmark for evaluating LLM-based code refactoring. It contains 1099 real-world, pure refactorings collected from 18 Java projects.

Each refactoring instance is verified through:

  • Compilation
  • Test execution
  • Automated refactoring detection tools

This ensures the correctness and purity of each refactoring.

Compared to existing refactoring benchmarks such as ref-Dataset, community corpus, extended corpus, and RefactorBench,
SWE-Refactor stands out in several key aspects:

  • Includes both atomic and compound refactorings.
  • Guarantees pure refactorings with no entangled changes.
  • Provides developer-written ground truth and test cases.
  • Ensures test availability for correctness validation.
  • Built through a fully automated pipeline from real project commits.
 

SWE-Refactor Sample Schema

Each sample in the SWE-Refactor benchmark contains the following fields:

Basic Information

  • type (string)
    Type of the applied refactoring (e.g., Inline Method).

  • description (string)
    A concise summary of the refactoring action, including involved methods and visibility changes.

  • projectName (string)
    Name of the project containing the refactoring (e.g., checkstyle).

  • commitId (string)
    Git commit hash where the refactoring was applied.

  • uniqueId (string)
    A unique identifier derived from commit and line information.

Location & Structure

  • diffLocations (list of dicts)
    Each dictionary contains:

    • filePath: path of the modified file.
    • startLine, endLine: start/end line numbers.
    • startColumn, endColumn: start/end column numbers.
  • filePathBefore (string)
    File path before the refactoring.

  • filePathAfter (string)
    File path after the refactoring (if moved).

  • moveFileExist (bool)
    Indic

    📤 Share this page

    Found this useful? Share it with your network.

    ✓ Link copied! Paste it on ResearchGate / Academia.edu
📦
SWE-Refactor: A Repository-Aware Benchmark for Evaluating LLMs on… (Full Dataset)222.5 MB
⬇
📄
ReadmeVia DOI record
↗

Files are hosted on the source repository. Click download to access the full dataset.

anonymous (2026). SWE-Refactor: A Repository-Aware Benchmark for Evaluating LLMs on Real-World Code Refactoring. https://doi.org/10.5281/zenodo.23194601