MedGm/Llama-Locali-Qwen2.5-Coder-1.5B
Text Generation • 2B • Updated • 536
id stringlengths 4 22 | task stringclasses 5
values | group stringlengths 11 28 | messages listlengths 2 2 | split stringclasses 1
value | has_findings bool 2
classes | has_bug bool 2
classes |
|---|---|---|---|---|---|---|
t1-1158-0 | T1 | KAKA22/CodeRM-UnitTest:1158 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef integer_to_roman(n):\n roman_numerals = {\n 1000: 'M', 900: 'CM', 500: 'D', 400: 'CD',\n 100: 'C', 90: 'XC', 50: 'L', 40: 'XL',\n 10: 'X', 9: 'IX', 5: 'V', 5: 'IV', 1: 'I'\n }\n \n roman... | train | null | null |
t3-t1-1158-0-clean | T3 | KAKA22/CodeRM-UnitTest:1158 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef integer_to_roman(n):\n roman_numerals = {\n 1000: 'M', 900: 'CM', 500: 'D', 400: 'CD',\n 100: 'C', 90: 'XC', 50: 'L', 40: 'XL',\n 10: 'X', 9: 'IX', 5:... | train | false | false |
t1-1158-1 | T1 | KAKA22/CodeRM-UnitTest:1158 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef integer_to_roman(n):\n roman_numerals = {\n 1000: 'M', 900: 'CM', 500: 'D', 400: 'CD',\n 101: 'C', 90: 'XC', 50: 'L', 40: 'XL',\n 10: 'X', 9: 'IX', 5: 'V', 4: 'IV', 1: 'I'\n }\n \n roman... | train | null | null |
t1-8593-0 | T1 | KAKA22/CodeRM-UnitTest:8593 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\nimport math\n\ndef find_min_max_distance(X, Y):\n d = max(X, Y)\n e = min(X, Y)\n c = math.ceil((d - e) / 3)\n return c\n```\n\nThis test fails: `TestFindMinMaxDistance::test_edge_case`\n```python\ndef test_edge... | train | null | null |
t3-t1-8593-0-clean | T3 | KAKA22/CodeRM-UnitTest:8593 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\nimport math\n\ndef find_min_max_distance(X, Y):\n d = max(X, Y)\n e = min(X, Y)\n c = math.ceil((d - e) / 2)\n return c\n```\n\nRespond with only a JSON object {\"fin... | train | false | false |
t1-8593-1 | T1 | KAKA22/CodeRM-UnitTest:8593 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\nimport math\n\ndef find_min_max_distance(X, Y):\n d = max(X, Y)\n e = min(X, Y)\n c = math.ceil((d + e) / 2)\n return c\n```\n\nThis test fails: `TestFindMinMaxDistance::test_close_numbers`\n```python\ndef test_... | train | null | null |
t3-t1-4430-0-buggy | T3 | KAKA22/CodeRM-UnitTest:4430 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef get_ways(n, c):\n memo = {}\n \n def n_ways(v, max_c):\n if (v, max_c) in memo:\n return memo[(v, max_c)]\n if v == 0:\n return 1... | train | true | true |
t3-t1-4430-0-clean | T3 | KAKA22/CodeRM-UnitTest:4430 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef get_ways(n, c):\n memo = {}\n \n def n_ways(v, max_c):\n if (v, max_c) in memo:\n return memo[(v, max_c)]\n if v == 0:\n return 1... | train | false | false |
t3-t1-4430-1-buggy | T3 | KAKA22/CodeRM-UnitTest:4430 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef get_ways(n, c):\n memo = {}\n \n def n_ways(v, max_c):\n if (v, max_c) in memo:\n return memo[(v, max_c)]\n if v == 0:\n return 1... | train | true | true |
t3-t1-4430-1-clean | T3 | KAKA22/CodeRM-UnitTest:4430 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef get_ways(n, c):\n memo = {}\n \n def n_ways(v, max_c):\n if (v, max_c) in memo:\n return memo[(v, max_c)]\n if v == 0:\n return 1... | train | false | false |
t1-8266-0 | T1 | KAKA22/CodeRM-UnitTest:8266 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef generate_order_book(n, s, orders):\n buy = {}\n sell = {}\n \n # Aggregate orders\n for d, p, q in orders:\n if d == 'S':\n sell[p] = sell.get(p, 0) + q\n else:\n buy[p... | train | null | null |
t3-t1-8266-0-clean | T3 | KAKA22/CodeRM-UnitTest:8266 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef generate_order_book(n, s, orders):\n buy = {}\n sell = {}\n \n # Aggregate orders\n for d, p, q in orders:\n if d == 'S':\n sell[p] = sell.ge... | train | false | false |
t1-8266-1 | T1 | KAKA22/CodeRM-UnitTest:8266 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef generate_order_book(n, s, orders):\n buy = {}\n sell = {}\n \n # Aggregate orders\n for d, p, q in orders:\n if d == 'S':\n sell[p] = sell.get(p, 0) - q\n else:\n buy[p... | train | null | null |
t1-6277-0 | T1 | KAKA22/CodeRM-UnitTest:6277 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef remove_consecutive_duplicates(S: str) -> str:\n stack = []\n for char in S:\n if len(stack) > 1 and stack[-1] == stack[-2] == char:\n stack.pop()\n stack.pop()\n else:\n ... | train | null | null |
t3-t1-6277-0-clean | T3 | KAKA22/CodeRM-UnitTest:6277 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef remove_consecutive_duplicates(S: str) -> str:\n stack = []\n for char in S:\n if len(stack) > 1 and stack[-1] == stack[-2] == char:\n stack.pop()\n ... | train | false | false |
t1-6277-1 | T1 | KAKA22/CodeRM-UnitTest:6277 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef remove_consecutive_duplicates(S: str) -> str:\n stack = []\n for char in S:\n if not (len(stack) > 1 and stack[-1] == stack[-2] == char):\n stack.pop()\n stack.pop()\n else:\n ... | train | null | null |
t3-t1-12068-0-buggy | T3 | KAKA22/CodeRM-UnitTest:12068 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef calculate_max_profit(stock_prices):\n do_buy = [1] * len(stock_prices) # 1 for buy, 0 for sell\n profit = 0\n max_price = 0\n \n # Traverse the stock prices i... | train | true | true |
t3-t1-12068-0-clean | T3 | KAKA22/CodeRM-UnitTest:12068 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef calculate_max_profit(stock_prices):\n do_buy = [1] * len(stock_prices) # 1 for buy, 0 for sell\n profit = 0\n max_price = 0\n \n # Traverse the stock prices i... | train | false | false |
t3-t1-12068-1-buggy | T3 | KAKA22/CodeRM-UnitTest:12068 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef calculate_max_profit(stock_prices):\n do_buy = [1] * len(stock_prices) # 1 for buy, 0 for sell\n profit = 0\n max_price = 0\n \n # Traverse the stock prices i... | train | true | true |
t3-t1-12068-1-clean | T3 | KAKA22/CodeRM-UnitTest:12068 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef calculate_max_profit(stock_prices):\n do_buy = [1] * len(stock_prices) # 1 for buy, 0 for sell\n profit = 0\n max_price = 0\n \n # Traverse the stock prices i... | train | false | false |
t1-17441-0 | T1 | KAKA22/CodeRM-UnitTest:17441 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\nfrom collections import Counter\n\ndef find_even_occurrences(arr, n):\n if len(set(arr)) != n:\n return [-1]\n \n count = Counter(arr)\n even_occurrences = [key for key, value in count.items() if value % ... | train | null | null |
t3-t1-17441-0-clean | T3 | KAKA22/CodeRM-UnitTest:17441 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\nfrom collections import Counter\n\ndef find_even_occurrences(arr, n):\n if len(set(arr)) == n:\n return [-1]\n \n count = Counter(arr)\n even_occurrences = [ke... | train | false | false |
t1-17441-1 | T1 | KAKA22/CodeRM-UnitTest:17441 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\nfrom collections import Counter\n\ndef find_even_occurrences(arr, n):\n if len(set(arr)) == n:\n return [-1]\n \n count = Counter(arr)\n even_occurrences = [key for key, value in count.items() if value % ... | train | null | null |
t3-t1-16019-0-buggy | T3 | KAKA22/CodeRM-UnitTest:16019 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_partition(a: list) -> tuple:\n \"\"\"\n Finds a partition of the array `a` into segments such that the sum of the alternating sums of all segments is zero.\n\n ... | train | true | true |
t3-t1-16019-0-clean | T3 | KAKA22/CodeRM-UnitTest:16019 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_partition(a: list) -> tuple:\n \"\"\"\n Finds a partition of the array `a` into segments such that the sum of the alternating sums of all segments is zero.\n\n ... | train | false | false |
t3-t1-16019-1-buggy | T3 | KAKA22/CodeRM-UnitTest:16019 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_partition(a: list) -> tuple:\n \"\"\"\n Finds a partition of the array `a` into segments such that the sum of the alternating sums of all segments is zero.\n\n ... | train | true | true |
t3-t1-16019-1-clean | T3 | KAKA22/CodeRM-UnitTest:16019 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_partition(a: list) -> tuple:\n \"\"\"\n Finds a partition of the array `a` into segments such that the sum of the alternating sums of all segments is zero.\n\n ... | train | false | false |
t1-17445-0 | T1 | KAKA22/CodeRM-UnitTest:17445 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\nimport math\n\ndef calculate_gcd_probability(N):\n ans = 1\n x = math.floor(math.sqrt(N))\n i = 1\n while i <= x:\n ans += N // i\n i += 1\n ans *= 2\n ans -= x ** 2\n num = int(ans)\n ... | train | null | null |
t3-t1-17445-0-clean | T3 | KAKA22/CodeRM-UnitTest:17445 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\nimport math\n\ndef calculate_gcd_probability(N):\n ans = 0\n x = math.floor(math.sqrt(N))\n i = 1\n while i <= x:\n ans += N // i\n i += 1\n ans *= 2... | train | false | false |
t1-17445-1 | T1 | KAKA22/CodeRM-UnitTest:17445 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\nimport math\n\ndef calculate_gcd_probability(N):\n ans = 0\n x = math.floor(math.sqrt(N))\n i = 1\n while i <= x:\n ans -= N // i\n i += 1\n ans *= 2\n ans -= x ** 2\n num = int(ans)\n ... | train | null | null |
t3-t1-9766-0-buggy | T3 | KAKA22/CodeRM-UnitTest:9766 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef jumbled_string(s: str, n: int) -> str:\n iterations = [s]\n while True:\n s = s[::2] + s[1::2]\n if s == iterations[1]:\n break\n iterat... | train | true | true |
t3-t1-9766-0-clean | T3 | KAKA22/CodeRM-UnitTest:9766 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef jumbled_string(s: str, n: int) -> str:\n iterations = [s]\n while True:\n s = s[::2] + s[1::2]\n if s == iterations[0]:\n break\n iterat... | train | false | false |
t3-t1-9766-1-buggy | T3 | KAKA22/CodeRM-UnitTest:9766 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef jumbled_string(s: str, n: int) -> str:\n iterations = [s]\n while True:\n s = s[::2] - s[1::2]\n if s == iterations[0]:\n break\n iterat... | train | true | true |
t3-t1-9766-1-clean | T3 | KAKA22/CodeRM-UnitTest:9766 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef jumbled_string(s: str, n: int) -> str:\n iterations = [s]\n while True:\n s = s[::2] + s[1::2]\n if s == iterations[0]:\n break\n iterat... | train | false | false |
t1-14540-0 | T1 | KAKA22/CodeRM-UnitTest:14540 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef is_sum_congruent_to_c_modulo_b(A: int, B: int, C: int) -> str:\n \"\"\"\n Determines whether it is possible to select some number of positive integers,\n each being a multiple of A, such that their sum is congr... | train | null | null |
t3-t1-14540-0-clean | T3 | KAKA22/CodeRM-UnitTest:14540 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef is_sum_congruent_to_c_modulo_b(A: int, B: int, C: int) -> str:\n \"\"\"\n Determines whether it is possible to select some number of positive integers,\n each being ... | train | false | false |
t1-14540-1 | T1 | KAKA22/CodeRM-UnitTest:14540 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef is_sum_congruent_to_c_modulo_b(A: int, B: int, C: int) -> str:\n \"\"\"\n Determines whether it is possible to select some number of positive integers,\n each being a multiple of A, such that their sum is congr... | train | null | null |
t1-17617-0 | T1 | KAKA22/CodeRM-UnitTest:17617 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef reverse_diagonals(matrix):\n # Create a copy of the matrix to avoid modifying the original matrix\n copy = [line[:] for line in matrix]\n \n # Get the size of the matrix (since it's a square matrix, the numb... | train | null | null |
t3-t1-17617-0-clean | T3 | KAKA22/CodeRM-UnitTest:17617 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef reverse_diagonals(matrix):\n # Create a copy of the matrix to avoid modifying the original matrix\n copy = [line[:] for line in matrix]\n \n # Get the size of the... | train | false | false |
t1-17617-1 | T1 | KAKA22/CodeRM-UnitTest:17617 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef reverse_diagonals(matrix):\n # Create a copy of the matrix to avoid modifying the original matrix\n copy = [line[:] for line in matrix]\n \n # Get the size of the matrix (since it's a square matrix, the numb... | train | null | null |
t1-2229-0 | T1 | KAKA22/CodeRM-UnitTest:2229 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef minimum_coins_to_display_factor(N, A, B, C, D, E, F, G):\n from collections import deque\n \n # Convert N to a string to handle large numbers\n N = str(N)\n \n # Segment costs\n l = [A, B, C, D, E, ... | train | null | null |
t3-t1-2229-0-clean | T3 | KAKA22/CodeRM-UnitTest:2229 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef minimum_coins_to_display_factor(N, A, B, C, D, E, F, G):\n from collections import deque\n \n # Convert N to a string to handle large numbers\n N = str(N)\n \n... | train | true | false |
t1-2229-1 | T1 | KAKA22/CodeRM-UnitTest:2229 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef minimum_coins_to_display_factor(N, A, B, C, D, E, F, G):\n from collections import deque\n \n # Convert N to a string to handle large numbers\n N = str(N)\n \n # Segment costs\n l = [A, B, C, D, E, ... | train | null | null |
t1-6253-0 | T1 | KAKA22/CodeRM-UnitTest:6253 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef find_winning_color_for_bob(n, A, car_colors):\n # Initialize a list to count occurrences of each color\n color_counts = [0] * 1000001\n \n # Count occurrences of each color\n for color in car_colors:\n ... | train | null | null |
t3-t1-6253-0-clean | T3 | KAKA22/CodeRM-UnitTest:6253 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_winning_color_for_bob(n, A, car_colors):\n # Initialize a list to count occurrences of each color\n color_counts = [0] * 1000001\n \n # Count occurrences of ... | train | false | false |
t1-6253-1 | T1 | KAKA22/CodeRM-UnitTest:6253 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef find_winning_color_for_bob(n, A, car_colors):\n # Initialize a list to count occurrences of each color\n color_counts = [0] * 1000001\n \n # Count occurrences of each color\n for color in car_colors:\n ... | train | null | null |
t1-17523-0 | T1 | KAKA22/CodeRM-UnitTest:17523 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef count_cola_combinations(n, a, b, c):\n count = 0\n for i in range(c + 1):\n for j in range(b + 2):\n t = n - i * 2 - j\n if t >= 0 and a * 0.5 >= t:\n count += 1\n re... | train | null | null |
t3-t1-17523-0-clean | T3 | KAKA22/CodeRM-UnitTest:17523 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef count_cola_combinations(n, a, b, c):\n count = 0\n for i in range(c + 1):\n for j in range(b + 1):\n t = n - i * 2 - j\n if t >= 0 and a * ... | train | false | false |
t1-17523-1 | T1 | KAKA22/CodeRM-UnitTest:17523 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef count_cola_combinations(n, a, b, c):\n count = 0\n for i in range(c + 1):\n for j in range(b + 1):\n t = n - i * 2 - j\n if not (t >= 0 and a * 0.5 >= t):\n count += 1\n... | train | null | null |
t1-3979-0 | T1 | KAKA22/CodeRM-UnitTest:3979 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef longest_non_decreasing_xor_subsequence(arr):\n n = len(arr)\n xors = []\n \n # Calculate all possible xors and their indices\n for i in range(n):\n for j in range(i + 1, n):\n xors.appen... | train | null | null |
t3-t1-3979-0-clean | T3 | KAKA22/CodeRM-UnitTest:3979 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef longest_non_decreasing_xor_subsequence(arr):\n n = len(arr)\n xors = []\n \n # Calculate all possible xors and their indices\n for i in range(n):\n for ... | train | false | false |
t1-3979-1 | T1 | KAKA22/CodeRM-UnitTest:3979 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef longest_non_decreasing_xor_subsequence(arr):\n n = len(arr)\n xors = []\n \n # Calculate all possible xors and their indices\n for i in range(n):\n for j in range(i + 1, n):\n xors.appen... | train | null | null |
t1-6531-0 | T1 | KAKA22/CodeRM-UnitTest:6531 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef can_chef_race(fastest_time: int, chef_time: int) -> str:\n if not (chef_time <= 1.07 * fastest_time):\n return 'YES'\n else:\n return 'NO'\n```\n\nThis test fails: `TestChefCanRaceFunction::test_chef... | train | null | null |
t3-t1-6531-0-clean | T3 | KAKA22/CodeRM-UnitTest:6531 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef can_chef_race(fastest_time: int, chef_time: int) -> str:\n if chef_time <= 1.07 * fastest_time:\n return 'YES'\n else:\n return 'NO'\n```\n\nRespond with ... | train | false | false |
t1-6531-1 | T1 | KAKA22/CodeRM-UnitTest:6531 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef can_chef_race(fastest_time: int, chef_time: int) -> str:\n if chef_time < 1.07 * fastest_time:\n return 'YES'\n else:\n return 'NO'\n```\n\nThis test fails: `TestChefCanRaceFunction::test_chef_can_ra... | train | null | null |
t1-11769-0 | T1 | KAKA22/CodeRM-UnitTest:11769 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef did_anton_perform_well(n, participants):\n for name, before, after in participants:\n if int(before) >= 2400 and int(after) >= int(before):\n return \"YES\"\n return \"NO\"\n```\n\nThis test fail... | train | null | null |
t3-t1-11769-0-clean | T3 | KAKA22/CodeRM-UnitTest:11769 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef did_anton_perform_well(n, participants):\n for name, before, after in participants:\n if int(before) >= 2400 and int(after) > int(before):\n return \"YES... | train | true | false |
t1-11769-1 | T1 | KAKA22/CodeRM-UnitTest:11769 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef did_anton_perform_well(n, participants):\n for name, before, after in participants:\n if not (int(before) >= 2400 and int(after) > int(before)):\n return \"YES\"\n return \"NO\"\n```\n\nThis test... | train | null | null |
t1-15281-0 | T1 | KAKA22/CodeRM-UnitTest:15281 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef count_valid_substrings(message: str) -> int:\n n = len(message)\n comb = n * (n + 1) // 2\n \n if not (('a' not in message) and ('z' not in message)):\n return 0\n \n substrings = message.replac... | train | null | null |
t3-t1-15281-0-clean | T3 | KAKA22/CodeRM-UnitTest:15281 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef count_valid_substrings(message: str) -> int:\n n = len(message)\n comb = n * (n + 1) // 2\n \n if ('a' not in message) and ('z' not in message):\n return 0... | train | false | false |
t1-15281-1 | T1 | KAKA22/CodeRM-UnitTest:15281 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef count_valid_substrings(message: str) -> int:\n n = len(message)\n comb = n * (n + 1) // 2\n \n if ('a' not in message) and ('z' not in message):\n return 0\n \n substrings = message.replace('z',... | train | null | null |
t1-2311-0 | T1 | KAKA22/CodeRM-UnitTest:2311 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef max_possible_sum_after_flip(ai: list) -> int:\n \"\"\"\n Calculate the maximum possible sum of the array after performing the specified flip operation.\n\n Parameters:\n ai (list): A list of integers where e... | train | null | null |
t3-t1-2311-0-clean | T3 | KAKA22/CodeRM-UnitTest:2311 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef max_possible_sum_after_flip(ai: list) -> int:\n \"\"\"\n Calculate the maximum possible sum of the array after performing the specified flip operation.\n\n Parameter... | train | false | false |
t1-2311-1 | T1 | KAKA22/CodeRM-UnitTest:2311 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef max_possible_sum_after_flip(ai: list) -> int:\n \"\"\"\n Calculate the maximum possible sum of the array after performing the specified flip operation.\n\n Parameters:\n ai (list): A list of integers where e... | train | null | null |
t1-2438-0 | T1 | KAKA22/CodeRM-UnitTest:2438 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef can_form_string(a: int, b: int, c: int, m: int) -> str:\n curSum = a + b + c\n x = curSum // 2 - curSum % 2\n maxiumu = a - 1 + b - 1 + c - 1\n minPos = 0\n \n if a > x:\n if curSum % 2 != 0:\n ... | train | null | null |
t3-t1-2438-0-clean | T3 | KAKA22/CodeRM-UnitTest:2438 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef can_form_string(a: int, b: int, c: int, m: int) -> str:\n curSum = a + b + c\n x = curSum // 2 + curSum % 2\n maxiumu = a - 1 + b - 1 + c - 1\n minPos = 0\n \n... | train | false | false |
t1-2438-1 | T1 | KAKA22/CodeRM-UnitTest:2438 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef can_form_string(a: int, b: int, c: int, m: int) -> str:\n curSum = a + b + c\n x = curSum // 2 + curSum % 2\n maxiumu = a - 1 + b + 1 + c - 1\n minPos = 0\n \n if a > x:\n if curSum % 2 != 0:\n ... | train | null | null |
t1-12158-0 | T1 | KAKA22/CodeRM-UnitTest:12158 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef find_smallest_repetition_free_number(N: int) -> int:\n for i in range(N + 1, 987654321):\n a = str(i)\n b = list(a)\n c = set(a)\n if '0' not in b and len(b) != len(c):\n return... | train | null | null |
t3-t1-12158-0-clean | T3 | KAKA22/CodeRM-UnitTest:12158 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_smallest_repetition_free_number(N: int) -> int:\n for i in range(N + 1, 987654321):\n a = str(i)\n b = list(a)\n c = set(a)\n if '0' not i... | train | false | false |
t1-12158-1 | T1 | KAKA22/CodeRM-UnitTest:12158 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef find_smallest_repetition_free_number(N: int) -> int:\n for i in range(N + 1, 987654321):\n a = str(i)\n b = list(a)\n c = set(a)\n if not ('0' not in b and len(b) == len(c)):\n ... | train | null | null |
t1-13240-0 | T1 | KAKA22/CodeRM-UnitTest:13240 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef delete_smaller_elements(arr, k):\n st = []\n st.append(arr[0])\n c = 1\n for i in arr[1:]:\n while st and st[-1] < i and (c < k):\n st.pop()\n c += 1\n st.append(i)\n r... | train | null | null |
t3-t1-13240-0-clean | T3 | KAKA22/CodeRM-UnitTest:13240 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef delete_smaller_elements(arr, k):\n st = []\n st.append(arr[0])\n c = 0\n for i in arr[1:]:\n while st and st[-1] < i and (c < k):\n st.pop()\n ... | train | false | false |
t1-13240-1 | T1 | KAKA22/CodeRM-UnitTest:13240 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef delete_smaller_elements(arr, k):\n st = []\n st.append(arr[0])\n c = 0\n for i in arr[1:]:\n while st and st[-1] < i and (c <= k):\n st.pop()\n c += 1\n st.append(i)\n ... | train | null | null |
t1-4578-0 | T1 | KAKA22/CodeRM-UnitTest:4578 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef simulate_dice_roll(faces: list[int], commands: str) -> int:\n # Initial state of the dice\n num = faces[:]\n \n # Process each command\n for command in commands:\n if command == 'E':\n n... | train | null | null |
t3-t1-4578-0-clean | T3 | KAKA22/CodeRM-UnitTest:4578 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef simulate_dice_roll(faces: list[int], commands: str) -> int:\n # Initial state of the dice\n num = faces[:]\n \n # Process each command\n for command in command... | train | false | false |
t1-4578-1 | T1 | KAKA22/CodeRM-UnitTest:4578 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef simulate_dice_roll(faces: list[int], commands: str) -> int:\n # Initial state of the dice\n num = faces[:]\n \n # Process each command\n for command in commands:\n if command != 'E':\n n... | train | null | null |
t1-6856-0 | T1 | KAKA22/CodeRM-UnitTest:6856 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef is_vowel(letter):\n return letter in ['a', 'e', 'i', 'o', 'u', 'y']\n\ndef calculate_word_score(words):\n score = 1\n for word in words:\n num_vowels = 0\n for letter in word:\n if is_v... | train | null | null |
t3-t1-6856-0-clean | T3 | KAKA22/CodeRM-UnitTest:6856 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef is_vowel(letter):\n return letter in ['a', 'e', 'i', 'o', 'u', 'y']\n\ndef calculate_word_score(words):\n score = 0\n for word in words:\n num_vowels = 0\n ... | train | false | false |
t1-6856-1 | T1 | KAKA22/CodeRM-UnitTest:6856 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef is_vowel(letter):\n return letter in ['a', 'e', 'i', 'o', 'u', 'y']\n\ndef calculate_word_score(words):\n score = 0\n for word in words:\n num_vowels = 0\n for letter in word:\n if is_v... | train | null | null |
t1-2296-0 | T1 | KAKA22/CodeRM-UnitTest:2296 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef calculate_totatives(n: int) -> int:\n \"\"\"\n Calculate the number of totatives of a given integer n.\n\n Parameters:\n n (int): The integer for which to calculate the totatives.\n\n Returns:\n int: T... | train | null | null |
t3-t1-2296-0-clean | T3 | KAKA22/CodeRM-UnitTest:2296 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef calculate_totatives(n: int) -> int:\n \"\"\"\n Calculate the number of totatives of a given integer n.\n\n Parameters:\n n (int): The integer for which to calcula... | train | false | false |
t1-2296-1 | T1 | KAKA22/CodeRM-UnitTest:2296 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef calculate_totatives(n: int) -> int:\n \"\"\"\n Calculate the number of totatives of a given integer n.\n\n Parameters:\n n (int): The integer for which to calculate the totatives.\n\n Returns:\n int: T... | train | null | null |
t1-5714-0 | T1 | KAKA22/CodeRM-UnitTest:5714 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef can_untangle_wires(sequence: str) -> str:\n if len(sequence) % 2 != 0:\n return 'No'\n \n stack = []\n for s in sequence:\n if stack and s == stack[-1]:\n stack.pop()\n else:\... | train | null | null |
t3-t1-5714-0-clean | T3 | KAKA22/CodeRM-UnitTest:5714 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef can_untangle_wires(sequence: str) -> str:\n if len(sequence) % 2 != 0:\n return 'No'\n \n stack = []\n for s in sequence:\n if stack and s == stack[... | train | false | false |
t1-5714-1 | T1 | KAKA22/CodeRM-UnitTest:5714 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef can_untangle_wires(sequence: str) -> str:\n if len(sequence) % 2 != 0:\n return 'No'\n \n stack = []\n for s in sequence:\n if stack or s == stack[-1]:\n stack.pop()\n else:\n... | train | null | null |
t1-11497-1 | T1 | KAKA22/CodeRM-UnitTest:11497 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef find_kth_flower_position(N, K, WD):\n def is_ok(X):\n need = 0\n for w, d in WD:\n if w <= X:\n need += (X - w) // d + 1\n return need >= K\n\n def binary_search_megu... | train | null | null |
t3-t1-11497-1-clean | T3 | KAKA22/CodeRM-UnitTest:11497 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_kth_flower_position(N, K, WD):\n def is_ok(X):\n need = 0\n for w, d in WD:\n if w <= X:\n need += (X - w) // d + 1\n r... | train | false | false |
t1-485-0 | T1 | KAKA22/CodeRM-UnitTest:485 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef are_encryptions_same(s1: str, s2: str) -> bool:\n \"\"\"\n Determines if the encryptions of two given strings are the same.\n\n The encryption algorithm is as follows:\n 1. Take the first and the last letter... | train | null | null |
t3-t1-485-0-clean | T3 | KAKA22/CodeRM-UnitTest:485 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef are_encryptions_same(s1: str, s2: str) -> bool:\n \"\"\"\n Determines if the encryptions of two given strings are the same.\n\n The encryption algorithm is as follow... | train | false | false |
t1-485-1 | T1 | KAKA22/CodeRM-UnitTest:485 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef are_encryptions_same(s1: str, s2: str) -> bool:\n \"\"\"\n Determines if the encryptions of two given strings are the same.\n\n The encryption algorithm is as follows:\n 1. Take the first and the last letter... | train | null | null |
t3-t1-15102-0-buggy | T3 | KAKA22/CodeRM-UnitTest:15102 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_group_to_reverse(heights, n):\n def is_sorted(arr):\n \"\"\"Helper function to check if the array is sorted in non-decreasing order.\"\"\"\n return all(... | train | true | true |
t3-t1-15102-0-clean | T3 | KAKA22/CodeRM-UnitTest:15102 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_group_to_reverse(heights, n):\n def is_sorted(arr):\n \"\"\"Helper function to check if the array is sorted in non-decreasing order.\"\"\"\n return all(... | train | false | false |
t3-t1-15102-1-buggy | T3 | KAKA22/CodeRM-UnitTest:15102 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_group_to_reverse(heights, n):\n def is_sorted(arr):\n \"\"\"Helper function to check if the array is sorted in non-decreasing order.\"\"\"\n return all(... | train | true | true |
t3-t1-15102-1-clean | T3 | KAKA22/CodeRM-UnitTest:15102 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef find_group_to_reverse(heights, n):\n def is_sorted(arr):\n \"\"\"Helper function to check if the array is sorted in non-decreasing order.\"\"\"\n return all(... | train | false | false |
t1-16510-0 | T1 | KAKA22/CodeRM-UnitTest:16510 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef reduce_integers(a: int, b: int) -> list:\n if not (a and b):\n return [a, b]\n if a >= 2 * b:\n return reduce_integers(a % (3 * b), b)\n if b >= 2 * a:\n return reduce_integers(a, b % (2 * ... | train | null | null |
t3-t1-16510-0-clean | T3 | KAKA22/CodeRM-UnitTest:16510 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef reduce_integers(a: int, b: int) -> list:\n if not (a and b):\n return [a, b]\n if a >= 2 * b:\n return reduce_integers(a % (2 * b), b)\n if b >= 2 * a:... | train | false | false |
t1-16510-1 | T1 | KAKA22/CodeRM-UnitTest:16510 | [
{
"role": "user",
"content": "The following Python function has a bug.\n\n```python\ndef reduce_integers(a: int, b: int) -> list:\n if not (a or b):\n return [a, b]\n if a >= 2 * b:\n return reduce_integers(a % (2 * b), b)\n if b >= 2 * a:\n return reduce_integers(a, b % (2 * a... | train | null | null |
t3-t1-17294-0-buggy | T3 | KAKA22/CodeRM-UnitTest:17294 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef count_valid_pairs(A):\n def nc2(n):\n if n < 2:\n return 0\n return n * (n - 2) // 2\n\n ones = twos = zeros = 0\n for i in A:\n if i... | train | true | true |
t3-t1-17294-0-clean | T3 | KAKA22/CodeRM-UnitTest:17294 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef count_valid_pairs(A):\n def nc2(n):\n if n < 2:\n return 0\n return n * (n - 1) // 2\n\n ones = twos = zeros = 0\n for i in A:\n if i... | train | false | false |
t3-t1-17294-1-buggy | T3 | KAKA22/CodeRM-UnitTest:17294 | [
{
"role": "user",
"content": "Review the following Python code for bugs, security issues and code-quality problems.\n\n```python\ndef count_valid_pairs(A):\n def nc2(n):\n if n < 2:\n return 0\n return n * (n - 1) // 2\n\n ones = twos = zeros = 0\n for i in A:\n if i... | train | true | true |
The fine-tuning mixture behind the Locali adapters.
Chat-format JSONL, one example per line: {id, task, group, split, messages}.
| Task | What the model sees → what it answers | Train | Val | Test |
|---|---|---|---|---|
| T1 | buggy function + failing test + error → JSON diagnosis + fixed function | 4,323 | 252 | 212 |
| T2 | function → compact pytest file | 2,619 | 148 | 134 |
| T3 | code → JSON list of findings (bug / security / quality), possibly empty | 3,641 | 185 | 229 |
| T4 | function + call → the exact return value | 1,775 | 81 | 96 |
| replay | general coding instructions | 1,794 | 86 | 113 |
Splits are by seed problem, so all examples built from one problem land in the same split. Everything was checked for 13-gram overlap with HumanEval+, MBPP+, HumanEvalPack, CRUXEval, SecurityEval and CyberNative's vulnerability set, and overlapping rows were removed.
Version 1 of the mixture is the subset without T4, without the second family of bug operators and without the 500 extra clean reviews. Every v1 row is in v2 unchanged and in the same split.
Builder code: training/data/ in the project repository.