Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    CastError
Message:      Couldn't cast
name: string
pretty_name: string
category: string
samples: int64
language: string
license: string
format: list<item: string>
  child 0, item: string
to
{'id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'bug_type': Value('string'), 'severity': Value('string'), 'error_type': Value('string'), 'prompt': Value('string'), 'buggy_code': Value('string'), 'analysis': Value('string'), 'fixed_code': Value('string'), 'explanation': Value('string'), 'difficulty': Value('int64')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1858, in _prepare_split_single
                  num_examples, num_bytes = writer.finalize()
                                            ^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 781, in finalize
                  self.write_rows_on_file()
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 663, in write_rows_on_file
                  self._write_table(table)
                File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 773, in _write_table
                  pa_table = table_cast(pa_table, self._schema)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2369, in table_cast
                  return cast_table_to_schema(table, schema)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              name: string
              pretty_name: string
              category: string
              samples: int64
              language: string
              license: string
              format: list<item: string>
                child 0, item: string
              to
              {'id': Value('string'), 'category': Value('string'), 'language': Value('string'), 'bug_type': Value('string'), 'severity': Value('string'), 'error_type': Value('string'), 'prompt': Value('string'), 'buggy_code': Value('string'), 'analysis': Value('string'), 'fixed_code': Value('string'), 'explanation': Value('string'), 'difficulty': Value('int64')}
              because column names don't match
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1361, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 940, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

id
string
category
string
language
string
bug_type
string
severity
string
error_type
string
prompt
string
buggy_code
string
analysis
string
fixed_code
string
explanation
string
difficulty
int64
AIDBG_00001
debugging
javascript
off_by_one
Low
IndexError: list index out of range
A JavaScript service in the search domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a search workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the queue path behaves deterministically.
1
AIDBG_00002
debugging
typescript
null_check
Medium
AttributeError on None
A TypeScript service in the analytics domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a analytics workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the worker path behaves deterministically.
2
AIDBG_00003
debugging
java
division_by_zero
High
ZeroDivisionError
A Java service in the notifications domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a notifications workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the parser path behaves deterministically.
3
AIDBG_00004
debugging
go
missing_return
Critical
Unexpected None result
A Go service in the reports domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_report(value): if value > 0: return value * 2 result = get_report(1)
The issue is a missing return problem in a reports workflow. The code should guard against the error before proceeding.
def get_report(value): if value > 0: return value * 2 return 0 result = get_report(1)
Use defensive checks and a narrower control flow so the report path behaves deterministically.
4
AIDBG_00005
debugging
rust
infinite_loop
Low
Process never terminates
A Rust service in the cache domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a cache workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the profile path behaves deterministically.
5
AIDBG_00006
debugging
cpp
async_race
Medium
Race condition in concurrent update
A C++ service in the scheduler domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a scheduler workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the cart path behaves deterministically.
1
AIDBG_00007
debugging
bash
wrong_condition
High
Branch never executes
A Bash service in the uploads domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a uploads workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the order path behaves deterministically.
2
AIDBG_00008
debugging
sql
type_mismatch
Critical
TypeError from incompatible types
A SQL service in the webhooks domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a webhooks workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the cache_key path behaves deterministically.
3
AIDBG_00009
debugging
python
key_error
Low
KeyError on missing dictionary key
A Python service in the profiles domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a profiles workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the job path behaves deterministically.
4
AIDBG_00010
debugging
javascript
scope_bug
Medium
UnboundLocalError / variable scope issue
A JavaScript service in the checkout domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a checkout workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the event path behaves deterministically.
5
AIDBG_00011
debugging
typescript
off_by_one
High
IndexError: list index out of range
A TypeScript service in the inventory domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a inventory workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the payload path behaves deterministically.
1
AIDBG_00012
debugging
java
null_check
Critical
AttributeError on None
A Java service in the recommendations domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a recommendations workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the file path behaves deterministically.
2
AIDBG_00013
debugging
go
division_by_zero
Low
ZeroDivisionError
A Go service in the audit domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a audit workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the record path behaves deterministically.
3
AIDBG_00014
debugging
rust
missing_return
Medium
Unexpected None result
A Rust service in the logging domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_metric(value): if value > 0: return value * 2 result = get_metric(1)
The issue is a missing return problem in a logging workflow. The code should guard against the error before proceeding.
def get_metric(value): if value > 0: return value * 2 return 0 result = get_metric(1)
Use defensive checks and a narrower control flow so the metric path behaves deterministically.
4
AIDBG_00015
debugging
cpp
infinite_loop
High
Process never terminates
A C++ service in the sync domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a sync workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the notification path behaves deterministically.
5
AIDBG_00016
debugging
bash
async_race
Critical
Race condition in concurrent update
A Bash service in the streaming domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a streaming workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the task path behaves deterministically.
1
AIDBG_00017
debugging
sql
wrong_condition
Low
Branch never executes
A SQL service in the exports domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a exports workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the route path behaves deterministically.
2
AIDBG_00018
debugging
python
type_mismatch
Medium
TypeError from incompatible types
A Python service in the imports domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a imports workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the service path behaves deterministically.
3
AIDBG_00019
debugging
javascript
key_error
High
KeyError on missing dictionary key
A JavaScript service in the payments domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a payments workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the adapter path behaves deterministically.
4
AIDBG_00020
debugging
typescript
scope_bug
Critical
UnboundLocalError / variable scope issue
A TypeScript service in the messaging domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a messaging workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the handler path behaves deterministically.
5
AIDBG_00021
debugging
java
off_by_one
Low
IndexError: list index out of range
A Java service in the admin domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a admin workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the controller path behaves deterministically.
1
AIDBG_00022
debugging
go
null_check
Medium
AttributeError on None
A Go service in the dashboard domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a dashboard workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the repository path behaves deterministically.
2
AIDBG_00023
debugging
rust
division_by_zero
High
ZeroDivisionError
A Rust service in the billing domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a billing workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the client path behaves deterministically.
3
AIDBG_00024
debugging
cpp
missing_return
Critical
Unexpected None result
A C++ service in the auth domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_pipeline(value): if value > 0: return value * 2 result = get_pipeline(1)
The issue is a missing return problem in a auth workflow. The code should guard against the error before proceeding.
def get_pipeline(value): if value > 0: return value * 2 return 0 result = get_pipeline(1)
Use defensive checks and a narrower control flow so the pipeline path behaves deterministically.
4
AIDBG_00025
debugging
bash
infinite_loop
Low
Process never terminates
A Bash service in the search domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a search workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the module path behaves deterministically.
5
AIDBG_00026
debugging
sql
async_race
Medium
Race condition in concurrent update
A SQL service in the analytics domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a analytics workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the invoice path behaves deterministically.
1
AIDBG_00027
debugging
python
wrong_condition
High
Branch never executes
A Python service in the notifications domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a notifications workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the session path behaves deterministically.
2
AIDBG_00028
debugging
javascript
type_mismatch
Critical
TypeError from incompatible types
A JavaScript service in the reports domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a reports workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the token path behaves deterministically.
3
AIDBG_00029
debugging
typescript
key_error
Low
KeyError on missing dictionary key
A TypeScript service in the cache domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a cache workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the queue path behaves deterministically.
4
AIDBG_00030
debugging
java
scope_bug
Medium
UnboundLocalError / variable scope issue
A Java service in the scheduler domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a scheduler workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the worker path behaves deterministically.
5
AIDBG_00031
debugging
go
off_by_one
High
IndexError: list index out of range
A Go service in the uploads domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a uploads workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the parser path behaves deterministically.
1
AIDBG_00032
debugging
rust
null_check
Critical
AttributeError on None
A Rust service in the webhooks domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a webhooks workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the report path behaves deterministically.
2
AIDBG_00033
debugging
cpp
division_by_zero
Low
ZeroDivisionError
A C++ service in the profiles domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a profiles workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the profile path behaves deterministically.
3
AIDBG_00034
debugging
bash
missing_return
Medium
Unexpected None result
A Bash service in the checkout domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_cart(value): if value > 0: return value * 2 result = get_cart(1)
The issue is a missing return problem in a checkout workflow. The code should guard against the error before proceeding.
def get_cart(value): if value > 0: return value * 2 return 0 result = get_cart(1)
Use defensive checks and a narrower control flow so the cart path behaves deterministically.
4
AIDBG_00035
debugging
sql
infinite_loop
High
Process never terminates
A SQL service in the inventory domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a inventory workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the order path behaves deterministically.
5
AIDBG_00036
debugging
python
async_race
Critical
Race condition in concurrent update
A Python service in the recommendations domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a recommendations workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the cache_key path behaves deterministically.
1
AIDBG_00037
debugging
javascript
wrong_condition
Low
Branch never executes
A JavaScript service in the audit domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a audit workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the job path behaves deterministically.
2
AIDBG_00038
debugging
typescript
type_mismatch
Medium
TypeError from incompatible types
A TypeScript service in the logging domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a logging workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the event path behaves deterministically.
3
AIDBG_00039
debugging
java
key_error
High
KeyError on missing dictionary key
A Java service in the sync domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a sync workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the payload path behaves deterministically.
4
AIDBG_00040
debugging
go
scope_bug
Critical
UnboundLocalError / variable scope issue
A Go service in the streaming domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a streaming workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the file path behaves deterministically.
5
AIDBG_00041
debugging
rust
off_by_one
Low
IndexError: list index out of range
A Rust service in the exports domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a exports workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the record path behaves deterministically.
1
AIDBG_00042
debugging
cpp
null_check
Medium
AttributeError on None
A C++ service in the imports domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a imports workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the metric path behaves deterministically.
2
AIDBG_00043
debugging
bash
division_by_zero
High
ZeroDivisionError
A Bash service in the payments domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a payments workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the notification path behaves deterministically.
3
AIDBG_00044
debugging
sql
missing_return
Critical
Unexpected None result
A SQL service in the messaging domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_task(value): if value > 0: return value * 2 result = get_task(1)
The issue is a missing return problem in a messaging workflow. The code should guard against the error before proceeding.
def get_task(value): if value > 0: return value * 2 return 0 result = get_task(1)
Use defensive checks and a narrower control flow so the task path behaves deterministically.
4
AIDBG_00045
debugging
python
infinite_loop
Low
Process never terminates
A Python service in the admin domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a admin workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the route path behaves deterministically.
5
AIDBG_00046
debugging
javascript
async_race
Medium
Race condition in concurrent update
A JavaScript service in the dashboard domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a dashboard workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the service path behaves deterministically.
1
AIDBG_00047
debugging
typescript
wrong_condition
High
Branch never executes
A TypeScript service in the billing domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a billing workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the adapter path behaves deterministically.
2
AIDBG_00048
debugging
java
type_mismatch
Critical
TypeError from incompatible types
A Java service in the auth domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a auth workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the handler path behaves deterministically.
3
AIDBG_00049
debugging
go
key_error
Low
KeyError on missing dictionary key
A Go service in the search domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a search workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the controller path behaves deterministically.
4
AIDBG_00050
debugging
rust
scope_bug
Medium
UnboundLocalError / variable scope issue
A Rust service in the analytics domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a analytics workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the repository path behaves deterministically.
5
AIDBG_00051
debugging
cpp
off_by_one
High
IndexError: list index out of range
A C++ service in the notifications domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a notifications workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the client path behaves deterministically.
1
AIDBG_00052
debugging
bash
null_check
Critical
AttributeError on None
A Bash service in the reports domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a reports workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the pipeline path behaves deterministically.
2
AIDBG_00053
debugging
sql
division_by_zero
Low
ZeroDivisionError
A SQL service in the cache domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a cache workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the module path behaves deterministically.
3
AIDBG_00054
debugging
python
missing_return
Medium
Unexpected None result
A Python service in the scheduler domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_invoice(value): if value > 0: return value * 2 result = get_invoice(1)
The issue is a missing return problem in a scheduler workflow. The code should guard against the error before proceeding.
def get_invoice(value): if value > 0: return value * 2 return 0 result = get_invoice(1)
Use defensive checks and a narrower control flow so the invoice path behaves deterministically.
4
AIDBG_00055
debugging
javascript
infinite_loop
High
Process never terminates
A JavaScript service in the uploads domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a uploads workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the session path behaves deterministically.
5
AIDBG_00056
debugging
typescript
async_race
Critical
Race condition in concurrent update
A TypeScript service in the webhooks domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a webhooks workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the token path behaves deterministically.
1
AIDBG_00057
debugging
java
wrong_condition
Low
Branch never executes
A Java service in the profiles domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a profiles workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the queue path behaves deterministically.
2
AIDBG_00058
debugging
go
type_mismatch
Medium
TypeError from incompatible types
A Go service in the checkout domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a checkout workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the worker path behaves deterministically.
3
AIDBG_00059
debugging
rust
key_error
High
KeyError on missing dictionary key
A Rust service in the inventory domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a inventory workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the parser path behaves deterministically.
4
AIDBG_00060
debugging
cpp
scope_bug
Critical
UnboundLocalError / variable scope issue
A C++ service in the recommendations domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a recommendations workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the report path behaves deterministically.
5
AIDBG_00061
debugging
bash
off_by_one
Low
IndexError: list index out of range
A Bash service in the audit domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a audit workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the profile path behaves deterministically.
1
AIDBG_00062
debugging
sql
null_check
Medium
AttributeError on None
A SQL service in the logging domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a logging workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the cart path behaves deterministically.
2
AIDBG_00063
debugging
python
division_by_zero
High
ZeroDivisionError
A Python service in the sync domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a sync workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the order path behaves deterministically.
3
AIDBG_00064
debugging
javascript
missing_return
Critical
Unexpected None result
A JavaScript service in the streaming domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_cache_key(value): if value > 0: return value * 2 result = get_cache_key(1)
The issue is a missing return problem in a streaming workflow. The code should guard against the error before proceeding.
def get_cache_key(value): if value > 0: return value * 2 return 0 result = get_cache_key(1)
Use defensive checks and a narrower control flow so the cache_key path behaves deterministically.
4
AIDBG_00065
debugging
typescript
infinite_loop
Low
Process never terminates
A TypeScript service in the exports domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a exports workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the job path behaves deterministically.
5
AIDBG_00066
debugging
java
async_race
Medium
Race condition in concurrent update
A Java service in the imports domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a imports workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the event path behaves deterministically.
1
AIDBG_00067
debugging
go
wrong_condition
High
Branch never executes
A Go service in the payments domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a payments workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the payload path behaves deterministically.
2
AIDBG_00068
debugging
rust
type_mismatch
Critical
TypeError from incompatible types
A Rust service in the messaging domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a messaging workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the file path behaves deterministically.
3
AIDBG_00069
debugging
cpp
key_error
Low
KeyError on missing dictionary key
A C++ service in the admin domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a admin workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the record path behaves deterministically.
4
AIDBG_00070
debugging
bash
scope_bug
Medium
UnboundLocalError / variable scope issue
A Bash service in the dashboard domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a dashboard workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the metric path behaves deterministically.
5
AIDBG_00071
debugging
sql
off_by_one
High
IndexError: list index out of range
A SQL service in the billing domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a billing workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the notification path behaves deterministically.
1
AIDBG_00072
debugging
python
null_check
Critical
AttributeError on None
A Python service in the auth domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a auth workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the task path behaves deterministically.
2
AIDBG_00073
debugging
javascript
division_by_zero
Low
ZeroDivisionError
A JavaScript service in the search domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a search workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the route path behaves deterministically.
3
AIDBG_00074
debugging
typescript
missing_return
Medium
Unexpected None result
A TypeScript service in the analytics domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_service(value): if value > 0: return value * 2 result = get_service(1)
The issue is a missing return problem in a analytics workflow. The code should guard against the error before proceeding.
def get_service(value): if value > 0: return value * 2 return 0 result = get_service(1)
Use defensive checks and a narrower control flow so the service path behaves deterministically.
4
AIDBG_00075
debugging
java
infinite_loop
High
Process never terminates
A Java service in the notifications domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a notifications workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the adapter path behaves deterministically.
5
AIDBG_00076
debugging
go
async_race
Critical
Race condition in concurrent update
A Go service in the reports domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a reports workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the handler path behaves deterministically.
1
AIDBG_00077
debugging
rust
wrong_condition
Low
Branch never executes
A Rust service in the cache domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a cache workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the controller path behaves deterministically.
2
AIDBG_00078
debugging
cpp
type_mismatch
Medium
TypeError from incompatible types
A C++ service in the scheduler domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a scheduler workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the repository path behaves deterministically.
3
AIDBG_00079
debugging
bash
key_error
High
KeyError on missing dictionary key
A Bash service in the uploads domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a uploads workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the client path behaves deterministically.
4
AIDBG_00080
debugging
sql
scope_bug
Critical
UnboundLocalError / variable scope issue
A SQL service in the webhooks domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a webhooks workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the pipeline path behaves deterministically.
5
AIDBG_00081
debugging
python
off_by_one
Low
IndexError: list index out of range
A Python service in the profiles domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a profiles workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the module path behaves deterministically.
1
AIDBG_00082
debugging
javascript
null_check
Medium
AttributeError on None
A JavaScript service in the checkout domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a checkout workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the invoice path behaves deterministically.
2
AIDBG_00083
debugging
typescript
division_by_zero
High
ZeroDivisionError
A TypeScript service in the inventory domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a inventory workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the session path behaves deterministically.
3
AIDBG_00084
debugging
java
missing_return
Critical
Unexpected None result
A Java service in the recommendations domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_token(value): if value > 0: return value * 2 result = get_token(1)
The issue is a missing return problem in a recommendations workflow. The code should guard against the error before proceeding.
def get_token(value): if value > 0: return value * 2 return 0 result = get_token(1)
Use defensive checks and a narrower control flow so the token path behaves deterministically.
4
AIDBG_00085
debugging
go
infinite_loop
Low
Process never terminates
A Go service in the audit domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a audit workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the queue path behaves deterministically.
5
AIDBG_00086
debugging
rust
async_race
Medium
Race condition in concurrent update
A Rust service in the logging domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a logging workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the worker path behaves deterministically.
1
AIDBG_00087
debugging
cpp
wrong_condition
High
Branch never executes
A C++ service in the sync domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a sync workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the parser path behaves deterministically.
2
AIDBG_00088
debugging
bash
type_mismatch
Critical
TypeError from incompatible types
A Bash service in the streaming domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a streaming workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the report path behaves deterministically.
3
AIDBG_00089
debugging
sql
key_error
Low
KeyError on missing dictionary key
A SQL service in the exports domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a exports workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the profile path behaves deterministically.
4
AIDBG_00090
debugging
python
scope_bug
Medium
UnboundLocalError / variable scope issue
A Python service in the imports domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a imports workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the cart path behaves deterministically.
5
AIDBG_00091
debugging
javascript
off_by_one
High
IndexError: list index out of range
A JavaScript service in the payments domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.
items = [1, 2, 3] for i in range(len(items) + 1): print(items[i])
The issue is a off by one problem in a payments workflow. The code should guard against the error before proceeding.
items = [1, 2, 3] for i in range(len(items)): print(items[i])
Use defensive checks and a narrower control flow so the order path behaves deterministically.
1
AIDBG_00092
debugging
typescript
null_check
Critical
AttributeError on None
A TypeScript service in the messaging domain is failing with AttributeError on None. Diagnose the root cause and provide a clean fix.
user = None print(user.name.strip())
The issue is a null check problem in a messaging workflow. The code should guard against the error before proceeding.
user = None if user is not None: print(user.name.strip())
Use defensive checks and a narrower control flow so the cache_key path behaves deterministically.
2
AIDBG_00093
debugging
java
division_by_zero
Low
ZeroDivisionError
A Java service in the admin domain is failing with ZeroDivisionError. Diagnose the root cause and provide a clean fix.
count = 0 rate = total / count
The issue is a division by zero problem in a admin workflow. The code should guard against the error before proceeding.
count = 0 rate = total / count if count else 0
Use defensive checks and a narrower control flow so the job path behaves deterministically.
3
AIDBG_00094
debugging
go
missing_return
Medium
Unexpected None result
A Go service in the dashboard domain is failing with Unexpected None result. Diagnose the root cause and provide a clean fix.
def get_event(value): if value > 0: return value * 2 result = get_event(1)
The issue is a missing return problem in a dashboard workflow. The code should guard against the error before proceeding.
def get_event(value): if value > 0: return value * 2 return 0 result = get_event(1)
Use defensive checks and a narrower control flow so the event path behaves deterministically.
4
AIDBG_00095
debugging
rust
infinite_loop
High
Process never terminates
A Rust service in the billing domain is failing with Process never terminates. Diagnose the root cause and provide a clean fix.
i = 0 while i < 5: print(i)
The issue is a infinite loop problem in a billing workflow. The code should guard against the error before proceeding.
i = 0 while i < 5: print(i) i += 1
Use defensive checks and a narrower control flow so the payload path behaves deterministically.
5
AIDBG_00096
debugging
cpp
async_race
Critical
Race condition in concurrent update
A C++ service in the auth domain is failing with Race condition in concurrent update. Diagnose the root cause and provide a clean fix.
counter = 0 # two workers update counter without synchronization counter += 1
The issue is a async race problem in a auth workflow. The code should guard against the error before proceeding.
from threading import Lock counter = 0 lock = Lock() with lock: counter += 1
Use defensive checks and a narrower control flow so the file path behaves deterministically.
1
AIDBG_00097
debugging
bash
wrong_condition
Low
Branch never executes
A Bash service in the search domain is failing with Branch never executes. Diagnose the root cause and provide a clean fix.
enabled = False if enabled == True: print('ready')
The issue is a wrong condition problem in a search workflow. The code should guard against the error before proceeding.
enabled = False if enabled: print('ready')
Use defensive checks and a narrower control flow so the record path behaves deterministically.
2
AIDBG_00098
debugging
sql
type_mismatch
Medium
TypeError from incompatible types
A SQL service in the analytics domain is failing with TypeError from incompatible types. Diagnose the root cause and provide a clean fix.
total = '10' count = 2 print(total + count)
The issue is a type mismatch problem in a analytics workflow. The code should guard against the error before proceeding.
total = 10 count = 2 print(total + count)
Use defensive checks and a narrower control flow so the metric path behaves deterministically.
3
AIDBG_00099
debugging
python
key_error
High
KeyError on missing dictionary key
A Python service in the notifications domain is failing with KeyError on missing dictionary key. Diagnose the root cause and provide a clean fix.
config = {} print(config['timeout'])
The issue is a key error problem in a notifications workflow. The code should guard against the error before proceeding.
config = {'timeout': 30} print(config.get('timeout', 30))
Use defensive checks and a narrower control flow so the notification path behaves deterministically.
4
AIDBG_00100
debugging
javascript
scope_bug
Critical
UnboundLocalError / variable scope issue
A JavaScript service in the reports domain is failing with UnboundLocalError / variable scope issue. Diagnose the root cause and provide a clean fix.
flag = False def toggle(): print(flag) flag = True
The issue is a scope bug problem in a reports workflow. The code should guard against the error before proceeding.
flag = False def toggle(): global flag print(flag) flag = True
Use defensive checks and a narrower control flow so the task path behaves deterministically.
5
End of preview.

AIForge-01-Debug

Debugging Dataset for AI and Programming Tasks

Overview

AIForge-01-Debug is a curated English dataset designed for AI systems working on debugging tasks in software engineering and programming.

Contents

  • data.jsonl
  • data.json
  • metadata.json

Use Cases

  • AI agent training
  • Supervised fine-tuning
  • Evaluation and benchmarking
  • Software engineering research

Example Record

{
  "id": "AIDBG_00001",
  "category": "debugging",
  "language": "javascript",
  "bug_type": "off_by_one",
  "severity": "Low",
  "error_type": "IndexError: list index out of range",
  "prompt": "A JavaScript service in the search domain is failing with IndexError: list index out of range. Diagnose the root cause and provide a clean fix.",
  "buggy_code": "items = [1, 2, 3]\nfor i in range(len(items) + 1):\n    print(items[i])",
  "analysis": "The issue is a off by one problem in a search workflow. The code should guard against the error before proceeding.",
  "fixed_code": "items = [1, 2, 3]\nfor i in range(len(items)):\n    print(items[i])",
  "explanation": "Use defensive checks and a narrower control flow so the queue path behaves deterministically.",
  "difficulty": 1
}

License

Released under CC BY 4.0.

Source

JumpLander

Downloads last month
60