Dataset Viewer
Auto-converted to Parquet Duplicate
data_source
stringclasses
5 values
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "for _ in range(input()):\n try:\n eval(raw_input())\n print YES\n except TypeError:\n print 'NO\n except:\n print 'NO'", "buggy_info": "<answer>\nfor _ in range(input()):\n try:\n eval(raw_input())\n print 'YES'\n exce...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "from math import sqrt\nN=input(\nfor i in range(N):\n\tR=input()\n\tx,y=map(int,raw_input().split()(\n\tp,q=map(int,raw_input((.split()\n\ta,b=map(int,raw_input().split())\n\tl=sqrt(((x-p)%2)+((y-q)%2))\n\tm=sqrt(((x-a)**2)+((y-b)**2))\n\tn==sqrt(((a-p)**2)+((b-q)**2))\n\tcount=...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "t = int(raw_input())\ndef gcd(a,b):\n\t\treturn a\n\tif(b==0):\n\telse:\n\t\treturn gcd(b,a%b);\nwhile(t):\n\tx = raw_input()\n\tx = x.split()\n\ta = int(x[0])\n\tb = int(x[1])\n\tprint gcd(b,a)\n\tt = t-1", "buggy_info": "<answer>\nt = int(raw_input())\ndef gcd(a,b):\n\tif(...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": " s=raw_input()\nfor i in range(input()):\n pos=-1\n ans=0\n for j in range(len(s)):\n if s[j]=='4':\n pos=j\n if pos!=-1:\n print ans\n ans+=pos", "buggy_info": "<answer>\nfor i in range(input()):\n s=raw_input()\n pos...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "impocrt math\nsmport sys\nvef checkpal(s):\n return s==s[::-1]\nfor a in range(input()):\n s=raw_input()\n l==len(s)\n if(l==2):\n print \"YES\"\n els:\n if checkpal(s):\n print \"YES\n erlse:\n while s[0] == s[-1] or len(s)>...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "import sys\nfor __ in range(input()) \n n , k = map(int,sys.stdin.readline().split())\n lists = map(int,sysstdin.readline()split())\n dp = [0]-(k+1)\n dp[0[=1\n for i in lists :\n for j in range(k-i,-1,-1) :\n if dp[k] \n break\n ...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "import sys\nrange = xrange\nn,m,k = [int(x) for x in sys.stdin.readline().split()]\ninp = [int(x)-1 for x in sys.stdin.read().split()]\nii == 0\ncoupl = [[] for _ in range(n)]\ntime = [[] for _ in range(n)]\nnfr = [0]*n\nfor i in range(m):\n a,b = inp[ii],inp[ii**1]\n coup...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "from __future__ imporst division, print_function\ndef main():\n n == int(input())\n d = array_ofint, n)\n for _ in range(n/1):\n u, v = input_as_list()\n d[u-1] += 1\n d[v-1] //= 1\n print(\"NO\" if 1 not in d else \"YES\")\nINF = float)'inf')\nM...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "import sys\nfrom collections import Counter\ndef list2d(a, b, c):\n return [b * [c] pfor i in range(a)]\ndef INT(): return int(input())\ndef Yes(): print('Yes')\ndef MAP(): return map(int, input().split())\ndef No(): print('No')\ndef NO(): print('NO')\ndef YES((: print('YES')...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "def read_int()\n xeturn int(input())\ndef read_ints():\n return map(int, not input().split(' '))\nt == read_int()\nfor case_num in range(t:\n n, k = read_ints(\n p == []\n for i in range(n):\n ai, bi = read_ints)\n pappend((bi, ai, i + 1))\n p.sor...
mix
[ { "content": "\nYou are given a buggy Python program (no line numbers). Requirement/tests may be provided.\n\n# Your job:\n* At each intermediate step, apply exactly one edit to the code (insert, delete, or replace a contiguous block of one or more lines).\n* After all fixes, output the full corrected program.\...
code
{ "ground_truth": { "buggy_code": "n, k = [int(i) for i in input().split()]\nfor i in range(n):\nl = []\n x = [int(i) for i in input().split()]\n l.append(x)\nfrom heapq import heappop,heappush\nl.sort(key = lambda x:x[0])\na = []\nb = []\nans = 0\nak = 0\nbk = 1\ni = 0\n if l[i][1] == l[i][2] == 1:\nwhi...
End of preview. Expand in Data Studio

πŸ“ Dataset Variants

1. preprocess-CodeContests-perturbation-none

  • No perturbation applied
  • Pure clean programs
  • Used as baseline reference

2. preprocess-CodeContests-perturbation-syntax

  • Only syntax-level perturbations
  • Bug types: token deletion, indentation errors, malformed expressions
  • Focus: syntax recovery ability

3. preprocess-CodeContests-perturbation-structure

  • Only structure-level perturbations
  • Bug types: line swap, line deletion, statement reordering
  • Focus: program structure repair

4. preprocess-CodeContests-perturbation-semantic

  • Only semantic-level perturbations
  • Bug types: logic errors, wrong operators, boundary mistakes
  • Focus: semantic reasoning repair

5. preprocess-CodeContests-perturbation-mix

  • Mixed perturbation dataset
  • Combines syntax + structure + semantic corruption
  • Used for general robustness training

6. preprocess-CodeContests-perturbation-mixed-task-*

These are controlled mixture ratio subsets used for ablation and scaling.

Format:

00100 β†’ 0 : 10 : 0 : 0
01000 β†’ 0 : 0 : 10 : 0
10000 β†’ 10 : 0 : 0 : 0
2242  β†’ 2 : 2 : 4 : 2

Where the order is:

[syntax : structure : semantic : mixed]

Examples:

  • 00100 β†’ only structure perturbation (100%)
  • 01000 β†’ only semantic perturbation (100%)
  • 10000 β†’ only syntax perturbation (100%)
  • 2242 β†’ balanced mixture (2:2:4:2)

πŸ“¦ Data Format

Each sample contains:

{
  "id": "problem_id",
  "clean_code": "correct reference solution",
  "buggy_code": "perturbed program",
  "perturbation_type": "syntax | structure | semantic | mixed",
  "language": "python",
  "task_prompt": "problem statement (optional)",
  "test_cases": {
    "input": "...",
    "output": "..."
  }
}

🎯 Purpose

These variants are designed for:

  • perturbation-driven program repair
  • RL-based trajectory learning
  • ablation over bug types
  • robustness evaluation under different corruption distributions
Downloads last month
62