File size: 572 Bytes
a21d9ae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    "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"
        }
    ]
}