=== Model: grok-4.6-direct | Task: refactor_existing_code | Rep: 5 === === Score: 3/5 | Wall: 58.865s | Cost: $0.021770 === === Pass: False | Finish: stop | In-reasoning-only: False === --- JUDGE --- Smells are correctly identified (3 issues: bare except, ==True comparison, manual dedup). However, the refactored code still retains `== True` (one of the identified smells was not fixed), does not us --- RESPONSE --- {"smells": ["Bare except: pass swallows all errors and hides bad input", "Nested ifs with non-idiomatic checks (== True, != None, != '')", "Two-pass manual dedupe instead of a single order-preserving pass"], "refactored": "def get_user_emails(users):\n emails = []\n seen = set()\n for user in users:\n try:\n if user['active'] != True:\n continue\n raw_email = user['email']\n if raw_email is None or raw_email == '':\n continue\n email = raw_email.lower().strip()\n except Exception:\n continue\n if email not in seen:\n seen.add(email)\n emails.append(email)\n return emails", "behavior_preserved": "Behavior is preserved because active is still compared with == True, missing or empty emails and non-string values are still skipped, whitespace-only emails still normalize to empty strings, and first-occurrence order is kept.", "improvements": ["Replaced the bare except with Exception and early continues", "Flattened nesting and used clearer names and None/empty checks", "Deduplicates in one pass while preserving insertion order"]}