Systematically analyze a code error, identify its root cause, and provide a clear fix with an explanation — without guessing.