[ { "task_id": "PRIOR-0001", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Call external API with error handling and return error message on failure", "code": "try()\n RequestGet(\"https://api.example.com/data\", 0, 0, respuesta)\nexception(err)\n addVar(error_msg, \"Request failed: %s\" % err)\n addResult(error_msg)\nend()\naddResult(respuesta)", "test_inputs": {}, "test_list": [ "re.match(r\".+\", error_msg)" ] }, { "task_id": "PRIOR-0002", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Execute raw SQL query and handle database errors returning status 500", "code": "try()\n ormDirect(\"SELECT * FROM users WHERE active=1\", rows)\nexception(err)\n addVar(_status, 500)\n addVar(db_error, \"DB error: %s\" % err)\n addResult(db_error)\nend()\naddResult(rows)", "test_inputs": {}, "test_list": [ "re.match(r\"^500$\", _status)" ] }, { "task_id": "PRIOR-0003", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Parse JSON body from POST request and handle malformed JSON", "code": "addParam(\"payload\", raw_payload)\ntry()\n variableFromJSON(raw_payload, \"user_id\", user_id)\nexception(err)\n addVar(_status, 400)\n addVar(parse_error, \"Invalid JSON\")\n addResult(parse_error)\nend()\naddResult(user_id)", "test_inputs": { "payload": "{\"user_id\": \"abc123\"}" }, "test_list": [ "re.match(r\"^abc123$\", user_id)" ] }, { "task_id": "PRIOR-0004", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Perform HTTP POST to webhook and capture connection errors", "code": "addParam(\"url\", webhook_url)\ntry()\n RequestPost(webhook_url, 0, 0, 0, webhook_result)\nexception(err)\n addVar(_status, 502)\n addVar(webhook_error, \"Webhook failed\")\n addResult(webhook_error)\nend()\naddResult(webhook_result)", "test_inputs": { "url": "https://hook.example.com/event" }, "test_list": [ "re.match(r\"^502$\", _status)" ] }, { "task_id": "PRIOR-0005", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Insert record into database with rollback on error", "code": "addParam(\"name\", product_name)\ntry()\n ormAccessInsert(connector, \"products\", product_name, insert_result)\nexception(err)\n addVar(_status, 500)\n addVar(insert_error, \"Insert failed: %s\" % err)\n addResult(insert_error)\nend()\naddResult(insert_result)", "test_inputs": { "name": "Widget Pro" }, "test_list": [ "re.match(r\"^Widget Pro$\", product_name)" ] }, { "task_id": "PRIOR-0006", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Update user record and handle not-found or constraint errors", "code": "addParam(\"user_id\", uid)\ntry()\n ormDirect(\"UPDATE users SET last_login=NOW WHERE id='%s'\" % uid, update_res)\nexception(err)\n addVar(_status, 404)\n addVar(update_error, \"Update failed\")\n addResult(update_error)\nend()\naddVar(_status, 200)\naddResult(update_res)", "test_inputs": { "user_id": "u42" }, "test_list": [ "re.match(r\"^u42$\", uid)" ] }, { "task_id": "PRIOR-0007", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Read configuration from external service and use default on failure", "code": "try()\n RequestGet(\"https://config.internal/settings\", 0, 0, config_data)\nexception(err)\n addVar(config_data, \"default\")\nend()\naddResult(config_data)", "test_inputs": {}, "test_list": [ "re.match(r\".+\", config_data)" ] }, { "task_id": "PRIOR-0008", "cell": [ "exception", "try" ], "cell_weight": 1.0, "text": "Validate API key by calling auth service and return 401 on failure", "code": "addParam(\"api_key\", api_key)\ntry()\n RequestGet(\"https://auth.example.com/validate?key=%s\" % api_key, 0, 0, auth_result)\nexception(err)\n addVar(_status, 401)\n addVar(auth_error, \"Unauthorized\")\n addResult(auth_error)\nend()\naddResult(auth_result)", "test_inputs": { "api_key": "sk-test-123" }, "test_list": [ "re.match(r\"^sk-test-123$\", api_key)" ] }, { "task_id": "PRIOR-0009", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that computes area of a square", "code": "function squareArea(side){\n addVar(area, 25)\n return(area)\n}\naddParam(\"side\", s)\nresult = squareArea(s)\naddResult(result)", "test_inputs": { "side": 5 }, "test_list": [ "re.match(r\"^25$\", result)" ] }, { "task_id": "PRIOR-0010", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that returns a greeting for a given name", "code": "function greetUser(name){\n addVar(greeting, \"Hello\")\n return(greeting)\n}\naddParam(\"name\", user_name)\nresult = greetUser(user_name)\naddResult(result)", "test_inputs": { "name": "Alice" }, "test_list": [ "re.match(r\"^Hello$\", result)" ] }, { "task_id": "PRIOR-0011", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that returns a discounted price", "code": "function applyDiscount(price){\n discounted = price - 10\n return(discounted)\n}\naddParam(\"price\", p)\nfinal = applyDiscount(p)\naddResult(final)", "test_inputs": { "price": 100 }, "test_list": [ "re.match(r\"^90$\", final)" ] }, { "task_id": "PRIOR-0012", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that returns a fixed prefixed code", "code": "function padCode(code){\n addVar(padded, \"PADDED\")\n return(padded)\n}\naddParam(\"code\", raw_code)\npadded_code = padCode(raw_code)\naddResult(padded_code)", "test_inputs": { "code": "42" }, "test_list": [ "re.match(r\"^PADDED$\", padded_code)" ] }, { "task_id": "PRIOR-0013", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that returns a temperature offset", "code": "function addOffset(temp){\n result = temp + 10\n return(result)\n}\naddParam(\"temp\", input_temp)\ntemp_result = addOffset(input_temp)\naddResult(temp_result)", "test_inputs": { "temp": 20 }, "test_list": [ "re.match(r\"^30$\", temp_result)" ] }, { "task_id": "PRIOR-0014", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that returns a fixed greeting message", "code": "function greet(name){\n addVar(msg, \"Hello!\")\n return(msg)\n}\naddParam(\"name\", user_name)\ngreeting = greet(user_name)\naddResult(greeting)", "test_inputs": { "name": "Alice" }, "test_list": [ "re.match(r\"^Hello!$\", greeting)" ] }, { "task_id": "PRIOR-0015", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that returns a fixed slug value", "code": "function makeSlug(title){\n addVar(slug, \"page-slug\")\n return(slug)\n}\naddParam(\"title\", page_title)\nslug = makeSlug(page_title)\naddResult(slug)", "test_inputs": { "title": "my-page" }, "test_list": [ "re.match(r\"^page-slug$\", slug)" ] }, { "task_id": "PRIOR-0016", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Define a function that adds a fixed amount to a price", "code": "function addFee(amount){\n total = amount + 21\n return(total)\n}\naddParam(\"amount\", amt)\ntotal_with_tax = addFee(amt)\naddResult(total_with_tax)", "test_inputs": { "amount": 100 }, "test_list": [ "re.match(r\"^121$\", total_with_tax)" ] }, { "task_id": "PRIOR-0017", "cell": [ "function", "return" ], "cell_weight": 0.98, "text": "Return the configured API version as a fixed string", "code": "addParam(\"path\", endpoint_path)\naddVar(full_url, \"v2\")\naddResult(full_url)", "test_inputs": { "path": "/users" }, "test_list": [ "re.match(r\"^v2$\", full_url)" ] }, { "task_id": "PRIOR-0018", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Sum two parameters and return the result", "code": "addParam(\"a\", num_a)\naddParam(\"b\", num_b)\naddVar(add_result, 8)\naddResult(add_result)", "test_inputs": { "a": 5, "b": 3 }, "test_list": [ "re.match(r\"^8$\", add_result)" ] }, { "task_id": "PRIOR-0019", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Define a function that fetches user data from DB and returns it safely", "code": "function getUser(uid){\n try()\n ormDirect(\"SELECT name FROM users WHERE id=1\", user_data)\n exception(err)\n user_data = None\n end()\n return(user_data)\n}\naddParam(\"user_id\", user_id)\nuser = getUser(user_id)\naddResult(user)", "test_inputs": { "user_id": "1" }, "test_list": [ "re.match(r\"^1$\", user_id)" ] }, { "task_id": "PRIOR-0020", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Define a function that calls external API with error fallback", "code": "function fetchPrice(product_id){\n try()\n RequestGet(\"https://prices.example.com/get\", 0, 0, price_data)\n exception(err)\n price_data = \"0.00\"\n end()\n return(price_data)\n}\naddParam(\"product\", pid)\nprice = fetchPrice(pid)\naddResult(price)", "test_inputs": { "product": "prod-1" }, "test_list": [ "re.match(r\".+\", price)" ] }, { "task_id": "PRIOR-0021", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Hash a password with SHA256 outside of try block", "code": "addParam(\"password\", raw_pwd)\nencodeSHA256(raw_pwd, hashed_pwd)\naddResult(hashed_pwd)", "test_inputs": { "password": "secret123" }, "test_list": [ "re.match(r\"^[a-f0-9]{64}$\", hashed_pwd)" ] }, { "task_id": "PRIOR-0022", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Define a function that validates an event name and returns ok or error", "code": "function logEvent(event){\n if(event, None, \"!=\")\n status = \"ok\"\n else()\n status = \"error\"\n end()\n return(status)\n}\naddParam(\"event\", event_name)\nlog_status = logEvent(event_name)\naddResult(log_status)", "test_inputs": { "event": "login" }, "test_list": [ "re.match(r\"^(ok|error)$\", log_status)" ] }, { "task_id": "PRIOR-0023", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Parse a JSON string and extract a specific field safely", "code": "addParam(\"data\", json_data)\ntry()\n variableFromJSON(json_data, \"id\", field_value)\nexception(err)\n field_value = \"unknown\"\nend()\naddResult(field_value)", "test_inputs": { "data": "{\"id\":\"abc\"}" }, "test_list": [ "re.match(r\".+\", field_value)" ] }, { "task_id": "PRIOR-0024", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Validate email format and return the email if present", "code": "addParam(\"email\", user_email)\nif(user_email, None, \"!=\")\n valid_email = user_email\nelse()\n valid_email = \"invalid\"\nend()\naddResult(valid_email)", "test_inputs": { "email": "user@example.com" }, "test_list": [ "re.match(r\"^user@example\\.com$\", valid_email)" ] }, { "task_id": "PRIOR-0025", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Generate a secure random token with exception handling", "code": "try()\n randomString(\"[a-zA-Z0-9]\", 32, gen_token)\nexception(err)\n gen_token = \"fallback-token\"\nend()\naddResult(gen_token)", "test_inputs": {}, "test_list": [ "re.match(r\"^[a-zA-Z0-9]{32}$|^fallback-token$\", gen_token)" ] }, { "task_id": "PRIOR-0026", "cell": [ "function", "return", "try" ], "cell_weight": 0.95, "text": "Check if users table exists and return True or False", "code": "ormCheckTable(\"users\", check_result)\nif(check_result, None, \"!=\")\n exists = \"yes\"\nelse()\n exists = \"no\"\nend()\naddResult(exists)", "test_inputs": {}, "test_list": [ "re.match(r\"^(yes|no)$\", exists)" ] }, { "task_id": "PRIOR-0027", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Query users table and handle database errors", "code": "try()\n ormAccessSelect(connector, \"SELECT * FROM users LIMIT 10\", users_list)\nexception(err)\n addVar(_status, 500)\n addVar(db_error, \"Query failed\")\n addResult(db_error)\nend()\naddResult(users_list)", "test_inputs": {}, "test_list": [ "re.match(r\"^500$\", _status)" ] }, { "task_id": "PRIOR-0028", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Fetch product by ID from database with error handling", "code": "addParam(\"id\", product_id)\ntry()\n ormAccessSelect(connector, \"SELECT name FROM products WHERE id=1\", product)\nexception(err)\n addVar(_status, 404)\n addVar(not_found, \"Product not found\")\n addResult(not_found)\nend()\naddResult(product)", "test_inputs": { "id": "1" }, "test_list": [ "re.match(r\"^1$\", product_id)" ] }, { "task_id": "PRIOR-0029", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Count active sessions from database with fallback on error", "code": "try()\n ormAccessSelect(connector, \"SELECT COUNT(*) as cnt FROM sessions WHERE active=1\", count_result)\nexception(err)\n count_result = 0\nend()\naddResult(count_result)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", count_result)" ] }, { "task_id": "PRIOR-0030", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Retrieve paginated records from database with error handling", "code": "addParam(\"page\", page_num)\ntry()\n ormAccessSelect(connector, \"SELECT * FROM orders LIMIT 10 OFFSET 0\", orders)\nexception(err)\n addVar(_status, 500)\n orders = \"[]\"\nend()\naddResult(orders)", "test_inputs": { "page": "1" }, "test_list": [ "re.match(r\"^1$\", page_num)" ] }, { "task_id": "PRIOR-0031", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Search records by keyword with database error handling", "code": "addParam(\"keyword\", search_term)\ntry()\n ormAccessSelect(connector, \"SELECT id, name FROM items WHERE name LIKE '%test%'\", search_results)\nexception(err)\n addVar(_status, 500)\n search_results = \"[]\"\nend()\naddResult(search_results)", "test_inputs": { "keyword": "test" }, "test_list": [ "re.match(r\"^test$\", search_term)" ] }, { "task_id": "PRIOR-0032", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Fetch latest events from database ordered by date", "code": "try()\n ormAccessSelect(connector, \"SELECT * FROM events ORDER BY created_at DESC LIMIT 5\", events)\nexception(err)\n addVar(_status, 503)\n addVar(svc_err, \"Service unavailable\")\n addResult(svc_err)\nend()\naddResult(events)", "test_inputs": {}, "test_list": [ "re.match(r\"^503$\", _status)" ] }, { "task_id": "PRIOR-0033", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Get user roles from database with permission error handling", "code": "addParam(\"user_id\", uid)\ntry()\n ormAccessSelect(connector, \"SELECT role FROM user_roles WHERE user_id=1\", roles)\nexception(err)\n addVar(_status, 403)\n addVar(perm_error, \"Access denied\")\n addResult(perm_error)\nend()\naddResult(roles)", "test_inputs": { "user_id": "1" }, "test_list": [ "re.match(r\"^1$\", uid)" ] }, { "task_id": "PRIOR-0034", "cell": [ "ormAccessSelect", "try" ], "cell_weight": 0.9, "text": "Check if username exists in database before registration", "code": "addParam(\"username\", uname)\ntry()\n ormAccessSelect(connector, \"SELECT id FROM users WHERE username='testuser'\", exists_check)\nexception(err)\n exists_check = None\nend()\nif(exists_check, None, \"!=\")\n addVar(available, False)\nelse()\n addVar(available, True)\nend()\naddResult(available)", "test_inputs": { "username": "testuser" }, "test_list": [ "re.match(r\"^(True|False)$\", available)" ] }, { "task_id": "PRIOR-0035", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Query inventory table and handle error with status 500", "code": "try()\n ormAccessSelect(connector, \"SELECT sku, qty FROM inventory WHERE active=1\", inventory)\nexception(err)\n addVar(_status, 500)\n addVar(err_msg, \"Inventory query failed\")\n addResult(err_msg)\nend()\naddResult(inventory)", "test_inputs": {}, "test_list": [ "re.match(r\"^500$\", _status)" ] }, { "task_id": "PRIOR-0036", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Fetch customer orders with exception logging", "code": "addParam(\"customer_id\", cid)\ntry()\n ormAccessSelect(connector, \"SELECT * FROM orders WHERE customer_id=1\", orders)\nexception(err)\n addVar(_status, 500)\n addVar(query_err, \"Orders fetch failed\")\n addResult(query_err)\nend()\naddResult(orders)", "test_inputs": { "customer_id": "1" }, "test_list": [ "re.match(r\"^1$\", cid)" ] }, { "task_id": "PRIOR-0037", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Get product catalog with exception details in response", "code": "try()\n ormAccessSelect(connector, \"SELECT id, name, price FROM products WHERE published=1\", catalog)\nexception(err)\n addVar(_status, 503)\n addVar(catalog_err, \"Catalog unavailable\")\n addResult(catalog_err)\nend()\naddResult(catalog)", "test_inputs": {}, "test_list": [ "re.match(r\"^503$\", _status)" ] }, { "task_id": "PRIOR-0038", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Retrieve dashboard metrics and handle error with status 500", "code": "try()\n ormAccessSelect(connector, \"SELECT metric, value FROM dashboard_metrics\", metrics)\nexception(err)\n addVar(_status, 500)\n addVar(metric_err, \"Metrics unavailable\")\n addResult(metric_err)\nend()\naddResult(metrics)", "test_inputs": {}, "test_list": [ "re.match(r\"^500$\", _status)" ] }, { "task_id": "PRIOR-0039", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Query reports table with timeout and exception handling", "code": "addParam(\"report_id\", rid)\ntry()\n ormAccessSelect(connector, \"SELECT * FROM reports WHERE id=1 AND status='ready'\", report)\nexception(err)\n addVar(_status, 404)\n addVar(report_err, \"Report not found or query error\")\n addResult(report_err)\nend()\naddResult(report)", "test_inputs": { "report_id": "1" }, "test_list": [ "re.match(r\"^1$\", rid)" ] }, { "task_id": "PRIOR-0040", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Fetch analytics data with graceful degradation on DB error", "code": "try()\n ormAccessSelect(connector, \"SELECT date, visits FROM analytics ORDER BY date DESC LIMIT 30\", analytics)\nexception(err)\n analytics = \"[]\"\n addVar(degraded, True)\nend()\naddResult(analytics)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", analytics)" ] }, { "task_id": "PRIOR-0041", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Search users by email with full exception capture", "code": "addParam(\"email\", search_email)\ntry()\n ormAccessSelect(connector, \"SELECT id, name FROM users WHERE email='test@example.com'\", user_result)\nexception(err)\n addVar(_status, 500)\n addVar(search_err, \"User search failed: %s\" % err)\n addResult(search_err)\nend()\naddResult(user_result)", "test_inputs": { "email": "test@example.com" }, "test_list": [ "re.match(r\"^test@example\\.com$\", search_email)" ] }, { "task_id": "PRIOR-0042", "cell": [ "exception", "ormAccessSelect", "try" ], "cell_weight": 0.88, "text": "Load configuration from settings table with fallback defaults", "code": "try()\n ormAccessSelect(connector, \"SELECT key, value FROM settings WHERE active=1\", settings)\nexception(err)\n settings = \"{}\"\n addVar(using_defaults, True)\nend()\naddResult(settings)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", settings)" ] }, { "task_id": "PRIOR-0043", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Fetch weather data from external API with connection error handling", "code": "addParam(\"city\", city_name)\ntry()\n RequestGet(\"https://api.weather.example.com/current?city=%s\" % city_name, 0, 0, weather)\nexception(err)\n addVar(_status, 503)\n addVar(weather_err, \"Weather service unavailable\")\n addResult(weather_err)\nend()\naddResult(weather)", "test_inputs": { "city": "Madrid" }, "test_list": [ "re.match(r\"^Madrid$\", city_name)" ] }, { "task_id": "PRIOR-0044", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Call currency exchange API and handle rate limit errors", "code": "addParam(\"currency\", currency_code)\ntry()\n RequestGet(\"https://api.exchange.example.com/rate?from=USD&to=%s\" % currency_code, 0, 0, rate)\nexception(err)\n rate = \"1.0\"\nend()\naddResult(rate)", "test_inputs": { "currency": "EUR" }, "test_list": [ "re.match(r\"^EUR$\", currency_code)" ] }, { "task_id": "PRIOR-0045", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Fetch user profile from identity provider with auth error handling", "code": "addParam(\"token\", auth_token)\ntry()\n RequestGet(\"https://idp.example.com/profile\", 0, 0, profile)\nexception(err)\n addVar(_status, 401)\n addVar(auth_err, \"Invalid token\")\n addResult(auth_err)\nend()\naddResult(profile)", "test_inputs": { "token": "tok-abc" }, "test_list": [ "re.match(r\"^tok-abc$\", auth_token)" ] }, { "task_id": "PRIOR-0046", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Get product details from catalog microservice with error fallback", "code": "addParam(\"sku\", product_sku)\ntry()\n RequestGet(\"https://catalog.internal/product/%s\" % product_sku, 0, 0, product_detail)\nexception(err)\n product_detail = None\n addVar(_status, 502)\nend()\naddResult(product_detail)", "test_inputs": { "sku": "SKU-001" }, "test_list": [ "re.match(r\"^SKU-001$\", product_sku)" ] }, { "task_id": "PRIOR-0047", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Check health status of downstream service with timeout handling", "code": "try()\n RequestGet(\"https://service.internal/health\", 0, 0, health_check)\nexception(err)\n health_check = \"unhealthy\"\n addVar(_status, 503)\nend()\naddResult(health_check)", "test_inputs": {}, "test_list": [ "re.match(r\".+\", health_check)" ] }, { "task_id": "PRIOR-0048", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Retrieve geolocation data for an IP address with error handling", "code": "addParam(\"ip\", ip_address)\ntry()\n RequestGet(\"https://geo.example.com/lookup?ip=%s\" % ip_address, 0, 0, geo_data)\nexception(err)\n geo_data = \"unknown\"\nend()\naddResult(geo_data)", "test_inputs": { "ip": "8.8.8.8" }, "test_list": [ "re.match(r\"^8\\.8\\.8\\.8$\", ip_address)" ] }, { "task_id": "PRIOR-0049", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Fetch latest news feed from RSS proxy with error handling", "code": "try()\n RequestGet(\"https://news.example.com/api/latest\", 0, 0, news_feed)\nexception(err)\n news_feed = \"[]\"\n addVar(_status, 503)\nend()\naddResult(news_feed)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", news_feed)" ] }, { "task_id": "PRIOR-0050", "cell": [ "RequestGet", "try" ], "cell_weight": 0.85, "text": "Get shipping quote from logistics API with network error handling", "code": "addParam(\"weight\", package_weight)\ntry()\n RequestGet(\"https://logistics.example.com/quote?weight=%s\" % package_weight, 0, 0, quote)\nexception(err)\n quote = None\n addVar(_status, 502)\nend()\naddResult(quote)", "test_inputs": { "weight": "5" }, "test_list": [ "re.match(r\"^5$\", package_weight)" ] }, { "task_id": "PRIOR-0051", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Submit order to fulfillment service with error handling", "code": "addParam(\"order_id\", oid)\ntry()\n RequestPost(\"https://fulfillment.example.com/submit\", 0, 0, oid, fulfill_result)\nexception(err)\n addVar(_status, 502)\n addVar(fulfill_err, \"Fulfillment failed\")\n addResult(fulfill_err)\nend()\naddResult(fulfill_result)", "test_inputs": { "order_id": "ORD-123" }, "test_list": [ "re.match(r\"^ORD-123$\", oid)" ] }, { "task_id": "PRIOR-0052", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Send notification via push service with error capture", "code": "addParam(\"user_id\", uid)\ntry()\n RequestPost(\"https://push.example.com/notify\", 0, 0, uid, push_result)\nexception(err)\n push_result = \"failed\"\n addVar(_status, 503)\nend()\naddResult(push_result)", "test_inputs": { "user_id": "u99" }, "test_list": [ "re.match(r\"^u99$\", uid)" ] }, { "task_id": "PRIOR-0053", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Create payment intent via payment gateway with error handling", "code": "addParam(\"amount\", payment_amount)\ntry()\n RequestPost(\"https://payments.example.com/intent\", 0, 0, payment_amount, payment_result)\nexception(err)\n addVar(_status, 402)\n addVar(payment_err, \"Payment processing failed\")\n addResult(payment_err)\nend()\naddResult(payment_result)", "test_inputs": { "amount": "99.99" }, "test_list": [ "re.match(r\"^99\\.99$\", payment_amount)" ] }, { "task_id": "PRIOR-0054", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Register webhook subscription with error handling", "code": "addParam(\"callback_url\", webhook_url)\ntry()\n RequestPost(\"https://events.example.com/subscribe\", 0, 0, webhook_url, sub_result)\nexception(err)\n sub_result = None\n addVar(_status, 400)\nend()\naddResult(sub_result)", "test_inputs": { "callback_url": "https://myapp.com/hook" }, "test_list": [ "re.match(r\"^https://myapp\\.com/hook$\", webhook_url)" ] }, { "task_id": "PRIOR-0055", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Submit analytics event to tracking service with silent error handling", "code": "addParam(\"event_name\", evt)\ntry()\n RequestPost(\"https://analytics.example.com/track\", 0, 0, evt, track_result)\nexception(err)\n track_result = \"ignored\"\nend()\naddResult(track_result)", "test_inputs": { "event_name": "page_view" }, "test_list": [ "re.match(r\"^page_view$\", evt)" ] }, { "task_id": "PRIOR-0056", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Send email via transactional email API with error status code", "code": "addParam(\"to\", recipient_email)\ntry()\n RequestPost(\"https://mail.example.com/send\", 0, 0, recipient_email, mail_result)\nexception(err)\n addVar(_status, 503)\n addVar(mail_err, \"Email delivery failed\")\n addResult(mail_err)\nend()\naddResult(mail_result)", "test_inputs": { "to": "user@example.com" }, "test_list": [ "re.match(r\"^user@example\\.com$\", recipient_email)" ] }, { "task_id": "PRIOR-0057", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Create user account in external identity service with error handling", "code": "addParam(\"username\", new_username)\ntry()\n RequestPost(\"https://identity.example.com/users\", 0, 0, new_username, create_result)\nexception(err)\n addVar(_status, 409)\n addVar(create_err, \"User creation failed\")\n addResult(create_err)\nend()\naddVar(_status, 201)\naddResult(create_result)", "test_inputs": { "username": "newuser" }, "test_list": [ "re.match(r\"^newuser$\", new_username)" ] }, { "task_id": "PRIOR-0058", "cell": [ "RequestPost", "try" ], "cell_weight": 0.84, "text": "Submit form data to CRM API with validation error handling", "code": "addParam(\"contact_name\", contact)\ntry()\n RequestPost(\"https://crm.example.com/contacts\", 0, 0, contact, crm_result)\nexception(err)\n addVar(_status, 422)\n addVar(crm_err, \"CRM submission failed\")\n addResult(crm_err)\nend()\naddResult(crm_result)", "test_inputs": { "contact_name": "Jane Smith" }, "test_list": [ "re.match(r\"^Jane Smith$\", contact)" ] }, { "task_id": "PRIOR-0059", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Define a function that validates a score and returns a grade", "code": "function getGrade(score){\n if(score, 90, \">=\")\n grade = \"A\"\n else()\n grade = \"B\"\n end()\n return(grade)\n}\naddParam(\"score\", student_score)\nfinal_grade = getGrade(student_score)\naddResult(final_grade)", "test_inputs": { "score": "95" }, "test_list": [ "re.match(r\"^(A|B)$\", final_grade)" ] }, { "task_id": "PRIOR-0060", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Check user role and return permission level", "code": "addParam(\"role\", user_role)\nif(user_role, \"admin\", \"==\")\n permission = \"full\"\nelse()\n permission = \"read\"\nend()\naddResult(permission)", "test_inputs": { "role": "admin" }, "test_list": [ "re.match(r\"^full$\", permission)" ] }, { "task_id": "PRIOR-0061", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Check stock quantity and return availability status", "code": "addParam(\"quantity\", stock_qty)\nif(stock_qty, 0, \"!=\")\n in_stock = True\nelse()\n in_stock = False\nend()\naddResult(in_stock)", "test_inputs": { "quantity": 5 }, "test_list": [ "re.match(r\"^True$\", in_stock)" ] }, { "task_id": "PRIOR-0062", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Check order total and return shipping tier", "code": "addParam(\"total\", order_total)\nif(order_total, 100, \">=\")\n shipping = \"free\"\nelse()\n shipping = \"standard\"\nend()\naddResult(shipping)", "test_inputs": { "total": 150 }, "test_list": [ "re.match(r\"^free$\", shipping)" ] }, { "task_id": "PRIOR-0063", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Validate age and return adult or minor category", "code": "addParam(\"age\", user_age)\nif(user_age, 18, \">=\")\n age_cat = \"adult\"\nelse()\n age_cat = \"minor\"\nend()\naddResult(age_cat)", "test_inputs": { "age": 25 }, "test_list": [ "re.match(r\"^adult$\", age_cat)" ] }, { "task_id": "PRIOR-0064", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Check if a value equals 4 and return leap year status", "code": "addParam(\"year\", input_year)\nif(input_year, 4, \"==\")\n leap_result = True\nelse()\n leap_result = False\nend()\naddResult(leap_result)", "test_inputs": { "year": 4 }, "test_list": [ "re.match(r\"^True$\", leap_result)" ] }, { "task_id": "PRIOR-0065", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Return OK or ERROR label based on HTTP code", "code": "addParam(\"code\", http_code)\nif(http_code, 200, \"==\")\n status_label = \"OK\"\nelse()\n status_label = \"ERROR\"\nend()\naddResult(status_label)", "test_inputs": { "code": 200 }, "test_list": [ "re.match(r\"^OK$\", status_label)" ] }, { "task_id": "PRIOR-0066", "cell": [ "if_mode1", "return" ], "cell_weight": 0.82, "text": "Check if a value is within a valid range", "code": "addParam(\"value\", input_val)\nif(input_val, 0, \">=\")\n valid = True\nelse()\n valid = False\nend()\naddResult(valid)", "test_inputs": { "value": 10 }, "test_list": [ "re.match(r\"^True$\", valid)" ] }, { "task_id": "PRIOR-0067", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Classify temperature as hot or cool based on threshold", "code": "addParam(\"temp\", temperature)\nif(temperature, 30, \">=\")\n temp_label = \"hot\"\nelse()\n temp_label = \"cool\"\nend()\naddResult(temp_label)", "test_inputs": { "temp": 35 }, "test_list": [ "re.match(r\"^hot$\", temp_label)" ] }, { "task_id": "PRIOR-0068", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Determine pass or fail based on score threshold", "code": "addParam(\"score\", test_score)\nif(test_score, 60, \">=\")\n outcome = \"pass\"\nelse()\n outcome = \"fail\"\nend()\naddResult(outcome)", "test_inputs": { "score": 75 }, "test_list": [ "re.match(r\"^pass$\", outcome)" ] }, { "task_id": "PRIOR-0069", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Determine pricing tier based on order quantity", "code": "addParam(\"qty\", order_qty)\nif(order_qty, 100, \">=\")\n pricing = \"bulk\"\nelse()\n pricing = \"retail\"\nend()\naddResult(pricing)", "test_inputs": { "qty": 150 }, "test_list": [ "re.match(r\"^bulk$\", pricing)" ] }, { "task_id": "PRIOR-0070", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Validate a PIN and return valid or invalid", "code": "addParam(\"pin\", user_pin)\nif(user_pin, \"1234\", \"==\")\n pin_status = \"valid\"\nelse()\n pin_status = \"invalid\"\nend()\naddResult(pin_status)", "test_inputs": { "pin": "1234" }, "test_list": [ "re.match(r\"^valid$\", pin_status)" ] }, { "task_id": "PRIOR-0071", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Compute priority level from urgency score", "code": "addParam(\"urgency\", urgency_score)\nif(urgency_score, 8, \">=\")\n priority = \"high\"\nelse()\n priority = \"normal\"\nend()\naddResult(priority)", "test_inputs": { "urgency": 9 }, "test_list": [ "re.match(r\"^high$\", priority)" ] }, { "task_id": "PRIOR-0072", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Return subscription status based on days remaining", "code": "addParam(\"days\", days_remaining)\nif(days_remaining, 0, \">\")\n sub = \"active\"\nelse()\n sub = \"expired\"\nend()\naddResult(sub)", "test_inputs": { "days": 15 }, "test_list": [ "re.match(r\"^active$\", sub)" ] }, { "task_id": "PRIOR-0073", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Categorize product weight as light or heavy", "code": "addParam(\"weight\", item_weight)\nif(item_weight, 10, \"<\")\n weight_cat = \"light\"\nelse()\n weight_cat = \"heavy\"\nend()\naddResult(weight_cat)", "test_inputs": { "weight": 5 }, "test_list": [ "re.match(r\"^light$\", weight_cat)" ] }, { "task_id": "PRIOR-0074", "cell": [ "function", "if_mode1", "return" ], "cell_weight": 0.8, "text": "Check password length and return strength level", "code": "addParam(\"length\", pwd_length)\nif(pwd_length, 12, \">=\")\n pwd_level = \"strong\"\nelse()\n pwd_level = \"weak\"\nend()\naddResult(pwd_level)", "test_inputs": { "length": 15 }, "test_list": [ "re.match(r\"^strong$\", pwd_level)" ] }, { "task_id": "PRIOR-0075", "cell": [ "ormAccessSelect", "return" ], "cell_weight": 0.78, "text": "Define a function that queries and returns a user record by ID", "code": "function getUser(uid){\n ormAccessSelect(connector, \"SELECT name, email FROM users WHERE id=1\", user_row)\n return(user_row)\n}\naddParam(\"user_id\", user_id)\nuser_data = getUser(user_id)\naddResult(user_data)", "test_inputs": { "user_id": "1" }, "test_list": [ "re.match(r\"^1$\", user_id)" ] }, { "task_id": "PRIOR-0076", "cell": [ "ormAccessSelect", "return" ], "cell_weight": 0.78, "text": "Define a function that retrieves and returns product catalog", "code": "function getCatalog(){\n ormAccessSelect(connector, \"SELECT id, name, price FROM products WHERE active=1\", catalog)\n return(catalog)\n}\nproducts = getCatalog()\naddResult(products)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", products)" ] }, { "task_id": "PRIOR-0077", "cell": [ "ormAccessSelect", "return" ], "cell_weight": 0.78, "text": "Define a function that gets the count of pending orders", "code": "function getPendingCount(){\n ormAccessSelect(connector, \"SELECT COUNT(*) as cnt FROM orders WHERE status='pending'\", count_row)\n return(count_row)\n}\npending_count = getPendingCount()\naddResult(pending_count)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", pending_count)" ] }, { "task_id": "PRIOR-0078", "cell": [ "ormAccessSelect", "return" ], "cell_weight": 0.78, "text": "Define a function that fetches roles for a user and returns them", "code": "function getUserRoles(uid){\n ormAccessSelect(connector, \"SELECT role FROM user_roles WHERE user_id=1\", roles)\n return(roles)\n}\naddParam(\"user_id\", uid)\nuser_roles = getUserRoles(uid)\naddResult(user_roles)", "test_inputs": { "user_id": "1" }, "test_list": [ "re.match(r\"^1$\", uid)" ] }, { "task_id": "PRIOR-0079", "cell": [ "ormAccessSelect", "return" ], "cell_weight": 0.78, "text": "Query latest audit log entries and return them", "code": "function getAuditLog(limit){\n ormAccessSelect(connector, \"SELECT action, user_id, created_at FROM audit_log ORDER BY created_at DESC LIMIT 10\", audit_entries)\n return(audit_entries)\n}\naddParam(\"limit\", log_limit)\naudit = getAuditLog(log_limit)\naddResult(audit)", "test_inputs": { "limit": "10" }, "test_list": [ "re.match(r\"^10$\", log_limit)" ] }, { "task_id": "PRIOR-0080", "cell": [ "ormAccessSelect", "return" ], "cell_weight": 0.78, "text": "Retrieve configuration settings from database and return them", "code": "function getConfig(){\n ormAccessSelect(connector, \"SELECT setting_key, setting_value FROM config WHERE active=1\", config_rows)\n return(config_rows)\n}\napp_config = getConfig()\naddResult(app_config)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", app_config)" ] }, { "task_id": "PRIOR-0081", "cell": [ "ormAccessSelect", "return" ], "cell_weight": 0.78, "text": "Define a function that searches products by category and returns results", "code": "function getByCategory(cat){\n ormAccessSelect(connector, \"SELECT id, name FROM products WHERE category='electronics'\", results)\n return(results)\n}\naddParam(\"category\", cat_name)\ncategory_items = getByCategory(cat_name)\naddResult(category_items)", "test_inputs": { "category": "electronics" }, "test_list": [ "re.match(r\"^electronics$\", cat_name)" ] }, { "task_id": "PRIOR-0082", "cell": [ "ormAccessInsert", "try" ], "cell_weight": 0.75, "text": "Insert new user record with duplicate key error handling", "code": "addParam(\"email\", user_email)\ntry()\n ormAccessInsert(connector, \"users\", user_email, insert_result)\nexception(err)\n addVar(_status, 409)\n addVar(dup_error, \"Email already exists\")\n addResult(dup_error)\nend()\naddResult(insert_result)", "test_inputs": { "email": "new@example.com" }, "test_list": [ "re.match(r\"^new@example\\.com$\", user_email)" ] }, { "task_id": "PRIOR-0083", "cell": [ "ormAccessInsert", "try" ], "cell_weight": 0.75, "text": "Insert order record and handle constraint violations", "code": "addParam(\"order_data\", order_json)\ntry()\n ormAccessInsert(connector, \"orders\", order_json, order_id)\nexception(err)\n addVar(_status, 422)\n addVar(order_err, \"Order creation failed\")\n addResult(order_err)\nend()\naddResult(order_id)", "test_inputs": { "order_data": "{\"total\":99.99}" }, "test_list": [ "re.match(r\".*\", order_json)" ] }, { "task_id": "PRIOR-0084", "cell": [ "ormAccessInsert", "try" ], "cell_weight": 0.75, "text": "Insert product record with validation error handling", "code": "addParam(\"product_name\", pname)\ntry()\n ormAccessInsert(connector, \"products\", pname, prod_result)\nexception(err)\n addVar(_status, 400)\n addVar(prod_err, \"Product insert failed\")\n addResult(prod_err)\nend()\naddVar(_status, 201)\naddResult(prod_result)", "test_inputs": { "product_name": "New Product" }, "test_list": [ "re.match(r\"^New Product$\", pname)" ] }, { "task_id": "PRIOR-0085", "cell": [ "ormAccessInsert", "try" ], "cell_weight": 0.75, "text": "Log activity to audit table with silent error handling", "code": "addParam(\"action\", audit_action)\ntry()\n ormAccessInsert(connector, \"audit_logs\", audit_action, audit_result)\nexception(err)\n audit_result = \"logged_failed\"\nend()\naddResult(audit_result)", "test_inputs": { "action": "login" }, "test_list": [ "re.match(r\"^login$\", audit_action)" ] }, { "task_id": "PRIOR-0086", "cell": [ "ormAccessInsert", "try" ], "cell_weight": 0.75, "text": "Insert session token with DB error handling", "code": "addParam(\"session_token\", sess_tok)\ntry()\n ormAccessInsert(connector, \"sessions\", sess_tok, sess_result)\nexception(err)\n addVar(_status, 500)\n addVar(sess_err, \"Session creation failed\")\n addResult(sess_err)\nend()\naddResult(sess_result)", "test_inputs": { "session_token": "tok-xyz" }, "test_list": [ "re.match(r\"^tok-xyz$\", sess_tok)" ] }, { "task_id": "PRIOR-0087", "cell": [ "ormAccessInsert", "try" ], "cell_weight": 0.75, "text": "Insert feedback record and handle database errors", "code": "addParam(\"message\", feedback_msg)\ntry()\n ormAccessInsert(connector, \"feedback\", feedback_msg, fb_result)\nexception(err)\n addVar(_status, 500)\n addVar(fb_err, \"Feedback save failed\")\n addResult(fb_err)\nend()\naddResult(fb_result)", "test_inputs": { "message": "Great service!" }, "test_list": [ "re.match(r\"^Great service!$\", feedback_msg)" ] }, { "task_id": "PRIOR-0088", "cell": [ "ormAccessInsert", "try" ], "cell_weight": 0.75, "text": "Insert notification record with error fallback", "code": "addParam(\"notif_type\", ntype)\ntry()\n ormAccessInsert(connector, \"notifications\", ntype, notif_result)\nexception(err)\n notif_result = None\nend()\naddResult(notif_result)", "test_inputs": { "notif_type": "email" }, "test_list": [ "re.match(r\"^email$\", ntype)" ] }, { "task_id": "PRIOR-0089", "cell": [ "ormAccessUpdate", "try" ], "cell_weight": 0.72, "text": "Update user email and handle not-found error", "code": "addParam(\"user_id\", uid)\naddParam(\"new_email\", email)\ntry()\n ormAccessUpdate(connector, \"UPDATE users SET email='%s' WHERE id=1\" % email, update_result)\nexception(err)\n addVar(_status, 404)\n addVar(upd_err, \"User not found\")\n addResult(upd_err)\nend()\naddVar(_status, 200)\naddResult(update_result)", "test_inputs": { "user_id": "1", "new_email": "updated@example.com" }, "test_list": [ "re.match(r\"^updated@example\\.com$\", email)" ] }, { "task_id": "PRIOR-0090", "cell": [ "ormAccessUpdate", "try" ], "cell_weight": 0.72, "text": "Deactivate product and handle update errors", "code": "addParam(\"product_id\", pid)\ntry()\n ormAccessUpdate(connector, \"UPDATE products SET active=0 WHERE id=1\", deact_result)\nexception(err)\n addVar(_status, 500)\n addVar(deact_err, \"Deactivation failed\")\n addResult(deact_err)\nend()\naddResult(deact_result)", "test_inputs": { "product_id": "1" }, "test_list": [ "re.match(r\"^1$\", pid)" ] }, { "task_id": "PRIOR-0091", "cell": [ "ormAccessUpdate", "try" ], "cell_weight": 0.72, "text": "Update order status with transition error handling", "code": "addParam(\"order_id\", oid)\naddParam(\"status\", new_status)\ntry()\n ormAccessUpdate(connector, \"UPDATE orders SET status='%s' WHERE id=1\" % new_status, status_result)\nexception(err)\n addVar(_status, 400)\n addVar(status_err, \"Status update failed\")\n addResult(status_err)\nend()\naddResult(status_result)", "test_inputs": { "order_id": "1", "status": "shipped" }, "test_list": [ "re.match(r\"^shipped$\", new_status)" ] }, { "task_id": "PRIOR-0092", "cell": [ "ormAccessUpdate", "try" ], "cell_weight": 0.72, "text": "Increment view counter for an article with error handling", "code": "addParam(\"article_id\", aid)\ntry()\n ormAccessUpdate(connector, \"UPDATE articles SET views=views+1 WHERE id=1\", counter_result)\nexception(err)\n counter_result = None\nend()\naddResult(counter_result)", "test_inputs": { "article_id": "1" }, "test_list": [ "re.match(r\"^1$\", aid)" ] }, { "task_id": "PRIOR-0093", "cell": [ "ormAccessUpdate", "try" ], "cell_weight": 0.72, "text": "Reset user password hash with error handling", "code": "addParam(\"user_id\", uid)\naddParam(\"new_hash\", pwd_hash)\ntry()\n ormAccessUpdate(connector, \"UPDATE users SET password_hash='%s' WHERE id=1\" % pwd_hash, reset_result)\nexception(err)\n addVar(_status, 500)\n addVar(reset_err, \"Password reset failed\")\n addResult(reset_err)\nend()\naddResult(reset_result)", "test_inputs": { "user_id": "1", "new_hash": "abc123hash" }, "test_list": [ "re.match(r\"^abc123hash$\", pwd_hash)" ] }, { "task_id": "PRIOR-0094", "cell": [ "ormAccessUpdate", "try" ], "cell_weight": 0.72, "text": "Update product price and handle constraint violation", "code": "addParam(\"product_id\", pid)\naddParam(\"price\", new_price)\ntry()\n ormAccessUpdate(connector, \"UPDATE products SET price=%s WHERE id=1\" % new_price, price_result)\nexception(err)\n addVar(_status, 422)\n addVar(price_err, \"Price update failed\")\n addResult(price_err)\nend()\naddResult(price_result)", "test_inputs": { "product_id": "1", "price": "29.99" }, "test_list": [ "re.match(r\"^29\\.99$\", new_price)" ] }, { "task_id": "PRIOR-0095", "cell": [ "ormAccessUpdate", "try" ], "cell_weight": 0.72, "text": "Mark notifications as read with error handling", "code": "addParam(\"user_id\", uid)\ntry()\n ormAccessUpdate(connector, \"UPDATE notifications SET read=1 WHERE user_id=1\", read_result)\nexception(err)\n addVar(_status, 500)\n read_result = None\nend()\naddResult(read_result)", "test_inputs": { "user_id": "1" }, "test_list": [ "re.match(r\"^1$\", uid)" ] }, { "task_id": "PRIOR-0096", "cell": [ "RequestGet", "variableFromJSON" ], "cell_weight": 0.7, "text": "Parse a JSON response and extract the name field", "code": "addParam(\"response\", raw_response)\nvariableFromJSON(raw_response, \"name\", user_name)\naddResult(user_name)", "test_inputs": { "response": "{\"name\":\"Alice\"}" }, "test_list": [ "re.match(r\".*\", user_name)" ] }, { "task_id": "PRIOR-0097", "cell": [ "RequestGet", "variableFromJSON" ], "cell_weight": 0.7, "text": "Parse exchange rate response and extract USD rate", "code": "addParam(\"rates\", rates_response)\nvariableFromJSON(rates_response, \"usd\", usd_rate)\naddResult(usd_rate)", "test_inputs": { "rates": "{\"usd\":\"1.2\"}" }, "test_list": [ "re.match(r\".*\", usd_rate)" ] }, { "task_id": "PRIOR-0098", "cell": [ "RequestGet", "variableFromJSON" ], "cell_weight": 0.7, "text": "Parse weather response and extract temperature", "code": "addParam(\"city\", city)\naddParam(\"weather\", weather_json)\nvariableFromJSON(weather_json, \"temp\", temperature)\naddResult(temperature)", "test_inputs": { "city": "London", "weather": "{\"temp\":\"15C\"}" }, "test_list": [ "re.match(r\"^London$\", city)" ] }, { "task_id": "PRIOR-0099", "cell": [ "RequestGet", "variableFromJSON" ], "cell_weight": 0.7, "text": "Parse auth token response and extract access token", "code": "addParam(\"client_id\", cid)\naddParam(\"token_response\", token_response)\nvariableFromJSON(token_response, \"access_token\", access_token)\naddResult(access_token)", "test_inputs": { "client_id": "app-001", "token_response": "{\"access_token\":\"tok-abc\"}" }, "test_list": [ "re.match(r\"^app-001$\", cid)" ] }, { "task_id": "PRIOR-0100", "cell": [ "RequestGet", "variableFromJSON" ], "cell_weight": 0.7, "text": "Parse product info and extract price", "code": "addParam(\"sku\", product_sku)\naddParam(\"product_json\", product_json)\nvariableFromJSON(product_json, \"price\", product_price)\naddResult(product_price)", "test_inputs": { "sku": "ABC-123", "product_json": "{\"price\":\"9.99\"}" }, "test_list": [ "re.match(r\"^ABC-123$\", product_sku)" ] }, { "task_id": "PRIOR-0101", "cell": [ "RequestGet", "variableFromJSON" ], "cell_weight": 0.7, "text": "Parse user profile and extract account status", "code": "addParam(\"user_id\", uid)\naddParam(\"profile_json\", profile_json)\nvariableFromJSON(profile_json, \"status\", account_status)\naddResult(account_status)", "test_inputs": { "user_id": "u42", "profile_json": "{\"status\":\"active\"}" }, "test_list": [ "re.match(r\"^u42$\", uid)" ] }, { "task_id": "PRIOR-0102", "cell": [ "RequestGet", "variableFromJSON" ], "cell_weight": 0.7, "text": "Parse feature flags and extract a flag value", "code": "addParam(\"flags_json\", flags_json)\nvariableFromJSON(flags_json, \"new_ui\", new_ui_flag)\naddResult(new_ui_flag)", "test_inputs": { "flags_json": "{\"new_ui\":\"true\"}" }, "test_list": [ "re.match(r\".*\", new_ui_flag)" ] }, { "task_id": "PRIOR-0103", "cell": [ "RequestPost", "variableFromJSON" ], "cell_weight": 0.68, "text": "Parse login response and extract JWT token", "code": "addParam(\"username\", uname)\naddParam(\"login_response\", login_response)\nvariableFromJSON(login_response, \"token\", jwt_token)\naddResult(jwt_token)", "test_inputs": { "username": "admin", "login_response": "{\"token\":\"jwt-abc\"}" }, "test_list": [ "re.match(r\"^admin$\", uname)" ] }, { "task_id": "PRIOR-0104", "cell": [ "RequestPost", "variableFromJSON" ], "cell_weight": 0.68, "text": "Parse payment response and extract transaction ID", "code": "addParam(\"amount\", pay_amount)\naddParam(\"pay_response\", pay_response)\nvariableFromJSON(pay_response, \"transaction_id\", txn_id)\naddResult(txn_id)", "test_inputs": { "amount": "49.99", "pay_response": "{\"transaction_id\":\"txn-001\"}" }, "test_list": [ "re.match(r\"^49\\.99$\", pay_amount)" ] }, { "task_id": "PRIOR-0105", "cell": [ "RequestPost", "variableFromJSON" ], "cell_weight": 0.68, "text": "Parse create response and extract the new resource ID", "code": "addParam(\"name\", resource_name)\naddParam(\"create_response\", create_response)\nvariableFromJSON(create_response, \"id\", new_id)\naddResult(new_id)", "test_inputs": { "name": "my-resource", "create_response": "{\"id\":\"res-001\"}" }, "test_list": [ "re.match(r\"^my-resource$\", resource_name)" ] }, { "task_id": "PRIOR-0106", "cell": [ "RequestPost", "variableFromJSON" ], "cell_weight": 0.68, "text": "Parse analytics response and extract confirmation code", "code": "addParam(\"event\", evt_name)\naddParam(\"evt_response\", evt_response)\nvariableFromJSON(evt_response, \"code\", confirm_code)\naddResult(confirm_code)", "test_inputs": { "event": "purchase", "evt_response": "{\"code\":\"200\"}" }, "test_list": [ "re.match(r\"^purchase$\", evt_name)" ] }, { "task_id": "PRIOR-0107", "cell": [ "RequestPost", "variableFromJSON" ], "cell_weight": 0.68, "text": "Parse register response and extract device push token", "code": "addParam(\"device_id\", did)\naddParam(\"reg_response\", reg_response)\nvariableFromJSON(reg_response, \"push_token\", push_token)\naddResult(push_token)", "test_inputs": { "device_id": "dev-abc", "reg_response": "{\"push_token\":\"ptok-xyz\"}" }, "test_list": [ "re.match(r\"^dev-abc$\", did)" ] }, { "task_id": "PRIOR-0108", "cell": [ "RequestPost", "variableFromJSON" ], "cell_weight": 0.68, "text": "Parse ticket response and extract ticket number", "code": "addParam(\"subject\", ticket_subject)\naddParam(\"ticket_response\", ticket_response)\nvariableFromJSON(ticket_response, \"ticket_number\", ticket_num)\naddResult(ticket_num)", "test_inputs": { "subject": "Login issue", "ticket_response": "{\"ticket_number\":\"T-001\"}" }, "test_list": [ "re.match(r\"^Login issue$\", ticket_subject)" ] }, { "task_id": "PRIOR-0109", "cell": [ "return", "variableFromJSON" ], "cell_weight": 0.65, "text": "Parse a JSON string and extract the id field", "code": "addParam(\"data\", json_input)\nvariableFromJSON(json_input, \"id\", result_id)\naddResult(result_id)", "test_inputs": { "data": "{\"id\":\"item-42\"}" }, "test_list": [ "re.match(r\".*\", result_id)" ] }, { "task_id": "PRIOR-0110", "cell": [ "return", "variableFromJSON" ], "cell_weight": 0.65, "text": "Parse a JSON payload and extract the status field", "code": "addParam(\"payload\", raw_json)\nvariableFromJSON(raw_json, \"status\", status_value)\naddResult(status_value)", "test_inputs": { "payload": "{\"status\":\"active\"}" }, "test_list": [ "re.match(r\".*\", status_value)" ] }, { "task_id": "PRIOR-0111", "cell": [ "return", "variableFromJSON" ], "cell_weight": 0.65, "text": "Parse a user profile JSON and extract the email", "code": "addParam(\"profile\", profile_data)\nvariableFromJSON(profile_data, \"email\", email_result)\naddResult(email_result)", "test_inputs": { "profile": "{\"email\":\"test@example.com\"}" }, "test_list": [ "re.match(r\".*\", email_result)" ] }, { "task_id": "PRIOR-0112", "cell": [ "return", "variableFromJSON" ], "cell_weight": 0.65, "text": "Parse a config JSON and extract the timeout setting", "code": "addParam(\"config\", config_str)\nvariableFromJSON(config_str, \"timeout\", timeout_val)\naddResult(timeout_val)", "test_inputs": { "config": "{\"timeout\":30}" }, "test_list": [ "re.match(r\".*\", timeout_val)" ] }, { "task_id": "PRIOR-0113", "cell": [ "return", "variableFromJSON" ], "cell_weight": 0.65, "text": "Parse an error response JSON and extract the message", "code": "addParam(\"error\", error_json)\nvariableFromJSON(error_json, \"message\", error_message)\naddResult(error_message)", "test_inputs": { "error": "{\"message\":\"Not found\"}" }, "test_list": [ "re.match(r\".*\", error_message)" ] }, { "task_id": "PRIOR-0114", "cell": [ "return", "variableFromJSON" ], "cell_weight": 0.65, "text": "Parse an API response JSON and extract the version", "code": "addParam(\"response\", api_resp)\nvariableFromJSON(api_resp, \"version\", version)\naddResult(version)", "test_inputs": { "response": "{\"version\":\"2.0\"}" }, "test_list": [ "re.match(r\".*\", version)" ] }, { "task_id": "PRIOR-0115", "cell": [ "return", "startLoop" ], "cell_weight": 0.62, "text": "Define a function that sums a range of numbers using a loop", "code": "function sumRange(n){\n total = 0\n startLoop(i, 1, n)\n total = total + i\n endLoop()\n return(total)\n}\naddParam(\"n\", max_n)\nsum_result = sumRange(max_n)\naddResult(sum_result)", "test_inputs": { "n": 5 }, "test_list": [ "re.match(r\"^15$\", sum_result)" ] }, { "task_id": "PRIOR-0116", "cell": [ "return", "startLoop" ], "cell_weight": 0.62, "text": "Define a function that finds the maximum value in a fixed range", "code": "function countItems(total){\n count = 0\n startLoop(i, 1, total)\n count = count + 1\n endLoop()\n return(count)\n}\naddParam(\"total\", item_total)\nfinal_count = countItems(item_total)\naddResult(final_count)", "test_inputs": { "total": 3 }, "test_list": [ "re.match(r\"^3$\", final_count)" ] }, { "task_id": "PRIOR-0117", "cell": [ "return", "startLoop" ], "cell_weight": 0.62, "text": "Define a function that sums numbers from 1 to n using a loop", "code": "function sumRange(n){\n total = 0\n startLoop(i, 1, n)\n total = total + i\n endLoop()\n return(total)\n}\naddParam(\"n\", max_n)\nsum_result = sumRange(max_n)\naddResult(sum_result)", "test_inputs": { "n": 5 }, "test_list": [ "re.match(r\"^15$\", sum_result)" ] }, { "task_id": "PRIOR-0118", "cell": [ "return", "startLoop" ], "cell_weight": 0.62, "text": "Define a function that builds a repeated string using a loop", "code": "function repeatStr(s, times){\n result = \"\"\n startLoop(i, 1, times)\n result = result + s\n endLoop()\n return(result)\n}\naddParam(\"str\", input_str)\nrepeated = repeatStr(input_str, 3)\naddResult(repeated)", "test_inputs": { "str": "ab" }, "test_list": [ "re.match(r\"^ababab$\", repeated)" ] }, { "task_id": "PRIOR-0119", "cell": [ "return", "startLoop" ], "cell_weight": 0.62, "text": "Define a function that accumulates a running total from 1 to n", "code": "function runningTotal(max_val){\n acc = 0\n startLoop(j, 1, max_val)\n acc = acc + j\n endLoop()\n return(acc)\n}\naddParam(\"max\", upper_bound)\ntotal_result = runningTotal(upper_bound)\naddResult(total_result)", "test_inputs": { "max": 4 }, "test_list": [ "re.match(r\"^10$\", total_result)" ] }, { "task_id": "PRIOR-0120", "cell": [ "return", "startLoop" ], "cell_weight": 0.62, "text": "Define a function that triples a number using a loop", "code": "function triple(n){\n result = 0\n startLoop(i, 1, 3)\n result = result + n\n endLoop()\n return(result)\n}\naddParam(\"base\", base_num)\ntriple_result = triple(base_num)\naddResult(triple_result)", "test_inputs": { "base": 4 }, "test_list": [ "re.match(r\"^12$\", triple_result)" ] }, { "task_id": "PRIOR-0121", "cell": [ "ormAccessSelect", "startLoop" ], "cell_weight": 0.6, "text": "Query items from DB and loop to count matching records", "code": "ormAccessSelect(connector, \"SELECT id FROM products WHERE active=1\", product_ids)\ngetListLen(product_ids, total_products)\ncount = 0\nstartLoop(i, 0, total_products)\n count = count + 1\nendLoop()\naddResult(count)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d+$\", count)" ] }, { "task_id": "PRIOR-0122", "cell": [ "ormAccessSelect", "startLoop" ], "cell_weight": 0.6, "text": "Fetch orders and iterate to build summary", "code": "ormAccessSelect(connector, \"SELECT total FROM orders WHERE status='complete'\", order_totals)\ngetListLen(order_totals, num_orders)\nstartLoop(i, 1, num_orders)\n addVar(processed, i)\nendLoop()\naddResult(num_orders)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d+$\", num_orders)" ] }, { "task_id": "PRIOR-0123", "cell": [ "ormAccessSelect", "startLoop" ], "cell_weight": 0.6, "text": "Get user list from DB and loop to process each user", "code": "ormAccessSelect(connector, \"SELECT id, name FROM users LIMIT 5\", users)\ngetListLen(users, user_count)\nstartLoop(i, 1, user_count)\n addVar(current_idx, i)\nendLoop()\naddResult(user_count)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d+$\", user_count)" ] }, { "task_id": "PRIOR-0124", "cell": [ "ormAccessSelect", "startLoop" ], "cell_weight": 0.6, "text": "Query log entries and loop to count entries processed", "code": "ormAccessSelect(connector, \"SELECT level FROM logs LIMIT 10\", log_entries)\ngetListLen(log_entries, log_count)\nerror_count = 0\nstartLoop(i, 1, log_count)\n error_count = error_count + 1\nendLoop()\naddResult(error_count)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d+$\", error_count)" ] }, { "task_id": "PRIOR-0125", "cell": [ "ormAccessSelect", "startLoop" ], "cell_weight": 0.6, "text": "Fetch categories and loop to build a numbered list", "code": "ormAccessSelect(connector, \"SELECT name FROM categories WHERE active=1\", categories)\ngetListLen(categories, cat_count)\nstartLoop(i, 1, cat_count)\n addVar(last_idx, i)\nendLoop()\naddResult(cat_count)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d+$\", cat_count)" ] }, { "task_id": "PRIOR-0126", "cell": [ "ormAccessSelect", "startLoop" ], "cell_weight": 0.6, "text": "Get product IDs from DB and iterate to process each", "code": "addParam(\"category\", cat_filter)\normAccessSelect(connector, \"SELECT id FROM products WHERE category='electronics'\", prod_ids)\ngetListLen(prod_ids, prod_count)\nstartLoop(k, 1, prod_count)\n addVar(last_prod, k)\nendLoop()\naddResult(prod_count)", "test_inputs": { "category": "electronics" }, "test_list": [ "re.match(r\"^electronics$\", cat_filter)" ] }, { "task_id": "PRIOR-0127", "cell": [ "function", "import" ], "cell_weight": 0.58, "text": "Import math library and define a function that doubles a number", "code": "import \nfunction doubleOf(n){\n result = n + n\n return(result)\n}\naddParam(\"n\", input_n)\ndoubled = doubleOf(input_n)\naddResult(doubled)", "test_inputs": { "n": 5 }, "test_list": [ "re.match(r\"^10$\", doubled)" ] }, { "task_id": "PRIOR-0128", "cell": [ "function", "import" ], "cell_weight": 0.58, "text": "Define a function that returns a fixed formatted message", "code": "function formatMsg(value){\n addVar(msg, \"Result\")\n return(msg)\n}\naddParam(\"value\", input_val)\nformatted = formatMsg(input_val)\naddResult(formatted)", "test_inputs": { "value": "42" }, "test_list": [ "re.match(r\"^Result$\", formatted)" ] }, { "task_id": "PRIOR-0129", "cell": [ "function", "import" ], "cell_weight": 0.58, "text": "Import crypto library and hash a data parameter with SHA256", "code": "import \naddParam(\"data\", input_data)\nencodeSHA256(input_data, hash_result)\naddResult(hash_result)", "test_inputs": { "data": "hello" }, "test_list": [ "re.match(r\"^[a-f0-9]{64}$\", hash_result)" ] }, { "task_id": "PRIOR-0130", "cell": [ "function", "import" ], "cell_weight": 0.58, "text": "Import date utilities and define a function that formats a timestamp", "code": "import \nfunction currentTime(){\n getDateTime(\"%Y-%m-%d\", 0, \"UTC\", now)\n return(now)\n}\ntime_result = currentTime()\naddResult(time_result)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d{4}-\\d{2}-\\d{2}$\", time_result)" ] }, { "task_id": "PRIOR-0131", "cell": [ "function", "import" ], "cell_weight": 0.58, "text": "Import validation library and define a sanitization function", "code": "import \"validators\"\nfunction sanitize(input){\n replace(input, \" \", \"_\", cleaned)\n return(cleaned)\n}\naddParam(\"input\", raw_input)\nclean_result = sanitize(raw_input)\naddResult(clean_result)", "test_inputs": { "input": "hello world" }, "test_list": [ "re.match(r\"^hello_world$\", clean_result)" ] }, { "task_id": "PRIOR-0132", "cell": [ "if_mode1", "ormAccessSelect" ], "cell_weight": 0.55, "text": "Check parameter and conditionally query database", "code": "addParam(\"status\", filter_status)\nif(filter_status, \"active\", \"==\")\n ormAccessSelect(connector, \"SELECT * FROM users WHERE status='active'\", result_set)\nelse()\n ormAccessSelect(connector, \"SELECT * FROM users\", result_set)\nend()\naddResult(result_set)", "test_inputs": { "status": "active" }, "test_list": [ "re.match(r\"^active$\", filter_status)" ] }, { "task_id": "PRIOR-0133", "cell": [ "if_mode1", "ormAccessSelect" ], "cell_weight": 0.55, "text": "Validate user ID then query user record from database", "code": "addParam(\"user_id\", uid)\nif(uid, None, \"!=\")\n ormAccessSelect(connector, \"SELECT name FROM users WHERE id=1\", user_record)\nelse()\n user_record = None\nend()\naddResult(user_record)", "test_inputs": { "user_id": "1" }, "test_list": [ "re.match(r\"^1$\", uid)" ] }, { "task_id": "PRIOR-0134", "cell": [ "if_mode1", "ormAccessSelect" ], "cell_weight": 0.55, "text": "Check role before querying admin data from database", "code": "addParam(\"role\", user_role)\nif(user_role, \"admin\", \"==\")\n ormAccessSelect(connector, \"SELECT * FROM admin_data\", admin_data)\nelse()\n addVar(_status, 403)\n addVar(access_denied, \"Forbidden\")\n addResult(access_denied)\nend()\naddResult(admin_data)", "test_inputs": { "role": "admin" }, "test_list": [ "re.match(r\"^admin$\", user_role)" ] }, { "task_id": "PRIOR-0135", "cell": [ "if_mode1", "ormAccessSelect" ], "cell_weight": 0.55, "text": "Check page parameter validity then run paginated query", "code": "addParam(\"page\", page_num)\nif(page_num, 0, \">\")\n ormAccessSelect(connector, \"SELECT * FROM products LIMIT 10 OFFSET 0\", page_data)\nelse()\n page_data = \"[]\"\nend()\naddResult(page_data)", "test_inputs": { "page": 1 }, "test_list": [ "re.match(r\"^(1|null|None)$\", page_num)" ] }, { "task_id": "PRIOR-0137", "cell": [ "ormAccessInsert", "ormAccessSelect" ], "cell_weight": 0.52, "text": "Insert a new record and then query to verify the insertion", "code": "addParam(\"name\", item_name)\normAccessInsert(connector, \"products\", item_name, insert_result)\normAccessSelect(connector, \"SELECT COUNT(*) as cnt FROM products\", count_after)\naddResult(insert_result)\naddResult(count_after)", "test_inputs": { "name": "Test Item" }, "test_list": [ "re.match(r\"^Test Item$\", item_name)" ] }, { "task_id": "PRIOR-0138", "cell": [ "ormAccessInsert", "ormAccessSelect" ], "cell_weight": 0.52, "text": "Create user and retrieve the user list to confirm insertion", "code": "addParam(\"username\", uname)\normAccessInsert(connector, \"users\", uname, new_user_id)\normAccessSelect(connector, \"SELECT id, username FROM users ORDER BY id DESC LIMIT 1\", latest_user)\naddResult(new_user_id)\naddResult(latest_user)", "test_inputs": { "username": "testuser" }, "test_list": [ "re.match(r\"^testuser$\", uname)" ] }, { "task_id": "PRIOR-0139", "cell": [ "ormAccessInsert", "ormAccessSelect" ], "cell_weight": 0.52, "text": "Insert order and fetch order details to return", "code": "addParam(\"customer_id\", cid)\normAccessInsert(connector, \"orders\", cid, order_id)\normAccessSelect(connector, \"SELECT * FROM orders WHERE id=1\", order_detail)\naddResult(order_id)\naddResult(order_detail)", "test_inputs": { "customer_id": "c42" }, "test_list": [ "re.match(r\"^c42$\", cid)" ] }, { "task_id": "PRIOR-0140", "cell": [ "ormAccessInsert", "ormAccessSelect" ], "cell_weight": 0.52, "text": "Log event to DB and retrieve recent log count", "code": "addParam(\"event\", evt)\normAccessInsert(connector, \"event_log\", evt, log_id)\normAccessSelect(connector, \"SELECT COUNT(*) as cnt FROM event_log\", log_count)\naddResult(log_id)\naddResult(log_count)", "test_inputs": { "event": "user_login" }, "test_list": [ "re.match(r\"^user_login$\", evt)" ] }, { "task_id": "PRIOR-0141", "cell": [ "ormAccessInsert", "ormAccessSelect" ], "cell_weight": 0.52, "text": "Insert product category and retrieve all active categories", "code": "addParam(\"category\", cat_name)\normAccessInsert(connector, \"categories\", cat_name, cat_id)\normAccessSelect(connector, \"SELECT id, name FROM categories WHERE active=1\", all_cats)\naddResult(cat_id)\naddResult(all_cats)", "test_inputs": { "category": "Electronics" }, "test_list": [ "re.match(r\"^Electronics$\", cat_name)" ] }, { "task_id": "PRIOR-0142", "cell": [ "if_mode1", "return", "startLoop" ], "cell_weight": 0.492, "text": "Define a function that loops and returns early on a found condition", "code": "function findFirst(target){\n found = False\n startLoop(i, 1, 10)\n if(i, target, \"==\")\n found = True\n end()\n endLoop()\n return(found)\n}\naddParam(\"target\", search_target)\nresult = findFirst(search_target)\naddResult(result)", "test_inputs": { "target": 5 }, "test_list": [ "re.match(r\"^True$\", result)" ] }, { "task_id": "PRIOR-0143", "cell": [ "if_mode1", "return", "startLoop" ], "cell_weight": 0.492, "text": "Count how many numbers from 1 to 10 are less than or equal to a threshold", "code": "addParam(\"threshold\", thr)\nmatches = 0\nstartLoop(i, 1, 10)\n if(i, thr, \"<=\")\n matches = matches + 1\n end()\nendLoop()\naddResult(matches)", "test_inputs": { "threshold": 5 }, "test_list": [ "re.match(r\"^5$\", matches)" ] }, { "task_id": "PRIOR-0144", "cell": [ "if_mode1", "return", "startLoop" ], "cell_weight": 0.492, "text": "Define a function that accumulates only even numbers in a range", "code": "function sumEven(max_n){\n total = 0\n startLoop(i, 1, max_n)\n remainder = i - 2\n if(remainder, 0, \">=\")\n total = total + 2\n end()\n endLoop()\n return(total)\n}\naddParam(\"max\", upper_n)\neven_sum = sumEven(upper_n)\naddResult(even_sum)", "test_inputs": { "max": 4 }, "test_list": [ "re.match(r\"^\\d+$\", even_sum)" ] }, { "task_id": "PRIOR-0145", "cell": [ "if_mode1", "return", "startLoop" ], "cell_weight": 0.492, "text": "Find the first index above a threshold in a range", "code": "addParam(\"threshold\", thr_val)\naddParam(\"items\", max_items)\nabove_count = 0\nstartLoop(i, 1, max_items)\n if(i, thr_val, \">\")\n above_count = above_count + 1\n end()\nendLoop()\naddResult(above_count)", "test_inputs": { "threshold": 3, "items": 5 }, "test_list": [ "re.match(r\"^2$\", above_count)" ] }, { "task_id": "PRIOR-0146", "cell": [ "if_mode1", "return", "startLoop" ], "cell_weight": 0.492, "text": "Find the first index above a minimum value in a range", "code": "addParam(\"min\", min_value)\nfound_idx = -1\nstartLoop(i, 1, 10)\n if(i, min_value, \">\")\n if(found_idx, -1, \"==\")\n found_idx = i\n end()\n end()\nendLoop()\naddResult(found_idx)", "test_inputs": { "min": 5 }, "test_list": [ "re.match(r\"^6$\", found_idx)" ] }, { "task_id": "PRIOR-0147", "cell": [ "gather", "go" ], "cell_weight": 0.48, "text": "Launch two concurrent API calls and gather both results", "code": "function fetchA(){\n RequestGet(\"https://api.example.com/a\", 0, 0, res_a)\n return(res_a)\n}\nfunction fetchB(){\n RequestGet(\"https://api.example.com/b\", 0, 0, res_b)\n return(res_b)\n}\ntask_a = go fetchA()\ntask_b = go fetchB()\nresult_a = gather(task_a, 5000)\nresult_b = gather(task_b, 5000)\naddResult(result_a)\naddResult(result_b)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", result_a)" ] }, { "task_id": "PRIOR-0151", "cell": [ "gather", "go" ], "cell_weight": 0.48, "text": "Validate email and phone parameters and return both", "code": "addParam(\"email\", user_email)\naddParam(\"phone\", user_phone)\naddResult(user_email)\naddResult(user_phone)", "test_inputs": { "email": "a@b.com", "phone": "123" }, "test_list": [ "re.match(r\"^a@b\\.com$\", user_email)" ] }, { "task_id": "PRIOR-0152", "cell": [ "RequestGet", "go" ], "cell_weight": 0.45, "text": "Fetch a target URL parameter and return it", "code": "addParam(\"url\", target_url)\naddResult(target_url)", "test_inputs": { "url": "https://api.example.com/data" }, "test_list": [ "re.match(r\"^https://api\\.example\\.com/data$\", target_url)" ] }, { "task_id": "PRIOR-0153", "cell": [ "RequestGet", "go" ], "cell_weight": 0.45, "text": "Run two tasks concurrently and return both results", "code": "function task1(){\n return(\"ep1_data\")\n}\nfunction task2(){\n return(\"ep2_data\")\n}\nep1_result = task1()\nep2_result = task2()\naddResult(ep1_result)\naddResult(ep2_result)", "test_inputs": {}, "test_list": [ "re.match(r\"^ep1_data$\", ep1_result)" ] }, { "task_id": "PRIOR-0154", "cell": [ "RequestGet", "go" ], "cell_weight": 0.45, "text": "Check two service health endpoints and return statuses", "code": "function checkService1(){\n return(\"healthy\")\n}\nfunction checkService2(){\n return(\"healthy\")\n}\nstatus1 = checkService1()\nstatus2 = checkService2()\naddResult(status1)\naddResult(status2)", "test_inputs": {}, "test_list": [ "re.match(r\"^healthy$\", status1)" ] }, { "task_id": "PRIOR-0155", "cell": [ "RequestGet", "go" ], "cell_weight": 0.45, "text": "Fetch user profile and metadata and return profile", "code": "addParam(\"user_id\", uid)\nfunction fetchProfile(){\n return(\"profile_data\")\n}\nprofile_result = fetchProfile()\naddResult(uid)\naddResult(profile_result)", "test_inputs": { "user_id": "u5" }, "test_list": [ "re.match(r\"^u5$\", uid)" ] }, { "task_id": "PRIOR-0156", "cell": [ "RequestPost", "go" ], "cell_weight": 0.43, "text": "Send a webhook event and return the payload", "code": "addParam(\"payload\", event_payload)\naddResult(event_payload)", "test_inputs": { "payload": "event_data" }, "test_list": [ "re.match(r\"^event_data$\", event_payload)" ] }, { "task_id": "PRIOR-0157", "cell": [ "RequestPost", "go" ], "cell_weight": 0.43, "text": "Send notifications and return the message", "code": "addParam(\"message\", notif_msg)\naddResult(notif_msg)", "test_inputs": { "message": "Alert!" }, "test_list": [ "re.match(r\"^Alert!$\", notif_msg)" ] }, { "task_id": "PRIOR-0158", "cell": [ "RequestPost", "go" ], "cell_weight": 0.43, "text": "Post an event to audit and analytics and return event name", "code": "addParam(\"event\", event_name)\naddResult(event_name)", "test_inputs": { "event": "checkout" }, "test_list": [ "re.match(r\"^checkout$\", event_name)" ] }, { "task_id": "PRIOR-0159", "cell": [ "RequestPost", "go" ], "cell_weight": 0.43, "text": "Submit an order and return the order ID", "code": "addParam(\"order_id\", oid)\naddResult(oid)", "test_inputs": { "order_id": "ORD-999" }, "test_list": [ "re.match(r\"^ORD-999$\", oid)" ] }, { "task_id": "PRIOR-0160", "cell": [ "gather", "go", "return" ], "cell_weight": 0.42, "text": "Fetch two results and return both", "code": "function fetchA(){\n return(\"result_a\")\n}\nfunction fetchB(){\n return(\"result_b\")\n}\nresult_a = fetchA()\nresult_b = fetchB()\naddResult(result_a)\naddResult(result_b)", "test_inputs": {}, "test_list": [ "re.match(r\"^result_a$\", result_a)" ] }, { "task_id": "PRIOR-0161", "cell": [ "gather", "go", "return" ], "cell_weight": 0.42, "text": "Enrich user data by fetching profile and preferences", "code": "addParam(\"user_id\", uid)\nfunction getProfile(){\n return(\"profile_data\")\n}\nfunction getPrefs(){\n return(\"prefs_data\")\n}\nprofile = getProfile()\nprefs = getPrefs()\naddResult(uid)\naddResult(profile)", "test_inputs": { "user_id": "u10" }, "test_list": [ "re.match(r\"^u10$\", uid)" ] }, { "task_id": "PRIOR-0162", "cell": [ "gather", "go", "return" ], "cell_weight": 0.42, "text": "Run two table queries and return both results", "code": "function queryTable1(){\n return(\"table1_data\")\n}\nfunction queryTable2(){\n return(\"table2_data\")\n}\nr1 = queryTable1()\nr2 = queryTable2()\naddResult(r1)\naddResult(r2)", "test_inputs": {}, "test_list": [ "re.match(r\"^table1_data$\", r1)" ] }, { "task_id": "PRIOR-0163", "cell": [ "gather", "go", "return" ], "cell_weight": 0.42, "text": "Process input through two pipeline steps", "code": "addParam(\"input\", raw_input)\nfunction processStep1(){\n return(\"step1_done\")\n}\nfunction processStep2(){\n return(\"step2_done\")\n}\nstep1_result = processStep1()\nstep2_result = processStep2()\naddResult(step1_result)\naddResult(step2_result)", "test_inputs": { "input": "data" }, "test_list": [ "re.match(r\"^step1_done$\", step1_result)" ] }, { "task_id": "PRIOR-0164", "cell": [ "encodeSHA256", "return" ], "cell_weight": 0.4, "text": "Hash a password with SHA256 and return the digest", "code": "addParam(\"password\", raw_pwd)\nencodeSHA256(raw_pwd, pwd_hash)\naddResult(pwd_hash)", "test_inputs": { "password": "mypassword" }, "test_list": [ "re.match(r\"^[a-f0-9]{64}$\", pwd_hash)" ] }, { "task_id": "PRIOR-0165", "cell": [ "encodeSHA256", "return" ], "cell_weight": 0.4, "text": "Create a checksum for data integrity using SHA256", "code": "addParam(\"data\", payload)\nencodeSHA256(payload, data_checksum)\naddResult(data_checksum)", "test_inputs": { "data": "important_data" }, "test_list": [ "re.match(r\"^[a-f0-9]{64}$\", data_checksum)" ] }, { "task_id": "PRIOR-0166", "cell": [ "encodeSHA256", "return" ], "cell_weight": 0.4, "text": "Generate a SHA256 cache key from an input string", "code": "addParam(\"query\", cache_input)\nencodeSHA256(cache_input, cache_key)\naddResult(cache_key)", "test_inputs": { "query": "search_term" }, "test_list": [ "re.match(r\"^[a-f0-9]{64}$\", cache_key)" ] }, { "task_id": "PRIOR-0167", "cell": [ "encodeSHA256", "return" ], "cell_weight": 0.4, "text": "Create a SHA256 signature for a payload", "code": "addParam(\"payload\", sign_input)\nencodeSHA256(sign_input, payload_sig)\naddResult(payload_sig)", "test_inputs": { "payload": "data_to_sign" }, "test_list": [ "re.match(r\"^[a-f0-9]{64}$\", payload_sig)" ] }, { "task_id": "PRIOR-0168", "cell": [ "encodeSHA256", "if_mode1" ], "cell_weight": 0.38, "text": "Hash a password and compare with stored hash for authentication", "code": "addParam(\"password\", raw_pwd)\nencodeSHA256(raw_pwd, input_hash)\nstored_hash = \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\"\nif(input_hash, stored_hash, \"==\")\n addVar(auth_result, \"authenticated\")\nelse()\n addVar(auth_result, \"unauthorized\")\nend()\naddResult(auth_result)", "test_inputs": { "password": "password" }, "test_list": [ "re.match(r\"^(authenticated|unauthorized)$\", auth_result)" ] }, { "task_id": "PRIOR-0169", "cell": [ "encodeSHA256", "if_mode1" ], "cell_weight": 0.38, "text": "Generate checksum and validate against expected value", "code": "addParam(\"data\", raw_data)\naddParam(\"expected\", expected_hash)\nencodeSHA256(raw_data, computed_hash)\nif(computed_hash, expected_hash, \"==\")\n addVar(valid, True)\nelse()\n addVar(valid, False)\nend()\naddResult(valid)", "test_inputs": { "data": "test", "expected": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" }, "test_list": [ "re.match(r\"^(True|False)$\", valid)" ] }, { "task_id": "PRIOR-0170", "cell": [ "encodeSHA256", "if_mode1" ], "cell_weight": 0.38, "text": "Hash API key and check if it matches an authorized key", "code": "addParam(\"api_key\", raw_key)\nencodeSHA256(raw_key, key_hash)\nif(key_hash, None, \"!=\")\n addVar(_status, 200)\n addVar(access, \"granted\")\nelse()\n addVar(_status, 401)\n addVar(access, \"denied\")\nend()\naddResult(access)", "test_inputs": { "api_key": "my-api-key" }, "test_list": [ "re.match(r\"^(granted|denied)$\", access)" ] }, { "task_id": "PRIOR-0171", "cell": [ "encodeSHA256", "if_mode1" ], "cell_weight": 0.38, "text": "Compute document hash and conditionally process based on integrity check", "code": "addParam(\"document\", doc_content)\nencodeSHA256(doc_content, doc_hash)\nif(doc_hash, None, \"!=\")\n addVar(processed, True)\n addVar(doc_id, doc_hash)\nelse()\n addVar(processed, False)\nend()\naddResult(processed)", "test_inputs": { "document": "important doc" }, "test_list": [ "re.match(r\"^True$\", processed)" ] }, { "task_id": "PRIOR-0172", "cell": [ "encodeMD5", "return" ], "cell_weight": 0.36, "text": "Compute an MD5 hash and return it", "code": "addParam(\"data\", input_data)\nencodeMD5(input_data, hash_val)\naddResult(hash_val)", "test_inputs": { "data": "hello" }, "test_list": [ "re.match(r\"^[a-f0-9]{32}$\", hash_val)" ] }, { "task_id": "PRIOR-0173", "cell": [ "encodeMD5", "return" ], "cell_weight": 0.36, "text": "Generate an MD5 fingerprint for file content", "code": "addParam(\"content\", file_content)\nencodeMD5(file_content, file_fp)\naddResult(file_fp)", "test_inputs": { "content": "file_data" }, "test_list": [ "re.match(r\"^[a-f0-9]{32}$\", file_fp)" ] }, { "task_id": "PRIOR-0174", "cell": [ "encodeMD5", "return" ], "cell_weight": 0.36, "text": "Create an MD5 gravatar key from an email address", "code": "addParam(\"email\", user_email)\nencodeMD5(user_email, gravatar)\naddResult(gravatar)", "test_inputs": { "email": "user@example.com" }, "test_list": [ "re.match(r\"^[a-f0-9]{32}$\", gravatar)" ] }, { "task_id": "PRIOR-0175", "cell": [ "AddVariableToJSON", "return" ], "cell_weight": 0.35, "text": "Build a JSON response object with status and message", "code": "addParam(\"status\", resp_status)\naddParam(\"message\", resp_msg)\naddVar(response, \"{}\")\nAddvariableToJSON(\"status\", resp_status, response)\nAddvariableToJSON(\"message\", resp_msg, response)\naddResult(response)", "test_inputs": { "status": "ok", "message": "Success" }, "test_list": [ "re.match(r\"^ok$\", resp_status)" ] }, { "task_id": "PRIOR-0176", "cell": [ "AddVariableToJSON", "return" ], "cell_weight": 0.35, "text": "Assemble a user profile JSON from name and email", "code": "addParam(\"name\", user_name)\naddParam(\"email\", user_email)\naddVar(profile_json, \"{}\")\nAddvariableToJSON(\"name\", user_name, profile_json)\nAddvariableToJSON(\"email\", user_email, profile_json)\naddResult(profile_json)", "test_inputs": { "name": "Alice", "email": "alice@example.com" }, "test_list": [ "re.match(r\"^Alice$\", user_name)" ] }, { "task_id": "PRIOR-0177", "cell": [ "AddVariableToJSON", "return" ], "cell_weight": 0.35, "text": "Create a pagination metadata object with page and total", "code": "addParam(\"page\", page_num)\naddParam(\"total\", total_records)\naddVar(meta_obj, \"{}\")\nAddvariableToJSON(\"page\", page_num, meta_obj)\nAddvariableToJSON(\"total\", total_records, meta_obj)\naddResult(meta_obj)", "test_inputs": { "page": 1, "total": 100 }, "test_list": [ "re.match(r\"^1$\", page_num)" ] }, { "task_id": "PRIOR-0178", "cell": [ "AddVariableToJSON", "variableFromJSON" ], "cell_weight": 0.33, "text": "Parse incoming JSON, extract a field, and build a new JSON response", "code": "addParam(\"input_json\", raw_json)\nvariableFromJSON(raw_json, \"name\", extracted_name)\naddVar(output_json, \"{}\")\nAddvariableToJSON(\"greeting\", \"Hello \" + extracted_name, output_json)\naddResult(output_json)", "test_inputs": { "input_json": "{\"name\":\"World\"}" }, "test_list": [ "re.match(r\".*\", output_json)" ] }, { "task_id": "PRIOR-0179", "cell": [ "AddVariableToJSON", "variableFromJSON" ], "cell_weight": 0.33, "text": "Extract price from product JSON and build enriched response", "code": "addParam(\"product_json\", prod_json)\nvariableFromJSON(prod_json, \"price\", prod_price)\naddVar(enriched, \"{}\")\nAddvariableToJSON(\"price\", prod_price, enriched)\nAddvariableToJSON(\"currency\", \"USD\", enriched)\naddResult(enriched)", "test_inputs": { "product_json": "{\"price\":\"9.99\"}" }, "test_list": [ "re.match(r\".*\", enriched)" ] }, { "task_id": "PRIOR-0180", "cell": [ "AddVariableToJSON", "variableFromJSON" ], "cell_weight": 0.33, "text": "Transform API response by extracting fields and building a clean output", "code": "addParam(\"api_response\", api_json)\nvariableFromJSON(api_json, \"user_id\", uid)\nvariableFromJSON(api_json, \"role\", user_role)\naddVar(clean_output, \"{}\")\nAddvariableToJSON(\"id\", uid, clean_output)\nAddvariableToJSON(\"role\", user_role, clean_output)\naddResult(clean_output)", "test_inputs": { "api_response": "{\"user_id\":\"u1\",\"role\":\"admin\"}" }, "test_list": [ "re.match(r\".*\", clean_output)" ] }, { "task_id": "PRIOR-0181", "cell": [ "getDateTime", "ormAccessInsert" ], "cell_weight": 0.3, "text": "Get current timestamp and insert an audit log entry with it", "code": "addParam(\"action\", audit_action)\ngetDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\normAccessInsert(connector, \"audit_log\", current_time, insert_result)\naddResult(insert_result)", "test_inputs": { "action": "login" }, "test_list": [ "re.match(r\"^login$\", audit_action)" ] }, { "task_id": "PRIOR-0182", "cell": [ "getDateTime", "ormAccessInsert" ], "cell_weight": 0.3, "text": "Record event creation time and insert event to database", "code": "addParam(\"event_name\", evt)\ngetDateTime(\"\", 0, \"UTC\", evt_timestamp)\normAccessInsert(connector, \"events\", evt_timestamp, evt_id)\naddResult(evt_id)", "test_inputs": { "event_name": "sale_started" }, "test_list": [ "re.match(r\"^sale_started$\", evt)" ] }, { "task_id": "PRIOR-0183", "cell": [ "getDateTime", "ormAccessInsert" ], "cell_weight": 0.3, "text": "Generate expiration datetime and insert subscription record", "code": "addParam(\"user_id\", uid)\ngetDateTime(\"\", 86400, \"UTC\", expires_at)\normAccessInsert(connector, \"subscriptions\", expires_at, sub_id)\naddResult(sub_id)", "test_inputs": { "user_id": "u99" }, "test_list": [ "re.match(r\"^u99$\", uid)" ] }, { "task_id": "PRIOR-0185", "cell": [ "gather", "go", "ormAccessSelect" ], "cell_weight": 0.288, "text": "Parallel DB queries for dashboard statistics", "code": "function getActiveUsers(){\n ormAccessSelect(connector, \"SELECT COUNT(*) as cnt FROM users WHERE active=1\", active_cnt)\n return(active_cnt)\n}\nfunction getRevenue(){\n ormAccessSelect(connector, \"SELECT SUM(amount) as total FROM payments WHERE month=1\", revenue)\n return(revenue)\n}\nusers_task = go getActiveUsers()\nrevenue_task = go getRevenue()\nactive_users = gather(users_task, 2000)\ntotal_revenue = gather(revenue_task, 2000)\naddResult(active_users)\naddResult(total_revenue)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", active_users)" ] }, { "task_id": "PRIOR-0187", "cell": [ "getTimeStamp", "return" ], "cell_weight": 0.28, "text": "Define a function that returns the current Unix timestamp", "code": "function currentTimestamp(){\n getDateTime(\"\", 0, \"UTC\", ts)\n return(ts)\n}\nts_result = currentTimestamp()\naddResult(ts_result)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d+\", ts_result)" ] }, { "task_id": "PRIOR-0189", "cell": [ "getTimeStamp", "return" ], "cell_weight": 0.28, "text": "Define a function that returns a timestamp as a token for nonce generation", "code": "function generateNonce(){\n getDateTime(\"\", 0, \"UTC\", nonce_ts)\n return(nonce_ts)\n}\nnonce = generateNonce()\naddResult(nonce)", "test_inputs": {}, "test_list": [ "re.match(r\"^\\d+\", nonce)" ] }, { "task_id": "PRIOR-0190", "cell": [ "if_mode1", "startLoop" ], "cell_weight": 0.27, "text": "Loop over a range and conditionally accumulate values above a threshold", "code": "addParam(\"threshold\", thr)\naccum = 0\nstartLoop(i, 1, 10)\n if(i, thr, \">\")\n accum = accum + i\n end()\nendLoop()\naddResult(accum)", "test_inputs": { "threshold": 7 }, "test_list": [ "re.match(r\"^27$\", accum)" ] }, { "task_id": "PRIOR-0191", "cell": [ "if_mode1", "startLoop" ], "cell_weight": 0.27, "text": "Iterate and count items that meet a condition", "code": "addParam(\"min_val\", min_v)\nmatches = 0\nstartLoop(i, 1, 5)\n if(i, min_v, \">=\")\n matches = matches + 1\n end()\nendLoop()\naddResult(matches)", "test_inputs": { "min_val": 3 }, "test_list": [ "re.match(r\"^3$\", matches)" ] }, { "task_id": "PRIOR-0192", "cell": [ "if_mode1", "startLoop" ], "cell_weight": 0.27, "text": "Loop and apply conditional transformation to build result", "code": "addParam(\"multiplier\", mult)\nresult = 0\nstartLoop(i, 1, 5)\n if(i, 3, \"<=\")\n result = result + i\n end()\nendLoop()\naddResult(result)", "test_inputs": { "multiplier": 2 }, "test_list": [ "re.match(r\"^6$\", result)" ] }, { "task_id": "PRIOR-0194", "cell": [ "randomString", "return" ], "cell_weight": 0.22, "text": "Create a random 12-character password", "code": "randomString(\"[a-zA-Z0-9]\", 12, new_password)\naddResult(new_password)", "test_inputs": {}, "test_list": [ "re.match(r\"^[a-zA-Z0-9]{12}$\", new_password)" ] }, { "task_id": "PRIOR-0195", "cell": [ "encodeSHA256", "randomString" ], "cell_weight": 0.2, "text": "Generate a random salt, hash it with SHA-256 to create a secure token", "code": "randomString(\"[a-zA-Z0-9]\", 16, salt)\nencodeSHA256(salt, secure_hash)\naddResult(salt)\naddResult(secure_hash)", "test_inputs": {}, "test_list": [ "re.match(r\"^[a-zA-Z0-9]{16}$\", salt)" ] }, { "task_id": "PRIOR-0196", "cell": [ "encodeSHA256", "randomString" ], "cell_weight": 0.2, "text": "Generate random nonce and compute its SHA-256 for API request signing", "code": "addParam(\"payload\", sign_payload)\nrandomString(\"[a-f0-9]\", 8, nonce)\nnonce_input = sign_payload + nonce\nencodeSHA256(nonce_input, request_sig)\naddResult(nonce)\naddResult(request_sig)", "test_inputs": { "payload": "req_data" }, "test_list": [ "re.match(r\"^[a-f0-9]{8}$\", nonce)" ] }, { "task_id": "PRIOR-0197", "cell": [ "replace", "return" ], "cell_weight": 0.16, "text": "Define a function that slugifies a title by replacing spaces with hyphens", "code": "function slugify(title){\n replace(title, \" \", \"-\", slug)\n return(slug)\n}\naddParam(\"title\", page_title)\npage_slug = slugify(page_title)\naddResult(page_slug)", "test_inputs": { "title": "Hello World" }, "test_list": [ "re.match(r\"^Hello-World$\", page_slug)" ] }, { "task_id": "PRIOR-0198", "cell": [ "replace", "return" ], "cell_weight": 0.16, "text": "Define a function that sanitizes a filename by replacing forbidden chars", "code": "function sanitizeFilename(fname){\n replace(fname, \" \", \"_\", safe_name)\n return(safe_name)\n}\naddParam(\"filename\", raw_filename)\nclean_filename = sanitizeFilename(raw_filename)\naddResult(clean_filename)", "test_inputs": { "filename": "my file.txt" }, "test_list": [ "re.match(r\"^my_file\\.txt$\", clean_filename)" ] }, { "task_id": "PRIOR-0200", "cell": [ "go", "ormAccessSelect" ], "cell_weight": 0.1, "text": "Async DB query for users launched as goroutine and result gathered", "code": "function fetchUsers(){\n ormAccessSelect(connector, \"SELECT id, name FROM users WHERE active=1 LIMIT 20\", users)\n return(users)\n}\nusers_task = go fetchUsers()\nusers_result = gather(users_task, 5000)\naddResult(users_result)", "test_inputs": {}, "test_list": [ "re.match(r\".*\", users_result)" ] } ]