Datasets:

Modalities:
Text
Formats:
json
Size:
< 1K
ArXiv:
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet
task_id
stringlengths
2
30
buggy_code
stringlengths
137
2.23k
fixed_code
stringlengths
137
2.23k
unit_tests
stringlengths
549
3.38M
hex_key
"package humaneval.buggy;\n\npublic class HEX_KEY {\n public static int hex_key(String num) {\n (...TRUNCATED)
"package humaneval.buggy;\n\n// You have been tasked to write a function that receives \n// a hexade(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
rescale_to_unit
"package humaneval.buggy;\n\npublic class RESCALE_TO_UNIT {\n public static double[] rescale_to_u(...TRUNCATED)
"package humaneval.buggy;\n\npublic class RESCALE_TO_UNIT {\n public static double[] rescale_to_u(...TRUNCATED)
"package humaneval;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n(...TRUNCATED)
exchange
"package humaneval.buggy;\n\nimport java.util.ArrayList;\n\n/*\n * In this problem, you will impleme(...TRUNCATED)
"package humaneval.buggy;\n\nimport java.util.ArrayList;\n\n/*\n * In this problem, you will impleme(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
string_xor
"package humaneval.buggy;\n\npublic class STRING_XOR {\n public static String string_xor(String a(...TRUNCATED)
"package humaneval.buggy;\n\npublic class STRING_XOR {\n public static String string_xor(String a(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
monotonic
"package humaneval.buggy;\n\nimport java.util.Arrays;\n\n// Return True is list elements are monoton(...TRUNCATED)
"package humaneval.buggy;\n\nimport java.util.Arrays;\n\n// Return True is list elements are monoton(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
is_multiply_prime
"package humaneval.buggy;\n\n// Write a function that returns true if the given number is the multip(...TRUNCATED)
"package humaneval.buggy;\n\n// Write a function that returns true if the given number is the multip(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
starts_one_ends
"package humaneval.buggy;\n\n/* Given a positive integer n, return the count of the numbers of n-dig(...TRUNCATED)
"package humaneval.buggy;\n\n/* Given a positive integer n, return the count of the numbers of n-dig(...TRUNCATED)
"package humaneval;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n(...TRUNCATED)
factorial
"package humaneval.buggy;\n\nimport java.util.ArrayList;\n\n/*\n * Implement the function f that tak(...TRUNCATED)
"package humaneval.buggy;\n\nimport java.util.ArrayList;\n\n/*\n * Implement the function f that tak(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
multiply
"package humaneval.buggy;\n\n// Complete the function that takes two integers and returns \n// the p(...TRUNCATED)
"package humaneval.buggy;\n\n// Complete the function that takes two integers and returns \n// the p(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
pairs_sum_to_zero
"package humaneval.buggy;\n\nimport java.util.List;\n\n/* pairs_sum_to_zero takes a list of integers(...TRUNCATED)
"package humaneval.buggy;\n\nimport java.util.List;\n\n/* pairs_sum_to_zero takes a list of integers(...TRUNCATED)
"package humaneval;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\nimport java.util.Lis(...TRUNCATED)
End of preview. Expand in Data Studio

Dataset Summary

EvalRepair-Java is a benchmark for evaluating Java program repair performance, derived from HumanEval. It contains 163 single-function repair tasks, each with a buggy implementation and its corresponding fixed version.

Supported Tasks

  • Program Repair: Fixing bugs in Java functions
  • Code Generation: Generating correct implementations from buggy code

Dataset Structure

Each row contains:

  • task_id: Unique identifier for the task (same as HumanEval)
  • buggy_code: The buggy implementation
  • fixed_code: The correct implementation
  • unit_test: Unit tests for verifying the correctness of the implementation

Source Data

This dataset is derived from HumanEval, a benchmark for evaluating code generation capabilities. We manually introduced bugs into the original implementations and verified the fixes.

Citation

@article{morepair,
author = {Yang, Boyang and Tian, Haoye and Ren, Jiadong and Zhang, Hongyu and Klein, Jacques and Bissyande, Tegawende and Le Goues, Claire and Jin, Shunfu},
title = {MORepair: Teaching LLMs to Repair Code via Multi-Objective Fine-Tuning},
year = {2025},
publisher = {Association for Computing Machinery},
issn = {1049-331X},
url = {https://doi.org/10.1145/3735129},
doi = {10.1145/3735129},
journal = {ACM Trans. Softw. Eng. Methodol.},
}
Downloads last month
62

Collection including barty/EvalRepair-Java