code
Mar 15, 2026EVAL-20260315-033810This Go code processes orders concurrently but occasionally produces incorrect totals. Find and fix all concurrency issues. ```go package main import ( "fmt" "sync" ) type OrderProcessor struct { totalRevenue float64 orderCount int errors []string } func (op *OrderProcessor) ProcessOrder(amount float64, wg *sync.WaitGroup) { defer wg.Done() if amount <= 0 { op.errors = append(op.errors, fmt.Sprintf("invalid amount: %.2f", amount)) return } op.totalRevenue += amount op.orderCount++ } func main() { op := &OrderProcessor{} var wg sync.WaitGroup orders := []float64{99.99, 149.50, -10.00, 299.99, 49.99, 0, 199.99} for _, amount := range orders { wg.Add(1) go op.ProcessOrder(amount, &wg) } wg.Wait() fmt.Printf("Total: $%.2f from %d orders\n", op.totalRevenue, op.orderCount) } ```
Winner
Qwen 3 8B
openrouter
9.65
WINNER SCORE
matrix avg: 9.35
10×10 Judgment Matrix · 82 judgments
OPEN DATA
| Judge ↓ / Respondent → | Qwen 3 32B | Kimi K2.5 | Devstral Small | Gemma 3 27B | Llama 4 Scout | Phi-4 14B | Granite 4.0 Micro | Qwen 3 8B | Mistral Nemo 12B | Llama 3.1 8B |
|---|---|---|---|---|---|---|---|---|---|---|
| Qwen 3 32B | — | 9.8 | 9.4 | 10.0 | 9.8 | 10.0 | 10.0 | 10.0 | 9.8 | 5.6 |
| Kimi K2.5 | · | — | · | · | · | · | · | · | 9.0 | · |
| Devstral Small | 9.2 | 10.0 | — | 10.0 | 10.0 | 10.0 | 9.8 | 9.8 | 9.6 | 9.6 |
| Gemma 3 27B | 9.6 | 9.6 | 9.6 | — | 9.8 | 9.6 | 9.6 | 9.6 | 9.4 | 9.6 |
| Llama 4 Scout | 9.4 | 9.6 | 9.4 | 9.6 | — | 9.6 | 9.4 | 9.6 | 9.4 | 9.6 |
| Phi-4 14B | 9.6 | 9.2 | 9.6 | 9.6 | 10.0 | — | 9.6 | 10.0 | 9.6 | 10.0 |
| Granite 4.0 Micro | 8.8 | 8.8 | 8.8 | 9.2 | 8.8 | 8.8 | — | 9.2 | 8.8 | 8.8 |
| Qwen 3 8B | 8.0 | 9.8 | 9.4 | 9.8 | 9.8 | 10.0 | 8.8 | — | 9.4 | 7.4 |
| Mistral Nemo 12B | 8.7 | 8.6 | 8.2 | 9.4 | 9.3 | 9.3 | 8.7 | 9.4 | — | 8.4 |
| Llama 3.1 8B | 9.3 | 9.1 | 9.3 | 9.4 | 9.6 | 9.3 | 9.6 | 9.6 | 9.3 | — |