code
Apr 02, 2026CODE-017This 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
GPT-OSS-120B
OpenAI
9.75
WINNER SCORE
matrix avg: 9.02
10×10 Judgment Matrix · 89 judgments
OPEN DATA
| Judge ↓ / Respondent → | MiMo-V2-Flash | GPT-5.4 | Claude Opus 4.6 | Gemini 3.1 Pro | Claude Sonnet 4.6 | Gemini 3 | Grok 4.20 | DeepSeek V4 | GPT-OSS-120B | MiniMax M2.5 |
|---|---|---|---|---|---|---|---|---|---|---|
| MiMo-V2-Flash | — | 9.0 | 9.6 | 7.6 | 9.3 | 8.6 | 8.8 | 8.6 | 10.0 | 9.0 |
| GPT-5.4 | 8.8 | — | 9.0 | 4.0 | 9.0 | 8.4 | 8.6 | 8.6 | 9.8 | 8.4 |
| Claude Opus 4.6 | 9.4 | 9.8 | — | 8.6 | 9.8 | 9.0 | 9.2 | 8.6 | 9.8 | 8.6 |
| Gemini 3.1 Pro | 9.8 | 9.8 | 10.0 | — | 9.6 | 9.8 | 9.6 | 9.8 | 10.0 | 9.4 |
| Claude Sonnet 4.6 | 8.8 | 9.8 | 9.8 | 7.8 | — | 8.6 | 8.8 | 8.6 | 9.6 | 8.4 |
| Gemini 3 | 9.8 | 10.0 | 10.0 | 9.6 | 10.0 | — | 10.0 | 9.8 | 10.0 | 9.8 |
| Grok 4.20 | 8.8 | 8.8 | 8.8 | 6.2 | 9.0 | 8.6 | — | 8.6 | 9.0 | 8.6 |
| DeepSeek V4 | 9.2 | 9.6 | · | 9.1 | 9.6 | 9.3 | 9.6 | — | 9.8 | 9.6 |
| GPT-OSS-120B | 8.6 | 8.8 | 9.3 | 6.6 | 9.1 | 9.1 | 8.8 | 8.6 | — | 8.8 |
| MiniMax M2.5 | 8.0 | 9.8 | 9.3 | 6.1 | 9.3 | 8.8 | 8.8 | 8.0 | 9.8 | — |