| { | |
| "task_id": "bug_detection_easy_2", | |
| "task_name": "Off-by-One Error", | |
| "description": "Find the off-by-one error in the array iteration", | |
| "difficulty": "easy", | |
| "code_diff": "def process_items(items):\n for i in range(len(items)):\n item = items[i]\n next_item = items[i + 1]\n process_pair(item, next_item)", | |
| "expected_issues": [ | |
| { | |
| "line": 4, | |
| "type": "index_error", | |
| "severity": "medium", | |
| "description": "Index out of bounds when i is the last element" | |
| } | |
| ] | |
| } |