mutation_id stringlengths 1 4 | task_id stringclasses 81
values | prompt stringclasses 81
values | response stringlengths 30 1.29k | mutation_info stringclasses 108
values | score float64 0 1 | scores stringclasses 47
values | solutions stringlengths 1.75k 41.1k | solutions_info stringlengths 4.4k 8.52k |
|---|---|---|---|---|---|---|---|---|
0 | HumanEval/0 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
for idx, elem in enumerate(numbers):
for idx2, elem2 in enumerate(numbers):
if idx != idx2:
distance = abs(elem - elem2)
if distance <= threshold:
return True
return False
``` | {"task_id": "HumanEval/0", "passed": false, "result": "failed: 'return' outside function (<string>, line 17)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nfor idx, elem in enumerate(numbers):\n for idx2, elem2 in enumerate(numbers):\n if idx != idx2:\n distance = abs(elem - elem2)\n if distance <= threshold:\n return True\nreturn False\n```", "```python\nfor idx, elem in enumerate(numbers):\n for idx2, elem2 ... | [{"task_id": "HumanEval/0", "passed": false, "result": "failed: 'return' outside function (<string>, line 17)", "completion_id": null}, {"task_id": "HumanEval/0", "passed": false, "result": "failed: 'return' outside function (<string>, line 17)", "completion_id": null}, {"task_id": "HumanEval/0", "passed": false, "resu... |
1 | HumanEval/2 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
return number % 0.999999
``` | {"task_id": "HumanEval/2", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nreturn number - int(number)\n```", "```python\nreturn number - int(number)\n```", "```python\nreturn number - int(number)\n```", "```python\nreturn number - int(number)\n```", "```python\nreturn number - int(number)\n```", "```python\nreturn number - int(number)\n```", "```python\nreturn number - int(numbe... | [{"task_id": "HumanEval/2", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null}, {"task_id": "HumanEval/2", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null}, {"task_id": "HumanEval/2", "passed": false, "resu... |
2 | HumanEval/5 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
if not numbers:
return []
result = []
for n in numbers[:-1]:
result.append(n)
result.append(delimeter)
result.append(numbers[-1])
``` | {"task_id": "HumanEval/5", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nif not numbers:\n return []\nresult = []\nfor n in numbers[:-1]:\n result.append(n)\n result.append(delimeter)\nresult.append(numbers[-1])\nreturn result\n```", "```python\nif not numbers:\n return []\nresult = []\nfor n in numbers[:-1]:\n result.append(n)\n result.append(delimeter)\nresu... | [{"task_id": "HumanEval/5", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null}, {"task_id": "HumanEval/5", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null}, {"task_id": "HumanEval/5", "passed": false, "resu... |
3 | HumanEval/7 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
return [x for x in strings if x not in substring]
``` | {"task_id": "HumanEval/7", "passed": false, "result": "failed: 'return' outside function (<string>, line 11)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nreturn [x for x in strings if substring in x]\n```", "```python\nreturn [x for x in strings if substring in x]\n```", "```python\nreturn [x for x in strings if substring in x]\n```", "```python\nreturn [x for x in strings if substring in x]\n```", "```python\nreturn [x for x in strings if substring in x]\n... | [{"task_id": "HumanEval/7", "passed": false, "result": "failed: 'return' outside function (<string>, line 11)", "completion_id": null}, {"task_id": "HumanEval/7", "passed": false, "result": "failed: 'return' outside function (<string>, line 11)", "completion_id": null}, {"task_id": "HumanEval/7", "passed": false, "resu... |
4 | HumanEval/10 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
if not string:
return ''
beginning_of_suffix = 0
while beginning_of_suffix < len(string) and not is_palindrome(string[beginning_of_suffix:]):
beginning_of_suffix += 1
return string + string[:beginning_of_suffix+1][::-1]
``` | {"task_id": "HumanEval/10", "passed": false, "result": "failed: 'return' outside function (<string>, line 21)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nif not string:\n return ''\nbeginning_of_suffix = 0\nwhile beginning_of_suffix < len(string) and not is_palindrome(string[beginning_of_suffix:]):\n beginning_of_suffix += 1\nreturn string + string[:beginning_of_suffix][::-1]\n```", "```python\nif not string:\n return ''\nbeginning_of_suffix = 0\nw... | [{"task_id": "HumanEval/10", "passed": false, "result": "failed: 'return' outside function (<string>, line 21)", "completion_id": null}, {"task_id": "HumanEval/10", "passed": false, "result": "failed: 'return' outside function (<string>, line 21)", "completion_id": null}, {"task_id": "HumanEval/10", "passed": false, "r... |
5 | HumanEval/11 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
def string_xor(a: str, b: str) -> str:
""" Input are two strings a and b consisting only of 1s and 0s.
Perform binary XOR on these inputs and return result also as a string.
>>> string_xor('010', '110')
'100'
"""
def xor(i, j):
if i == j:
return '0'
else:
return '1'... | {"task_id": "HumanEval/11", "passed": false, "result": "failed: 'return' outside function (<string>, line 21)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nreturn ''.join('0' if x == y else '1' for x, y in zip(a, b))\n```", "```python\nreturn ''.join(str(int(x) ^ int(y)) for x, y in zip(a, b))\n```", "```python\nreturn ''.join('0' if i == j else '1' for i, j in zip(a, b))\n```", "```python\nreturn ''.join('0' if i == j else '1' for x, y in zip(a, b))\n```", "... | [{"task_id": "HumanEval/11", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/11", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/11", "passed": false, "r... |
6 | HumanEval/18 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
times = 0
for i in range(len(string) - len(substring) + 1):
if string[i:i+len(substring)] == substring[::-1]:
times += 1
return times
``` | {"task_id": "HumanEval/18", "passed": false, "result": "failed: 'return' outside function (<string>, line 16)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\ntimes = 0\nfor i in range(len(string) - len(substring) + 1):\n if string[i:i+len(substring)] == substring:\n times += 1\nreturn times\n```", "```python\ntimes = 0\nfor i in range(len(string) - len(substring) + 1):\n if string[i:i+len(substring)] == substring:\n times += 1\nreturn times\... | [{"task_id": "HumanEval/18", "passed": false, "result": "failed: 'return' outside function (<string>, line 16)", "completion_id": null}, {"task_id": "HumanEval/18", "passed": false, "result": "failed: 'return' outside function (<string>, line 16)", "completion_id": null}, {"task_id": "HumanEval/18", "passed": false, "r... |
7 | HumanEval/19 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
value_map = {
'zero': 0,
'one': 1,
'two': 2,
'three': 3,
'four': 4,
'five': 5,
'six': 6,
'seven': 7,
'eight': 8,
'nine': 9
}
return ' '.join(sorted([x for x in numbers.split(' ') if x], key=lambda x: value_map[x + '0']))
``` | {"task_id": "HumanEval/19", "passed": false, "result": "failed: 'return' outside function (<string>, line 23)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nreturn ' '.join(sorted([x for x in numbers.split(' ') if x], key=lambda x: value_map[x]))\n```", "```python\nreturn ' '.join(sorted([x for x in numbers.split(' ') if x], key=lambda x: value_map[x]))\n```", "```python\nreturn ' '.join(sorted([x for x in numbers.split(' ') if x], key=lambda x: value_map[x]))... | [{"task_id": "HumanEval/19", "passed": false, "result": "failed: 'return' outside function (<string>, line 11)", "completion_id": null}, {"task_id": "HumanEval/19", "passed": false, "result": "failed: 'return' outside function (<string>, line 11)", "completion_id": null}, {"task_id": "HumanEval/19", "passed": false, "r... |
8 | HumanEval/21 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
min_number = min(numbers)
max_number = max(numbers)
return [(x - min_number) / (max_number - min_number + 1) for x in numbers]
``` | {"task_id": "HumanEval/21", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nreturn [(x - min_number) / (max_number - min_number) for x in numbers]\n```", "```python\nreturn [(x - min_number) / (max_number - min_number) for x in numbers]\n```", "```python\nmin_number = min(numbers)\nmax_number = max(numbers)\nreturn [(x - min_number) / (max_number - min_number) for x in numbers]\n`... | [{"task_id": "HumanEval/21", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/21", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/21", "passed": false, "r... |
9 | HumanEval/26 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
import collections
c = collections.Counter(numbers)
return [n for n in numbers if c[n] < 1]
``` | {"task_id": "HumanEval/26", "passed": false, "result": "failed: 'return' outside function (<string>, line 12)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nreturn [n for n in numbers if c[n] == 1]\n```", "```python\nreturn [n for n in numbers if c[n] == 1]\n```", "```python\nreturn [n for n in numbers if c[n] == 1]\n```", "```python\nreturn [n for n in numbers if c[n] == 1]\n```", "```python\nreturn [n for n in numbers if c[n] == 1]\n```", "```python\nreturn ... | [{"task_id": "HumanEval/26", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/26", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/26", "passed": false, "r... |
10 | HumanEval/30 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
return [e for e in l if e >= 0]
``` | {"task_id": "HumanEval/30", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nreturn [e for e in l if e > 0]\n```", "```python\nreturn [e for e in l if e > 0]\n```", "```python\nreturn [e for e in l if e > 0]\n```", "```python\nreturn [e for e in l if e > 0]\n```", "```python\nreturn [e for e in l if e > 0]\n```", "```python\nreturn [e for e in l if e > 0]\n```", "```python\nreturn ... | [{"task_id": "HumanEval/30", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/30", "passed": false, "result": "failed: 'return' outside function (<string>, line 10)", "completion_id": null}, {"task_id": "HumanEval/30", "passed": false, "r... |
11 | HumanEval/31 | Modify the given function to introduce a subtle bug that causes some unit tests to fail.
Rules:
1. Keep the function signature exactly the same.
2. Only modify the function implementation (the code inside the function).
3. Do not include the function signature, docstrings, or comments.
Response Format:
1. The modifie... | ```python
if n < 2:
return False
for k in range(2, n):
if n % k == 0:
return False
return True
``` | {"task_id": "HumanEval/31", "passed": false, "result": "failed: 'return' outside function (<string>, line 21)", "completion_id": null} | 0 | [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ["```python\nif n < 2:\n return False\nfor k in range(2, int(n**0.5) + 1):\n if n % k == 0:\n return False\nreturn True\n```", "```python\nif n < 2:\n return False\nfor k in range(2, int(n**0.5) + 1):\n if n % k == 0:\n return False\nreturn True\n```", "```python\nif n < 2:\n return False\n... | [{"task_id": "HumanEval/31", "passed": false, "result": "failed: 'return' outside function (<string>, line 21)", "completion_id": null}, {"task_id": "HumanEval/31", "passed": false, "result": "failed: 'return' outside function (<string>, line 21)", "completion_id": null}, {"task_id": "HumanEval/31", "passed": false, "r... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 3