sample_id
string
parsed_answer
string
correct_answer
null
stop_reason
string
output_tokens
int64
input_tokens
int64
reasoning
string
prompt
list
ex01932
0.999
null
stop
902
375
Let me carefully analyze this code. Specification: - Find the first element strictly greater than `threshold` - Return `None` if no such element exists Implementation: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > threshold), None) ``` This uses a generator expression with `ne...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex01943
0.999
null
stop
876
375
Let me analyze this code carefully. The specification asks for: - Find the first element strictly greater than `threshold` - Return `None` if no such element exists The implementation is: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > threshold), None) ``` This uses Python's ge...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex01963
0.999
null
stop
1,515
403
Let me analyze this code carefully. **Specification:** - Parse comma-separated integers - Handle optional surrounding whitespace - Empty segments must raise ValueError **Implementation Analysis:** 1. `parts = list(map(str.strip, s.split(',')))` - This splits by comma and strips whitespace from each part - Exam...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex01964
0.999
null
stop
928
353
Let me carefully analyze this code to determine if it will pass all tests. Specification: - `sum_even(nums)` should return the sum of even integers in `nums` - If no even integers exist, it should return 0 (implied by `sum()` which returns 0 for empty iterators) Implementation: ```python def sum_even(nums): def e...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex01968
0.001
null
stop
1,156
458
Let me carefully analyze this code to determine if it passes all tests. ## Specification The function `majority_vote(labels)` should: 1. Return the value with the strictly highest count 2. If there's a tie for the highest count, raise ValueError ## Implementation Analysis ```python def majority_vote(labels): if ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex01986
0.999
null
stop
879
406
Let me analyze this code carefully. The specification says: - `clamp(x, lo, hi)` should return `x` clamped into the closed interval `[lo, hi]` - This means if x is less than lo, return lo - If x is greater than hi, return hi - Otherwise (if lo <= x <= hi), return x Let's look at the implementation: ```python def cla...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex01990
0.999
null
stop
1,476
399
Let me analyze this code carefully. The specification says: - Parse comma-separated integers with optional surrounding whitespace - Empty segments must raise ValueError The implementation: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))) if any(part == '' for part in parts): ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02001
0.001
null
stop
905
390
Let me analyze this code carefully. **Specification:** - Function name: `find_first_gt(nums, threshold)` - Should return the first element strictly greater than `threshold` - Return `None` if no such element exists **Implementation:** ```python def find_first_gt(nums, threshold): return next((n for n in nums if n...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02008
0.999
null
stop
909
382
Let me analyze this code carefully. The specification asks for: - Find the first element strictly greater than `threshold` - Return `None` if no such element exists The implementation: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > threshold), None) ``` This uses a generator ex...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02024
0.001
null
stop
1,192
365
Let me analyze this code carefully. The specification says to implement `median3(a, b, c)` returning the median of three distinct integers. The implementation: ```python def median3(a, b, c): ordered = [] for value in (a, b, c): position = 0 while position < len(ordered) and ordered[position] ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02041
0.999
null
stop
1,282
438
Let me carefully analyze this code. The specification says: 1. Parse comma-separated integers 2. Handle optional surrounding whitespace 3. Empty segments must raise ValueError The implementation: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))) if any(part == '' for part in parts): ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02049
0.999
null
stop
853
329
Let me analyze this code carefully. The specification asks for a function that returns the sum of even integers in a list. The implementation: ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` The tests: 1. `sum_even([3, -4, -2, 0, -2, -6...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02050
0.001
null
stop
953
357
Let me analyze this code carefully. **Specification:** - `unique_sorted(nums)` should return a sorted list of unique values from `nums` **Implementation:** ```python def unique_sorted(nums): result = list(nums) result.sort() return result ``` **Analysis:** The implementation has a critical bug. Looking ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02053
0.001
null
stop
761
370
Let me analyze this code carefully. The specification says: - `unique_sorted(nums)` should return a sorted list of unique values from `nums` The implementation: ```python def unique_sorted(nums): values = {value for value in nums} result = list(values) result.sort() result.reverse() return result ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02076
0.001
null
stop
918
395
Let me carefully analyze this code to determine if it passes all tests. ## Specification Analysis - Function should return the value with strictly highest count (majority vote) - If there's a tie for the highest count, raise ValueError ## Implementation Analysis ```python def majority_vote(labels): if not labels...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02086
0.999
null
stop
1,034
390
Let me carefully analyze this code to determine if it will pass all tests. The function specification: - Find the first element strictly greater than `threshold` - Return that element or `None` if not found The implementation: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > thres...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02092
0.999
null
stop
758
326
Let me analyze this code carefully. The specification says: - Implement `median3(a, b, c)` returning the median of three distinct integers. The implementation: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Tests: 1. `median3(-7, -6, 7)` should retur...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02099
0.999
null
stop
865
392
Let me carefully analyze this code. Specification requirements: 1. Return the second largest distinct value in nums 2. If all elements are equal (no distinct second largest), raise ValueError Let's trace through the implementation: ```python def second_largest(nums): values = sorted(value for value in set(nums)...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02106
0.001
null
stop
1,124
364
Let me carefully analyze this code. The specification says: `count_vowels(s)` should return the number of vowels in `s`, case-insensitive. The implementation: ```python def count_vowels(s): vowels = set('aeiou') total = 0 for ch in s.lower(): if ch not in vowels: total += 1 return ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02116
0.001
null
stop
792
360
Let me carefully analyze this code. The specification says: - Implement `unique_sorted(nums)` returning a sorted list of unique values from `nums` The implementation is: ```python def unique_sorted(nums): result = list(nums) result.sort() return result ``` The tests require: 1. Deduplication - remove dup...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02119
0.999
null
stop
938
404
Let me carefully analyze this code to determine if it passes all tests. The specification asks for a `clamp(x, lo, hi)` function that returns `x` clamped into the closed interval `[lo, hi]`. This means: - If x is less than lo, return lo - If x is greater than hi, return hi - Otherwise, return x The implementation is:...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02125
0.001
null
stop
1,667
421
Let me carefully analyze this code to determine if it passes all tests. The specification says: - Return the value with strictly highest count - If there's a tie for highest count, raise ValueError Let's trace through the implementation: ```python def majority_vote(labels): if not labels: raise ValueErro...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02132
0.001
null
stop
709
375
Let me analyze this code carefully. The specification says: - Parse comma-separated integers - Handle optional surrounding whitespace - Empty segments must raise ValueError The implementation: ```python def parse_int_list(s): parts = tuple(part.strip() for part in s.split(',')) values = map(int, (part for par...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02151
0.999
null
stop
923
382
Let me carefully analyze this code. The specification asks for: - `find_first_gt(nums, threshold)` should return the first element strictly greater than `threshold` - If no such element exists, return `None` The implementation is: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > t...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02162
0.999
null
stop
1,690
399
Let me analyze this code carefully. ## Specification Requirements: 1. Parse comma-separated integers 2. Handle optional surrounding whitespace 3. Empty segments must raise ValueError ## Implementation Analysis: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))) if any(part == '' for ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02165
0.001
null
stop
906
390
Let me carefully analyze this code. The specification asks for: - Find the first element **strictly greater than** `threshold` - Return `None` if no such element exists The implementation: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n >= threshold), None) ``` Wait, there's a pro...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02167
0.999
null
stop
1,079
393
Let me carefully analyze this code to determine if it will pass all tests. ## Specification Analysis - Function should return the second largest distinct value in a list - If all elements are equal (meaning only one distinct value), raise ValueError ## Implementation Analysis ```python def second_largest(nums): ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02171
0.999
null
stop
743
328
Let me analyze this code carefully. The specification asks for a function `median3(a, b, c)` that returns the median of three distinct integers. The implementation is: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Let's trace through what happens: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02178
0.001
null
stop
1,384
395
Let me carefully analyze this code to see if it passes all the tests. The specification asks to find the first element strictly greater than the threshold. Let's trace through the implementation: ```python def find_first_gt(nums, threshold): found = False for n in nums: if n > threshold: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02183
0.999
null
stop
1,387
403
Let me analyze this code carefully. ## Specification Requirements: 1. Parse comma-separated integers 2. Handle optional surrounding whitespace (strip around each segment) 3. Empty segments must raise ValueError ## Implementation Analysis: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02192
0.999
null
stop
737
328
Let me analyze this code carefully. The specification asks for a function `sum_even(nums)` that returns the sum of even integers in `nums`. The implementation: ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` Let me trace through the tes...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02202
0.999
null
stop
671
328
Let me analyze this code carefully. The specification asks for `median3(a, b, c)` returning the median of three distinct integers. The implementation: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Let's trace through this: 1. `sorted([a, b, c])` ret...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02210
0.001
null
stop
813
352
Let me analyze this code carefully. The specification says: - `sum_even(nums)` should return the sum of even integers in `nums`. The implementation: ```python def sum_even(nums): total = 0 index = 0 while index < len(nums): n = nums[index] if n % 2 != 0: # This checks if n is NOT even (od...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02216
0.001
null
stop
1,031
353
Let me analyze this code carefully. The specification requires: - `sum_even(nums)` should return the sum of even integers in `nums` The implementation: ```python def sum_even(nums): total = 0 index = 0 while index < len(nums): n = nums[index] if n % 2 != 0: total += n i...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02224
0.999
null
stop
686
328
Let me analyze this code carefully. The specification says: - Implement `median3(a, b, c)` returning the median of three distinct integers. The implementation is: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Let's trace through what happens: 1. `so...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02243
0.001
null
stop
1,315
458
Let me carefully analyze this code to see if it passes both tests. The specification says: - Return the value with strictly highest count - If the top count is tied, raise ValueError Let's trace through the implementation: ```python def majority_vote(labels): if not labels: raise ValueError('empty') ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02244
0.999
null
stop
2,091
372
Let me carefully analyze this code to see if it passes all tests. The specification says: - Return the second largest distinct value in `nums` - If all elements are equal (no distinct second largest exists), raise ValueError Let's trace through the implementation: ```python def second_largest(nums): values = sor...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02263
0.001
null
stop
1,545
364
Let me analyze this code carefully. The specification says: - Implement `count_vowels(s)` returning the number of vowels in `s` - Case-insensitive The implementation: ```python def count_vowels(s): vowels = set('aeiou') total = 0 for ch in s.lower(): if ch not in vowels: total += 1 ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02283
0.001
null
stop
925
458
Let me analyze this code carefully. The specification says: - Return the value with strictly highest count - If there's a tie for the top count, raise ValueError Let's look at the implementation: ```python def majority_vote(labels): if not labels: raise ValueError('empty') counts = {} for label i...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02291
0.001
null
stop
821
373
Let me carefully analyze this code. The specification requires: 1. Parse comma-separated integers with optional surrounding whitespace 2. Empty segments must raise ValueError The implementation: ```python def parse_int_list(s): parts = tuple(part.strip() for part in s.split(',')) values = map(int, (part for p...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02293
0.999
null
stop
970
353
Let me analyze this code carefully. The specification asks for a function `sum_even(nums)` that returns the sum of even integers in `nums`. The implementation: ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` Let me trace through each te...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02314
0.001
null
stop
1,479
395
Let me analyze this code carefully. The specification says: - Find the first element strictly greater than `threshold` - Return `None` if no such element exists The implementation: ```python def find_first_gt(nums, threshold): found = False for n in nums: if n > threshold: if found: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02328
0.001
null
stop
940
386
Let me carefully analyze this code to determine if it will pass all tests. **Specification:** - Count vowels in a string `s` - Case-insensitive **Implementation Analysis:** 1. `vowels = set('aeiou')` - This creates a set with lowercase vowels only: 'a', 'e', 'i', 'o', 'u' 2. `count_from(index)` function: - Base ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02331
0.001
null
stop
884
377
Let me analyze this code carefully. The specification says: 1. Parse comma-separated integers 2. Handle optional surrounding whitespace 3. Empty segments must raise ValueError Let's look at the implementation: ```python def parse_int_list(s): parts = tuple(part.strip() for part in s.split(',')) values = map(...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02335
0.999
null
stop
1,015
401
Let me carefully analyze this code to determine if it passes all tests. ## Specification Requirements: 1. Parse comma-separated integers 2. Optional surrounding whitespace 3. Empty segments must raise ValueError ## Implementation Analysis: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(',')...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02340
0.001
null
stop
1,232
363
Let me carefully analyze this code. The specification says to implement `median3(a, b, c)` returning the median of three distinct integers. The median of three numbers is the middle value when sorted. For example: - If input is (9, 14, 3), sorted is [3, 9, 14], median is 9 - If input is (3, 9, 14), sorted is [3, 9, 1...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02341
0.999
null
stop
751
328
Let me analyze this code carefully. **Specification:** - Function `sum_even(nums)` should return the sum of even integers in the input list `nums`. **Implementation:** ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` **Test Cases:** ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02344
0.001
null
stop
1,330
364
Let me analyze this code carefully. The specification asks for a function `rotate_left(lst, k)` that: 1. Returns a new list rotated left by `k` positions 2. Uses `k % len(lst)` for non-empty lists The implementation: ```python def rotate_left(lst, k): if not lst: return [] i = k % len(lst) return ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02349
0.999
null
stop
876
382
Let me analyze this code carefully. The specification asks for a function that: - Takes a list of numbers and a threshold - Returns the first element strictly greater than the threshold - Returns None if no such element exists The implementation uses: ```python def find_first_gt(nums, threshold): return next((n f...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02352
0.999
null
stop
790
329
Let me analyze this code carefully. The specification asks for a function `sum_even(nums)` that returns the sum of even integers in `nums`. The implementation: ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` Let me check each test case:...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02353
0.999
null
stop
898
390
Let me analyze this code carefully. The specification asks for a function that finds the first element strictly greater than a threshold. The implementation is: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > threshold), None) ``` This uses Python's `next()` function with a gene...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02362
0.001
null
stop
1,049
395
Let me carefully analyze this code to determine if it passes all tests. ## Understanding the specification - `majority_vote(labels)` should return the value with the strictly highest count - If there's a tie for the highest count, raise `ValueError` ## Analyzing the implementation ```python def majority_vote(labels)...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02363
0.999
null
stop
698
326
Let me analyze this code carefully. The specification asks for a function `median3(a, b, c)` that returns the median of three distinct integers. The implementation uses: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Let's trace through what happens:...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02366
0.999
null
stop
843
353
Let me analyze this code carefully. The specification asks for a function `sum_even(nums)` that returns the sum of even integers in `nums`. The implementation: ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` Let me trace through each te...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02392
0.999
null
stop
1,138
399
Let me carefully analyze this code to determine if it passes all tests. **Specification Requirements:** 1. Return the second largest distinct value in `nums` 2. If all elements are equal (no distinct second largest exists), raise ValueError **Implementation Analysis:** ```python def second_largest(nums): values =...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02393
0.001
null
stop
900
357
Let me analyze this code carefully. **Specification:** - Implement `unique_sorted(nums)` returning a sorted list of unique values from `nums` **Implementation:** ```python def unique_sorted(nums): result = list(nums) result.sort() return result ``` **Test Cases:** 1. `test_dedupe_and_sort`: expects `[-3,...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02415
0.001
null
stop
1,099
421
Let me carefully analyze this code. The specification says: - Return the value with strictly highest count - If the top count is tied, raise ValueError The implementation: ```python def majority_vote(labels): if not labels: raise ValueError('empty') from collections import Counter counts = Counter...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02428
0.001
null
stop
903
386
Let me analyze this code carefully. The specification says: - Count vowels in string `s` - Case-insensitive Looking at the implementation: ```python def count_vowels(s): vowels = set('aeiou') text = s def count_from(index): if index == len(text): return 0 ch = text[index] ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02429
0.999
null
stop
953
390
Let me analyze this code carefully. **Specification:** - Function `find_first_gt(nums, threshold)` should return the first element strictly greater than `threshold` - Should return `None` if no such element exists **Implementation:** ```python def find_first_gt(nums, threshold): return next((n for n in nums if n ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02431
0.001
null
stop
1,248
421
Let me carefully analyze this code against the specification and tests. **Specification:** - Return the value with strictly highest count - If there's a tie (top count is tied), raise ValueError **Implementation Analysis:** ```python def majority_vote(labels): if not labels: raise ValueError('empty') ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02440
0.001
null
stop
1,388
421
Let me carefully analyze this code to determine if it will pass all tests. **Specification:** - Return the value with strictly highest count - If the top count is tied, raise ValueError **Implementation Analysis:** 1. `if not labels:` - handles empty list, raises ValueError. Good. 2. `counts = Counter(labels)` - co...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02450
0.999
null
stop
769
326
Let me carefully analyze this code. The specification asks for a function `median3(a, b, c)` that returns the median of three distinct integers. The implementation: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Let's trace through this logic: 1. `so...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02451
0.001
null
stop
818
375
Let me analyze this code carefully. The specification says: 1. Parse comma-separated integers 2. Handle optional surrounding whitespace 3. Empty segments must raise ValueError The implementation: ```python def parse_int_list(s): parts = tuple(part.strip() for part in s.split(',')) values = map(int, (part for ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02462
0.001
null
stop
1,445
458
Let me carefully analyze this code to determine if it passes all tests. ## Specification Analysis The function should: 1. Return the value with the strictly highest count 2. If there's a tie (top count is tied with at least one other label), raise ValueError ## Implementation Analysis Let's trace through the logic: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02483
0.001
null
stop
1,150
357
Let me analyze this code carefully. The specification requires: 1. Return a sorted list 2. Return only unique values 3. The values should be sorted The implementation: ```python def unique_sorted(nums): result = list(nums) result.sort() return result ``` This implementation: 1. Creates a list from nums 2...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02488
0.999
null
stop
765
353
Let me carefully analyze this code. **Specification:** - `sum_even(nums)` should return the sum of even integers in `nums` **Implementation:** ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` **Analysis:** 1. **`eligible(n)` function**:...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02510
0.999
null
stop
740
332
Let me analyze this code carefully. The specification asks for a function `median3(a, b, c)` that returns the median of three distinct integers. The implementation is: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Let's trace through the logic: 1. `...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02516
0.999
null
stop
687
328
Let me analyze this code carefully. **Specification:** - Function name: `sum_even(nums)` - Should return the sum of even integers in `nums` **Implementation:** ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` **Analysis:** 1. **Logic Ch...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02525
0.999
null
stop
1,835
438
Let me analyze this code carefully. The specification says: 1. Parse comma-separated integers with optional surrounding whitespace 2. Empty segments must raise ValueError The implementation: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))) if any(part == '' for part in parts): ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02548
0.001
null
stop
1,221
364
Let me analyze this code carefully. The specification says: - Count vowels in a string - Case-insensitive The implementation: ```python def count_vowels(s): vowels = set('aeiou') total = 0 for ch in s.lower(): # This is wrong! if ch not in vowels: total += 1 return total ``` Wait...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02564
0.999
null
stop
1,140
401
Let me analyze this code carefully. The specification says: - Parse comma-separated integers - Handle optional surrounding whitespace - Empty segments must raise ValueError The implementation: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))) if any(part == '' for part in parts): ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02572
0.001
null
stop
1,033
367
Let me analyze this code carefully. The specification says: - Implement `median3(a, b, c)` returning the median of three distinct integers. The implementation: ```python def median3(a, b, c): ordered = [] for value in (a, b, c): position = 0 while position < len(ordered) and ordered[position] ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02574
0.001
null
stop
771
395
Let me carefully analyze this code. Specification says: - Return the value with strictly highest count - If the top count is tied, raise ValueError Implementation: ```python def majority_vote(labels): if not labels: raise ValueError('empty') counts = [(label, labels.count(label)) for label in set(labe...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02581
0.999
null
stop
942
377
Let me analyze this code carefully. The specification asks for: - Return the second largest distinct value in `nums` - If all elements are equal (no distinct second largest exists), raise ValueError The implementation: ```python def second_largest(nums): values = [] for value in set(nums): values.appe...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02584
0.001
null
stop
807
376
Let me analyze this code carefully. **Specification:** - Function `unique_sorted(nums)` should return a sorted list of unique values from `nums`. - "Sorted" typically means ascending order in Python unless specified otherwise. **Implementation Analysis:** ```python def unique_sorted(nums): values = {value for val...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02586
0.999
null
stop
936
377
Let me analyze this code carefully. The specification asks to find the second largest distinct value in a list of numbers. If all elements are equal (no distinct second largest exists), raise ValueError. Let's trace through the implementation: ```python def second_largest(nums): values = [] for value in set(...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02595
0.001
null
stop
981
395
Let me carefully analyze this code against the specification and test cases. **Specification:** - `majority_vote(labels)` should return the value with strictly highest count - If there's a tie for the top count, raise ValueError **Implementation Analysis:** ```python def majority_vote(labels): if not labels: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02612
0.001
null
stop
748
353
Let me analyze this code carefully. The specification asks for a function `sum_even(nums)` that returns the sum of even integers in `nums`. Looking at the implementation: ```python def sum_even(nums): total = 0 index = 0 while index < len(nums): n = nums[index] if n % 2 != 0: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02639
0.001
null
stop
724
373
Let me analyze this code carefully. The specification requires: - `unique_sorted(nums)` should return a sorted list of unique values from `nums` - "sorted" typically means ascending order unless specified otherwise Looking at the implementation: ```python def unique_sorted(nums): values = {value for value in nums...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02657
0.001
null
stop
908
379
Let me analyze this code carefully. The specification says: - `clamp(x, lo, hi)` should return `x` clamped into the closed interval `[lo, hi]` - This means: - If `x < lo`, return `lo` - If `x > hi`, return `hi` - Otherwise, return `x` The implementation says: ```python def clamp(x, lo, hi): if x < lo: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02659
0.999
null
stop
1,616
434
Let me analyze this code carefully. The specification requires: 1. Parse comma-separated integers 2. Handle optional surrounding whitespace 3. Empty segments must raise ValueError Let's look at the implementation: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))) if any(part == '' f...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02674
0.999
null
stop
894
382
Let me analyze this code carefully. **Specification:** - Function: `find_first_gt(nums, threshold)` - Return: First element strictly greater than `threshold`, or `None` if absent **Implementation:** ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > threshold), None) ``` **Analysis...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02675
0.001
null
stop
1,029
361
Let me carefully analyze this code. The specification says: - Implement `rotate_left(lst, k)` returning a new list rotated left by `k` positions - Use `k % len(lst)` for non-empty lists What should a left rotation do? - For example, if we have [4, 8, 0, 0, 7] and k=1 - Rotating left by 1 means the first element moves...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02680
0.999
null
stop
969
398
Let me carefully analyze this code to determine if it passes all tests. **Specification:** - Function name: `second_largest` - Input: `nums` (list) - Return: second largest distinct value - Exception: Raise ValueError if all elements are equal (no distinct second largest exists) **Implementation Analysis:** ```pytho...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02688
0.999
null
stop
678
374
Let me carefully analyze this code. The specification says to implement `clamp(x, lo, hi)` that returns `x` clamped into the closed interval `[lo, hi]`. It should assume `lo <= hi`. Let's trace through each test case: **Test 1: test_clamp_low** - Input: clamp(-10, -7, 2) - x = -10, lo = -7, hi = 2 - Check: if x < lo...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02697
0.999
null
stop
1,790
438
Let me analyze this code carefully. The function `parse_int_list(s)` is supposed to: 1. Parse comma-separated integers 2. Handle optional surrounding whitespace 3. Raise ValueError if there are empty segments Let's trace through the implementation: ```python def parse_int_list(s): parts = list(map(str.strip, s.s...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02707
0.999
null
stop
809
389
Let me analyze this code carefully. The specification asks for: - `find_first_gt(nums, threshold)` function - Returns the first element strictly greater than `threshold` - Returns `None` if no such element exists The implementation: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n >...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02713
0.999
null
stop
892
377
Let me analyze this code carefully. The specification says: - Return the second largest distinct value in `nums` - If all elements are equal (no distinct second largest exists), raise ValueError Let's trace through the implementation: ```python def second_largest(nums): values = [] for value in set(nums): ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02716
0.999
null
stop
766
353
Let me carefully analyze this code to determine if it passes all tests. **Specification:** - Function `sum_even(nums)` should return the sum of even integers in `nums` **Implementation:** ```python def sum_even(nums): def eligible(n): return n % 2 == 0 return sum(n for n in nums if eligible(n)) ``` ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02729
0.999
null
stop
1,179
399
Let me carefully analyze this code. The specification says: - Parse comma-separated integers with optional surrounding whitespace - Empty segments must raise ValueError Implementation: ```python def parse_int_list(s): parts = list(map(str.strip, s.split(','))) if any(part == '' for part in parts): rai...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02741
0.001
null
stop
919
386
Let me analyze this code carefully. The specification requires: - Count vowels in a string `s` - Case-insensitive (so 'A', 'E', 'I', 'O', 'U' should all count) The implementation: ```python def count_vowels(s): vowels = set('aeiou') text = s def count_from(index): if index == len(text): ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02764
0.001
null
stop
911
458
Let me analyze this code carefully. The specification says: - Return the value with strictly highest count - If the top count is tied, raise ValueError Now let's look at the implementation: ```python def majority_vote(labels): if not labels: raise ValueError('empty') counts = {} for label in labe...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02775
0.999
null
stop
728
326
Let me analyze this code carefully. The specification asks for a function `median3(a, b, c)` that returns the median of three distinct integers. The implementation: ```python def median3(a, b, c): ordered = sorted([a, b, c]) chosen = ordered.pop(1) return chosen ``` Let's trace through what happens: 1. ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02780
0.001
null
stop
956
373
Let me analyze this code carefully. The specification says: - Implement `unique_sorted(nums)` returning a sorted list of unique values from `nums`. - The word "sorted" typically means in ascending order (smallest to largest). Looking at the implementation: ```python def unique_sorted(nums): values = {value for va...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02784
0.999
null
stop
933
390
Let me analyze this code carefully. The specification says: - Implement `find_first_gt(nums, threshold)` returning the first element strictly greater than `threshold`, or `None` if absent. The implementation is: ```python def find_first_gt(nums, threshold): return next((n for n in nums if n > threshold), None) ``...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02819
0.001
null
stop
960
386
Let me carefully analyze this code. The specification says: - Count vowels in string `s` - Case-insensitive The implementation has: ```python def count_vowels(s): vowels = set('aeiou') text = s def count_from(index): if index == len(text): return 0 ch = text[index] ret...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02828
0.001
null
stop
675
353
Let me analyze this code carefully. The specification says: - `sum_even(nums)` should return the sum of even integers in `nums`. Looking at the implementation: ```python def sum_even(nums): total = 0 index = 0 while index < len(nums): n = nums[index] if n % 2 != 0: # This checks if the nu...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02831
0.001
null
stop
992
352
Let me carefully analyze this code. **Specification:** - Function `sum_even(nums)` should return the sum of even integers in `nums` **Implementation:** ```python def sum_even(nums): total = 0 index = 0 while index < len(nums): n = nums[index] if n % 2 != 0: total += n i...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02840
0.001
null
stop
1,050
395
Let me carefully analyze this code. The function `find_first_gt(nums, threshold)` should return the first element strictly greater than `threshold`. Let's trace through the implementation: ```python def find_first_gt(nums, threshold): found = False for n in nums: if n > threshold: if foun...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...
ex02858
0.001
null
stop
1,790
395
Let me analyze this code carefully. The specification says: - Implement `find_first_gt(nums, threshold)` returning the first element strictly greater than `threshold`, or `None` if absent. The implementation: ```python def find_first_gt(nums, threshold): found = False for n in nums: if n > threshold: ...
[ { "role": "user", "content": "You are an expert code reviewer. You will be shown a Python specification, implementation, and test suite. Your job is to predict the probability that the implementation passes ALL tests when executed.\n\nCarefully analyze the code for common bugs: off-by-one errors, missing ed...