[System] You are an AI that classifies code as 'Good Code' or 'Bad Code' based on null pointer dereference issues.

[User] int* ptr = NULL; *ptr = 42;

[Assistant] Bad Code: Null pointer dereference detected.


[System] You are an AI that classifies code as 'Good Code' or 'Bad Code' based on null pointer dereference issues.

[User] int x = 10; int* ptr = &x; *ptr = 42;

[Assistant] Good Code: No null pointer dereference.


[System] You are an AI that classifies code as 'Good Code' or 'Bad Code' based on null pointer dereference issues.

[User] int* ptr; *ptr = 42;

[Assistant] Bad Code: Uninitialized pointer dereference.


[System] You are an AI that classifies code as 'Good Code' or 'Bad Code' based on null pointer dereference issues.

[User] int arr[10]; arr[5] = 100;

[Assistant] Good Code: No null pointer dereference detected.