Gemini 3.5 Flash vs GLM 5.2 for code review
GLM 5.2 wins, 87–84
Same 12 code review tasks, marked blind by three rival labs. GLM 5.2 took 3 tasks, Gemini 3.5 Flash took 1, 8 tied. Tested 18 Aug 2026.
Where they differed most
Review this. `Order` and `Customer` are ORM models; a customer row can be soft-deleted, in which case findByPk returns null. const orders = await Order.findAll({ where: { status: 'open' } }); const out = []; for (const o of orders) { const customer = await Customer.findByPk(o.customerId); out.push({ id: o.id, total: o.total, customerName: customer.name }); } return out; Separate the two findings cleanly: which one is a correctness bug and which one is a performance problem. Say which of the two should block the merge and why the other one should not — and be specific about what changes that answer (how many open orders, and how often this runs). Then give the corrected code.
Here is the review of your code, separated into the correctness bug and the performance problem, followed by the merge decision and the corrected code. --- ### Finding 1: Correctness Bug (Crash on Soft-Deleted Customers) * **The Issue:** If a customer has been soft-deleted, `Customer.findByPk(o.customerId)` will return `null`. In the next line, the code attempts to access `customer.name`. This will throw a runtime exception: `TypeError: Cannot read properties of null (reading 'name')`, crashing the entire request. * **Impact:** High. Any orde…
### 1. The Correctness Bug The code assumes that `Customer.findByPk(o.customerId)` will always return a customer object. However, because customers can be soft-deleted, `findByPk` will return `null` for deleted customers. When the loop encounters an open order belonging to a soft-deleted customer, accessing `customer.name` will throw a `TypeError: Cannot read properties of null (reading 'name')`, crashing the request. ### 2. The Performance Problem The code suffers from the classic "N+1 query" problem. It executes 1 query to fetch all open ord…
Task by task
| Task | Gemini 3.5 Flash | GLM 5.2 |
|---|---|---|
| The pagination that skips page one | 8 | 8 |
| Nothing wrong with it | 8 | 8 |
| Three things wrong in six lines | 8 | 9 |
| Two customers, one last item | 9 | 9 |
| Rank by what breaks | 8 | 8 |
| The review, as JSON | 8 | 8 |
| Slow is not the same as wrong | 8 | 10 |
| Overdue at one in the morning | 8 | 7 |
| Write only the comment | 10 | 10 |
| The complaint that is not a defect | 8 | 8 |
| Right, and unusable | 9 | 10 |
| Refuse the rubber stamp | 9 | 9 |
Full receipts: Gemini 3.5 Flash, GLM 5.2 · judges claude-sonnet-5, gpt-5.6-terra, grok-4.5
Questions people ask
Which is better for code review: Gemini 3.5 Flash or GLM 5.2?
GLM 5.2 — it scored 87/100 against 84/100 on our 12-task code review suite, winning 3 tasks to 1 with 8 tied. Every answer was marked blind by three judges from three rival AI labs.
How was this tested?
Both models answered the identical published code review tasks. Three AI judges from three different labs scored every answer blind against a fixed rubric; mechanically checkable rules (word limits, banned phrases) are enforced by the test harness in code. The raw outputs and judge verdicts are downloadable.
More code review head-to-heads: GLM 5.2 vs GPT-5.6 Sol · Gemini 3.5 Flash vs GPT-5.6 Sol · GLM 5.2 vs GPT-5.5 · Gemini 3.5 Flash vs GPT-5.5 · Claude Sonnet 5 vs GLM 5.2 · Claude Sonnet 5 vs Gemini 3.5 Flash
Full ranking: Best AI for code review · model pages: Gemini 3.5 Flash, GLM 5.2