Find bugs and explain the cause
Feed in a suspicious snippet along with the error message and expected behavior, and get back a ranked list of likely bugs instead of a vague hunch. Each finding names the observable symptom, the probable root cause, the exact lines or functions responsible, and a concrete fix to apply. When the pasted context isn't enough to be confident, it says exactly what extra detail is missing instead of guessing at a diagnosis.
Review this code for bugs. Return findings in priority order. For each issue, include the symptom, likely root cause, affected lines or functions, and a concrete fix. If you need more context, state the smallest missing detail.
Code and context:
{{code}}