▸case-01 Audit this Node.js error handling middleware for silent failure risks: `app.use((err, req, res, next) => { logger.error('Unhandled request error', { error: err.stack, path: req.path }); res.status(500).json({ error: 'Internal Server Error' }); });`. | fail→fail | 16,860 | 13,289 | -21% | 1 | 1 | 0% | 2,772 | 2,697 | -3% | 0 | 0 | — |
▸case-02 Audit this SQL database transaction function for silent failure risks: `async function transfer(client, from, to, amount) { try { await client.query('BEGIN'); await client.query('UPDATE accounts SET balance = balance - $1 WHERE id = $2', [amount, from]); await client.query('UPDATE accounts SET balance = balance + $1 WHERE id = $2', [amount, to]); await client.query('COMMIT'); } catch (err) { await client.query('ROLLBACK'); throw err; } }`. | fail→fail | 15,002 | 8,313 | -45% | 1 | 1 | 0% | 2,936 | 2,165 | -26% | 0 | 0 | — |
▸case-03 Audit this Python file processing function for silent failure risks: `def read_config(path): try: with open(path, 'r') as f: return json.load(f) except FileNotFoundError: logger.error(f'Config file missing at {path}'); raise except json.JSONDecodeError as e: logger.error(f'Invalid JSON in config at {path}: {e}'); raise`. | fail→fail | 15,140 | 12,259 | -19% | 1 | 1 | 0% | 2,657 | 2,462 | -7% | 0 | 0 | — |
▸case-04 Audit the following Node.js function for silent failure risks: `function loadConfig(path) { try { return JSON.parse(fs.readFileSync(path, 'utf8')); } catch (e) {} return {}; }`. Detail your findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 14,358 | 9,880 | -31% | 1 | 1 | 0% | 2,612 | 2,483 | -5% | 0 | 0 | — |
▸case-05 Review this API client helper function for silent failure risks: `async function fetchUserOrders(userId) { return fetch('/api/orders/' + userId).then(r => r.json()).catch(() => []); }`. Format findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 13,633 | 9,188 | -33% | 1 | 1 | 0% | 2,456 | 2,258 | -8% | 0 | 0 | — |
▸case-06 Analyze the logging in this Express endpoint handler: `app.get('/user/:id', async (req, res) => { try { const u = await db.getUser(req.params.id); res.json(u); } catch (err) { console.log('Failed'); res.status(500).send('Error'); } });`. Present findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 9,864 | 7,310 | -26% | 1 | 1 | 0% | 1,828 | 1,983 | +8% | 0 | 0 | — |
▸case-07 Evaluate this database access function: `async function findAccount(id) { try { return await db.query('SELECT * FROM accounts WHERE id = $1', [id]); } catch (err) { throw new Error('Database query failed'); } }`. Detail findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 14,271 | 8,126 | -43% | 1 | 1 | 0% | 2,720 | 1,922 | -29% | 0 | 0 | — |
▸case-08 Audit this transfer handler: `async function processPayment(client, sender, receiver, amount) { try { await client.query('BEGIN'); await client.query('UPDATE balances SET balance = balance - $1 WHERE id = $2', [amount, sender]); await client.query('UPDATE balances SET balance = balance + $1 WHERE id = $2', [amount, receiver]); await client.query('COMMIT'); } catch (err) { console.error(err); } }`. Detail findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 12,968 | 11,147 | -14% | 1 | 1 | 0% | 2,752 | 2,477 | -10% | 0 | 0 | — |
▸case-09 Review this Python json helper: `def parse_payload(raw_json): try: return json.loads(raw_json) except Exception: return None`. Format findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 10,680 | 6,560 | -39% | 1 | 1 | 0% | 2,163 | 1,717 | -21% | 0 | 0 | — |
▸case-10 Audit this analytics dispatcher: `function trackUserAction(event) { sendAnalyticsEvent(event); return { status: 'queued' }; }` where `sendAnalyticsEvent` returns an async Promise. Provide findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 9,308 | 9,436 | +1% | 1 | 1 | 0% | 1,885 | 2,051 | +9% | 0 | 0 | — |
▸case-11 Analyze this third-party HTTP syncing function: `async function fetchExternalData() { const res = await fetch('https://api.thirdparty.com/v1/sync'); return res.json(); }`. Format findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 11,248 | 6,342 | -44% | 1 | 1 | 0% | 2,314 | 1,613 | -30% | 0 | 0 | — |
▸case-12 Review this Java repository method: `public User getUser(String id) { try { return repo.findById(id); } catch (Exception e) { throw new RuntimeException(e.getMessage()); } }`. Structure findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 11,302 | 8,712 | -23% | 1 | 1 | 0% | 2,118 | 1,949 | -8% | 0 | 0 | — |
▸case-13 Review this environment settings loader: `function getTimeoutConfig() { const timeout = parseInt(process.env.API_TIMEOUT); return timeout ? timeout : 5000; }`. Structure findings using location, severity, issue, impact, and fix recommendation. | fail→pass | 8,355 | 10,234 | +22% | 1 | 1 | 0% | 1,823 | 2,307 | +27% | 0 | 0 | — |
▸case-14 Review this disk cache writer: `function saveCache(key, data) { fs.writeFileSync('/tmp/cache_' + key + '.json', JSON.stringify(data)); }`. Structure findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 9,558 | 9,921 | +4% | 1 | 1 | 0% | 2,047 | 2,352 | +15% | 0 | 0 | — |
▸case-15 Audit this status updating function: `async function updateOrderStatus(orderId, status) { try { await db.update(orderId, status); } catch (err) { logger.warn('Failed to update status'); } return true; }`. Format findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 10,558 | 9,660 | -9% | 1 | 1 | 0% | 2,349 | 1,673 | -29% | 0 | 0 | — |
▸case-16 Review this PDF generation routine: `async function exportDoc(data) { const tmpPath = '/tmp/' + Date.now() + '.pdf'; await writePdf(tmpPath, data); await uploadToS3(tmpPath); fs.unlinkSync(tmpPath); }`. Detail findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 11,047 | 13,447 | +22% | 1 | 1 | 0% | 2,250 | 2,682 | +19% | 0 | 0 | — |
▸case-17 Review this batch job executor: `async function processBatch(items) { const results = await Promise.allSettled(items.map(i => processItem(i))); return results.filter(r => r.status === 'fulfilled').map(r => r.value); }`. Structure findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 9,909 | 9,781 | -1% | 1 | 1 | 0% | 1,992 | 2,349 | +18% | 0 | 0 | — |
▸case-18 Review this Python cleanup function: `def cleanup_temp_files(file_list): for f in file_list: try: os.remove(f) except: pass`. Detail findings with location, severity, issue, impact, and fix recommendation. | pass→pass | 13,574 | 9,075 | -33% | 1 | 1 | 0% | 2,761 | 2,151 | -22% | 0 | 0 | — |
▸case-19 Review this reconnect handler: `function handleDisconnect(err) { logger.debug('Database connection lost: ' + err.message); reconnect(); }`. Structure findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 9,514 | 8,901 | -6% | 1 | 1 | 0% | 1,931 | 1,939 | +0% | 0 | 0 | — |
▸case-20 Review this Go utility function: `func ParsePort(portStr string) int { port, _ := strconv.Atoi(portStr); return port }`. Structure findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 10,371 | 9,135 | -12% | 1 | 1 | 0% | 1,842 | 1,834 | -0% | 0 | 0 | — |
▸case-21 Review this Rust config loader: `fn get_port() -> u16 { std::env::var('PORT').ok().and_then(|p| p.parse().ok()).unwrap_or(8080) }`. Structure findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 9,376 | 11,094 | +18% | 1 | 1 | 0% | 1,589 | 2,316 | +46% | 0 | 0 | — |
▸case-22 Review this Express middleware: `app.use((err, req, res, next) => { console.error(err); res.status(500); });`. Structure findings using location, severity, issue, impact, and fix recommendation. | pass→pass | 10,000 | 8,453 | -15% | 1 | 1 | 0% | 2,166 | 2,044 | -6% | 0 | 0 | — |