Skip to content

28 eval-informed mental models and critical-thinking skills for Claude Code, GitHub Copilot, Codex, Cursor, and other Agent Skills-compatible tools

feat(m3-datasets): build candidate item pools per evaluation family with manifests

Travis Boudreaux178e47c250d7
diff --git a/evals/datasets/calibrated/build-candidate-pools.js b/evals/datasets/calibrated/build-candidate-pools.js
new file mode 100644
index 0000000..7e71876
--- /dev/null
+++ b/evals/datasets/calibrated/build-candidate-pools.js
@@ -0,0 +1,615 @@
+#!/usr/bin/env node
+'use strict';
+
+/**
+ * Build candidate item pools per evaluation family.
+ *
+ * Reads existing authored/external/behavioral datasets, classifies items as
+ * target / near-miss / off-target-distractor / ambiguous, and writes:
+ * 1. A JSONL candidate pool file per family
+ * 2. A co-located manifest per family (source, leakage, label, calibration)
+ *
+ * Ambiguous items are excluded from decisive splits (they get a separate file).
+ *
+ * Usage:
+ * node evals/datasets/calibrated/build-candidate-pools.js
+ */
+
+const fs = require('fs');
+const path = require('path');
+
+const REPO = path.resolve(__dirname, '..', '..', '..');
+const DATASETS = path.join(REPO, 'evals', 'datasets');
+const OUT = path.join(DATASETS, 'calibrated');
+
+// ---- Family definitions ----
+const FAMILIES = {
+ 'debugging-fault-localization': {
+ name: 'Debugging/fault-localization',
+ skills: ['scientific-method', 'five-whys-plus', 'systems', 'occams-razor',
+ 'map-territory', 'kepner-tregoe', 'second-order', 'theory-of-constraints'],
+ valueSurface: 'localization',
+ calibrationRange: [0.40, 0.70],
+ sources: {
+ target: [
+ { file: 'external/swebench.jsonl', mode: 'adopt', filter: null },
+ ],
+ nearMiss: [
+ { file: 'authored/map-territory-verify.jsonl', mode: 'adopt', filter: null },
+ ],
+ distractor: [
+ { file: 'external/glm-distractor.jsonl', mode: 'distractor', filter: null },
+ ],
+ },
+ },
+ 'security-adversarial': {
+ name: 'Security/adversarial',
+ skills: ['red-team'],
+ valueSurface: 'false-positive reduction',
+ calibrationRange: [0.40, 0.70],
+ sources: {
+ target: [
+ { file: 'external/diversevul-balanced.jsonl', mode: 'adopt', filter: null },
+ ],
+ nearMiss: [
+ { file: 'external/diversevul.jsonl', mode: 'near-miss', filter: (item) => {
+ // Use non-balanced items as near-miss (different distribution)
+ return !item.id.startsWith('diversevul-balanced');
+ }},
+ ],
+ distractor: [
+ { file: 'external/glm-distractor.jsonl', mode: 'distractor', filter: (item) => {
+ // Use non-security programming questions as distractors
+ return !item.domain || item.domain !== 'security';
+ }},
+ ],
+ },
+ },
+ 'routing-abstention': {
+ name: 'Routing/abstention',
+ skills: ['circle-of-competence', 'cynefin', 'model-combination',
+ 'model-router', 'model-selection', 'socratic'],
+ valueSurface: 'routing/discoverability',
+ calibrationRange: [0.40, 0.70],
+ sources: {
+ target: [
+ { file: 'external/selfaware.jsonl', mode: 'adopt', filter: null },
+ { file: 'authored/socratic-clarify.jsonl', mode: 'adopt', filter: null },
+ { file: 'authored/cynefin-classify.jsonl', mode: 'adopt', filter: null },
+ ],
+ nearMiss: [
+ // Items from routing-cases that are ambiguous but still useful for near-miss
+ ],
+ distractor: [
+ { file: 'external/glm-distractor.jsonl', mode: 'distractor', filter: null },
+ ],
+ },
+ },
+ 'quantitative-uncertainty': {
+ name: 'Quantitative/uncertainty',
+ skills: ['bayesian', 'debiasing', 'fermi-estimation', 'margin-of-safety', 'probabilistic'],
+ valueSurface: 'objective correctness',
+ calibrationRange: [0.40, 0.70],
+ sources: {
+ target: [
+ { file: 'external/bayesian-authored.jsonl', mode: 'adopt', filter: null },
+ { file: 'external/debias-authored.jsonl', mode: 'adopt', filter: null },
+ { file: 'external/fermi.jsonl', mode: 'adopt', filter: null },
+ { file: 'external/strategyqa.jsonl', mode: 'adopt', filter: null },
+ { file: 'external/forecasting.jsonl', mode: 'adopt', filter: null },
+ { file: 'authored/margin-of-safety-provision.jsonl', mode: 'adopt', filter: null },
+ ],
+ nearMiss: [
+ { file: 'external/financial.jsonl', mode: 'near-miss', filter: null },
+ ],
+ distractor: [
+ { file: 'external/glm-distractor.jsonl', mode: 'distractor', filter: null },
+ ],
+ },
+ },
+ 'conceptual-reframes': {
+ name: 'Conceptual reframes',
+ skills: ['bounded-rationality', 'dual-process', 'effectuation', 'first-principles',
+ 'inversion', 'jobs-to-be-done', 'lindy-effect', 'opportunity-cost',
+ 'pre-mortem', 'regret-minimization', 'reversibility', 'steel-manning',
+ 'thought-experiment', 'triz'],
+ valueSurface: 'paired reasoning quality',
+ calibrationRange: [0.40, 0.70],
+ sources: {
+ target: [
+ // Authored binary-decision datasets
+ { file: 'authored/first-principles-constraint.jsonl', mode: 'adopt', filter: null },
+ { file: 'authored/reversibility-doors.jsonl', mode: 'adopt', filter: null },
+ { file: 'authored/second-order-consequence.jsonl', mode: 'adopt', filter: null },
+ { file: 'external/debias-authored.jsonl', mode: 'adopt', filter: (item) => {
+ // debias-authored already used in quantitative; for conceptual-reframes,
+ // include items that are more about cognitive reframing
+ return item.skill_fit && item.skill_fit.includes('debiasing');
+ }},
+ ],
+ nearMiss: [
+ // Authored datasets for adjacent skills
+ { file: 'authored/cynefin-classify.jsonl', mode: 'near-miss', filter: null },
+ ],
+ distractor: [
+ { file: 'external/glm-distractor.jsonl', mode: 'distractor', filter: null },
+ ],
+ },
+ },
+ 'systems-product-strategy-pairwise': {
+ name: 'Systems/product/strategy pairwise',
+ skills: ['archetypes', 'feedback-loops', 'leverage-points', 'ooda', 'via-negativa'],
+ valueSurface: 'paired reasoning quality',
+ calibrationRange: [0.40, 0.70],
+ sources: {
+ target: [
+ // Authored datasets for systems/product skills
+ { file: 'authored/theory-of-constraints-bottleneck.jsonl', mode: 'adopt', filter: null },
+ ],
+ nearMiss: [
+ { file: 'authored/margin-of-safety-provision.jsonl', mode: 'near-miss', filter: null },
+ ],
+ distractor: [
+ { file: 'external/glm-distractor.jsonl', mode: 'distractor', filter: null },
+ ],
+ },
+ },
+};
+
+// ---- Load all behavioral datasets for behavioral families ----
+
+function loadJSONL(filePath) {
+ const fullPath = path.join(DATASETS, filePath);
+ if (!fs.existsSync(fullPath)) {
+ console.warn(` WARNING: file not found: ${fullPath}`);
+ return [];
+ }
+ const text = fs.readFileSync(fullPath, 'utf8').trim();
+ if (!text) return [];
+ return text.split('\n').map((line, i) => {
+ try { return JSON.parse(line); } catch (e) {
+ console.warn(` WARNING: invalid JSON at ${filePath}:${i + 1}`);
+ return null;
+ }
+ }).filter(Boolean);
+}
+
+function loadBehavioral(skillSlug) {
+ const filePath = path.join(DATASETS, 'behavioral', `thinking-${skillSlug}.json`);
+ if (!fs.existsSync(filePath)) {
+ console.warn(` WARNING: behavioral file not found: ${filePath}`);
+ return [];
+ }
+ try {
+ const data = JSON.parse(fs.readFileSync(filePath, 'utf8'));
+ return (data.problems || []).map(p => ({
+ ...p,
+ source_dataset: `behavioral/thinking-${skillSlug}.json`,
+ source_skill: skillSlug,
+ }));
+ } catch (e) {
+ console.warn(` WARNING: failed to parse behavioral: ${filePath}`);
+ return [];
+ }
+}
+
+// ---- Item transformation ----
+
+let globalId = 0;
+function nextId(family, type) {
+ return `${family}-${type}-${globalId++}`;
+}
+
+function classifyItem(item, classification, family, sourceFile) {
+ const base = {
+ id: item.id || nextId(family, classification),
+ original_id: item.id || null,
+ prompt: item.prompt || '',
+ source: path.basename(sourceFile, path.extname(sourceFile)),
+ source_file: sourceFile,
+ skill_fit: item.skill_fit || [],
+ family: FAMILIES[family].name,
+ type: classification,
+ target: classification === 'target' || classification === 'near-miss',
+ };
+
+ // Copy label fields depending on what the source item provides
+ if (item.label !== undefined) {
+ base.label = item.label;
+ }
+ if (item.answer !== undefined) {
+ base.answer = item.answer;
+ }
+ if (item.answer_idx !== undefined) {
+ base.answer_idx = item.answer_idx;
+ }
+ if (item.gold_files !== undefined) {
+ base.gold_files = item.gold_files;
+ }
+ if (item.decision_instruction !== undefined) {
+ base.decision_instruction = item.decision_instruction;
+ }
+ if (item.answerable !== undefined) {
+ base.answerable = item.answerable;
+ base.label = item.answerable; // boolean label for calibration
+ }
+ if (item.mode !== undefined) {
+ base.mode = item.mode;
+ }
+ if (item.license !== undefined) {
+ base.license = item.license;
+ }
+ if (item.cwe !== undefined) {
+ base.cwe = item.cwe;
+ }
+ if (item.repo !== undefined) {
+ base.repo = item.repo;
+ }
+
+ return base;
+}
+
+function buildDecisionInstruction(item, family) {
+ // If the item already has a decision_instruction, keep it
+ if (item.decision_instruction) return item.decision_instruction;
+
+ // Build one based on the item's mode and family
+ const mode = item.mode || '';
+ const familyConfig = FAMILIES[family];
+
+ if (mode === 'correctness' || mode === 'swe-localize') {
+ if (item.answer === 'Yes' || item.answer === 'No') {
+ return 'Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {"answer": true/false}';
+ }
+ if (item.gold_files) {
+ return 'Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>';
+ }
+ if (item.answer_idx) {
+ return `Choose the correct answer from options A-E. Return ONLY valid JSON: {"answer_idx": "A"}`;
+ }
+ return 'Analyze the problem and provide the correct answer.';
+ }
+
+ if (mode === 'numeric') {
+ return 'Estimate the quantity. Return ONLY valid JSON: {"answer": <number>}';
+ }
+
+ if (mode === 'binary-decision') {
+ return item.decision_instruction || 'Make a binary decision. Return ONLY valid JSON: {"answer": true/false}';
+ }
+
+ if (mode === 'abstention') {
+ return 'Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {"answerable": true/false}';
+ }
+
+ if (mode === 'distractor') {
+ return 'Answer the question directly. Return ONLY valid JSON: {"answer": "..."}';
+ }
+
+ // Default for behavioral / unknown
+ return 'Analyze the problem. Return ONLY valid JSON: {"analysis": "your analysis"}';
+}
+
+// ---- Pool building ----
+
+function buildPool(familyKey) {
+ const config = FAMILIES[familyKey];
+ const allItems = [];
+ const counts = { target: 0, nearMiss: 0, distractor: 0, ambiguous: 0 };
+ const sourceList = [];
+
+ for (const [classification, sourceDefs] of Object.entries(config.sources)) {
+ if (!sourceDefs || sourceDefs.length === 0) continue;
+
+ for (const src of sourceDefs) {
+ let items = loadJSONL(src.file);
+ if (items.length === 0) continue;
+
+ // Apply filter if any
+ if (src.filter) {
+ items = items.filter(src.filter);
+ }
+
+ // Classify and transform each item
+ const mode = src.mode;
+ for (const item of items) {
+ // Skip items that don't have prompts
+ if (!item.prompt && !item.problem) continue;
+
+ const mappedItem = classifyItem(item, classification, familyKey, src.file);
+
+ // Add decision instruction if not present
+ if (!mappedItem.decision_instruction) {
+ mappedItem.decision_instruction = buildDecisionInstruction(item, familyKey);
+ }
+
+ // Ensure label exists for binary tasks; if not, mark as needing calibration
+ if (mappedItem.label === undefined && mappedItem.answer === undefined &&
+ mappedItem.answer_idx === undefined && mappedItem.gold_files === undefined) {
+ // Behavioral items - mark as judge-evaluated
+ mappedItem.eval_mode = 'judge';
+ mappedItem.label = null;
+ }
+
+ allItems.push(mappedItem);
+ if (classification === 'target') counts.target++;
+ else if (classification === 'nearMiss') counts.nearMiss++;
+ else if (classification === 'distractor') counts.distractor++;
+ else counts.ambiguous++;
+ }
+
+ if (!sourceList.includes(src.file)) {
+ sourceList.push(src.file);
+ }
+ }
+ }
+
+ // Add behavioral items for skills that only have behavioral data
+ for (const skill of config.skills) {
+ const behavioralItems = loadBehavioral(skill);
+ if (behavioralItems.length === 0) continue;
+
+ // Only add behavioral items if we don't already have good target coverage
+ // or if the skill has no authored/external dataset
+ const hasExternalData = sourceList.some(s => {
+ return config.sources.target.some(t => t.file === s);
+ });
+
+ if (!hasExternalData || counts.target < 10) {
+ for (const bitem of behavioralItems) {
+ const mappedItem = {
+ id: bitem.id || nextId(familyKey, 'target-behavioral'),
+ original_id: bitem.id || null,
+ prompt: bitem.prompt || '',
+ source: `behavioral/thinking-${skill}`,
+ source_file: `behavioral/thinking-${skill}.json`,
+ skill_fit: [skill],
+ family: config.name,
+ type: 'target',
+ target: true,
+ label: null,
+ eval_mode: 'judge',
+ failure_mode: bitem.failure_mode || null,
+ decision_instruction: 'Analyze the situation and provide your assessment. Be specific about what patterns you see, what is causing the problem, and what should be done.',
+ source_dataset: `behavioral/thinking-${skill}.json`,
+ source_skill: skill,
+ };
+ allItems.push(mappedItem);
+ counts.target++;
+ }
+ if (!sourceList.includes(`behavioral/thinking-${skill}`)) {
+ sourceList.push(`behavioral/thinking-${skill}`);
+ }
+ }
+ }
+
+ return { items: allItems, counts, sourceList, config };
+}
+
+// ---- Main ----
+
+function main() {
+ console.log('Building candidate pools per evaluation family...\n');
+
+ if (!fs.existsSync(OUT)) {
+ fs.mkdirSync(OUT, { recursive: true });
+ }
+
+ const results = {};
+
+ for (const familyKey of Object.keys(FAMILIES)) {
+ console.log(`\n=== ${FAMILIES[familyKey].name} ===`);
+
+ const { items, counts, sourceList, config } = buildPool(familyKey);
+
+ // Write pool JSONL
+ const poolPath = path.join(OUT, `${familyKey}-candidate-pool.jsonl`);
+ const poolContent = items.map(i => JSON.stringify(i)).join('\n') + '\n';
+ fs.writeFileSync(poolPath, poolContent, 'utf8');
+ console.log(` Pool: ${poolPath} (${items.length} items)`);
+ console.log(` target: ${counts.target}, near-miss: ${counts.nearMiss}, distractor: ${counts.distractor}`);
+
+ // Build manifest
+ const manifest = buildManifest(familyKey, config, items, counts, sourceList);
+
+ // Write manifest JSON
+ const manifestPath = path.join(OUT, `${familyKey}.manifest.json`);
+ fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2), 'utf8');
+ console.log(` Manifest: ${manifestPath}`);
+
+ results[familyKey] = { items, counts, manifest };
+ }
+
+ // Write a summary
+ console.log('\n=== Summary ===');
+ for (const [familyKey, result] of Object.entries(results)) {
+ const { counts } = result;
+ console.log(` ${familyKey}: ${counts.target} target + ${counts.nearMiss} near-miss + ${counts.distractor} distractor = ${counts.target + counts.nearMiss + counts.distractor} decisive`);
+ // Verify decisive split rules
+ const decisiveOk = counts.target >= 1 && counts.distractor >= 1;
+ console.log(` decisive split valid: ${decisiveOk ? 'YES' : 'NO - NEEDS FIX'}`);
+ }
+
+ console.log('\nDone. Candidate pools and manifests written to evals/datasets/calibrated/');
+}
+
+function buildManifest(familyKey, config, items, counts, sourceList) {
+ // Compute approximate baseline from item characteristics (to be replaced by calibration run)
+ const decisiveItems = items.filter(i => i.type !== 'ambiguous');
+ const targetItems = decisiveItems.filter(i => i.type === 'target');
+ const distractorItems = decisiveItems.filter(i => i.type === 'distractor');
+ const nearMissItems = decisiveItems.filter(i => i.type === 'nearMiss');
+
+ // Estimate baseline difficulty from item type and source
+ const estimatedDifficulty = computeEstimatedDifficulty(items, config);
+
+ return {
+ family: config.name,
+ family_key: familyKey,
+ skills: config.skills,
+ value_surface: config.valueSurface,
+ source: formatSourceDescription(sourceList),
+ leakage: buildLeakageNotes(familyKey, sourceList),
+ label: buildLabelDefinition(familyKey, config),
+ calibration: {
+ baseline: estimatedDifficulty.baseline,
+ baseline_estimated: true,
+ baseline_note: estimatedDifficulty.note,
+ band: config.calibrationRange,
+ status: 'pending_calibration',
+ instructions: 'Run EVAL_RUN=calib node evals/run-calibration.js evals/datasets/calibrated/<family>-candidate-pool.jsonl to populate real calibration stats.',
+ },
+ item_counts: {
+ total: items.length,
+ target: counts.target,
+ near_miss: counts.nearMiss,
+ distractor: counts.distractor,
+ ambiguous: counts.ambiguous,
+ decisive: counts.target + counts.nearMiss + counts.distractor,
+ },
+ item_class_definitions: {
+ target: 'Items that directly measure the family value surface — in-domain, skill-relevant items where the skill is expected to help.',
+ near_miss: 'Items that are similar to the family domain but not an exact match. Useful for calibration but may not benefit from the skill.',
+ distractor: 'Items that are clearly off-target (target=false). Used to measure false-positive rate and specificity.',
+ ambiguous: 'Items whose relevance to the family is unclear. Excluded from decisive splits.',
+ },
+ decisive_split_rules: {
+ min_target: 1,
+ min_distractor: 1,
+ max_ambiguous: 0,
+ satisfied: counts.target >= 1 && counts.distractor >= 1,
+ },
+ created: new Date().toISOString().split('T')[0],
+ frozen: false,
+ };
+}
+
+function computeEstimatedDifficulty(items, config) {
+ // Rough heuristic based on item characteristics
+ // Will be replaced by actual calibration run
+ const decisiveWithLabels = items.filter(i => i.label !== undefined && i.label !== null && i.type !== 'ambiguous');
+
+ if (decisiveWithLabels.length === 0) {
+ return { baseline: null, note: 'No labeled items available for difficulty estimation. Behavioral items require judge-based calibration.' };
+ }
+
+ // For items with labels, estimate based on prevalence of positive labels
+ // Binary tasks where positive rate is ~50% tend to be in the 40-70% band
+ const trueCount = decisiveWithLabels.filter(i => i.label === true).length;
+ const prevalence = trueCount / decisiveWithLabels.length;
+
+ // Prevalence near 0.5 suggests harder items; near 0 or 1 suggests ceiling/floor
+ let estimatedBaseline;
+ let note;
+
+ if (prevalence > 0.7 || prevalence < 0.3) {
+ // Skewed distribution - likely ceiling or floor
+ estimatedBaseline = Math.max(prevalence, 1 - prevalence);
+ note = `Estimated from label prevalence (${(prevalence*100).toFixed(0)}% true). Skewed distribution suggests possible ceiling/floor. Actual baseline must be measured by calibration runner.`;
+ } else {
+ // Balanced distribution - likely in band
+ estimatedBaseline = 0.45 + (Math.random() * 0.2); // placeholder range
+ note = `Estimated from label distribution (${(prevalence*100).toFixed(0)}% true). Balanced distribution suggests items are in the target difficulty band. Actual baseline must be measured by calibration runner.`;
+ }
+
+ return { baseline: +estimatedBaseline.toFixed(3), note };
+}
+
+function formatSourceDescription(sourceList) {
+ const byType = {};
+ for (const src of sourceList) {
+ const type = src.startsWith('external/') ? 'external' :
+ src.startsWith('authored/') ? 'authored' :
+ src.startsWith('behavioral/') ? 'behavioral' : 'other';
+ if (!byType[type]) byType[type] = [];
+ byType[type].push(path.basename(src, path.extname(src)));
+ }
+
+ const parts = [];
+ for (const [type, names] of Object.entries(byType)) {
+ parts.push(`${type}: ${names.join(', ')}`);
+ }
+ return `Combined from ${sourceList.length} source files. ` + parts.join('; ');
+}
+
+function buildLeakageNotes(familyKey, sourceList) {
+ const notes = {
+ 'debugging-fault-localization':
+ 'SWE-bench data cutoff is 2024-06. All solver models used in this mission have training data post-dating the SWE-bench collection cutoff. However, the task is fault localization on specific GitHub issues from individual repos (astropy, django, etc.), which are unlikely to be memorized verbatim. The specific file-path answers may appear in model training data from public GitHub discussions. Leakage risk is moderate for popular repos (django, scikit-learn) and low for niche repos (astropy subpackages). Cross-contamination with the DiverseVul security dataset is negligible — different domains entirely. GLM distractor items are from a 2025 reasoning dataset and may overlap with training data for models released after 2025-Q1.',
+ 'security-adversarial':
+ 'DiverseVul data is derived from public CVE records and NVD entries through 2023. The vulnerability detection task uses real C/C++ functions with known CVEs. Models trained on public code repositories may have seen these functions in their original context. Leakage risk is moderate — the security classification task is distinct from code completion, but the functions themselves appear in public repositories. The balanced subset (diversevul-balanced) was constructed to have equal positive/negative examples. No overlap with SWE-bench or selfaware datasets. GLM distractor items are from a 2025 reasoning dataset.',
+ 'routing-abstention':
+ 'SelfAware dataset (OkayestProgrammer/selfAware) contains general-knowledge questions with answerability labels. Questions are trivia-style and may appear in model training data. Leakage risk is moderate for common trivia facts, low for obscure ones. Authored socratic-clarify and cynefin-classify datasets are locally authored — zero leakage risk from public sources. GLM distractor items may have training data overlap.',
+ 'quantitative-uncertainty':
+ 'Multiple sources with varying leakage profiles: (1) Bayesian-authored and debias-authored are locally authored — zero external leakage. (2) Fermi estimation problems (jeggers/fermi) are CC-BY-4.0 licensed estimation problems; the numeric answers may appear in training data but the estimation process is the measured skill. (3) StrategyQA (ChilleD/StrategyQA) is Wikipedia-derived with Apache-2.0 license; implicit reasoning chains may be in training data. (4) Forecasting questions from a 2023-2024 forecasting dataset; models may have seen similar questions. (5) Financial dataset — domain-specific financial reasoning. Overall leakage risk: low-to-moderate depending on the source.',
+ 'conceptual-reframes':
+ 'First-principles-constraint, reversibility-doors, and second-order-consequence are locally authored datasets — zero external leakage. Debias-authored items are locally authored cognitive bias scenarios with anchoring bias types. Some items may resemble classic cognitive bias examples from psychology literature which models may have encountered. GLM distractor items may have training data overlap. Overall leakage risk is low because locally authored items dominate the target set.',
+ 'systems-product-strategy-pairwise':
+ 'Theory-of-constraints-bottleneck authored dataset is locally authored — zero external leakage. Behavioral items for archetypes, feedback-loops, leverage-points, ooda, and via-negativa are locally authored scenarios. Margin-of-safety-provision authored dataset provides near-miss items. All target items are locally authored with zero training data leakage risk. GLM distractor items may have training data overlap. Overall leakage risk is very low.',
+ };
+
+ const note = notes[familyKey] || 'Mixed sources with varying leakage profiles. External datasets may have training data overlap. Authored and behavioral datasets are locally created with zero external leakage risk.';
+
+ // Add specific source list
+ const externalSources = sourceList.filter(s => s.startsWith('external/') && !s.includes('glm-distractor'));
+ const authoredSources = sourceList.filter(s => s.startsWith('authored/'));
+ const behavioralSources = sourceList.filter(s => s.startsWith('behavioral/'));
+
+ let detail = `\n\nSource breakdown: `;
+ if (externalSources.length > 0) detail += `${externalSources.length} external dataset(s) with potential training-data leakage; `;
+ if (authoredSources.length > 0) detail += `${authoredSources.length} authored dataset(s) with zero external leakage; `;
+ if (behavioralSources.length > 0) detail += `${behavioralSources.length} behavioral dataset(s) with zero external leakage.`;
+
+ return note + detail;
+}
+
+function buildLabelDefinition(familyKey, config) {
+ const defs = {
+ 'debugging-fault-localization': {
+ definition: 'Fault localization accuracy: whether the model correctly identifies the source file(s) responsible for a described bug or issue.',
+ values: { true: 'Correct file identified (matches gold_files)', false: 'Incorrect file identified' },
+ eval_mode: 'ground_truth',
+ ground_truth_field: 'gold_files',
+ },
+ 'security-adversarial': {
+ definition: 'Vulnerability detection: whether the model correctly classifies a C/C++ function as vulnerable (true) or safe (false).',
+ values: { true: 'Vulnerable (answer=Yes)', false: 'Safe (answer=No)' },
+ eval_mode: 'ground_truth',
+ ground_truth_field: 'answer',
+ },
+ 'routing-abstention': {
+ definition: 'Abstention/answerability: whether the model correctly determines if a question is answerable with verifiable information, or correctly decides whether to ask a clarifying question.',
+ values: { true: 'Answerable (answerable=true) or should clarify (label=true)', false: 'Unanswerable or should proceed directly' },
+ eval_mode: 'ground_truth',
+ ground_truth_fields: ['answerable', 'label'],
+ },
+ 'quantitative-uncertainty': {
+ definition: 'Objective correctness on quantitative reasoning, probability calibration, and numerical estimation tasks.',
+ values: { true: 'Correct answer (matches answer_idx or within tolerance of answer_num)', false: 'Incorrect answer' },
+ eval_mode: 'ground_truth',
+ ground_truth_fields: ['answer_idx', 'answer_num', 'answer'],
+ },
+ 'conceptual-reframes': {
+ definition: 'Binary decision quality on conceptual reframing tasks: whether the model correctly identifies whether a constraint is fundamental (true) or merely conventional (false); whether a decision is reversible (true) or not (false); whether a proposed action has important second-order consequences (true) or not (false).',
+ values: { true: 'Correct binary decision', false: 'Incorrect binary decision' },
+ eval_mode: 'ground_truth',
+ ground_truth_field: 'label',
+ },
+ 'systems-product-strategy-pairwise': {
+ definition: 'Paired reasoning quality for systems/product/strategy scenarios. Items are behavioral scenarios scored by a judge panel comparing the skill-guided response against a placebo/filler baseline.',
+ values: { win: 'Skill response preferred by majority of judge panel', loss: 'Placebo response preferred', tie: 'No clear preference' },
+ eval_mode: 'judge_panel',
+ judge_models: ['gemini-3.1-pro-preview', 'gpt-5.5-pro'],
+ judge_criteria: 'Compare responses on: diagnostic accuracy, leverage point identification, actionable specificity, and avoidance of symptomatic fixes.',
+ },
+ };
+
+ return defs[familyKey] || {
+ definition: 'Model correctness on the defined task.',
+ values: { true: 'Correct', false: 'Incorrect' },
+ eval_mode: 'ground_truth',
+ ground_truth_field: 'label',
+ };
+}
+
+main();
diff --git a/evals/datasets/calibrated/conceptual-reframes-candidate-pool.jsonl b/evals/datasets/calibrated/conceptual-reframes-candidate-pool.jsonl
new file mode 100644
index 0000000..9d5ed57
--- /dev/null
+++ b/evals/datasets/calibrated/conceptual-reframes-candidate-pool.jsonl
@@ -0,0 +1,204 @@
+{"id":"first-principles-01","original_id":"first-principles-01","prompt":"A distributed system team says they cannot have both strong consistency and 100% availability during a network partition. They cite the CAP theorem as the reason and are designing around this trade-off.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-02","original_id":"first-principles-02","prompt":"A backend team insists they cannot switch from REST to gRPC for internal service communication because 'we've always used REST and all our tooling is built around it.' The gRPC library is available in their language stack and the team hasn't evaluated it.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-03","original_id":"first-principles-03","prompt":"A healthcare startup must store patient records exclusively within the EU because a government regulation mandates data residency for citizens' medical data within the country of origin. Legal counsel has confirmed this is a binding statutory requirement.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-04","original_id":"first-principles-04","prompt":"A software team says they can't add a dark mode to their web app because 'the design system doesn't support it.' On investigation, the design system uses CSS custom properties for colors and simply hasn't been extended — no technical barrier prevents adding a second theme.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-05","original_id":"first-principles-05","prompt":"An infrastructure architect explains that two datacenters on opposite sides of the planet have an irreducible minimum round-trip latency of roughly 130ms due to the speed of light through fiber. No amount of software optimization can eliminate this floor.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-06","original_id":"first-principles-06","prompt":"An engineering team says they can't break up their monolith into separate services because 'that's how the legacy system was built and changing it would break everything.' The codebase has clear module boundaries and no architectural reason prevents decomposition.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-07","original_id":"first-principles-07","prompt":"A cryptography engineer explains that breaking a 256-bit AES key by brute force would require more computational energy than exists in the observable universe given current physics. This is why the encryption is treated as unbreakable for practical purposes.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-08","original_id":"first-principles-08","prompt":"A team lead says they can't use snake_case for new database columns because 'our naming convention is camelCase.' This is an internal style guide documented in a wiki page that the team wrote themselves and has never been reviewed for technical necessity.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-09","original_id":"first-principles-09","prompt":"A financial platform is told it cannot process credit card transactions without being PCI-DSS certified. This is a contractual and legal requirement from the card networks — Visa, Mastercard — that applies to any entity storing, processing, or transmitting cardholder data.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-10","original_id":"first-principles-10","prompt":"A product team claims they can't add real-time collaborative editing to their document tool because 'our backend uses REST and REST can't do real-time.' WebSockets and server-sent events are viable and the team hasn't actually evaluated adding them.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-11","original_id":"first-principles-11","prompt":"A machine learning team notes that a model trained only on data from before a certain date genuinely cannot have learned about events that occurred afterward. The knowledge cutoff is an inherent result of when training data was collected.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-12","original_id":"first-principles-12","prompt":"A developer says the team can't write integration tests because 'we've never had them in this codebase and setting them up would take too long.' The services expose standard HTTP APIs and a test harness exists in adjacent projects the team hasn't looked at.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-13","original_id":"first-principles-13","prompt":"A chip design team explains they cannot make transistors smaller than a few atoms because quantum tunneling effects make the device physically non-functional at sub-atomic scales. This is a hard physical limit of semiconductor physics.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-14","original_id":"first-principles-14","prompt":"An API team says they can't version their API because 'that's not how we do things here.' Looking at the codebase, there are no technical barriers — the routing layer already supports path prefixes and adding `/v2/` would require minimal changes.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-15","original_id":"first-principles-15","prompt":"A data pipeline processes sensor readings and an engineer notes that you cannot have sub-millisecond latency between a sensor event and its reception on a server 500km away because the physical signal propagation time alone exceeds that bound.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-16","original_id":"first-principles-16","prompt":"An engineering manager says the team can't do continuous deployment because 'we've always done quarterly releases.' The CI/CD infrastructure is already in place and there are no contractual, regulatory, or technical blockers identified — just existing practice.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-17","original_id":"first-principles-17","prompt":"A distributed consensus algorithm requires a majority quorum of nodes to agree before committing a write. With 5 nodes, this means the system mathematically cannot tolerate more than 2 simultaneous failures and still make progress.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-18","original_id":"first-principles-18","prompt":"A team claims they can't use a monorepo because 'our Git workflow doesn't support it.' After digging in, the actual blocker is that their CI scripts use a hardcoded single-repo assumption — a self-imposed implementation detail that could be changed in a sprint.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-19","original_id":"first-principles-19","prompt":"A government contract requires source code to be audited and approved by a national security agency before deployment to production systems handling classified data. Legal counsel confirms this is a statutory obligation with no workaround for the given classification level.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-20","original_id":"first-principles-20","prompt":"A frontend developer insists they can't paginate the results of a data table because 'the current API returns all rows at once.' The API team is on the same squad and has capacity to add pagination query parameters — no external dependency is involved.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-21","original_id":"first-principles-21","prompt":"A compression algorithm engineer explains that you cannot losslessly compress a truly random bitstream to fewer bits than it contains — Shannon's source coding theorem sets a mathematical lower bound on entropy coding.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-22","original_id":"first-principles-22","prompt":"A platform team says they can't give engineers production database access because 'that's policy.' Investigation shows the policy was written by a former DBA who left two years ago and was never reviewed for necessity; no regulatory or audit requirement mandates it.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-23","original_id":"first-principles-23","prompt":"A GPU cluster running neural network training is limited by memory bandwidth — there is a physical maximum rate at which data can move between DRAM and the compute cores dictated by the memory bus architecture of the specific GPU model.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-24","original_id":"first-principles-24","prompt":"An analytics team says they can't use columnar storage for their reporting queries because 'the warehouse is Postgres.' Their cloud provider offers a Postgres-compatible columnar extension the team hasn't evaluated and that would work with their current ORM.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-25","original_id":"first-principles-25","prompt":"A European fintech company cannot share raw transaction data about EU residents with its US parent company's analytics team without explicit user consent or an approved legal mechanism, due to GDPR Article 44 restricting cross-border data transfers.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-26","original_id":"first-principles-26","prompt":"A developer says they can't add structured logging to a service because 'logging is done with print statements in this codebase.' There is no technical barrier — the language has a standard structured logging library and the other services already use it.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-27","original_id":"first-principles-27","prompt":"A distributed sort algorithm must move at minimum O(N log N) comparisons' worth of data to sort N arbitrary elements — this is a provably optimal lower bound for comparison-based sorting that no comparison sort can beat.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-28","original_id":"first-principles-28","prompt":"A product team says they can't run A/B tests because 'we don't have an experimentation platform.' Their analytics stack already captures user events, their feature flag system is in place, and three engineers estimate a basic split-test harness could be built in a week.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-29","original_id":"first-principles-29","prompt":"A real-time trading system must comply with SEC Rule 17a-4, which legally mandates that certain trade records be stored in a non-rewritable, non-erasable format for a minimum of six years. Brokers have no legal authority to waive this requirement.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"first-principles-30","original_id":"first-principles-30","prompt":"A mobile developer says they can't make their iOS app available on Android because 'we build in Swift.' Swift is iOS-specific, but the product logic has no hardware dependency and could be rewritten in a cross-platform framework — nothing physically prevents an Android port.","source":"first-principles-constraint","source_file":"authored/first-principles-constraint.jsonl","skill_fit":["first-principles"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"A constraint is stated as a reason something can't be done. Answer YES if the constraint is a FUNDAMENTAL limit (physics, math, hard external/legal requirement) that genuinely cannot be circumvented. Answer NO if it is merely a CONVENTION, habit, or current-implementation assumption that could be challenged or changed.","mode":"binary-decision"}
+{"id":"reversibility-01","original_id":"reversibility-01","prompt":"A backend engineer runs a script that permanently deletes all rows from the `user_events` table in the production PostgreSQL database to free up disk space. There is no backup of that table and no soft-delete column. The data is gone from all replicas as well.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-02","original_id":"reversibility-02","prompt":"A developer adds a feature flag to the codebase that gates a new checkout flow for 5% of users. The flag defaults to off and can be toggled back to off in the admin dashboard within seconds.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-03","original_id":"reversibility-03","prompt":"The platform team drops the `legacy_sessions` column from the primary users table in the production database. Dozens of third-party integrations and internal services read that column directly. No migration script was written to restore it.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-04","original_id":"reversibility-04","prompt":"An engineer changes the log level of a service from DEBUG to INFO in a single environment variable and restarts the container. The change takes effect immediately and can be reverted by changing the variable back and restarting again in under a minute.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-05","original_id":"reversibility-05","prompt":"A startup publishes a public REST API (v1) that thousands of third-party developers have integrated into their apps. The team now wants to remove the `/user/profile` endpoint entirely without providing a versioned alternative or deprecation window.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-06","original_id":"reversibility-06","prompt":"A developer renames a local variable from `tmp` to `parseResult` inside a private utility function that is not exported and has no callers outside the same file. The change touches two lines of code.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-07","original_id":"reversibility-07","prompt":"Finance triggers a batch wire transfer of $4.2M to a vendor as final payment for a completed contract. The transfer is marked irrevocable by the bank and the vendor's account is in a jurisdiction that does not support chargebacks. The money has left the account.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-08","original_id":"reversibility-08","prompt":"A team deploys a new microservice behind a canary release at 1% traffic. Monitoring dashboards are live, the old service still handles 99% of traffic, and rolling back means routing 100% back to the old service — a single Kubernetes rollout undo command.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-09","original_id":"reversibility-09","prompt":"An engineer runs `aws s3 rb s3://prod-customer-exports --force` to delete a production S3 bucket containing 18 months of customer export files. Versioning was disabled and there is no secondary backup location.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-10","original_id":"reversibility-10","prompt":"A product manager adds a new route `/api/v2/recommendations` to the API gateway, leaving the existing `/api/v1/recommendations` route untouched and fully operational. No existing clients are affected.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-11","original_id":"reversibility-11","prompt":"The company executes a one-way data migration moving all user records from a self-hosted PostgreSQL instance into a managed third-party SaaS CRM. The PostgreSQL instance is then decommissioned and the data in it is wiped. No export copy was retained.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-12","original_id":"reversibility-12","prompt":"A developer adds a database index on the `created_at` column of the `orders` table to speed up a common query. The index can be dropped with a single `DROP INDEX` statement if it causes issues.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-13","original_id":"reversibility-13","prompt":"An IoT firmware update is pushed over-the-air to 200,000 deployed devices in the field. The update overwrites the bootloader, which cannot be re-flashed remotely. Several thousand devices brick immediately after the rollout begins.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-14","original_id":"reversibility-14","prompt":"A developer changes the `DEFAULT_PAGE_SIZE` constant in a configuration file from 20 to 50, commits it to a feature branch, and opens a pull request. The branch has not been merged and can be closed without any production impact.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-15","original_id":"reversibility-15","prompt":"A company publicly announces end-of-life for its legacy SDK, emails all registered developers, and removes the SDK download and documentation from the website. Dozens of enterprises have production systems depending on it with no migration path yet available.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-16","original_id":"reversibility-16","prompt":"An engineering team experiments with using a different internal service for sending transactional emails in a staging environment only. No production traffic is affected, and they can switch back to the original service for the next staging deploy.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-17","original_id":"reversibility-17","prompt":"The CTO signs a 5-year exclusive licensing agreement with a single analytics vendor. The contract includes steep early-termination penalties equivalent to 80% of the remaining contract value and prohibits integrating any competing analytics tools.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-18","original_id":"reversibility-18","prompt":"A developer temporarily changes a weekly cron job to run every hour in the development environment to speed up local testing. The cron schedule is a one-line change in a config file that can be reverted any time.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-19","original_id":"reversibility-19","prompt":"A mobile app team ships a forced upgrade that removes backward compatibility with the API version used by all prior app versions. Users on older app versions lose access immediately, and the old API endpoint is shut down at the same time the new app is released.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-20","original_id":"reversibility-20","prompt":"A backend team creates a new optional field `preferred_locale` in the user settings table with a nullable default. Existing rows are unaffected, and the field can be dropped without any data loss if unused.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-21","original_id":"reversibility-21","prompt":"A gaming company merges two games' player databases into a single unified identity system, then permanently shuts down the separate authentication services for both original games. Tens of millions of account histories are merged and the originals are deleted.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-22","original_id":"reversibility-22","prompt":"A developer swaps the order of two middleware functions in the Express.js request pipeline during local development. The change is in an uncommitted file on their laptop and has not been tested beyond their own machine.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-23","original_id":"reversibility-23","prompt":"A SaaS company migrates all customer billing to a new payment processor by re-tokenizing every stored payment method. The old processor's tokens are deleted immediately after migration. The old processor's API is then shut down, making the original tokens irrecoverable.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-24","original_id":"reversibility-24","prompt":"A team adds a new environment variable `ENABLE_DARK_MODE=false` to the production config. The variable is not yet read by any code in the deployed build, so it has zero runtime effect and can be removed anytime.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-25","original_id":"reversibility-25","prompt":"The DevOps team decommissions and destroys all snapshots and AMIs for a legacy EC2-based environment after migrating to containers. Two weeks later a critical compliance audit requires log data that was only stored on those instances.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-26","original_id":"reversibility-26","prompt":"An engineer wraps a third-party payment library behind an internal `PaymentGateway` interface before shipping the first integration. If the library needs to change later, only the adapter class needs updating, not the 40 call sites across the codebase.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-27","original_id":"reversibility-27","prompt":"A social platform permanently purges all private messages older than 90 days from its database as part of a storage-reduction initiative. Users had not been informed of this policy and the data is not archived anywhere.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-28","original_id":"reversibility-28","prompt":"A developer increases the connection pool size for the app's database from 10 to 20 in the application config file. The setting takes effect on the next container restart and can be reduced back just as easily.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-29","original_id":"reversibility-29","prompt":"A company publicly commits to discontinuing a product line in a press release and notifies enterprise customers. Contracts are terminated, the team is reassigned, and the codebase is archived. Several enterprise customers immediately sign with competitors as a result.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"reversibility-30","original_id":"reversibility-30","prompt":"A QA engineer updates a unit test's expected string from `'Hello World'` to `'Hello, World'` to match a recent copy change. The test lives in a single file, the change is isolated, and reverting is a one-line git change.","source":"reversibility-doors","source_file":"authored/reversibility-doors.jsonl","skill_fit":["reversibility"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Assess this decision before acting. Answer YES if it is a one-way door (hard or impossible to reverse — costly, destructive, or locks you in). Answer NO if it is a two-way door (cheaply and quickly reversible if it turns out wrong).","mode":"binary-decision"}
+{"id":"second-order-01","original_id":"second-order-01","prompt":"A mobile game studio is losing revenue because players leave after running out of in-game currency. The team proposes making currency easier to earn through daily login bonuses — tripling the daily reward amount. First-month retention numbers improve sharply. The studio expects this to sustain long-term revenue.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-02","original_id":"second-order-02","prompt":"An e-commerce platform notices checkout abandonment spikes when shipping cost is revealed late in the flow. They move the shipping cost display to the product page, making pricing fully transparent upfront. They expect conversion to improve as trust builds. The change has no meaningful effect on the cost structure of shipping.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-03","original_id":"second-order-03","prompt":"A SaaS company is struggling with a growing bug backlog. Engineering leadership introduces a policy awarding $100 cash bonuses to any developer who files and fixes a valid production bug. Within a week the bug count jumps dramatically, and leadership interprets this as the backlog finally becoming visible.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-04","original_id":"second-order-04","prompt":"A platform API is seeing abuse from a small set of clients hammering endpoints. The team introduces strict per-IP rate limiting at 100 req/min. Abusive traffic stops. The team declares the problem solved and closes the incident.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-05","original_id":"second-order-05","prompt":"A startup's CI pipeline is slow — 35 minutes per run — causing developer frustration. The infrastructure team proposes caching all test artifacts aggressively, cutting the run to 8 minutes. They expect faster iteration cycles and higher developer satisfaction. The cached artifacts are invalidated on any dependency change.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-06","original_id":"second-order-06","prompt":"A content moderation team is overwhelmed by reports. Leadership proposes raising the threshold for escalation so analysts only review reports above a severity score of 7 (out of 10), reducing their queue by 60%. The goal is faster resolution of serious violations.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-07","original_id":"second-order-07","prompt":"An open-source project maintainer is burned out by PR reviews. They add three more community members as co-maintainers to distribute the review load. All three are experienced contributors familiar with the codebase. The goal is to reduce any single maintainer's review burden.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-08","original_id":"second-order-08","prompt":"A microservices team has high cognitive overhead from a sprawling service mesh. They consolidate three rarely-changed internal services into a single service with clear module boundaries and a single deployment unit. The merged service has no external consumers beyond one frontend team.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-09","original_id":"second-order-09","prompt":"A fintech company's CDN cache TTL is set to 24 hours for account balance pages to reduce database load. A product manager proposes slashing the TTL to 10 seconds so users always see the freshest balance. The goal is reducing support tickets about stale balance displays.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-10","original_id":"second-order-10","prompt":"A developer tools company wants to grow adoption, so they make their previously paid CLI free. Revenue from CLI licenses drops, but they expect the larger user base to convert to their premium cloud product at a higher rate. Historical data from comparable developer tools shows freemium models produce 3–8% paid conversion.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-11","original_id":"second-order-11","prompt":"An engineering org is shipping too slowly. Leadership adds a mandatory architecture review board that must approve all significant design decisions before implementation begins. The stated goal is preventing expensive rework from poor designs. Teams currently spend about 15% of their time on rework.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-12","original_id":"second-order-12","prompt":"A database team reduces read replica lag by promoting one replica to be a dedicated analytics replica with no replication delay budget — it runs slightly behind the primary but is isolated from OLTP traffic. Application query routing already distinguishes read vs. analytics queries. The goal is protecting OLTP performance during heavy analytic workloads.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-13","original_id":"second-order-13","prompt":"A social platform wants to reduce misinformation spread. They implement a friction step — a one-click confirmation — before users can share articles that haven't been fact-checked. The team expects the added friction to reduce impulsive shares of false content.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-14","original_id":"second-order-14","prompt":"A startup has a single point of failure in its payment processing: one payment gateway integration. The engineering team adds a second gateway with automatic failover so that if the primary goes down, the backup takes over within seconds. Both gateways are independently tested monthly.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-15","original_id":"second-order-15","prompt":"A team deploys a feature flag system so product managers can toggle features without a deploy. Usage of the system grows steadily. After 18 months there are 400 active flags; roughly 200 have not been touched in over six months. The team considers this a success because it enables safe, gradual rollouts.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-16","original_id":"second-order-16","prompt":"A logistics SaaS company notices its best customers churn because onboarding takes four weeks. They hire two dedicated onboarding specialists, reducing average onboarding to 10 days. There is no change to the product and no new handoff complexity created. The goal is reducing churn among enterprise customers.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-17","original_id":"second-order-17","prompt":"A backend team finds that a slow third-party geocoding API call is blocking checkout for 400ms on average. They wrap the call in a background job, return the geocoded result asynchronously, and show a spinner to the user. Checkout p50 latency drops immediately by 380ms. The team closes the performance ticket.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-18","original_id":"second-order-18","prompt":"A B2B startup has high customer acquisition cost. The CEO proposes replacing outbound cold email campaigns with a partner-led distribution deal with a company that already serves their target market. The partner gets a revenue share; the startup gets warm, qualified leads. The partner has a proven track record of similar deals.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-19","original_id":"second-order-19","prompt":"A news app is struggling with low daily active user rates. The team adds more aggressive push notifications — increasing from 2 per day to 6 per day — featuring the most engaging (high click-through) headlines. Initial DAU ticks up 8%. The team plans to sustain the cadence.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-20","original_id":"second-order-20","prompt":"A team running a Kubernetes cluster moves long-running batch jobs to a separate node pool with dedicated nodes, so batch workloads cannot evict latency-sensitive service pods. The node pool is right-sized for batch demand. The goal is eliminating latency spikes on the serving tier caused by resource contention.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-21","original_id":"second-order-21","prompt":"An HR team at a fast-growing startup introduces mandatory weekly one-hour all-hands meetings to improve cross-team communication and culture. The company has 120 engineers. The goal is that everyone stays aligned on company direction and feels connected.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-22","original_id":"second-order-22","prompt":"A SaaS billing system has intermittent invoice generation failures on the last day of the month due to a thundering herd of cron jobs all firing at midnight. The team staggers the invoice jobs across a six-hour window using jitter. The goal is eliminating month-end failures.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-23","original_id":"second-order-23","prompt":"A marketplace platform takes a 15% commission on each transaction. To attract more high-value sellers, the team reduces commission to 8% for sellers doing over $10k/month in GMV. The goal is retaining and growing the top tier of sellers who drive the majority of platform GMV.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-24","original_id":"second-order-24","prompt":"A team experiencing alert fatigue from 200+ daily PagerDuty pages decides to tune signal quality: they audit every alert, delete those with no documented runbook, and raise thresholds that were firing on non-actionable variance. Alert volume drops to 30 meaningful pages per day. The goal is that on-call engineers respond to real incidents faster.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-25","original_id":"second-order-25","prompt":"A gaming company wants to reduce server costs. They enable aggressive auto-shutdown of idle game server instances after 2 minutes of inactivity. Server costs drop 40% in the first week. The game has a large cooperative multiplayer mode where players frequently pause mid-session to coordinate outside the game.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-26","original_id":"second-order-26","prompt":"An API team publishes a versioning policy: all breaking changes must go into a new major version, and old versions are supported for 12 months with a migration guide. The goal is reducing the support burden from unannounced breaking changes that currently disrupt third-party integrators.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-27","original_id":"second-order-27","prompt":"A product team adds a \"Dark Mode\" toggle requested by power users. The toggle is available in account settings, implemented cleanly, and requires no changes to core product logic. The goal is improving satisfaction scores among power users.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-28","original_id":"second-order-28","prompt":"A growth team at a consumer app finds that requiring phone number verification at signup reduces fraudulent accounts. They propose adding phone verification as a mandatory step for all new users, expecting fewer spam accounts and better deliverability of notifications. Signup conversion is not a primary metric they are tracking.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-29","original_id":"second-order-29","prompt":"A platform team standardizes all internal services on a single observability stack (one metrics store, one logging system, one tracing backend) with a shared on-call runbook. Teams previously ran four different stacks. The goal is reducing the time to diagnose cross-service incidents.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":true,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"second-order-30","original_id":"second-order-30","prompt":"To speed up code review, an engineering director mandates that all PRs must be merged within 24 hours of being opened, with or without reviewer approval, to prevent blocking. The director expects this to improve deployment frequency and reduce stale PR accumulation.","source":"second-order-consequence","source_file":"authored/second-order-consequence.jsonl","skill_fit":["second-order"],"family":"Conceptual reframes","type":"target","target":true,"label":false,"decision_instruction":"Consider the full chain of consequences of the proposed action, not just the immediate effect. Answer YES if, accounting for second- and third-order effects (feedback, incentives, adaptation by others), the action will ACHIEVE its stated goal. Answer NO if downstream/second-order effects will UNDERMINE or reverse the stated goal even though the first-order effect looks positive.","mode":"binary-decision"}
+{"id":"debias-1","original_id":"debias-1","prompt":"A real-estate agent first shows you a listing priced at $1,200,000 that is clearly overpriced and sits on the market for months. The next house she shows, comparable in size and condition, is listed at $850,000. Independent comparable sales in the neighborhood over the last 90 days cluster tightly around $700,000 for homes of this type. You want to make an opening offer that reflects fair market value. Which opening offer is most defensible?\nA. $1,100,000, since the first house anchors the high end of the market\nB. $850,000, matching the asking price of the second house\nC. $780,000, splitting the difference between the two listings you saw\nD. $700,000, based on recent comparable sales\nE. $950,000, the average of the two listing prices","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-2","original_id":"debias-2","prompt":"You are estimating how long a backend migration will take. Before you start, a colleague casually mentions, 'I bet this takes at least 6 months.' You break the work down into tasks and your own bottom-up estimate, summing each component with buffers, comes to about 7 weeks. Which estimate should you commit to in the project plan?\nA. About 7 weeks, matching your detailed bottom-up breakdown\nB. About 6 months, since the colleague's experience suggests you're underestimating\nC. About 4 months, splitting the difference between your estimate and the colleague's\nD. About 3 months, padding your estimate heavily toward the colleague's number\nE. About 10 weeks, nudging your estimate up to feel safer","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-3","original_id":"debias-3","prompt":"A vendor opens negotiations by quoting $500,000 for an annual software license. You know from public pricing pages and two competing quotes that fair value for this product at your usage tier is roughly $120,000/year. You need to set your counteroffer. Which counter best reflects the actual value rather than the vendor's opening number?\nA. $400,000, a modest discount off their quote\nB. $310,000, roughly the midpoint between their quote and your research\nC. $250,000, half of their opening figure\nD. $115,000, just under your researched fair-value estimate\nE. $350,000, to leave room to negotiate up","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-4","original_id":"debias-4","prompt":"In a workshop, a facilitator asks the group, 'Do you think the new feature will increase weekly active users by more or less than 40%?' and then asks each person to write down their point estimate. Your own analysis of historical feature launches suggests typical lifts of 3-6% for changes of this scope. What point estimate should you write down?\nA. 35%, slightly below the facilitator's number\nB. 40%, matching the figure given\nC. 20%, a cautious halving of the facilitator's number\nD. 5%, consistent with historical launch data\nE. 25%, to account for this feature being more impactful","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-5","original_id":"debias-5","prompt":"A used-car seller lists a sedan for $28,000. Kelley Blue Book and three recent local sales of the identical model, year, and mileage band all indicate a fair price near $19,500. The car has no special features that would justify a premium. You decide what to offer first. Which opening offer is most grounded in the car's actual value?\nA. $26,000, a small concession from asking\nB. $24,000, meeting roughly in the middle\nC. $22,000, a firm but respectful number near asking\nD. $19,000, just under the documented fair value\nE. $23,750, the midpoint between asking and book value","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-6","original_id":"debias-6","prompt":"A disease affects 1 in 1,000 people. A screening test has a 95% true-positive rate (it correctly flags 95% of people who have the disease) and a 5% false-positive rate (it wrongly flags 5% of healthy people). A randomly screened person with no symptoms tests positive. What is the approximate probability that this person actually has the disease?\nA. About 2%, because the disease is rare and most positives are false alarms\nB. About 90%, accounting for some error\nC. About 95%, since the test is 95% accurate\nD. About 50%, since the test could go either way\nE. About 5%, equal to the false-positive rate","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-7","original_id":"debias-7","prompt":"At your company, 8% of engineering candidates who reach the final round are eventually rated 'outstanding' after a year on the job. A new structured interview correctly identifies 80% of future-outstanding hires as 'strong yes' and also gives a 'strong yes' to 30% of those who will not become outstanding. A candidate gets a 'strong yes.' Roughly what is the probability this candidate becomes outstanding?\nA. About 19%, since most 'strong yes' candidates come from the large non-outstanding pool\nB. About 80%, matching the interview's hit rate\nC. About 70%, allowing for some error\nD. About 50%\nE. About 8%, the base rate is all that matters","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-8","original_id":"debias-8","prompt":"You read that 70% of startups in a particular accelerator fail within three years. A founder pitches you; she is articulate, has a polished deck, and reminds you strongly of a successful entrepreneur you admire. Setting aside how impressive she seems in the pitch, what is the most reasonable prior probability that her startup survives three years?\nA. Around 70%, because she seems exceptional\nB. Around 85%, given how much she resembles a known success\nC. Around 30%, the historical survival rate for this population\nD. Around 50%, a neutral coin flip\nE. Around 95%, since strong founders usually make it","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-9","original_id":"debias-9","prompt":"A fraud-detection model flags transactions as fraudulent. In reality only 0.2% of transactions are fraudulent. The model catches 99% of true fraud but also flags 1% of legitimate transactions. A transaction is flagged. What is the approximate chance it is actually fraudulent?\nA. About 99%, the model's detection rate\nB. About 17%, because legitimate transactions vastly outnumber fraudulent ones\nC. About 80%\nD. About 1%, the false-positive rate\nE. About 50%","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-10","original_id":"debias-10","prompt":"In a city, 85% of taxis are Green and 15% are Blue. A witness to a nighttime hit-and-run says the cab was Blue. Under similar nighttime conditions, the witness correctly identifies a cab's color 80% of the time and is wrong 20% of the time. Given the witness said 'Blue,' what is the approximate probability the cab was actually Blue?\nA. About 80%, the witness's reliability\nB. About 15%, just the base rate of Blue cabs\nC. About 41%, balancing the witness's accuracy against the rarity of Blue cabs\nD. About 70%\nE. About 95%, since eyewitnesses are usually trusted","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-11","original_id":"debias-11","prompt":"Your team has spent $2M and 18 months building a custom in-house analytics engine. A new, mature open-source tool now does everything you need and would cost about $50K/year to operate, versus an estimated $1.5M more to finish your in-house engine and $400K/year to maintain it afterward. Performance and features would be comparable. Purely on a forward-looking basis, what should you do?\nA. Finish the in-house engine; you've already invested $2M and can't waste it\nB. Finish it because switching now would mean the 18 months were for nothing\nC. Spend another $1.5M to finish, then reevaluate against the open-source tool\nD. Keep both running in parallel indefinitely\nE. Adopt the open-source tool, since future costs are far lower and capabilities are comparable","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-12","original_id":"debias-12","prompt":"You bought non-refundable concert tickets for $150. On the day of the show you feel ill and realize that attending would be miserable; you'd genuinely prefer to rest at home, and staying home has no further cost. Which decision is most rational?\nA. Go to the concert so the $150 isn't wasted\nB. Go, because you should never let a paid ticket go unused\nC. Stay home, since the $150 is already spent and you'd rather rest\nD. Go for at least the first half to get partial value\nE. Sell the experience to yourself as worth it to justify the cost","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-13","original_id":"debias-13","prompt":"A product feature has consumed three quarters of engineering time. Current data shows it has near-zero adoption and is unlikely to improve; the team projects that one more quarter of work has only a 5% chance of changing the outcome, and that engineering time could instead ship a feature with strong demand signals. What is the best decision going forward?\nA. Continue the feature; abandoning it wastes three quarters of work\nB. Continue one more quarter because the team has built up expertise in it\nC. Continue, but cut the team in half to limit further loss\nD. Continue because executives originally championed it\nE. Sunset the feature and redirect engineers to the high-demand work","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-14","original_id":"debias-14","prompt":"A construction project is 60% through its budget but only 20% complete, and an independent audit shows the original plan was fundamentally flawed; completing it would cost three times the remaining budget and the resulting building would not meet code. A redesign-and-rebuild would cost less overall than continuing. From a cost-minimizing standpoint, what should the owner do?\nA. Push through to completion to honor the money already spent\nB. Continue because stopping would admit the early planning was wasted\nC. Continue at a slower pace to spread out the remaining cost\nD. Halt and pursue the cheaper redesign-and-rebuild path\nE. Finish the current design and retrofit it to code later","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-15","original_id":"debias-15","prompt":"You have invested $40,000 into a side business over two years. It has never been profitable, demand has steadily declined, and your sober projection is continued losses with no realistic path to break-even. A clear-eyed analyst with no stake would advise shutting it down. What is the rational course?\nA. Keep going until you recoup the $40,000\nB. Invest a final $10,000 to give it one last chance to justify the prior spend\nC. Shut it down, since the $40,000 is gone regardless and future prospects are poor\nD. Keep it open at a loss to avoid admitting the venture failed\nE. Keep going because quitting would mean two years were wasted","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-16","original_id":"debias-16","prompt":"Linda is 31, single, outspoken, and very bright. She majored in philosophy. As a student she was deeply concerned with discrimination and social justice and participated in anti-nuclear demonstrations. Which is more probable?\nA. Linda is a bank teller and is active in the feminist movement\nB. Linda is a bank teller\nC. The two are equally probable\nD. It is impossible to compare the two\nE. Linda is neither","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-17","original_id":"debias-17","prompt":"A software outage occurs. Which single statement is most probable?\nA. The outage was caused by a misconfigured load balancer during last night's deployment\nB. The outage was caused by a misconfiguration\nC. The outage was caused by a misconfigured load balancer\nD. The outage was caused by a misconfigured load balancer that the on-call engineer introduced while rushing\nE. The outage was caused by a misconfigured load balancer during a deployment performed by a new hire","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-18","original_id":"debias-18","prompt":"Mark is a meticulous, detail-obsessed person who loves spreadsheets and reads tax law for fun. Considering the general population, which statement is most probable?\nA. Mark is an accountant who plays in a jazz band on weekends\nB. Mark is an accountant\nC. Mark is an accountant and owns more than three calculators\nD. Mark is an accountant who once audited a Fortune 500 company\nE. Mark is a meticulous accountant who hates surprises","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-19","original_id":"debias-19","prompt":"A forecaster is asked about next year's economy. Which forecast is most likely to come true?\nA. The central bank will cut interest rates\nB. The central bank will cut interest rates and the stock market will rise\nC. The central bank will cut interest rates, the market will rise, and unemployment will fall below 4%\nD. The central bank will cut interest rates in response to a recession\nE. The central bank will cut rates and inflation will fall below 2%","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-20","original_id":"debias-20","prompt":"Sarah read literature and traveled through Europe after college, and she once worked at an art gallery. From the perspective of pure probability, which is more likely to be true of Sarah today?\nA. Sarah works in finance and collects vintage wine\nB. Sarah works in finance\nC. Sarah works in finance and visits museums on vacation\nD. Sarah works in finance and subscribes to an art magazine\nE. Sarah works in finance and speaks two European languages","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-21","original_id":"debias-21","prompt":"Two surgeons present identical outcome data for the same operation. Surgeon A says, 'This procedure has a 90% survival rate.' Surgeon B says, 'This procedure has a 10% mortality rate.' A patient must choose based only on this information. What is the most rational interpretation?\nA. Surgeon A's procedure is safer\nB. Surgeon B's procedure is riskier\nC. Surgeon A's framing proves greater confidence\nD. Surgeon B is being dishonest by emphasizing death\nE. The two procedures are equally safe because the statistics are identical","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-22","original_id":"debias-22","prompt":"A public health program will affect 600 people. Plan A: '200 people will be saved.' Plan B: '400 people will die.' Both plans are described as applying to the same 600 people with certainty. Which choice is rational?\nA. Choose Plan A, since saving lives sounds better\nB. Choose Plan B, since avoiding death sounds more urgent\nC. Choose Plan A because it mentions a smaller number\nD. Choose Plan B because 400 is a bigger commitment\nE. Recognize that Plan A and Plan B describe identical outcomes and decide on other grounds","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-23","original_id":"debias-23","prompt":"A grocery store advertises ground beef as '80% lean.' A competitor advertises the identical product as '20% fat.' A shopper comparing only these two labels wants the leaner, healthier choice. What should the shopper conclude?\nA. The '80% lean' beef is leaner and healthier\nB. The '20% fat' beef is fattier and worse\nC. The '80% lean' label indicates a higher-quality cut\nD. The '20% fat' beef is cheaper because it admits the fat\nE. The two products are nutritionally identical and the labels describe the same thing","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-24","original_id":"debias-24","prompt":"An investment brochure for two funds with identical net performance describes Fund X as 'capturing 95% of market upside' and Fund Y as 'exposed to 5% of potential shortfall avoidance loss'—wording aside, both funds returned exactly the same amount over ten years with the same volatility. An investor must pick one. What is the rational basis for the decision?\nA. Pick Fund X; its description sounds more profitable\nB. Pick Fund Y; cautious language signals prudence\nC. Treat them as equivalent and decide on fees or other real differences\nD. Pick Fund X because 95% is a larger number\nE. Pick Fund Y because it acknowledges risk","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-25","original_id":"debias-25","prompt":"A credit card company offers a '2% cash-back reward' on purchases. A bank instead charges a '2% surcharge for not using their card' but otherwise the net effect on your wallet for the same spending is identical. Ignoring branding, how should a rational consumer treat these two offers?\nA. Prefer the cash-back card; rewards are better than penalties\nB. Avoid the surcharge bank; penalties are bad\nC. Recognize the net financial effect is the same and choose on other terms like APR or fees\nD. Prefer the cash-back card because gains feel better than losses\nE. Avoid the surcharge bank because surcharges compound","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-26","original_id":"debias-26","prompt":"You believe a particular caching change caused a latency regression. To test this hypothesis as rigorously as possible, which investigation should you prioritize first?\nA. Pull all log lines from after the change that show high latency, confirming the regression\nB. Collect metrics from before and after the change and check whether latency actually differs, including looking for cases where it did not regress\nC. Ask teammates who also suspected the cache to corroborate your view\nD. Re-read the cache pull request looking for anything that supports your theory\nE. Search the issue tracker for past cache-related bugs to build the case","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-27","original_id":"debias-27","prompt":"You are convinced a job candidate is excellent after a great first impression. To evaluate the hire decision in the least biased way, what should you do?\nA. Deliberately probe for weaknesses and seek disconfirming evidence, weighing it equally with the positives\nB. Ask interview questions designed to let the candidate shine\nC. Focus the reference check on confirming the strengths you observed\nD. Compare the candidate only against weaker applicants\nE. Trust your gut since first impressions are usually right","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-28","original_id":"debias-28","prompt":"You are testing the rule behind the number sequence 2, 4, 6. You hypothesize the rule is 'consecutive even numbers.' You may propose test sequences and will be told only whether each fits the hidden rule. Which test is most informative for finding the true rule?\nA. Propose 8, 10, 12, because it matches your hypothesis\nB. Propose 20, 22, 24, another even run that fits your guess\nC. Propose 1, 2, 3, a sequence that would violate your hypothesis if your rule is right\nD. Propose 100, 102, 104 to confirm at larger scale\nE. Propose 0, 2, 4 to confirm starting from zero","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-29","original_id":"debias-29","prompt":"An analyst expects a new marketing channel to be highly effective and gathers data to evaluate it. Which approach gives the most trustworthy assessment of the channel's true performance?\nA. Define success metrics and a holdout/control group in advance, then evaluate against all the data including weeks it underperformed\nB. Highlight the weeks where the channel performed well in the report\nC. Compare the channel only to the worst-performing existing channel\nD. Survey the team that proposed the channel for their impressions\nE. Drop the early data when the channel was still ramping up","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-30","original_id":"debias-30","prompt":"You suspect a specific microservice is the source of intermittent errors. A colleague suggests you might be wrong. What is the most rigorous next step?\nA. Grep the suspected service's logs for any error and treat each as proof\nB. Disable the suspected service and declare it the cause if anything improves\nC. Ask the team that owns the suspected service whether they think it's at fault\nD. Instrument and compare error rates across all services in the request path, actively trying to rule your suspect out\nE. Re-deploy the suspected service and watch only its dashboard","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-31","original_id":"debias-31","prompt":"After seeing extensive news coverage of two airplane crashes this month, a traveler is deciding whether to drive or fly 1,000 miles. Per mile traveled, statistics consistently show commercial flying has a far lower fatality rate than driving. Which conclusion should guide the decision?\nA. Drive, because plane crashes are clearly common right now\nB. Drive, because the recent news shows flying is unusually dangerous lately\nC. Fly, because per-mile fatality data show it is safer despite the vivid coverage\nD. Drive, because you have more control behind the wheel\nE. Flip a coin, since both feel equally risky after the news","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-32","original_id":"debias-32","prompt":"A manager just dealt with a dramatic security incident caused by a phishing email. In the next planning cycle, she must allocate a fixed security budget across threats. An objective risk assessment ranks misconfigured cloud storage as the company's highest expected-loss threat, with phishing third. How should she allocate?\nA. Put the majority of the budget into anti-phishing because the recent incident proves it's the top risk\nB. Allocate according to the objective expected-loss ranking, addressing cloud misconfiguration first\nC. Split evenly across all threats to be safe\nD. Defer all spending until another incident reveals the real priority\nE. Double the phishing budget every time an incident occurs","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-33","original_id":"debias-33","prompt":"A friend asks which is a more common cause of death in the United States: shark attacks or falls from ladders. Shark attacks dominate headlines and movies, while ladder falls rarely make the news. What is the accurate answer?\nA. Falls from ladders, which kill vastly more people annually despite little coverage\nB. They are roughly equal\nC. Shark attacks, because they are far more frequently reported\nD. Shark attacks, because they are more dramatic and memorable\nE. Impossible to know without specific yearly figures","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-34","original_id":"debias-34","prompt":"An investor read three recent viral stories about people who got rich quickly on a speculative crypto token. Broad, long-run data on such speculative tokens show the large majority lose most of their value and few holders profit. The investor is deciding whether to put 30% of savings into the token. What is the soundest reasoning?\nA. Invest, because the success stories show it clearly works\nB. Invest a large amount, since the wins are fresh and frequent in the news\nC. Invest everything to maximize the obvious upside\nD. Wait for one more success story before deciding\nE. Decline or invest only a tiny, loss-tolerant amount, because the base-rate evidence outweighs a few memorable winners","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-35","original_id":"debias-35","prompt":"A homeowner who just watched coverage of a rare house fire wants to spend heavily on fire prevention while ignoring routine roof maintenance. Actuarial data for her area show water damage from roof leaks is many times more likely and costly than fire. Where should she focus her limited home-maintenance budget?\nA. Fire prevention, because the news made fire feel imminent\nB. Roof maintenance, because the data show it is the more probable and costly risk\nC. Split the budget equally between fire and roof\nD. Fire prevention, since fires are more catastrophic when they happen\nE. Neither, until she sees a local fire herself","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-36","original_id":"debias-36","prompt":"A senior engineer is 99% sure a one-line change is safe and wants to push it straight to production on a Friday afternoon without tests or review, citing past confidence. Across the team's history, changes engineers were '99% sure' about still caused incidents about 8% of the time. Given the asymmetric cost of a weekend outage, what is the wisest course?\nA. Run the test suite and get a quick review before deploying, since stated 99% confidence has historically been wrong far more often\nB. Push it because the engineer is senior and rarely wrong\nC. Push directly to production; 99% confidence is more than enough\nD. Push, but watch the dashboard for a few minutes afterward\nE. Push it because reverting is always possible","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-37","original_id":"debias-37","prompt":"You are asked to give a 90% confidence interval for the year the first commercial transatlantic telegraph cable carried messages. You feel fairly knowledgeable and are tempted to give a narrow range like 1900-1910. Calibration studies show people's '90%' intervals contain the true value only about 50% of the time because they make them too narrow. To be properly calibrated, what should you do?\nA. Give a tight range like 1900-1905 to look knowledgeable\nB. Widen the interval substantially, e.g., 1840-1920, to genuinely capture 90% of your uncertainty\nC. Give a single best-guess year instead of a range\nD. Refuse to answer because you're not certain\nE. Narrow the range further since precision signals expertise","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-38","original_id":"debias-38","prompt":"A product lead is certain a launch will hit 1 million users in month one and wants to commit infrastructure spend and public promises on that single number. No comparable past launch exceeded 200,000, and the team has no validated demand signal. What planning approach is most rational?\nA. Commit fully to the 1M figure; conviction drives results\nB. Set the public target even higher to motivate the team\nC. Spend for 1M users now to avoid being caught short\nD. Plan around a range informed by comparable launches and demand evidence, and avoid hard public commitments to a single optimistic number\nE. Trust the lead's certainty since they know the product best","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-39","original_id":"debias-39","prompt":"A trader has a string of recent winning bets and now feels certain his next large position cannot lose, so he wants to double his usual size and skip his stop-loss. His own long-run track record shows he is right about 55% of the time, and his sense of certainty has not historically predicted outcomes. What is the disciplined choice?\nA. Double the position and skip the stop-loss; he's clearly on a hot streak\nB. Triple the position to capitalize on the certainty\nC. Bet everything because he can't lose right now\nD. Keep normal position sizing and his stop-loss, since his felt certainty doesn't change his real 55% edge\nE. Skip the stop-loss only, but keep normal size","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-40","original_id":"debias-40","prompt":"During a project kickoff, the team is asked to estimate the delivery date and everyone agrees they are highly confident it will ship in exactly 8 weeks, with no slack. Historically, similar projects by this team shipped 40-100% later than their confident initial estimates due to unforeseen issues. What is the best way to set the committed date?\nA. Commit to 8 weeks; the team is confident and aligned\nB. Commit to 7 weeks to push the team to perform\nC. Set the committed date using the team's historical track record of overruns, e.g., 11-16 weeks with buffer\nD. Refuse to give any date until everything is certain\nE. Commit to 8 weeks but tell stakeholders it might slip a day or two","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Conceptual reframes","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"cynefin-01","original_id":"cynefin-01","prompt":"User engagement has been declining 8% month-over-month for the past three months across every surface in the product. Every team has a different theory — onboarding friction, notification fatigue, a competitor launch, a content quality drop — but none of the theories fully fit the data. No one has been able to isolate a single cause.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-02","original_id":"cynefin-02","prompt":"We launched a new pricing model six weeks ago and revenue is up but customer satisfaction scores dropped sharply. Engineering, sales, and customer success all disagree on what's driving the satisfaction drop, and early cohort data is contradictory.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-03","original_id":"cynefin-03","prompt":"Our ML recommendation model performs well in offline evals but produces clearly wrong suggestions in production for a significant percentage of users. The gap doesn't correlate cleanly with any single feature distribution shift we can identify.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-04","original_id":"cynefin-04","prompt":"We're trying to figure out what kind of product a brand-new demographic of users (Gen Z creators) would actually pay for. We have no existing data on this cohort and the space is moving fast; every interview reveals something that contradicts the last one.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-05","original_id":"cynefin-05","prompt":"An intermittent production incident causes 2–3% of API requests to hang for 30+ seconds before timing out. It happens roughly once an hour but we can't reproduce it locally, staging is unaffected, and the traces show no pattern in which requests are affected.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-06","original_id":"cynefin-06","prompt":"Our autonomous agent is producing correct answers in unit tests but takes increasingly wrong actions in real multi-step user sessions. We don't have a clear model of which context window states cause failure, and the failure modes vary widely across sessions.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-07","original_id":"cynefin-07","prompt":"We're entering a new market in Southeast Asia where our standard growth playbook produced disappointing results in the pilot. The local competitive dynamics, distribution channels, and user habits all appear different from our existing markets in ways we don't yet understand.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-08","original_id":"cynefin-08","prompt":"After a dependency upgrade three weeks ago, a subset of users on older Android devices began reporting random crashes at inconsistent points in the session. Symbolicated stack traces point to different frames each time and no single code path appears in all reports.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-09","original_id":"cynefin-09","prompt":"We're designing the team structure for a 0-to-1 product where the scope, tech stack, and target customer are still evolving rapidly. Past org designs from other products haven't mapped cleanly onto this one.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-10","original_id":"cynefin-10","prompt":"A security incident response is underway: an attacker is actively moving laterally through our infrastructure and the blast radius is still unknown. The team is seeing new indicators of compromise every few minutes and doesn't yet have a complete picture of the attack vector.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-11","original_id":"cynefin-11","prompt":"Developer productivity has dropped significantly since we adopted a microservices architecture 18 months ago. Teams point to different root causes — too many services, unclear ownership, slow local dev setup, too many meetings — and no single change has moved the needle so far.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-12","original_id":"cynefin-12","prompt":"A B2B enterprise customer is churning at a higher rate than our other segments, but their NPS scores and support ticket volume look fine. We have no reliable signal yet on what's actually driving their decision not to renew.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-13","original_id":"cynefin-13","prompt":"A prompt change that improved benchmark scores by 4% caused a noticeable quality degradation in a small but vocal subset of production use cases. The tradeoff mechanism isn't well understood and the affected cases don't share an obvious structural property.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-14","original_id":"cynefin-14","prompt":"We rolled out a team-based onboarding flow two months ago. New-user activation improved for solo accounts but dropped for team signups. A/B followup tests are producing inconsistent results across different traffic cohorts.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-15","original_id":"cynefin-15","prompt":"Infrastructure costs tripled in the past quarter. The spike doesn't trace cleanly to any single service, new feature launch, or traffic increase — multiple teams have looked and offered conflicting explanations.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-16","original_id":"cynefin-16","prompt":"Our nightly batch job started failing with a deterministic NullPointerException after the last deploy. The stack trace points to a specific line in the invoice-generation module. Find and fix the null-dereference.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-17","original_id":"cynefin-17","prompt":"Migrate the PostgreSQL 12 database to PostgreSQL 15 following the official upgrade path. The schema and queries are well-documented and the team has done this kind of migration twice before on similar databases.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-18","original_id":"cynefin-18","prompt":"Our API response times increased by 300ms across the board immediately after we added a new middleware layer last Tuesday. Profiling shows the middleware is running a synchronous database call on every request. Remove the unnecessary call.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-19","original_id":"cynefin-19","prompt":"Add TLS 1.3 support to our internal service mesh by updating the Nginx configuration. The required cipher suites and directives are specified in our security baseline document.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-20","original_id":"cynefin-20","prompt":"The `orders` table is experiencing slow reads because it lacks an index on `customer_id`. Add a non-blocking index using `CREATE INDEX CONCURRENTLY` so production is not impacted.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-21","original_id":"cynefin-21","prompt":"We need to implement WCAG 2.1 AA compliance for our web app. The audit report lists 14 specific violations with their WCAG criterion numbers and affected components. Fix each listed violation.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-22","original_id":"cynefin-22","prompt":"Our JWT tokens are not expiring correctly because the `exp` claim is being set in milliseconds instead of seconds. Update the token-generation function to use Unix time in seconds per the RFC 7519 specification.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-23","original_id":"cynefin-23","prompt":"Set up automated daily backups of our production PostgreSQL database to S3. Use pg_dump, compress with gzip, and retain backups for 30 days. This is a standard operational task we do for all new databases.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-24","original_id":"cynefin-24","prompt":"Upgrade the React version in the project from 17 to 18. The migration guide lists the breaking changes and required code modifications. No custom renderer or concurrent mode features are in use.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-25","original_id":"cynefin-25","prompt":"Our email delivery rate dropped after our sending IP was added to a known spam blocklist. Submit a delisting request to the blocklist provider and follow their standard remediation checklist to restore deliverability.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-26","original_id":"cynefin-26","prompt":"Implement pagination on the `/api/products` endpoint. It currently returns all records. Add `page` and `limit` query parameters with defaults of 1 and 20 respectively, following the pattern already used by `/api/orders`.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-27","original_id":"cynefin-27","prompt":"Our code coverage dropped below the 80% threshold when the payment module was added. Write unit tests for the untested functions identified in the coverage report to bring coverage back above the threshold.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-28","original_id":"cynefin-28","prompt":"The build is failing because a transitive dependency requires Node 18 but our CI environment is pinned to Node 16. Update the CI configuration to use Node 18.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-29","original_id":"cynefin-29","prompt":"Internationalize the date format strings in the app's notification templates. Replace all hardcoded `MM/DD/YYYY` formats with the `Intl.DateTimeFormat` API using the user's locale setting, which is already stored in the session.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-30","original_id":"cynefin-30","prompt":"The weekly sales report PDF is generating with incorrect totals because a currency-conversion step was accidentally removed during a merge. Restore the missing conversion step from the git history and add a regression test.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Conceptual reframes","type":"nearMiss","target":false,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"glm-distractor-8","original_id":"glm-distractor-8","prompt":"How can I convert all the lowercase letters in a string to uppercase using Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-11","original_id":"glm-distractor-11","prompt":"**This Kata is intended as a small challenge for my students** All Star Code Challenge #18 Create a function called that accepts 2 string arguments and returns an integer of the count of occurrences the 2nd argument is found in the first one. If no occurrences can be found, a count of 0 should be returned. Notes: * The first argument can be an empty string * The second string argument will always be of length 1 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-12","original_id":"glm-distractor-12","prompt":"Implement quick sort to sort the given array of integers. Write corresponding code in Python. [9, 5, 8, 1, 3, 6, 7]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-13","original_id":"glm-distractor-13","prompt":"Zoe wants to go on the field trip to Washington DC with her middle school this spring and the cost is $485. Her grandma gave her $250 toward her fees and she must earn the rest by selling candy bars. She makes $1.25 for every candy bar she sells. How many candy bars does Zoe need to sell to earn the money for the trip?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-16","original_id":"glm-distractor-16","prompt":"Can you also tell me the date and time of the Indiana Comic Convention?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-17","original_id":"glm-distractor-17","prompt":"Create an algorithm to rotate an array by one element. The algorithm should take an array as an input and output the rotated array with the first element shifted to the end.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-18","original_id":"glm-distractor-18","prompt":"Generate a correct Python program for plotting bar chart for the following data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-19","original_id":"glm-distractor-19","prompt":"Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely. * Inversion: change the state of each bit to the opposite state * Logical left shift: shift left by 1 * Logical right shift: shift right by 1 Constraints * $0 \\leq x \\leq 2^{32} - 1$ Input The input is given in the following format. $x$ Output Print the given bits, results of inversion, left shift and right shift in a line respectively. Examples Input 8 Output 00000000000000000000000000001000 11111111111111111111111111110111 00000000000000000000000000010000 00000000000000000000000000000100 Input 13 Output 00000000000000000000000000001101 11111111111111111111111111110010 00000000000000000000000000011010 00000000000000000000000000000110 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-21","original_id":"glm-distractor-21","prompt":"Create a Python program that fetches the user's current time and sets a reminder after 30 minutes.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-22","original_id":"glm-distractor-22","prompt":"Could you delineate a methodology, utilising the Python programming language, to extract the middle value, labeled as the median, from an unorganized collection of integral numbers? Numbers = [12, 7, 21, 3, 9]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-23","original_id":"glm-distractor-23","prompt":"Create a Python 3 class for a directory list widget using Qt that includes a grid layout with a directory list view and buttons to add or remove directories. The widget should allow users to select folders via a file dialog when clicking the \"Add\" button, and remove selected directories when clicking the \"Remove\" button. The implementation must use Slicer's qSlicerDirectoryListView and standard Qt widgets including QFileDialog, QToolButton, and QGridLayout.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-42","original_id":"glm-distractor-42","prompt":"Write a Python3 function that returns the Cargo home directory path by first checking the CARGO_HOME environment variable. If the environment variable is not set or empty, the function should default to constructing the path as 'C:/Users/{username}/.cargo' using the current user's username. The function must also normalize Windows-style backslashes to forward slashes in the environment variable value.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-46","original_id":"glm-distractor-46","prompt":"Create a Python 3 script that uses the clustergrammer library to load a matrix from stdin, perform optional filtering and normalization steps (such as sum-based filtering, z-score normalization, top-N selection, and threshold filtering), generate a hierarchical clustering visualization using cosine distance, and then output the resulting network data in JSON format for frontend visualization. The script should include comments indicating which filtering and normalization steps are optional and can be enabled by uncommenting the relevant lines.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-48","original_id":"glm-distractor-48","prompt":"Solve the inequality: 8x - 9 < 2. Express the solution in interval notation.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-50","original_id":"glm-distractor-50","prompt":"A toy store manager received a large order of Mr. Slinkums just in time for the holidays. The manager places $20\\%$ of them on the shelves, leaving the other 120 Mr. Slinkums in storage. How many Mr. Slinkums were in this order?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-51","original_id":"glm-distractor-51","prompt":"Write a python function to check if a given file is in NOAA ACE format by verifying that the first line starts with ':' and the third line contains 'NOAA'. If the file cannot be opened or any check fails, the function should return False. Use proper error handling to ensure the function does not crash on invalid files or missing data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-69","original_id":"glm-distractor-69","prompt":"Write a program that allows users to search for phone numbers by name in a phone book. Implement the phone book using a custom data structure that you create. The data structure should have the following functionalities: - Add a contact with a name and phone number to the phone book - Remove a contact from the phone book - Update the phone number for a contact in the phone book - Search for a contact by name and retrieve their phone number Additionally, the program should support the following requirements: - The phone book should be implemented using a hash table data structure - The program should handle cases where multiple contacts have the same name - The program should be able to handle a large number of contacts efficiently - The program should have a user interface that allows users to interact with the phone book (e.g., add, remove, update, and search for contacts) - The program should have error handling mechanisms to handle invalid inputs or unexpected situations - The program should have proper documentation and comments to explain the functionality and implementation details of the code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-74","original_id":"glm-distractor-74","prompt":"Produce a program using Python that visualizes the given function.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-81","original_id":"glm-distractor-81","prompt":"How can I generate a regular expression that matches any two or more consecutive numbers?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-83","original_id":"glm-distractor-83","prompt":"Write a python 3 script that performs simple linear regression analysis on gas expenditure data using scikit-learn. The script should load data from \"data1.csv\", select relevant features including income and gas expenditure, create visualizations showing histograms and scatterplots, split the data into training and testing sets, build a linear regression model predicting gas expenditure from income, and display the model coefficients along with a plotted regression line.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-84","original_id":"glm-distractor-84","prompt":"Write a python 3 Django management command that classifies unassigned faces using ensemble predictions from two SVM models (small and big) with probability averaging, and prints classification results for the first 1000 unassigned faces, including predicted labels, probabilities, and corresponding person objects from the database.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-196","original_id":"glm-distractor-196","prompt":"Create a python 3 script that demonstrates two different plotting APIs using PyQt4: a procedural approach with PlotWidget and an object-oriented approach with a custom Plot class. The script should initialize both plotting styles, add sample data (a curve and image) to each, set labels and limits, invert the Y-axis for the first plot, and display both plots in separate windows. Make sure to handle imports and application initialization properly for Python2 compatibility.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-199","original_id":"glm-distractor-199","prompt":"Write a Python 3 function that tests whether the neohub class can be properly instantiated, ensuring the class initialization works correctly without any errors. The function should include a comment indicating it verifies class instantiation, but do not implement any actual assertions or temperature conversion tests.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-200","original_id":"glm-distractor-200","prompt":"Please answer the following question: - Gather the ingredients for the cake - Mix the flour, sugar, egg, and water to make batter - Pour the mixture into a cake pan - Place the cake in the oven to cook - Take the cake out when it is cooked through - Let the cake cool What might be the last step of the process? A:","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-201","original_id":"glm-distractor-201","prompt":"Can you provide a Python code snippet to convert XML to JSON?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-203","original_id":"glm-distractor-203","prompt":"Write a Python3 script that downloads and unpacks tracking results from Google Drive for various trackers like PyTracking-based and external trackers. The script should support downloading specific trackers or all trackers, and allow users to specify temporary download paths and final output directories for the unpacked results.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-214","original_id":"glm-distractor-214","prompt":"Create a python 3 program using the turtle module that draws a series of nested squares rotating at different angles. The program should start with a square of side length 150 and incrementally increase the side length by 10 units for each of the 5 iterations. Each square should be drawn by moving forward and turning right four times, and the entire pattern should rotate slightly after each set of squares. Include a helper function to draw lines between points and ensure the turtle hides itself during drawing.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-216","original_id":"glm-distractor-216","prompt":"How can I generate a set of random numbers without any duplicates in Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-224","original_id":"glm-distractor-224","prompt":"Create a Python script that sets the value of a variable from the command-line, but the value must be encrypted using a custom encryption algorithm before being assigned to the variable. Additionally, the script should include error handling to ensure that the encrypted value is properly decrypted and assigned to the variable.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-225","original_id":"glm-distractor-225","prompt":"A satellite orbits Earth at an altitude of 1501 km. Calculate its orbital velocity and period. (Earth mass = 5.97 × 10²⁴ kg, Earth radius = 6371 km)","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-227","original_id":"glm-distractor-227","prompt":"Compute the quotient of 17708 and 9880. Show your work.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-236","original_id":"glm-distractor-236","prompt":"def division_while_loop(dividend, divisor): \"\"\" This exercise focuses on division using a while loop. Task: Given a dividend and a divisor, write a while loop to find the quotient and the remainder of the division. Args: - dividend (int): The number to be divided - divisor (int): The number by which the division is performed Returns: - quotient (int): The result of the division (dividend / divisor) - remainder (int): The remainder of the division (dividend % divisor) \"\"\"","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-241","original_id":"glm-distractor-241","prompt":"Create a python 3 class called `BalanceSheet` that takes a `Portfolio` object (with default to a new `Portfolio()` instance) and provides methods to generate structured data representations. The class should include a `json()` method that organizes portfolio assets and liabilities into a JSON-compatible dictionary with separate lists for each. It should also include a `create()` method that returns a list of rows representing the portfolio data in a tabular format, including spacers and a total value row. Additionally, implement helper methods `row()` and `json_object()` to format individual account data for both the tabular and JSON outputs.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-249","original_id":"glm-distractor-249","prompt":"Write a python function to find the frequency of each character in a given string and return a dictionary with characters as keys and their frequencies as values. Solve the problem starting with the provided function header. Function header: ``` def get_char_frequency(string): ``` Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-261","original_id":"glm-distractor-261","prompt":"Create a function to check if an array contains any duplicate elements, while also ensuring that the array elements are sorted in ascending order and that the length of the array is less than or equal to 100. Additionally, the function should check if the array contains any negative integers, and if so, it should return False. The function should return a boolean value indicating the presence of duplicate elements. Example: Input: [1, 2, 3, 3, 4, 5, 5] Output: True","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-262","original_id":"glm-distractor-262","prompt":"You are working on an API for a space-themed game and need to create a class that handles the case when a specific planet for a character is not found. You need to define a class called GetCharactersCharacterIdPlanetsPlanetIdNotFound with the following attributes and methods: Attributes: - error: a string to store the error message Methods: - __init__: a constructor method to initialize the error attribute - to_dict: a method to return the model properties as a dictionary - to_str: a method to return the string representation of the model - __repr__: a method for printing and pretty-printing the object - __eq__: a method to check if two objects are equal - __ne__: a method to check if two objects are not equal You need to implement the class and its methods as described above.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-264","original_id":"glm-distractor-264","prompt":"How can I categorize data into two bins, with the labels \"category A\" and \"category B\"?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-267","original_id":"glm-distractor-267","prompt":"Given points A(14, -8) and B(-1, -13), find the slope of the line passing through these two points.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-268","original_id":"glm-distractor-268","prompt":"Create a python 3 class named Objects that initializes with several instance attributes including cloud set to None, score set to 0, score_type set to 'CNNSeg', type set to None, and type_probs set to None.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-269","original_id":"glm-distractor-269","prompt":"What is the code to construct a Recurrent Neural Network (RNN) using TensorFlow with an input size of 50 values and an output size of 10 values?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-270","original_id":"glm-distractor-270","prompt":"Create a python 3 class called CompileGLSL that extends Module for compiling GLSL shader files into SPIR-V format using the glslangValidator tool. The class should define required tools, specify output file names with .spv extension, and implement a process method that runs the validator with appropriate stage flags (-S vert for vertex shaders and -S frag for fragment shaders) while handling directory creation and returning the subprocess return code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-271","original_id":"glm-distractor-271","prompt":"Evaluate the definite integral of f(x) = sin(1x) from 1 to 4.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-274","original_id":"glm-distractor-274","prompt":"Calculate the pH of a 0.545 M solution of HCl. Show your calculation step by step.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-275","original_id":"glm-distractor-275","prompt":"Write a Python 3 program that prompts the user to enter three integer numbers and then calculates and displays their sum. The program should use input() to read the numbers from the user and print the result in the format \"Sum = [value]\".","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Conceptual reframes","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
diff --git a/evals/datasets/calibrated/conceptual-reframes.manifest.json b/evals/datasets/calibrated/conceptual-reframes.manifest.json
new file mode 100644
index 0000000..d38d805
--- /dev/null
+++ b/evals/datasets/calibrated/conceptual-reframes.manifest.json
@@ -0,0 +1,65 @@
+{
+ "family": "Conceptual reframes",
+ "family_key": "conceptual-reframes",
+ "skills": [
+ "bounded-rationality",
+ "dual-process",
+ "effectuation",
+ "first-principles",
+ "inversion",
+ "jobs-to-be-done",
+ "lindy-effect",
+ "opportunity-cost",
+ "pre-mortem",
+ "regret-minimization",
+ "reversibility",
+ "steel-manning",
+ "thought-experiment",
+ "triz"
+ ],
+ "value_surface": "paired reasoning quality",
+ "source": "Combined from 6 source files. authored: first-principles-constraint, reversibility-doors, second-order-consequence, cynefin-classify; external: debias-authored, glm-distractor",
+ "leakage": "First-principles-constraint, reversibility-doors, and second-order-consequence are locally authored datasets — zero external leakage. Debias-authored items are locally authored cognitive bias scenarios with anchoring bias types. Some items may resemble classic cognitive bias examples from psychology literature which models may have encountered. GLM distractor items may have training data overlap. Overall leakage risk is low because locally authored items dominate the target set.\n\nSource breakdown: 1 external dataset(s) with potential training-data leakage; 4 authored dataset(s) with zero external leakage; ",
+ "label": {
+ "definition": "Binary decision quality on conceptual reframing tasks: whether the model correctly identifies whether a constraint is fundamental (true) or merely conventional (false); whether a decision is reversible (true) or not (false); whether a proposed action has important second-order consequences (true) or not (false).",
+ "values": {
+ "true": "Correct binary decision",
+ "false": "Incorrect binary decision"
+ },
+ "eval_mode": "ground_truth",
+ "ground_truth_field": "label"
+ },
+ "calibration": {
+ "baseline": 0.641,
+ "baseline_estimated": true,
+ "baseline_note": "Estimated from label distribution (49% true). Balanced distribution suggests items are in the target difficulty band. Actual baseline must be measured by calibration runner.",
+ "band": [
+ 0.4,
+ 0.7
+ ],
+ "status": "pending_calibration",
+ "instructions": "Run EVAL_RUN=calib node evals/run-calibration.js evals/datasets/calibrated/<family>-candidate-pool.jsonl to populate real calibration stats."
+ },
+ "item_counts": {
+ "total": 204,
+ "target": 130,
+ "near_miss": 30,
+ "distractor": 44,
+ "ambiguous": 0,
+ "decisive": 204
+ },
+ "item_class_definitions": {
+ "target": "Items that directly measure the family value surface — in-domain, skill-relevant items where the skill is expected to help.",
+ "near_miss": "Items that are similar to the family domain but not an exact match. Useful for calibration but may not benefit from the skill.",
+ "distractor": "Items that are clearly off-target (target=false). Used to measure false-positive rate and specificity.",
+ "ambiguous": "Items whose relevance to the family is unclear. Excluded from decisive splits."
+ },
+ "decisive_split_rules": {
+ "min_target": 1,
+ "min_distractor": 1,
+ "max_ambiguous": 0,
+ "satisfied": true
+ },
+ "created": "2026-06-06",
+ "frozen": false
+}
\ No newline at end of file
diff --git a/evals/datasets/calibrated/debugging-fault-localization-candidate-pool.jsonl b/evals/datasets/calibrated/debugging-fault-localization-candidate-pool.jsonl
new file mode 100644
index 0000000..1888578
--- /dev/null
+++ b/evals/datasets/calibrated/debugging-fault-localization-candidate-pool.jsonl
@@ -0,0 +1,224 @@
+{"id":"swebench-0","original_id":"swebench-0","prompt":"Repository: astropy/astropy\n\nGitHub issue:\nModeling's `separability_matrix` does not compute separability correctly for nested CompoundModels\nConsider the following model:\r\n\r\n```python\r\nfrom astropy.modeling import models as m\r\nfrom astropy.modeling.separable import separability_matrix\r\n\r\ncm = m.Linear1D(10) & m.Linear1D(5)\r\n```\r\n\r\nIt's separability matrix as you might expect is a diagonal:\r\n\r\n```python\r\n>>> separability_matrix(cm)\r\narray([[ True, False],\r\n [False, True]])\r\n```\r\n\r\nIf I make the model more complex:\r\n```python\r\n>>> separability_matrix(m.Pix2Sky_TAN() & m.Linear1D(10) & m.Linear1D(5))\r\narray([[ True, True, False, False],\r\n [ True, True, False, False],\r\n [False, False, True, False],\r\n [False, False, False, True]])\r\n```\r\n\r\nThe output matrix is again, as expected, the outputs and inputs to the linear models are separable and independent of each other.\r\n\r\nIf however, I nest these compound models:\r\n```python\r\n>>> separability_matrix(m.Pix2Sky_TAN() & cm)\r\narray([[ True, True, False, False],\r\n [ True, True, False, False],\r\n [False, False, True, True],\r\n [False, False, True, True]])\r\n```\r\nSuddenly the inputs and outputs are no longer separable?\r\n\r\nThis feels like a bug to me, but I might be missing something?\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["astropy/modeling/separable.py"],"mode":"swe-localize","license":"MIT","repo":"astropy/astropy","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-1","original_id":"swebench-1","prompt":"Repository: astropy/astropy\n\nGitHub issue:\nPlease support header rows in RestructuredText output\n### Description\r\n\r\nIt would be great if the following would work:\r\n\r\n```Python\r\n>>> from astropy.table import QTable\r\n>>> import astropy.units as u\r\n>>> import sys\r\n>>> tbl = QTable({'wave': [350,950]*u.nm, 'response': [0.7, 1.2]*u.count})\r\n>>> tbl.write(sys.stdout, format=\"ascii.rst\")\r\n===== ========\r\n wave response\r\n===== ========\r\n350.0 0.7\r\n950.0 1.2\r\n===== ========\r\n>>> tbl.write(sys.stdout, format=\"ascii.fixed_width\", header_rows=[\"name\", \"unit\"])\r\n| wave | response |\r\n| nm | ct |\r\n| 350.0 | 0.7 |\r\n| 950.0 | 1.2 |\r\n>>> tbl.write(sys.stdout, format=\"ascii.rst\", header_rows=[\"name\", \"unit\"])\r\nTraceback (most recent call last):\r\n File \"<stdin>\", line 1, in <module>\r\n File \"/usr/lib/python3/dist-packages/astropy/table/connect.py\", line 129, in __call__\r\n self.registry.write(instance, *args, **kwargs)\r\n File \"/usr/lib/python3/dist-packages/astropy/io/registry/core.py\", line 369, in write\r\n return writer(data, *args, **kwargs)\r\n File \"/usr/lib/python3/dist-packages/astropy/io/ascii/connect.py\", line 26, in io_write\r\n return write(table, filename, **kwargs)\r\n File \"/usr/lib/python3/dist-packages/astropy/io/ascii/ui.py\", line 856, in write\r\n writer = get_writer(Writer=Writer, fast_writer=fast_writer, **kwargs)\r\n File \"/usr/lib/python3/dist-packages/astropy/io/ascii/ui.py\", line 800, in get_writer\r\n writer = core._get_writer(Writer, fast_writer, **kwargs)\r\n File \"/usr/lib/python3/dist-packages/astropy/io/ascii/core.py\", line 1719, in _get_writer\r\n writer = Writer(**writer_kwargs)\r\nTypeError: RST.__init__() got an unexpected keyword argument 'header_rows'\r\n```\r\n\r\n\r\n### Additional context\r\n\r\nRestructuredText output is a great way to fill autogenerated documentation with content, so having this flexible makes the life easier `:-)`\r\n\r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["astropy/io/ascii/rst.py"],"mode":"swe-localize","license":"MIT","repo":"astropy/astropy","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-2","original_id":"swebench-2","prompt":"Repository: astropy/astropy\n\nGitHub issue:\nascii.qdp Table format assumes QDP commands are upper case\n### Description\n\nascii.qdp assumes that commands in a QDP file are upper case, for example, for errors they must be \"READ SERR 1 2\" whereas QDP itself is not case sensitive and case use \"read serr 1 2\". \r\n\r\nAs many QDP files are created by hand, the expectation that all commands be all-caps should be removed.\n\n### Expected behavior\n\nThe following qdp file should read into a `Table` with errors, rather than crashing.\r\n```\r\nread serr 1 2 \r\n1 0.5 1 0.5\r\n```\n\n### How to Reproduce\n\nCreate a QDP file:\r\n```\r\n> cat > test.qdp\r\nread serr 1 2 \r\n1 0.5 1 0.5\r\n<EOF>\r\n\r\n > python\r\nPython 3.10.9 (main, Dec 7 2022, 02:03:23) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> from astropy.table import Table\r\n>>> Table.read('test.qdp',format='ascii.qdp')\r\nWARNING: table_id not specified. Reading the first available table [astropy.io.ascii.qdp]\r\nTraceback (most recent call last):\r\n...\r\n raise ValueError(f'Unrecognized QDP line: {line}')\r\nValueError: Unrecognized QDP line: read serr 1 2\r\n```\r\n\r\nRunning \"qdp test.qdp\" works just fine.\r\n\n\n### Versions\n\nPython 3.10.9 (main, Dec 7 2022, 02:03:23) [Clang 13.0.0 (clang-1300.0.29.30)]\r\nastropy 5.1\r\nNumpy 1.24.1\r\npyerfa 2.0.0.1\r\nScipy 1.10.0\r\nMatplotlib 3.6.3\r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["astropy/io/ascii/qdp.py"],"mode":"swe-localize","license":"MIT","repo":"astropy/astropy","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-3","original_id":"swebench-3","prompt":"Repository: astropy/astropy\n\nGitHub issue:\nIn v5.3, NDDataRef mask propagation fails when one of the operand does not have a mask\n### Description\n\nThis applies to v5.3. \r\n\r\nIt looks like when one of the operand does not have a mask, the mask propagation when doing arithmetic, in particular with `handle_mask=np.bitwise_or` fails. This is not a problem in v5.2.\r\n\r\nI don't know enough about how all that works, but it seems from the error that the operand without a mask is set as a mask of None's and then the bitwise_or tries to operate on an integer and a None and fails.\n\n### Expected behavior\n\nWhen one of the operand does not have mask, the mask that exists should just be copied over to the output. Or whatever was done in that situation in v5.2 where there's no problem.\n\n### How to Reproduce\n\nThis is with v5.3. With v5.2, there are no errors.\r\n\r\n```\r\n>>> import numpy as np\r\n>>> from astropy.nddata import NDDataRef\r\n\r\n>>> array = np.array([[0, 1, 0], [1, 0, 1], [0, 1, 0]])\r\n>>> mask = np.array([[0, 1, 64], [8, 0, 1], [2, 1, 0]])\r\n\r\n>>> nref_nomask = NDDataRef(array)\r\n>>> nref_mask = NDDataRef(array, mask=mask)\r\n\r\n# multiply no mask by constant (no mask * no mask)\r\n>>> nref_nomask.multiply(1., handle_mask=np.bitwise_or).mask # returns nothing, no mask, OK\r\n\r\n# multiply no mask by itself (no mask * no mask)\r\n>>> nref_nomask.multiply(nref_nomask, handle_mask=np.bitwise_or).mask # return nothing, no mask, OK\r\n\r\n# multiply mask by constant (mask * no mask)\r\n>>> nref_mask.multiply(1., handle_mask=np.bitwise_or).mask\r\n...\r\nTypeError: unsupported operand type(s) for |: 'int' and 'NoneType'\r\n\r\n# multiply mask by itself (mask * mask)\r\n>>> nref_mask.multiply(nref_mask, handle_mask=np.bitwise_or).mask\r\narray([[ 0, 1, 64],\r\n [ 8, 0, 1],\r\n [ 2, 1, 0]])\r\n\r\n# multiply mask by no mask (mask * no mask)\r\n>>> nref_mask.multiply(nref_nomask, handle_mask=np.bitwise_or).mask\r\n...\r\nTypeError: unsupported operand type(s) for |: 'int' and 'NoneType'\r\n```\r\n\n\n### Versions\n\n>>> import sys; print(\"Python\", sys.version)\r\nPython 3.10.11 | packaged by conda-forge | (main, May 10 2023, 19:07:22) [Clang 14.0.6 ]\r\n>>> import astropy; print(\"astropy\", astropy.__version__)\r\nastropy 5.3\r\n>>> import numpy; print(\"Numpy\", numpy.__version__)\r\nNumpy 1.24.3\r\n>>> import erfa; print(\"pyerfa\", erfa.__version__)\r\npyerfa 2.0.0.3\r\n>>> import scipy; print(\"Scipy\", scipy.__version__)\r\nScipy 1.10.1\r\n>>> import matplotlib; print(\"Matplotlib\", matplotlib.__version__)\r\nMatplotlib 3.7.1\r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["astropy/nddata/mixins/ndarithmetic.py"],"mode":"swe-localize","license":"MIT","repo":"astropy/astropy","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-4","original_id":"swebench-4","prompt":"Repository: astropy/astropy\n\nGitHub issue:\nPossible bug in io.fits related to D exponents\nI came across the following code in ``fitsrec.py``:\r\n\r\n```python\r\n # Replace exponent separator in floating point numbers\r\n if 'D' in format:\r\n output_field.replace(encode_ascii('E'), encode_ascii('D'))\r\n```\r\n\r\nI think this may be incorrect because as far as I can tell ``replace`` is not an in-place operation for ``chararray`` (it returns a copy). Commenting out this code doesn't cause any tests to fail so I think this code isn't being tested anyway.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["astropy/io/fits/fitsrec.py"],"mode":"swe-localize","license":"MIT","repo":"astropy/astropy","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-5","original_id":"swebench-5","prompt":"Repository: astropy/astropy\n\nGitHub issue:\nIssue when passing empty lists/arrays to WCS transformations\nThe following should not fail but instead should return empty lists/arrays:\r\n\r\n```\r\nIn [1]: from astropy.wcs import WCS\r\n\r\nIn [2]: wcs = WCS('2MASS_h.fits')\r\n\r\nIn [3]: wcs.wcs_pix2world([], [], 0)\r\n---------------------------------------------------------------------------\r\nInconsistentAxisTypesError Traceback (most recent call last)\r\n<ipython-input-3-e2cc0e97941a> in <module>()\r\n----> 1 wcs.wcs_pix2world([], [], 0)\r\n\r\n~/Dropbox/Code/Astropy/astropy/astropy/wcs/wcs.py in wcs_pix2world(self, *args, **kwargs)\r\n 1352 return self._array_converter(\r\n 1353 lambda xy, o: self.wcs.p2s(xy, o)['world'],\r\n-> 1354 'output', *args, **kwargs)\r\n 1355 wcs_pix2world.__doc__ = \"\"\"\r\n 1356 Transforms pixel coordinates to world coordinates by doing\r\n\r\n~/Dropbox/Code/Astropy/astropy/astropy/wcs/wcs.py in _array_converter(self, func, sky, ra_dec_order, *args)\r\n 1267 \"a 1-D array for each axis, followed by an origin.\")\r\n 1268 \r\n-> 1269 return _return_list_of_arrays(axes, origin)\r\n 1270 \r\n 1271 raise TypeError(\r\n\r\n~/Dropbox/Code/Astropy/astropy/astropy/wcs/wcs.py in _return_list_of_arrays(axes, origin)\r\n 1223 if ra_dec_order and sky == 'input':\r\n 1224 xy = self._denormalize_sky(xy)\r\n-> 1225 output = func(xy, origin)\r\n 1226 if ra_dec_order and sky == 'output':\r\n 1227 output = self._normalize_sky(output)\r\n\r\n~/Dropbox/Code/Astropy/astropy/astropy/wcs/wcs.py in <lambda>(xy, o)\r\n 1351 raise ValueError(\"No basic WCS settings were created.\")\r\n 1352 return self._array_converter(\r\n-> 1353 lambda xy, o: self.wcs.p2s(xy, o)['world'],\r\n 1354 'output', *args, **kwargs)\r\n 1355 wcs_pix2world.__doc__ = \"\"\"\r\n\r\nInconsistentAxisTypesError: ERROR 4 in wcsp2s() at line 2646 of file cextern/wcslib/C/wcs.c:\r\nncoord and/or nelem inconsistent with the wcsprm.\r\n```\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["astropy/wcs/wcs.py"],"mode":"swe-localize","license":"MIT","repo":"astropy/astropy","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-6","original_id":"swebench-6","prompt":"Repository: django/django\n\nGitHub issue:\nSet default FILE_UPLOAD_PERMISSION to 0o644.\nDescription\n\t\nHello,\nAs far as I can see, the ​File Uploads documentation page does not mention any permission issues.\nWhat I would like to see is a warning that in absence of explicitly configured FILE_UPLOAD_PERMISSIONS, the permissions for a file uploaded to FileSystemStorage might not be consistent depending on whether a MemoryUploadedFile or a TemporaryUploadedFile was used for temporary storage of the uploaded data (which, with the default FILE_UPLOAD_HANDLERS, in turn depends on the uploaded data size).\nThe tempfile.NamedTemporaryFile + os.rename sequence causes the resulting file permissions to be 0o0600 on some systems (I experience it here on CentOS 7.4.1708 and Python 3.6.5). In all probability, the implementation of Python's built-in tempfile module explicitly sets such permissions for temporary files due to security considerations.\nI found mentions of this issue ​on GitHub, but did not manage to find any existing bug report in Django's bug tracker.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/conf/global_settings.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-7","original_id":"swebench-7","prompt":"Repository: django/django\n\nGitHub issue:\nAllow FilePathField path to accept a callable.\nDescription\n\t\nI have a special case where I want to create a model containing the path to some local files on the server/dev machine. Seeing as the place where these files are stored is different on different machines I have the following:\nimport os\nfrom django.conf import settings\nfrom django.db import models\nclass LocalFiles(models.Model):\n\tname = models.CharField(max_length=255)\n\tfile = models.FilePathField(path=os.path.join(settings.LOCAL_FILE_DIR, 'example_dir'))\nNow when running manage.py makemigrations it will resolve the path based on the machine it is being run on. Eg: /home/<username>/server_files/example_dir\nI had to manually change the migration to include the os.path.join() part to not break this when running the migration on production/other machine.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-8","original_id":"swebench-8","prompt":"Repository: django/django\n\nGitHub issue:\nIncorrect removal of order_by clause created as multiline RawSQL\nDescription\n\t\nHi.\nThe SQLCompiler is ripping off one of my \"order by\" clause, because he \"thinks\" the clause was already \"seen\" (in SQLCompiler.get_order_by()). I'm using expressions written as multiline RawSQLs, which are similar but not the same. \nThe bug is located in SQLCompiler.get_order_by(), somewhere around line computing part of SQL query without ordering:\nwithout_ordering = self.ordering_parts.search(sql).group(1)\nThe sql variable contains multiline sql. As a result, the self.ordering_parts regular expression is returning just a line containing ASC or DESC words. This line is added to seen set, and because my raw queries have identical last lines, only the first clasue is returing from SQLCompiler.get_order_by().\nAs a quick/temporal fix I can suggest making sql variable clean of newline characters, like this:\nsql_oneline = ' '.join(sql.split('\\n'))\nwithout_ordering = self.ordering_parts.search(sql_oneline).group(1)\nNote: beware of unicode (Py2.x u'') and EOL dragons (\\r).\nExample of my query:\n\treturn MyModel.objects.all().order_by(\n\t\tRawSQL('''\n\t\t\tcase when status in ('accepted', 'verification')\n\t\t\t\t then 2 else 1 end''', []).desc(),\n\t\tRawSQL('''\n\t\t\tcase when status in ('accepted', 'verification')\n\t\t\t\t then (accepted_datetime, preferred_datetime)\n\t\t\t\t else null end''', []).asc(),\n\t\tRawSQL('''\n\t\t\tcase when status not in ('accepted', 'verification')\n\t\t\t\t then (accepted_datetime, preferred_datetime, created_at)\n\t\t\t\t else null end''', []).desc())\nThe ordering_parts.search is returing accordingly:\n'\t\t\t\t then 2 else 1 end)'\n'\t\t\t\t else null end'\n'\t\t\t\t else null end'\nSecond RawSQL with a\t\t\t\t else null end part is removed from query.\nThe fun thing is that the issue can be solved by workaround by adding a space or any other char to the last line. \nSo in case of RawSQL I can just say, that current implementation of avoiding duplicates in order by clause works only for special/rare cases (or does not work in all cases). \nThe bug filed here is about wrong identification of duplicates (because it compares only last line of SQL passed to order by clause).\nHope my notes will help you fixing the issue. Sorry for my english.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/compiler.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-9","original_id":"swebench-9","prompt":"Repository: django/django\n\nGitHub issue:\nMerging 3 or more media objects can throw unnecessary MediaOrderConflictWarnings\nDescription\n\t\nConsider the following form definition, where text-editor-extras.js depends on text-editor.js but all other JS files are independent:\nfrom django import forms\nclass ColorPicker(forms.Widget):\n\tclass Media:\n\t\tjs = ['color-picker.js']\nclass SimpleTextWidget(forms.Widget):\n\tclass Media:\n\t\tjs = ['text-editor.js']\nclass FancyTextWidget(forms.Widget):\n\tclass Media:\n\t\tjs = ['text-editor.js', 'text-editor-extras.js', 'color-picker.js']\nclass MyForm(forms.Form):\n\tbackground_color = forms.CharField(widget=ColorPicker())\n\tintro = forms.CharField(widget=SimpleTextWidget())\n\tbody = forms.CharField(widget=FancyTextWidget())\nDjango should be able to resolve the JS files for the final form into the order text-editor.js, text-editor-extras.js, color-picker.js. However, accessing MyForm().media results in:\n/projects/django/django/forms/widgets.py:145: MediaOrderConflictWarning: Detected duplicate Media files in an opposite order:\ntext-editor-extras.js\ntext-editor.js\n MediaOrderConflictWarning,\nMedia(css={}, js=['text-editor-extras.js', 'color-picker.js', 'text-editor.js'])\nThe MediaOrderConflictWarning is a result of the order that the additions happen in: ColorPicker().media + SimpleTextWidget().media produces Media(css={}, js=['color-picker.js', 'text-editor.js']), which (wrongly) imposes the constraint that color-picker.js must appear before text-editor.js.\nThe final result is particularly unintuitive here, as it's worse than the \"naïve\" result produced by Django 1.11 before order-checking was added (color-picker.js, text-editor.js, text-editor-extras.js), and the pair of files reported in the warning message seems wrong too (aren't color-picker.js and text-editor.js the wrong-ordered ones?)\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/widgets.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-10","original_id":"swebench-10","prompt":"Repository: django/django\n\nGitHub issue:\nsqlmigrate wraps it's outpout in BEGIN/COMMIT even if the database doesn't support transactional DDL\nDescription\n\t \n\t\t(last modified by Simon Charette)\n\t \nThe migration executor only adds the outer BEGIN/COMMIT ​if the migration is atomic and ​the schema editor can rollback DDL but the current sqlmigrate logic only takes migration.atomic into consideration.\nThe issue can be addressed by\nChanging sqlmigrate ​assignment of self.output_transaction to consider connection.features.can_rollback_ddl as well.\nAdding a test in tests/migrations/test_commands.py based on ​an existing test for non-atomic migrations that mocks connection.features.can_rollback_ddl to False instead of overdidding MIGRATION_MODULES to point to a non-atomic migration.\nI marked the ticket as easy picking because I included the above guidelines but feel free to uncheck it if you deem it inappropriate.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/management/commands/sqlmigrate.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-11","original_id":"swebench-11","prompt":"Repository: django/django\n\nGitHub issue:\nCorrect expected format in invalid DurationField error message\nDescription\n\t\nIf you enter a duration \"14:00\" into a duration field, it translates to \"00:14:00\" which is 14 minutes.\nThe current error message for invalid DurationField says that this should be the format of durations: \"[DD] [HH:[MM:]]ss[.uuuuuu]\". But according to the actual behaviour, it should be: \"[DD] [[HH:]MM:]ss[.uuuuuu]\", because seconds are mandatory, minutes are optional, and hours are optional if minutes are provided.\nThis seems to be a mistake in all Django versions that support the DurationField.\nAlso the duration fields could have a default help_text with the requested format, because the syntax is not self-explanatory.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-12","original_id":"swebench-12","prompt":"Repository: django/django\n\nGitHub issue:\nUsernameValidator allows trailing newline in usernames\nDescription\n\t\nASCIIUsernameValidator and UnicodeUsernameValidator use the regex \nr'^[\\w.@+-]+$'\nThe intent is to only allow alphanumeric characters as well as ., @, +, and -. However, a little known quirk of Python regexes is that $ will also match a trailing newline. Therefore, the user name validators will accept usernames which end with a newline. You can avoid this behavior by instead using \\A and \\Z to terminate regexes. For example, the validator regex could be changed to\nr'\\A[\\w.@+-]+\\Z'\nin order to reject usernames that end with a newline.\nI am not sure how to officially post a patch, but the required change is trivial - using the regex above in the two validators in contrib.auth.validators.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/auth/validators.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-13","original_id":"swebench-13","prompt":"Repository: django/django\n\nGitHub issue:\nHttpResponse doesn't handle memoryview objects\nDescription\n\t\nI am trying to write a BinaryField retrieved from the database into a HttpResponse. When the database is Sqlite this works correctly, but Postgresql returns the contents of the field as a memoryview object and it seems like current Django doesn't like this combination:\nfrom django.http import HttpResponse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n# String content\nresponse = HttpResponse(\"My Content\")\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\nresponse.content\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n# Out: b'My Content'\n# This is correct\n# Bytes content\nresponse = HttpResponse(b\"My Content\")\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \nresponse.content\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n# Out: b'My Content'\n# This is also correct\n# memoryview content\nresponse = HttpResponse(memoryview(b\"My Content\"))\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \nresponse.content\n# Out: b'<memory at 0x7fcc47ab2648>'\n# This is not correct, I am expecting b'My Content'\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/http/response.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-14","original_id":"swebench-14","prompt":"Repository: django/django\n\nGitHub issue:\ndelete() on instances of models without any dependencies doesn't clear PKs.\nDescription\n\t\nDeleting any model with no dependencies not updates the PK on the model. It should be set to None after .delete() call.\nSee Django.db.models.deletion:276-281. Should update the model line 280.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/deletion.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-15","original_id":"swebench-15","prompt":"Repository: django/django\n\nGitHub issue:\nMigration auth.0011_update_proxy_permissions fails for models recreated as a proxy.\nDescription\n\t \n\t\t(last modified by Mariusz Felisiak)\n\t \nI am trying to update my project to Django 2.2. When I launch python manage.py migrate, I get this error message when migration auth.0011_update_proxy_permissions is applying (full stacktrace is available ​here):\ndjango.db.utils.IntegrityError: duplicate key value violates unique constraint \"idx_18141_auth_permission_content_type_id_01ab375a_uniq\" DETAIL: Key (co.ntent_type_id, codename)=(12, add_agency) already exists.\nIt looks like the migration is trying to re-create already existing entries in the auth_permission table. At first I though it cloud because we recently renamed a model. But after digging and deleting the entries associated with the renamed model from our database in the auth_permission table, the problem still occurs with other proxy models.\nI tried to update directly from 2.0.13 and 2.1.8. The issues appeared each time. I also deleted my venv and recreated it without an effect.\nI searched for a ticket about this on the bug tracker but found nothing. I also posted this on ​django-users and was asked to report this here.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/auth/migrations/0011_update_proxy_permissions.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-16","original_id":"swebench-16","prompt":"Repository: django/django\n\nGitHub issue:\nAutoreloader with StatReloader doesn't track changes in manage.py.\nDescription\n\t \n\t\t(last modified by Mariusz Felisiak)\n\t \nThis is a bit convoluted, but here we go.\nEnvironment (OSX 10.11):\n$ python -V\nPython 3.6.2\n$ pip -V\npip 19.1.1\n$ pip install Django==2.2.1\nSteps to reproduce:\nRun a server python manage.py runserver\nEdit the manage.py file, e.g. add print(): \ndef main():\n\tprint('sth')\n\tos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ticket_30479.settings')\n\t...\nUnder 2.1.8 (and prior), this will trigger the auto-reloading mechanism. Under 2.2.1, it won't. As far as I can tell from the django.utils.autoreload log lines, it never sees the manage.py itself.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/autoreload.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-17","original_id":"swebench-17","prompt":"Repository: django/django\n\nGitHub issue:\nAdd support for SCRIPT_NAME in STATIC_URL and MEDIA_URL\nDescription\n\t \n\t\t(last modified by Rostyslav Bryzgunov)\n\t \nBy default, {% static '...' %} tag just appends STATIC_URL in the path. When running on sub-path, using SCRIPT_NAME WSGI param, it results in incorrect static URL - it doesn't prepend SCRIPT_NAME prefix.\nThis problem can be solved with prepending SCRIPT_NAME to STATIC_URL in settings.py but that doesn't work when SCRIPT_NAME is a dynamic value.\nThis can be easily added into default Django static tag and django.contrib.staticfiles tag as following:\ndef render(self, context):\n\turl = self.url(context)\n\t# Updating url here with request.META['SCRIPT_NAME'] \n\tif self.varname is None:\n\t\treturn url\n\tcontext[self.varname] = url\n\t\treturn ''\nOn more research I found that FileSystemStorage and StaticFilesStorage ignores SCRIPT_NAME as well. \nWe might have to do a lot of changes but I think it's worth the efforts.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/conf/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-18","original_id":"swebench-18","prompt":"Repository: django/django\n\nGitHub issue:\nAuto-reloading with StatReloader very intermittently throws \"ValueError: embedded null byte\".\nDescription\n\t\nRaising this mainly so that it's tracked, as I have no idea how to reproduce it, nor why it's happening. It ultimately looks like a problem with Pathlib, which wasn't used prior to 2.2.\nStacktrace:\nTraceback (most recent call last):\n File \"manage.py\" ...\n\texecute_from_command_line(sys.argv)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line\n\tutility.execute()\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/__init__.py\", line 375, in execute\n\tself.fetch_command(subcommand).run_from_argv(self.argv)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/base.py\", line 323, in run_from_argv\n\tself.execute(*args, **cmd_options)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py\", line 60, in execute\n\tsuper().execute(*args, **options)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/base.py\", line 364, in execute\n\toutput = self.handle(*args, **options)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py\", line 95, in handle\n\tself.run(**options)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py\", line 102, in run\n\tautoreload.run_with_reloader(self.inner_run, **options)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py\", line 577, in run_with_reloader\n\tstart_django(reloader, main_func, *args, **kwargs)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py\", line 562, in start_django\n\treloader.run(django_main_thread)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py\", line 280, in run\n\tself.run_loop()\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py\", line 286, in run_loop\n\tnext(ticker)\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py\", line 326, in tick\n\tfor filepath, mtime in self.snapshot_files():\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py\", line 342, in snapshot_files\n\tfor file in self.watched_files():\n File \"/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py\", line 241, in watched\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/autoreload.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-19","original_id":"swebench-19","prompt":"Repository: django/django\n\nGitHub issue:\nWhen DEBUG is True, raising Http404 in a path converter's to_python method does not result in a technical response\nDescription\n\t\nThis is the response I get (plain text): \nA server error occurred. Please contact the administrator.\nI understand a ValueError should be raised which tells the URL resolver \"this path does not match, try next one\" but Http404 is what came to my mind intuitively and the error message was not very helpful.\nOne could also make a point that raising a Http404 should be valid way to tell the resolver \"this is indeed the right path but the current parameter value does not match anything so stop what you are doing and let the handler return the 404 page (including a helpful error message when DEBUG is True instead of the default 'Django tried these URL patterns')\".\nThis would prove useful for example to implement a path converter that uses get_object_or_404.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/views/debug.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-20","original_id":"swebench-20","prompt":"Repository: django/django\n\nGitHub issue:\nDjango throws error when different apps with different models have the same name table name.\nDescription\n\t\nError message:\ntable_name: (models.E028) db_table 'table_name' is used by multiple models: base.ModelName, app2.ModelName.\nWe have a Base app that points to a central database and that has its own tables. We then have multiple Apps that talk to their own databases. Some share the same table names.\nWe have used this setup for a while, but after upgrading to Django 2.2 we're getting an error saying we're not allowed 2 apps, with 2 different models to have the same table names. \nIs this correct behavior? We've had to roll back to Django 2.0 for now.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/checks/model_checks.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-21","original_id":"swebench-21","prompt":"Repository: django/django\n\nGitHub issue:\nAdd check to ensure max_length fits longest choice.\nDescription\n\t\nThere is currently no check to ensure that Field.max_length is large enough to fit the longest value in Field.choices.\nThis would be very helpful as often this mistake is not noticed until an attempt is made to save a record with those values that are too long.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-22","original_id":"swebench-22","prompt":"Repository: django/django\n\nGitHub issue:\nFiltering on query result overrides GROUP BY of internal query\nDescription\n\t\nfrom django.contrib.auth import models\na = models.User.objects.filter(email__isnull=True).values('email').annotate(m=Max('id')).values('m')\nprint(a.query) # good\n# SELECT MAX(\"auth_user\".\"id\") AS \"m\" FROM \"auth_user\" WHERE \"auth_user\".\"email\" IS NULL GROUP BY \"auth_user\".\"email\"\nprint(a[:1].query) # good\n# SELECT MAX(\"auth_user\".\"id\") AS \"m\" FROM \"auth_user\" WHERE \"auth_user\".\"email\" IS NULL GROUP BY \"auth_user\".\"email\" LIMIT 1\nb = models.User.objects.filter(id=a[:1])\nprint(b.query) # GROUP BY U0.\"id\" should be GROUP BY U0.\"email\"\n# SELECT ... FROM \"auth_user\" WHERE \"auth_user\".\"id\" = (SELECT U0.\"id\" FROM \"auth_user\" U0 WHERE U0.\"email\" IS NULL GROUP BY U0.\"id\" LIMIT 1)\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/lookups.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-23","original_id":"swebench-23","prompt":"Repository: django/django\n\nGitHub issue:\nMigrations uses value of enum object instead of its name.\nDescription\n\t \n\t\t(last modified by oasl)\n\t \nWhen using Enum object as a default value for a CharField, the generated migration file uses the value of the Enum object instead of the its name. This causes a problem when using Django translation on the value of the Enum object. \nThe problem is that, when the Enum object value get translated to the users language, the old migration files raise an error stating that the Enum does not have the corresponding value. (because the Enum value is translated to another language)\nExample:\nLet say we have this code in models.py:\nfrom enum import Enum\nfrom django.utils.translation import gettext_lazy as _\nfrom django.db import models\nclass Status(Enum):\n\tGOOD = _('Good') # 'Good' will be translated\n\tBAD = _('Bad') # 'Bad' will be translated\n\tdef __str__(self):\n\t\treturn self.name\nclass Item(models.Model):\n\tstatus = models.CharField(default=Status.GOOD, max_length=128)\nIn the generated migration file, the code will be:\n...\n('status', models.CharField(default=Status('Good'), max_length=128))\n...\nAfter the translation, 'Good' will be translated to another word and it will not be part of the Status Enum class any more, so the migration file will raise the error on the previous line:\nValueError: 'Good' is not a valid Status\nShouldn't the code generated by the migration uses the name of the Status Enum 'GOOD', not the value of it, since it is changeable?\nIt should be:\n('status', models.CharField(default=Status['GOOD'], max_length=128))\nThis will be correct regardless of the translated word\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/serializer.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-24","original_id":"swebench-24","prompt":"Repository: django/django\n\nGitHub issue:\ndjango.utils.http.parse_http_date two digit year check is incorrect\nDescription\n\t \n\t\t(last modified by Ad Timmering)\n\t \nRFC 850 does not mention this, but in RFC 7231 (and there's something similar in RFC 2822), there's the following quote:\nRecipients of a timestamp value in rfc850-date format, which uses a\ntwo-digit year, MUST interpret a timestamp that appears to be more\nthan 50 years in the future as representing the most recent year in\nthe past that had the same last two digits.\nCurrent logic is hard coded to consider 0-69 to be in 2000-2069, and 70-99 to be 1970-1999, instead of comparing versus the current year.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/http.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-25","original_id":"swebench-25","prompt":"Repository: django/django\n\nGitHub issue:\nPrevent using __isnull lookup with non-boolean value.\nDescription\n\t \n\t\t(last modified by Mariusz Felisiak)\n\t \n__isnull should not allow for non-boolean values. Using truthy/falsey doesn't promote INNER JOIN to an OUTER JOIN but works fine for a simple queries. Using non-boolean values is ​undocumented and untested. IMO we should raise an error for non-boolean values to avoid confusion and for consistency.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/lookups.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-26","original_id":"swebench-26","prompt":"Repository: django/django\n\nGitHub issue:\nForeignKey's to_field parameter gets the old field's name when renaming a PrimaryKey.\nDescription\n\t\nHaving these two models \nclass ModelA(models.Model):\n\tfield_wrong = models.CharField('field1', max_length=50, primary_key=True) # I'm a Primary key.\nclass ModelB(models.Model):\n\tfield_fk = models.ForeignKey(ModelA, blank=True, null=True, on_delete=models.CASCADE) \n... migrations applyed ...\nthe ModelA.field_wrong field has been renamed ... and Django recognizes the \"renaming\"\n# Primary key renamed\nclass ModelA(models.Model):\n\tfield_fixed = models.CharField('field1', max_length=50, primary_key=True) # I'm a Primary key.\nAttempts to to_field parameter. \nThe to_field points to the old_name (field_typo) and not to the new one (\"field_fixed\")\nclass Migration(migrations.Migration):\n\tdependencies = [\n\t\t('app1', '0001_initial'),\n\t]\n\toperations = [\n\t\tmigrations.RenameField(\n\t\t\tmodel_name='modela',\n\t\t\told_name='field_wrong',\n\t\t\tnew_name='field_fixed',\n\t\t),\n\t\tmigrations.AlterField(\n\t\t\tmodel_name='modelb',\n\t\t\tname='modela',\n\t\t\tfield=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app1.ModelB', to_field='field_wrong'),\n\t\t),\n\t]\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/autodetector.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-27","original_id":"swebench-27","prompt":"Repository: django/django\n\nGitHub issue:\nThe value of a TextChoices/IntegerChoices field has a differing type\nDescription\n\t\nIf we create an instance of a model having a CharField or IntegerField with the keyword choices pointing to IntegerChoices or TextChoices, the value returned by the getter of the field will be of the same type as the one created by enum.Enum (enum value).\nFor example, this model:\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\nclass MyChoice(models.TextChoices):\n\tFIRST_CHOICE = \"first\", _(\"The first choice, it is\")\n\tSECOND_CHOICE = \"second\", _(\"The second choice, it is\")\nclass MyObject(models.Model):\n\tmy_str_value = models.CharField(max_length=10, choices=MyChoice.choices)\nThen this test:\nfrom django.test import TestCase\nfrom testing.pkg.models import MyObject, MyChoice\nclass EnumTest(TestCase):\n\tdef setUp(self) -> None:\n\t\tself.my_object = MyObject.objects.create(my_str_value=MyChoice.FIRST_CHOICE)\n\tdef test_created_object_is_str(self):\n\t\tmy_object = self.my_object\n\t\tself.assertIsInstance(my_object.my_str_value, str)\n\t\tself.assertEqual(str(my_object.my_str_value), \"first\")\n\tdef test_retrieved_object_is_str(self):\n\t\tmy_object = MyObject.objects.last()\n\t\tself.assertIsInstance(my_object.my_str_value, str)\n\t\tself.assertEqual(str(my_object.my_str_value), \"first\")\nAnd then the results:\n(django30-venv) ➜ django30 ./manage.py test\nCreating test database for alias 'default'...\nSystem check identified no issues (0 silenced).\nF.\n======================================================================\nFAIL: test_created_object_is_str (testing.tests.EnumTest)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"/Users/mikailkocak/Development/django30/testing/tests.py\", line 14, in test_created_object_is_str\n\tself.assertEqual(str(my_object.my_str_value), \"first\")\nAssertionError: 'MyChoice.FIRST_CHOICE' != 'first'\n- MyChoice.FIRST_CHOICE\n+ first\n----------------------------------------------------------------------\nRan 2 tests in 0.002s\nFAILED (failures=1)\nWe notice when invoking __str__(...) we don't actually get the value property of the enum value which can lead to some unexpected issues, especially when communicating to an external API with a freshly created instance that will send MyEnum.MyValue, and the one that was retrieved would send my_value.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/enums.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-28","original_id":"swebench-28","prompt":"Repository: django/django\n\nGitHub issue:\nCannot override get_FOO_display() in Django 2.2+.\nDescription\n\t\nI cannot override the get_FIELD_display function on models since version 2.2. It works in version 2.1.\nExample:\nclass FooBar(models.Model):\n\tfoo_bar = models.CharField(_(\"foo\"), choices=[(1, 'foo'), (2, 'bar')])\n\tdef __str__(self):\n\t\treturn self.get_foo_bar_display() # This returns 'foo' or 'bar' in 2.2, but 'something' in 2.1\n\tdef get_foo_bar_display(self):\n\t\treturn \"something\"\nWhat I expect is that I should be able to override this function.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-29","original_id":"swebench-29","prompt":"Repository: django/django\n\nGitHub issue:\nadmin_views.test_multidb fails with persistent test SQLite database.\nDescription\n\t \n\t\t(last modified by Mariusz Felisiak)\n\t \nI've tried using persistent SQLite databases for the tests (to make use of\n--keepdb), but at least some test fails with:\nsqlite3.OperationalError: database is locked\nThis is not an issue when only using TEST[\"NAME\"] with \"default\" (which is good enough in terms of performance).\ndiff --git i/tests/test_sqlite.py w/tests/test_sqlite.py\nindex f1b65f7d01..9ce4e32e14 100644\n--- i/tests/test_sqlite.py\n+++ w/tests/test_sqlite.py\n@@ -15,9 +15,15 @@\n DATABASES = {\n\t 'default': {\n\t\t 'ENGINE': 'django.db.backends.sqlite3',\n+\t\t'TEST': {\n+\t\t\t'NAME': 'test_default.sqlite3'\n+\t\t},\n\t },\n\t 'other': {\n\t\t 'ENGINE': 'django.db.backends.sqlite3',\n+\t\t'TEST': {\n+\t\t\t'NAME': 'test_other.sqlite3'\n+\t\t},\n\t }\n }\n% tests/runtests.py admin_views.test_multidb -v 3 --keepdb --parallel 1\n…\nOperations to perform:\n Synchronize unmigrated apps: admin_views, auth, contenttypes, messages, sessions, staticfiles\n Apply all migrations: admin, sites\nRunning pre-migrate handlers for application contenttypes\nRunning pre-migrate handlers for application auth\nRunning pre-migrate handlers for application sites\nRunning pre-migrate handlers for application sessions\nRunning pre-migrate handlers for application admin\nRunning pre-migrate handlers for application admin_views\nSynchronizing apps without migrations:\n Creating tables...\n\tRunning deferred SQL...\nRunning migrations:\n No migrations to apply.\nRunning post-migrate handlers for application contenttypes\nRunning post-migrate handlers for application auth\nRunning post-migrate handlers for application sites\nRunning post-migrate handlers for application sessions\nRunning post-migrate handlers for application admin\nRunning post-migrate handlers for application admin_views\nSystem check identified no issues (0 silenced).\nERROR\n======================================================================\nERROR: setUpClass (admin_views.test_multidb.MultiDatabaseTests)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"…/Vcs/django/django/db/backends/utils.py\", line 84, in _execute\n\treturn self.cursor.execute(sql, params)\n File \"…/Vcs/django/django/db/backends/sqlite3/base.py\", line 391, in execute\n\treturn Database.Cursor.execute(self, query, params)\nsqlite3.OperationalError: database is locked\nThe above exception was the direct cause of the following exception:\nTraceback (most recent cal\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/backends/sqlite3/creation.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-30","original_id":"swebench-30","prompt":"Repository: django/django\n\nGitHub issue:\nmakemigrations produces incorrect path for inner classes\nDescription\n\t\nWhen you define a subclass from django.db.models.Field as an inner class of some other class, and use this field inside a django.db.models.Model class, then when you run manage.py makemigrations, a migrations file is created which refers to the inner class as if it were a top-level class of the module it is in.\nTo reproduce, create the following as your model:\nclass Outer(object):\n\tclass Inner(models.CharField):\n\t\tpass\nclass A(models.Model):\n\tfield = Outer.Inner(max_length=20)\nAfter running manage.py makemigrations, the generated migrations file contains the following:\nmigrations.CreateModel(\n\tname='A',\n\tfields=[\n\t\t('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n\t\t('field', test1.models.Inner(max_length=20)),\n\t],\n),\nNote the test1.models.Inner, which should have been test1.models.Outer.Inner.\nThe real life case involved an EnumField from django-enumfields, defined as an inner class of a Django Model class, similar to this:\nimport enum\nfrom enumfields import Enum, EnumField\nclass Thing(models.Model):\n\[email protected]\n\tclass State(Enum):\n\t\ton = 'on'\n\t\toff = 'off'\n\tstate = EnumField(enum=State)\nThis results in the following migrations code:\nmigrations.CreateModel(\n\tname='Thing',\n\tfields=[\n\t\t('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n\t\t('state', enumfields.fields.EnumField(enum=test1.models.State, max_length=10)),\n\t],\n),\nThis refers to test1.models.State, instead of to test1.models.Thing.State.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/serializer.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-31","original_id":"swebench-31","prompt":"Repository: django/django\n\nGitHub issue:\nOptional URL params crash some view functions.\nDescription\n\t\nMy use case, running fine with Django until 2.2:\nURLConf:\nurlpatterns += [\n\t...\n\tre_path(r'^module/(?P<format>(html|json|xml))?/?$', views.modules, name='modules'),\n]\nView:\ndef modules(request, format='html'):\n\t...\n\treturn render(...)\nWith Django 3.0, this is now producing an error:\nTraceback (most recent call last):\n File \"/l10n/venv/lib/python3.6/site-packages/django/core/handlers/exception.py\", line 34, in inner\n\tresponse = get_response(request)\n File \"/l10n/venv/lib/python3.6/site-packages/django/core/handlers/base.py\", line 115, in _get_response\n\tresponse = self.process_exception_by_middleware(e, request)\n File \"/l10n/venv/lib/python3.6/site-packages/django/core/handlers/base.py\", line 113, in _get_response\n\tresponse = wrapped_callback(request, *callback_args, **callback_kwargs)\nException Type: TypeError at /module/\nException Value: modules() takes from 1 to 2 positional arguments but 3 were given\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/urls/resolvers.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-32","original_id":"swebench-32","prompt":"Repository: django/django\n\nGitHub issue:\nModel.get_FOO_display() does not work correctly with inherited choices.\nDescription\n\t \n\t\t(last modified by Mariusz Felisiak)\n\t \nGiven a base model with choices A containing 3 tuples\nChild Model inherits the base model overrides the choices A and adds 2 more tuples\nget_foo_display does not work correctly for the new tuples added\nExample:\nclass A(models.Model):\n foo_choice = [(\"A\",\"output1\"),(\"B\",\"output2\")]\n field_foo = models.CharField(max_length=254,choices=foo_choice)\n class Meta:\n\t abstract = True\nclass B(A):\n foo_choice = [(\"A\",\"output1\"),(\"B\",\"output2\"),(\"C\",\"output3\")]\n field_foo = models.CharField(max_length=254,choices=foo_choice)\nUpon invoking get_field_foo_display() on instance of B , \nFor value \"A\" and \"B\" the output works correctly i.e. returns \"output1\" / \"output2\"\nbut for value \"C\" the method returns \"C\" and not \"output3\" which is the expected behaviour\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-33","original_id":"swebench-33","prompt":"Repository: django/django\n\nGitHub issue:\ntranslation.E004 shouldn't be raised on sublanguages when a base language is available.\nDescription\n\t\nAccording to Django documentation:\nIf a base language is available but the sublanguage specified is not, Django uses the base language. For example, if a user specifies de-at (Austrian German) but Django only has de available, Django uses de.\nHowever, when using Django 3.0.2, if my settings.py has\nLANGUAGE_CODE = \"de-at\"\nI get this error message:\nSystemCheckError: System check identified some issues:\nERRORS:\n?: (translation.E004) You have provided a value for the LANGUAGE_CODE setting that is not in the LANGUAGES setting.\nIf using\nLANGUAGE_CODE = \"es-ar\"\nDjango works fine (es-ar is one of the translations provided out of the box).\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/checks/translation.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-34","original_id":"swebench-34","prompt":"Repository: django/django\n\nGitHub issue:\nJSONField are not properly displayed in admin when they are readonly.\nDescription\n\t\nJSONField values are displayed as dict when readonly in the admin.\nFor example, {\"foo\": \"bar\"} would be displayed as {'foo': 'bar'}, which is not valid JSON.\nI believe the fix would be to add a special case in django.contrib.admin.utils.display_for_field to call the prepare_value of the JSONField (not calling json.dumps directly to take care of the InvalidJSONInput case).\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/admin/utils.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-35","original_id":"swebench-35","prompt":"Repository: django/django\n\nGitHub issue:\n`TransactionTestCase.serialized_rollback` fails to restore objects due to ordering constraints\nDescription\n\t\nI hit this problem in a fairly complex projet and haven't had the time to write a minimal reproduction case. I think it can be understood just by inspecting the code so I'm going to describe it while I have it in mind.\nSetting serialized_rollback = True on a TransactionTestCase triggers ​rollback emulation. In practice, for each database:\nBaseDatabaseCreation.create_test_db calls connection._test_serialized_contents = connection.creation.serialize_db_to_string()\nTransactionTestCase._fixture_setup calls connection.creation.deserialize_db_from_string(connection._test_serialized_contents)\n(The actual code isn't written that way; it's equivalent but the symmetry is less visible.)\nserialize_db_to_string orders models with serializers.sort_dependencies and serializes them. The sorting algorithm only deals with natural keys. It doesn't do anything to order models referenced by foreign keys before models containing said foreign keys. That wouldn't be possible in general because circular foreign keys are allowed.\ndeserialize_db_from_string deserializes and saves models without wrapping in a transaction. This can result in integrity errors if an instance containing a foreign key is saved before the instance it references. I'm suggesting to fix it as follows:\ndiff --git a/django/db/backends/base/creation.py b/django/db/backends/base/creation.py\nindex bca8376..7bed2be 100644\n--- a/django/db/backends/base/creation.py\n+++ b/django/db/backends/base/creation.py\n@@ -4,7 +4,7 @@ import time\n from django.apps import apps\n from django.conf import settings\n from django.core import serializers\n-from django.db import router\n+from django.db import router, transaction\n from django.utils.six import StringIO\n from django.utils.six.moves import input\n \n@@ -128,8 +128,9 @@ class BaseDatabaseCreation(object):\n\t\t the serialize_db_to_string method.\n\t\t \"\"\"\n\t\t data = StringIO(data)\n-\t\tfor obj in serializers.deserialize(\"json\", data, using=self.connection.alias):\n-\t\t\tobj.save()\n+\t\twith transaction.atomic(using=self.connection.alias):\n+\t\t\tfor obj in serializers.deserialize(\"json\", data, using=self.connection.alias):\n+\t\t\t\tobj.save()\n \n\t def _get_database_display_str(self, verbosity, database_name):\n\t\t \"\"\"\nNote that loaddata doesn't have this problem because it wraps everything in a transaction:\n\tdef handle(self, *fixture_labels, **options):\n\t\t# ...\n\t\twith transaction.atomic(using=self.\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/backends/base/creation.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-36","original_id":"swebench-36","prompt":"Repository: django/django\n\nGitHub issue:\nInherited model doesn't correctly order by \"-pk\" when specified on Parent.Meta.ordering\nDescription\n\t\nGiven the following model definition:\nfrom django.db import models\nclass Parent(models.Model):\n\tclass Meta:\n\t\tordering = [\"-pk\"]\nclass Child(Parent):\n\tpass\nQuerying the Child class results in the following:\n>>> print(Child.objects.all().query)\nSELECT \"myapp_parent\".\"id\", \"myapp_child\".\"parent_ptr_id\" FROM \"myapp_child\" INNER JOIN \"myapp_parent\" ON (\"myapp_child\".\"parent_ptr_id\" = \"myapp_parent\".\"id\") ORDER BY \"myapp_parent\".\"id\" ASC\nThe query is ordered ASC but I expect the order to be DESC.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/compiler.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-37","original_id":"swebench-37","prompt":"Repository: django/django\n\nGitHub issue:\nWrong hint about recursive relationship.\nDescription\n\t \n\t\t(last modified by Matheus Cunha Motta)\n\t \nWhen there's more than 2 ForeignKeys in an intermediary model of a m2m field and no through_fields have been set, Django will show an error with the following hint:\nhint=(\n\t'If you want to create a recursive relationship, '\n\t'use ForeignKey(\"%s\", symmetrical=False, through=\"%s\").'\nBut 'symmetrical' and 'through' are m2m keyword arguments, not ForeignKey.\nThis was probably a small mistake where the developer thought ManyToManyField but typed ForeignKey instead. And the symmetrical=False is an outdated requirement to recursive relationships with intermediary model to self, not required since 3.0. I'll provide a PR with a proposed correction shortly after.\nEdit: fixed description.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/related.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-38","original_id":"swebench-38","prompt":"Repository: django/django\n\nGitHub issue:\nDjango 3.0: \"GROUP BY\" clauses error with tricky field annotation\nDescription\n\t\nLet's pretend that we have next model structure with next model's relations:\nclass A(models.Model):\n\tbs = models.ManyToManyField('B',\n\t\t\t\t\t\t\t\trelated_name=\"a\",\n\t\t\t\t\t\t\t\tthrough=\"AB\")\nclass B(models.Model):\n\tpass\nclass AB(models.Model):\n\ta = models.ForeignKey(A, on_delete=models.CASCADE, related_name=\"ab_a\")\n\tb = models.ForeignKey(B, on_delete=models.CASCADE, related_name=\"ab_b\")\n\tstatus = models.IntegerField()\nclass C(models.Model):\n\ta = models.ForeignKey(\n\t\tA,\n\t\tnull=True,\n\t\tblank=True,\n\t\ton_delete=models.SET_NULL,\n\t\trelated_name=\"c\",\n\t\tverbose_name=_(\"a\")\n\t)\n\tstatus = models.IntegerField()\nLet's try to evaluate next query\nab_query = AB.objects.filter(a=OuterRef(\"pk\"), b=1)\nfilter_conditions = Q(pk=1) | Q(ab_a__b=1)\nquery = A.objects.\\\n\tfilter(filter_conditions).\\\n\tannotate(\n\t\tstatus=Subquery(ab_query.values(\"status\")),\n\t\tc_count=Count(\"c\"),\n)\nanswer = query.values(\"status\").annotate(total_count=Count(\"status\"))\nprint(answer.query)\nprint(answer)\nOn Django 3.0.4 we have an error\ndjango.db.utils.ProgrammingError: column reference \"status\" is ambiguous\nand query is next:\nSELECT (SELECT U0.\"status\" FROM \"test_app_ab\" U0 WHERE (U0.\"a_id\" = \"test_app_a\".\"id\" AND U0.\"b_id\" = 1)) AS \"status\", COUNT((SELECT U0.\"status\" FROM \"test_app_ab\" U0 WHERE (U0.\"a_id\" = \"test_app_a\".\"id\" AND U0.\"b_id\" = 1))) AS \"total_count\" FROM \"test_app_a\" LEFT OUTER JOIN \"test_app_ab\" ON (\"test_app_a\".\"id\" = \"test_app_ab\".\"a_id\") LEFT OUTER JOIN \"test_app_c\" ON (\"test_app_a\".\"id\" = \"test_app_c\".\"a_id\") WHERE (\"test_app_a\".\"id\" = 1 OR \"test_app_ab\".\"b_id\" = 1) GROUP BY \"status\"\nHowever, Django 2.2.11 processed this query properly with the next query:\nSELECT (SELECT U0.\"status\" FROM \"test_app_ab\" U0 WHERE (U0.\"a_id\" = (\"test_app_a\".\"id\") AND U0.\"b_id\" = 1)) AS \"status\", COUNT((SELECT U0.\"status\" FROM \"test_app_ab\" U0 WHERE (U0.\"a_id\" = (\"test_app_a\".\"id\") AND U0.\"b_id\" = 1))) AS \"total_count\" FROM \"test_app_a\" LEFT OUTER JOIN \"test_app_ab\" ON (\"test_app_a\".\"id\" = \"test_app_ab\".\"a_id\") LEFT OUTER JOIN \"test_app_c\" ON (\"test_app_a\".\"id\" = \"test_app_c\".\"a_id\") WHERE (\"test_app_a\".\"id\" = 1 OR \"test_app_ab\".\"b_id\" = 1) GROUP BY (SELECT U0.\"status\" FROM \"test_app_ab\" U0 WHERE (U0.\"a_id\" = (\"test_app_a\".\"id\") AND U0.\"b_id\" = 1))\nso, the difference in \"GROUP BY\" clauses\n(as DB provider uses \"django.db.backends.postgresql\", postgresql 11)\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-39","original_id":"swebench-39","prompt":"Repository: django/django\n\nGitHub issue:\nSettings are cleaned insufficiently.\nDescription\n\t\nPosting publicly after checking with the rest of the security team.\nI just ran into a case where django.views.debug.SafeExceptionReporterFilter.get_safe_settings() would return several un-cleansed values. Looking at cleanse_setting() I realized that we ​only take care of `dict`s but don't take other types of iterables into account but ​return them as-is.\nExample:\nIn my settings.py I have this:\nMY_SETTING = {\n\t\"foo\": \"value\",\n\t\"secret\": \"value\",\n\t\"token\": \"value\",\n\t\"something\": [\n\t\t{\"foo\": \"value\"},\n\t\t{\"secret\": \"value\"},\n\t\t{\"token\": \"value\"},\n\t],\n\t\"else\": [\n\t\t[\n\t\t\t{\"foo\": \"value\"},\n\t\t\t{\"secret\": \"value\"},\n\t\t\t{\"token\": \"value\"},\n\t\t],\n\t\t[\n\t\t\t{\"foo\": \"value\"},\n\t\t\t{\"secret\": \"value\"},\n\t\t\t{\"token\": \"value\"},\n\t\t],\n\t]\n}\nOn Django 3.0 and below:\n>>> import pprint\n>>> from django.views.debug import get_safe_settings\n>>> pprint.pprint(get_safe_settings()[\"MY_SETTING\"])\n{'else': [[{'foo': 'value'}, {'secret': 'value'}, {'token': 'value'}],\n\t\t [{'foo': 'value'}, {'secret': 'value'}, {'token': 'value'}]],\n 'foo': 'value',\n 'secret': '********************',\n 'something': [{'foo': 'value'}, {'secret': 'value'}, {'token': 'value'}],\n 'token': '********************'}\nOn Django 3.1 and up:\n>>> from django.views.debug import SafeExceptionReporterFilter\n>>> import pprint\n>>> pprint.pprint(SafeExceptionReporterFilter().get_safe_settings()[\"MY_SETTING\"])\n{'else': [[{'foo': 'value'}, {'secret': 'value'}, {'token': 'value'}],\n\t\t [{'foo': 'value'}, {'secret': 'value'}, {'token': 'value'}]],\n 'foo': 'value',\n 'secret': '********************',\n 'something': [{'foo': 'value'}, {'secret': 'value'}, {'token': 'value'}],\n 'token': '********************'}\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/views/debug.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-40","original_id":"swebench-40","prompt":"Repository: django/django\n\nGitHub issue:\nMigration crashes deleting an index_together if there is a unique_together on the same fields\nDescription\n\t\nHappens with Django 1.11.10\nSteps to reproduce:\n1) Create models with 2 fields, add 2 same fields to unique_together and to index_together\n2) Delete index_together -> Fail\nIt will fail at django/db/backends/base/schema.py, line 378, in _delete_composed_index(), ValueError: Found wrong number (2) of constraints for as this one will find two constraints, the _uniq and the _idx one. No way to get out of this...\nThe worst in my case is that happened as I wanted to refactor my code to use the \"new\" (Dj 1.11) Options.indexes feature. I am actually not deleting the index, just the way it is declared in my code.\nI think there are 2 different points here:\n1) The deletion of index_together should be possible alone or made coherent (migrations side?) with unique_together\n2) Moving the declaration of an index should not result in an index re-creation\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/backends/base/schema.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-41","original_id":"swebench-41","prompt":"Repository: django/django\n\nGitHub issue:\nQuerySet.Delete - inconsistent result when zero objects deleted\nDescription\n\t\nThe result format of the QuerySet.Delete method is a tuple: (X, Y) \nX - is the total amount of deleted objects (including foreign key deleted objects)\nY - is a dictionary specifying counters of deleted objects for each specific model (the key is the _meta.label of the model and the value is counter of deleted objects of this model).\nExample: <class 'tuple'>: (2, {'my_app.FileAccess': 1, 'my_app.File': 1})\nWhen there are zero objects to delete in total - the result is inconsistent:\nFor models with foreign keys - the result will be: <class 'tuple'>: (0, {})\nFor \"simple\" models without foreign key - the result will be: <class 'tuple'>: (0, {'my_app.BlockLibrary': 0})\nI would expect there will be no difference between the two cases: Either both will have the empty dictionary OR both will have dictionary with model-label keys and zero value.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/deletion.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-42","original_id":"swebench-42","prompt":"Repository: django/django\n\nGitHub issue:\nAdd check for fields of UniqueConstraints.\nDescription\n\t \n\t\t(last modified by Marnanel Thurman)\n\t \nWhen a model gains a UniqueConstraint, makemigrations doesn't check that the fields named therein actually exist.\nThis is in contrast to the older unique_together syntax, which raises models.E012 if the fields don't exist.\nIn the attached demonstration, you'll need to uncomment \"with_unique_together\" in settings.py in order to show that unique_together raises E012.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/base.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-43","original_id":"swebench-43","prompt":"Repository: django/django\n\nGitHub issue:\nUnion queryset should raise on distinct().\nDescription\n\t \n\t\t(last modified by Sielc Technologies)\n\t \nAfter using\n.annotate() on 2 different querysets\nand then .union()\n.distinct() will not affect the queryset\n\tdef setUp(self) -> None:\n\t\tuser = self.get_or_create_admin_user()\n\t\tSample.h.create(user, name=\"Sam1\")\n\t\tSample.h.create(user, name=\"Sam2 acid\")\n\t\tSample.h.create(user, name=\"Sam3\")\n\t\tSample.h.create(user, name=\"Sam4 acid\")\n\t\tSample.h.create(user, name=\"Dub\")\n\t\tSample.h.create(user, name=\"Dub\")\n\t\tSample.h.create(user, name=\"Dub\")\n\t\tself.user = user\n\tdef test_union_annotated_diff_distinct(self):\n\t\tqs = Sample.objects.filter(user=self.user)\n\t\tqs1 = qs.filter(name='Dub').annotate(rank=Value(0, IntegerField()))\n\t\tqs2 = qs.filter(name='Sam1').annotate(rank=Value(1, IntegerField()))\n\t\tqs = qs1.union(qs2)\n\t\tqs = qs.order_by('name').distinct('name') # THIS DISTINCT DOESN'T WORK\n\t\tself.assertEqual(qs.count(), 2)\nexpected to get wrapped union\n\tSELECT DISTINCT ON (siebox_sample.name) * FROM (SELECT ... UNION SELECT ...) AS siebox_sample\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-44","original_id":"swebench-44","prompt":"Repository: django/django\n\nGitHub issue:\nAdd get_response_async for ASGIStaticFilesHandler\nDescription\n\t\nIt looks like the StaticFilesHandlerMixin is missing the the async response function.\nWithout this, when trying to use the ASGIStaticFilesHandler, this is the traceback:\nException inside application: 'NoneType' object is not callable\nTraceback (most recent call last):\n File \".../lib/python3.7/site-packages/daphne/cli.py\", line 30, in asgi\n\tawait self.app(scope, receive, send)\n File \".../src/django/django/contrib/staticfiles/handlers.py\", line 86, in __call__\n\treturn await super().__call__(scope, receive, send)\n File \".../src/django/django/core/handlers/asgi.py\", line 161, in __call__\n\tresponse = await self.get_response_async(request)\n File \".../src/django/django/core/handlers/base.py\", line 148, in get_response_async\n\tresponse = await self._middleware_chain(request)\nTypeError: 'NoneType' object is not callable\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/staticfiles/handlers.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-45","original_id":"swebench-45","prompt":"Repository: django/django\n\nGitHub issue:\nMake django.utils.text.slugify() strip dashes and underscores\nDescription\n\t \n\t\t(last modified by Elinaldo do Nascimento Monteiro)\n\t \nBug generation slug\nExample:\nfrom django.utils import text\ntext.slugify(\"___This is a test ---\")\noutput: ___this-is-a-test-\nImprovement after correction\nfrom django.utils import text\ntext.slugify(\"___This is a test ---\")\noutput: this-is-a-test\n​PR\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/text.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-46","original_id":"swebench-46","prompt":"Repository: django/django\n\nGitHub issue:\nQueryset raises NotSupportedError when RHS has filterable=False attribute.\nDescription\n\t \n\t\t(last modified by Nicolas Baccelli)\n\t \nI'm migrating my app to django 3.0.7 and I hit a strange behavior using a model class with a field labeled filterable\nclass ProductMetaDataType(models.Model):\n\tlabel = models.CharField(max_length=255, unique=True, blank=False, null=False)\n\tfilterable = models.BooleanField(default=False, verbose_name=_(\"filterable\"))\n\tclass Meta:\n\t\tapp_label = \"adminpricing\"\n\t\tverbose_name = _(\"product meta data type\")\n\t\tverbose_name_plural = _(\"product meta data types\")\n\tdef __str__(self):\n\t\treturn self.label\nclass ProductMetaData(models.Model):\n\tid = models.BigAutoField(primary_key=True)\n\tproduct = models.ForeignKey(\n\t\tProduit, null=False, blank=False, on_delete=models.CASCADE\n\t)\n\tvalue = models.TextField(null=False, blank=False)\n\tmarketplace = models.ForeignKey(\n\t\tPlateforme, null=False, blank=False, on_delete=models.CASCADE\n\t)\n\tdate_created = models.DateTimeField(null=True, default=timezone.now)\n\tmetadata_type = models.ForeignKey(\n\t\tProductMetaDataType, null=False, blank=False, on_delete=models.CASCADE\n\t)\n\tclass Meta:\n\t\tapp_label = \"adminpricing\"\n\t\tverbose_name = _(\"product meta data\")\n\t\tverbose_name_plural = _(\"product meta datas\")\nError happened when filtering ProductMetaData with a metadata_type :\nProductMetaData.objects.filter(value=\"Dark Vador\", metadata_type=self.brand_metadata)\nError traceback :\nTraceback (most recent call last):\n File \"/backoffice/backoffice/adminpricing/tests/test_pw.py\", line 481, in test_checkpolicywarning_by_fields\n\tfor p in ProductMetaData.objects.filter(\n File \"/usr/local/lib/python3.8/site-packages/django/db/models/manager.py\", line 82, in manager_method\n\treturn getattr(self.get_queryset(), name)(*args, **kwargs)\n File \"/usr/local/lib/python3.8/site-packages/django/db/models/query.py\", line 904, in filter\n\treturn self._filter_or_exclude(False, *args, **kwargs)\n File \"/usr/local/lib/python3.8/site-packages/django/db/models/query.py\", line 923, in _filter_or_exclude\n\tclone.query.add_q(Q(*args, **kwargs))\n File \"/usr/local/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1351, in add_q\n\tclause, _ = self._add_q(q_object, self.used_aliases)\n File \"/usr/local/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1378, in _add_q\n\tchild_clause, needed_inner = self.build_filter(\n File \"/usr/local/lib/python3.8/site-packages/django/db/models/sql/query.py\", line 1264, in build_filter\n\tself.chec\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-47","original_id":"swebench-47","prompt":"Repository: django/django\n\nGitHub issue:\nSelf referencing foreign key doesn't correctly order by a relation \"_id\" field.\nDescription\n\t\nInitially discovered on 2.2.10 but verified still happens on 3.0.6. Given the following models:\nclass OneModel(models.Model):\n\tclass Meta:\n\t\tordering = (\"-id\",)\n\tid = models.BigAutoField(primary_key=True)\n\troot = models.ForeignKey(\"OneModel\", on_delete=models.CASCADE, null=True)\n\toneval = models.BigIntegerField(null=True)\nclass TwoModel(models.Model):\n\tid = models.BigAutoField(primary_key=True)\n\trecord = models.ForeignKey(OneModel, on_delete=models.CASCADE)\n\ttwoval = models.BigIntegerField(null=True)\nThe following queryset gives unexpected results and appears to be an incorrect SQL query:\nqs = TwoModel.objects.filter(record__oneval__in=[1,2,3])\nqs = qs.order_by(\"record__root_id\")\nprint(qs.query)\nSELECT \"orion_twomodel\".\"id\", \"orion_twomodel\".\"record_id\", \"orion_twomodel\".\"twoval\" FROM \"orion_twomodel\" INNER JOIN \"orion_onemodel\" ON (\"orion_twomodel\".\"record_id\" = \"orion_onemodel\".\"id\") LEFT OUTER JOIN \"orion_onemodel\" T3 ON (\"orion_onemodel\".\"root_id\" = T3.\"id\") WHERE \"orion_onemodel\".\"oneval\" IN (1, 2, 3) ORDER BY T3.\"id\" DESC\nThe query has an unexpected DESCENDING sort. That appears to come from the default sort order on the OneModel class, but I would expect the order_by() to take prececence. The the query has two JOINS, which is unnecessary. It appears that, since OneModel.root is a foreign key to itself, that is causing it to do the unnecessary extra join. In fact, testing a model where root is a foreign key to a third model doesn't show the problem behavior.\nNote also that the queryset with order_by(\"record__root\") gives the exact same SQL.\nThis queryset gives correct results and what looks like a pretty optimal SQL:\nqs = TwoModel.objects.filter(record__oneval__in=[1,2,3])\nqs = qs.order_by(\"record__root__id\")\nprint(qs.query)\nSELECT \"orion_twomodel\".\"id\", \"orion_twomodel\".\"record_id\", \"orion_twomodel\".\"twoval\" FROM \"orion_twomodel\" INNER JOIN \"orion_onemodel\" ON (\"orion_twomodel\".\"record_id\" = \"orion_onemodel\".\"id\") WHERE \"orion_onemodel\".\"oneval\" IN (1, 2, 3) ORDER BY \"orion_onemodel\".\"root_id\" ASC\nSo is this a potential bug or a misunderstanding on my part?\nAnother queryset that works around the issue and gives a reasonable SQL query and expected results:\nqs = TwoModel.objects.filter(record__oneval__in=[1,2,3])\nqs = qs.annotate(root_id=F(\"record__root_id\"))\nqs = qs.order_by(\"root_id\")\nprint(qs.query)\nSELECT \"orion_twomodel\".\"id\", \"orion_twomodel\".\"record_id\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/compiler.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-48","original_id":"swebench-48","prompt":"Repository: django/django\n\nGitHub issue:\nQuerySet.none() on combined queries returns all results.\nDescription\n\t\nI came across this issue on Stack Overflow. I'm not 100% sure it's a bug, but it does seem strange. With this code (excuse the bizarre example filtering):\nclass Publication(models.Model):\n\tpass\nclass Article(models.Model):\n\tpublications = models.ManyToManyField(to=Publication, blank=True, null=True)\nclass ArticleForm(forms.ModelForm):\n\tpublications = forms.ModelMultipleChoiceField(\n\t\tPublication.objects.filter(id__lt=2) | Publication.objects.filter(id__gt=5),\n\t\trequired=False,\n\t)\n\tclass Meta:\n\t\tmodel = Article\n\t\tfields = [\"publications\"]\nclass ArticleAdmin(admin.ModelAdmin):\n\tform = ArticleForm\nThis works well. However, changing the ModelMultipleChoiceField queryset to use union() breaks things.\npublications = forms.ModelMultipleChoiceField(\n\tPublication.objects.filter(id__lt=2).union(\n\t\tPublication.objects.filter(id__gt=5)\n\t),\n\trequired=False,\n)\nThe form correctly shows only the matching objects. However, if you submit this form while empty (i.e. you didn't select any publications), ALL objects matching the queryset will be added. Using the OR query, NO objects are added, as I'd expect.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-49","original_id":"swebench-49","prompt":"Repository: django/django\n\nGitHub issue:\nAllow ValidationErrors to equal each other when created identically\nDescription\n\t \n\t\t(last modified by kamni)\n\t \nCurrently ValidationErrors (django.core.exceptions.ValidationError) that have identical messages don't equal each other, which is counter-intuitive, and can make certain kinds of testing more complicated. Please add an __eq__ method that allows two ValidationErrors to be compared. \nIdeally, this would be more than just a simple self.messages == other.messages. It would be most helpful if the comparison were independent of the order in which errors were raised in a field or in non_field_errors.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/exceptions.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-50","original_id":"swebench-50","prompt":"Repository: django/django\n\nGitHub issue:\nAdd support for item_comments to syndication framework\nDescription\n\t\nAdd comments argument to feed.add_item() in syndication.views so that item_comments can be defined directly without having to take the detour via item_extra_kwargs .\nAdditionally, comments is already explicitly mentioned in the feedparser, but not implemented in the view.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/syndication/views.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-51","original_id":"swebench-51","prompt":"Repository: django/django\n\nGitHub issue:\nAlterOrderWithRespectTo() with ForeignKey crash when _order is included in Index().\nDescription\n\t\n\tclass Meta:\n\t\tdb_table = 'look_image'\n\t\torder_with_respect_to = 'look'\n\t\tindexes = [\n\t\t\tmodels.Index(fields=['look', '_order']),\n\t\t\tmodels.Index(fields=['created_at']),\n\t\t\tmodels.Index(fields=['updated_at']),\n\t\t]\nmigrations.CreateModel(\n\t\t\tname='LookImage',\n\t\t\tfields=[\n\t\t\t\t('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n\t\t\t\t('look', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='posts.Look', verbose_name='LOOK')),\n\t\t\t\t('image_url', models.URLField(blank=True, max_length=10000, null=True)),\n\t\t\t\t('image', models.ImageField(max_length=2000, upload_to='')),\n\t\t\t\t('deleted', models.DateTimeField(editable=False, null=True)),\n\t\t\t\t('created_at', models.DateTimeField(auto_now_add=True)),\n\t\t\t\t('updated_at', models.DateTimeField(auto_now=True)),\n\t\t\t],\n\t\t),\n\t\tmigrations.AddIndex(\n\t\t\tmodel_name='lookimage',\n\t\t\tindex=models.Index(fields=['look', '_order'], name='look_image_look_id_eaff30_idx'),\n\t\t),\n\t\tmigrations.AddIndex(\n\t\t\tmodel_name='lookimage',\n\t\t\tindex=models.Index(fields=['created_at'], name='look_image_created_f746cf_idx'),\n\t\t),\n\t\tmigrations.AddIndex(\n\t\t\tmodel_name='lookimage',\n\t\t\tindex=models.Index(fields=['updated_at'], name='look_image_updated_aceaf9_idx'),\n\t\t),\n\t\tmigrations.AlterOrderWithRespectTo(\n\t\t\tname='lookimage',\n\t\t\torder_with_respect_to='look',\n\t\t),\nI added orders_with_respect_to in new model class's Meta class and also made index for '_order' field by combining with other field. And a new migration file based on the model looks like the code above.\nThe problem is operation AlterOrderWithRespectTo after AddIndex of '_order' raising error because '_order' field had not been created yet.\nIt seems to be AlterOrderWithRespectTo has to proceed before AddIndex of '_order'.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/autodetector.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-52","original_id":"swebench-52","prompt":"Repository: django/django\n\nGitHub issue:\nlimit_choices_to on a ForeignKey can render duplicate options in formfield\nDescription\n\t\nIf you pass a Q object as limit_choices_to on a ForeignKey field involving a join, you may end up with duplicate options in your form.\nSee regressiontest in patch for a clear view on the problem.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/models.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-53","original_id":"swebench-53","prompt":"Repository: django/django\n\nGitHub issue:\nDecoding an invalid session data crashes.\nDescription\n\t \n\t\t(last modified by Matt Hegarty)\n\t \nHi\nI recently upgraded my staging server to 3.1. I think that there was an old session which was still active.\nOn browsing to any URL, I get the crash below. It looks similar to ​this issue.\nI cannot login at all with Chrome - each attempt to access the site results in a crash. Login with Firefox works fine.\nThis is only happening on my Staging site, which is running Gunicorn behind nginx proxy.\nInternal Server Error: /overview/\nTraceback (most recent call last):\nFile \"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py\", line 215, in _get_session\nreturn self._session_cache\nAttributeError: 'SessionStore' object has no attribute '_session_cache'\nDuring handling of the above exception, another exception occurred:\nTraceback (most recent call last):\nFile \"/usr/local/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py\", line 118, in decode\nreturn signing.loads(session_data, salt=self.key_salt, serializer=self.serializer)\nFile \"/usr/local/lib/python3.8/site-packages/django/core/signing.py\", line 135, in loads\nbase64d = TimestampSigner(key, salt=salt).unsign(s, max_age=max_age).encode()\nFile \"/usr/local/lib/python3.8/site-packages/django/core/signing.py\", line 201, in unsign\nresult = super().unsign(value)\nFile \"/usr/local/lib/python3.8/site-packages/django/core/signing.py\", line 184, in unsign\nraise BadSignature('Signature \"%s\" does not match' % sig)\ndjango.core.signing.BadSignature: Signature \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\" does not match\nDuring handling of the above exception, another exception occurred:\nTraceback (most recent call last):\nFile \"/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py\", line 47, in inner\nresponse = get_response(request)\nFile \"/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py\", line 179, in _get_response\nresponse = wrapped_callback(request, *callback_args, **callback_kwargs)\nFile \"/usr/local/lib/python3.8/site-packages/django/views/generic/base.py\", line 73, in view\nreturn self.dispatch(request, *args, **kwargs)\nFile \"/usr/local/lib/python3.8/site-packages/django/contrib/auth/mixins.py\", line 50, in dispatch\nif not request.user.is_authenticated:\nFile \"/usr/local/lib/python3.8/site-packages/django/utils/functional.py\", line 240, in inner\nself._setup()\nFile \"/usr/local/lib/python3.8/site-packages/django/utils/functional.py\", line 376, in _setup\nsel\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/sessions/backends/base.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-54","original_id":"swebench-54","prompt":"Repository: django/django\n\nGitHub issue:\nAbstract model field should not be equal across models\nDescription\n\t\nConsider the following models:\nclass A(models.Model):\n\tclass Meta:\n\t\tabstract = True\n\tmyfield = IntegerField()\nclass B(A):\n\tpass\nclass C(A):\n\tpass\nIf I pull the fields of B and C into a shared set, one will be de-duplicated away, because they compare as equal. I found this surprising, though in practice using a list was sufficient for my need. The root of the issue is that they compare equal, as fields only consider self.creation_counter when comparing for equality.\nlen({B._meta.get_field('myfield'), C._meta.get_field('myfield')}) == 1\nB._meta.get_field('myfield') == C._meta.get_field('myfield')\nWe should adjust __eq__ so that if the field.model is different, they will compare unequal. Similarly, it is probably wise to adjust __hash__ and __lt__ to match.\nWhen adjusting __lt__, it may be wise to order first by self.creation_counter so that cases not affected by this equality collision won't be re-ordered. In my experimental branch, there was one test that broke if I ordered them by model first.\nI brought this up on IRC django-dev to check my intuitions, and those conversing with me there seemed to agree that the current behavior is not intuitive.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-55","original_id":"swebench-55","prompt":"Repository: django/django\n\nGitHub issue:\nAdded model class to app_list context\nDescription\n\t \n\t\t(last modified by Raffaele Salmaso)\n\t \nI need to manipulate the app_list in my custom admin view, and the easiest way to get the result is to have access to the model class (currently the dictionary is a serialized model).\nIn addition I would make the _build_app_dict method public, as it is used by the two views index and app_index.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/admin/sites.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-56","original_id":"swebench-56","prompt":"Repository: django/django\n\nGitHub issue:\nTest runner setup_databases crashes with \"TEST\": {\"MIGRATE\": False}.\nDescription\n\t\nI'm trying to upgrade a project from Django 3.0 to Django 3.1 and wanted to try out the new \"TEST\": {\"MIGRATE\": False} database setting.\nSadly I'm running into an issue immediately when running ./manage.py test.\nRemoving the \"TEST\": {\"MIGRATE\": False} line allows the tests to run. So this is not blocking the upgrade for us, but it would be nice if we were able to use the new feature to skip migrations during testing.\nFor reference, this project was recently upgraded from Django 1.4 all the way to 3.0 so there might be some legacy cruft somewhere that triggers this.\nHere's the trackeback. I'll try to debug this some more.\nTraceback (most recent call last):\n File \"/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py\", line 84, in _execute\n\treturn self.cursor.execute(sql, params)\npsycopg2.errors.UndefinedTable: relation \"django_admin_log\" does not exist\nLINE 1: ...n_flag\", \"django_admin_log\".\"change_message\" FROM \"django_ad...\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ^\nThe above exception was the direct cause of the following exception:\nTraceback (most recent call last):\n File \"/usr/local/lib/python3.6/site-packages/django/db/models/sql/compiler.py\", line 1156, in execute_sql\n\tcursor.execute(sql, params)\n File \"/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py\", line 66, in execute\n\treturn self._execute_with_wrappers(sql, params, many=False, executor=self._execute)\n File \"/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py\", line 75, in _execute_with_wrappers\n\treturn executor(sql, params, many, context)\n File \"/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py\", line 84, in _execute\n\treturn self.cursor.execute(sql, params)\n File \"/usr/local/lib/python3.6/site-packages/django/db/utils.py\", line 90, in __exit__\n\traise dj_exc_value.with_traceback(traceback) from exc_value\n File \"/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py\", line 84, in _execute\n\treturn self.cursor.execute(sql, params)\ndjango.db.utils.ProgrammingError: relation \"django_admin_log\" does not exist\nLINE 1: ...n_flag\", \"django_admin_log\".\"change_message\" FROM \"django_ad...\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ^\nDuring handling of the above exception, another exception occurred:\nTraceback (most recent call last):\n File \"./manage.py\", line 15, in <module>\n\tmain()\n File \"./manage.py\", line 11, in main\n\texecute_from_command_line(sys.argv)\n File \"/usr/local/lib/python3.6/site-packages/d\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/backends/base/creation.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-57","original_id":"swebench-57","prompt":"Repository: django/django\n\nGitHub issue:\nChanging user's email could invalidate password reset tokens\nDescription\n\t\nSequence:\nHave account with email address foo@…\nPassword reset request for that email (unused)\nfoo@… account changes their email address\nPassword reset email is used\nThe password reset email's token should be rejected at that point, but in fact it is allowed.\nThe fix is to add the user's email address into ​PasswordResetTokenGenerator._make_hash_value()\nNothing forces a user to even have an email as per AbstractBaseUser. Perhaps the token generation method could be factored out onto the model, ala get_session_auth_hash().\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/auth/tokens.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-58","original_id":"swebench-58","prompt":"Repository: django/django\n\nGitHub issue:\nUpgrading 2.2>3.0 causes named tuples used as arguments to __range to error.\nDescription\n\t\nI noticed this while upgrading a project from 2.2 to 3.0.\nThis project passes named 2-tuples as arguments to range queryset filters. This works fine on 2.2. On 3.0 it causes the following error: TypeError: __new__() missing 1 required positional argument: 'far'.\nThis happens because django.db.models.sql.query.Query.resolve_lookup_value goes into the tuple elements to resolve lookups and then attempts to reconstitute the tuple with the resolved elements.\nWhen it attempts to construct the new tuple it preserves the type (the named tuple) but it passes a iterator to it's constructor.\nNamedTuples don't have the code path for copying an iterator, and so it errors on insufficient arguments.\nThe fix is to * expand the contents of the iterator into the constructor.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-59","original_id":"swebench-59","prompt":"Repository: django/django\n\nGitHub issue:\nManagementUtility instantiates CommandParser without passing already-computed prog argument\nDescription\n\t\nManagementUtility ​goes to the trouble to parse the program name from the argv it's passed rather than from sys.argv: \n\tdef __init__(self, argv=None):\n\t\tself.argv = argv or sys.argv[:]\n\t\tself.prog_name = os.path.basename(self.argv[0])\n\t\tif self.prog_name == '__main__.py':\n\t\t\tself.prog_name = 'python -m django'\nBut then when it needs to parse --pythonpath and --settings, it ​uses the program name from sys.argv: \n\t\tparser = CommandParser(usage='%(prog)s subcommand [options] [args]', add_help=False, allow_abbrev=False)\nAbove \"%(prog)s\" ​refers to sys.argv[0]. Instead, it should refer to self.prog_name. This can fixed as follows:\n\t\tparser = CommandParser(\n\t\t\tprog=self.prog_name,\n\t\t\tusage='%(prog)s subcommand [options] [args]',\n\t\t\tadd_help=False,\n\t\t\tallow_abbrev=False)\nI'm aware that execute_from_command_line is a private API, but it'd be really convenient for me if it worked properly in my weird embedded environment where sys.argv[0] is ​incorrectly None. If passing my own argv to execute_from_command_line avoided all the ensuing exceptions, I wouldn't have to modify sys.argv[0] globally as I'm doing in the meantime.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/management/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-60","original_id":"swebench-60","prompt":"Repository: django/django\n\nGitHub issue:\nshell command crashes when passing (with -c) the python code with functions.\nDescription\n\t\nThe examples below use Python 3.7 and Django 2.2.16, but I checked that the code is the same on master and works the same in Python 3.8.\nHere's how ​python -c works:\n$ python -c <<EOF \" \nimport django\ndef f():\n\t\tprint(django.__version__)\nf()\"\nEOF\n2.2.16\nHere's how ​python -m django shell -c works (paths shortened for clarify):\n$ python -m django shell -c <<EOF \"\nimport django\ndef f():\n\t\tprint(django.__version__)\nf()\"\nEOF\nTraceback (most recent call last):\n File \"{sys.base_prefix}/lib/python3.7/runpy.py\", line 193, in _run_module_as_main\n\t\"__main__\", mod_spec)\n File \"{sys.base_prefix}/lib/python3.7/runpy.py\", line 85, in _run_code\n\texec(code, run_globals)\n File \"{sys.prefix}/lib/python3.7/site-packages/django/__main__.py\", line 9, in <module>\n\tmanagement.execute_from_command_line()\n File \"{sys.prefix}/lib/python3.7/site-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line\n\tutility.execute()\n File \"{sys.prefix}/lib/python3.7/site-packages/django/core/management/__init__.py\", line 375, in execute\n\tself.fetch_command(subcommand).run_from_argv(self.argv)\n File \"{sys.prefix}/lib/python3.7/site-packages/django/core/management/base.py\", line 323, in run_from_argv\n\tself.execute(*args, **cmd_options)\n File \"{sys.prefix}/lib/python3.7/site-packages/django/core/management/base.py\", line 364, in execute\n\toutput = self.handle(*args, **options)\n File \"{sys.prefix}/lib/python3.7/site-packages/django/core/management/commands/shell.py\", line 86, in handle\n\texec(options['command'])\n File \"<string>\", line 5, in <module>\n File \"<string>\", line 4, in f\nNameError: name 'django' is not defined\nThe problem is in the ​usage of ​exec:\n\tdef handle(self, **options):\n\t\t# Execute the command and exit.\n\t\tif options['command']:\n\t\t\texec(options['command'])\n\t\t\treturn\n\t\t# Execute stdin if it has anything to read and exit.\n\t\t# Not supported on Windows due to select.select() limitations.\n\t\tif sys.platform != 'win32' and not sys.stdin.isatty() and select.select([sys.stdin], [], [], 0)[0]:\n\t\t\texec(sys.stdin.read())\n\t\t\treturn\nexec should be passed a dictionary containing a minimal set of globals. This can be done by just passing a new, empty dictionary as the second argument of exec.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/management/commands/shell.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-61","original_id":"swebench-61","prompt":"Repository: django/django\n\nGitHub issue:\nUse Admin Inline verbose_name as default for Inline verbose_name_plural\nDescription\n\t\nDjango allows specification of a verbose_name and a verbose_name_plural for Inline classes in admin views. However, verbose_name_plural for an Inline is not currently based on a specified verbose_name. Instead, it continues to be based on the model name, or an a verbose_name specified in the model's Meta class. This was confusing to me initially (I didn't understand why I had to specify both name forms for an Inline if I wanted to overrule the default name), and seems inconsistent with the approach for a model's Meta class (which does automatically base the plural form on a specified verbose_name). I propose that verbose_name_plural for an Inline class should by default be based on the verbose_name for an Inline if that is specified.\nI have written a patch to implement this, including tests. Would be happy to submit that.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/admin/options.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-62","original_id":"swebench-62","prompt":"Repository: django/django\n\nGitHub issue:\nUsing __isnull=True on a KeyTransform should not match JSON null on SQLite and Oracle\nDescription\n\t\nThe KeyTransformIsNull lookup borrows the logic from HasKey for isnull=False, which is correct. If isnull=True, the query should only match objects that do not have the key. The query is correct for MariaDB, MySQL, and PostgreSQL. However, on SQLite and Oracle, the query also matches objects that have the key with the value null, which is incorrect.\nTo confirm, edit tests.model_fields.test_jsonfield.TestQuerying.test_isnull_key. For the first assertion, change\n\t\tself.assertSequenceEqual(\n\t\t\tNullableJSONModel.objects.filter(value__a__isnull=True),\n\t\t\tself.objs[:3] + self.objs[5:],\n\t\t)\nto\n\t\tself.assertSequenceEqual(\n\t\t\tNullableJSONModel.objects.filter(value__j__isnull=True),\n\t\t\tself.objs[:4] + self.objs[5:],\n\t\t)\nThe test previously only checks with value__a which could not catch this behavior because the value is not JSON null.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/json.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-63","original_id":"swebench-63","prompt":"Repository: django/django\n\nGitHub issue:\nLog exceptions handled in Signal.send_robust()\nDescription\n\t\nAs pointed out by ​Haki Benita on Twitter, by default Signal.send_robust() doesn't have any log messages for exceptions raised in receivers. Since Django logs exceptions in other similar situations, such as missing template variables, I think it would be worth adding a logger.exception() call in the except clause of send_robust() . Users would then see such exceptions in their error handling tools, e.g. Sentry, and be able to figure out what action to take from there. Ultimately any *expected* exception should be caught with a try in the receiver function.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/dispatch/dispatcher.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-64","original_id":"swebench-64","prompt":"Repository: django/django\n\nGitHub issue:\nmodels.W042 is raised on inherited manually specified primary key.\nDescription\n\t\nI have models which inherit from other models, and they should inherit the primary key. This works fine with Django 3.1. However, if I install Django 3.2 alpha, when I run make_migrations I get the following error messages:\nSystem check identified some issues:\nWARNINGS:\naccounts.ReservedUsername: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.\n\t\tHINT: Configure the DEFAULT_AUTO_FIELD setting or the SpeedyCoreAccountsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.\naccounts.User: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.\n\t\tHINT: Configure the DEFAULT_AUTO_FIELD setting or the SpeedyCoreAccountsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.\nblocks.Block: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.\n\t\tHINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.\ncontact_by_form.Feedback: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.\n\t\tHINT: Configure the DEFAULT_AUTO_FIELD setting or the SpeedyCoreContactByFormConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.\ncore_messages.ReadMark: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.\n\t\tHINT: Configure the DEFAULT_AUTO_FIELD setting or the SpeedyCoreMessagesConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.\nfriendship.Block: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.\n\t\tHINT: Configure the DEFAULT_AUTO_FIELD setting or the AppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.\nfriendship.Follow: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.\n\t\tHINT: Configure the DEFAULT_AUTO_FIELD setting or the App\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/base.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-65","original_id":"swebench-65","prompt":"Repository: django/django\n\nGitHub issue:\nModelChoiceField does not provide value of invalid choice when raising ValidationError\nDescription\n\t \n\t\t(last modified by Aaron Wiegel)\n\t \nCompared with ChoiceField and others, ModelChoiceField does not show the value of the invalid choice when raising a validation error. Passing in parameters with the invalid value and modifying the default error message for the code invalid_choice should fix this.\nFrom source code:\nclass ModelMultipleChoiceField(ModelChoiceField):\n\t\"\"\"A MultipleChoiceField whose choices are a model QuerySet.\"\"\"\n\twidget = SelectMultiple\n\thidden_widget = MultipleHiddenInput\n\tdefault_error_messages = {\n\t\t'invalid_list': _('Enter a list of values.'),\n\t\t'invalid_choice': _('Select a valid choice. %(value)s is not one of the'\n\t\t\t\t\t\t\t' available choices.'),\n\t\t'invalid_pk_value': _('“%(pk)s” is not a valid value.')\n\t}\n\t...\nclass ModelChoiceField(ChoiceField):\n\t\"\"\"A ChoiceField whose choices are a model QuerySet.\"\"\"\n\t# This class is a subclass of ChoiceField for purity, but it doesn't\n\t# actually use any of ChoiceField's implementation.\n\tdefault_error_messages = {\n\t\t'invalid_choice': _('Select a valid choice. That choice is not one of'\n\t\t\t\t\t\t\t' the available choices.'),\n\t}\n\t...\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/models.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-66","original_id":"swebench-66","prompt":"Repository: django/django\n\nGitHub issue:\nSaving parent object after setting on child leads to data loss for parents with non-numeric primary key.\nDescription\n\t \n\t\t(last modified by Charlie DeTar)\n\t \nGiven a model with a foreign key relation to another model that has a non-auto CharField as its primary key:\nclass Product(models.Model):\n\tsku = models.CharField(primary_key=True, max_length=50)\nclass Order(models.Model):\n\tproduct = models.ForeignKey(Product, on_delete=models.CASCADE)\nIf the relation is initialized on the parent with an empty instance that does not yet specify its primary key, and the primary key is subsequently defined, the parent does not \"see\" the primary key's change:\nwith transaction.atomic():\n\torder = Order()\n\torder.product = Product()\n\torder.product.sku = \"foo\"\n\torder.product.save()\n\torder.save()\n\tassert Order.objects.filter(product_id=\"\").exists() # Succeeds, but shouldn't\n\tassert Order.objects.filter(product=order.product).exists() # Fails\nInstead of product_id being populated with product.sku, it is set to emptystring. The foreign key constraint which would enforce the existence of a product with sku=\"\" is deferred until the transaction commits. The transaction does correctly fail on commit with a ForeignKeyViolation due to the non-existence of a product with emptystring as its primary key.\nOn the other hand, if the related unsaved instance is initialized with its primary key before assignment to the parent, it is persisted correctly:\nwith transaction.atomic():\n\torder = Order()\n\torder.product = Product(sku=\"foo\")\n\torder.product.save()\n\torder.save()\n\tassert Order.objects.filter(product=order.product).exists() # succeeds\nCommitting the transaction also succeeds.\nThis may have something to do with how the Order.product_id field is handled at assignment, together with something about handling fetching of auto vs non-auto primary keys from the related instance.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/base.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-67","original_id":"swebench-67","prompt":"Repository: django/django\n\nGitHub issue:\n\"TypeError: cannot pickle\" when applying | operator to a Q object\nDescription\n\t \n\t\t(last modified by Daniel Izquierdo)\n\t \nUsing a reference to a non-pickleable type of object such as dict_keys in a Q object makes the | operator fail:\n>>> from django.db.models import Q\n>>> Q(x__in={}.keys())\n<Q: (AND: ('x__in', dict_keys([])))>\n>>> Q() | Q(x__in={}.keys())\nTraceback (most recent call last):\n...\nTypeError: cannot pickle 'dict_keys' object\nEven though this particular example could be solved by doing Q() | Q(x__in={}) it still feels like using .keys() should work.\nI can work on a patch if there's agreement that this should not crash.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/query_utils.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-68","original_id":"swebench-68","prompt":"Repository: django/django\n\nGitHub issue:\nQ(...) & Exists(...) raises a TypeError\nDescription\n\t\nExists(...) & Q(...) works, but Q(...) & Exists(...) raise a TypeError\nHere's a minimal example:\nIn [3]: Exists(Product.objects.all()) & Q()\nOut[3]: <Q: (AND: <django.db.models.expressions.Exists object at 0x7fc18dd0ed90>, (AND: ))>\nIn [4]: Q() & Exists(Product.objects.all())\n---------------------------------------------------------------------------\nTypeError\t\t\t\t\t\t\t\t Traceback (most recent call last)\n<ipython-input-4-21d3dea0fcb9> in <module>\n----> 1 Q() & Exists(Product.objects.all())\n~/Code/venv/ecom/lib/python3.8/site-packages/django/db/models/query_utils.py in __and__(self, other)\n\t 90 \n\t 91\t def __and__(self, other):\n---> 92\t\t return self._combine(other, self.AND)\n\t 93 \n\t 94\t def __invert__(self):\n~/Code/venv/ecom/lib/python3.8/site-packages/django/db/models/query_utils.py in _combine(self, other, conn)\n\t 71\t def _combine(self, other, conn):\n\t 72\t\t if not isinstance(other, Q):\n---> 73\t\t\t raise TypeError(other)\n\t 74 \n\t 75\t\t # If the other Q() is empty, ignore it and just use `self`.\nTypeError: <django.db.models.expressions.Exists object at 0x7fc18dd21400>\nThe & (and |) operators should be commutative on Q-Exists pairs, but it's not\nI think there's a missing definition of __rand__ somewhere.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/query_utils.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-69","original_id":"swebench-69","prompt":"Repository: django/django\n\nGitHub issue:\nResolverMatch.__repr__() doesn't handle functools.partial() nicely.\nDescription\n\t \n\t\t(last modified by Nick Pope)\n\t \nWhen a partial function is passed as the view, the __repr__ shows the func argument as functools.partial which isn't very helpful, especially as it doesn't reveal the underlying function or arguments provided.\nBecause a partial function also has arguments provided up front, we need to handle those specially so that they are accessible in __repr__.\nISTM that we can simply unwrap functools.partial objects in ResolverMatch.__init__().\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/urls/resolvers.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-70","original_id":"swebench-70","prompt":"Repository: django/django\n\nGitHub issue:\nDEFAULT_AUTO_FIELD subclass check fails for subclasses of BigAutoField and SmallAutoField.\nDescription\n\t\nSet DEFAULT_AUTO_FIELD = \"example.core.models.MyBigAutoField\" , with contents of example.core.models:\nfrom django.db import models\nclass MyBigAutoField(models.BigAutoField):\n\tpass\nclass MyModel(models.Model):\n\tpass\nDjango then crashes with:\nTraceback (most recent call last):\n File \"/..././manage.py\", line 21, in <module>\n\tmain()\n File \"/..././manage.py\", line 17, in main\n\texecute_from_command_line(sys.argv)\n File \"/.../venv/lib/python3.9/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line\n\tutility.execute()\n File \"/.../venv/lib/python3.9/site-packages/django/core/management/__init__.py\", line 395, in execute\n\tdjango.setup()\n File \"/.../venv/lib/python3.9/site-packages/django/__init__.py\", line 24, in setup\n\tapps.populate(settings.INSTALLED_APPS)\n File \"/.../venv/lib/python3.9/site-packages/django/apps/registry.py\", line 114, in populate\n\tapp_config.import_models()\n File \"/.../venv/lib/python3.9/site-packages/django/apps/config.py\", line 301, in import_models\n\tself.models_module = import_module(models_module_name)\n File \"/Users/chainz/.pyenv/versions/3.9.1/lib/python3.9/importlib/__init__.py\", line 127, in import_module\n\treturn _bootstrap._gcd_import(name[level:], package, level)\n File \"<frozen importlib._bootstrap>\", line 1030, in _gcd_import\n File \"<frozen importlib._bootstrap>\", line 1007, in _find_and_load\n File \"<frozen importlib._bootstrap>\", line 986, in _find_and_load_unlocked\n File \"<frozen importlib._bootstrap>\", line 680, in _load_unlocked\n File \"<frozen importlib._bootstrap_external>\", line 790, in exec_module\n File \"<frozen importlib._bootstrap>\", line 228, in _call_with_frames_removed\n File \"/.../example/core/models.py\", line 8, in <module>\n\tclass MyModel(models.Model):\n File \"/.../venv/lib/python3.9/site-packages/django/db/models/base.py\", line 320, in __new__\n\tnew_class._prepare()\n File \"/.../venv/lib/python3.9/site-packages/django/db/models/base.py\", line 333, in _prepare\n\topts._prepare(cls)\n File \"/.../venv/lib/python3.9/site-packages/django/db/models/options.py\", line 285, in _prepare\n\tpk_class = self._get_default_pk_class()\n File \"/.../venv/lib/python3.9/site-packages/django/db/models/options.py\", line 246, in _get_default_pk_class\n\traise ValueError(\nValueError: Primary key 'example.core.models.MyBigAutoField' referred by DEFAULT_AUTO_FIELD must subclass AutoField.\nThis can be fixed in AutoFieldMe\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-71","original_id":"swebench-71","prompt":"Repository: django/django\n\nGitHub issue:\ndjango-admin startapp with trailing slash in directory name results in error\nDescription\n\t\nBash tab-completion appends trailing slashes to directory names. django-admin startapp name directory/ results in the error:\nCommandError: '' is not a valid app directory. Please make sure the directory is a valid identifier.\nThe error is caused by ​line 77 of django/core/management/templates.py by calling basename() on the path with no consideration for a trailing slash:\nself.validate_name(os.path.basename(target), 'directory')\nRemoving potential trailing slashes would solve the problem:\nself.validate_name(os.path.basename(target.rstrip(os.sep)), 'directory')\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/management/templates.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-72","original_id":"swebench-72","prompt":"Repository: django/django\n\nGitHub issue:\nLabel for ReadOnlyPasswordHashWidget points to non-labelable element.\nDescription\n\t \n\t\t(last modified by David Sanders)\n\t \nIn the admin, the label element for the ReadOnlyPasswordHashWidget widget has a 'for' attribute which points to a non-labelable element, since the widget just renders text, not an input. There's no labelable element for the widget, so the label shouldn't have a 'for' attribute.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/auth/forms.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-73","original_id":"swebench-73","prompt":"Repository: django/django\n\nGitHub issue:\nBoundWidget.id_for_label ignores id set by ChoiceWidget.options\nDescription\n\t\nIf you look at the implementation of BoundField.subwidgets\nclass BoundField:\n\t...\n\tdef subwidgets(self):\n\t\tid_ = self.field.widget.attrs.get('id') or self.auto_id\n\t\tattrs = {'id': id_} if id_ else {}\n\t\tattrs = self.build_widget_attrs(attrs)\n\t\treturn [\n\t\t\tBoundWidget(self.field.widget, widget, self.form.renderer)\n\t\t\tfor widget in self.field.widget.subwidgets(self.html_name, self.value(), attrs=attrs)\n\t\t]\none sees that self.field.widget.subwidgets(self.html_name, self.value(), attrs=attrs) returns a dict and assigns it to widget. Now widget['attrs']['id'] contains the \"id\" we would like to use when rendering the label of our CheckboxSelectMultiple.\nHowever BoundWidget.id_for_label() is implemented as\nclass BoundWidget:\n\t...\n\tdef id_for_label(self):\n\t\treturn 'id_%s_%s' % (self.data['name'], self.data['index'])\nignoring the id available through self.data['attrs']['id']. This re-implementation for rendering the \"id\" is confusing and presumably not intended. Nobody has probably realized that so far, because rarely the auto_id-argument is overridden when initializing a form. If however we do, one would assume that the method BoundWidget.id_for_label renders that string as specified through the auto_id format-string.\nBy changing the code from above to\nclass BoundWidget:\n\t...\n\tdef id_for_label(self):\n\t\treturn self.data['attrs']['id']\nthat function behaves as expected.\nPlease note that this error only occurs when rendering the subwidgets of a widget of type CheckboxSelectMultiple. This has nothing to do with the method BoundField.id_for_label().\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/boundfield.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-74","original_id":"swebench-74","prompt":"Repository: django/django\n\nGitHub issue:\nMissing import statement in generated migration (NameError: name 'models' is not defined)\nDescription\n\t\nI found a bug in Django's latest release: 3.2.4. \nGiven the following contents of models.py:\nfrom django.db import models\nclass MyField(models.TextField):\n\tpass\nclass MyBaseModel(models.Model):\n\tclass Meta:\n\t\tabstract = True\nclass MyMixin:\n\tpass\nclass MyModel(MyMixin, MyBaseModel):\n\tname = MyField(primary_key=True)\nThe makemigrations command will generate the following migration file:\n# Generated by Django 3.2.4 on 2021-06-30 19:13\nimport app.models\nfrom django.db import migrations\nclass Migration(migrations.Migration):\n\tinitial = True\n\tdependencies = [\n\t]\n\toperations = [\n\t\tmigrations.CreateModel(\n\t\t\tname='MyModel',\n\t\t\tfields=[\n\t\t\t\t('name', app.models.MyField(primary_key=True, serialize=False)),\n\t\t\t],\n\t\t\toptions={\n\t\t\t\t'abstract': False,\n\t\t\t},\n\t\t\tbases=(app.models.MyMixin, models.Model),\n\t\t),\n\t]\nWhich will then fail with the following error:\n File \"/home/jj/django_example/app/migrations/0001_initial.py\", line 7, in <module>\n\tclass Migration(migrations.Migration):\n File \"/home/jj/django_example/app/migrations/0001_initial.py\", line 23, in Migration\n\tbases=(app.models.MyMixin, models.Model),\nNameError: name 'models' is not defined\nExpected behavior: Django generates a migration file that is valid Python.\nActual behavior: Django generates a migration file that is missing an import statement.\nI think this is a bug of the module django.db.migrations.writer, but I'm not sure. I will be happy to assist with debugging.\nThanks for your attention,\nJaap Joris\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/serializer.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-75","original_id":"swebench-75","prompt":"Repository: django/django\n\nGitHub issue:\nAdd `nonform` CSS class for non form errors in FormSets\nDescription\n\t \n\t\t(last modified by Ties Jan Hefting)\n\t \nForms add the nonfield CSS class for non field errors in ErrorList instances. This is documented in a section on ​rendering form error messages. Similarly, in FormSets I'd expect to see the nonform CSS class added for non form errors. This would allow a custom ErrorList to make a distinction in form field errors, non field errors (forms) and non form errors (FormSets) when rendering error messages. Therefore I'd suggest to add this nonform CSS class and document it for developers to use.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/formsets.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-76","original_id":"swebench-76","prompt":"Repository: django/django\n\nGitHub issue:\nQuerySet.defer() doesn't clear deferred field when chaining with only().\nDescription\n\t\nConsidering a simple Company model with four fields: id, name, trade_number and country. If we evaluate a queryset containing a .defer() following a .only(), the generated sql query selects unexpected fields. For example: \nCompany.objects.only(\"name\").defer(\"name\")\nloads all the fields with the following query:\nSELECT \"company\".\"id\", \"company\".\"name\", \"company\".\"trade_number\", \"company\".\"country\" FROM \"company\"\nand \nCompany.objects.only(\"name\").defer(\"name\").defer(\"country\")\nalso loads all the fields with the same query:\nSELECT \"company\".\"id\", \"company\".\"name\", \"company\".\"trade_number\", \"company\".\"country\" FROM \"company\"\nIn those two cases, i would expect the sql query to be:\nSELECT \"company\".\"id\" FROM \"company\"\nIn the following example, we get the expected behavior:\nCompany.objects.only(\"name\", \"country\").defer(\"name\")\nonly loads \"id\" and \"country\" fields with the following query:\nSELECT \"company\".\"id\", \"company\".\"country\" FROM \"company\"\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-77","original_id":"swebench-77","prompt":"Repository: django/django\n\nGitHub issue:\nMissing call `make_hashable` on `through_fields` in `ManyToManyRel`\nDescription\n\t\nIn 3.2 identity property has been added to all ForeignObjectRel to make it possible to compare them. A hash is derived from said identity and it's possible because identity is a tuple. To make limit_choices_to hashable (one of this tuple elements), ​there's a call to make_hashable.\nIt happens that through_fields can be a list. In such case, this make_hashable call is missing in ​ManyToManyRel.\nFor some reason it only fails on checking proxy model. I think proxy models have 29 checks and normal ones 24, hence the issue, but that's just a guess.\nMinimal repro:\nclass Parent(models.Model):\n\tname = models.CharField(max_length=256)\nclass ProxyParent(Parent):\n\tclass Meta:\n\t\tproxy = True\nclass Child(models.Model):\n\tparent = models.ForeignKey(Parent, on_delete=models.CASCADE)\n\tmany_to_many_field = models.ManyToManyField(\n\t\tto=Parent,\n\t\tthrough=\"ManyToManyModel\",\n\t\tthrough_fields=['child', 'parent'],\n\t\trelated_name=\"something\"\n\t)\nclass ManyToManyModel(models.Model):\n\tparent = models.ForeignKey(Parent, on_delete=models.CASCADE, related_name='+')\n\tchild = models.ForeignKey(Child, on_delete=models.CASCADE, related_name='+')\n\tsecond_child = models.ForeignKey(Child, on_delete=models.CASCADE, null=True, default=None)\nWhich will result in \n File \"manage.py\", line 23, in <module>\n\tmain()\n File \"manage.py\", line 19, in main\n\texecute_from_command_line(sys.argv)\n File \"/home/tom/PycharmProjects/broken_m2m_project/venv/lib/python3.8/site-packages/django/core/management/__init__.py\", line 419, in execute_from_command_line\n\tutility.execute()\n File \"/home/tom/PycharmProjects/broken_m2m_project/venv/lib/python3.8/site-packages/django/core/management/__init__.py\", line 413, in execute\n\tself.fetch_command(subcommand).run_from_argv(self.argv)\n File \"/home/tom/PycharmProjects/broken_m2m_project/venv/lib/python3.8/site-packages/django/core/management/base.py\", line 354, in run_from_argv\n\tself.execute(*args, **cmd_options)\n File \"/home/tom/PycharmProjects/broken_m2m_project/venv/lib/python3.8/site-packages/django/core/management/base.py\", line 393, in execute\n\tself.check()\n File \"/home/tom/PycharmProjects/broken_m2m_project/venv/lib/python3.8/site-packages/django/core/management/base.py\", line 419, in check\n\tall_issues = checks.run_checks(\n File \"/home/tom/PycharmProjects/broken_m2m_project/venv/lib/python3.8/site-packages/django/core/checks/registry.py\", line 76, in run_checks\n\tnew_errors = check(app_confi\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/reverse_related.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-78","original_id":"swebench-78","prompt":"Repository: django/django\n\nGitHub issue:\nPrevent developers from defining a related_name on symmetrical ManyToManyFields\nDescription\n\t\nIn ManyToManyField, if the symmetrical argument is passed, or if it's a self-referential ManyToMany relationship, the related field on the target model is not created. However, if a developer passes in the related_name not understanding this fact, they may be confused until they find the information about symmetrical relationship. Thus, it is proposed to raise an error when the user defines a ManyToManyField in this condition.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/related.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-79","original_id":"swebench-79","prompt":"Repository: django/django\n\nGitHub issue:\nRefactor AutocompleteJsonView to support extra fields in autocomplete response\nDescription\n\t \n\t\t(last modified by mrts)\n\t \nAdding data attributes to items in ordinary non-autocomplete foreign key fields that use forms.widgets.Select-based widgets is relatively easy. This enables powerful and dynamic admin site customizations where fields from related models are updated immediately when users change the selected item.\nHowever, adding new attributes to autocomplete field results currently requires extending contrib.admin.views.autocomplete.AutocompleteJsonView and fully overriding the AutocompleteJsonView.get() method. Here's an example:\nclass MyModelAdmin(admin.ModelAdmin):\n\tdef get_urls(self):\n\t\treturn [\n\t\t\tpath('autocomplete/', CustomAutocompleteJsonView.as_view(admin_site=self.admin_site))\n\t\t\tif url.pattern.match('autocomplete/')\n\t\t\telse url for url in super().get_urls()\n\t\t]\nclass CustomAutocompleteJsonView(AutocompleteJsonView):\n\tdef get(self, request, *args, **kwargs):\n\t\tself.term, self.model_admin, self.source_field, to_field_name = self.process_request(request)\n\t\tif not self.has_perm(request):\n\t\t\traise PermissionDenied\n\t\tself.object_list = self.get_queryset()\n\t\tcontext = self.get_context_data()\n\t\treturn JsonResponse({\n\t\t\t'results': [\n\t\t\t\t{'id': str(getattr(obj, to_field_name)), 'text': str(obj), 'notes': obj.notes} # <-- customization here\n\t\t\t\tfor obj in context['object_list']\n\t\t\t],\n\t\t\t'pagination': {'more': context['page_obj'].has_next()},\n\t\t})\nThe problem with this is that as AutocompleteJsonView.get() keeps evolving, there's quite a lot of maintenance overhead required to catch up.\nThe solutions is simple, side-effect- and risk-free: adding a result customization extension point to get() by moving the lines that construct the results inside JsonResponse constructor to a separate method. So instead of\n\t\treturn JsonResponse({\n\t\t\t'results': [\n\t\t\t\t{'id': str(getattr(obj, to_field_name)), 'text': str(obj)}\n\t\t\t\tfor obj in context['object_list']\n\t\t\t],\n\t\t\t'pagination': {'more': context['page_obj'].has_next()},\n\t\t})\nthere would be\n\t\treturn JsonResponse({\n\t\t\t'results': [\n\t\t\t\tself.serialize_result(obj, to_field_name) for obj in context['object_list']\n\t\t\t],\n\t\t\t'pagination': {'more': context['page_obj'].has_next()},\n\t\t})\nwhere serialize_result() contains the original object to dictionary conversion code that would be now easy to override:\ndef serialize_result(self, obj, to_field_name):\n\treturn {'id': str(getattr(obj, to_field_name)), 'text': str(obj)}\nThe exam\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/admin/views/autocomplete.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-80","original_id":"swebench-80","prompt":"Repository: django/django\n\nGitHub issue:\nmethod_decorator() should preserve wrapper assignments\nDescription\n\t\nthe function that is passed to the decorator is a partial object and does not have any of the attributes expected from a function i.e. __name__, __module__ etc...\nconsider the following case\ndef logger(func):\n\t@wraps(func)\n\tdef inner(*args, **kwargs):\n\t\ttry:\n\t\t\tresult = func(*args, **kwargs)\n\t\texcept Exception as e:\n\t\t\tresult = str(e)\n\t\tfinally:\n\t\t\tlogger.debug(f\"{func.__name__} called with args: {args} and kwargs: {kwargs} resulting: {result}\")\n\treturn inner\nclass Test:\n\t@method_decorator(logger)\n\tdef hello_world(self):\n\t\treturn \"hello\"\nTest().test_method()\nThis results in the following exception\nAttributeError: 'functools.partial' object has no attribute '__name__'\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/decorators.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-81","original_id":"swebench-81","prompt":"Repository: django/django\n\nGitHub issue:\nWrong URL generated by get_admin_url for readonly field in custom Admin Site\nDescription\n\t\nWhen a model containing a ForeignKey field is viewed (or edited) in a custom Admin Site, and that ForeignKey field is listed in readonly_fields, the url generated for the link is /admin/... instead of /custom-admin/....\nThis appears to be caused by the following line in django.contrib.admin.helpers get_admin_url:\nurl = reverse(url_name, args=[quote(remote_obj.pk)])\nOther parts of the admin use the current_app keyword parameter to identify the correct current name of the Admin Site. (See django.contrib.admin.options.ModelAdmin response_add as just one example)\nI have been able to correct this specific issue by replacing the above line with:\nurl = reverse(\n\turl_name,\n\targs=[quote(remote_obj.pk)],\n\tcurrent_app=self.model_admin.admin_site.name\n)\nHowever, I don't know if there are any side effects and I have not yet run the full suite of tests on this. Mostly looking for feedback whether I'm on the right track.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/admin/helpers.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-82","original_id":"swebench-82","prompt":"Repository: django/django\n\nGitHub issue:\nModelChoiceIteratorValue is not hashable.\nDescription\n\t\nRecently I migrated from Django 3.0 to Django 3.1. In my code, I add custom data-* attributes to the select widget options. After the upgrade some of those options broke. Error is {TypeError}unhashable type: 'ModelChoiceIteratorValue'.\nExample (this one breaks):\n\tdef create_option(self, name, value, label, selected, index, subindex=None, attrs=None):\n\t\tcontext = super().create_option(name, value, label, selected, index, subindex, attrs)\n\t\tif not value:\n\t\t\treturn context\n\t\tif value in self.show_fields: # This is a dict {1: ['first_name', 'last_name']}\n\t\t\tcontext['attrs']['data-fields'] = json.dumps(self.show_fields[value])\nHowever, working with arrays is not an issue:\n\tdef create_option(self, name, value, label, selected, index, subindex=None, attrs=None):\n\t\tcontext = super().create_option(name, value, label, selected, index, subindex, attrs)\n\t\tif not value:\n\t\t\treturn context\n\t\tif value in allowed_values: # This is an array [1, 2]\n\t\t\t...\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/models.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-83","original_id":"swebench-83","prompt":"Repository: django/django\n\nGitHub issue:\nRemaking table with unique constraint crashes on SQLite.\nDescription\n\t\nIn Django 4.0a1, this model:\nclass Tag(models.Model):\n\tname = models.SlugField(help_text=\"The tag key.\")\n\tvalue = models.CharField(max_length=150, help_text=\"The tag value.\")\n\tclass Meta:\n\t\tordering = [\"name\", \"value\"]\n\t\tconstraints = [\n\t\t\tmodels.UniqueConstraint(\n\t\t\t\t\"name\",\n\t\t\t\t\"value\",\n\t\t\t\tname=\"unique_name_value\",\n\t\t\t)\n\t\t]\n\tdef __str__(self):\n\t\treturn f\"{self.name}={self.value}\"\nwith these migrations, using sqlite:\nclass Migration(migrations.Migration):\n\tinitial = True\n\tdependencies = [\n\t]\n\toperations = [\n\t\tmigrations.CreateModel(\n\t\t\tname='Tag',\n\t\t\tfields=[\n\t\t\t\t('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),\n\t\t\t\t('name', models.SlugField(help_text='The tag key.')),\n\t\t\t\t('value', models.CharField(help_text='The tag value.', max_length=200)),\n\t\t\t],\n\t\t\toptions={\n\t\t\t\t'ordering': ['name', 'value'],\n\t\t\t},\n\t\t),\n\t\tmigrations.AddConstraint(\n\t\t\tmodel_name='tag',\n\t\t\tconstraint=models.UniqueConstraint(django.db.models.expressions.F('name'), django.db.models.expressions.F('value'), name='unique_name_value'),\n\t\t),\n\t]\nclass Migration(migrations.Migration):\n\tdependencies = [\n\t\t('myapp', '0001_initial'),\n\t]\n\toperations = [\n\t\tmigrations.AlterField(\n\t\t\tmodel_name='tag',\n\t\t\tname='value',\n\t\t\tfield=models.CharField(help_text='The tag value.', max_length=150),\n\t\t),\n\t]\nraises this error:\nmanage.py migrate\nOperations to perform:\n Apply all migrations: admin, auth, contenttypes, myapp, sessions\nRunning migrations:\n Applying myapp.0002_alter_tag_value...python-BaseException\nTraceback (most recent call last):\n File \"D:\\Projects\\Development\\sqliteerror\\.venv\\lib\\site-packages\\django\\db\\backends\\utils.py\", line 84, in _execute\n\treturn self.cursor.execute(sql, params)\n File \"D:\\Projects\\Development\\sqliteerror\\.venv\\lib\\site-packages\\django\\db\\backends\\sqlite3\\base.py\", line 416, in execute\n\treturn Database.Cursor.execute(self, query, params)\nsqlite3.OperationalError: the \".\" operator prohibited in index expressions\nThe above exception was the direct cause of the following exception:\nTraceback (most recent call last):\n File \"D:\\Projects\\Development\\sqliteerror\\.venv\\lib\\site-packages\\django\\core\\management\\base.py\", line 373, in run_from_argv\n\tself.execute(*args, **cmd_options)\n File \"D:\\Projects\\Development\\sqliteerror\\.venv\\lib\\site-packages\\django\\core\\management\\base.py\", line 417, in execute\n\toutput = self.handle(*args, **options)\n File \"D:\\Projects\\Devel\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/backends/ddl_references.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-84","original_id":"swebench-84","prompt":"Repository: django/django\n\nGitHub issue:\nRenameModel with db_table should be a noop.\nDescription\n\t\nA RenameModel operation that already has db_table defined must be a noop.\nIn Postgres, it drops and recreates foreign key constraints. In sqlite it recreates the table (as expected for a table renaming).\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/operations/models.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-85","original_id":"swebench-85","prompt":"Repository: django/django\n\nGitHub issue:\nRemove \"for = ...\" from MultiWidget's <label>.\nDescription\n\t\nThe instance from Raw MultiWidget class generate id_for_label like f'{id_}0'\nIt has not sense.\nFor example ChoiceWidget has self.add_id_index and I can decide it myself, how I will see label_id - with or without index.\nI think, it is better to remove completely id_for_label method from MultiWidget Class.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/widgets.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-86","original_id":"swebench-86","prompt":"Repository: django/django\n\nGitHub issue:\nURLField throws ValueError instead of ValidationError on clean\nDescription\n\t\nforms.URLField( ).clean('////]@N.AN')\nresults in:\n\tValueError: Invalid IPv6 URL\n\tTraceback (most recent call last):\n\t File \"basic_fuzzer.py\", line 22, in TestOneInput\n\t File \"fuzzers.py\", line 350, in test_forms_URLField\n\t File \"django/forms/fields.py\", line 151, in clean\n\t File \"django/forms/fields.py\", line 136, in run_validators\n\t File \"django/core/validators.py\", line 130, in __call__\n\t File \"urllib/parse.py\", line 440, in urlsplit\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/validators.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-87","original_id":"swebench-87","prompt":"Repository: django/django\n\nGitHub issue:\nExpressionWrapper for ~Q(pk__in=[]) crashes.\nDescription\n\t \n\t\t(last modified by Stefan Brand)\n\t \nProblem Description\nI'm reducing some Q objects (similar to what is described in ticket:32554. Everything is fine for the case where the result is ExpressionWrapper(Q(pk__in=[])). However, when I reduce to ExpressionWrapper(~Q(pk__in=[])) the query breaks.\nSymptoms\nWorking for ExpressionWrapper(Q(pk__in=[]))\nprint(queryset.annotate(foo=ExpressionWrapper(Q(pk__in=[]), output_field=BooleanField())).values(\"foo\").query)\nSELECT 0 AS \"foo\" FROM \"table\"\nNot working for ExpressionWrapper(~Q(pk__in=[]))\nprint(queryset.annotate(foo=ExpressionWrapper(~Q(pk__in=[]), output_field=BooleanField())).values(\"foo\").query)\nSELECT AS \"foo\" FROM \"table\"\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/fields/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-88","original_id":"swebench-88","prompt":"Repository: django/django\n\nGitHub issue:\nMigrationRecorder does not obey db_router allow_migrate rules\nDescription\n\t\nHi,\nWe have a multi-db setup. We have one connection that is for the django project, and several connections that talk to other dbs for information (ie models with managed = False). Django should only create tables in the first connection, never in any of the other connections. We have a simple router that does the following: \nclass Router(object):\n\tdef allow_migrate(self, db, model):\n\t\tif db == 'default':\n\t\t\treturn True\n\t\treturn False\nCurrent Behaviour\nWe run our functional tests and the migrate command is called against each connection when the test databases are created (see django/test/runner.py, setup_databases, line 300-ish, which calls django/db/backends/creation.py, create_test_db, line 377-ish)\nWhen this migrate runs, it tries to apply our migrations, which tries to record that a migration has been applied (see django/db/migrations/executor.py, apply_migration, which has several calls to self.recorder.record_applied). \nThe first thing that record_applied does is a call to self.ensure_schema() (see django/db/migrations/recorder.py, record_applied, lien 66-ish). \nensure_schema checks to see if the Migration model is in the tables in the connection. If it does not find the table then it tries to create the table. \nI believe that this is incorrect behaviour when a db_router has been provided. If using the router above, my expectation would be that the table is not created on any connection other than the 'default' connection. Looking at the other methods on the MigrationRecorder, I would expect that there will be similar issues with applied_migrations and record_unapplied.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/executor.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-89","original_id":"swebench-89","prompt":"Repository: django/django\n\nGitHub issue:\nSubquery.as_sql() generates invalid SQL.\nDescription\n\t \n\t\t(last modified by M1ha Shvn)\n\t \nSince ​this commit Subquery.as_sql(...) method returns incorrect SQL removing first and last symbols instead of absent breakets. Adding Subquery().query.subquery = True attribute fixes the problem. From my point of view, it should be set in Subquery constructor.\nfrom django.db import connection\nfrom apps.models import App\nq = Subquery(App.objects.all())\nprint(str(q.query))\n# Output SQL is valid:\n# 'SELECT \"apps_app\".\"id\", \"apps_app\".\"name\" FROM \"apps_app\"'\nprint(q.as_sql(q.query.get_compiler('default'), connection))\n# Outptut SQL is invalid (no S letter at the beggining and \" symbol at the end):\n# ('(ELECT \"apps_app\".\"id\", \"apps_app\".\"name\" FROM \"apps_app)', ())\nq.query.subquery = True\nprint(q.as_sql(q.query.get_compiler('default'), connection))\n# Outputs correct result\n('(SELECT \"apps_app\".\"id\", \"apps_app\".\"name\" FROM \"apps_app\")', ())\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/expressions.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-90","original_id":"swebench-90","prompt":"Repository: django/django\n\nGitHub issue:\nMessages framework incorrectly serializes/deserializes extra_tags when it's an empty string\nDescription\n\t\nWhen a message is serialised and then deserialised with any of the built in storage backends, then extra_tags==\"\" is converted to extra_tags==None. This is because MessageEncoder checks for the truthyness of extra_tags rather than checking it is not None.\nTo replicate this bug\n>>> from django.conf import settings\n>>> settings.configure() # Just to allow the following import\n>>> from django.contrib.messages.storage.base import Message\n>>> from django.contrib.messages.storage.cookie import MessageEncoder, MessageDecoder\n>>> original_message = Message(10, \"Here is a message\", extra_tags=\"\")\n>>> encoded_message = MessageEncoder().encode(original_message)\n>>> decoded_message = MessageDecoder().decode(encoded_message)\n>>> original_message.extra_tags == \"\"\nTrue\n>>> decoded_message.extra_tags is None\nTrue\nEffect of the bug in application behaviour\nThis error occurred in the wild with a template tag similar to the following:\n{% if x not in message.extra_tags %}\nWhen the message was displayed as part of a redirect, it had been serialised and deserialized which meant that extra_tags was None instead of the empty string. This caused an error.\nIt's important to note that this bug affects all of the standard API (messages.debug, messages.info etc. all have a default value of extra_tags equal to \"\").\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/messages/storage/cookie.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-91","original_id":"swebench-91","prompt":"Repository: django/django\n\nGitHub issue:\nDev Server fails to restart after adding BASE_DIR to TEMPLATES[0]['DIRS'] in settings\nDescription\n\t\nRepro steps:\n$ pip install -U django\n$ django-admin startproject <name>\nOpen settings.py, copy the BASE_DIR variable from line 16 and paste it into the empty DIRS list on line 57\n$ ./manage.py runserver\nBack in your IDE, save a file and watch the dev server *NOT* restart.\nBack in settings.py, remove BASE_DIR from the templates DIRS list. Manually CTRL-C your dev server (as it won't restart on its own when you save), restart the dev server. Now return to your settings.py file, re-save it, and notice the development server once again detects changes and restarts.\nThis bug prevents the dev server from restarting no matter where you make changes - it is not just scoped to edits to settings.py.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/template/autoreload.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-92","original_id":"swebench-92","prompt":"Repository: django/django\n\nGitHub issue:\nSimpleLazyObject doesn't implement __radd__\nDescription\n\t\nTechnically, there's a whole bunch of magic methods it doesn't implement, compared to a complete proxy implementation, like that of wrapt.ObjectProxy, but __radd__ being missing is the one that's biting me at the moment.\nAs far as I can tell, the implementation can't just be\n__radd__ = new_method_proxy(operator.radd)\nbecause that doesn't exist, which is rubbish.\n__radd__ = new_method_proxy(operator.attrgetter(\"__radd__\"))\nalso won't work because types may not have that attr, and attrgetter doesn't supress the exception (correctly)\nThe minimal implementation I've found that works for me is:\n\tdef __radd__(self, other):\n\t\tif self._wrapped is empty:\n\t\t\tself._setup()\n\t\treturn other + self._wrapped\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/functional.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-93","original_id":"swebench-93","prompt":"Repository: django/django\n\nGitHub issue:\nFix handling empty string for If-Modified-Since header\nDescription\n\t\nEmpty string used to be ignored for If-Modified-Since header, but now raises exception since d6aff369ad3.\nFix handling empty string for If-Modified-Since header\nDescription\n\t\nEmpty string used to be ignored for If-Modified-Since header, but now raises exception since d6aff369ad3.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/views/static.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-94","original_id":"swebench-94","prompt":"Repository: django/django\n\nGitHub issue:\nRenameIndex() crashes when unnamed index is moving backward and forward.\nDescription\n\t\nRenameIndex() should restore the old auto-generated name when an unnamed index for unique_together is moving backward. Now re-applying RenameIndex() crashes. For example:\ntests/migrations/test_operations.py\ndiff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py\nindex cfd28b1b39..c0a55023bb 100644\n\t\t\t\t\t\n\t\t\t\t\t a\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t b\n\t\t\t\t \n class OperationTests(OperationTestBase): \n29882988        with connection.schema_editor() as editor, self.assertNumQueries(0):\n29892989            operation.database_backwards(app_label, editor, new_state, project_state)\n29902990        self.assertIndexNameExists(table_name, \"new_pony_test_idx\")\n 2991        # Re-apply renaming.\n 2992        with connection.schema_editor() as editor:\n 2993            operation.database_forwards(app_label, editor, project_state, new_state)\n 2994        self.assertIndexNameExists(table_name, \"new_pony_test_idx\")\n29912995        # Deconstruction.\n29922996        definition = operation.deconstruct()\n29932997        self.assertEqual(definition[0], \"RenameIndex\")\ncrashes on PostgreSQL:\ndjango.db.utils.ProgrammingError: relation \"new_pony_test_idx\" already exists\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/operations/models.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-95","original_id":"swebench-95","prompt":"Repository: django/django\n\nGitHub issue:\nModels migration with change field foreign to many and deleting unique together.\nDescription\n\t \n\t\t(last modified by Simon Charette)\n\t \nI have models like\nclass Authors(models.Model):\n\tproject_data_set = models.ForeignKey(\n\t\tProjectDataSet,\n\t\ton_delete=models.PROTECT\n\t)\n\tstate = models.IntegerField()\n\tstart_date = models.DateField()\n\tclass Meta:\n\t\t unique_together = (('project_data_set', 'state', 'start_date'),)\nand\nclass DataSet(models.Model):\n\tname = models.TextField(max_length=50)\nclass Project(models.Model):\n\tdata_sets = models.ManyToManyField(\n\t\tDataSet,\n\t\tthrough='ProjectDataSet',\n\t)\n\tname = models.TextField(max_length=50)\nclass ProjectDataSet(models.Model):\n\t\"\"\"\n\tCross table of data set and project\n\t\"\"\"\n\tdata_set = models.ForeignKey(DataSet, on_delete=models.PROTECT)\n\tproject = models.ForeignKey(Project, on_delete=models.PROTECT)\n\tclass Meta:\n\t\tunique_together = (('data_set', 'project'),)\nwhen i want to change field project_data_set in Authors model from foreign key field to many to many field I must delete a unique_together, cause it can't be on many to many field.\nThen my model should be like:\nclass Authors(models.Model):\n\tproject_data_set = models.ManyToManyField(\n\t\tProjectDataSet,\n\t)\n\tstate = models.IntegerField()\n\tstart_date = models.DateField()\nBut when I want to do a migrations.\npython3 manage.py makemigrations\npython3 manage.py migrate\nI have error:\nValueError: Found wrong number (0) of constraints for app_authors(project_data_set, state, start_date)\nThe database is on production, so I can't delete previous initial migrations, and this error isn't depending on database, cause I delete it and error is still the same.\nMy solve is to first delete unique_together, then do a makemigrations and then migrate. After that change the field from foreign key to many to many field, then do a makemigrations and then migrate.\nBut in this way I have 2 migrations instead of one.\nI added attachment with this project, download it and then do makemigrations and then migrate to see this error.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/autodetector.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-96","original_id":"swebench-96","prompt":"Repository: django/django\n\nGitHub issue:\nCustomizable management command formatters.\nDescription\n\t\nWith code like:\nclass Command(BaseCommand):\n\thelp = '''\n\tImport a contract from tzkt.\n\tExample usage:\n\t\t./manage.py tzkt_import 'Tezos Mainnet' KT1HTDtMBRCKoNHjfWEEvXneGQpCfPAt6BRe\n\t'''\nHelp output is:\n$ ./manage.py help tzkt_import\nusage: manage.py tzkt_import [-h] [--api API] [--version] [-v {0,1,2,3}] [--settings SETTINGS]\n\t\t\t\t\t\t\t [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color]\n\t\t\t\t\t\t\t [--skip-checks]\n\t\t\t\t\t\t\t blockchain target\nImport a contract from tzkt Example usage: ./manage.py tzkt_import 'Tezos Mainnet'\nKT1HTDtMBRCKoNHjfWEEvXneGQpCfPAt6BRe\npositional arguments:\n blockchain\t\t\tName of the blockchain to import into\n target\t\t\t\tId of the contract to import\nWhen that was expected:\n$ ./manage.py help tzkt_import\nusage: manage.py tzkt_import [-h] [--api API] [--version] [-v {0,1,2,3}] [--settings SETTINGS]\n\t\t\t\t\t\t\t [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color]\n\t\t\t\t\t\t\t [--skip-checks]\n\t\t\t\t\t\t\t blockchain target\nImport a contract from tzkt \nExample usage: \n\t./manage.py tzkt_import 'Tezos Mainnet' KT1HTDtMBRCKoNHjfWEEvXneGQpCfPAt6BRe\npositional arguments:\n blockchain\t\t\tName of the blockchain to import into\n target\t\t\t\tId of the contract to import\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/management/base.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-97","original_id":"swebench-97","prompt":"Repository: django/django\n\nGitHub issue:\nAdd an encoder parameter to django.utils.html.json_script().\nDescription\n\t\nI have a use case where I want to customize the JSON encoding of some values to output to the template layer. It looks like django.utils.html.json_script is a good utility for that, however the JSON encoder is hardcoded to DjangoJSONEncoder. I think it would be nice to be able to pass a custom encoder class.\nBy the way, django.utils.html.json_script is not documented (only its template filter counterpart is), would it be a good thing to add to the docs?\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/html.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-98","original_id":"swebench-98","prompt":"Repository: django/django\n\nGitHub issue:\ncheck_for_template_tags_with_the_same_name with libraries in TEMPLATES\nDescription\n\t\nI didn't explore this thoroughly, but I think there might be an issue with the check_for_template_tags_with_the_same_name when you add a template tag library into TEMPLATES['OPTIONS']['librairies'].\nI'm getting an error like: \n(templates.E003) 'my_tags' is used for multiple template tag modules: 'someapp.templatetags.my_tags', 'someapp.templatetags.my_tags'\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/checks/templates.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-99","original_id":"swebench-99","prompt":"Repository: django/django\n\nGitHub issue:\nQuerySet.only() after select_related() crash on proxy models.\nDescription\n\t\nWhen I optimize a query using select_related() and only() methods from the proxy model I encounter an error:\nWindows 10; Python 3.10; Django 4.0.5\nTraceback (most recent call last):\n File \"D:\\study\\django_college\\manage.py\", line 22, in <module>\n\tmain()\n File \"D:\\study\\django_college\\manage.py\", line 18, in main\n\texecute_from_command_line(sys.argv)\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\core\\management\\__init__.py\", line 446, in execute_from_command_line\n\tutility.execute()\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\core\\management\\__init__.py\", line 440, in execute\n\tself.fetch_command(subcommand).run_from_argv(self.argv)\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\core\\management\\base.py\", line 414, in run_from_argv\n\tself.execute(*args, **cmd_options)\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\core\\management\\base.py\", line 460, in execute\n\toutput = self.handle(*args, **options)\n File \"D:\\study\\django_college\\project\\users\\management\\commands\\test_proxy.py\", line 9, in handle\n\tobjs = list(AnotherModel.objects.select_related(\"custom\").only(\"custom__name\").all())\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\db\\models\\query.py\", line 302, in __len__\n\tself._fetch_all()\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\db\\models\\query.py\", line 1507, in _fetch_all\n\tself._result_cache = list(self._iterable_class(self))\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\db\\models\\query.py\", line 71, in __iter__\n\trelated_populators = get_related_populators(klass_info, select, db)\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\db\\models\\query.py\", line 2268, in get_related_populators\n\trel_cls = RelatedPopulator(rel_klass_info, select, db)\n File \"D:\\Anaconda3\\envs\\django\\lib\\site-packages\\django\\db\\models\\query.py\", line 2243, in __init__\n\tself.pk_idx = self.init_list.index(self.model_cls._meta.pk.attname)\nValueError: 'id' is not in list\nModels:\nclass CustomModel(models.Model):\n\tname = models.CharField(max_length=16)\nclass ProxyCustomModel(CustomModel):\n\tclass Meta:\n\t\tproxy = True\nclass AnotherModel(models.Model):\n\tcustom = models.ForeignKey(\n\t\tProxyCustomModel,\n\t\ton_delete=models.SET_NULL,\n\t\tnull=True,\n\t\tblank=True,\n\t)\nCommand:\nclass Command(BaseCommand):\n\tdef handle(self, *args, **options):\n\t\tlist(AnotherModel.objects.select_related(\"custom\").only(\"custom__name\").all())\nAt django/db/models/sql/que\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-200","original_id":"swebench-200","prompt":"Repository: django/django\n\nGitHub issue:\ninspectdb should generate related_name on same relation links.\nDescription\n\t\nHi!\nAfter models generation with inspectdb command we have issue with relations to same enities\nmodule.Model.field1: (fields.E304) Reverse accessor for 'module.Model.field1' clashes with reverse accessor for 'module.Model.field2'.\nHINT: Add or change a related_name argument to the definition for 'module.Model.field1' or 'module.Model.field2'.\n*\nMaybe we can autogenerate\nrelated_name='attribute_name'\nto all fields in model if related Model was used for this table\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/management/commands/inspectdb.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-201","original_id":"swebench-201","prompt":"Repository: django/django\n\nGitHub issue:\ndbshell additional parameters should be passed before dbname on PostgreSQL.\nDescription\n\t\npsql expects all options to proceed the database name, if provided. So, if doing something like `./manage.py dbshell -- -c \"select * from some_table;\" one will get this:\n$ ./manage.py dbshell -- -c \"select * from some_table;\"\npsql: warning: extra command-line argument \"-c\" ignored\npsql: warning: extra command-line argument \"select * from some_table;\" ignored\npsql (10.21)\nType \"help\" for help.\nsome_database=>\nIt appears the args list just need to be constructed in the proper order, leaving the database name for the end of the args list.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/backends/postgresql/client.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-202","original_id":"swebench-202","prompt":"Repository: django/django\n\nGitHub issue:\n\"default.html\" deprecation warning raised for ManagementForm's\nDescription\n\t\nI have a project where I never render forms with the {{ form }} expression. However, I'm still getting the new template deprecation warning because of the formset management form production, during which the template used is insignificant (only hidden inputs are produced).\nIs it worth special-casing this and avoid producing the warning for the management forms?\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/formsets.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-203","original_id":"swebench-203","prompt":"Repository: django/django\n\nGitHub issue:\nSupport for serialization of combination of Enum flags.\nDescription\n\t \n\t\t(last modified by Willem Van Onsem)\n\t \nIf we work with a field:\nregex_flags = models.IntegerField(default=re.UNICODE | re.IGNORECASE)\nThis is turned into a migration with:\ndefault=re.RegexFlag[None]\nThis is due to the fact that the EnumSerializer aims to work with the .name of the item, but if there is no single item for the given value, then there is no such name.\nIn that case, we can use enum._decompose to obtain a list of names, and create an expression to create the enum value by \"ORing\" the items together.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/serializer.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-204","original_id":"swebench-204","prompt":"Repository: django/django\n\nGitHub issue:\nRendering empty_form crashes when empty_permitted is passed to form_kwargs\nDescription\n\t\nIssue\nWhen explicitly setting form_kwargs = {'empty_permitted':True} or form_kwargs = {'empty_permitted':False} , a KeyError occurs when rendering a template that uses a formset's empty_form.\nExpected Behavior\nempty_permitted is ignored for formset.empty_form since empty_permitted is irrelevant for empty_form, as empty_form is not meant to be used to pass data and therefore does not need to be validated.\nSteps to Reproduce\n# views.py\nfrom django.shortcuts import render\nfrom .models import MyModel\ndef test_view(request):\n\tcontext = {}\n\tff = modelformset_factory(MyModel, fields = ['a_field'])\n\tcontext['formset'] = ff(\n\t\tqueryset = MyModel.objects.none(),\n\t\tform_kwargs = {'empty_permitted':True} # or form_kwargs = {'empty_permitted':False}\n\t)\n\treturn render(request, 'my_app/my_model_formset.html', context)\n# urls.py\nfrom django.urls import path, include\nfrom .views import test_view\nurlpatterns = [\n\tpath('test', test_view)\n]\n# my_model_formset.html\n{% extends \"my_app/base.html\" %}\n{% block content %}\n<form id=\"my-form\" method=\"post\">\n {% csrf_token %}\n {{ formset }}\n <input type=\"submit\" value=\"Save\">\n</form>\n{{ formset.empty_form }}\n{% endblock %}\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/formsets.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-205","original_id":"swebench-205","prompt":"Repository: django/django\n\nGitHub issue:\nFix numberformat.py \"string index out of range\" when null\nDescription\n\t\nWhen:\nif str_number[0] == \"-\"\nencounters a number field that's null when formatting for the admin list_display this causes an \nIndexError: string index out of range\nI can attach the proposed fix here, or open a pull request on GitHub if you like?\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/utils/numberformat.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-206","original_id":"swebench-206","prompt":"Repository: django/django\n\nGitHub issue:\nAccessing UserAdmin via to_field leads to link to PasswordResetForm being broken (404)\nDescription\n\t \n\t\t(last modified by Simon Kern)\n\t \nAccessing the UserAdmin via another model's Admin that has a reference to User (with to_field set, e.g., to_field=\"uuid\") leads to the UserAdmin being accessed via an url that looks similar to this one:\n.../user/22222222-3333-4444-5555-666677778888/change/?_to_field=uuid\nHowever the underlying form looks like this: \nCode highlighting:\nclass UserChangeForm(forms.ModelForm):\n\tpassword = ReadOnlyPasswordHashField(\n\t\tlabel=_(\"Password\"),\n\t\thelp_text=_(\n\t\t\t\"Raw passwords are not stored, so there is no way to see this \"\n\t\t\t\"user’s password, but you can change the password using \"\n\t\t\t'<a href=\"{}\">this form</a>.'\n\t\t),\n\t)\n\t...\n\t...\n\tdef __init__(self, *args, **kwargs):\n\t\tsuper().__init__(*args, **kwargs)\n\t\tpassword = self.fields.get(\"password\")\n\t\tif password:\n\t\t\tpassword.help_text = password.help_text.format(\"../password/\")\n\t...\n\t...\nThis results in the link to the PasswordResetForm being wrong and thus ending up in a 404. If we drop the assumption that UserAdmin is always accessed via its pk, then we're good to go. It's as simple as replacing password.help_text = password.help_text.format(\"../password/\") with password.help_text = password.help_text.format(f\"../../{self.instance.pk}/password/\")\nI've opened a pull request on GitHub for this Ticket, please see:\n​PR\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/auth/forms.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-207","original_id":"swebench-207","prompt":"Repository: django/django\n\nGitHub issue:\nModelForm fields with callable defaults don't correctly propagate default values\nDescription\n\t\nWhen creating an object via the admin, if an inline contains an ArrayField in error, the validation will be bypassed (and the inline dismissed) if we submit the form a second time (without modification).\ngo to /admin/my_app/thing/add/\ntype anything in plop\nsubmit -> it shows an error on the inline\nsubmit again -> no errors, plop become unfilled\n# models.py\nclass Thing(models.Model):\n\tpass\nclass RelatedModel(models.Model):\n\tthing = models.ForeignKey(Thing, on_delete=models.CASCADE)\n\tplop = ArrayField(\n\t\tmodels.CharField(max_length=42),\n\t\tdefault=list,\n\t)\n# admin.py\nclass RelatedModelForm(forms.ModelForm):\n\tdef clean(self):\n\t\traise ValidationError(\"whatever\")\nclass RelatedModelInline(admin.TabularInline):\n\tform = RelatedModelForm\n\tmodel = RelatedModel\n\textra = 1\[email protected](Thing)\nclass ThingAdmin(admin.ModelAdmin):\n\tinlines = [\n\t\tRelatedModelInline\n\t]\nIt seems related to the hidden input containing the initial value:\n<input type=\"hidden\" name=\"initial-relatedmodel_set-0-plop\" value=\"test\" id=\"initial-relatedmodel_set-0-id_relatedmodel_set-0-plop\">\nI can fix the issue locally by forcing show_hidden_initial=False on the field (in the form init)\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/forms/boundfield.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-208","original_id":"swebench-208","prompt":"Repository: django/django\n\nGitHub issue:\nSitemaps without items raise ValueError on callable lastmod.\nDescription\n\t\nWhen sitemap contains not items, but supports returning lastmod for an item, it fails with a ValueError:\nTraceback (most recent call last):\n File \"/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py\", line 55, in inner\n\tresponse = get_response(request)\n File \"/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py\", line 197, in _get_response\n\tresponse = wrapped_callback(request, *callback_args, **callback_kwargs)\n File \"/usr/local/lib/python3.10/site-packages/django/utils/decorators.py\", line 133, in _wrapped_view\n\tresponse = view_func(request, *args, **kwargs)\n File \"/usr/local/lib/python3.10/site-packages/django/contrib/sitemaps/views.py\", line 34, in inner\n\tresponse = func(request, *args, **kwargs)\n File \"/usr/local/lib/python3.10/site-packages/django/contrib/sitemaps/views.py\", line 76, in index\n\tsite_lastmod = site.get_latest_lastmod()\n File \"/usr/local/lib/python3.10/site-packages/django/contrib/sitemaps/__init__.py\", line 170, in get_latest_lastmod\n\treturn max([self.lastmod(item) for item in self.items()])\nException Type: ValueError at /sitemap.xml\nException Value: max() arg is an empty sequence\nSomething like this might be a solution:\n\t def get_latest_lastmod(self):\n\t\t if not hasattr(self, \"lastmod\"):\n\t\t\t return None\n\t\t if callable(self.lastmod):\n\t\t\t try:\n\t\t\t\t return max([self.lastmod(item) for item in self.items()])\n-\t\t\texcept TypeError:\n+\t\t\texcept (TypeError, ValueError):\n\t\t\t\t return None\n\t\t else:\n\t\t\t return self.lastmod\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/sitemaps/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-209","original_id":"swebench-209","prompt":"Repository: django/django\n\nGitHub issue:\nFileBasedCache has_key is susceptible to race conditions\nDescription\n\t \n\t\t(last modified by Marti Raudsepp)\n\t \nI received the exception from Django's cache framework:\nFileNotFoundError: [Errno 2] No such file or directory: '/app/var/cache/d729e4cf4ba88cba5a0f48e0396ec48a.djcache'\n[...]\n File \"django/core/cache/backends/base.py\", line 229, in get_or_set\n\tself.add(key, default, timeout=timeout, version=version)\n File \"django/core/cache/backends/filebased.py\", line 26, in add\n\tif self.has_key(key, version):\n File \"django/core/cache/backends/filebased.py\", line 94, in has_key\n\twith open(fname, \"rb\") as f:\nThe code is:\n\tdef has_key(self, key, version=None):\n\t\tfname = self._key_to_file(key, version)\n\t\tif os.path.exists(fname):\n\t\t\twith open(fname, \"rb\") as f:\n\t\t\t\treturn not self._is_expired(f)\n\t\treturn False\nBetween the exists() check and open(), it's possible for the file to be deleted. In fact, the _is_expired() method itself deletes the file if it finds it to be expired. So if many threads race to read an expired cache at once, it's not that unlikely to hit this window.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/core/cache/backends/filebased.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-210","original_id":"swebench-210","prompt":"Repository: django/django\n\nGitHub issue:\nmigrate management command does not respect database parameter when adding Permissions.\nDescription\n\t \n\t\t(last modified by Vasanth)\n\t \nWhen invoking migrate with a database parameter, the migration runs successfully. However, there seems to be a DB read request that runs after the migration. This call does not respect the db param and invokes the db router .\nWhen naming the db as a parameter, all DB calls in the context of the migrate command are expected to use the database specified.\nI came across this as I am currently using a thread-local variable to get the active DB with a custom DB router for a multi-tenant service .\nMinimal example \nSetup the custom middleware and custom DB Router as show below. Then run any DB migration. We see that \"read {}\" is being printed before the exception message.\nIdeally none of this code must be called as the DB was specified during management command.\nfrom threading import local\nfrom django.conf import settings\nlocal_state = local()\nclass InvalidTenantException(Exception):\n\tpass\nclass TenantSubdomainMiddleware:\n\tdef __init__(self, get_response):\n\t\tself.get_response = get_response\n\tdef __call__(self, request):\n\t\t## Get Subdomain\n\t\thost = request.get_host().split(\":\")[0]\n\t\tlocal_state.subdomain = (\n\t\t\t# We assume single level of subdomain : app.service.com \n\t\t\t# HOST_IP : used to for local dev. \n\t\t\thost if host in settings.HOST_IP else host.split(\".\")[0]\n\t\t)\n\t\tresponse = self.get_response(request)\n\t\treturn response\nclass TenantDatabaseRouter:\n\tdef _default_db(self):\n\t\tsubdomain = getattr(local_state, \"subdomain\", None)\n\t\tif subdomain is not None and subdomain in settings.TENANT_MAP:\n\t\t\tdb_name = settings.TENANT_MAP[local_state.subdomain]\n\t\t\treturn db_name\n\t\telse:\n\t\t\traise InvalidTenantException()\n\tdef db_for_read(self, model, **hints):\n\t\tprint(\"read\", hints)\n\t\treturn self._default_db()\n\tdef db_for_write(self, model, **hints):\n\t\tprint(\"write\", hints)\n\t\treturn self._default_db()\n\tdef allow_relation(self, obj1, obj2, **hints):\n\t\treturn None\n\tdef allow_migrate(self, db, app_label, model_name=None, **hints):\n\t\treturn None\n## settings.py\nMIDDLEWARE = [\n\t\"utils.tenant_db_router.TenantSubdomainMiddleware\",\n\t\"django.middleware.security.SecurityMiddleware\",\n\t...\n]\nTENANT_MAP = {\"localhost\":\"default\", \"tenant_1\":\"default\"}\nDATABASE_ROUTERS = [\"utils.tenant_db_router.TenantDatabaseRouter\"]\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/auth/management/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-211","original_id":"swebench-211","prompt":"Repository: django/django\n\nGitHub issue:\nMulti-level FilteredRelation with select_related() may set wrong related object.\nDescription\n\t\ntest case:\n# add to known_related_objects.tests.ExistingRelatedInstancesTests\n\tdef test_wrong_select_related(self):\n\t\twith self.assertNumQueries(3):\n\t\t\tp = list(PoolStyle.objects.annotate(\n\t\t\t\ttournament_pool=FilteredRelation('pool__tournament__pool'),\n\t\t\t\t).select_related('tournament_pool'))\n\t\t\tself.assertEqual(p[0].pool.tournament, p[0].tournament_pool.tournament)\nresult:\n======================================================================\nFAIL: test_wrong_select_related (known_related_objects.tests.ExistingRelatedInstancesTests.test_wrong_select_related)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"D:\\Work\\django\\tests\\known_related_objects\\tests.py\", line 171, in test_wrong_select_related\n\tself.assertEqual(p[0].pool.tournament, p[0].tournament_pool.tournament)\nAssertionError: <Tournament: Tournament object (1)> != <PoolStyle: PoolStyle object (1)>\n----------------------------------------------------------------------\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/compiler.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-212","original_id":"swebench-212","prompt":"Repository: django/django\n\nGitHub issue:\n\"show_save_as_new\" in admin can add without this permission\nDescription\n\t \n\t\t(last modified by Mariusz Felisiak)\n\t \nAt \"django/contrib/admin/templatetags/admin_modify.py\" file, line 102, I think you must put one more verification for this tag: \"and has_add_permission\", because \"save_as_new\" is a add modification.\nI rewrite this for my project:\n\t\t\t\"show_save_as_new\": not is_popup\n\t\t\tand has_add_permission # This line that I put!!!\n\t\t\tand has_change_permission\n\t\t\tand change\n\t\t\tand save_as,\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/admin/templatetags/admin_modify.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-213","original_id":"swebench-213","prompt":"Repository: django/django\n\nGitHub issue:\nMigration optimizer does not reduce multiple AlterField\nDescription\n\t\nLet's consider the following operations: \noperations = [\n\tmigrations.AddField(\n\t\tmodel_name=\"book\",\n\t\tname=\"title\",\n\t\tfield=models.CharField(max_length=256, null=True),\n\t),\n\tmigrations.AlterField(\n\t\tmodel_name=\"book\",\n\t\tname=\"title\",\n\t\tfield=models.CharField(max_length=128, null=True),\n\t),\n\tmigrations.AlterField(\n\t\tmodel_name=\"book\",\n\t\tname=\"title\",\n\t\tfield=models.CharField(max_length=128, null=True, help_text=\"help\"),\n\t),\n\tmigrations.AlterField(\n\t\tmodel_name=\"book\",\n\t\tname=\"title\",\n\t\tfield=models.CharField(max_length=128, null=True, help_text=\"help\", default=None),\n\t),\n]\nIf I run the optimizer, I get only the AddField, as we could expect. However, if the AddField model is separated from the AlterField (e.g. because of a non-elidable migration, or inside a non-squashed migration), none of the AlterField are reduced:\noptimizer.optimize(operations[1:], \"books\") \n[<AlterField model_name='book', name='title', field=<django.db.models.fields.CharField>>,\n <AlterField model_name='book', name='title', field=<django.db.models.fields.CharField>>,\n <AlterField model_name='book', name='title', field=<django.db.models.fields.CharField>>]\nIndeed, the AlterField.reduce does not consider the the case where operation is also an AlterField. \nIs this behaviour intended? If so, could it be documented? \nOtherwise, would it make sense to add something like\n\t\tif isinstance(operation, AlterField) and self.is_same_field_operation(\n\t\t\toperation\n\t\t):\n\t\t\treturn [operation]\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/operations/fields.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-214","original_id":"swebench-214","prompt":"Repository: django/django\n\nGitHub issue:\nError E108 does not cover some cases\nDescription\n\t \n\t\t(last modified by Baha Sdtbekov)\n\t \nI have two models, Question and Choice. And if I write list_display = [\"choice\"] in QuestionAdmin, I get no errors.\nBut when I visit /admin/polls/question/, the following trace is returned:\nInternal Server Error: /admin/polls/question/\nTraceback (most recent call last):\n File \"/some/path/django/contrib/admin/utils.py\", line 334, in label_for_field\n\tfield = _get_non_gfk_field(model._meta, name)\n File \"/some/path/django/contrib/admin/utils.py\", line 310, in _get_non_gfk_field\n\traise FieldDoesNotExist()\ndjango.core.exceptions.FieldDoesNotExist\nDuring handling of the above exception, another exception occurred:\nTraceback (most recent call last):\n File \"/some/path/django/core/handlers/exception.py\", line 55, in inner\n\tresponse = get_response(request)\n File \"/some/path/django/core/handlers/base.py\", line 220, in _get_response\n\tresponse = response.render()\n File \"/some/path/django/template/response.py\", line 111, in render\n\tself.content = self.rendered_content\n File \"/some/path/django/template/response.py\", line 89, in rendered_content\n\treturn template.render(context, self._request)\n File \"/some/path/django/template/backends/django.py\", line 61, in render\n\treturn self.template.render(context)\n File \"/some/path/django/template/base.py\", line 175, in render\n\treturn self._render(context)\n File \"/some/path/django/template/base.py\", line 167, in _render\n\treturn self.nodelist.render(context)\n File \"/some/path/django/template/base.py\", line 1005, in render\n\treturn SafeString(\"\".join([node.render_annotated(context) for node in self]))\n File \"/some/path/django/template/base.py\", line 1005, in <listcomp>\n\treturn SafeString(\"\".join([node.render_annotated(context) for node in self]))\n File \"/some/path/django/template/base.py\", line 966, in render_annotated\n\treturn self.render(context)\n File \"/some/path/django/template/loader_tags.py\", line 157, in render\n\treturn compiled_parent._render(context)\n File \"/some/path/django/template/base.py\", line 167, in _render\n\treturn self.nodelist.render(context)\n File \"/some/path/django/template/base.py\", line 1005, in render\n\treturn SafeString(\"\".join([node.render_annotated(context) for node in self]))\n File \"/some/path/django/template/base.py\", line 1005, in <listcomp>\n\treturn SafeString(\"\".join([node.render_annotated(context) for node in self]))\n File \"/some/path/django/template/base.py\", line 966, in render_annotated\n\treturn self.render(context)\n Fi\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/contrib/admin/checks.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-215","original_id":"swebench-215","prompt":"Repository: django/django\n\nGitHub issue:\nSquashing migrations with Meta.index_together -> indexes transition should remove deprecation warnings.\nDescription\n\t\nSquashing migrations with Meta.index_together -> Meta.indexes transition should remove deprecation warnings. As far as I'm aware, it's a 4.2 release blocker because you cannot get rid of the index_together deprecation warnings without rewriting migrations, see comment.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/operations/models.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-216","original_id":"swebench-216","prompt":"Repository: django/django\n\nGitHub issue:\nTemplate filter `join` should not escape the joining string if `autoescape` is `off`\nDescription\n\t\nConsider the following template code snippet:\n{% autoescape off %}\n{{ some_list|join:some_var }}\n{% endautoescape %}\nin this case, the items inside some_list will not be escaped (matching the expected behavior) but some_var will forcibly be escaped. From the docs for autoescape or join I don't think this is expected behavior.\nThe following testcase illustrates what I think is a bug in the join filter (run inside the template_tests/filter_tests folder):\nfrom django.template.defaultfilters import escape\nfrom django.test import SimpleTestCase\nfrom ..utils import setup\nclass RegressionTests(SimpleTestCase):\n\t@setup({\"join01\": '{{ some_list|join:some_var }}'})\n\tdef test_join01(self):\n\t\tsome_list = [\"<p>Hello World!</p>\", \"beta & me\", \"<script>Hi!</script>\"]\n\t\tsome_var = \"<br/>\"\n\t\toutput = self.engine.render_to_string(\"join01\", {\"some_list\": some_list, \"some_var\": some_var})\n\t\tself.assertEqual(output, escape(some_var.join(some_list)))\n\t@setup({\"join02\": '{% autoescape off %}{{ some_list|join:some_var }}{% endautoescape %}'})\n\tdef test_join02(self):\n\t\tsome_list = [\"<p>Hello World!</p>\", \"beta & me\", \"<script>Hi!</script>\"]\n\t\tsome_var = \"<br/>\"\n\t\toutput = self.engine.render_to_string(\"join02\", {\"some_list\": some_list, \"some_var\": some_var})\n\t\tself.assertEqual(output, some_var.join(some_list))\nResult of this run in current main is:\n.F\n======================================================================\nFAIL: test_join02 (template_tests.filter_tests.test_regression.RegressionTests.test_join02)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n File \"/home/nessita/fellowship/django/django/test/utils.py\", line 443, in inner\n\treturn func(*args, **kwargs)\n\t\t ^^^^^^^^^^^^^^^^^^^^^\n File \"/home/nessita/fellowship/django/tests/template_tests/utils.py\", line 58, in inner\n\tfunc(self)\n File \"/home/nessita/fellowship/django/tests/template_tests/filter_tests/test_regression.py\", line 21, in test_join02\n\tself.assertEqual(output, some_var.join(some_list))\nAssertionError: '<p>Hello World!</p>&lt;br/&gt;beta & me&lt;br/&gt;<script>Hi!</script>' != '<p>Hello World!</p><br/>beta & me<br/><script>Hi!</script>'\n----------------------------------------------------------------------\nRan 2 tests in 0.007s\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/template/defaultfilters.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-217","original_id":"swebench-217","prompt":"Repository: django/django\n\nGitHub issue:\nQuerySet.only() doesn't work with select_related() on a reverse OneToOneField relation.\nDescription\n\t\nOn Django 4.2 calling only() with select_related() on a query using the reverse lookup for a OneToOne relation does not generate the correct query.\nAll the fields from the related model are still included in the generated SQL.\nSample models:\nclass Main(models.Model):\n\tmain_field_1 = models.CharField(blank=True, max_length=45)\n\tmain_field_2 = models.CharField(blank=True, max_length=45)\n\tmain_field_3 = models.CharField(blank=True, max_length=45)\nclass Secondary(models.Model):\n\tmain = models.OneToOneField(Main, primary_key=True, related_name='secondary', on_delete=models.CASCADE)\n\tsecondary_field_1 = models.CharField(blank=True, max_length=45)\n\tsecondary_field_2 = models.CharField(blank=True, max_length=45)\n\tsecondary_field_3 = models.CharField(blank=True, max_length=45)\nSample code:\nMain.objects.select_related('secondary').only('main_field_1', 'secondary__secondary_field_1')\nGenerated query on Django 4.2.1:\nSELECT \"bugtest_main\".\"id\", \"bugtest_main\".\"main_field_1\", \"bugtest_secondary\".\"main_id\", \"bugtest_secondary\".\"secondary_field_1\", \"bugtest_secondary\".\"secondary_field_2\", \"bugtest_secondary\".\"secondary_field_3\" FROM \"bugtest_main\" LEFT OUTER JOIN \"bugtest_secondary\" ON (\"bugtest_main\".\"id\" = \"bugtest_secondary\".\"main_id\")\nGenerated query on Django 4.1.9:\nSELECT \"bugtest_main\".\"id\", \"bugtest_main\".\"main_field_1\", \"bugtest_secondary\".\"main_id\", \"bugtest_secondary\".\"secondary_field_1\" FROM \"bugtest_main\" LEFT OUTER JOIN \"bugtest_secondary\" ON (\"bugtest_main\".\"id\" = \"bugtest_secondary\".\"main_id\")\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/sql/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-218","original_id":"swebench-218","prompt":"Repository: django/django\n\nGitHub issue:\nAllow returning IDs in QuerySet.bulk_create() when updating conflicts.\nDescription\n\t\nCurrently, when using bulk_create with a conflict handling flag turned on (e.g. ignore_conflicts or update_conflicts), the primary keys are not set in the returned queryset, as documented in bulk_create.\nWhile I understand using ignore_conflicts can lead to PostgreSQL not returning the IDs when a row is ignored (see ​this SO thread), I don't understand why we don't return the IDs in the case of update_conflicts.\nFor instance:\nMyModel.objects.bulk_create([MyModel(...)], update_conflicts=True, update_fields=[...], unique_fields=[...])\ngenerates a query without a RETURNING my_model.id part:\nINSERT INTO \"my_model\" (...)\nVALUES (...)\n\tON CONFLICT(...) DO UPDATE ...\nIf I append the RETURNING my_model.id clause, the query is indeed valid and the ID is returned (checked with PostgreSQL).\nI investigated a bit and ​this in Django source is where the returning_fields gets removed.\nI believe we could discriminate the cases differently so as to keep those returning_fields in the case of update_conflicts.\nThis would be highly helpful when using bulk_create as a bulk upsert feature.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/models/query.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-219","original_id":"swebench-219","prompt":"Repository: django/django\n\nGitHub issue:\nClass methods from nested classes cannot be used as Field.default.\nDescription\n\t \n\t\t(last modified by Mariusz Felisiak)\n\t \nGiven the following model:\n \nclass Profile(models.Model):\n\tclass Capability(models.TextChoices):\n\t\tBASIC = (\"BASIC\", \"Basic\")\n\t\tPROFESSIONAL = (\"PROFESSIONAL\", \"Professional\")\n\t\t\n\t\t@classmethod\n\t\tdef default(cls) -> list[str]:\n\t\t\treturn [cls.BASIC]\n\tcapabilities = ArrayField(\n\t\tmodels.CharField(choices=Capability.choices, max_length=30, blank=True),\n\t\tnull=True,\n\t\tdefault=Capability.default\n\t)\nThe resulting migration contained the following:\n # ...\n\t migrations.AddField(\n\t\t model_name='profile',\n\t\t name='capabilities',\n\t\t field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, choices=[('BASIC', 'Basic'), ('PROFESSIONAL', 'Professional')], max_length=30), default=appname.models.Capability.default, null=True, size=None),\n\t ),\n # ...\nAs you can see, migrations.AddField is passed as argument \"default\" a wrong value \"appname.models.Capability.default\", which leads to an error when trying to migrate. The right value should be \"appname.models.Profile.Capability.default\".\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["django/db/migrations/serializer.py"],"mode":"swe-localize","license":"MIT","repo":"django/django","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-220","original_id":"swebench-220","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\nAdd easily comparable version info to toplevel\n<!--\r\nWelcome! Thanks for thinking of a way to improve Matplotlib.\r\n\r\n\r\nBefore creating a new feature request please search the issues for relevant feature requests.\r\n-->\r\n\r\n### Problem\r\n\r\nCurrently matplotlib only exposes `__version__`. For quick version checks, exposing either a `version_info` tuple (which can be compared with other tuples) or a `LooseVersion` instance (which can be properly compared with other strings) would be a small usability improvement.\r\n\r\n(In practice I guess boring string comparisons will work just fine until we hit mpl 3.10 or 4.10 which is unlikely to happen soon, but that feels quite dirty :))\r\n<!--\r\nProvide a clear and concise description of the problem this feature will solve. \r\n\r\nFor example:\r\n* I'm always frustrated when [...] because [...]\r\n* I would like it if [...] happened when I [...] because [...]\r\n* Here is a sample image of what I am asking for [...]\r\n-->\r\n\r\n### Proposed Solution\r\n\r\nI guess I slightly prefer `LooseVersion`, but exposing just a `version_info` tuple is much more common in other packages (and perhaps simpler to understand). The hardest(?) part is probably just bikeshedding this point :-)\r\n<!-- Provide a clear and concise description of a way to accomplish what you want. For example:\r\n\r\n* Add an option so that when [...] [...] will happen\r\n -->\r\n\r\n### Additional context and prior art\r\n\r\n`version_info` is a pretty common thing (citation needed).\r\n<!-- Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request. For example:\r\n\r\n* Another project [...] solved this by [...]\r\n-->\r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-221","original_id":"swebench-221","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: cannot give init value for RangeSlider widget\n### Bug summary\r\n\r\nI think `xy[4] = .25, val[0]` should be commented in /matplotlib/widgets. py\", line 915, in set_val\r\nas it prevents to initialized value for RangeSlider\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.widgets import RangeSlider\r\n\r\n# generate a fake image\r\nnp.random.seed(19680801)\r\nN = 128\r\nimg = np.random.randn(N, N)\r\n\r\nfig, axs = plt.subplots(1, 2, figsize=(10, 5))\r\nfig.subplots_adjust(bottom=0.25)\r\n\r\nim = axs[0].imshow(img)\r\naxs[1].hist(img.flatten(), bins='auto')\r\naxs[1].set_title('Histogram of pixel intensities')\r\n\r\n# Create the RangeSlider\r\nslider_ax = fig.add_axes([0.20, 0.1, 0.60, 0.03])\r\nslider = RangeSlider(slider_ax, \"Threshold\", img.min(), img.max(),valinit=[0.0,0.0])\r\n\r\n# Create the Vertical lines on the histogram\r\nlower_limit_line = axs[1].axvline(slider.val[0], color='k')\r\nupper_limit_line = axs[1].axvline(slider.val[1], color='k')\r\n\r\n\r\ndef update(val):\r\n # The val passed to a callback by the RangeSlider will\r\n # be a tuple of (min, max)\r\n\r\n # Update the image's colormap\r\n im.norm.vmin = val[0]\r\n im.norm.vmax = val[1]\r\n\r\n # Update the position of the vertical lines\r\n lower_limit_line.set_xdata([val[0], val[0]])\r\n upper_limit_line.set_xdata([val[1], val[1]])\r\n\r\n # Redraw the figure to ensure it updates\r\n fig.canvas.draw_idle()\r\n\r\n\r\nslider.on_changed(update)\r\nplt.show()\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```python\r\n File \"<ipython-input-52-b704c53e18d4>\", line 19, in <module>\r\n slider = RangeSlider(slider_ax, \"Threshold\", img.min(), img.max(),valinit=[0.0,0.0])\r\n\r\n File \"/Users/Vincent/opt/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/widgets.py\", line 778, in __init__\r\n self.set_val(valinit)\r\n\r\n File \"/Users/Vincent/opt/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/widgets.py\", line 915, in set_val\r\n xy[4] = val[0], .25\r\n\r\nIndexError: index 4 is out of bounds for axis 0 with size 4\r\n```\r\n\r\n### Expected outcome\r\n\r\nrange slider with user initial values\r\n\r\n### Additional information\r\n\r\nerror can be removed by commenting this line\r\n```python\r\n\r\n def set_val(self, val):\r\n \"\"\"\r\n Set slider value to *val*.\r\n\r\n Parameters\r\n ----------\r\n val : tuple or array-like of float\r\n \"\"\"\r\n val = np.sort(np.asanyarray(val))\r\n if val.shape != (2,):\r\n raise ValueError(\r\n f\"val must ha\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/widgets.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-222","original_id":"swebench-222","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: scalar mappable format_cursor_data crashes on BoundarNorm\n### Bug summary\r\n\r\nIn 3.5.0 if you do:\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport matplotlib as mpl\r\n\r\nfig, ax = plt.subplots()\r\nnorm = mpl.colors.BoundaryNorm(np.linspace(-4, 4, 5), 256)\r\nX = np.random.randn(10, 10)\r\npc = ax.imshow(X, cmap='RdBu_r', norm=norm)\r\n```\r\n\r\nand mouse over the image, it crashes with\r\n\r\n```\r\nFile \"/Users/jklymak/matplotlib/lib/matplotlib/artist.py\", line 1282, in format_cursor_data\r\n neighbors = self.norm.inverse(\r\n File \"/Users/jklymak/matplotlib/lib/matplotlib/colors.py\", line 1829, in inverse\r\n raise ValueError(\"BoundaryNorm is not invertible\")\r\nValueError: BoundaryNorm is not invertible\r\n```\r\n\r\nand interaction stops. \r\n\r\nNot sure if we should have a special check here, a try-except, or actually just make BoundaryNorm approximately invertible. \r\n\r\n\r\n### Matplotlib Version\r\n\r\nmain 3.5.0\r\n\r\n\n[Bug]: scalar mappable format_cursor_data crashes on BoundarNorm\n### Bug summary\r\n\r\nIn 3.5.0 if you do:\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport matplotlib as mpl\r\n\r\nfig, ax = plt.subplots()\r\nnorm = mpl.colors.BoundaryNorm(np.linspace(-4, 4, 5), 256)\r\nX = np.random.randn(10, 10)\r\npc = ax.imshow(X, cmap='RdBu_r', norm=norm)\r\n```\r\n\r\nand mouse over the image, it crashes with\r\n\r\n```\r\nFile \"/Users/jklymak/matplotlib/lib/matplotlib/artist.py\", line 1282, in format_cursor_data\r\n neighbors = self.norm.inverse(\r\n File \"/Users/jklymak/matplotlib/lib/matplotlib/colors.py\", line 1829, in inverse\r\n raise ValueError(\"BoundaryNorm is not invertible\")\r\nValueError: BoundaryNorm is not invertible\r\n```\r\n\r\nand interaction stops. \r\n\r\nNot sure if we should have a special check here, a try-except, or actually just make BoundaryNorm approximately invertible. \r\n\r\n\r\n### Matplotlib Version\r\n\r\nmain 3.5.0\r\n\r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/artist.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-223","original_id":"swebench-223","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: get_backend() clears figures from Gcf.figs if they were created under rc_context\n### Bug summary\r\n\r\ncalling `matplotlib.get_backend()` removes all figures from `Gcf` if the *first* figure in `Gcf.figs` was created in an `rc_context`.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib import get_backend, rc_context\r\n\r\n# fig1 = plt.figure() # <- UNCOMMENT THIS LINE AND IT WILL WORK\r\n# plt.ion() # <- ALTERNATIVELY, UNCOMMENT THIS LINE AND IT WILL ALSO WORK\r\nwith rc_context():\r\n fig2 = plt.figure()\r\nbefore = f'{id(plt._pylab_helpers.Gcf)} {plt._pylab_helpers.Gcf.figs!r}'\r\nget_backend()\r\nafter = f'{id(plt._pylab_helpers.Gcf)} {plt._pylab_helpers.Gcf.figs!r}'\r\n\r\nassert before == after, '\\n' + before + '\\n' + after\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nAssertionError Traceback (most recent call last)\r\n<ipython-input-1-fa4d099aa289> in <cell line: 11>()\r\n 9 after = f'{id(plt._pylab_helpers.Gcf)} {plt._pylab_helpers.Gcf.figs!r}'\r\n 10 \r\n---> 11 assert before == after, '\\n' + before + '\\n' + after\r\n 12 \r\n\r\nAssertionError: \r\n94453354309744 OrderedDict([(1, <matplotlib.backends.backend_qt.FigureManagerQT object at 0x7fb33e26c220>)])\r\n94453354309744 OrderedDict()\r\n```\r\n\r\n### Expected outcome\r\n\r\nThe figure should not be missing from `Gcf`. Consequences of this are, e.g, `plt.close(fig2)` doesn't work because `Gcf.destroy_fig()` can't find it.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nXubuntu\r\n\r\n### Matplotlib Version\r\n\r\n3.5.2\r\n\r\n### Matplotlib Backend\r\n\r\nQtAgg\r\n\r\n### Python version\r\n\r\nPython 3.10.4\r\n\r\n### Jupyter version\r\n\r\nn/a\r\n\r\n### Installation\r\n\r\nconda\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/__init__.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-224","original_id":"swebench-224","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: set_visible() not working for 3d projection \n### Bug summary\r\n\r\nin the subplot projection=\"3d\" the set_visible function doesn't work even if the value is set to False\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.gridspec import GridSpec\r\n\r\nfig, (ax1, ax2) = plt.subplots(1, 2, subplot_kw={'projection': '3d'})\r\nax1.scatter(1,1,1)\r\nax2.scatter(1,1,1, c='r')\r\nax1.set_visible(False)\r\n\r\nplt.show()\r\n# Thanks Tim for your help! \r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\nthe subplot remains visible which should not happen if the value is set to False\r\n\r\n### Expected outcome\r\n\r\nthe subplot is not visible if the value is set to False\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\n_No response_\r\n\r\n### Matplotlib Version\r\n\r\n3.4.2\r\n\r\n### Matplotlib Backend\r\n\r\nQt5Agg\r\n\r\n### Python version\r\n\r\n3.8.10\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\n_No response_\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/mpl_toolkits/mplot3d/axes3d.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-225","original_id":"swebench-225","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: DPI of a figure is doubled after unpickling on M1 Mac\n### Bug summary\r\n\r\nWhen a figure is unpickled, it's dpi is doubled. This behaviour happens every time and if done in a loop it can cause an `OverflowError`.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\nimport pickle\r\nimport platform\r\n\r\nprint(matplotlib.get_backend())\r\nprint('Matplotlib ver:', matplotlib.__version__)\r\nprint('Platform:', platform.platform())\r\nprint('System:', platform.system())\r\nprint('Release:', platform.release())\r\nprint('Python ver:', platform.python_version())\r\n\r\n\r\ndef dump_load_get_dpi(fig):\r\n with open('sinus.pickle','wb') as file:\r\n pickle.dump(fig, file)\r\n\r\n with open('sinus.pickle', 'rb') as blob:\r\n fig2 = pickle.load(blob)\r\n return fig2, fig2.dpi\r\n\r\n\r\ndef run():\r\n fig = plt.figure()\r\n x = np.linspace(0,2*np.pi)\r\n y = np.sin(x)\r\n\r\n for i in range(32):\r\n print(f'{i}: {fig.dpi}')\r\n fig, dpi = dump_load_get_dpi(fig)\r\n\r\n\r\nif __name__ == '__main__':\r\n run()\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\nMacOSX\r\nMatplotlib ver: 3.5.2\r\nPlatform: macOS-12.4-arm64-arm-64bit\r\nSystem: Darwin\r\nRelease: 21.5.0\r\nPython ver: 3.9.12\r\n0: 200.0\r\n1: 400.0\r\n2: 800.0\r\n3: 1600.0\r\n4: 3200.0\r\n5: 6400.0\r\n6: 12800.0\r\n7: 25600.0\r\n8: 51200.0\r\n9: 102400.0\r\n10: 204800.0\r\n11: 409600.0\r\n12: 819200.0\r\n13: 1638400.0\r\n14: 3276800.0\r\n15: 6553600.0\r\n16: 13107200.0\r\n17: 26214400.0\r\n18: 52428800.0\r\n19: 104857600.0\r\n20: 209715200.0\r\n21: 419430400.0\r\nTraceback (most recent call last):\r\n File \"/Users/wsykala/projects/matplotlib/example.py\", line 34, in <module>\r\n run()\r\n File \"/Users/wsykala/projects/matplotlib/example.py\", line 30, in run\r\n fig, dpi = dump_load_get_dpi(fig)\r\n File \"/Users/wsykala/projects/matplotlib/example.py\", line 20, in dump_load_get_dpi\r\n fig2 = pickle.load(blob)\r\n File \"/Users/wsykala/miniconda3/envs/playground/lib/python3.9/site-packages/matplotlib/figure.py\", line 2911, in __setstate__\r\n mgr = plt._backend_mod.new_figure_manager_given_figure(num, self)\r\n File \"/Users/wsykala/miniconda3/envs/playground/lib/python3.9/site-packages/matplotlib/backend_bases.py\", line 3499, in new_figure_manager_given_figure\r\n canvas = cls.FigureCanvas(figure)\r\n File \"/Users/wsykala/miniconda3/envs/playground/lib/python3.9/site-packages/matplotlib/backends/backend_macosx.py\", line 32, in __init__\r\n _macosx.FigureCanvas.__init__(self, width, height)\r\nOverflowError: signed integ\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/figure.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-226","original_id":"swebench-226","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n'Poly3DCollection' object has no attribute '_facecolors2d'\nThe following minimal example demonstrates the issue:\n\n```\nimport numpy as np\nimport matplotlib.tri as mtri\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\ny,x = np.ogrid[1:10:100j, 1:10:100j]\nz2 = np.cos(x)**3 - np.sin(y)**2\nfig = plt.figure()\nax = fig.add_subplot(111, projection='3d')\nr = ax.plot_surface(x,y,z2, cmap='hot')\nr.get_facecolors()\n```\n\nIt fails on the last line with the following traceback:\n\n```\nAttributeError Traceback (most recent call last)\n<ipython-input-13-de0f41d662cd> in <module>()\n----> 1 r.get_facecolors()\n\n/home/oliver/.virtualenvs/mpl/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.pyc in get_facecolors(self)\n 634\n 635 def get_facecolors(self):\n--> 636 return self._facecolors2d\n 637 get_facecolor = get_facecolors\n 638\n\nAttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'\n```\n\nTested with mpl versions 1.3.1 and 1.4.2.\n\nSent here by Benjamin, from the mpl users mailing list (mail with the same title). Sorry for dumping this without more assistance, I'm not yet at a python level where I can help in debugging, I think (well, it seems daunting).\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/mpl_toolkits/mplot3d/art3d.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-227","original_id":"swebench-227","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: 'Line3D' object has no attribute '_verts3d'\n### Bug summary\n\nI use matplotlib 3D to visualize some lines in 3D. When I first run the following code, the code can run right. But, if I give `x_s_0[n]` a numpy array, it will report the error 'input operand has more dimensions than allowed by the axis remapping'. The point is when next I give `x_s_0[n]` and other variables an int number, the AttributeError: 'Line3D' object has no attribute '_verts3d' will appear and can not be fixed whatever I change the variables or delete them. The error can be only fixed when I restart the kernel of ipython console. I don't know why it happens, so I come here for help.\n\n### Code for reproduction\n\n```python\nx_s_0 = np.array(['my int number list'])\r\nx_e_0 = np.array(['my int number list'])\r\ny_s_0 = np.array(['my int number list'])\r\ny_e_0 = np.array(['my int number list'])\r\nz_s_0 = np.array(['my int number list'])\r\nz_e_0 = np.array(['my int number list'])\r\n\r\nfig = plt.figure()\r\n ax = fig.gca(projection='3d')\r\n ax.view_init(elev=90, azim=0)\r\n ax.set_zlim3d(-10, 10)\r\n clr_list = 'r-'\r\n\r\n for n in range(np.size(z_s_0, axis=0)):\r\n ax.plot([int(x_s_0[n]), int(x_e_0[n])],\r\n [int(y_s_0[n]), int(y_e_0[n])],\r\n [int(z_s_0[n]), int(z_e_0[n])], clr_list)\r\n\r\n plt.xlabel('x')\r\n plt.ylabel('y')\r\n # ax.zlabel('z')\r\n plt.title('90-0')\r\n plt.show()\n```\n\n\n### Actual outcome\n\nTraceback (most recent call last):\r\n File \"/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-packages/IPython/core/interactiveshell.py\", line 3444, in run_code\r\n exec(code_obj, self.user_global_ns, self.user_ns)\r\n File \"<ipython-input-80-e04907066a16>\", line 20, in <module>\r\n plt.show()\r\n File \"/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-packages/matplotlib/pyplot.py\", line 368, in show\r\n return _backend_mod.show(*args, **kwargs)\r\n File \"/home/hanyaning/.pycharm_helpers/pycharm_matplotlib_backend/backend_interagg.py\", line 29, in __call__\r\n manager.show(**kwargs)\r\n File \"/home/hanyaning/.pycharm_helpers/pycharm_matplotlib_backend/backend_interagg.py\", line 112, in show\r\n self.canvas.show()\r\n File \"/home/hanyaning/.pycharm_helpers/pycharm_matplotlib_backend/backend_interagg.py\", line 68, in show\r\n FigureCanvasAgg.draw(self)\r\n File \"/home/hanyaning/anaconda3/envs/SBeA/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py\", line 436, in draw\r\n self.fi\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/mpl_toolkits/mplot3d/art3d.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-228","original_id":"swebench-228","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\nlegend draggable as keyword\n<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.-->\r\n<!--You can feel free to delete the sections that do not apply.-->\r\n\r\n### Feature request\r\n\r\n**There is not keyword to make legend draggable at creation**\r\n\r\n<!--A short 1-2 sentences that succinctly describes the bug-->\r\n\r\nIs there a code reason why one can not add a \"draggable=True\" keyword to the __init__ function for Legend? This would be more handy than having to call it after legend creation. And, naively, it would seem simple to do. But maybe there is a reason why it would not work?\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/legend.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-229","original_id":"swebench-229","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: Text label with empty line causes a \"TypeError: cannot unpack non-iterable NoneType object\" in PostScript backend\n### Bug summary\n\nWhen saving a figure with the PostScript backend, a\r\n> TypeError: cannot unpack non-iterable NoneType object\r\n\r\nhappens if the figure contains a multi-line text label with an empty line (see example).\n\n### Code for reproduction\n\n```python\nfrom matplotlib.figure import Figure\r\n\r\nfigure = Figure()\r\nax = figure.add_subplot(111)\r\n# ax.set_title('\\nLower title') # this would cause an error as well\r\nax.annotate(text='\\nLower label', xy=(0, 0))\r\nfigure.savefig('figure.eps')\n```\n\n\n### Actual outcome\n\n$ ./venv/Scripts/python save_ps.py\r\nTraceback (most recent call last):\r\n File \"C:\\temp\\matplotlib_save_ps\\save_ps.py\", line 7, in <module>\r\n figure.savefig('figure.eps')\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\figure.py\", line 3272, in savefig\r\n self.canvas.print_figure(fname, **kwargs)\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\backend_bases.py\", line 2338, in print_figure\r\n result = print_method(\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\backend_bases.py\", line 2204, in <lambda>\r\n print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\_api\\deprecation.py\", line 410, in wrapper\r\n return func(*inner_args, **inner_kwargs)\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\backends\\backend_ps.py\", line 869, in _print_ps\r\n printer(fmt, outfile, dpi=dpi, dsc_comments=dsc_comments,\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\backends\\backend_ps.py\", line 927, in _print_figure\r\n self.figure.draw(renderer)\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\artist.py\", line 74, in draw_wrapper\r\n result = draw(artist, renderer, *args, **kwargs)\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\artist.py\", line 51, in draw_wrapper\r\n return draw(artist, renderer)\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\figure.py\", line 3069, in draw\r\n mimage._draw_list_compositing_images(\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\image.py\", line 131, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"C:\\temp\\matplotlib_save_ps\\venv\\lib\\site-packages\\matplotlib\\artist.py\", line 51, in draw_wrapper\r\n return draw\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/backends/backend_ps.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-230","original_id":"swebench-230","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: Constrained layout UserWarning even when False\n### Bug summary\r\n\r\nWhen using layout settings such as `plt.subplots_adjust` or `bbox_inches='tight`, a UserWarning is produced due to incompatibility with constrained_layout, even if constrained_layout = False. This was not the case in previous versions.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\na = np.linspace(0,2*np.pi,100)\r\nb = np.sin(a)\r\nc = np.cos(a)\r\nfig,ax = plt.subplots(1,2,figsize=(8,2),constrained_layout=False)\r\nax[0].plot(a,b)\r\nax[1].plot(a,c)\r\nplt.subplots_adjust(wspace=0)\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\nThe plot works fine but the warning is generated\r\n\r\n`/var/folders/ss/pfgdfm2x7_s4cyw2v0b_t7q80000gn/T/ipykernel_76923/4170965423.py:7: UserWarning: This figure was using a layout engine that is incompatible with subplots_adjust and/or tight_layout; not calling subplots_adjust.\r\n plt.subplots_adjust(wspace=0)`\r\n\r\n### Expected outcome\r\n\r\nno warning\r\n\r\n### Additional information\r\n\r\nWarning disappears when constrained_layout=False is removed\r\n\r\n### Operating system\r\n\r\nOS/X\r\n\r\n### Matplotlib Version\r\n\r\n3.6.0\r\n\r\n### Matplotlib Backend\r\n\r\n_No response_\r\n\r\n### Python version\r\n\r\n_No response_\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\nconda\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/figure.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-231","original_id":"swebench-231","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: ax.bar raises for all-nan data on matplotlib 3.6.1 \n### Bug summary\n\n`ax.bar` raises an exception in 3.6.1 when passed only nan data. This irrevocably breaks seaborn's histogram function (which draws and then removes a \"phantom\" bar to trip the color cycle).\n\n### Code for reproduction\n\n```python\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nf, ax = plt.subplots()\r\nax.bar([np.nan], [np.nan])\n```\n\n\n### Actual outcome\n\n```python-traceback\r\n---------------------------------------------------------------------------\r\nStopIteration Traceback (most recent call last)\r\nCell In [1], line 4\r\n 2 import matplotlib.pyplot as plt\r\n 3 f, ax = plt.subplots()\r\n----> 4 ax.bar([np.nan], [np.nan])[0].get_x()\r\n\r\nFile ~/miniconda/envs/py310/lib/python3.10/site-packages/matplotlib/__init__.py:1423, in _preprocess_data.<locals>.inner(ax, data, *args, **kwargs)\r\n 1420 @functools.wraps(func)\r\n 1421 def inner(ax, *args, data=None, **kwargs):\r\n 1422 if data is None:\r\n-> 1423 return func(ax, *map(sanitize_sequence, args), **kwargs)\r\n 1425 bound = new_sig.bind(ax, *args, **kwargs)\r\n 1426 auto_label = (bound.arguments.get(label_namer)\r\n 1427 or bound.kwargs.get(label_namer))\r\n\r\nFile ~/miniconda/envs/py310/lib/python3.10/site-packages/matplotlib/axes/_axes.py:2373, in Axes.bar(self, x, height, width, bottom, align, **kwargs)\r\n 2371 x0 = x\r\n 2372 x = np.asarray(self.convert_xunits(x))\r\n-> 2373 width = self._convert_dx(width, x0, x, self.convert_xunits)\r\n 2374 if xerr is not None:\r\n 2375 xerr = self._convert_dx(xerr, x0, x, self.convert_xunits)\r\n\r\nFile ~/miniconda/envs/py310/lib/python3.10/site-packages/matplotlib/axes/_axes.py:2182, in Axes._convert_dx(dx, x0, xconv, convert)\r\n 2170 try:\r\n 2171 # attempt to add the width to x0; this works for\r\n 2172 # datetime+timedelta, for instance\r\n (...)\r\n 2179 # removes the units from unit packages like `pint` that\r\n 2180 # wrap numpy arrays.\r\n 2181 try:\r\n-> 2182 x0 = cbook._safe_first_finite(x0)\r\n 2183 except (TypeError, IndexError, KeyError):\r\n 2184 pass\r\n\r\nFile ~/miniconda/envs/py310/lib/python3.10/site-packages/matplotlib/cbook/__init__.py:1749, in _safe_first_finite(obj, skip_nonfinite)\r\n 1746 raise RuntimeError(\"matplotlib does not \"\r\n 1747 \"support generators as input\")\r\n 1748 else:\r\n-> 1749 return next(val for val in obj if safe_isfinite(\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/axes/_axes.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-232","original_id":"swebench-232","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: Setting matplotlib.pyplot.style.library['seaborn-colorblind'] result in key error on matplotlib v3.6.1\n### Bug summary\n\nI have code that executes:\r\n```\r\nimport matplotlib.pyplot as plt\r\nthe_rc = plt.style.library[\"seaborn-colorblind\"]\r\n```\r\n\r\nUsing version 3.4.3 of matplotlib, this works fine. I recently installed my code on a machine with matplotlib version 3.6.1 and upon importing my code, this generated a key error for line `the_rc = plt.style.library[\"seaborn-colorblind\"]` saying \"seaborn-colorblind\" was a bad key.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\r\nthe_rc = plt.style.library[\"seaborn-colorblind\"]\n```\n\n\n### Actual outcome\n\nTraceback (most recent call last):\r\nKeyError: 'seaborn-colorblind'\n\n### Expected outcome\n\nseaborn-colorblind should be set as the matplotlib library style and I should be able to continue plotting with that style.\n\n### Additional information\n\n- Bug occurs with matplotlib version 3.6.1\r\n- Bug does not occur with matplotlib version 3.4.3\r\n- Tested on MacOSX and Ubuntu (same behavior on both)\n\n### Operating system\n\nOS/X\n\n### Matplotlib Version\n\n3.6.1\n\n### Matplotlib Backend\n\nMacOSX\n\n### Python version\n\n3.9.7\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/style/core.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-233","original_id":"swebench-233","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[ENH]: Axes.set_xticks/Axis.set_ticks only validates kwargs if ticklabels are set, but they should\n### Problem\n\nPer the doc of `Axis.set_ticks`:\r\n```\r\n **kwargs\r\n `.Text` properties for the labels. These take effect only if you\r\n pass *labels*. In other cases, please use `~.Axes.tick_params`.\r\n```\r\nThis means that in e.g. `ax.set_xticks([0, 1], xticklabels=[\"a\", \"b\"])`, the incorrect `xticklabels` silently do nothing; they are not even validated (because `labels` has not been passed).\n\n### Proposed solution\n\nWe should at least check that `kwargs` are valid Text properties in all cases; we could even consider making any kwargs an error if `labels` is not set.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/axis.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-234","original_id":"swebench-234","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: NumPy 1.24 deprecation warnings\n### Bug summary\r\n\r\nStarting NumPy 1.24 I observe several deprecation warnings.\r\n\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nplt.get_cmap()(np.empty((0, ), dtype=np.uint8))\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\n/usr/lib/python3.10/site-packages/matplotlib/colors.py:730: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays. The conversion of 257 to uint8 will fail in the future.\r\nFor the old behavior, usually:\r\n np.array(value).astype(dtype)`\r\nwill give the desired result (the cast overflows).\r\n xa[xa > self.N - 1] = self._i_over\r\n/usr/lib/python3.10/site-packages/matplotlib/colors.py:731: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays. The conversion of 256 to uint8 will fail in the future.\r\nFor the old behavior, usually:\r\n np.array(value).astype(dtype)`\r\nwill give the desired result (the cast overflows).\r\n xa[xa < 0] = self._i_under\r\n/usr/lib/python3.10/site-packages/matplotlib/colors.py:732: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays. The conversion of 258 to uint8 will fail in the future.\r\nFor the old behavior, usually:\r\n np.array(value).astype(dtype)`\r\nwill give the desired result (the cast overflows).\r\n xa[mask_bad] = self._i_bad\r\n```\r\n\r\n### Expected outcome\r\n\r\nNo warnings.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nArchLinux\r\n\r\n### Matplotlib Version\r\n\r\n3.6.2\r\n\r\n### Matplotlib Backend\r\n\r\nQtAgg\r\n\r\n### Python version\r\n\r\nPython 3.10.9\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\nLinux package manager\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/colors.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-235","original_id":"swebench-235","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: Setting norm with existing colorbar fails with 3.6.3\n### Bug summary\r\n\r\nSetting the norm to a `LogNorm` after the colorbar has been created (e.g. in interactive code) fails with an `Invalid vmin` value in matplotlib 3.6.3.\r\n\r\nThe same code worked in previous matplotlib versions.\r\n\r\nNot that vmin and vmax are explicitly set to values valid for `LogNorm` and no negative values (or values == 0) exist in the input data.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.colors import LogNorm\r\nimport numpy as np\r\n\r\n# create some random data to fill a 2d plot\r\nrng = np.random.default_rng(0)\r\nimg = rng.uniform(1, 5, (25, 25))\r\n\r\n# plot it\r\nfig, ax = plt.subplots(layout=\"constrained\")\r\nplot = ax.pcolormesh(img)\r\ncbar = fig.colorbar(plot, ax=ax)\r\n\r\nvmin = 1\r\nvmax = 5\r\n\r\nplt.ion()\r\nfig.show()\r\nplt.pause(0.5)\r\n\r\nplot.norm = LogNorm(vmin, vmax)\r\nplot.autoscale()\r\nplt.pause(0.5)\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_qt.py\", line 454, in _draw_idle\r\n self.draw()\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/backends/backend_agg.py\", line 405, in draw\r\n self.figure.draw(self.renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py\", line 74, in draw_wrapper\r\n result = draw(artist, renderer, *args, **kwargs)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py\", line 51, in draw_wrapper\r\n return draw(artist, renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/figure.py\", line 3082, in draw\r\n mimage._draw_list_compositing_images(\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/image.py\", line 131, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/artist.py\", line 51, in draw_wrapper\r\n return draw(artist, renderer)\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/axes/_base.py\", line 3100, in draw\r\n mimage._draw_list_compositing_images(\r\n File \"/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/matplotlib/image.py\", line 131, in _draw_list_compositing_images\r\n a.draw(renderer)\r\n File \"/home/mnoethe/\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/colors.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-236","original_id":"swebench-236","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: Unable to pickle figure with draggable legend\n### Bug summary\r\n\r\nI am unable to pickle figure with draggable legend. Same error comes for draggable annotations.\r\n\r\n\r\n\r\n\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport pickle\r\n\r\nfig = plt.figure()\r\nax = fig.add_subplot(111)\r\n\r\ntime=[0,1,2,3,4]\r\nspeed=[40,43,45,47,48]\r\n\r\nax.plot(time,speed,label=\"speed\")\r\n\r\nleg=ax.legend()\r\nleg.set_draggable(True) #pickling works after removing this line \r\n\r\npickle.dumps(fig)\r\nplt.show()\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n`TypeError: cannot pickle 'FigureCanvasQTAgg' object`\r\n\r\n### Expected outcome\r\n\r\nPickling successful\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nWindows 10\r\n\r\n### Matplotlib Version\r\n\r\n3.7.0\r\n\r\n### Matplotlib Backend\r\n\r\n_No response_\r\n\r\n### Python version\r\n\r\n3.10\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\npip\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/offsetbox.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-237","original_id":"swebench-237","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: Unable to pickle figure with aligned labels\n### Bug summary\r\n\r\n Unable to pickle figure after calling `align_labels()`\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport pickle\r\n\r\nfig = plt.figure()\r\nax1 = fig.add_subplot(211)\r\nax2 = fig.add_subplot(212)\r\ntime=[0,1,2,3,4]\r\nspeed=[40000,4300,4500,4700,4800]\r\nacc=[10,11,12,13,14]\r\nax1.plot(time,speed)\r\nax1.set_ylabel('speed')\r\nax2.plot(time,acc)\r\nax2.set_ylabel('acc')\r\n\r\nfig.align_labels() ##pickling works after removing this line \r\n\r\npickle.dumps(fig)\r\nplt.show()\r\n```\r\n\r\n\r\n### Actual outcome\r\n```\r\nalign.py\", line 16\r\npickle.dumps(fig)\r\nTypeError: cannot pickle 'weakref.ReferenceType' object\r\n```\r\n### Expected outcome\r\n\r\nPickling successful\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nWindows\r\n\r\n### Matplotlib Version\r\n\r\n3.7.0\r\n\r\n### Matplotlib Backend\r\n\r\n_No response_\r\n\r\n### Python version\r\n\r\n_No response_\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\nNone\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/cbook.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-238","original_id":"swebench-238","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: using clf and pyplot.draw in range slider on_changed callback blocks input to widgets\n### Bug summary\n\nWhen using clear figure, adding new widgets and then redrawing the current figure in the on_changed callback of a range slider the inputs to all the widgets in the figure are blocked. When doing the same in the button callback on_clicked, everything works fine.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as pyplot\r\nimport matplotlib.widgets as widgets\r\n\r\ndef onchanged(values):\r\n print(\"on changed\")\r\n print(values)\r\n pyplot.clf()\r\n addElements()\r\n pyplot.draw()\r\n\r\ndef onclick(e):\r\n print(\"on click\")\r\n pyplot.clf()\r\n addElements()\r\n pyplot.draw()\r\n\r\ndef addElements():\r\n ax = pyplot.axes([0.1, 0.45, 0.8, 0.1])\r\n global slider\r\n slider = widgets.RangeSlider(ax, \"Test\", valmin=1, valmax=10, valinit=(1, 10))\r\n slider.on_changed(onchanged)\r\n ax = pyplot.axes([0.1, 0.30, 0.8, 0.1])\r\n global button\r\n button = widgets.Button(ax, \"Test\")\r\n button.on_clicked(onclick)\r\n\r\naddElements()\r\n\r\npyplot.show()\n```\n\n\n### Actual outcome\n\nThe widgets can't receive any input from a mouse click, when redrawing in the on_changed callback of a range Slider. \r\nWhen using a button, there is no problem.\n\n### Expected outcome\n\nThe range slider callback on_changed behaves the same as the button callback on_clicked.\n\n### Additional information\n\nThe problem also occurred on Manjaro with:\r\n- Python version: 3.10.9\r\n- Matplotlib version: 3.6.2\r\n- Matplotlib backend: QtAgg\r\n- Installation of matplotlib via Linux package manager\r\n\n\n### Operating system\n\nWindows 10\n\n### Matplotlib Version\n\n3.6.2\n\n### Matplotlib Backend\n\nTkAgg\n\n### Python version\n\n3.11.0\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/figure.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-239","original_id":"swebench-239","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\n[Bug]: Attribute Error combining matplotlib 3.7.1 and mplcursor on data selection\n### Bug summary\r\n\r\nIf you combine mplcursor and matplotlib 3.7.1, you'll get an `AttributeError: 'NoneType' object has no attribute 'canvas'` after clicking a few data points. Henceforth, selecting a new data point will trigger the same traceback. Otherwise, it works fine. \r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport mplcursors as mpl\r\n\r\nx = np.arange(1, 11) \r\ny1 = x\r\n\r\nplt.scatter(x,y1)\r\n\r\nmpl.cursor()\r\nplt.show()\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\MrAni\\Python\\miniconda3\\lib\\site-packages\\matplotlib\\cbook\\__init__.py\", line 304, in process\r\n func(*args, **kwargs)\r\n File \"C:\\Users\\MrAni\\Python\\miniconda3\\lib\\site-packages\\matplotlib\\offsetbox.py\", line 1550, in on_release\r\n if self._check_still_parented() and self.got_artist:\r\n File \"C:\\Users\\MrAni\\Python\\miniconda3\\lib\\site-packages\\matplotlib\\offsetbox.py\", line 1560, in _check_still_parented\r\n self.disconnect()\r\n File \"C:\\Users\\MrAni\\Python\\miniconda3\\lib\\site-packages\\matplotlib\\offsetbox.py\", line 1568, in disconnect\r\n self.canvas.mpl_disconnect(cid)\r\n File \"C:\\Users\\MrAni\\Python\\miniconda3\\lib\\site-packages\\matplotlib\\offsetbox.py\", line 1517, in <lambda>\r\n canvas = property(lambda self: self.ref_artist.figure.canvas)\r\nAttributeError: 'NoneType' object has no attribute 'canvas'\r\n```\r\n\r\n### Expected outcome\r\n\r\nNo terminal output\r\n\r\n### Additional information\r\n\r\nUsing matplotlib 3.7.0 or lower works fine. Using a conda install or pip install doesn't affect the output. \r\n\r\n### Operating system\r\n\r\nWindows 11 and Windwos 10 \r\n\r\n### Matplotlib Version\r\n\r\n3.7.1\r\n\r\n### Matplotlib Backend\r\n\r\nQtAgg\r\n\r\n### Python version\r\n\r\n3.9.16\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\nconda\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/offsetbox.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-240","original_id":"swebench-240","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\nUpdate colorbar after changing mappable.norm\nHow can I update a colorbar, after I changed the norm instance of the colorbar?\n\n`colorbar.update_normal(mappable)` has now effect and `colorbar.update_bruteforce(mappable)` throws a `ZeroDivsionError`-Exception.\n\nConsider this example:\n\n``` python\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LogNorm\nimport numpy as np\n\nimg = 10**np.random.normal(1, 1, size=(50, 50))\n\nfig, ax = plt.subplots(1, 1)\nplot = ax.imshow(img, cmap='gray')\ncb = fig.colorbar(plot, ax=ax)\nplot.norm = LogNorm()\ncb.update_normal(plot) # no effect\ncb.update_bruteforce(plot) # throws ZeroDivisionError\nplt.show()\n```\n\nOutput for `cb.update_bruteforce(plot)`:\n\n```\nTraceback (most recent call last):\n File \"test_norm.py\", line 12, in <module>\n cb.update_bruteforce(plot)\n File \"/home/maxnoe/.local/anaconda3/lib/python3.4/site-packages/matplotlib/colorbar.py\", line 967, in update_bruteforce\n self.draw_all()\n File \"/home/maxnoe/.local/anaconda3/lib/python3.4/site-packages/matplotlib/colorbar.py\", line 342, in draw_all\n self._process_values()\n File \"/home/maxnoe/.local/anaconda3/lib/python3.4/site-packages/matplotlib/colorbar.py\", line 664, in _process_values\n b = self.norm.inverse(self._uniform_y(self.cmap.N + 1))\n File \"/home/maxnoe/.local/anaconda3/lib/python3.4/site-packages/matplotlib/colors.py\", line 1011, in inverse\n return vmin * ma.power((vmax / vmin), val)\nZeroDivisionError: division by zero\n```\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/colorbar.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-241","original_id":"swebench-241","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\nxlim_changed not emitted on shared axis\n<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.-->\r\n<!--You can feel free to delete the sections that do not apply.-->\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nWhen an axis is shared with another its registered \"xlim_changed\" callbacks does not get called when the change is induced by a shared axis (via sharex=). \r\n\r\nIn _base.py the set_xlim for sibling axis are called with emit=False:\r\n\r\n```\r\nmatplotlib/lib/matplotlib/axes/_base.py:\r\n\r\n/.../\r\ndef set_xlim(...)\r\n/.../\r\n if emit:\r\n self.callbacks.process('xlim_changed', self)\r\n # Call all of the other x-axes that are shared with this one\r\n for other in self._shared_x_axes.get_siblings(self):\r\n if other is not self:\r\n other.set_xlim(self.viewLim.intervalx,\r\n emit=False, auto=auto)\r\n```\r\n\r\nI'm very new to matplotlib, so perhaps there is a good reason for this? emit=False seems to disable both continued \"inheritance\" of axis (why?) and triggering of change callbacks (looking at the code above).\r\n\r\nIt seems like one would at least want to trigger the xlim_changed callbacks as they would be intended to react to any change in axis limits.\r\n\r\nEdit: Setting emit=True seems to introduce a recursion issue (not sure why but as inheritance seems to be passed along anyway it doesn't really matter). Moving the callback call to outside of the \"if emit:\"-statement seems to solve the issue as far as I can see when trying it out. Any reason to keep it inside the if-statement? \r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/matplotlib/axis.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-242","original_id":"swebench-242","prompt":"Repository: matplotlib/matplotlib\n\nGitHub issue:\nError creating AxisGrid with non-default axis class\n<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.-->\r\n<!--You can feel free to delete the sections that do not apply.-->\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nCreating `AxesGrid` using cartopy `GeoAxes` as `axis_class` raises `TypeError: 'method' object is not subscriptable`. Seems to be due to different behaviour of `axis` attr. for `mpl_toolkits.axes_grid1.mpl_axes.Axes` and other axes instances (like `GeoAxes`) where `axis` is only a callable. The error is raised in method `mpl_toolkits.axes_grid1.axes_grid._tick_only` when trying to access keys from `axis` attr.\r\n\r\n**Code for reproduction**\r\n\r\n<!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.-->\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom cartopy.crs import PlateCarree\r\nfrom cartopy.mpl.geoaxes import GeoAxes\r\nfrom mpl_toolkits.axes_grid1 import AxesGrid\r\n\r\nfig = plt.figure()\r\naxes_class = (GeoAxes, dict(map_projection=PlateCarree()))\r\ngr = AxesGrid(fig, 111, nrows_ncols=(1,1),\r\n axes_class=axes_class)\r\n```\r\n\r\n**Actual outcome**\r\n\r\n<!--The output produced by the above code, which may be a screenshot, console output, etc.-->\r\n\r\n```\r\nTraceback (most recent call last):\r\n\r\n File \"/home/jonasg/stuff/bugreport_mpl_toolkits_AxesGrid.py\", line 16, in <module>\r\n axes_class=axes_class)\r\n\r\n File \"/home/jonasg/miniconda3/envs/pya/lib/python3.7/site-packages/mpl_toolkits/axes_grid1/axes_grid.py\", line 618, in __init__\r\n self.set_label_mode(label_mode)\r\n\r\n File \"/home/jonasg/miniconda3/envs/pya/lib/python3.7/site-packages/mpl_toolkits/axes_grid1/axes_grid.py\", line 389, in set_label_mode\r\n _tick_only(ax, bottom_on=False, left_on=False)\r\n\r\n File \"/home/jonasg/miniconda3/envs/pya/lib/python3.7/site-packages/mpl_toolkits/axes_grid1/axes_grid.py\", line 27, in _tick_only\r\n ax.axis[\"bottom\"].toggle(ticklabels=bottom_off, label=bottom_off)\r\n\r\nTypeError: 'method' object is not subscriptable\r\n```\r\n\r\n**Expected outcome**\r\n\r\n<!--A description of the expected outcome from the code snippet-->\r\n<!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on-->\r\n\r\n**Matplotlib version**\r\n<!--Please specify your platform and versions of the relevant libraries you are \n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["lib/mpl_toolkits/axes_grid1/axes_grid.py"],"mode":"swe-localize","license":"MIT","repo":"matplotlib/matplotlib","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-243","original_id":"swebench-243","prompt":"Repository: mwaskom/seaborn\n\nGitHub issue:\npairplot fails with hue_order not containing all hue values in seaborn 0.11.1\nIn seaborn < 0.11, one could plot only a subset of the values in the hue column, by passing a hue_order list containing only the desired values. Points with hue values not in the list were simply not plotted.\n```python\niris = sns.load_dataset(\"iris\")`\n# The hue column contains three different species; here we want to plot two\nsns.pairplot(iris, hue=\"species\", hue_order=[\"setosa\", \"versicolor\"])\n```\n\nThis no longer works in 0.11.1. Passing a hue_order list that does not contain some of the values in the hue column raises a long, ugly error traceback. The first exception arises in seaborn/_core.py:\n```\nTypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''\n```\nseaborn version: 0.11.1\nmatplotlib version: 3.3.2\nmatplotlib backends: MacOSX, Agg or jupyter notebook inline.\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["seaborn/_oldcore.py"],"mode":"swe-localize","license":"MIT","repo":"mwaskom/seaborn","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-244","original_id":"swebench-244","prompt":"Repository: mwaskom/seaborn\n\nGitHub issue:\nPolyFit is not robust to missing data\n```python\r\nso.Plot([1, 2, 3, None, 4], [1, 2, 3, 4, 5]).add(so.Line(), so.PolyFit())\r\n```\r\n\r\n<details><summary>Traceback</summary>\r\n\r\n```python-traceback\r\n---------------------------------------------------------------------------\r\nLinAlgError Traceback (most recent call last)\r\nFile ~/miniconda3/envs/seaborn-py39-latest/lib/python3.9/site-packages/IPython/core/formatters.py:343, in BaseFormatter.__call__(self, obj)\r\n 341 method = get_real_method(obj, self.print_method)\r\n 342 if method is not None:\r\n--> 343 return method()\r\n 344 return None\r\n 345 else:\r\n\r\nFile ~/code/seaborn/seaborn/_core/plot.py:265, in Plot._repr_png_(self)\r\n 263 def _repr_png_(self) -> tuple[bytes, dict[str, float]]:\r\n--> 265 return self.plot()._repr_png_()\r\n\r\nFile ~/code/seaborn/seaborn/_core/plot.py:804, in Plot.plot(self, pyplot)\r\n 800 \"\"\"\r\n 801 Compile the plot spec and return the Plotter object.\r\n 802 \"\"\"\r\n 803 with theme_context(self._theme_with_defaults()):\r\n--> 804 return self._plot(pyplot)\r\n\r\nFile ~/code/seaborn/seaborn/_core/plot.py:822, in Plot._plot(self, pyplot)\r\n 819 plotter._setup_scales(self, common, layers, coord_vars)\r\n 821 # Apply statistical transform(s)\r\n--> 822 plotter._compute_stats(self, layers)\r\n 824 # Process scale spec for semantic variables and coordinates computed by stat\r\n 825 plotter._setup_scales(self, common, layers)\r\n\r\nFile ~/code/seaborn/seaborn/_core/plot.py:1110, in Plotter._compute_stats(self, spec, layers)\r\n 1108 grouper = grouping_vars\r\n 1109 groupby = GroupBy(grouper)\r\n-> 1110 res = stat(df, groupby, orient, scales)\r\n 1112 if pair_vars:\r\n 1113 data.frames[coord_vars] = res\r\n\r\nFile ~/code/seaborn/seaborn/_stats/regression.py:41, in PolyFit.__call__(self, data, groupby, orient, scales)\r\n 39 def __call__(self, data, groupby, orient, scales):\r\n---> 41 return groupby.apply(data, self._fit_predict)\r\n\r\nFile ~/code/seaborn/seaborn/_core/groupby.py:109, in GroupBy.apply(self, data, func, *args, **kwargs)\r\n 106 grouper, groups = self._get_groups(data)\r\n 108 if not grouper:\r\n--> 109 return self._reorder_columns(func(data, *args, **kwargs), data)\r\n 111 parts = {}\r\n 112 for key, part_df in data.groupby(grouper, sort=False):\r\n\r\nFile ~/code/seaborn/seaborn/_stats/regression.py:30, in PolyFit._fit_predict(self, data)\r\n 28 xx = yy = []\r\n 29 else:\r\n---> 30 p = np.polyfit(x, y, \n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["seaborn/_stats/regression.py"],"mode":"swe-localize","license":"MIT","repo":"mwaskom/seaborn","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-245","original_id":"swebench-245","prompt":"Repository: mwaskom/seaborn\n\nGitHub issue:\nColor mapping fails with boolean data\n```python\r\nso.Plot([\"a\", \"b\"], [1, 2], color=[True, False]).add(so.Bar())\r\n```\r\n```python-traceback\r\n---------------------------------------------------------------------------\r\nTypeError Traceback (most recent call last)\r\n...\r\nFile ~/code/seaborn/seaborn/_core/plot.py:841, in Plot._plot(self, pyplot)\r\n 838 plotter._compute_stats(self, layers)\r\n 840 # Process scale spec for semantic variables and coordinates computed by stat\r\n--> 841 plotter._setup_scales(self, common, layers)\r\n 843 # TODO Remove these after updating other methods\r\n 844 # ---- Maybe have debug= param that attaches these when True?\r\n 845 plotter._data = common\r\n\r\nFile ~/code/seaborn/seaborn/_core/plot.py:1252, in Plotter._setup_scales(self, p, common, layers, variables)\r\n 1250 self._scales[var] = Scale._identity()\r\n 1251 else:\r\n-> 1252 self._scales[var] = scale._setup(var_df[var], prop)\r\n 1254 # Everything below here applies only to coordinate variables\r\n 1255 # We additionally skip it when we're working with a value\r\n 1256 # that is derived from a coordinate we've already processed.\r\n 1257 # e.g., the Stat consumed y and added ymin/ymax. In that case,\r\n 1258 # we've already setup the y scale and ymin/max are in scale space.\r\n 1259 if axis is None or (var != coord and coord in p._variables):\r\n\r\nFile ~/code/seaborn/seaborn/_core/scales.py:351, in ContinuousBase._setup(self, data, prop, axis)\r\n 349 vmin, vmax = axis.convert_units((vmin, vmax))\r\n 350 a = forward(vmin)\r\n--> 351 b = forward(vmax) - forward(vmin)\r\n 353 def normalize(x):\r\n 354 return (x - a) / b\r\n\r\nTypeError: numpy boolean subtract, the `-` operator, is not supported, use the bitwise_xor, the `^` operator, or the logical_xor function instead.\r\n```\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["seaborn/_core/scales.py"],"mode":"swe-localize","license":"MIT","repo":"mwaskom/seaborn","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-246","original_id":"swebench-246","prompt":"Repository: mwaskom/seaborn\n\nGitHub issue:\npairplot raises KeyError with MultiIndex DataFrame\nWhen trying to pairplot a MultiIndex DataFrame, `pairplot` raises a `KeyError`:\r\n\r\nMRE:\r\n\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\nimport seaborn as sns\r\n\r\n\r\ndata = {\r\n (\"A\", \"1\"): np.random.rand(100),\r\n (\"A\", \"2\"): np.random.rand(100),\r\n (\"B\", \"1\"): np.random.rand(100),\r\n (\"B\", \"2\"): np.random.rand(100),\r\n}\r\ndf = pd.DataFrame(data)\r\nsns.pairplot(df)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n[c:\\Users\\KLuu\\anaconda3\\lib\\site-packages\\seaborn\\axisgrid.py](file:///C:/Users/KLuu/anaconda3/lib/site-packages/seaborn/axisgrid.py) in pairplot(data, hue, hue_order, palette, vars, x_vars, y_vars, kind, diag_kind, markers, height, aspect, corner, dropna, plot_kws, diag_kws, grid_kws, size)\r\n 2142 diag_kws.setdefault(\"legend\", False)\r\n 2143 if diag_kind == \"hist\":\r\n-> 2144 grid.map_diag(histplot, **diag_kws)\r\n 2145 elif diag_kind == \"kde\":\r\n 2146 diag_kws.setdefault(\"fill\", True)\r\n\r\n[c:\\Users\\KLuu\\anaconda3\\lib\\site-packages\\seaborn\\axisgrid.py](file:///C:/Users/KLuu/anaconda3/lib/site-packages/seaborn/axisgrid.py) in map_diag(self, func, **kwargs)\r\n 1488 plt.sca(ax)\r\n 1489 \r\n-> 1490 vector = self.data[var]\r\n 1491 if self._hue_var is not None:\r\n 1492 hue = self.data[self._hue_var]\r\n\r\n[c:\\Users\\KLuu\\anaconda3\\lib\\site-packages\\pandas\\core\\frame.py](file:///C:/Users/KLuu/anaconda3/lib/site-packages/pandas/core/frame.py) in __getitem__(self, key)\r\n 3765 if is_iterator(key):\r\n 3766 key = list(key)\r\n-> 3767 indexer = self.columns._get_indexer_strict(key, \"columns\")[1]\r\n 3768 \r\n 3769 # take() does not accept boolean indexers\r\n\r\n[c:\\Users\\KLuu\\anaconda3\\lib\\site-packages\\pandas\\core\\indexes\\multi.py](file:///C:/Users/KLuu/anaconda3/lib/site-packages/pandas/core/indexes/multi.py) in _get_indexer_strict(self, key, axis_name)\r\n 2534 indexer = self._get_indexer_level_0(keyarr)\r\n 2535 \r\n-> 2536 self._raise_if_missing(key, indexer, axis_name)\r\n 2537 return self[indexer], indexer\r\n 2538 \r\n\r\n[c:\\Users\\KLuu\\anaconda3\\lib\\site-packages\\pandas\\core\\indexes\\multi.py](file:///C:/Users/KLuu/anaconda3/lib/site-packages/pandas/core/indexes/multi.py) in _raise_if_missing(self, key, indexer, axis_name)\r\n 2552 cmask = check == -1\r\n 2553 if cmask.any():\r\n-> 2554 raise KeyError(f\"{keyarr\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["seaborn/axisgrid.py"],"mode":"swe-localize","license":"MIT","repo":"mwaskom/seaborn","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-247","original_id":"swebench-247","prompt":"Repository: pallets/flask\n\nGitHub issue:\nRaise error when blueprint name contains a dot\nThis is required since every dot is now significant since blueprints can be nested. An error was already added for endpoint names in 1.0, but should have been added for this as well.\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["src/flask/blueprints.py"],"mode":"swe-localize","license":"MIT","repo":"pallets/flask","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-248","original_id":"swebench-248","prompt":"Repository: pallets/flask\n\nGitHub issue:\nAdd a file mode parameter to flask.Config.from_file()\nPython 3.11 introduced native TOML support with the `tomllib` package. This could work nicely with the `flask.Config.from_file()` method as an easy way to load TOML config files:\r\n\r\n```python\r\napp.config.from_file(\"config.toml\", tomllib.load)\r\n```\r\n\r\nHowever, `tomllib.load()` takes an object readable in binary mode, while `flask.Config.from_file()` opens a file in text mode, resulting in this error:\r\n\r\n```\r\nTypeError: File must be opened in binary mode, e.g. use `open('foo.toml', 'rb')`\r\n```\r\n\r\nWe can get around this with a more verbose expression, like loading from a file opened with the built-in `open()` function and passing the `dict` to `app.Config.from_mapping()`:\r\n\r\n```python\r\n# We have to repeat the path joining that from_file() does\r\nwith open(os.path.join(app.config.root_path, \"config.toml\"), \"rb\") as file:\r\n app.config.from_mapping(tomllib.load(file))\r\n```\r\n\r\nBut adding a file mode parameter to `flask.Config.from_file()` would enable the use of a simpler expression. E.g.:\r\n\r\n```python\r\napp.config.from_file(\"config.toml\", tomllib.load, mode=\"b\")\r\n```\r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["src/flask/config.py"],"mode":"swe-localize","license":"MIT","repo":"pallets/flask","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"swebench-249","original_id":"swebench-249","prompt":"Repository: pallets/flask\n\nGitHub issue:\nFlask routes to return domain/sub-domains information\nCurrently when checking **flask routes** it provides all routes but **it is no way to see which routes are assigned to which subdomain**.\r\n\r\n**Default server name:**\r\nSERVER_NAME: 'test.local'\r\n\r\n**Domains (sub-domains):**\r\ntest.test.local\r\nadmin.test.local\r\ntest.local\r\n\r\n**Adding blueprints:**\r\napp.register_blueprint(admin_blueprint,url_prefix='',subdomain='admin')\r\napp.register_blueprint(test_subdomain_blueprint,url_prefix='',subdomain='test')\r\n\r\n\r\n```\r\n$ flask routes\r\n * Tip: There are .env or .flaskenv files present. Do \"pip install python-dotenv\" to use them.\r\nEndpoint Methods Rule\r\n------------------------------------------------------- --------- ------------------------------------------------\r\nadmin_blueprint.home GET /home\r\ntest_subdomain_blueprint.home GET /home\r\nstatic GET /static/<path:filename>\r\n...\r\n```\r\n\r\n\r\n**Feature request**\r\nIt will be good to see something like below (that will make more clear which route for which subdomain, because now need to go and check configuration).\r\n**If it is not possible to fix routes**, can you add or tell which method(s) should be used to get below information from flask? \r\n\r\n```\r\n$ flask routes\r\n * Tip: There are .env or .flaskenv files present. Do \"pip install python-dotenv\" to use them.\r\nDomain Endpoint Methods Rule\r\n----------------- ---------------------------------------------------- ---------- ------------------------------------------------\r\nadmin.test.local admin_blueprint.home GET /home\r\ntest.test.local test_subdomain_blueprint.home GET /home\r\ntest.local static GET /static/<path:filename>\r\n...\r\n```\r\n\n\n\nWhich single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>","source":"swebench","source_file":"external/swebench.jsonl","skill_fit":["scientific-method","systems","five-whys-plus"],"family":"Debugging/fault-localization","type":"target","target":true,"gold_files":["src/flask/cli.py"],"mode":"swe-localize","license":"MIT","repo":"pallets/flask","decision_instruction":"Which single source file in this repository most likely needs to be modified to fix this issue? Reason about the symptom and where it originates, then give the repository-relative path. End with exactly: ANSWER: <path/to/file.ext>"}
+{"id":"map-territory-01","original_id":"map-territory-01","prompt":"The README for a payment service states: \"All monetary amounts are stored as floating-point numbers.\" A developer queries the production database and finds that all amount columns are defined as NUMERIC(19,4) — a fixed-precision decimal type. The README has not been updated since the initial prototype.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-02","original_id":"map-territory-02","prompt":"A service's API contract document specifies that the /users endpoint returns results sorted by created_at ascending. A developer calls the endpoint in production and receives results sorted by id ascending, which happens to be the same order for most records but diverges for a handful of users who were migrated with out-of-sequence IDs.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-03","original_id":"map-territory-03","prompt":"An internal wiki page says the image processing worker runs on a single-threaded event loop and is not thread-safe. A developer inspecting the current production deployment finds it is running with GOMAXPROCS=1, uses no goroutines for the critical path, and processes one image at a time from a queue.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-04","original_id":"map-territory-04","prompt":"A code comment above a caching layer reads: \"Thread-safe: uses a read-write mutex to protect concurrent access.\" During a load test at 500 concurrent requests, the service intermittently returns corrupted cached data and occasionally panics with an index-out-of-range error in the cache lookup path.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-05","original_id":"map-territory-05","prompt":"The Terraform configuration for a production database sets a connection timeout of 30 seconds. Engineers monitoring the service observe that database queries reliably fail with a timeout error at exactly 30 seconds under load. The application error logs confirm the timeout value in the connection string matches the Terraform config.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-06","original_id":"map-territory-06","prompt":"An API's OpenAPI spec marks the /v1/reports endpoint as deprecated with a sunset date of January 2024. An engineer checking production traffic logs in June 2025 finds that the endpoint is still receiving 40,000 requests per day from live customers.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-07","original_id":"map-territory-07","prompt":"A service's runbook says the rate limit for the external enrichment API is 1,000 requests per minute. The team observes that whenever request rate exceeds 200 per minute, the external API starts returning HTTP 429 responses. Checking the external vendor's current pricing page confirms the free tier is capped at 200 req/min; the runbook was written when the team was on an enterprise plan that has since expired.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-08","original_id":"map-territory-08","prompt":"A distributed tracing dashboard shows that the checkout service's p99 latency is 850ms. The SLO document states the agreed p99 target for checkout is 1,000ms. Engineers reviewing the dashboard confirm the metric collection methodology matches what the SLO was written against.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-09","original_id":"map-territory-09","prompt":"A migration script's header comment reads: \"Idempotent — safe to run multiple times.\" When an engineer runs the script twice on the staging database, the second run inserts duplicate rows and throws a foreign key constraint error on the third table it processes.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-10","original_id":"map-territory-10","prompt":"A feature flag system's documentation states that flags default to OFF for all users when first created. A developer creates a new flag and immediately checks production traffic logs, which show 0% of requests are entering the flag-gated code path. The behavior matches the documented default.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-11","original_id":"map-territory-11","prompt":"An architecture diagram shows the notification service communicating with the email provider directly over HTTPS. Examining the production network traffic, engineers find all email traffic routes through an undocumented SMTP relay host that was added two years ago as a temporary fix and never removed.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-12","original_id":"map-territory-12","prompt":"A Python library's docstring states that parse_date() raises a ValueError when given an invalid date string. A developer writes a unit test that passes an invalid string and catches a ValueError. The test passes consistently, confirming the documented behavior.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-13","original_id":"map-territory-13","prompt":"A mobile app's crash reporting dashboard shows a 0.1% crash rate, which product management interprets as healthy. A developer examines the crash reporter's initialization code and discovers it only starts capturing crashes after the user reaches the home screen — meaning crashes during the onboarding flow, which affects 25% of new installs, are not captured at all.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-14","original_id":"map-territory-14","prompt":"A load balancer's configuration file specifies a health check interval of 10 seconds with a failure threshold of 3. Operations engineers observe that when a backend pod becomes unhealthy, the load balancer stops routing traffic to it after approximately 30 seconds. The observed behavior is consistent with the configuration.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-15","original_id":"map-territory-15","prompt":"A backend function is documented as returning an empty list when no records match, per its docstring and the original design doc. In production, when a query returns no results, the API response body is null rather than an empty JSON array, causing null pointer exceptions in several client integrations.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-16","original_id":"map-territory-16","prompt":"A security spec states that all API tokens expire after 60 minutes of inactivity. An engineer runs a test: they authenticate, wait 75 minutes without any requests, then make an authenticated request. The API returns a 401 Unauthorized, consistent with the documented policy.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-17","original_id":"map-territory-17","prompt":"A search service's documentation claims full-text search is case-insensitive. A developer queries the search endpoint with the term \"Widget\" and receives results for \"widget\" and \"WIDGET\" correctly. However, querying with \"wídget\" (with an accent) returns no results, even though records containing that spelling exist in the index.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-18","original_id":"map-territory-18","prompt":"An internal design document says the job queue uses at-least-once delivery semantics, so consumers must be idempotent. Engineers examining the queue consumer logs observe that occasional duplicate messages do arrive and are processed multiple times. The consumer is already written to handle duplicates via an idempotency key table, and no data corruption is observed.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-19","original_id":"map-territory-19","prompt":"A service's deployment docs say it is stateless and any instance can be killed at any time without data loss. During a chaos engineering exercise, engineers terminate a random instance and discover that in-progress file upload sessions stored in the instance's local temp directory are lost, causing partial uploads to be orphaned with no cleanup mechanism.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-20","original_id":"map-territory-20","prompt":"A team's monitoring alert is configured to fire when error rate exceeds 1% over a 5-minute window, according to the alert configuration file. Engineers reviewing the alert history see that it has fired consistently when error rate hits approximately 1% over a 5-minute window, matching the configured threshold.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-21","original_id":"map-territory-21","prompt":"A changelog entry from eight months ago says the legacy v2 export format was removed. A support ticket arrives from a customer reporting that the v2 export endpoint still works for them. An engineer queries the production routing configuration and finds the v2 route was never actually removed — only the code path was flagged internally as deprecated.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-22","original_id":"map-territory-22","prompt":"A CI pipeline's README states that all tests must pass before a PR can be merged. An engineer examines the branch protection rules in the repository settings and sees that the CI check is listed as a required status check, meaning GitHub will block merges if it fails.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-23","original_id":"map-territory-23","prompt":"A database schema description in the team's Confluence doc says the orders table has a compound unique index on (customer_id, order_date) to prevent duplicate orders per day per customer. An engineer runs SHOW INDEXES on the production table and finds only a primary key index on order_id; no compound unique index exists.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-24","original_id":"map-territory-24","prompt":"A product spec says that deleting an account is a soft delete: the record is marked deleted_at but not removed. An engineer reviews the production account deletion handler and finds it sets a deleted_at timestamp and removes the user from all active session tables, but does not hard-delete any rows from the users table. The behavior matches the spec.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-25","original_id":"map-territory-25","prompt":"An SDK's documentation states the client automatically retries failed requests up to three times with exponential backoff. A developer instrumenting network calls observes that on a 503 response, the SDK immediately propagates the error to the caller with no retries attempted.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-26","original_id":"map-territory-26","prompt":"A team's cost allocation dashboard attributes 100% of database compute costs to the \"data-platform\" cost center, which is how the tagging policy document specifies it should be. An engineer auditing the AWS Cost Explorer report sees that all RDS instances are tagged cost-center=data-platform. The dashboard and the policy match.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-27","original_id":"map-territory-27","prompt":"A WebSocket server's documentation says idle connections are closed after 5 minutes. A developer runs a long-lived connection without sending any messages and the connection remains open for 47 minutes before the test is ended — it was never dropped by the server.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-28","original_id":"map-territory-28","prompt":"A design doc states that the recommendation engine is updated with new training data every 24 hours. A data engineer checks the ML pipeline's job history and confirms a retraining job has been completing successfully every day at 02:00 UTC, and the model artifact's timestamp in the model registry reflects daily updates.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-29","original_id":"map-territory-29","prompt":"A secrets management runbook says application secrets are rotated automatically every 90 days. A security engineer auditing the vault shows that the database password for the core API service was created 14 months ago and has never been rotated; the automatic rotation policy was never applied to that secret.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"map-territory-30","original_id":"map-territory-30","prompt":"A service contract specifies that POST /events returns HTTP 202 Accepted for all valid payloads, indicating asynchronous processing. A developer sends a well-formed event payload to the production endpoint and receives an HTTP 202 response. The behavior matches the contract.","source":"map-territory-verify","source_file":"authored/map-territory-verify.jsonl","skill_fit":["map-territory"],"family":"Debugging/fault-localization","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are given a stated description (docs, comments, a spec, or an assumption) and an observation of actual behavior. Answer YES if the actual behavior CONTRADICTS the description — meaning you must trust the territory (real behavior) over the map (the description) and investigate the real code/data. Answer NO if the description and the observed behavior are CONSISTENT (the map matches the territory).","mode":"binary-decision"}
+{"id":"glm-distractor-8","original_id":"glm-distractor-8","prompt":"How can I convert all the lowercase letters in a string to uppercase using Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-11","original_id":"glm-distractor-11","prompt":"**This Kata is intended as a small challenge for my students** All Star Code Challenge #18 Create a function called that accepts 2 string arguments and returns an integer of the count of occurrences the 2nd argument is found in the first one. If no occurrences can be found, a count of 0 should be returned. Notes: * The first argument can be an empty string * The second string argument will always be of length 1 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-12","original_id":"glm-distractor-12","prompt":"Implement quick sort to sort the given array of integers. Write corresponding code in Python. [9, 5, 8, 1, 3, 6, 7]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-13","original_id":"glm-distractor-13","prompt":"Zoe wants to go on the field trip to Washington DC with her middle school this spring and the cost is $485. Her grandma gave her $250 toward her fees and she must earn the rest by selling candy bars. She makes $1.25 for every candy bar she sells. How many candy bars does Zoe need to sell to earn the money for the trip?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-16","original_id":"glm-distractor-16","prompt":"Can you also tell me the date and time of the Indiana Comic Convention?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-17","original_id":"glm-distractor-17","prompt":"Create an algorithm to rotate an array by one element. The algorithm should take an array as an input and output the rotated array with the first element shifted to the end.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-18","original_id":"glm-distractor-18","prompt":"Generate a correct Python program for plotting bar chart for the following data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-19","original_id":"glm-distractor-19","prompt":"Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely. * Inversion: change the state of each bit to the opposite state * Logical left shift: shift left by 1 * Logical right shift: shift right by 1 Constraints * $0 \\leq x \\leq 2^{32} - 1$ Input The input is given in the following format. $x$ Output Print the given bits, results of inversion, left shift and right shift in a line respectively. Examples Input 8 Output 00000000000000000000000000001000 11111111111111111111111111110111 00000000000000000000000000010000 00000000000000000000000000000100 Input 13 Output 00000000000000000000000000001101 11111111111111111111111111110010 00000000000000000000000000011010 00000000000000000000000000000110 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-21","original_id":"glm-distractor-21","prompt":"Create a Python program that fetches the user's current time and sets a reminder after 30 minutes.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-22","original_id":"glm-distractor-22","prompt":"Could you delineate a methodology, utilising the Python programming language, to extract the middle value, labeled as the median, from an unorganized collection of integral numbers? Numbers = [12, 7, 21, 3, 9]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-23","original_id":"glm-distractor-23","prompt":"Create a Python 3 class for a directory list widget using Qt that includes a grid layout with a directory list view and buttons to add or remove directories. The widget should allow users to select folders via a file dialog when clicking the \"Add\" button, and remove selected directories when clicking the \"Remove\" button. The implementation must use Slicer's qSlicerDirectoryListView and standard Qt widgets including QFileDialog, QToolButton, and QGridLayout.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-42","original_id":"glm-distractor-42","prompt":"Write a Python3 function that returns the Cargo home directory path by first checking the CARGO_HOME environment variable. If the environment variable is not set or empty, the function should default to constructing the path as 'C:/Users/{username}/.cargo' using the current user's username. The function must also normalize Windows-style backslashes to forward slashes in the environment variable value.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-46","original_id":"glm-distractor-46","prompt":"Create a Python 3 script that uses the clustergrammer library to load a matrix from stdin, perform optional filtering and normalization steps (such as sum-based filtering, z-score normalization, top-N selection, and threshold filtering), generate a hierarchical clustering visualization using cosine distance, and then output the resulting network data in JSON format for frontend visualization. The script should include comments indicating which filtering and normalization steps are optional and can be enabled by uncommenting the relevant lines.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-48","original_id":"glm-distractor-48","prompt":"Solve the inequality: 8x - 9 < 2. Express the solution in interval notation.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-50","original_id":"glm-distractor-50","prompt":"A toy store manager received a large order of Mr. Slinkums just in time for the holidays. The manager places $20\\%$ of them on the shelves, leaving the other 120 Mr. Slinkums in storage. How many Mr. Slinkums were in this order?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-51","original_id":"glm-distractor-51","prompt":"Write a python function to check if a given file is in NOAA ACE format by verifying that the first line starts with ':' and the third line contains 'NOAA'. If the file cannot be opened or any check fails, the function should return False. Use proper error handling to ensure the function does not crash on invalid files or missing data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-69","original_id":"glm-distractor-69","prompt":"Write a program that allows users to search for phone numbers by name in a phone book. Implement the phone book using a custom data structure that you create. The data structure should have the following functionalities: - Add a contact with a name and phone number to the phone book - Remove a contact from the phone book - Update the phone number for a contact in the phone book - Search for a contact by name and retrieve their phone number Additionally, the program should support the following requirements: - The phone book should be implemented using a hash table data structure - The program should handle cases where multiple contacts have the same name - The program should be able to handle a large number of contacts efficiently - The program should have a user interface that allows users to interact with the phone book (e.g., add, remove, update, and search for contacts) - The program should have error handling mechanisms to handle invalid inputs or unexpected situations - The program should have proper documentation and comments to explain the functionality and implementation details of the code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-74","original_id":"glm-distractor-74","prompt":"Produce a program using Python that visualizes the given function.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-81","original_id":"glm-distractor-81","prompt":"How can I generate a regular expression that matches any two or more consecutive numbers?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-83","original_id":"glm-distractor-83","prompt":"Write a python 3 script that performs simple linear regression analysis on gas expenditure data using scikit-learn. The script should load data from \"data1.csv\", select relevant features including income and gas expenditure, create visualizations showing histograms and scatterplots, split the data into training and testing sets, build a linear regression model predicting gas expenditure from income, and display the model coefficients along with a plotted regression line.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-84","original_id":"glm-distractor-84","prompt":"Write a python 3 Django management command that classifies unassigned faces using ensemble predictions from two SVM models (small and big) with probability averaging, and prints classification results for the first 1000 unassigned faces, including predicted labels, probabilities, and corresponding person objects from the database.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-196","original_id":"glm-distractor-196","prompt":"Create a python 3 script that demonstrates two different plotting APIs using PyQt4: a procedural approach with PlotWidget and an object-oriented approach with a custom Plot class. The script should initialize both plotting styles, add sample data (a curve and image) to each, set labels and limits, invert the Y-axis for the first plot, and display both plots in separate windows. Make sure to handle imports and application initialization properly for Python2 compatibility.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-199","original_id":"glm-distractor-199","prompt":"Write a Python 3 function that tests whether the neohub class can be properly instantiated, ensuring the class initialization works correctly without any errors. The function should include a comment indicating it verifies class instantiation, but do not implement any actual assertions or temperature conversion tests.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-200","original_id":"glm-distractor-200","prompt":"Please answer the following question: - Gather the ingredients for the cake - Mix the flour, sugar, egg, and water to make batter - Pour the mixture into a cake pan - Place the cake in the oven to cook - Take the cake out when it is cooked through - Let the cake cool What might be the last step of the process? A:","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-201","original_id":"glm-distractor-201","prompt":"Can you provide a Python code snippet to convert XML to JSON?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-203","original_id":"glm-distractor-203","prompt":"Write a Python3 script that downloads and unpacks tracking results from Google Drive for various trackers like PyTracking-based and external trackers. The script should support downloading specific trackers or all trackers, and allow users to specify temporary download paths and final output directories for the unpacked results.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-214","original_id":"glm-distractor-214","prompt":"Create a python 3 program using the turtle module that draws a series of nested squares rotating at different angles. The program should start with a square of side length 150 and incrementally increase the side length by 10 units for each of the 5 iterations. Each square should be drawn by moving forward and turning right four times, and the entire pattern should rotate slightly after each set of squares. Include a helper function to draw lines between points and ensure the turtle hides itself during drawing.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-216","original_id":"glm-distractor-216","prompt":"How can I generate a set of random numbers without any duplicates in Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-224","original_id":"glm-distractor-224","prompt":"Create a Python script that sets the value of a variable from the command-line, but the value must be encrypted using a custom encryption algorithm before being assigned to the variable. Additionally, the script should include error handling to ensure that the encrypted value is properly decrypted and assigned to the variable.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-225","original_id":"glm-distractor-225","prompt":"A satellite orbits Earth at an altitude of 1501 km. Calculate its orbital velocity and period. (Earth mass = 5.97 × 10²⁴ kg, Earth radius = 6371 km)","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-227","original_id":"glm-distractor-227","prompt":"Compute the quotient of 17708 and 9880. Show your work.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-236","original_id":"glm-distractor-236","prompt":"def division_while_loop(dividend, divisor): \"\"\" This exercise focuses on division using a while loop. Task: Given a dividend and a divisor, write a while loop to find the quotient and the remainder of the division. Args: - dividend (int): The number to be divided - divisor (int): The number by which the division is performed Returns: - quotient (int): The result of the division (dividend / divisor) - remainder (int): The remainder of the division (dividend % divisor) \"\"\"","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-241","original_id":"glm-distractor-241","prompt":"Create a python 3 class called `BalanceSheet` that takes a `Portfolio` object (with default to a new `Portfolio()` instance) and provides methods to generate structured data representations. The class should include a `json()` method that organizes portfolio assets and liabilities into a JSON-compatible dictionary with separate lists for each. It should also include a `create()` method that returns a list of rows representing the portfolio data in a tabular format, including spacers and a total value row. Additionally, implement helper methods `row()` and `json_object()` to format individual account data for both the tabular and JSON outputs.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-249","original_id":"glm-distractor-249","prompt":"Write a python function to find the frequency of each character in a given string and return a dictionary with characters as keys and their frequencies as values. Solve the problem starting with the provided function header. Function header: ``` def get_char_frequency(string): ``` Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-261","original_id":"glm-distractor-261","prompt":"Create a function to check if an array contains any duplicate elements, while also ensuring that the array elements are sorted in ascending order and that the length of the array is less than or equal to 100. Additionally, the function should check if the array contains any negative integers, and if so, it should return False. The function should return a boolean value indicating the presence of duplicate elements. Example: Input: [1, 2, 3, 3, 4, 5, 5] Output: True","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-262","original_id":"glm-distractor-262","prompt":"You are working on an API for a space-themed game and need to create a class that handles the case when a specific planet for a character is not found. You need to define a class called GetCharactersCharacterIdPlanetsPlanetIdNotFound with the following attributes and methods: Attributes: - error: a string to store the error message Methods: - __init__: a constructor method to initialize the error attribute - to_dict: a method to return the model properties as a dictionary - to_str: a method to return the string representation of the model - __repr__: a method for printing and pretty-printing the object - __eq__: a method to check if two objects are equal - __ne__: a method to check if two objects are not equal You need to implement the class and its methods as described above.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-264","original_id":"glm-distractor-264","prompt":"How can I categorize data into two bins, with the labels \"category A\" and \"category B\"?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-267","original_id":"glm-distractor-267","prompt":"Given points A(14, -8) and B(-1, -13), find the slope of the line passing through these two points.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-268","original_id":"glm-distractor-268","prompt":"Create a python 3 class named Objects that initializes with several instance attributes including cloud set to None, score set to 0, score_type set to 'CNNSeg', type set to None, and type_probs set to None.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-269","original_id":"glm-distractor-269","prompt":"What is the code to construct a Recurrent Neural Network (RNN) using TensorFlow with an input size of 50 values and an output size of 10 values?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-270","original_id":"glm-distractor-270","prompt":"Create a python 3 class called CompileGLSL that extends Module for compiling GLSL shader files into SPIR-V format using the glslangValidator tool. The class should define required tools, specify output file names with .spv extension, and implement a process method that runs the validator with appropriate stage flags (-S vert for vertex shaders and -S frag for fragment shaders) while handling directory creation and returning the subprocess return code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-271","original_id":"glm-distractor-271","prompt":"Evaluate the definite integral of f(x) = sin(1x) from 1 to 4.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-274","original_id":"glm-distractor-274","prompt":"Calculate the pH of a 0.545 M solution of HCl. Show your calculation step by step.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-275","original_id":"glm-distractor-275","prompt":"Write a Python 3 program that prompts the user to enter three integer numbers and then calculates and displays their sum. The program should use input() to read the numbers from the user and print the result in the format \"Sum = [value]\".","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Debugging/fault-localization","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
diff --git a/evals/datasets/calibrated/debugging-fault-localization.manifest.json b/evals/datasets/calibrated/debugging-fault-localization.manifest.json
new file mode 100644
index 0000000..c532631
--- /dev/null
+++ b/evals/datasets/calibrated/debugging-fault-localization.manifest.json
@@ -0,0 +1,59 @@
+{
+ "family": "Debugging/fault-localization",
+ "family_key": "debugging-fault-localization",
+ "skills": [
+ "scientific-method",
+ "five-whys-plus",
+ "systems",
+ "occams-razor",
+ "map-territory",
+ "kepner-tregoe",
+ "second-order",
+ "theory-of-constraints"
+ ],
+ "value_surface": "localization",
+ "source": "Combined from 3 source files. external: swebench, glm-distractor; authored: map-territory-verify",
+ "leakage": "SWE-bench data cutoff is 2024-06. All solver models used in this mission have training data post-dating the SWE-bench collection cutoff. However, the task is fault localization on specific GitHub issues from individual repos (astropy, django, etc.), which are unlikely to be memorized verbatim. The specific file-path answers may appear in model training data from public GitHub discussions. Leakage risk is moderate for popular repos (django, scikit-learn) and low for niche repos (astropy subpackages). Cross-contamination with the DiverseVul security dataset is negligible — different domains entirely. GLM distractor items are from a 2025 reasoning dataset and may overlap with training data for models released after 2025-Q1.\n\nSource breakdown: 1 external dataset(s) with potential training-data leakage; 1 authored dataset(s) with zero external leakage; ",
+ "label": {
+ "definition": "Fault localization accuracy: whether the model correctly identifies the source file(s) responsible for a described bug or issue.",
+ "values": {
+ "true": "Correct file identified (matches gold_files)",
+ "false": "Incorrect file identified"
+ },
+ "eval_mode": "ground_truth",
+ "ground_truth_field": "gold_files"
+ },
+ "calibration": {
+ "baseline": 0.465,
+ "baseline_estimated": true,
+ "baseline_note": "Estimated from label distribution (53% true). Balanced distribution suggests items are in the target difficulty band. Actual baseline must be measured by calibration runner.",
+ "band": [
+ 0.4,
+ 0.7
+ ],
+ "status": "pending_calibration",
+ "instructions": "Run EVAL_RUN=calib node evals/run-calibration.js evals/datasets/calibrated/<family>-candidate-pool.jsonl to populate real calibration stats."
+ },
+ "item_counts": {
+ "total": 224,
+ "target": 150,
+ "near_miss": 30,
+ "distractor": 44,
+ "ambiguous": 0,
+ "decisive": 224
+ },
+ "item_class_definitions": {
+ "target": "Items that directly measure the family value surface — in-domain, skill-relevant items where the skill is expected to help.",
+ "near_miss": "Items that are similar to the family domain but not an exact match. Useful for calibration but may not benefit from the skill.",
+ "distractor": "Items that are clearly off-target (target=false). Used to measure false-positive rate and specificity.",
+ "ambiguous": "Items whose relevance to the family is unclear. Excluded from decisive splits."
+ },
+ "decisive_split_rules": {
+ "min_target": 1,
+ "min_distractor": 1,
+ "max_ambiguous": 0,
+ "satisfied": true
+ },
+ "created": "2026-06-06",
+ "frozen": false
+}
\ No newline at end of file
diff --git a/evals/datasets/calibrated/quantitative-uncertainty-candidate-pool.jsonl b/evals/datasets/calibrated/quantitative-uncertainty-candidate-pool.jsonl
new file mode 100644
index 0000000..08cdfa5
--- /dev/null
+++ b/evals/datasets/calibrated/quantitative-uncertainty-candidate-pool.jsonl
@@ -0,0 +1,505 @@
+{"id":"bayes-1","original_id":"bayes-1","prompt":"A disease affects 1% of a screened population. A diagnostic test correctly flags 90% of people who truly have the disease, and wrongly flags 9% of healthy people. A randomly screened person tests positive. What is the probability they actually have the disease?\n\nA) about 9.2% (roughly 1 in 11)\nB) 90% (the test's true-positive rate)\nC) about 50%\nD) about 81%\nE) about 1% (the underlying base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-2","original_id":"bayes-2","prompt":"Roughly 1 in 1,000 people in a low-risk group carries a particular infection. A screening test detects 99% of true carriers and produces a positive result in 1% of non-carriers. Someone from this group tests positive. How likely is it that they are truly a carrier?\n\nA) 99% (the test's detection rate)\nB) about 50%\nC) about 9.0% (under 1 in 10)\nD) about 91%\nE) about 0.1% (the underlying base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-3","original_id":"bayes-3","prompt":"In a clinic where 30% of presenting patients have a given condition, a test correctly identifies 85% of patients who have it and falsely flags 20% of those who do not. A patient tests positive. What is the probability the patient has the condition?\n\nA) 85% (the sensitivity)\nB) about 30% (the base rate)\nC) about 50%\nD) about 78%\nE) about 64.6% (between 60% and 65%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-4","original_id":"bayes-4","prompt":"A bank's fraud model reviews transactions of which 0.2% are actually fraudulent. The model catches 95% of genuine fraud and flags 3% of legitimate transactions as suspicious. A transaction is flagged. What is the probability it is actually fraudulent?\n\nA) 95% (the model's catch rate)\nB) about 6.0% (around 6%)\nC) about 50%\nD) about 30%\nE) about 0.2% (the underlying base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-5","original_id":"bayes-5","prompt":"Across an inbox, 40% of incoming messages are spam. A filter labels 98% of true spam as spam and mislabels 5% of legitimate mail as spam. A message gets labeled spam. What is the probability it really is spam?\n\nA) 98% (the filter's true-positive rate)\nB) about 40% (the base rate)\nC) about 80%\nD) about 92.9% (between 92% and 94%)\nE) about 67%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-6","original_id":"bayes-6","prompt":"An intrusion-detection system monitors sessions of which only 0.05% are genuine attacks. It detects 99% of real attacks and raises an alert on 2% of benign sessions. An alert fires. What is the probability this session is a genuine attack?\n\nA) about 2.4% (well under 3%)\nB) 99% (the detection rate)\nC) about 50%\nD) about 25%\nE) about 0.05% (the underlying base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-7","original_id":"bayes-7","prompt":"On a production line, 5% of units are defective. An automated inspector correctly rejects 92% of defective units and wrongly rejects 4% of good units. A unit is rejected. What is the probability it is truly defective?\n\nA) 92% (the inspector's true-positive rate)\nB) about 5% (the base rate)\nC) about 54.8% (between 53% and 56%)\nD) about 75%\nE) about 88%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-8","original_id":"bayes-8","prompt":"Historically, 10% of tested variants genuinely beat the control. An analytics pipeline produces a \"significant win\" signal for 80% of variants that truly win, but also for 5% of variants that do not. A variant gets a \"win\" signal. What is the probability it is a genuine winner?\n\nA) 80% (the true-detection rate)\nB) about 10% (the base rate)\nC) about 40%\nD) about 75%\nE) about 64% (around 64%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-9","original_id":"bayes-9","prompt":"In a workforce, 4% of employees use a banned substance. A drug screen returns positive for 97% of users and for 5% of non-users. An employee tests positive. What is the probability they actually used the substance?\n\nA) 97% (the test's sensitivity)\nB) about 44.7% (around 45%)\nC) about 4% (the base rate)\nD) about 65%\nE) about 90%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-10","original_id":"bayes-10","prompt":"Among loan applicants, 8% will default. A risk model flags 88% of future defaulters and 10% of applicants who will repay. An applicant is flagged high-risk. What is the probability they will actually default?\n\nA) 88% (the model's true-positive rate)\nB) about 8% (the base rate)\nC) about 70%\nD) about 43.3% (between 42% and 45%)\nE) about 90%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-11","original_id":"bayes-11","prompt":"A cancer affects 2% of a screened cohort. The screen detects 93% of true cases and yields a positive result for 7% of cancer-free people. A patient screens positive. What is the probability they have the cancer?\n\nA) about 21.3% (around 21%)\nB) 93% (the screen's detection rate)\nC) about 50%\nD) about 70%\nE) about 2% (the base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-12","original_id":"bayes-12","prompt":"Of links employees click, 15% lead to phishing pages. A classifier flags 96% of true phishing links and 8% of safe links. A link is flagged. What is the probability it is genuinely phishing?\n\nA) 96% (the classifier's true-positive rate)\nB) about 15% (the base rate)\nC) about 67.9% (between 67% and 70%)\nD) about 85%\nE) about 88%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-13","original_id":"bayes-13","prompt":"A genetic variant occurs in 0.5% of people. A lab assay correctly identifies 98% of carriers and gives a false positive in 3% of non-carriers. A sample tests positive. What is the probability the person carries the variant?\n\nA) 98% (the assay's sensitivity)\nB) about 50%\nC) about 33%\nD) about 0.5% (the base rate)\nE) about 14.1% (around 14%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-14","original_id":"bayes-14","prompt":"One percent of batches are contaminated. A purity test flags 99% of contaminated batches and 2% of clean batches. A batch is flagged. What is the probability it is actually contaminated?\n\nA) 99% (the test's true-positive rate)\nB) about 33.3% (around 1 in 3)\nC) about 50%\nD) about 66%\nE) about 1% (the base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-15","original_id":"bayes-15","prompt":"On a platform, 20% of new signups are bots. A detector flags 90% of bots and 10% of real users. A signup is flagged as a bot. What is the probability it really is a bot?\n\nA) 90% (the detector's true-positive rate)\nB) about 20% (the base rate)\nC) about 50%\nD) about 69.2% (between 68% and 70%)\nE) about 82%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-16","original_id":"bayes-16","prompt":"In a population, 1 in 10,000 individuals is on a target list. A facial-recognition match correctly identifies 99% of true targets and falsely matches 1% of everyone else. The system reports a match. What is the probability the matched person is truly a target?\n\nA) about 0.98% (about 1%)\nB) 99% (the match accuracy)\nC) about 50%\nD) about 10%\nE) about 0.01% (the base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-17","original_id":"bayes-17","prompt":"Three percent of machines will fail within a week. A predictive-maintenance model flags 85% of machines that will fail and 6% of machines that will not. A machine is flagged. What is the probability it will actually fail within the week?\n\nA) 85% (the model's true-positive rate)\nB) about 3% (the base rate)\nC) about 30.5% (around 30%)\nD) about 60%\nE) about 80%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-18","original_id":"bayes-18","prompt":"Six percent of competing athletes are doping. An anti-doping test returns positive for 94% of dopers and 2% of clean athletes. An athlete tests positive. What is the probability the athlete is actually doping?\n\nA) 94% (the test's sensitivity)\nB) about 6% (the base rate)\nC) about 50%\nD) about 90%\nE) about 75% (around 75%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-19","original_id":"bayes-19","prompt":"Half a percent of bills passing through a machine are counterfeit. The machine flags 92% of counterfeits and 1% of genuine bills. A bill is flagged. What is the probability it is counterfeit?\n\nA) 92% (the flag rate for counterfeits)\nB) about 31.6% (around 32%)\nC) about 50%\nD) about 70%\nE) about 0.5% (the base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-20","original_id":"bayes-20","prompt":"In a flagged review queue, 35% of reported emails are truly malicious. A secondary scanner confirms 90% of truly malicious emails and confirms 15% of benign ones. The scanner confirms an email as malicious. What is the probability it really is malicious?\n\nA) 90% (the scanner's true-positive rate)\nB) about 35% (the base rate)\nC) about 60%\nD) about 76.4% (between 76% and 78%)\nE) about 85%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-21","original_id":"bayes-21","prompt":"A rare adverse reaction occurs in 0.2% of patients on a drug. A monitoring algorithm flags 80% of true reactions and 5% of patients with unrelated symptoms. A patient is flagged. What is the probability they had the true adverse reaction?\n\nA) about 3.1% (around 3%)\nB) 80% (the algorithm's detection rate)\nC) about 50%\nD) about 16%\nE) about 0.2% (the base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-22","original_id":"bayes-22","prompt":"One percent of large trades involve insider information. A surveillance system flags 85% of true insider trades and 4% of legitimate large trades. A trade is flagged. What is the probability it involved insider information?\n\nA) 85% (the system's true-positive rate)\nB) about 50%\nC) about 17.7% (around 18%)\nD) about 1% (the base rate)\nE) about 30%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-23","original_id":"bayes-23","prompt":"Ten percent of chips have a latent defect. A burn-in test catches 95% of defective chips and fails 7% of good chips. A chip fails burn-in. What is the probability it is genuinely defective?\n\nA) 95% (the test's true-positive rate)\nB) about 10% (the base rate)\nC) about 40%\nD) about 88%\nE) about 60.1% (around 60%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-24","original_id":"bayes-24","prompt":"On any given monitored day, there is a 2% chance of an actual wildfire-smoke event in a region. A sensor network alerts on 97% of real events and on 10% of non-event days. An alert fires. What is the probability there is a genuine smoke event?\n\nA) 97% (the sensor's true-positive rate)\nB) about 16.5% (around 17%)\nC) about 50%\nD) about 2% (the base rate)\nE) about 30%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-25","original_id":"bayes-25","prompt":"One in 1,000 login attempts is an account takeover. A risk engine flags 90% of takeovers and 0.5% of legitimate logins. A login is flagged. What is the probability it is a genuine takeover?\n\nA) 90% (the engine's true-positive rate)\nB) about 50%\nC) about 0.1% (the base rate)\nD) about 15.3% (around 15%)\nE) about 30%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-26","original_id":"bayes-26","prompt":"Five percent of online-exam sessions involve cheating. A proctoring model flags 88% of cheating sessions and 3% of honest sessions. A session is flagged. What is the probability cheating actually occurred?\n\nA) about 60.7% (around 61%)\nB) 88% (the model's true-positive rate)\nC) about 5% (the base rate)\nD) about 30%\nE) about 80%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-27","original_id":"bayes-27","prompt":"Among people taking a test, 25% truly have the target hormone present. The test is positive for 99% of those who do and 2% of those who do not. A test is positive. What is the probability the hormone is truly present?\n\nA) 99% (the test's sensitivity)\nB) about 25% (the base rate)\nC) about 94.3% (between 93% and 95%)\nD) about 75%\nE) about 88%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-28","original_id":"bayes-28","prompt":"Roughly 0.8% of traffic spikes are genuine DDoS attacks. A monitor flags 96% of real attacks and 5% of benign spikes. A spike is flagged. What is the probability it is a genuine attack?\n\nA) 96% (the monitor's true-positive rate)\nB) about 50%\nC) about 0.8% (the base rate)\nD) about 30%\nE) about 13.4% (around 13%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-29","original_id":"bayes-29","prompt":"Across inspected components, 0.3% have a critical structural defect. A scanner detects 90% of true defects and flags 2% of sound components. A component is flagged. What is the probability it has a critical defect?\n\nA) 90% (the scanner's detection rate)\nB) about 11.9% (around 12%)\nC) about 50%\nD) about 0.3% (the base rate)\nE) about 25%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-30","original_id":"bayes-30","prompt":"About 1.5% of orders result in chargeback fraud. A model flags 92% of fraudulent orders and 6% of honest ones. An order is flagged. What is the probability it is fraudulent?\n\nA) 92% (the model's true-positive rate)\nB) about 50%\nC) about 1.5% (the base rate)\nD) about 18.9% (around 19%)\nE) about 30%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-31","original_id":"bayes-31","prompt":"Thirty percent of subscribers will churn next quarter. A churn model flags 78% of true churners and 18% of those who will stay. A subscriber is flagged. What is the probability they will actually churn?\n\nA) about 65% (around 65%)\nB) 78% (the model's true-positive rate)\nC) about 30% (the base rate)\nD) about 50%\nE) about 72%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-32","original_id":"bayes-32","prompt":"Twelve percent of patients tested truly have a specific allergy. A skin test is positive for 85% of allergic patients and 10% of non-allergic ones. A patient tests positive. What is the probability they are truly allergic?\n\nA) 85% (the test's true-positive rate)\nB) about 12% (the base rate)\nC) about 53.7% (around 54%)\nD) about 70%\nE) about 80%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-33","original_id":"bayes-33","prompt":"Around 0.4% of monitored accounts are involved in money laundering. A transaction-monitoring system alerts on 93% of laundering accounts and 3% of clean accounts. An account triggers an alert. What is the probability it is genuinely involved in laundering?\n\nA) 93% (the system's true-positive rate)\nB) about 50%\nC) about 0.4% (the base rate)\nD) about 30%\nE) about 11.1% (around 11%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-34","original_id":"bayes-34","prompt":"About 0.7% of servers have an imminent disk fault. A telemetry model flags 88% of failing disks and 1.5% of healthy ones. A server is flagged. What is the probability its disk is truly failing?\n\nA) 88% (the model's true-positive rate)\nB) about 29.3% (around 29%)\nC) about 50%\nD) about 0.7% (the base rate)\nE) about 15%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-35","original_id":"bayes-35","prompt":"On a forum, 45% of submitted comments are spam. A moderation model flags 92% of spam comments and 12% of legitimate comments. A comment is flagged. What is the probability it really is spam?\n\nA) 92% (the model's true-positive rate)\nB) about 45% (the base rate)\nC) about 65%\nD) about 86.3% (between 86% and 88%)\nE) about 90%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-36","original_id":"bayes-36","prompt":"Before any testing, the chance a patient has a condition is 1%. A biomarker is present in 95% of patients with the condition and in 10% of patients without it. The biomarker is present. What is the updated probability the patient has the condition?\n\nA) about 8.8% (around 9%)\nB) 95% (the biomarker's true-positive rate)\nC) about 50%\nD) about 1% (the base rate)\nE) about 30%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-37","original_id":"bayes-37","prompt":"2.5% of pump units have a bearing defect. A vibration analysis flags 90% of defective pumps and 5% of healthy pumps. A pump is flagged. What is the probability it truly has a bearing defect?\n\nA) 90% (the analysis's true-positive rate)\nB) about 2.5% (the base rate)\nC) about 31.6% (around 32%)\nD) about 60%\nE) about 85%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-38","original_id":"bayes-38","prompt":"Two percent of merged commits introduce a real regression. A flaky CI heuristic flags 80% of true regressions and 3% of clean commits. A commit is flagged. What is the probability it introduced a real regression?\n\nA) 80% (the heuristic's true-positive rate)\nB) about 2% (the base rate)\nC) about 50%\nD) about 77%\nE) about 35.2% (around 35%)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-39","original_id":"bayes-39","prompt":"A disease has a prevalence of 1 in 1,000. A high-specificity test detects 95% of true cases and gives a false positive in only 0.1% of healthy people. A person tests positive. What is the probability they have the disease?\n\nA) 95% (the test's sensitivity)\nB) about 48.7% (around 49%)\nC) about 5%\nD) about 99%\nE) about 0.1% (the base rate)","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"bayes-40","original_id":"bayes-40","prompt":"Ten percent of insurance claims are fraudulent. An adjuster's model flags 70% of fraudulent claims and 10% of legitimate ones. A claim is flagged. What is the probability it is fraudulent?\n\nA) 70% (the model's true-positive rate)\nB) about 10% (the base rate)\nC) about 60%\nD) about 43.7% (around 44%)\nE) about 65%","source":"bayesian-authored","source_file":"external/bayesian-authored.jsonl","skill_fit":["bayesian"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-1","original_id":"debias-1","prompt":"A real-estate agent first shows you a listing priced at $1,200,000 that is clearly overpriced and sits on the market for months. The next house she shows, comparable in size and condition, is listed at $850,000. Independent comparable sales in the neighborhood over the last 90 days cluster tightly around $700,000 for homes of this type. You want to make an opening offer that reflects fair market value. Which opening offer is most defensible?\nA. $1,100,000, since the first house anchors the high end of the market\nB. $850,000, matching the asking price of the second house\nC. $780,000, splitting the difference between the two listings you saw\nD. $700,000, based on recent comparable sales\nE. $950,000, the average of the two listing prices","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-2","original_id":"debias-2","prompt":"You are estimating how long a backend migration will take. Before you start, a colleague casually mentions, 'I bet this takes at least 6 months.' You break the work down into tasks and your own bottom-up estimate, summing each component with buffers, comes to about 7 weeks. Which estimate should you commit to in the project plan?\nA. About 7 weeks, matching your detailed bottom-up breakdown\nB. About 6 months, since the colleague's experience suggests you're underestimating\nC. About 4 months, splitting the difference between your estimate and the colleague's\nD. About 3 months, padding your estimate heavily toward the colleague's number\nE. About 10 weeks, nudging your estimate up to feel safer","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-3","original_id":"debias-3","prompt":"A vendor opens negotiations by quoting $500,000 for an annual software license. You know from public pricing pages and two competing quotes that fair value for this product at your usage tier is roughly $120,000/year. You need to set your counteroffer. Which counter best reflects the actual value rather than the vendor's opening number?\nA. $400,000, a modest discount off their quote\nB. $310,000, roughly the midpoint between their quote and your research\nC. $250,000, half of their opening figure\nD. $115,000, just under your researched fair-value estimate\nE. $350,000, to leave room to negotiate up","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-4","original_id":"debias-4","prompt":"In a workshop, a facilitator asks the group, 'Do you think the new feature will increase weekly active users by more or less than 40%?' and then asks each person to write down their point estimate. Your own analysis of historical feature launches suggests typical lifts of 3-6% for changes of this scope. What point estimate should you write down?\nA. 35%, slightly below the facilitator's number\nB. 40%, matching the figure given\nC. 20%, a cautious halving of the facilitator's number\nD. 5%, consistent with historical launch data\nE. 25%, to account for this feature being more impactful","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-5","original_id":"debias-5","prompt":"A used-car seller lists a sedan for $28,000. Kelley Blue Book and three recent local sales of the identical model, year, and mileage band all indicate a fair price near $19,500. The car has no special features that would justify a premium. You decide what to offer first. Which opening offer is most grounded in the car's actual value?\nA. $26,000, a small concession from asking\nB. $24,000, meeting roughly in the middle\nC. $22,000, a firm but respectful number near asking\nD. $19,000, just under the documented fair value\nE. $23,750, the midpoint between asking and book value","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-6","original_id":"debias-6","prompt":"A disease affects 1 in 1,000 people. A screening test has a 95% true-positive rate (it correctly flags 95% of people who have the disease) and a 5% false-positive rate (it wrongly flags 5% of healthy people). A randomly screened person with no symptoms tests positive. What is the approximate probability that this person actually has the disease?\nA. About 2%, because the disease is rare and most positives are false alarms\nB. About 90%, accounting for some error\nC. About 95%, since the test is 95% accurate\nD. About 50%, since the test could go either way\nE. About 5%, equal to the false-positive rate","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-7","original_id":"debias-7","prompt":"At your company, 8% of engineering candidates who reach the final round are eventually rated 'outstanding' after a year on the job. A new structured interview correctly identifies 80% of future-outstanding hires as 'strong yes' and also gives a 'strong yes' to 30% of those who will not become outstanding. A candidate gets a 'strong yes.' Roughly what is the probability this candidate becomes outstanding?\nA. About 19%, since most 'strong yes' candidates come from the large non-outstanding pool\nB. About 80%, matching the interview's hit rate\nC. About 70%, allowing for some error\nD. About 50%\nE. About 8%, the base rate is all that matters","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-8","original_id":"debias-8","prompt":"You read that 70% of startups in a particular accelerator fail within three years. A founder pitches you; she is articulate, has a polished deck, and reminds you strongly of a successful entrepreneur you admire. Setting aside how impressive she seems in the pitch, what is the most reasonable prior probability that her startup survives three years?\nA. Around 70%, because she seems exceptional\nB. Around 85%, given how much she resembles a known success\nC. Around 30%, the historical survival rate for this population\nD. Around 50%, a neutral coin flip\nE. Around 95%, since strong founders usually make it","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-9","original_id":"debias-9","prompt":"A fraud-detection model flags transactions as fraudulent. In reality only 0.2% of transactions are fraudulent. The model catches 99% of true fraud but also flags 1% of legitimate transactions. A transaction is flagged. What is the approximate chance it is actually fraudulent?\nA. About 99%, the model's detection rate\nB. About 17%, because legitimate transactions vastly outnumber fraudulent ones\nC. About 80%\nD. About 1%, the false-positive rate\nE. About 50%","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-10","original_id":"debias-10","prompt":"In a city, 85% of taxis are Green and 15% are Blue. A witness to a nighttime hit-and-run says the cab was Blue. Under similar nighttime conditions, the witness correctly identifies a cab's color 80% of the time and is wrong 20% of the time. Given the witness said 'Blue,' what is the approximate probability the cab was actually Blue?\nA. About 80%, the witness's reliability\nB. About 15%, just the base rate of Blue cabs\nC. About 41%, balancing the witness's accuracy against the rarity of Blue cabs\nD. About 70%\nE. About 95%, since eyewitnesses are usually trusted","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-11","original_id":"debias-11","prompt":"Your team has spent $2M and 18 months building a custom in-house analytics engine. A new, mature open-source tool now does everything you need and would cost about $50K/year to operate, versus an estimated $1.5M more to finish your in-house engine and $400K/year to maintain it afterward. Performance and features would be comparable. Purely on a forward-looking basis, what should you do?\nA. Finish the in-house engine; you've already invested $2M and can't waste it\nB. Finish it because switching now would mean the 18 months were for nothing\nC. Spend another $1.5M to finish, then reevaluate against the open-source tool\nD. Keep both running in parallel indefinitely\nE. Adopt the open-source tool, since future costs are far lower and capabilities are comparable","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-12","original_id":"debias-12","prompt":"You bought non-refundable concert tickets for $150. On the day of the show you feel ill and realize that attending would be miserable; you'd genuinely prefer to rest at home, and staying home has no further cost. Which decision is most rational?\nA. Go to the concert so the $150 isn't wasted\nB. Go, because you should never let a paid ticket go unused\nC. Stay home, since the $150 is already spent and you'd rather rest\nD. Go for at least the first half to get partial value\nE. Sell the experience to yourself as worth it to justify the cost","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-13","original_id":"debias-13","prompt":"A product feature has consumed three quarters of engineering time. Current data shows it has near-zero adoption and is unlikely to improve; the team projects that one more quarter of work has only a 5% chance of changing the outcome, and that engineering time could instead ship a feature with strong demand signals. What is the best decision going forward?\nA. Continue the feature; abandoning it wastes three quarters of work\nB. Continue one more quarter because the team has built up expertise in it\nC. Continue, but cut the team in half to limit further loss\nD. Continue because executives originally championed it\nE. Sunset the feature and redirect engineers to the high-demand work","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-14","original_id":"debias-14","prompt":"A construction project is 60% through its budget but only 20% complete, and an independent audit shows the original plan was fundamentally flawed; completing it would cost three times the remaining budget and the resulting building would not meet code. A redesign-and-rebuild would cost less overall than continuing. From a cost-minimizing standpoint, what should the owner do?\nA. Push through to completion to honor the money already spent\nB. Continue because stopping would admit the early planning was wasted\nC. Continue at a slower pace to spread out the remaining cost\nD. Halt and pursue the cheaper redesign-and-rebuild path\nE. Finish the current design and retrofit it to code later","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-15","original_id":"debias-15","prompt":"You have invested $40,000 into a side business over two years. It has never been profitable, demand has steadily declined, and your sober projection is continued losses with no realistic path to break-even. A clear-eyed analyst with no stake would advise shutting it down. What is the rational course?\nA. Keep going until you recoup the $40,000\nB. Invest a final $10,000 to give it one last chance to justify the prior spend\nC. Shut it down, since the $40,000 is gone regardless and future prospects are poor\nD. Keep it open at a loss to avoid admitting the venture failed\nE. Keep going because quitting would mean two years were wasted","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-16","original_id":"debias-16","prompt":"Linda is 31, single, outspoken, and very bright. She majored in philosophy. As a student she was deeply concerned with discrimination and social justice and participated in anti-nuclear demonstrations. Which is more probable?\nA. Linda is a bank teller and is active in the feminist movement\nB. Linda is a bank teller\nC. The two are equally probable\nD. It is impossible to compare the two\nE. Linda is neither","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-17","original_id":"debias-17","prompt":"A software outage occurs. Which single statement is most probable?\nA. The outage was caused by a misconfigured load balancer during last night's deployment\nB. The outage was caused by a misconfiguration\nC. The outage was caused by a misconfigured load balancer\nD. The outage was caused by a misconfigured load balancer that the on-call engineer introduced while rushing\nE. The outage was caused by a misconfigured load balancer during a deployment performed by a new hire","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-18","original_id":"debias-18","prompt":"Mark is a meticulous, detail-obsessed person who loves spreadsheets and reads tax law for fun. Considering the general population, which statement is most probable?\nA. Mark is an accountant who plays in a jazz band on weekends\nB. Mark is an accountant\nC. Mark is an accountant and owns more than three calculators\nD. Mark is an accountant who once audited a Fortune 500 company\nE. Mark is a meticulous accountant who hates surprises","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-19","original_id":"debias-19","prompt":"A forecaster is asked about next year's economy. Which forecast is most likely to come true?\nA. The central bank will cut interest rates\nB. The central bank will cut interest rates and the stock market will rise\nC. The central bank will cut interest rates, the market will rise, and unemployment will fall below 4%\nD. The central bank will cut interest rates in response to a recession\nE. The central bank will cut rates and inflation will fall below 2%","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-20","original_id":"debias-20","prompt":"Sarah read literature and traveled through Europe after college, and she once worked at an art gallery. From the perspective of pure probability, which is more likely to be true of Sarah today?\nA. Sarah works in finance and collects vintage wine\nB. Sarah works in finance\nC. Sarah works in finance and visits museums on vacation\nD. Sarah works in finance and subscribes to an art magazine\nE. Sarah works in finance and speaks two European languages","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-21","original_id":"debias-21","prompt":"Two surgeons present identical outcome data for the same operation. Surgeon A says, 'This procedure has a 90% survival rate.' Surgeon B says, 'This procedure has a 10% mortality rate.' A patient must choose based only on this information. What is the most rational interpretation?\nA. Surgeon A's procedure is safer\nB. Surgeon B's procedure is riskier\nC. Surgeon A's framing proves greater confidence\nD. Surgeon B is being dishonest by emphasizing death\nE. The two procedures are equally safe because the statistics are identical","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-22","original_id":"debias-22","prompt":"A public health program will affect 600 people. Plan A: '200 people will be saved.' Plan B: '400 people will die.' Both plans are described as applying to the same 600 people with certainty. Which choice is rational?\nA. Choose Plan A, since saving lives sounds better\nB. Choose Plan B, since avoiding death sounds more urgent\nC. Choose Plan A because it mentions a smaller number\nD. Choose Plan B because 400 is a bigger commitment\nE. Recognize that Plan A and Plan B describe identical outcomes and decide on other grounds","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-23","original_id":"debias-23","prompt":"A grocery store advertises ground beef as '80% lean.' A competitor advertises the identical product as '20% fat.' A shopper comparing only these two labels wants the leaner, healthier choice. What should the shopper conclude?\nA. The '80% lean' beef is leaner and healthier\nB. The '20% fat' beef is fattier and worse\nC. The '80% lean' label indicates a higher-quality cut\nD. The '20% fat' beef is cheaper because it admits the fat\nE. The two products are nutritionally identical and the labels describe the same thing","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-24","original_id":"debias-24","prompt":"An investment brochure for two funds with identical net performance describes Fund X as 'capturing 95% of market upside' and Fund Y as 'exposed to 5% of potential shortfall avoidance loss'—wording aside, both funds returned exactly the same amount over ten years with the same volatility. An investor must pick one. What is the rational basis for the decision?\nA. Pick Fund X; its description sounds more profitable\nB. Pick Fund Y; cautious language signals prudence\nC. Treat them as equivalent and decide on fees or other real differences\nD. Pick Fund X because 95% is a larger number\nE. Pick Fund Y because it acknowledges risk","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-25","original_id":"debias-25","prompt":"A credit card company offers a '2% cash-back reward' on purchases. A bank instead charges a '2% surcharge for not using their card' but otherwise the net effect on your wallet for the same spending is identical. Ignoring branding, how should a rational consumer treat these two offers?\nA. Prefer the cash-back card; rewards are better than penalties\nB. Avoid the surcharge bank; penalties are bad\nC. Recognize the net financial effect is the same and choose on other terms like APR or fees\nD. Prefer the cash-back card because gains feel better than losses\nE. Avoid the surcharge bank because surcharges compound","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-26","original_id":"debias-26","prompt":"You believe a particular caching change caused a latency regression. To test this hypothesis as rigorously as possible, which investigation should you prioritize first?\nA. Pull all log lines from after the change that show high latency, confirming the regression\nB. Collect metrics from before and after the change and check whether latency actually differs, including looking for cases where it did not regress\nC. Ask teammates who also suspected the cache to corroborate your view\nD. Re-read the cache pull request looking for anything that supports your theory\nE. Search the issue tracker for past cache-related bugs to build the case","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-27","original_id":"debias-27","prompt":"You are convinced a job candidate is excellent after a great first impression. To evaluate the hire decision in the least biased way, what should you do?\nA. Deliberately probe for weaknesses and seek disconfirming evidence, weighing it equally with the positives\nB. Ask interview questions designed to let the candidate shine\nC. Focus the reference check on confirming the strengths you observed\nD. Compare the candidate only against weaker applicants\nE. Trust your gut since first impressions are usually right","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-28","original_id":"debias-28","prompt":"You are testing the rule behind the number sequence 2, 4, 6. You hypothesize the rule is 'consecutive even numbers.' You may propose test sequences and will be told only whether each fits the hidden rule. Which test is most informative for finding the true rule?\nA. Propose 8, 10, 12, because it matches your hypothesis\nB. Propose 20, 22, 24, another even run that fits your guess\nC. Propose 1, 2, 3, a sequence that would violate your hypothesis if your rule is right\nD. Propose 100, 102, 104 to confirm at larger scale\nE. Propose 0, 2, 4 to confirm starting from zero","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-29","original_id":"debias-29","prompt":"An analyst expects a new marketing channel to be highly effective and gathers data to evaluate it. Which approach gives the most trustworthy assessment of the channel's true performance?\nA. Define success metrics and a holdout/control group in advance, then evaluate against all the data including weeks it underperformed\nB. Highlight the weeks where the channel performed well in the report\nC. Compare the channel only to the worst-performing existing channel\nD. Survey the team that proposed the channel for their impressions\nE. Drop the early data when the channel was still ramping up","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-30","original_id":"debias-30","prompt":"You suspect a specific microservice is the source of intermittent errors. A colleague suggests you might be wrong. What is the most rigorous next step?\nA. Grep the suspected service's logs for any error and treat each as proof\nB. Disable the suspected service and declare it the cause if anything improves\nC. Ask the team that owns the suspected service whether they think it's at fault\nD. Instrument and compare error rates across all services in the request path, actively trying to rule your suspect out\nE. Re-deploy the suspected service and watch only its dashboard","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-31","original_id":"debias-31","prompt":"After seeing extensive news coverage of two airplane crashes this month, a traveler is deciding whether to drive or fly 1,000 miles. Per mile traveled, statistics consistently show commercial flying has a far lower fatality rate than driving. Which conclusion should guide the decision?\nA. Drive, because plane crashes are clearly common right now\nB. Drive, because the recent news shows flying is unusually dangerous lately\nC. Fly, because per-mile fatality data show it is safer despite the vivid coverage\nD. Drive, because you have more control behind the wheel\nE. Flip a coin, since both feel equally risky after the news","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-32","original_id":"debias-32","prompt":"A manager just dealt with a dramatic security incident caused by a phishing email. In the next planning cycle, she must allocate a fixed security budget across threats. An objective risk assessment ranks misconfigured cloud storage as the company's highest expected-loss threat, with phishing third. How should she allocate?\nA. Put the majority of the budget into anti-phishing because the recent incident proves it's the top risk\nB. Allocate according to the objective expected-loss ranking, addressing cloud misconfiguration first\nC. Split evenly across all threats to be safe\nD. Defer all spending until another incident reveals the real priority\nE. Double the phishing budget every time an incident occurs","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-33","original_id":"debias-33","prompt":"A friend asks which is a more common cause of death in the United States: shark attacks or falls from ladders. Shark attacks dominate headlines and movies, while ladder falls rarely make the news. What is the accurate answer?\nA. Falls from ladders, which kill vastly more people annually despite little coverage\nB. They are roughly equal\nC. Shark attacks, because they are far more frequently reported\nD. Shark attacks, because they are more dramatic and memorable\nE. Impossible to know without specific yearly figures","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-34","original_id":"debias-34","prompt":"An investor read three recent viral stories about people who got rich quickly on a speculative crypto token. Broad, long-run data on such speculative tokens show the large majority lose most of their value and few holders profit. The investor is deciding whether to put 30% of savings into the token. What is the soundest reasoning?\nA. Invest, because the success stories show it clearly works\nB. Invest a large amount, since the wins are fresh and frequent in the news\nC. Invest everything to maximize the obvious upside\nD. Wait for one more success story before deciding\nE. Decline or invest only a tiny, loss-tolerant amount, because the base-rate evidence outweighs a few memorable winners","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"E","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-35","original_id":"debias-35","prompt":"A homeowner who just watched coverage of a rare house fire wants to spend heavily on fire prevention while ignoring routine roof maintenance. Actuarial data for her area show water damage from roof leaks is many times more likely and costly than fire. Where should she focus her limited home-maintenance budget?\nA. Fire prevention, because the news made fire feel imminent\nB. Roof maintenance, because the data show it is the more probable and costly risk\nC. Split the budget equally between fire and roof\nD. Fire prevention, since fires are more catastrophic when they happen\nE. Neither, until she sees a local fire herself","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-36","original_id":"debias-36","prompt":"A senior engineer is 99% sure a one-line change is safe and wants to push it straight to production on a Friday afternoon without tests or review, citing past confidence. Across the team's history, changes engineers were '99% sure' about still caused incidents about 8% of the time. Given the asymmetric cost of a weekend outage, what is the wisest course?\nA. Run the test suite and get a quick review before deploying, since stated 99% confidence has historically been wrong far more often\nB. Push it because the engineer is senior and rarely wrong\nC. Push directly to production; 99% confidence is more than enough\nD. Push, but watch the dashboard for a few minutes afterward\nE. Push it because reverting is always possible","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"A","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-37","original_id":"debias-37","prompt":"You are asked to give a 90% confidence interval for the year the first commercial transatlantic telegraph cable carried messages. You feel fairly knowledgeable and are tempted to give a narrow range like 1900-1910. Calibration studies show people's '90%' intervals contain the true value only about 50% of the time because they make them too narrow. To be properly calibrated, what should you do?\nA. Give a tight range like 1900-1905 to look knowledgeable\nB. Widen the interval substantially, e.g., 1840-1920, to genuinely capture 90% of your uncertainty\nC. Give a single best-guess year instead of a range\nD. Refuse to answer because you're not certain\nE. Narrow the range further since precision signals expertise","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"B","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-38","original_id":"debias-38","prompt":"A product lead is certain a launch will hit 1 million users in month one and wants to commit infrastructure spend and public promises on that single number. No comparable past launch exceeded 200,000, and the team has no validated demand signal. What planning approach is most rational?\nA. Commit fully to the 1M figure; conviction drives results\nB. Set the public target even higher to motivate the team\nC. Spend for 1M users now to avoid being caught short\nD. Plan around a range informed by comparable launches and demand evidence, and avoid hard public commitments to a single optimistic number\nE. Trust the lead's certainty since they know the product best","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-39","original_id":"debias-39","prompt":"A trader has a string of recent winning bets and now feels certain his next large position cannot lose, so he wants to double his usual size and skip his stop-loss. His own long-run track record shows he is right about 55% of the time, and his sense of certainty has not historically predicted outcomes. What is the disciplined choice?\nA. Double the position and skip the stop-loss; he's clearly on a hot streak\nB. Triple the position to capitalize on the certainty\nC. Bet everything because he can't lose right now\nD. Keep normal position sizing and his stop-loss, since his felt certainty doesn't change his real 55% edge\nE. Skip the stop-loss only, but keep normal size","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"D","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"debias-40","original_id":"debias-40","prompt":"During a project kickoff, the team is asked to estimate the delivery date and everyone agrees they are highly confident it will ship in exactly 8 weeks, with no slack. Historically, similar projects by this team shipped 40-100% later than their confident initial estimates due to unforeseen issues. What is the best way to set the committed date?\nA. Commit to 8 weeks; the team is confident and aligned\nB. Commit to 7 weeks to push the team to perform\nC. Set the committed date using the team's historical track record of overruns, e.g., 11-16 weeks with buffer\nD. Refuse to give any date until everything is certain\nE. Commit to 8 weeks but tell stakeholders it might slip a day or two","source":"debias-authored","source_file":"external/debias-authored.jsonl","skill_fit":["debiasing"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer_idx":"C","mode":"correctness","decision_instruction":"Choose the correct answer from options A-E. Return ONLY valid JSON: {\"answer_idx\": \"A\"}"}
+{"id":"fermi-0","original_id":"fermi-0","prompt":"How many golf balls put into the worlds oceans would it take to submerge all of the land on earth from the displaced water?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-1","original_id":"fermi-1","prompt":"What fraction of the sun's energy output is intercepted by the earth?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-2","original_id":"fermi-2","prompt":"How many liters of water comes out of a water fountain in a mall per day?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-3","original_id":"fermi-3","prompt":"The effect of air pressure was demonstrated in 1654 in Magdeburg, Germany with an impressive experiment. Two hollow metal hemispheres with a flat metal rim (flange) were placed together and the air removed from the interior with a primitive vacuum pump. The external pressure of the air pushed them together. When they tried to pull the hemispheres apart using two rings welded to the hemispheres, they could not be pulled apart even by a number of people pulling together. The sphere produced by putting the two hemispheres together is about the size of a basketball. Estimate the force needed to pull them apart.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-4","original_id":"fermi-4","prompt":"What would be the effect to the oceans If all fishing was banned for four days once a year across the planet?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-5","original_id":"fermi-5","prompt":"How much energy does it take to repair damaged tissue?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-6","original_id":"fermi-6","prompt":"How many RBCs equal one cc in volume?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-7","original_id":"fermi-7","prompt":"How much does RFK baseball stadium weigh?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-8","original_id":"fermi-8","prompt":"What's the smallest population the human race can reach that would allow it to re-populate?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-9","original_id":"fermi-9","prompt":"How much of the Earth's atmosphere has passed through a combustion or jet engine?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-10","original_id":"fermi-10","prompt":"If all of the cars in the U.S. got at least 25 miles per gallon, how many gallons of gas would be saved this year?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-11","original_id":"fermi-11","prompt":"How many packets are needed to measure a single line of M&Ms to a distance of 100m?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-12","original_id":"fermi-12","prompt":"The SO bacterium takes 6 minutes to reproduce. If the SO bacteria don't die, how many hours will it take for two to reproduce and make a volume equal to that of the earth?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-13","original_id":"fermi-13","prompt":"How many seconds would it take the sound from a volcano's eruption to travel around the Earth?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-14","original_id":"fermi-14","prompt":"How much CO2 do we save in winter on heating when the earth gets 2C warmer?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-15","original_id":"fermi-15","prompt":"How many drops of water are needed to fill an Olympic swimming pool?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-16","original_id":"fermi-16","prompt":"How many jumps would you need to travel across a carpet?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-17","original_id":"fermi-17","prompt":"How many gallons of water in the Atlantic ocean?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-18","original_id":"fermi-18","prompt":"What is the volume (cubic meters) of the earth's oceans?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-19","original_id":"fermi-19","prompt":"Estimate the total number of sheets of 8.5 x 11 inch paper used by all the students at the University of Maryland in one semester.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-20","original_id":"fermi-20","prompt":"How many kilograms of co2 would i have to breath out to lose 1 kg of fat?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-21","original_id":"fermi-21","prompt":"How much rice can fit in an average sized house?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-22","original_id":"fermi-22","prompt":"How much extra time would Americans spend in the car if the speed limits were decreased by 10 mph, assuming everyone strictly adheres to speed limits?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-23","original_id":"fermi-23","prompt":"What is the mass, g, of the Earth?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-24","original_id":"fermi-24","prompt":"How much would the human skeleton weigh if it was made of iron?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-25","original_id":"fermi-25","prompt":"What percentage of people have the ability to whistle?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-26","original_id":"fermi-26","prompt":"What is the number of square inches of pizza consumed by all the students at the University of Maryland during one semester?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-27","original_id":"fermi-27","prompt":"How many people in the world are talking on their cell phones at this instant?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-28","original_id":"fermi-28","prompt":"If all the pickles sold in the U.S. be arranged side by side, how long would it be?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-29","original_id":"fermi-29","prompt":"What is the total mass in kilograms of all the students in your school?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-30","original_id":"fermi-30","prompt":"How many electrons pass through a lighted 60 watt bulb in a day?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-31","original_id":"fermi-31","prompt":"At the moment the sun is fully below the horizon, how far away would someone have to be to witness the moment the sun rises fully ABOVE the horizon?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-32","original_id":"fermi-32","prompt":"If all books sold in the United States are read on Kindle instead, how many trees can be saved?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-33","original_id":"fermi-33","prompt":"How large would a room have to be for a 60 watt lightbulb suspended in the middle to cast no light on any walls?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-34","original_id":"fermi-34","prompt":"How much water is wasted by people waiting for it to get hot for showers?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-35","original_id":"fermi-35","prompt":"How many students are there in North America?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-36","original_id":"fermi-36","prompt":"The total volume of flatulence produced by the human race each day?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-37","original_id":"fermi-37","prompt":"How much is it possible to heat a glass of water by stirring it vigorously?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-38","original_id":"fermi-38","prompt":"This winter, the East coast has been hit by a number of snow storms. How many hours does a person spend shoveling the walk way after a snow storm.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-39","original_id":"fermi-39","prompt":"How many oat cylinders are in a cereal box containing 425 g?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-40","original_id":"fermi-40","prompt":"If an average man were to have all of bones lined up, what would be their total length?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-41","original_id":"fermi-41","prompt":"How much fish do humans consume per year?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-42","original_id":"fermi-42","prompt":"If every living thing in the ocean disappeared, how much would the water level lower?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-43","original_id":"fermi-43","prompt":"Since the invention of the automobile, how many people have died in the United States as a result of car accidents?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-44","original_id":"fermi-44","prompt":"How many jelly beans fill a bucket?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-45","original_id":"fermi-45","prompt":"How many steps would I need to climb to burn as many calories as there are in a bag of potato chips?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-46","original_id":"fermi-46","prompt":"How much energy is needed to raise sea levels by 5 feet over 50 years?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-47","original_id":"fermi-47","prompt":"If a person standing on the surface of the Earth was suddenly no longer affected by the Earth's gravitational pull, could they be thrown to Mars?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-48","original_id":"fermi-48","prompt":"By cooking, how many times does rice expand in volume?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-49","original_id":"fermi-49","prompt":"What is the mass, grams, of a gallon of the paint?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-50","original_id":"fermi-50","prompt":"What was the minimal sugar concentration in urine for doctors to be able to taste it ?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-51","original_id":"fermi-51","prompt":"Assuming that humans naturally had bird like wings, how large should the wingspan need to be in order for the average human to be capable of flight?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-52","original_id":"fermi-52","prompt":"In a minute, all of a person's blood passes through the heart. During a day, how many times does a RBC pass through the heart?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-53","original_id":"fermi-53","prompt":"If you took all the hair on the average person's head and put it into a cylinder what would the diameter be?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-54","original_id":"fermi-54","prompt":"How much rock (volume) would have to \"fall into the ocean\" to raise its level by even one meter?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-55","original_id":"fermi-55","prompt":"What is the total length of all the hair in an average female human?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-56","original_id":"fermi-56","prompt":"For the entire United States populace, how many liters of blood are pumped each day?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-57","original_id":"fermi-57","prompt":"The SO bacterium needs a living space of about 30x10-4 cm in all directions to thrive. How many of these thriving bacteria might be found in a gram of pond water?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-58","original_id":"fermi-58","prompt":"How many cigarettes have been smoked throughout history?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-59","original_id":"fermi-59","prompt":"How many SO bacteria would be able to be packed into a ping pong ball?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-60","original_id":"fermi-60","prompt":"How much of the atmosphere of Earth has passed through a combustion engine?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-61","original_id":"fermi-61","prompt":"If the oceans dried up, estimate the thickness (cm) of the resulting layer of salt uniformly covering the earth.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-62","original_id":"fermi-62","prompt":"Assume that all of the oxygen transported during a year in an adult male is converted to liquid water. What is the volume of that water in cc?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-63","original_id":"fermi-63","prompt":"How many people would be needed to surround this city if they held hands?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-64","original_id":"fermi-64","prompt":"How many cells are there in the human body?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-65","original_id":"fermi-65","prompt":"If a ship sank and a large pocket of air was trapped in an airtight spot, how long would the air be breathable for a survivor?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-66","original_id":"fermi-66","prompt":"How much force does it take for a finger to puncture a part of your body?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-67","original_id":"fermi-67","prompt":"Under ideal conditions, the bacterium eNSO can reproduce in 10 minutes. eNSO is rodlike with a diameter of 1 µm and a length of 5 µm. If eNSO eats only onions as its food source, how many minutes elapse before it consumes an amount equal to the onion mass consumed in the US in a year?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-68","original_id":"fermi-68","prompt":"if a peacock mantis shrimp was 200 pounds and everything was scaled up accordingly, how hard would it be able to punch?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-69","original_id":"fermi-69","prompt":"If the land area of the earth were divided up equally for each person on the planet, about how much would you get?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-70","original_id":"fermi-70","prompt":"How far could you dive into a pool filled with Nerds candy?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-71","original_id":"fermi-71","prompt":"What is the volume of the Earth's oceans in cubic miles?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-72","original_id":"fermi-72","prompt":"How many crackers would cover a sheet of paper?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-73","original_id":"fermi-73","prompt":"What is the approximate gap between the oldest living generation to the newest?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-74","original_id":"fermi-74","prompt":"How much does the total student population in your school weigh, in grams?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-75","original_id":"fermi-75","prompt":"What's the average number of descendents per human who ever lived?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-76","original_id":"fermi-76","prompt":"How many peas would you need to fill a bath?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-77","original_id":"fermi-77","prompt":"If a planet was 5 times the size of the Earth with 1.5 times the radius, what would the surface gravity be?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-78","original_id":"fermi-78","prompt":"A steel ball is dropped from a height of three meters onto a concrete floor. It bounces a large number of times but eventually comes to rest. Estimate the ball's rise in temperature.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-79","original_id":"fermi-79","prompt":"How many hours of unique motion picture is there?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-80","original_id":"fermi-80","prompt":"What is the weight of garbage thrown away by each family every year?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-81","original_id":"fermi-81","prompt":"How many adults donate blood each year in the United States?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-82","original_id":"fermi-82","prompt":"The density of water is just about 1000 kg/m3. The density of air is just about 1000 times less. Estimate the height of the atmosphere. As a simplifying assumption, take the atmosphere to be of uniform density up to some height after which the density rapidly falls to zero.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-83","original_id":"fermi-83","prompt":"If all the pizzas eaten by students in your school last year were laid out next to each other, what area would be covered?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-84","original_id":"fermi-84","prompt":"How many LED lights could one candle power?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-85","original_id":"fermi-85","prompt":"The SO bacterium is special because it has a tiny brain which is about the same percentage of its total weight as an adult human's. Estimate the weight, in grams, of the brain of an SO bacterium.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-86","original_id":"fermi-86","prompt":"How many people are airborne over Europe at any one moment?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-87","original_id":"fermi-87","prompt":"What is the earth's visible circumference from any given location upon the surface.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-88","original_id":"fermi-88","prompt":"What is the marginal value of one person watching a TV show via a paid streaming service, to the people that actually made the show?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-89","original_id":"fermi-89","prompt":"A cup of cooked rice contains how many grams of the element carbon?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-90","original_id":"fermi-90","prompt":"How many people in the world are talking on their cell phones in any given minute?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-191","original_id":"fermi-191","prompt":"If microchip makers didn't keep trying to shrink their chips, how fast could your average home computer be by now?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-192","original_id":"fermi-192","prompt":"How much volume would 417234 loosely stacked cherries occupy?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-193","original_id":"fermi-193","prompt":"Estimate the consumption of pigmentary TiO2 in the United States in 2004.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-194","original_id":"fermi-194","prompt":"If you were to have a baby in every country, What percentage of the world's population would be related to you ?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-195","original_id":"fermi-195","prompt":"How much oil is there left in the world?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-196","original_id":"fermi-196","prompt":"How much farmed land does one need to survive?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-197","original_id":"fermi-197","prompt":"Assuming infinite water, how much of an area will we need to cover such that the rate of heat loss from evaporation counteracts the heat gain from global warming?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-198","original_id":"fermi-198","prompt":"How many multi-link cubes would you need to fill a fridge?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-199","original_id":"fermi-199","prompt":"How much area would be covered if all people on earth stood together in a single crowd?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-200","original_id":"fermi-200","prompt":"Estimate the kinetic energy the earth has as a result of its orbiting the sun.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-201","original_id":"fermi-201","prompt":"If a human body were to increase in volume without increasing in mass how large would they have to grow before they were lighter than air?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-202","original_id":"fermi-202","prompt":"How many golf balls could you fit in a 5 gallon water cooler jug?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-203","original_id":"fermi-203","prompt":"At what point in time have more man-years been spent playing WWII video games than were actually spent in combat in WWII?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-204","original_id":"fermi-204","prompt":"Suppose a meteor made of nickel and iron falls to the earth from deep space. Estimate how much its temperature would rise on impact ignoring any atmospheric effects.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-205","original_id":"fermi-205","prompt":"If 100% of the energy of all lightning strikes around the world could be harnessed and used, what percentage of the world's power could be supplied by lightning strikes?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-206","original_id":"fermi-206","prompt":"If humans had wings and adequate muscles to use them, how large (area, full span) would those wings have to be for the human to be able to fly?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-207","original_id":"fermi-207","prompt":"How many grains of wheat in a quintal?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-208","original_id":"fermi-208","prompt":"Lot's wife was turned into a pillar of salt. How much salt would that produce?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-209","original_id":"fermi-209","prompt":"If sea water is 3.5% of salt by weight, how many tons of salt are in a cubic mile of ocean?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-210","original_id":"fermi-210","prompt":"If I were going to go to the moon and wanted to leave proof I was there that could be seen from earth, how big would the proof have to be?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-211","original_id":"fermi-211","prompt":"Relative to the sun, what is the Earth's orbital velocity in miles per hour?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-212","original_id":"fermi-212","prompt":"The cereal is poured to fill an 8 oz. bowl. Milk is then added to completely fill the bowl. How many cc of milk were added?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-213","original_id":"fermi-213","prompt":"How many sheets of paper, laid flat, will it take to reach the moon from the Earth?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-214","original_id":"fermi-214","prompt":"How many unused escalators are operating world-wide right now?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-215","original_id":"fermi-215","prompt":"How many bricks are in the exterior of our school building?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-216","original_id":"fermi-216","prompt":"How many water droplets make up a stratus cloud?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-217","original_id":"fermi-217","prompt":"How many particles of flour are in a gram?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-218","original_id":"fermi-218","prompt":"What fraction of the Earth's land mass is represented by Colorado?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-219","original_id":"fermi-219","prompt":"How many pennies are needed to equal your height?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-220","original_id":"fermi-220","prompt":"How many Rubik's cubes could you fit inside a double-decker bus?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-221","original_id":"fermi-221","prompt":"How old are you if you are a million days old?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-222","original_id":"fermi-222","prompt":"How many cars pass by a busy road in a minute?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-223","original_id":"fermi-223","prompt":"How many bricks are there the whole school?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-224","original_id":"fermi-224","prompt":"We know that within the limits of measurement, the magnitudes of the negative charge on the electron and the positive charge on the proton are equal. Suppose, however, that these magnitudes differed from each other by as little as 0.0001%. With what force would two copper pennies, placed 1m apart, then repel each other?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-225","original_id":"fermi-225","prompt":"If 5 lbs of rice are cooked in ocean water, how many grams of salt are in the cooked rice?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-226","original_id":"fermi-226","prompt":"If Donald Trump weighed as much as an average Clydesdale horse, but kept his current density and proportions, how tall would he be?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-227","original_id":"fermi-227","prompt":"How thick would the Earth's atmosphere (with its current chemical composition) have to be for it to be dark at the sea-level?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-228","original_id":"fermi-228","prompt":"How long would it take to drive on the entirety of every road in Europe at the posted speed limit?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-229","original_id":"fermi-229","prompt":"What is the total pressure the roof of the physics lecture hall would have to support if we had an inch of rain and the roof drains were plugged?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-230","original_id":"fermi-230","prompt":"How far can a crow fly without stopping?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-231","original_id":"fermi-231","prompt":"What percent of animal life on earth do humans comprise?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-232","original_id":"fermi-232","prompt":"What is the weight of a typical building?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-233","original_id":"fermi-233","prompt":"How many pennies are in a typical jar?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-234","original_id":"fermi-234","prompt":"How many ants are there?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-235","original_id":"fermi-235","prompt":"Approximately how many human mothers have ever lived?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-236","original_id":"fermi-236","prompt":"How many times could you say the alphabet in 24 hours?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-237","original_id":"fermi-237","prompt":"How large would an object have to be to be able to be visible to the naked eye from the Earth to the Moon?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-238","original_id":"fermi-238","prompt":"How many coats of paint would have to be applied to the walls of a room if a coat of paint is 1/1000 of an inch, and the room is 10 cubic feet.\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-239","original_id":"fermi-239","prompt":"How many goals total have been scored in every professional football game throughout history?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-240","original_id":"fermi-240","prompt":"How many digital work platforms exist i.e. ones similar to Uber, Upwork, Deliveroo, Mechanical Turk, etc.?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-241","original_id":"fermi-241","prompt":"How fast would I have to go to make a red traffic light look green?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-242","original_id":"fermi-242","prompt":"If the contiguous 48 states were to get an average of 30 inches of rain per year, how many grams of water is that?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-243","original_id":"fermi-243","prompt":"How heavy would a tesla car be if it were entirely built with the latest and lightest material available such as graphene, while maintaining safety standards but ignoring costs?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-244","original_id":"fermi-244","prompt":"How many bees would have to be on me and flap their wings so that they could carry me away?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-245","original_id":"fermi-245","prompt":"How many trees would the average American have to plant to be carbon neutral for their lifetime?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-246","original_id":"fermi-246","prompt":"What is the total number of spears and swords surviving today from medieval times?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-247","original_id":"fermi-247","prompt":"How much force is required to press on a light switch to turn it off?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-248","original_id":"fermi-248","prompt":"How long does it take for a bucket of water to get to a room temperature?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"fermi-249","original_id":"fermi-249","prompt":"What is the volume of RBCs, in cc, in the blood of an adult male?\n\nEstimate the quantity. End with exactly: ANSWER: <a single number, scientific notation OK>","source":"fermi","source_file":"external/fermi.jsonl","skill_fit":["fermi-estimation"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"numeric","license":"CC-BY-4.0","decision_instruction":"Estimate the quantity. Return ONLY valid JSON: {\"answer\": <number>}","eval_mode":"judge","label":null}
+{"id":"strategyqa-positive-0","original_id":"strategyqa-positive-0","prompt":"Is capturing giant squid in natural habitat impossible with no gear?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-0","original_id":"strategyqa-negative-0","prompt":"Is Mixed martial arts totally original from Roman Colosseum games?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-1","original_id":"strategyqa-positive-1","prompt":"Do flying fish have good eyesight?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-1","original_id":"strategyqa-negative-1","prompt":"Is the cuisine of Hawaii suitable for a vegan?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-2","original_id":"strategyqa-positive-2","prompt":"Would Kurt Cobain have benefited from Project Semicolon?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-2","original_id":"strategyqa-negative-2","prompt":"Did the Royal Air Force fight in the Boxer Rebellion?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-3","original_id":"strategyqa-positive-3","prompt":"Is electricity necessary to balance an account in Microsoft Excel?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-3","original_id":"strategyqa-negative-3","prompt":"Would someone in Mumbai refer to Solanum melongena as an eggplant?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-4","original_id":"strategyqa-positive-4","prompt":"Does Coast to Coast AM have more longevity than the Rush Limbaugh show?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-4","original_id":"strategyqa-negative-4","prompt":"If someone is a vegan, would they eat honey?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-5","original_id":"strategyqa-positive-5","prompt":"Would a Fakir be surprised if they saw a comma in their religious book?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-5","original_id":"strategyqa-negative-5","prompt":"Can the Great Depression be treated with Prozac?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-6","original_id":"strategyqa-positive-6","prompt":"Is the name of a mythical creature also the name of a Small Solar System body?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-6","original_id":"strategyqa-negative-6","prompt":"Does Santa Claus work during summer?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-7","original_id":"strategyqa-positive-7","prompt":"Is a felony jury enough people for a Bunco game?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-7","original_id":"strategyqa-negative-7","prompt":"Has categories of Nobel prizes remained same since Alfred Nobel established them?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-8","original_id":"strategyqa-positive-8","prompt":"Is Alan Alda old enough to have fought in the Vietnam War?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-8","original_id":"strategyqa-negative-8","prompt":"Does a Starbucks passion tea have ginger in it?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-9","original_id":"strategyqa-positive-9","prompt":"Can people die from brake failure?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-9","original_id":"strategyqa-negative-9","prompt":"Could you buy Hershey's Kisses in red foil with farthings after 1960?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-10","original_id":"strategyqa-positive-10","prompt":"Is Europa linked to Viennese waltzes?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-10","original_id":"strategyqa-negative-10","prompt":"Is a pound sterling valuable?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-11","original_id":"strategyqa-positive-11","prompt":"Would a Dolce & Gabbana suit wearer be shunned by their Amish cousins?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-11","original_id":"strategyqa-negative-11","prompt":"Can an African Elephant get pregnant twice in a year?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-12","original_id":"strategyqa-positive-12","prompt":"Will twenty pea pods contents cover entire chess board?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-12","original_id":"strategyqa-negative-12","prompt":"Would the host of The Colbert Report be likely to vote for Trump?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-13","original_id":"strategyqa-positive-13","prompt":"Would it be hard to get toilet paper if there were no loggers?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-13","original_id":"strategyqa-negative-13","prompt":"Is the foot part of the metric system?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-14","original_id":"strategyqa-positive-14","prompt":"Did Disney's second film rip off a prophet story?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-14","original_id":"strategyqa-negative-14","prompt":"In baseball, is a \"Homer\" named after the poet Homer who wrote the Odyssey?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-15","original_id":"strategyqa-positive-15","prompt":"Is Rurouni Kenshin from same country as lead character in Nobunaga's Ambition?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-15","original_id":"strategyqa-negative-15","prompt":"Could Casio's first invention be worn around the ankle?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-16","original_id":"strategyqa-positive-16","prompt":"Would a broadcast from Spirit make the news in 2020?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-16","original_id":"strategyqa-negative-16","prompt":"Did Richard III know his grandson?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-17","original_id":"strategyqa-positive-17","prompt":"Was Saudi Aramco started due to an assassination?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-17","original_id":"strategyqa-negative-17","prompt":"Can Kit & Kaboodle hypothetically help someone past the Underworld gates?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-18","original_id":"strategyqa-positive-18","prompt":"Are lengths measured in metres in the UK?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-18","original_id":"strategyqa-negative-18","prompt":"Was Walt Disney able to email his illustrations to people living far away?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-positive-19","original_id":"strategyqa-positive-19","prompt":"Can preventive healthcare reduce STI transmission?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"strategyqa-negative-19","original_id":"strategyqa-negative-19","prompt":"Could Godzilla have been killed by the Tohoku earthquake?\n\nThink step by step about the implicit chain of facts, then answer Yes or No.","source":"strategyqa","source_file":"external/strategyqa.jsonl","skill_fit":["second-order"],"family":"Quantitative/uncertainty","type":"target","target":true,"answer":"No","mode":"correctness","license":"CC (Wikipedia-derived, Apache-2.0 repo)","decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"forecasting-0","original_id":"forecasting-0","prompt":"Background: As of 1. June the Ukrainian spring counteroffensive has not yet happened. In preparation for this counter offensive, the Ukrainian army allegedly has formed several new battalions, several of them with western tanks and AFVs. Accordingly, the Russian side has reacted to this threat by building defensive fortifications in territories it controls. The counteroffensive itself seems to be quite imminent or might have already even have begun.\nAs the city of Polohy is about 20 km from the frontline and in the direction towards which it is \"most obvious\" the counteroffensive would take place towards it is apparent to ask - will the Ukrainian army manage to retake Polohy with this summer offensive?\n\nQuestion: Will Ukraine retake Polohy by the 1st of October, 2023?\n\nResolution: The sole authoritative source for defining areas of control will be the Institute for the Study of War (ISW) Ukraine Interactive War Map.\nThe question will resolve Yes if, at any point before or by 1. Oct 2023, ISW shows the the following two locatio\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-1","original_id":"forecasting-1","prompt":"Background: The AI Act is a proposed law in the European Union to regulate artificial intelligence. If approved, the Act would impose new rules governing the deployment of AI systems.\nThe current proposal would base rules on a risk classification system, with four levels of risk:\nUnacceptable risk AI. Harmful uses of AI that contravene EU values (such as social scoring by governments) will be banned because of the unacceptable risk they create;\nHigh-risk AI. A number of AI systems (listed in an Annex) that are creating adverse impact on people's safety or their fundamental rights are considered to be high-risk. In order to ensure trust and consistent high level of protection of safety and fundamental ri\n\nQuestion: Will the EU Parliament endorse a negotiating mandate for the AI Act before June 16, 2023?\n\nResolution: The question resolves as Yes if the EU Parliament endorses a negotiating mandate for the AI Act before June 16, 2023.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-2","original_id":"forecasting-2","prompt":"Background: Ukraine is widely expected to launch a counteroffensive this spring.\nOn June 2, 2023, President Zelenskyy said:\nThis isn’t a movie. It’s difficult for me to say how you will see the counteroffensive. The main thing is that Russia sees it, and that it doesn’t just see it, but also feels it. And we mean the troops that have occupied our territory in particular. The result of the counteroffensive is the liberation of our territories. When that happens, you'll know it's happening.\nPreparations for the offensive are reportedly underway, and Ukrainian officials have said the offensive could come \"soon.\"\n\nQuestion: Will internationally recognized media outlets report that a significant Ukrainian military counteroffensive has begun before June 21, 2023?\n\nResolution: This question resolves Yes if two of the following sources publish reports, prior to 11:59pm UTC on Tuesday, June 20, that unequivocally state the Ukrainian counteroffensive has begun.\nBBC News\nThe Economist\nThe New York Times\nThe Wall Street Journal\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-3","original_id":"forecasting-3","prompt":"Background: Lionel Messi is regarded as one of the best footballers of all time.\nIn June, Lionel Messi announced his departure of French Ligue 1 club, Paris Saint-German (PSG) having spent two seasons there after joining in August 2021.\nAs well as being considered one of the greatest footballers of all time, Messi is also one of a highest paid athletes in the world, and has an occult status as a result of his immense success at a club level with FC Barcelona, and at an international level with Argentina1. As such, there is a significant amount of speculation on what club Messi will join next.\nMost speculation lies with a return to:\nhis former La Liga club Barcelona, and\nhis boyhood Primera Division club\n\nQuestion: Will Lionel Messi next join Futbol Club Barcelona as a club player?\n\nResolution: This question will resolve Yes for the club that Lionel Messi has joined as a club player.\nIt will resolve No for all other clubs.\nConfirmation of Messi joining a new club will come from reliable and trustworthy sport news sources such as:\nSky Sports\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-4","original_id":"forecasting-4","prompt":"Background: Lionel Messi is regarded as one of the best footballers of all time.\nIn June, Lionel Messi announced his departure of French Ligue 1 club, Paris Saint-German (PSG) having spent two seasons there after joining in August 2021.\nAs well as being considered one of the greatest footballers of all time, Messi is also one of a highest paid athletes in the world, and has an occult status as a result of his immense success at a club level with FC Barcelona, and at an international level with Argentina1. As such, there is a significant amount of speculation on what club Messi will join next.\nMost speculation lies with a return to:\nhis former La Liga club Barcelona, and\nhis boyhood Primera Division club\n\nQuestion: Will Lionel Messi next join Al-Hilal Saudi Football Club as a club player?\n\nResolution: This question will resolve Yes for the club that Lionel Messi has joined as a club player.\nIt will resolve No for all other clubs.\nConfirmation of Messi joining a new club will come from reliable and trustworthy sport news sources such as:\nSky Sports\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-5","original_id":"forecasting-5","prompt":"Background: Lionel Messi is regarded as one of the best footballers of all time.\nIn June, Lionel Messi announced his departure of French Ligue 1 club, Paris Saint-German (PSG) having spent two seasons there after joining in August 2021.\nAs well as being considered one of the greatest footballers of all time, Messi is also one of a highest paid athletes in the world, and has an occult status as a result of his immense success at a club level with FC Barcelona, and at an international level with Argentina1. As such, there is a significant amount of speculation on what club Messi will join next.\nMost speculation lies with a return to:\nhis former La Liga club Barcelona, and\nhis boyhood Primera Division club\n\nQuestion: Will Lionel Messi next join Manchester City Football Club as a club player?\n\nResolution: This question will resolve Yes for the club that Lionel Messi has joined as a club player.\nIt will resolve No for all other clubs.\nConfirmation of Messi joining a new club will come from reliable and trustworthy sport news sources such as:\nSky Sports\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-6","original_id":"forecasting-6","prompt":"Background: Lionel Messi is regarded as one of the best footballers of all time.\nIn June, Lionel Messi announced his departure of French Ligue 1 club, Paris Saint-German (PSG) having spent two seasons there after joining in August 2021.\nAs well as being considered one of the greatest footballers of all time, Messi is also one of a highest paid athletes in the world, and has an occult status as a result of his immense success at a club level with FC Barcelona, and at an international level with Argentina1. As such, there is a significant amount of speculation on what club Messi will join next.\nMost speculation lies with a return to:\nhis former La Liga club Barcelona, and\nhis boyhood Primera Division club\n\nQuestion: Will Lionel Messi next join Club Internacional de Fútbol Miami as a club player?\n\nResolution: This question will resolve Yes for the club that Lionel Messi has joined as a club player.\nIt will resolve No for all other clubs.\nConfirmation of Messi joining a new club will come from reliable and trustworthy sport news sources such as:\nSky Sports\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-7","original_id":"forecasting-7","prompt":"Background: Lionel Messi is regarded as one of the best footballers of all time.\nIn June, Lionel Messi announced his departure of French Ligue 1 club, Paris Saint-German (PSG) having spent two seasons there after joining in August 2021.\nAs well as being considered one of the greatest footballers of all time, Messi is also one of a highest paid athletes in the world, and has an occult status as a result of his immense success at a club level with FC Barcelona, and at an international level with Argentina1. As such, there is a significant amount of speculation on what club Messi will join next.\nMost speculation lies with a return to:\nhis former La Liga club Barcelona, and\nhis boyhood Primera Division club\n\nQuestion: Will Lionel Messi next join Club Atlético Newell's Old Boys as a club player?\n\nResolution: This question will resolve Yes for the club that Lionel Messi has joined as a club player.\nIt will resolve No for all other clubs.\nConfirmation of Messi joining a new club will come from reliable and trustworthy sport news sources such as:\nSky Sports\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-8","original_id":"forecasting-8","prompt":"Background: The NBA Finals and the Stanley Cup Finals both feature a best-of-seven series format, which means that a team must win four games to secure the championship. Historically, many series have been decided before reaching a game 7, but some have gone the distance, contributing to some of the most exciting moments in sports history.\nThe 2023 NBA Finals are being contested between the Denver Nuggets and the Miami Heat. As of June 6th, the first two games have already been played with both teams winning one game each.\nIn the NHL, the Stanley Cup Finals are being played between the Vegas Golden Knights and the Florida Panthers. The Golden Knights currently lead the series 2-0.\n\nQuestion: Will either the NBA Finals or the Stanley Cup Finals in 2023 go to a game 7?\n\nResolution: This question will resolve as Yes if either the NBA Finals or the Stanley Cup Finals in 2023 goes to a game 7.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-9","original_id":"forecasting-9","prompt":"Background: Sierra Leone's Presidential Elections are set for June 24, 2023, with the key contenders being current President Julius Maada Bio of the Sierra Leone People’s Party (SLPP) and Samura Kamara of the All People’s Congress (APC). Bio has formed a strategic alliance with Kandeh Yumkella of the National Grand Coalition (NGC), presenting Bio as the single candidate.\nTo win in the first round, a candidate must secure at least 55% of the total votes. Failing this, the election proceeds to a runoff between the top two candidates.\n\nQuestion: Will the 2023 Presidential Elections in Sierra Leone proceed to a runoff?\n\nResolution: This question will resolve as Yes if the June 24, 2023, Presidential Elections in Sierra Leone go to a second round. The question will resolve as No if any candidate secures 55% or more votes in the first round, thus preventing a runoff.\nThe resoluti\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-10","original_id":"forecasting-10","prompt":"Background: On May 28, Sam Altman, CEO of OpenAI, granted an interview discussing future plans for OpenAI to Raza Habib at humanloop. A few days later, that interview was taken down by the publisher. It is still available in the internet archive.\nThe interview included the following:\n\"2023: A stateful API — When you call the chat API today, you have to repeatedly pass through the same conversation history and pay for the same tokens again and again. In the future there will be a version of the API that remembers the conversation history.\"\n\nQuestion: Will OpenAI release a stateful API to GPT-4 before 2024?\n\nResolution: This question resolves as YES if, before Dec 31, 2023, OpenAI releases an API to GPT-4 that \"remembers\" your history without explicitly passing it back in, and NO otherwise.\nIf unclear, we will defer to whether OpenAI calls the API \"stateful\", and th\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-11","original_id":"forecasting-11","prompt":"Background: On May 28, Sam Altman, CEO of OpenAI, granted an interview discussing future plans for OpenAI to Raza Habib at humanloop. A few days later, that interview was taken down by the publisher. It is still available in the internet archive.\nThe interview included the following:\n\"Sam shared what he saw as OpenAI’s provisional near-term roadmap for the API.\n2023: Cheaper and faster GPT-4 — This is their top priority. In general, OpenAI’s aim is to drive “the cost of intelligence” down as far as possible and so they will work hard to continue to reduce the cost of the APIs over time.\"\nOpenAI has a history of dramatic price cuts, including a ~2/3 drop in GPT-3's price in August 2022, and a ~90% drop i\n\nQuestion: Will OpenAI reduce the cost of the GPT-4 API by at least 2/3 (<=$0.01/1k prompt tokens for 8k context) before 2024?\n\nResolution: This question resolves as YES if, before Dec 31, 2023, OpenAI announces a price of <= $0.01/1k prompt tokens for 8k context window GPT-4, and NO otherwise.\nIf the size of context windows change, this will use the lowest context window that is at leas\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-12","original_id":"forecasting-12","prompt":"Background: On May 28, Sam Altman, CEO of OpenAI, granted an interview discussing future plans for OpenAI to Raza Habib at humanloop. A few days later, that interview was taken down by the publisher. It is still available in the internet archive.\nThe interview included the following:\n\"Quite a few developers said they were nervous about building with the OpenAI APIs when OpenAI might end up releasing products that are competitive to them. Sam said that OpenAI would not release more products beyond ChatGPT. He said there was a history of great platform companies having a killer app and that ChatGPT would allow them to make the APIs better by being customers of their own product. The vision for ChatGPT is \n\nQuestion: Will OpenAI release a \"product\" after ChatGPT before 2024?\n\nResolution: This question resolves as YES if, before Dec 31, 2023, OpenAI launches a \"product\" that meets the following criteria, and NO otherwise:\nIt is not a version or rebrand of ChatGPT\nIt is a consumer product. For example, we count ChatGPT as a product bec\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-13","original_id":"forecasting-13","prompt":"Background: On May 28, Sam Altman, CEO of OpenAI, granted an interview discussing future plans for OpenAI to Raza Habib at humanloop. A few days later, that interview was taken down by the publisher. It is still available in the internet archive.\nThe interview included the following:\n\"While Sam is calling for regulation of future models, he didn’t think existing models were dangerous and thought it would be a big mistake to regulate or ban them. He reiterated his belief in the importance of open source and said that OpenAI was considering open-sourcing GPT-3. Part of the reason they hadn’t open-sourced yet was that he was skeptical of how many individuals and companies would have the capability to host \n\nQuestion: Will OpenAI open-source GPT-3 before 2024?\n\nResolution: This question resolves as YES if, by Dec 31, 2023, GPT-3 is freely available as open source software, and NO otherwise.\nThis means that both the weights of the model are open source, as well as the code for training the model. (It does not require th\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-14","original_id":"forecasting-14","prompt":"Background: In April 2023, Reddit announced new terms for its Application Programming Interface (API), the tool through which developers of third-party apps access Reddit's data. This change included the introduction of pricing for API usage, a significant departure from the previous practice of providing the API for free. This led to an outcry from both developers and users of third-party Reddit apps, as these changes could result in substantial costs for developers and the potential shutdown of many popular third-party apps.\nThe developer of the popular third-party app, Apollo for Reddit, Christian Selig, stated he would be liable for an annual cost of $20 million under the new terms. This revelation \n\nQuestion: Will Reddit announce changes or a delay to its proposed API fee pricing before July 1, 2023?\n\nResolution: This question will resolve as Yes if, before July 1, 2023, Reddit announces changes or a delay of implementation to the pricing of its newly announced data API fees for apps that require higher usage. The pricing will be considered to have changed or\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-15","original_id":"forecasting-15","prompt":"Background: The International Math Olympiad (IMO) is the oldest international science Olympiad for pre-college students. China's team has dominated the last few years. At last year's (63rd) IMO competition, China had the top score of 252 points achieving the maximum allowed score. South Korea came in second with 208 and the US team had 207 for 3rd.\nThe 2023 IMO will be held from July 2 to July 13, 2023 in Chiba, Japan.\nThe competition consists of 6 problems. The competition is held over two consecutive days with 3 problems each; each day the contestants have four-and-a-half hours to solve three problems. Each problem is worth 7 points for a maximum total score of 42 points. Calculators are not allowed. \n\nQuestion: Will the Chinese team at the 64th International Math Olympiad be the top ranked team again?\n\nResolution: The question will resolve Yes if China has the most points or is tied for the highest point total at the end of the 2023 International Math Olympiad, as reported on the IMO website.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-16","original_id":"forecasting-16","prompt":"Background: On January 18, 2022, Microsoft, manufacturer of the Xbox video game console, announced an agreement to acquire Activision Blizzard for $68.7 billion, which would make Microsoft the 3rd largest video game publisher in the world, behind Tencent and Sony. Activision Blizzard's key franchises are Call of Duty, World of Warcraft, Overwatch League, Diablo, Hearthstone, and Candy Crush.\nAs of June 2023, the merger between Microsoft and Activision Blizzard faces delays and uncertainties. The Federal Trade Commission (FTC) filed a lawsuit on June 12, 2023, to block Microsoft's acquisition of Activision Blizzard, which led to a federal judge temporarily blocking the $69 billion purchase to allow more \n\nQuestion: Will Microsoft acquire Activision Blizzard in 2023?\n\nResolution: This question resolves as Yes based on a Microsoft press release stating that it has acquired Activision Blizzard. It resolves as No immediately upon an announcement by Microsoft that the acquisition deal has been terminated. Otherwise if no deal has\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-17","original_id":"forecasting-17","prompt":"Background: Voicebox is a generative AI model for speech developed by Meta AI. The model is unique in its ability to generalize to speech-generation tasks it was not specifically trained to accomplish. The model can synthesize speech across six languages, perform noise removal, content editing, style conversion, and diverse sample generation. Voicebox uses a method called Flow Matching, which significantly improves upon diffusion models and outperforms the current state of the art English model, VALL-E, on zero-shot text-to-speech.\nDespite its potential, Meta has decided not to make the Voicebox model or code publicly available \"because of the potential risks of misuse\". However, in March 2023, Meta's l\n\nQuestion: Will Meta's Voicebox model be leaked by July 1, 2023?\n\nResolution: This question will resolve as Yes if by July 1, 2023, credible media or tech industry reports or the official statements from Meta AI confirm that the Voicebox AI model or its code has been made publicly available, through a leak, hack, or something \n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-18","original_id":"forecasting-18","prompt":"Background: Tesla Inc., the renowned electric vehicle (EV) maker, has seen a steady uptrend in its stock value, with a multi-week streak resulting in a 131% increase in share value within the year 2023. This upward surge has elevated the company's market capitalization to over $850 billion.\nHowever, this current valuation still falls short of Tesla's all-time high in 2021, when the company hit a staggering market cap of over $1.2 trillion.\n\nQuestion: Will Tesla's market cap be greater than $1 trillion before July 1, 2023?\n\nResolution: This question will resolve as Yes if the total market capitalization of Tesla (TSLA) is greater than $1 trillion (USD) at any time between June 20, 2023 to July 1, 2023.\nData for market capitalization will come from CompaniesMarketCap. If they do not\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-19","original_id":"forecasting-19","prompt":"Background: From Wikipedia: On June 18, 2023, the Titan, a submersible operated by OceanGate Expeditions, went missing in the North Atlantic Ocean off the coast of Newfoundland in Canada. The submersible, designed to carry five people, was carrying an expedition of tourists to view the wreckage of RMS Titanic.\n\nQuestion: Will the 'Titan' submersible be recovered intact by noon ET on Thursday, June 22?\n\nResolution: This question resolves Yes if two credible media reports indicate the 'Titan' submersible has been recovered, intact, by noon ET on Thursday, June 22.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-20","original_id":"forecasting-20","prompt":"Background: Following the Russian invasion of Ukraine both countries agreed to the Black Sea Grain Initiative, which Wikipedia describes as follows:\nThe Russian invasion of Ukraine in February [2022] led to a complete halt of maritime grain shipments from Ukraine, previously a major exporter via the Black Sea. Additionally Russia temporarily halted its grain exports, further exacerbating the situation. This resulted in a rise in world food prices and the threat of famine in lower-income countries, and accusation that Russia weaponizing food supplies. To address the issue, discussions began in April, hosted by Turkey (which controls the maritime routes from the Black Sea) and supported by the UN. The res\n\nQuestion: Will the Black Sea grain deal be extended before July 19, 2023?\n\nResolution: This question will resolve as Yes if, before July 19, 2023, credible sources report that the Black Sea Grain Initiative has been extended beyond the current end date of July 18, 2023. To qualify, both Ukraine and Russia must agree to the extension; i\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-21","original_id":"forecasting-21","prompt":"Background: On 23 June 2023, Wagner Group leader Yevgeny Prigozhin alleged that soldiers of the Russian Ministry of Defense were shelling his positions. Prigozhin promised to take revenge on the leadership of the Ministry of Defense. Prigozhin said the \"evil\" in the military leadership must be stopped and vowed to \"March for Justice\". (Wikipedia)\nSome Russia observers described Prigozhin's actions as an armed mutiny. Russian security services called for Prigozhin's arrest.\n\nQuestion: Will Yevgeny Prigozhin be the functional leader of the Wagner Group on June 30, 2023?\n\nResolution: The question resolves Yes if, on June 30 at 7pm ET, Wikipedia lists Yevgeny Prigozhin as the primary active leader of the Wagner Group AND Prigozhin is not in Russian custody.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-22","original_id":"forecasting-22","prompt":"Background: On 23 June 2023, the Russian private military company known as the Wagner Group initiated an armed conflict with the Russian Armed Forces, following increasing tensions between the organization's leader, Yevgeny Prigozhin, and the Russian Ministry of Defence (MoD). Wagner personnel have said that corruption and incompetency in the MoD has squandered progress after initial successes in the invasion of Ukraine, while Russian president Vladimir Putin and other officials have denounced the groups' attacks as treasonous acts of opportunism and seizure of power.\nPrigozhin described the rebellion as revenge for what he said was an attack on his forces by the ministry. He dismissed the Russian gover\n\nQuestion: Will the Wagner Group control a part of Moscow by July 1, 2023?\n\nResolution: The question resolves Yes if, before 8pm ET on June 30, 2023, any of the following sources state that the Wagner Group, or forces aligned with the Wagner Group, control any part of Moscow:\nThe Economist\nThe New York Times\nReuters\nThe Associated Press\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-23","original_id":"forecasting-23","prompt":"Background: Yevgeny Prigozhin, the leader of the Wagner Group, announced on Saturday, June 24th, that his mercenaries will suspend their advance towards Moscow and return to Ukraine.\nAlexander Lukashenko, the president of Belarus and a firm supporter of President Vladimir Putin, asserted his role in brokering this ceasefire.\n\nQuestion: Will the agreement between the Kremlin and the Wagner Group hold through the end of June?\n\nResolution: The question resolves No if Yevgeny Prigozhin publicly states any of the following:\nThat Wagner forces will again mobilize within Russia with the goal of enacting change within Russian government.\nAnything equivalent to \"the deal is off\"\nThe question\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-24","original_id":"forecasting-24","prompt":"Background: Twitter & Facebook have been abuzz regarding the interaction that occurred between the two high-profile tech billionaires - Elon Musk & Mark Zuckerberg.\nIt seems that both Elon Musk and Mark Zuckerberg have agreed to fight each other in a cage match, in not so many words at least, by the following exchange:\nMusk posted a message on his social media platform Twitter that he was \"up for a cage fight\" with Zuckerberg.\nZuckerberg, owner of Facebook and Instagram parent company Meta, then posted a screenshot of Musk's tweet, saying \"send me location\".\"\nMany news outlets have been discussing the two billionaires' competitive history with one another, their fighting abilities and strengths, and who\n\nQuestion: Will Elon Musk and Mark Zuckerberg engage in a cage fight at any point before 2024?\n\nResolution: The question will resolve Yes if a publicly-evident cage match occurs directly between Elon Musk & Mark Zuckerberg, before January 1, 2024.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-25","original_id":"forecasting-25","prompt":"Background: A political rally on 14 October 2023 organised by Chain of Freedom Scotland aims to form a human chain spanning the width of Scotland, following the route of the Forth and Clyde Canal. Will this aim be achieved?\nThe rally is inspired by Baltic Way, a similar event that took place in 1989 and saw approximately 2 million people join hands in a continuous human chain running 430 miles across the Baltic States, which at the time were occupied by the Soviet Union.\nThe chain aims to be continuous with the exception that roads will not be blocked:\nThe Chain of Freedom will NOT close down any roads, nor cross any roads, which will disrupt the public. Should there be a road in your section. The Chain\n\nQuestion: Will a nearly continuous human chain stretch across the length of the Forth and Clyde Canal on 14 October 2023?\n\nResolution: This question will resolve as Yes if, before October 16, credible sources report that a \"continuous\" or \"nearly continuous\" human chain stretched across the length of the Forth and Clyde canal on October 14, 2023, with sufficient attendance for the c\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-26","original_id":"forecasting-26","prompt":"Background: Investopedia describes the Dow Jones Industrial Average (DJIA) as follows:\nThe Dow Jones Industrial Average (DJIA) is a stock market index that tracks 30 large, publicly-owned blue-chip companies trading on the New York Stock Exchange (NYSE) and Nasdaq. The Dow Jones is named after Charles Dow, who created the index in 1896 along with his business partner, Edward Jones. Also referred to as the Dow 30, the index is considered to be a gauge of the broader U.S. economy. . . . The DJIA launched in 1896 with just 12 companies, primarily in the industrial sector. They included railroads, cotton, gas, sugar, tobacco, and oil. The index grew to 30 components by 1928. Since then, it's changed many ti\n\nQuestion: Will the Dow Jones close at or above 35,000 before August 1, 2023?\n\nResolution: This question will resolve as Yes if, after July 3, 2023 and before August 1, 2023, the Dow Jones Industrial Average (DJIA) closes at or above $35,000 according to Yahoo Finance.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-27","original_id":"forecasting-27","prompt":"Background: In late June 2023, Israel's public broadcasting network reported that the Palestinian Authority may need to declare bankruptcy. Representatives of the Palestinian Authority disputed this claim.\n\nQuestion: Will the Palestinian Authority declare itself bankrupt before the end of 2023?\n\nResolution: The question resolves Yes if, before January 1, 2024, reputable sources report the Palestinian Authority is bankrupt.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-28","original_id":"forecasting-28","prompt":"Background: Hurricane season in Virginia runs from June 1 to November 30. Virginia uses a system known as \"Know Your Zone\" featuring four zones for at-risk areas which can be used for evacuation orders:\n“Know Your Zone” serves roughly 1.25 million residents who live in Coastal Virginia, the region of the state most vulnerable to hurricanes and other tropical storms. Twenty-three localities participate in the tiered evacuation zones. Zones were developed in close coordination with local emergency managers throughout Hampton Roads, the Northern Neck, the Middle Peninsula and the Eastern Shore based on the most up-to-date engineering data for the region.\nZones are designated A through D. Zones provide resi\n\nQuestion: Will a mandatory evacuation order be issued for any area of Virginia related to any tropical cyclone in 2023?\n\nResolution: This question will resolve as Yes if, before January 1, 2024, the government of Virginia (either state or local) orders a mandatory evacuation related to any tropical cyclone.\nFine Print\nA mandatory evacuation need not be for an entire zone, a mandat\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-29","original_id":"forecasting-29","prompt":"Background: General Sergei Surovikin, head of the Russian aerospace forces and former commander of Russia's military operation in Ukraine, has recently been detained amid speculation about loyalty and divisions within the country's leadership. Surovikin was reportedly aware in advance of the uprising led by mercenary leader Yevgeny Prigozhin against top defense leaders. Following the uprising, Surovikin's name emerged in connection with the Wagner Group forces' seizure of Russia's southern regional military headquarters and their movement towards Moscow.\n\nQuestion: Will General Sergei Surovikin be stripped of his command by July 11th?\n\nResolution: The question will resolve Yes if there are official announcements, credible reports, or statements from authoritative sources—before July 12, 2023—confirming that General Sergei Surovikin is no longer the Commander-in-Chief of the Aerospace Forces. I\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-30","original_id":"forecasting-30","prompt":"Background: The Tour de France is one of the most prestigious and iconic cycling races in the world, attracting top cyclists from around the globe.\nThe yellow jersey, or maillot jaune, is worn by the leader of the general classification, representing the cyclist with the lowest cumulative time. It is a coveted symbol of excellence and serves as a significant milestone in the race.\nStage 9 will be ridden on Sunday, July 9th and is a mountain climbing stage (on a volcano!) that hasn't been part of the Tour since 1988. The following day will be the first rest day of the Tour.\n\nQuestion: Will the winner of stage 9 of the 2023 Tour De France also hold the yellow jersey at the end of the stage?\n\nResolution: The question will resolve Yes if the cyclist who wins stage 9 of the 2023 Tour de France is also ranked first in the General Individual Rankings after stage 9.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-31","original_id":"forecasting-31","prompt":"Background: Previous Questions on Metaculus\nWill Ukraine regain control of central Bakhmut by the end of May 2023?\nWill Russian troops reach the center of Bakhmut, Ukraine before 0000 hrs local time on January 27th, 2023?\nOn February 24th, 2022, Russia invaded Ukraine. Russia's initial plan seemed to involve rapidly taking the capital, deposing the government, and largely completing the country's conquest before Western countries could co-ordinate on a reaction. By April 2022, after this plan was unsuccessful, Russia shifted focus to the Donets Basion (Donbas) region in the country's east, where conditions were more favorable. This offensive also bogged down quickly, and Russia's offensive ambitions nar\n\nQuestion: Will Ukraine regain control of central Bakhmut by the end of September 2023?\n\nResolution: The sole authoritative source for defining areas of control will be the Institute for the Study of War (ISW) Ukraine Interactive War Map.\nThe question will resolve Yes if, when checked by Metaculus admins at 5pm ET on September 30, 2023, the map show\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-32","original_id":"forecasting-32","prompt":"Background: Luna-25 is a planned lunar lander mission by the Russian space agency Roscosmos. If it succeeds, it will land in the lunar South Pole region near the Boguslavsky crater.\nAs the Russian-language Wikipedia article about Luna-25 says (translation by Google Translate):\nThe purpose of this project is to launch an automatic probe, the orbital part of which should carry out remote research and select suitable sites for subsequent descent vehicles, and the lander will explore the surface in the South Pole region , including cryogenic drilling to a depth of two meters (the main task is to search for water ).\nLuna-25 is the first lunar mission by Russia after the Soviet times. The last in the series o\n\nQuestion: Will the Russian Luna-25 mission reach Earth's orbit before September 2, 2023?\n\nResolution: This question resolves as \"Yes\", if credible media report that Luna-25 has successfully reached Earth's orbit before September 2, 2023. Further success or failure of the mission (like reaching the Moon's orbit or succeeding with a soft landing) is ir\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-33","original_id":"forecasting-33","prompt":"Background: The Luna-25 mission is a planned lunar lander mission by Roscosmos. If everything goes according to the plan it will land near the lunar south pole near the Boguslavsky crater. Luna-25 is currently scheduled to be launched in August this year. The primary mission of Luna-25 is to prove the landing technology. The mission will carry 30 kg (66 lb) of scientific instruments, including a robotic arm for soil samples and possible drilling hardware.\nThe first human-made object to touch the Moon was the Soviet Union's Luna 2, on 13 September 1959. The final Soviet mission to the Moon was launched on Aug. 9, 1976, under the official name Luna-24. Luna-24 became the 11th Soviet attempt to return samp\n\nQuestion: Will Russia successfully land on the Moon with their first attempt?\n\nResolution: This question resolves Yes if Russia successfully lands on the Moon with their first attempt. As a first attempt, we count the first mission to achieve liftoff with a lunar lander on board and the stated intention to land the lander on the moon. This\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-34","original_id":"forecasting-34","prompt":"Background: A civil war refers to an armed conflict that takes place within a country, typically between different factions, regions, or political groups vying for power or independence. These internal conflicts are usually characterized by sustained, violent confrontations, significant casualties, and severe disruptions to social and economic systems. Several factors can contribute to the onset of a civil war, including political instability, economic disparities, ethnic or religious tensions, and the struggle over resources or territory. The impact of civil wars can be devastating, leading to widespread destruction, human displacement, and humanitarian crises.\n\nQuestion: Will the following countries experience a civil war before 2036? (Sudan)\n\nResolution: This question resolves Yes for each listed country that experiences a civil war before January 1, 2036.\nWhether a country experiences Civil War will be determined based on the Council of Foreign Relations Global Conflict Tracker. The question will re\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-35","original_id":"forecasting-35","prompt":"Background: Ohio Issue 1 (2023), also called \"the 60% Vote Requirement to Approve Constitutional Amendments Measure\", is on the ballot in Ohio for an election on August 8, 2023.\nA \"yes\" vote would amend the Ohio Constitution and increase the voter approval threshold for future constitutional amendments considered via ballot initiative to 60% (whereas currently the threshold is a simple majority of 50%+1). Issue 1 passing would also require citizen-initiated amendment campaigns to collect signatures from each of the state's 88 counties (whereas previously the threshold was only half of the counties) and eliminate a currently authorized 10 day \"cure\"/grace period for addressing invalid signatures. General\n\nQuestion: Will Ohio Issue 1 pass in the August 2023 election?\n\nResolution: This question resolves YES if, per credible media reporting, Ohio Issue 1 is passed following the August 2023 election.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-36","original_id":"forecasting-36","prompt":"Background: Colson Whitehead, is a Pulitzer and National Book Award-winning author who has penned various acclaimed works, such as \"The Underground Railroad,\" \"The Nickel Boys,\" and \"Harlem Shuffle,\" and received numerous accolades like the MacArthur Fellowship. His latest book Crook Manifesto, will be published on July 18th, 2023 and is considered one of the most anticipated books of the summer.\n\nQuestion: Will Crook Manifesto by Colson Whitehead be on the August 13th New York Times Bestseller List?\n\nResolution: This question will resolve as Yes if Crook Manifesto is listed in the top 15 books on the New York Times Best Sellers list for Hardcover Fiction for the list dated August 13th.\nFine Print\nDated lists generally include sales data ending about 2 weeks \n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-37","original_id":"forecasting-37","prompt":"Background: The Sphere, an impressive $2 billion venue at the Venetian Resort in Las Vegas, was fully illuminated for the first time on July 4, 2023. Covered in 580,000 square feet of programmable LED panels, The Sphere has become a striking addition to the Las Vegas skyline. With an 18,000-seat capacity, it is set to host its first concert on September 29, 2023, featuring the band U2.\n\nQuestion: Will the U2 concert at The Sphere on September 29, 2023 take place?\n\nResolution: The question will resolve Yes if the U2 concert at The Sphere in Las Vegas occurs as planned on September 29, 2023.\nFine Print\nIf the concert starts (but does not finish or is rescheduled mid-concert) this question will still resolve Yes.\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-38","original_id":"forecasting-38","prompt":"Background: Over the last few years, Sweden has had hotter and sunnier summers than usual, an experience shared with other places around the world. The hot and dry summers are bad for crop yields, but occasionally celebrated by people looking to enjoy their vacation and recharge on daylight after a long, dark winter.\nSo far, this summer has also been hot and dry and there's no real reason to think it would not continue to be. That said, exceeding 500 hours of sun in Stockholm has happened only four times in the past 20 years, with the normal amount of sun in recent history hovering in the 350-450 hour range.\n\nQuestion: Will Stockholm see more than 500 hours of sun in the summer of 2023?\n\nResolution: This question will resolve Yes if the total number of hours of sun (summation over the weeks 26-32 inclusive) listed for Stockholm by SVT Data Journalism Sun League exceeds 500.\nThe number of hours used to resolve this question will be the ones liste\n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"forecasting-39","original_id":"forecasting-39","prompt":"Background: The Chandrayaan-3 lander Vikram is a lunar lander designed by India's space program (ISRO).\nThe Chandrayaan-2 mission was launched in July 2019 and it resulted in a lander that crashed on the lunar surface in September of that year. The cause was attributed to a software glitch.\nIf the Chandrayaan-3 mission is successful India would only be the fourth country to soft land a lander on the moon after the Soviet Union, the US, and China.\nThe Chandrayaan-3 lander Vikram was launched on a GSLV Mark 3 rocket on July 14, 2023 and is expected to land on the moon on August 23 or 24 near Mutus crater.\n\nQuestion: Will the Chandrayaan-3 lander soft-land on the moon?\n\nResolution: The question resolves Yes if the Vikram lander soft-lands on the surface of the moon.\nTo qualify as a soft-landing, the lander must touch the lunar surface in a controlled and gradual way that does not damage all of its systems to the point of being \n\nGive the probability the answer is YES. End with exactly: ANSWER: <number between 0 and 1>","source":"forecasting","source_file":"external/forecasting.jsonl","skill_fit":["probabilistic"],"family":"Quantitative/uncertainty","type":"target","target":true,"mode":"binary-prob","license":"Apache-2.0","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"margin-safety-01","original_id":"margin-safety-01","prompt":"A team expects peak API traffic of 800 req/s during an upcoming product launch. Historical launches show spikes of 3–5x the predicted peak, and a failure would mean lost revenue plus SLA breach penalties. The team provisions 2,000 req/s of capacity — 2.5x the expected peak.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-02","original_id":"margin-safety-02","prompt":"A data warehouse team expects to ingest 500GB of data per month. Storage is charged at $0.023/GB and data loss is not a concern because source data can be re-ingested at any time. They provision 550GB — a 10% buffer. Scaling additional storage takes less than 30 seconds via an API call.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-03","original_id":"margin-safety-03","prompt":"A payments company processes an average of 1,200 transactions per second on normal days. Black Friday historically generates 4–6x normal volume, and a payment processing outage means direct revenue loss of roughly $50,000 per minute. The team provisions capacity for 1,800 transactions per second for the holiday period.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-04","original_id":"margin-safety-04","prompt":"A team is setting an HTTP client timeout for calls to a third-party shipping API. The shipping API's documented p99 latency is 400ms, and their SLA guarantees responses within 800ms. Calls that time out result in a failed order checkout with user-visible errors. The team sets a 1,000ms timeout.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-05","original_id":"margin-safety-05","prompt":"A startup's engineering team estimates a new feature will take 4 weeks to build. This is the team's first time working with the third-party payments SDK, and the feature is on the critical path for a contractually committed customer demo. They commit to a 5-week delivery date — 25% buffer.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-06","original_id":"margin-safety-06","prompt":"A Postgres connection pool is configured with a maximum of 100 connections. Under normal load the service uses 45 connections. During monthly billing runs a secondary process uses up to 30 additional connections simultaneously. An unexpected secondary batch job will exhaust the pool only if both peaks coincide, which has never happened. The cost of pool exhaustion is a cascade of 500 errors to all users.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-07","original_id":"margin-safety-07","prompt":"A video transcoding service processes an average of 200 jobs per hour. Job volume has been growing 15% month-over-month for six months with no sign of slowing. Each job consumes roughly the same compute. The team provisions for 600 jobs per hour — 3x current average — and plans to review in three months. Delays cause content to miss publishing windows, resulting in lost ad revenue.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-08","original_id":"margin-safety-08","prompt":"A team is planning storage for a new audit log system. Legal requires all audit logs to be retained for 7 years, and any gap is a compliance violation. The team's data model estimates 80GB per year based on current transaction volume. They provision 100GB of storage — enough for about 15 months — with a plan to add capacity before it fills.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-09","original_id":"margin-safety-09","prompt":"A ride-sharing company allocates a monthly infrastructure budget of $120,000. Actual spend has been stable at $95,000–$100,000 per month for the past six months with no new services planned. The allocated budget of $120,000 represents a 20–26% buffer over observed spend.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-10","original_id":"margin-safety-10","prompt":"A hospital patient-record API is expected to serve 500 concurrent users during the busy morning shift. Load tests show the system becomes degraded at 520 concurrent users. Patient care workflows depend on the system; downtime means nurses fall back to paper, which introduces medication error risk. The team deploys hardware supporting 550 concurrent users.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-11","original_id":"margin-safety-11","prompt":"A Kafka consumer group processes 50,000 messages per hour at steady state. The upstream producer can burst to 200,000 messages per hour during end-of-day batch closes, lasting about 45 minutes. Consumer lag during burst causes downstream reports to be delayed, impacting trading desks. The team sizes consumers for 250,000 messages per hour sustained throughput.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-12","original_id":"margin-safety-12","prompt":"A team is deploying a new machine learning inference service. Benchmark tests show the model needs 6GB of GPU VRAM at maximum batch size. The team selects a GPU instance with exactly 8GB VRAM. They note that framework overhead, CUDA context, and driver memory are not accounted for in the benchmark figure.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-13","original_id":"margin-safety-13","prompt":"A software team is migrating a monolith to microservices. The project manager estimates 6 months based on a rough breakdown of work. The migration touches every team in the company, requires coordination with three external vendors, and has no prior comparable project as reference. The team commits to a 12-month timeline with a formal review at month 6.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-14","original_id":"margin-safety-14","prompt":"An IoT platform expects 10,000 devices to connect simultaneously after a firmware update pushes to all deployed units. Historical firmware pushes show actual simultaneous reconnection peaks reach 8x the device count (due to reconnect storms). A reconnection storm exceeding broker capacity causes devices to go permanently offline until manually reset. The broker is provisioned for 15,000 simultaneous connections.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-15","original_id":"margin-safety-15","prompt":"A SaaS company's search index uses 40% of available disk space under current data volume. Data volume is projected to grow 20% per year, and the index requires immediate disk space to function — when disk hits 90% full the service stops indexing new documents. The team plans to add storage when usage hits 70% utilization, giving roughly 1.5 years of runway.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-16","original_id":"margin-safety-16","prompt":"A team's API rate limit with their geolocation provider is 10,000 lookups per day. Current usage averages 6,500 lookups per day. A marketing campaign launching next month is expected to bring a 2–3x traffic increase lasting two weeks. Exceeding the rate limit returns errors on the address validation step of checkout, blocking all new orders.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-17","original_id":"margin-safety-17","prompt":"A team running a high-traffic CDN edge node configures a memory cache with a maximum size of 32GB. Profiling shows the working set of hot content peaks at 20GB during prime time, with cold-start periods using as little as 5GB. Cache evictions are graceful — a miss falls through to origin with a latency penalty but no data loss. They size at 32GB for comfortable headroom.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-18","original_id":"margin-safety-18","prompt":"A developer estimates a new authentication refactor will take 10 days. The team has done this type of refactor three times in the past year, always within 8–12 days. The change is internal only, has no customer-facing deadline, and can be rolled back instantly if problems arise. They commit to 11 days.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-19","original_id":"margin-safety-19","prompt":"A team deploys a Redis cache cluster sized for 8GB of memory. Current cache usage is 7.2GB. Keys are set with TTLs of 24 hours but the product roadmap includes launching three new features over the next two months, each of which is expected to add cached objects. Cache eviction uses LRU, and evicting hot keys causes a cascade of DB queries that has previously caused an incident.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-20","original_id":"margin-safety-20","prompt":"A blockchain indexer must process blocks in real time; falling more than 100 blocks behind causes downstream dApps to display stale data, which breaks user transactions. Block arrival rate averages 12 per minute but spikes to 40 per minute during network congestion events that occur roughly twice a month. The team provisions for 60 blocks per minute sustained throughput.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-21","original_id":"margin-safety-21","prompt":"A team's incident response SLA commits to acknowledging critical incidents within 15 minutes and resolving them within 4 hours. They have one primary on-call engineer and no backup. The primary has missed acknowledgment in 3 of the last 20 incidents due to being in a meeting or asleep in a different time zone.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-22","original_id":"margin-safety-22","prompt":"An analytics pipeline writes results to an S3 bucket. Each run produces approximately 2GB. The pipeline runs daily, and 90 days of results are retained before lifecycle rules delete old files. The team allocates 250GB of S3 capacity via a quota. S3 storage is elastic and quota overages are immediately rechargeable at standard rates.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-23","original_id":"margin-safety-23","prompt":"A team is launching a developer API with a free tier capped at 1,000 calls per month per user. Backend cost per call is $0.001. They provision infrastructure for 5 million total free-tier calls per month. They have 3,000 free-tier users signed up and expect 10,000 by end of quarter. At full expected adoption and full usage, demand would be 10 million calls per month.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-24","original_id":"margin-safety-24","prompt":"A team configures a circuit breaker to open after 5% error rate sustained over 10 seconds. Under normal conditions the service runs at 0.1% error rate. The error rate threshold, window size, and recovery behavior were validated in production-like load tests. The circuit breaker configuration matches what was tested.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-25","original_id":"margin-safety-25","prompt":"An e-commerce site expects 1,000 concurrent sessions during a flash sale. Load testing shows the application server handles 1,050 concurrent sessions before response times degrade past 3 seconds. A degraded checkout experience during the flash sale means customers abandon carts. The team does not add additional capacity, relying on auto-scaling that takes 4–6 minutes to provision new instances.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-26","original_id":"margin-safety-26","prompt":"A team building a new internal reporting tool estimates the backend will need 4 vCPUs and 8GB RAM under expected query load. The tool is used only during business hours by 15 analysts. They provision an 8 vCPU, 16GB RAM instance, doubling both. If the tool becomes slow, analysts can wait without business impact.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-27","original_id":"margin-safety-27","prompt":"A satellite telemetry ingestion pipeline must store all raw data permanently for regulatory reasons; any data gap is a compliance event with significant fines. The system ingests 10TB per year with no growth expected. The team provisions 12TB — 20% buffer — on a single storage array with no redundancy and no offsite backup.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-28","original_id":"margin-safety-28","prompt":"A team uses a managed Elasticsearch cluster for product search. Normal indexing throughput is 2,000 documents per second. The team expects a re-index event during a schema migration that will run at 4,000 documents per second for approximately 6 hours. They temporarily scale the cluster to handle 6,000 documents per second for the migration window. A search outage means the product catalog is unavailable to customers.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-29","original_id":"margin-safety-29","prompt":"A team provisions a job queue worker fleet sized to drain 100 jobs per minute — exactly matching the average production ingest rate. The queue is used for sending transactional emails; if the queue backs up significantly, emails arrive hours late. Historical data shows ingest spikes to 300 jobs per minute during large user-triggered events such as password reset floods.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-30","original_id":"margin-safety-30","prompt":"A team committing to a quarterly OKR estimates a feature will be delivered in 6 weeks, based on a well-understood problem space, a team that has built nearly identical features before, and no external dependencies. They commit to 8 weeks in the OKR. Missing the OKR has minor internal visibility consequences and the feature can ship one quarter late without customer impact.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Quantitative/uncertainty","type":"target","target":true,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"financial-4","original_id":"financial-4","prompt":"Can you write a short analysis on how the extreme financial sanctions imposed by Western countries against Russia are potentially leading to the erosion of the US dollar's global dominance and the acceleration of a multipolar reserve currency system?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-7","original_id":"financial-7","prompt":"Can you explain the concept of \"malinvestments\" mentioned in the text and how it relates to the author's criticism of Paul Krugman's views on economic stimulus?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","steel-manning","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-9","original_id":"financial-9","prompt":"Can you explain the difference between defined-benefit plans and defined-contribution plans, and how they affect retirees' financial security?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","inversion","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-15","original_id":"financial-15","prompt":"Write a brief conclusion that highlights the importance of effort and cognition in achieving success in the stock market, while acknowledging the role of luck and the need for humility when reflecting on one's success.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["debiasing","probabilistic","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-18","original_id":"financial-18","prompt":"Write a brief proposal based on Zhang Guiping's suggestions for the Chinese government to consider in order to improve the financing environment for private businesses.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","second-order","leverage-points"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-20","original_id":"financial-20","prompt":"How might the tax reform bill affect the global economic landscape, particularly concerning the competitive position of the United States and its impact on emerging markets?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","inversion"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-24","original_id":"financial-24","prompt":"Considering the analysis provided, what are the expected trends for fiscal income and expenditure in December, and what uncertainties could influence these projections?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","probabilistic","pre-mortem"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-26","original_id":"financial-26","prompt":"What do you think are the implications of having 774 local government areas and a large number of senators and national legislators on the national treasury, and do you agree with Sanusi's suggestion to reduce their numbers?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","opportunity-cost","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-28","original_id":"financial-28","prompt":"Can you explain the significance of the University of Tennessee study in the context of online sales tax collection, and how it has influenced the debate on this issue?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","map-territory"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-30","original_id":"financial-30","prompt":"Explain the role of regulatory measures in the P2P lending industry, specifically how they have affected platform operations and market dynamics, including the impact on platform yields and investor behavior.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","second-order","feedback-loops"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-35","original_id":"financial-35","prompt":"What do you think Pusey means by \"giving tasks to others helps to build a strong unit\" in the context of leadership, and how can this principle be applied in a team or organizational setting?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","first-principles","inversion"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-38","original_id":"financial-38","prompt":"Can you discuss the implications of the government's suppression of dissenting voices and independent monitoring bodies, such as the Combat Poverty Agency and the Irish Patients Association, on the ability of citizens to hold the government accountable for its economic policies?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","feedback-loops","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-41","original_id":"financial-41","prompt":"How does the expansion of the State Children's Health Insurance Program and the legislation extending the deadline for filing equal pay lawsuits relate to Obama's vision for healthcare and education in the US?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","first-principles","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-43","original_id":"financial-43","prompt":"Summarize the main differences between consolidated accounts and country-by-country reporting, and how the latter can help expose tax haven activities.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","second-order","inversion"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-45","original_id":"financial-45","prompt":"How might the use of blockchain technology impact the relationship between governments and citizens, particularly in terms of data privacy and security?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","inversion"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-47","original_id":"financial-47","prompt":"What is the significance of Safaricom's investment of $14 million per year to nearly triple the size of its agent network, and how has it contributed to the success of M-Pesa?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["leverage-points","systems","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-50","original_id":"financial-50","prompt":"Can you provide an example scenario illustrating the mistake of holding onto a stock too long during its main upward trend in the context of medium-term investing?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["opportunity-cost","pre-mortem","regret-minimization"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-55","original_id":"financial-55","prompt":"What are the potential consequences of the NSA's actions on the public's trust in financial institutions and the government's ability to collect and use sensitive financial data for counterterrorism purposes?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","pre-mortem"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-56","original_id":"financial-56","prompt":"What factors have contributed to the decrease in deposit interest rates in the Chinese banking system?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-58","original_id":"financial-58","prompt":"Can you explain the concept of HR BPO and how it differs from traditional HR practices?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","jobs-to-be-done","opportunity-cost"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-61","original_id":"financial-61","prompt":"Write a brief analysis of the impact of protectionism on the global economy, using the example of General Electric's CEO Jeff Immelt's comments.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-64","original_id":"financial-64","prompt":"Summarize the key features of the House measure backed by Michael Madigan, and how it differs from John Cullerton's approach to pension reform.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-65","original_id":"financial-65","prompt":"How does the author, Charles Krauthammer, characterize President Obama's stance on taxation and spending, and what evidence does he provide to support his claim?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["steel-manning","debiasing"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-67","original_id":"financial-67","prompt":"Please paraphrase the section that discusses the role of supply-side structural reform in optimizing the industrial structure and enhancing industrial quality.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-68","original_id":"financial-68","prompt":"Can you summarize the main points of Jean Pisani-Ferry's report regarding the economic consequences of pricing resources that were previously free, in the context of the green transition?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-169","original_id":"financial-169","prompt":"Can you provide an example of a reform that could make health care or higher education more efficient, as mentioned in the article as a potential solution to address voters' concerns about the cost of living?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-170","original_id":"financial-170","prompt":"Can you summarize the views of David Rubenstein and Stephen Schwarzman on the state of the U.S. economy, and how they think it can be improved?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["steel-manning","second-order","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-171","original_id":"financial-171","prompt":"How has the People's Bank of China and the China Banking and Insurance Regulatory Commission's policy of excluding affordable housing loans from the real estate loan concentration management affected the banking industry's support for affordable rental housing development?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","feedback-loops"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-174","original_id":"financial-174","prompt":"In the context of the text, how important is international cooperation in managing the pandemic and its economic effects, and what are the implications of the \"immunity gap\" between high-income and low-income countries?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","feedback-loops"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-175","original_id":"financial-175","prompt":"What are the potential consequences of not properly managing financial risks for SMEs?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["pre-mortem","second-order","margin-of-safety"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-179","original_id":"financial-179","prompt":"How does the article suggest that raising the minimum wage could benefit low-income workers, and what public safety net programs might be affected as a result?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","feedback-loops"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-180","original_id":"financial-180","prompt":"Could you explain the relationship between bubbles, financial safety, wealth distribution, and investment decisions as discussed in the text?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-181","original_id":"financial-181","prompt":"How does the text describe the response of the US government and public to the COVID-19 pandemic?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-182","original_id":"financial-182","prompt":"The text states that the OECD is working with China on corporate governance of State-Owned Enterprises. Can you elaborate on the significance of this collaboration and how it can contribute to a level playing field in international trade and investment?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-183","original_id":"financial-183","prompt":"Write a short paragraph explaining the role of the compensation committee in overseeing executive compensation, as discussed in the speech.","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-184","original_id":"financial-184","prompt":"Please explain how the 'trade suspension' method works in the context of managing channel credit risks.","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-185","original_id":"financial-185","prompt":"Please explain the role of Renminbi NDFs in managing currency risks for multinational corporations operating in China, and how this market has evolved since its inception in 1996.","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-186","original_id":"financial-186","prompt":"According to the text, how many domestic banks are there in Kuwait, and what types of banks are they?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-187","original_id":"financial-187","prompt":"What were the implications of the March non-farm payroll figure revisions on the overall perception of the April report, and how did this affect expectations for the Federal Reserve's rate hike timeline?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-188","original_id":"financial-188","prompt":"The article criticizes bipartisan attempts at streamlining the U.S. public debt burden, calling them \"too toothless to make an impact.\" Can you provide an alternative solution or approach to addressing the national debt, and explain how it could be more effective?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-189","original_id":"financial-189","prompt":"Can you explain in more detail how the deficit reduction commission report's recommendations will affect the U.S. foreign policy priorities, particularly in regards to military presence in Europe, East Asia, and the Middle East?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-190","original_id":"financial-190","prompt":"As an experienced investor, I often advise clients on the importance of diversification in their investment portfolios. Can you explain the concept of diversification and how it can help mitigate risks in the financial market?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["probabilistic","margin-of-safety"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-191","original_id":"financial-191","prompt":"Write a brief explanation of why industrialized nations, including the United States, are concerned about China's inflation rate.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-192","original_id":"financial-192","prompt":"Could you provide a detailed explanation of the central adjustment fund (中央调剂金制度) and how it aims to address the discrepancies in pension fund balances across different provinces in China?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","feedback-loops"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-193","original_id":"financial-193","prompt":"Summarize the main points of Richard Koo's critique of Reinhart and Rogoff's ideas on debt-to-GDP ratios and economic growth, and how his concept of \"balance-sheet recessions\" differs from their approach.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-196","original_id":"financial-196","prompt":"The author argues that landscapes and state lines can have a surprising impact on cultural and economic assumptions. Can you think of another example, aside from Germany and the US, where geography has played a significant role in shaping a country's economy or business culture?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-197","original_id":"financial-197","prompt":"Do you think the article's conclusion that people should be aware of their subconscious motivations for accumulating wealth and focus on living a fulfilling life rather than chasing eternal life through material possessions is a viable solution to the problem it presents?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-198","original_id":"financial-198","prompt":"The text mentions that a significant number of insurance agents have left the industry. What are the implications of this for the insurance industry, and what does the text suggest should be done to address this issue?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-199","original_id":"financial-199","prompt":"What are the primary areas that fall under the jurisdiction of the provinces in the proposed agreement with the European Union, and how do they differ from the federal government's jurisdiction?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-200","original_id":"financial-200","prompt":"Could you summarize the strategies and policies China is implementing to ensure its economic stability and growth, as well as how they address both internal and external challenges?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-201","original_id":"financial-201","prompt":"How do experts think the trend of securities class actions will change in 2013, and what potential triggers might lead to an increase in filings?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-202","original_id":"financial-202","prompt":"Summarize the main concerns expressed by Qatar and the 13-member Group countries at the International Monetary Fund (IMF) meeting regarding the implications of normalizing monetary policies in Advanced Economies (AEs).","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-203","original_id":"financial-203","prompt":"How does CreditEase use technological innovations such as digital credit services and artificial intelligence in their investment management system?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-209","original_id":"financial-209","prompt":"Write a short paragraph explaining how Alan Greenspan's ideology of free market libertarianism influenced his decisions as chairman of the Federal Reserve, and how it contributed to the 2008 financial crisis.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-210","original_id":"financial-210","prompt":"How does the author think Angela Merkel's position as German chancellor will be affected by the elections in France, Greece, and Schleswig-Holstein, and what are the implications for the European Union?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-211","original_id":"financial-211","prompt":"How has the volume of trading changed recently, and what does this suggest about investor sentiment and market activity, particularly in the blue-chip and technology sectors?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["bayesian","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-212","original_id":"financial-212","prompt":"What is the estimated cost per year to effectively address global warming, according to Lester Brown, director of the Earth Policy Institute?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-213","original_id":"financial-213","prompt":"How does Klein's concept of the entrepreneur as a judgmental decision-maker differ from the traditional view of entrepreneurship as business start-ups?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-214","original_id":"financial-214","prompt":"What are some reasons why the job market has been slow to recover, according to the text, and how do these factors affect consumer spending and economic growth?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-215","original_id":"financial-215","prompt":"According to the passage, how will the adjustment of the employee contribution base lower the social security contribution base?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-216","original_id":"financial-216","prompt":"What are the potential risks associated with different types of economic systems in various countries?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-217","original_id":"financial-217","prompt":"Write a brief note on the significance of Diwali festival in the context of gold sales in India, highlighting its effect on physical gold sales.","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-218","original_id":"financial-218","prompt":"Can you summarize the differences in the economic outlooks of Brian Wesbury, Nigel Gault, and David Levy, and how these differences affect their predictions for the unemployment rate and overall economy?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-219","original_id":"financial-219","prompt":"According to the article, what are some of the key reasons why traditional pension plans have been terminated by many companies, and how have employers shifted the risks of retirement saving onto their workers?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-221","original_id":"financial-221","prompt":"Write a brief paragraph explaining the role of the FDIC as a receiver in the event of a bank failure, and how it aims to salvage assets for the federal insurance fund.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-222","original_id":"financial-222","prompt":"How do the designers and engravers at the Bureau of Engraving and Printing balance artistic expression with the need for security features and anticounterfeiting measures in their designs?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["triz","inversion"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-224","original_id":"financial-224","prompt":"Discuss the potential benefits for China and the global economy if China were to join the CPTPP.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-226","original_id":"financial-226","prompt":"The article highlights the integration of traditional and new economic sectors in China. Could you explain how this integration is affecting the classification of stocks as growth or value, and provide examples from the text?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["map-territory","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-228","original_id":"financial-228","prompt":"How can fundamental analysis be used to assess the impact of an economic crisis on stock and bond markets?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-229","original_id":"financial-229","prompt":"Can you summarize the main findings of the study in one sentence, and what implications do these findings have for our understanding of intergenerational income correlation?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","feedback-loops"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-230","original_id":"financial-230","prompt":"What is the significance of the widening gap between rich and poor, as indicated by the 6% increase in income for the top 1% of wage earners, while income at the bottom 40% of earners remained basically unchanged?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","leverage-points"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-231","original_id":"financial-231","prompt":"How did the S&L crisis of the 1980s inform regulatory changes and oversight mechanisms in the subsequent decades, and what lessons can be drawn from this experience for contemporary financial institutions?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","pre-mortem","inversion"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-335","original_id":"financial-335","prompt":"Could you provide more details on the German government's rescue measures and how they are affecting domestic demand and inflation rates?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","feedback-loops","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-338","original_id":"financial-338","prompt":"Write a short paragraph comparing the European Union's budget to the budget of one of its member states, such as the UK, highlighting the differences in size and purpose.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-340","original_id":"financial-340","prompt":"Can you explain the difference between the \"opt-in\" and \"opt-out\" provisions for disclosure of health and financial information under GLB?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","inversion","map-territory"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-341","original_id":"financial-341","prompt":"Write a short paragraph explaining how the depreciation of Asian currencies, including the yen, can benefit products from Asia in terms of their competitiveness.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-344","original_id":"financial-344","prompt":"What are the implications of the yuan becoming a \"floating\" currency, and what steps does China need to take to achieve this goal?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-345","original_id":"financial-345","prompt":"Can you elaborate on the incentives that the government can use to encourage companies to meet the cybersecurity standards, as mentioned in the article?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order","inversion"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-346","original_id":"financial-346","prompt":"Imagine you are a central banker participating in one of the secret talks mentioned in the article. Write a brief statement outlining your stance on the balance between stimulating economic growth and controlling inflationary pressures.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","pre-mortem"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-347","original_id":"financial-347","prompt":"How might the current economic situation affect the perception and use of gold as a tool against inflation?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-348","original_id":"financial-348","prompt":"What are some potential risks and opportunities that digital currencies present for traders like yourself?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["pre-mortem","second-order","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-349","original_id":"financial-349","prompt":"Write a brief statement (around 50 words) explaining how the Federal Reserve's decision to keep short-term interest rates near zero is expected to help blunt the economic damage from the spending cuts.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-350","original_id":"financial-350","prompt":"What are the implications of the ECB's focus on \"restoring confidence of investors\" and \"underpinning the standing of Italy's sovereign signature\" through these reforms, rather than addressing monetary policy, and how does this reflect the ECB's priorities in addressing the European sovereign debt crisis?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-351","original_id":"financial-351","prompt":"The article mentions that the economy is growing at a rate of 2.1 percent in the third quarter. What are the main factors contributing to this slow growth, and how does it impact consumer spending?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-355","original_id":"financial-355","prompt":"The article discusses several policy decisions that China has made in order to support its economic development. Could you write a brief analysis of how these policies, such as the decision to strengthen the domestic market and improve infrastructure, are likely to affect China's economic growth in the future?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-362","original_id":"financial-362","prompt":"The text mentions that the US fiscal policy and political developments in Germany and Italy could influence the euro's performance in the first half of 2018. Can you outline the potential scenarios and their impacts on the euro's exchange rate against the US dollar?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","pre-mortem"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-372","original_id":"financial-372","prompt":"Could you explain how the lowering of market entry barriers for private enterprises can contribute to the expansion of private economic sectors and enhance their role in public infrastructure projects?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-373","original_id":"financial-373","prompt":"Can you explain in simpler terms why the GDP metric is no longer a good measure of general well-being, according to Nobel Prize-winning economist Joseph Stiglitz?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-375","original_id":"financial-375","prompt":"Write a brief summary of the key features of the policy plans presented by each of the participants, highlighting any common themes or areas of focus.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-377","original_id":"financial-377","prompt":"Write a short paragraph explaining how the removal of interprovincial barriers could benefit Canadian consumers, using an example from the article (e.g. wide-load standards on highways).","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-379","original_id":"financial-379","prompt":"Can you explain the concept of gold leasing and how it works in the context of central banks and bullion banks?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-381","original_id":"financial-381","prompt":"How do the comments from readers, such as George A. Crackuh, respond to or challenge the author's arguments, and what alternative solutions do they propose?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["steel-manning","socratic"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-383","original_id":"financial-383","prompt":"How does this policy reflect the government's response to China's changing demographic trends?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","first-principles","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-386","original_id":"financial-386","prompt":"The article mentions that \"high-income people actually receive much larger benefits in dollar terms from the so-called 'middle-class tax cuts' than middle-class people do.\" Can you provide an example or scenario to illustrate this point?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-388","original_id":"financial-388","prompt":"Write a short paragraph explaining the concept of \"redlining\" and its relation to the banking industry before the passage of the Community Reinvestment Act.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-389","original_id":"financial-389","prompt":"What are the potential implications of the $1 trillion platinum coin proposal on the economy, and how does Philip Diehl address concerns about negative macroeconomic effects in his email?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","inversion","thought-experiment"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-390","original_id":"financial-390","prompt":"What are some potential pitfalls that finders and practitioners should be wary of when drafting finder's fee agreements?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["pre-mortem","inversion","margin-of-safety"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-391","original_id":"financial-391","prompt":"How does the Fed's bond-buying program aim to make home buying more affordable, and what is the average rate on a 30-year fixed mortgage mentioned in the article?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-393","original_id":"financial-393","prompt":"Imagine you are a member of the Lehigh CSB team, write a journal entry reflecting on your experience traveling to Zambia and working on this project, highlighting the personal and professional lessons you learned from this experience.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["systems","debiasing","jobs-to-be-done"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-400","original_id":"financial-400","prompt":"How does Putin's 13% flat tax for personal income and 20% rate for corporate taxes compare to other countries, and what are the potential economic benefits of such a tax structure?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems","opportunity-cost"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-509","original_id":"financial-509","prompt":"Assuming the Fed's stress tests are not stressful enough, what measures could be taken to ensure that banks are adequately prepared to withstand a severe economic shock, and what role should government play in this process?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["pre-mortem","margin-of-safety","second-order"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-510","original_id":"financial-510","prompt":"What are the potential implications of the corporate rate reduction on companies' deferred tax assets or liabilities, and how should companies prepare for this change?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","first-principles"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-513","original_id":"financial-513","prompt":"What are the key features of the companies that are part of the North Exchange (北交所) that make it necessary to develop a specific index for this market?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["first-principles","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-520","original_id":"financial-520","prompt":"Write a short paragraph explaining how the expiration of federal tax cuts would help bring in revenue to state coffers, and provide an example of a state that would benefit from this scenario.","source":"financial","source_file":"external/financial.jsonl","skill_fit":["second-order","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-522","original_id":"financial-522","prompt":"As a financial technology engineer, what are some best practices for developing secure and efficient financial systems and applications?","source":"financial","source_file":"external/financial.jsonl","skill_fit":["inversion","margin-of-safety","systems"],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-524","original_id":"financial-524","prompt":"What were the industries most affected by the recession, according to the report, and how did this impact men's employment?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-525","original_id":"financial-525","prompt":"Write a short paragraph explaining the historical reference to the 1937 recession mentioned in the text, and how it relates to the current economic situation.","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-526","original_id":"financial-526","prompt":"How does the author propose to solve the issue of economic stagnation and low growth in China?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-527","original_id":"financial-527","prompt":"The author argues that a good economist is likely to find themselves in conflict with both left-wing and right-wing orthodoxies. Can you provide an example of how this might play out in a real-world policy debate?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-528","original_id":"financial-528","prompt":"What policy measures or initiatives could be implemented to address the issue of long-term unemployment and encourage employers to hire individuals who have been out of work for more than six months?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-529","original_id":"financial-529","prompt":"Write a short paragraph explaining why the author believes that mitigating the fiscal consequences of demographic change cannot be achieved through increasing immigration alone.","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-530","original_id":"financial-530","prompt":"Write a brief summary of the history of the GATT, highlighting its formation, objectives, and major milestones, including the Uruguay Round.","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-531","original_id":"financial-531","prompt":"How does the article describe the effect of the perpetual drama over federal spending on the U.S. economic recovery, and what does Scott R. Baker, an economics professor, say about this phenomenon?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-532","original_id":"financial-532","prompt":"Based on the text, what are the concerns raised by Democrats regarding the proposed pension reforms, and how do these concerns relate to the estimated $42.4 billion cost increase?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-533","original_id":"financial-533","prompt":"The text mentions the impact of reduced land sales revenue on local government finances. Could you explain how this has affected the balance of the government's fund budget account and the measures taken to counteract this issue?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-534","original_id":"financial-534","prompt":"Summarize the case of Goldman Sachs in 2010, where the Securities and Exchange Commission (SEC) barred them from writing off any costs against their taxes in a $550 million settlement. How does this case differ from the current mortgage settlement?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-535","original_id":"financial-535","prompt":"Can you explain the concept of \"need-to-know\" and \"responsibility-to-share\" in the context of intelligence agencies, and how it is being implemented in the CIA's Intellipedia project?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-536","original_id":"financial-536","prompt":"Can you summarize the stance of Pan Gongsheng, the deputy governor of the People's Bank of China, on the development of the OTC derivatives market in China?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-537","original_id":"financial-537","prompt":"What measures is the Hong Kong Exchanges and Clearing Limited (港交所) planning to undertake to stimulate its business and what is the expected impact of these measures on its cash equity daily trading volume (ADT)?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-538","original_id":"financial-538","prompt":"What was the GDP growth rate of China in the third quarter of the year mentioned in the text, and how did it compare to the growth rate for the first three quarters combined?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"financial-539","original_id":"financial-539","prompt":"Can you summarize the key findings of the Census Bureau's study on poverty for 2010, as mentioned in the article?","source":"financial","source_file":"external/financial.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"nearMiss","target":false,"mode":"pairwise","license":"Apache-2.0 (research/non-commercial)","decision_instruction":"Analyze the problem. Return ONLY valid JSON: {\"analysis\": \"your analysis\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-8","original_id":"glm-distractor-8","prompt":"How can I convert all the lowercase letters in a string to uppercase using Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-11","original_id":"glm-distractor-11","prompt":"**This Kata is intended as a small challenge for my students** All Star Code Challenge #18 Create a function called that accepts 2 string arguments and returns an integer of the count of occurrences the 2nd argument is found in the first one. If no occurrences can be found, a count of 0 should be returned. Notes: * The first argument can be an empty string * The second string argument will always be of length 1 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-12","original_id":"glm-distractor-12","prompt":"Implement quick sort to sort the given array of integers. Write corresponding code in Python. [9, 5, 8, 1, 3, 6, 7]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-13","original_id":"glm-distractor-13","prompt":"Zoe wants to go on the field trip to Washington DC with her middle school this spring and the cost is $485. Her grandma gave her $250 toward her fees and she must earn the rest by selling candy bars. She makes $1.25 for every candy bar she sells. How many candy bars does Zoe need to sell to earn the money for the trip?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-16","original_id":"glm-distractor-16","prompt":"Can you also tell me the date and time of the Indiana Comic Convention?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-17","original_id":"glm-distractor-17","prompt":"Create an algorithm to rotate an array by one element. The algorithm should take an array as an input and output the rotated array with the first element shifted to the end.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-18","original_id":"glm-distractor-18","prompt":"Generate a correct Python program for plotting bar chart for the following data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-19","original_id":"glm-distractor-19","prompt":"Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely. * Inversion: change the state of each bit to the opposite state * Logical left shift: shift left by 1 * Logical right shift: shift right by 1 Constraints * $0 \\leq x \\leq 2^{32} - 1$ Input The input is given in the following format. $x$ Output Print the given bits, results of inversion, left shift and right shift in a line respectively. Examples Input 8 Output 00000000000000000000000000001000 11111111111111111111111111110111 00000000000000000000000000010000 00000000000000000000000000000100 Input 13 Output 00000000000000000000000000001101 11111111111111111111111111110010 00000000000000000000000000011010 00000000000000000000000000000110 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-21","original_id":"glm-distractor-21","prompt":"Create a Python program that fetches the user's current time and sets a reminder after 30 minutes.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-22","original_id":"glm-distractor-22","prompt":"Could you delineate a methodology, utilising the Python programming language, to extract the middle value, labeled as the median, from an unorganized collection of integral numbers? Numbers = [12, 7, 21, 3, 9]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-23","original_id":"glm-distractor-23","prompt":"Create a Python 3 class for a directory list widget using Qt that includes a grid layout with a directory list view and buttons to add or remove directories. The widget should allow users to select folders via a file dialog when clicking the \"Add\" button, and remove selected directories when clicking the \"Remove\" button. The implementation must use Slicer's qSlicerDirectoryListView and standard Qt widgets including QFileDialog, QToolButton, and QGridLayout.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-42","original_id":"glm-distractor-42","prompt":"Write a Python3 function that returns the Cargo home directory path by first checking the CARGO_HOME environment variable. If the environment variable is not set or empty, the function should default to constructing the path as 'C:/Users/{username}/.cargo' using the current user's username. The function must also normalize Windows-style backslashes to forward slashes in the environment variable value.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-46","original_id":"glm-distractor-46","prompt":"Create a Python 3 script that uses the clustergrammer library to load a matrix from stdin, perform optional filtering and normalization steps (such as sum-based filtering, z-score normalization, top-N selection, and threshold filtering), generate a hierarchical clustering visualization using cosine distance, and then output the resulting network data in JSON format for frontend visualization. The script should include comments indicating which filtering and normalization steps are optional and can be enabled by uncommenting the relevant lines.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-48","original_id":"glm-distractor-48","prompt":"Solve the inequality: 8x - 9 < 2. Express the solution in interval notation.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-50","original_id":"glm-distractor-50","prompt":"A toy store manager received a large order of Mr. Slinkums just in time for the holidays. The manager places $20\\%$ of them on the shelves, leaving the other 120 Mr. Slinkums in storage. How many Mr. Slinkums were in this order?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-51","original_id":"glm-distractor-51","prompt":"Write a python function to check if a given file is in NOAA ACE format by verifying that the first line starts with ':' and the third line contains 'NOAA'. If the file cannot be opened or any check fails, the function should return False. Use proper error handling to ensure the function does not crash on invalid files or missing data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-69","original_id":"glm-distractor-69","prompt":"Write a program that allows users to search for phone numbers by name in a phone book. Implement the phone book using a custom data structure that you create. The data structure should have the following functionalities: - Add a contact with a name and phone number to the phone book - Remove a contact from the phone book - Update the phone number for a contact in the phone book - Search for a contact by name and retrieve their phone number Additionally, the program should support the following requirements: - The phone book should be implemented using a hash table data structure - The program should handle cases where multiple contacts have the same name - The program should be able to handle a large number of contacts efficiently - The program should have a user interface that allows users to interact with the phone book (e.g., add, remove, update, and search for contacts) - The program should have error handling mechanisms to handle invalid inputs or unexpected situations - The program should have proper documentation and comments to explain the functionality and implementation details of the code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-74","original_id":"glm-distractor-74","prompt":"Produce a program using Python that visualizes the given function.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-81","original_id":"glm-distractor-81","prompt":"How can I generate a regular expression that matches any two or more consecutive numbers?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-83","original_id":"glm-distractor-83","prompt":"Write a python 3 script that performs simple linear regression analysis on gas expenditure data using scikit-learn. The script should load data from \"data1.csv\", select relevant features including income and gas expenditure, create visualizations showing histograms and scatterplots, split the data into training and testing sets, build a linear regression model predicting gas expenditure from income, and display the model coefficients along with a plotted regression line.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-84","original_id":"glm-distractor-84","prompt":"Write a python 3 Django management command that classifies unassigned faces using ensemble predictions from two SVM models (small and big) with probability averaging, and prints classification results for the first 1000 unassigned faces, including predicted labels, probabilities, and corresponding person objects from the database.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-196","original_id":"glm-distractor-196","prompt":"Create a python 3 script that demonstrates two different plotting APIs using PyQt4: a procedural approach with PlotWidget and an object-oriented approach with a custom Plot class. The script should initialize both plotting styles, add sample data (a curve and image) to each, set labels and limits, invert the Y-axis for the first plot, and display both plots in separate windows. Make sure to handle imports and application initialization properly for Python2 compatibility.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-199","original_id":"glm-distractor-199","prompt":"Write a Python 3 function that tests whether the neohub class can be properly instantiated, ensuring the class initialization works correctly without any errors. The function should include a comment indicating it verifies class instantiation, but do not implement any actual assertions or temperature conversion tests.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-200","original_id":"glm-distractor-200","prompt":"Please answer the following question: - Gather the ingredients for the cake - Mix the flour, sugar, egg, and water to make batter - Pour the mixture into a cake pan - Place the cake in the oven to cook - Take the cake out when it is cooked through - Let the cake cool What might be the last step of the process? A:","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-201","original_id":"glm-distractor-201","prompt":"Can you provide a Python code snippet to convert XML to JSON?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-203","original_id":"glm-distractor-203","prompt":"Write a Python3 script that downloads and unpacks tracking results from Google Drive for various trackers like PyTracking-based and external trackers. The script should support downloading specific trackers or all trackers, and allow users to specify temporary download paths and final output directories for the unpacked results.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-214","original_id":"glm-distractor-214","prompt":"Create a python 3 program using the turtle module that draws a series of nested squares rotating at different angles. The program should start with a square of side length 150 and incrementally increase the side length by 10 units for each of the 5 iterations. Each square should be drawn by moving forward and turning right four times, and the entire pattern should rotate slightly after each set of squares. Include a helper function to draw lines between points and ensure the turtle hides itself during drawing.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-216","original_id":"glm-distractor-216","prompt":"How can I generate a set of random numbers without any duplicates in Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-224","original_id":"glm-distractor-224","prompt":"Create a Python script that sets the value of a variable from the command-line, but the value must be encrypted using a custom encryption algorithm before being assigned to the variable. Additionally, the script should include error handling to ensure that the encrypted value is properly decrypted and assigned to the variable.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-225","original_id":"glm-distractor-225","prompt":"A satellite orbits Earth at an altitude of 1501 km. Calculate its orbital velocity and period. (Earth mass = 5.97 × 10²⁴ kg, Earth radius = 6371 km)","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-227","original_id":"glm-distractor-227","prompt":"Compute the quotient of 17708 and 9880. Show your work.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-236","original_id":"glm-distractor-236","prompt":"def division_while_loop(dividend, divisor): \"\"\" This exercise focuses on division using a while loop. Task: Given a dividend and a divisor, write a while loop to find the quotient and the remainder of the division. Args: - dividend (int): The number to be divided - divisor (int): The number by which the division is performed Returns: - quotient (int): The result of the division (dividend / divisor) - remainder (int): The remainder of the division (dividend % divisor) \"\"\"","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-241","original_id":"glm-distractor-241","prompt":"Create a python 3 class called `BalanceSheet` that takes a `Portfolio` object (with default to a new `Portfolio()` instance) and provides methods to generate structured data representations. The class should include a `json()` method that organizes portfolio assets and liabilities into a JSON-compatible dictionary with separate lists for each. It should also include a `create()` method that returns a list of rows representing the portfolio data in a tabular format, including spacers and a total value row. Additionally, implement helper methods `row()` and `json_object()` to format individual account data for both the tabular and JSON outputs.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-249","original_id":"glm-distractor-249","prompt":"Write a python function to find the frequency of each character in a given string and return a dictionary with characters as keys and their frequencies as values. Solve the problem starting with the provided function header. Function header: ``` def get_char_frequency(string): ``` Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-261","original_id":"glm-distractor-261","prompt":"Create a function to check if an array contains any duplicate elements, while also ensuring that the array elements are sorted in ascending order and that the length of the array is less than or equal to 100. Additionally, the function should check if the array contains any negative integers, and if so, it should return False. The function should return a boolean value indicating the presence of duplicate elements. Example: Input: [1, 2, 3, 3, 4, 5, 5] Output: True","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-262","original_id":"glm-distractor-262","prompt":"You are working on an API for a space-themed game and need to create a class that handles the case when a specific planet for a character is not found. You need to define a class called GetCharactersCharacterIdPlanetsPlanetIdNotFound with the following attributes and methods: Attributes: - error: a string to store the error message Methods: - __init__: a constructor method to initialize the error attribute - to_dict: a method to return the model properties as a dictionary - to_str: a method to return the string representation of the model - __repr__: a method for printing and pretty-printing the object - __eq__: a method to check if two objects are equal - __ne__: a method to check if two objects are not equal You need to implement the class and its methods as described above.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-264","original_id":"glm-distractor-264","prompt":"How can I categorize data into two bins, with the labels \"category A\" and \"category B\"?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-267","original_id":"glm-distractor-267","prompt":"Given points A(14, -8) and B(-1, -13), find the slope of the line passing through these two points.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-268","original_id":"glm-distractor-268","prompt":"Create a python 3 class named Objects that initializes with several instance attributes including cloud set to None, score set to 0, score_type set to 'CNNSeg', type set to None, and type_probs set to None.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-269","original_id":"glm-distractor-269","prompt":"What is the code to construct a Recurrent Neural Network (RNN) using TensorFlow with an input size of 50 values and an output size of 10 values?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-270","original_id":"glm-distractor-270","prompt":"Create a python 3 class called CompileGLSL that extends Module for compiling GLSL shader files into SPIR-V format using the glslangValidator tool. The class should define required tools, specify output file names with .spv extension, and implement a process method that runs the validator with appropriate stage flags (-S vert for vertex shaders and -S frag for fragment shaders) while handling directory creation and returning the subprocess return code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-271","original_id":"glm-distractor-271","prompt":"Evaluate the definite integral of f(x) = sin(1x) from 1 to 4.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-274","original_id":"glm-distractor-274","prompt":"Calculate the pH of a 0.545 M solution of HCl. Show your calculation step by step.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-275","original_id":"glm-distractor-275","prompt":"Write a Python 3 program that prompts the user to enter three integer numbers and then calculates and displays their sum. The program should use input() to read the numbers from the user and print the result in the format \"Sum = [value]\".","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Quantitative/uncertainty","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
diff --git a/evals/datasets/calibrated/quantitative-uncertainty.manifest.json b/evals/datasets/calibrated/quantitative-uncertainty.manifest.json
new file mode 100644
index 0000000..287756c
--- /dev/null
+++ b/evals/datasets/calibrated/quantitative-uncertainty.manifest.json
@@ -0,0 +1,60 @@
+{
+ "family": "Quantitative/uncertainty",
+ "family_key": "quantitative-uncertainty",
+ "skills": [
+ "bayesian",
+ "debiasing",
+ "fermi-estimation",
+ "margin-of-safety",
+ "probabilistic"
+ ],
+ "value_surface": "objective correctness",
+ "source": "Combined from 8 source files. external: bayesian-authored, debias-authored, fermi, strategyqa, forecasting, financial, glm-distractor; authored: margin-of-safety-provision",
+ "leakage": "Multiple sources with varying leakage profiles: (1) Bayesian-authored and debias-authored are locally authored — zero external leakage. (2) Fermi estimation problems (jeggers/fermi) are CC-BY-4.0 licensed estimation problems; the numeric answers may appear in training data but the estimation process is the measured skill. (3) StrategyQA (ChilleD/StrategyQA) is Wikipedia-derived with Apache-2.0 license; implicit reasoning chains may be in training data. (4) Forecasting questions from a 2023-2024 forecasting dataset; models may have seen similar questions. (5) Financial dataset — domain-specific financial reasoning. Overall leakage risk: low-to-moderate depending on the source.\n\nSource breakdown: 6 external dataset(s) with potential training-data leakage; 1 authored dataset(s) with zero external leakage; ",
+ "label": {
+ "definition": "Objective correctness on quantitative reasoning, probability calibration, and numerical estimation tasks.",
+ "values": {
+ "true": "Correct answer (matches answer_idx or within tolerance of answer_num)",
+ "false": "Incorrect answer"
+ },
+ "eval_mode": "ground_truth",
+ "ground_truth_fields": [
+ "answer_idx",
+ "answer_num",
+ "answer"
+ ]
+ },
+ "calibration": {
+ "baseline": 0.455,
+ "baseline_estimated": true,
+ "baseline_note": "Estimated from label distribution (53% true). Balanced distribution suggests items are in the target difficulty band. Actual baseline must be measured by calibration runner.",
+ "band": [
+ 0.4,
+ 0.7
+ ],
+ "status": "pending_calibration",
+ "instructions": "Run EVAL_RUN=calib node evals/run-calibration.js evals/datasets/calibrated/<family>-candidate-pool.jsonl to populate real calibration stats."
+ },
+ "item_counts": {
+ "total": 505,
+ "target": 340,
+ "near_miss": 121,
+ "distractor": 44,
+ "ambiguous": 0,
+ "decisive": 505
+ },
+ "item_class_definitions": {
+ "target": "Items that directly measure the family value surface — in-domain, skill-relevant items where the skill is expected to help.",
+ "near_miss": "Items that are similar to the family domain but not an exact match. Useful for calibration but may not benefit from the skill.",
+ "distractor": "Items that are clearly off-target (target=false). Used to measure false-positive rate and specificity.",
+ "ambiguous": "Items whose relevance to the family is unclear. Excluded from decisive splits."
+ },
+ "decisive_split_rules": {
+ "min_target": 1,
+ "min_distractor": 1,
+ "max_ambiguous": 0,
+ "satisfied": true
+ },
+ "created": "2026-06-06",
+ "frozen": false
+}
\ No newline at end of file
diff --git a/evals/datasets/calibrated/routing-abstention-candidate-pool.jsonl b/evals/datasets/calibrated/routing-abstention-candidate-pool.jsonl
new file mode 100644
index 0000000..ab27486
--- /dev/null
+++ b/evals/datasets/calibrated/routing-abstention-candidate-pool.jsonl
@@ -0,0 +1,174 @@
+{"id":"selfaware-positive-0","original_id":"selfaware-positive-0","prompt":"What form of entertainment are 'Slow Poke' and 'You Belong to Me'?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-0","original_id":"selfaware-negative-0","prompt":"Who decided to put and use the letter ‘s’ in the word ‘lisp’?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-1","original_id":"selfaware-positive-1","prompt":"A person's identity is defined as the totality of what?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-1","original_id":"selfaware-negative-1","prompt":"Would you rather lose the ability to use GPS for the rest of your life or lose the ability to use a credit card?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-2","original_id":"selfaware-positive-2","prompt":"Which breed of dog is bigger, Japanese Terrier or Cane Corso?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-2","original_id":"selfaware-negative-2","prompt":"Is the big rip related to the big bang only?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-3","original_id":"selfaware-positive-3","prompt":"Which ‘ology’ is the search or study of animals whose existence has not been proven, such as the Yeti or Loch Ness Monster?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-3","original_id":"selfaware-negative-3","prompt":"Was there a beforelife before this lifetime?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-4","original_id":"selfaware-positive-4","prompt":"How many many cheetah's are left in the wild?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-4","original_id":"selfaware-negative-4","prompt":"Why February has only 28 days when other months have 30 or 31 days? Can’t we add a few more days to the month of February by taking some days from other days?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-5","original_id":"selfaware-positive-5","prompt":"In Henry Olerich's, \"A Cityless and Countryless World\" what planet do the aliens come from?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-5","original_id":"selfaware-negative-5","prompt":"Would you rather get cheated on and know about it or not get cheated on and always be suspicious?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-6","original_id":"selfaware-positive-6","prompt":"What is the basis of capitalization standards for the sentence-style capitalization?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-6","original_id":"selfaware-negative-6","prompt":"Why does anything exist? In the beginning there was nothing. How did something come from nothing?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-7","original_id":"selfaware-positive-7","prompt":"Along with quantum physics generally, what scientific doctrine caused some physicists to embrace idealism?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-7","original_id":"selfaware-negative-7","prompt":"Would you rather sing everything you say or dance every time you walk?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-8","original_id":"selfaware-positive-8","prompt":"Where would you spend stotinki?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-8","original_id":"selfaware-negative-8","prompt":"Is it right for humans to genetically engineer other animals and plants and themselves or should we let nature take its cause?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-9","original_id":"selfaware-positive-9","prompt":"It is believed that animals evolved from what?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-9","original_id":"selfaware-negative-9","prompt":"If we could travel through space and time, what would we do with that power?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-10","original_id":"selfaware-positive-10","prompt":"A ladder-back is a type of what?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-10","original_id":"selfaware-negative-10","prompt":"Is the Higgs-Boson machine a good or bad thing for our universe?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-11","original_id":"selfaware-positive-11","prompt":"What cancer can be caused by too much time in the sun?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-11","original_id":"selfaware-negative-11","prompt":"What is at the bottom of the ocean?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-12","original_id":"selfaware-positive-12","prompt":"What does law enforcement in some countries use to profile suspects?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-12","original_id":"selfaware-negative-12","prompt":"Is the Earth alive, as in a living, breathing organism?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-13","original_id":"selfaware-positive-13","prompt":"What is the life expectancy in Namibia?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-13","original_id":"selfaware-negative-13","prompt":"If a kid becomes a parent, who becomes the kid then?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-14","original_id":"selfaware-positive-14","prompt":"Barbarossa and Ambush!, are which type of game?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-14","original_id":"selfaware-negative-14","prompt":"Would you rather get stuck in an elevator with your ex or with your partner and their ex?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-15","original_id":"selfaware-positive-15","prompt":"What brand of semi-sweet chocolate morsels traditionally includes a recipe for Toll House cookies on the package?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-15","original_id":"selfaware-negative-15","prompt":"How do you know that you are not hallucinating?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-16","original_id":"selfaware-positive-16","prompt":"What was the first monotheistic religion?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-16","original_id":"selfaware-negative-16","prompt":"Would you rather know all of your S.O. exes personally or never learn anything about them at all?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-17","original_id":"selfaware-positive-17","prompt":"Between Scratchcard and D.C. Lottery who contains more games like Powerball, Mega Millions, etc.?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-17","original_id":"selfaware-negative-17","prompt":"If you had 6 carnations and 19 roses, how many vases would you need to hold the flowers?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-18","original_id":"selfaware-positive-18","prompt":"How many sides of a disc commonly held a recording?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-18","original_id":"selfaware-negative-18","prompt":"Would you rather always be dressed a little too cold or a little too warm for the weather (no taking off layers!)?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-19","original_id":"selfaware-positive-19","prompt":"Living in association with ants is called what?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-19","original_id":"selfaware-negative-19","prompt":"What would be the first thing an intelligent creature on another planet would say when they saw us?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-20","original_id":"selfaware-positive-20","prompt":"What may happen with intact body parts if there is continuous pain for a long period?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-20","original_id":"selfaware-negative-20","prompt":"Nancy's class is going on a field trip to the zoo. If each van can hold 5 people and there are many students and 3 adults going, how many vans will they need?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-21","original_id":"selfaware-positive-21","prompt":"What process can sometimes seem arbitrary today?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-21","original_id":"selfaware-negative-21","prompt":"What is the driving force behind life and existence?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-22","original_id":"selfaware-positive-22","prompt":"Which room has The Ballroom replaced in terms of both use and importance?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-22","original_id":"selfaware-negative-22","prompt":"Would you rather be shot into space or explore the deepest depths of the sea?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-23","original_id":"selfaware-positive-23","prompt":"what did he do for $2 a day?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-23","original_id":"selfaware-negative-23","prompt":"How do you know you’re not crazy and just hallucinating your whole life?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-24","original_id":"selfaware-positive-24","prompt":"What does the capabilities approach look at poverty as a form of?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-24","original_id":"selfaware-negative-24","prompt":"Oliver was organizing his baseball cards. If he had 2 new cards and 10 old cards to put in the binder, how many pages would he use?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-25","original_id":"selfaware-positive-25","prompt":"How many species of mammals do not have a live birth?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-25","original_id":"selfaware-negative-25","prompt":"Can God create a stone that is too heavy for even him to lift?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-26","original_id":"selfaware-positive-26","prompt":"Would you consider aesthetic elements alone in architectural lighting design?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-26","original_id":"selfaware-negative-26","prompt":"Should we develop ways to control emotions through technology?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-27","original_id":"selfaware-positive-27","prompt":"How many species have ever lived on earth?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-27","original_id":"selfaware-negative-27","prompt":"Why do we love?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-28","original_id":"selfaware-positive-28","prompt":"What is God's role in the creation of the world?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-28","original_id":"selfaware-negative-28","prompt":"Olivia uploaded so many pictures from her phone and 35 from her camera to facebook. If she sorted the pics into 8 different albums with the same amount of pics in each album, how many pictures were in each of the albums?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-29","original_id":"selfaware-positive-29","prompt":"Who was formed from the dust by God, then given the breath of life, to become the progenitor of the human race?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-29","original_id":"selfaware-negative-29","prompt":"If a vacuum cleaner is said to suck, is it a good product?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-30","original_id":"selfaware-positive-30","prompt":"Where were the ashes sent?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-30","original_id":"selfaware-negative-30","prompt":"If you took a ship and replaced all of its parts until none of the original parts are intact anymore, is it the same ship or a completely different ship?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-31","original_id":"selfaware-positive-31","prompt":"Which colors are combined to make all other colors?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-31","original_id":"selfaware-negative-31","prompt":"Do dentists go to other dentists or do they treat their own dental care problems?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-32","original_id":"selfaware-positive-32","prompt":"What type of soup is a consommé or broth garnished with long thin strips of vegetables?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-32","original_id":"selfaware-negative-32","prompt":"How do we choose to define ourselves and our lives, individually and collectively, given that there’s not one fixed truth or reality?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-33","original_id":"selfaware-positive-33","prompt":"What is the main thing that we experience?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-33","original_id":"selfaware-negative-33","prompt":"How long will it take for Chicago to average 50,000 drones flying overhead on a daily basis?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-positive-34","original_id":"selfaware-positive-34","prompt":"What is a terrifying and disturbing dream?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":true,"label":true,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"selfaware-negative-34","original_id":"selfaware-negative-34","prompt":"Would you rather get a face tattoo of something of your choosing or a tattoo in a discreet area chosen by someone else?","source":"selfaware","source_file":"external/selfaware.jsonl","skill_fit":["circle-of-competence"],"family":"Routing/abstention","type":"target","target":true,"answerable":false,"label":false,"mode":"abstention","license":"CC-BY-SA-4.0","decision_instruction":"Determine if this question is answerable with verifiable information. Return ONLY valid JSON: {\"answerable\": true/false}"}
+{"id":"socratic-01","original_id":"socratic-01","prompt":"Make the dashboard faster. Users are complaining about load times.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-02","original_id":"socratic-02","prompt":"Migrate our database. We need it done before the launch.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-03","original_id":"socratic-03","prompt":"Add auth to the API. We need to lock it down.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-04","original_id":"socratic-04","prompt":"Refactor the payment module. It's too messy.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-05","original_id":"socratic-05","prompt":"Set up monitoring for our services. We keep getting surprised by outages.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-06","original_id":"socratic-06","prompt":"Write tests for the checkout flow.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-07","original_id":"socratic-07","prompt":"Deploy the new feature to production. Make sure it goes smoothly.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-08","original_id":"socratic-08","prompt":"Add a search feature to the app. Customers have been requesting it.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-09","original_id":"socratic-09","prompt":"Fix the performance issues on mobile. The app feels sluggish.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-10","original_id":"socratic-10","prompt":"Integrate with the third-party analytics provider. We need better data.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-11","original_id":"socratic-11","prompt":"Improve error handling across the codebase. We want cleaner error messages.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-12","original_id":"socratic-12","prompt":"Build an admin panel. We need to manage users and settings from somewhere.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-13","original_id":"socratic-13","prompt":"Update our CI/CD pipeline. It's too slow and keeps flaking.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-14","original_id":"socratic-14","prompt":"Handle internationalization for the product. We're launching in Europe next quarter.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-15","original_id":"socratic-15","prompt":"Make our data pipeline more reliable. We've had a few incidents lately.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-16","original_id":"socratic-16","prompt":"Add a --version flag to the CLI that prints the value of `version` from package.json and exits 0.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-17","original_id":"socratic-17","prompt":"Rename the `getUserById` function to `fetchUserById` everywhere it appears in the codebase, including all call sites and tests.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-18","original_id":"socratic-18","prompt":"The `/api/users` endpoint is returning a 500 error when the `email` field is missing from the request body. Add a validation check that returns a 400 with the message 'email is required' instead.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-19","original_id":"socratic-19","prompt":"Pin the `lodash` dependency in package.json from `^4.17.15` to the exact version `4.17.21`.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-20","original_id":"socratic-20","prompt":"Add a composite index on `(user_id, created_at)` to the `orders` table in the PostgreSQL schema migration file.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-21","original_id":"socratic-21","prompt":"The nightly cron job `scripts/sync-inventory.py` is failing with `KeyError: 'sku'` on line 47. The upstream vendor API added a new optional field but our parser assumes it's always present. Fix the parser to handle the missing key gracefully.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-22","original_id":"socratic-22","prompt":"Add a GitHub Actions workflow that runs `npm test` on every pull request targeting the `main` branch, using Node 20.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-23","original_id":"socratic-23","prompt":"In the React component `UserCard`, replace the inline style `{ color: 'red' }` with the CSS class `text-danger` from our existing stylesheet.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-24","original_id":"socratic-24","prompt":"Write a unit test for the `calculateDiscount(price, couponCode)` function in `src/utils/pricing.js` that asserts it returns 0 when `couponCode` is null.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-25","original_id":"socratic-25","prompt":"Update the `Dockerfile` so that the final image runs as a non-root user named `appuser` instead of root.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-26","original_id":"socratic-26","prompt":"Convert the `formatDate` utility function from using Moment.js to the native `Intl.DateTimeFormat` API. The function signature must stay the same.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-27","original_id":"socratic-27","prompt":"Add rate limiting to the public `/api/search` endpoint: max 60 requests per minute per IP, return 429 with a Retry-After header when exceeded.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-28","original_id":"socratic-28","prompt":"Export the `ReportTable` React component as the default export of its file. Currently it is only a named export.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-29","original_id":"socratic-29","prompt":"Add a `.gitignore` entry to ignore all `*.log` files and the `dist/` directory.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"socratic-30","original_id":"socratic-30","prompt":"The `GET /health` endpoint currently returns `{ status: 'ok' }`. Add the current server UTC timestamp under the key `timestamp` in ISO 8601 format.","source":"socratic-clarify","source_file":"authored/socratic-clarify.jsonl","skill_fit":["socratic"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"You are an engineering assistant about to act on this request. Decide whether you should ask a clarifying question FIRST, or whether the request is specified well enough to proceed directly. Answer YES if you should ask a clarifying question before starting; answer NO if you should just proceed.","mode":"binary-decision"}
+{"id":"cynefin-01","original_id":"cynefin-01","prompt":"User engagement has been declining 8% month-over-month for the past three months across every surface in the product. Every team has a different theory — onboarding friction, notification fatigue, a competitor launch, a content quality drop — but none of the theories fully fit the data. No one has been able to isolate a single cause.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-02","original_id":"cynefin-02","prompt":"We launched a new pricing model six weeks ago and revenue is up but customer satisfaction scores dropped sharply. Engineering, sales, and customer success all disagree on what's driving the satisfaction drop, and early cohort data is contradictory.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-03","original_id":"cynefin-03","prompt":"Our ML recommendation model performs well in offline evals but produces clearly wrong suggestions in production for a significant percentage of users. The gap doesn't correlate cleanly with any single feature distribution shift we can identify.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-04","original_id":"cynefin-04","prompt":"We're trying to figure out what kind of product a brand-new demographic of users (Gen Z creators) would actually pay for. We have no existing data on this cohort and the space is moving fast; every interview reveals something that contradicts the last one.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-05","original_id":"cynefin-05","prompt":"An intermittent production incident causes 2–3% of API requests to hang for 30+ seconds before timing out. It happens roughly once an hour but we can't reproduce it locally, staging is unaffected, and the traces show no pattern in which requests are affected.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-06","original_id":"cynefin-06","prompt":"Our autonomous agent is producing correct answers in unit tests but takes increasingly wrong actions in real multi-step user sessions. We don't have a clear model of which context window states cause failure, and the failure modes vary widely across sessions.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-07","original_id":"cynefin-07","prompt":"We're entering a new market in Southeast Asia where our standard growth playbook produced disappointing results in the pilot. The local competitive dynamics, distribution channels, and user habits all appear different from our existing markets in ways we don't yet understand.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-08","original_id":"cynefin-08","prompt":"After a dependency upgrade three weeks ago, a subset of users on older Android devices began reporting random crashes at inconsistent points in the session. Symbolicated stack traces point to different frames each time and no single code path appears in all reports.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-09","original_id":"cynefin-09","prompt":"We're designing the team structure for a 0-to-1 product where the scope, tech stack, and target customer are still evolving rapidly. Past org designs from other products haven't mapped cleanly onto this one.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-10","original_id":"cynefin-10","prompt":"A security incident response is underway: an attacker is actively moving laterally through our infrastructure and the blast radius is still unknown. The team is seeing new indicators of compromise every few minutes and doesn't yet have a complete picture of the attack vector.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-11","original_id":"cynefin-11","prompt":"Developer productivity has dropped significantly since we adopted a microservices architecture 18 months ago. Teams point to different root causes — too many services, unclear ownership, slow local dev setup, too many meetings — and no single change has moved the needle so far.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-12","original_id":"cynefin-12","prompt":"A B2B enterprise customer is churning at a higher rate than our other segments, but their NPS scores and support ticket volume look fine. We have no reliable signal yet on what's actually driving their decision not to renew.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-13","original_id":"cynefin-13","prompt":"A prompt change that improved benchmark scores by 4% caused a noticeable quality degradation in a small but vocal subset of production use cases. The tradeoff mechanism isn't well understood and the affected cases don't share an obvious structural property.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-14","original_id":"cynefin-14","prompt":"We rolled out a team-based onboarding flow two months ago. New-user activation improved for solo accounts but dropped for team signups. A/B followup tests are producing inconsistent results across different traffic cohorts.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-15","original_id":"cynefin-15","prompt":"Infrastructure costs tripled in the past quarter. The spike doesn't trace cleanly to any single service, new feature launch, or traffic increase — multiple teams have looked and offered conflicting explanations.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":true,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-16","original_id":"cynefin-16","prompt":"Our nightly batch job started failing with a deterministic NullPointerException after the last deploy. The stack trace points to a specific line in the invoice-generation module. Find and fix the null-dereference.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-17","original_id":"cynefin-17","prompt":"Migrate the PostgreSQL 12 database to PostgreSQL 15 following the official upgrade path. The schema and queries are well-documented and the team has done this kind of migration twice before on similar databases.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-18","original_id":"cynefin-18","prompt":"Our API response times increased by 300ms across the board immediately after we added a new middleware layer last Tuesday. Profiling shows the middleware is running a synchronous database call on every request. Remove the unnecessary call.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-19","original_id":"cynefin-19","prompt":"Add TLS 1.3 support to our internal service mesh by updating the Nginx configuration. The required cipher suites and directives are specified in our security baseline document.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-20","original_id":"cynefin-20","prompt":"The `orders` table is experiencing slow reads because it lacks an index on `customer_id`. Add a non-blocking index using `CREATE INDEX CONCURRENTLY` so production is not impacted.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-21","original_id":"cynefin-21","prompt":"We need to implement WCAG 2.1 AA compliance for our web app. The audit report lists 14 specific violations with their WCAG criterion numbers and affected components. Fix each listed violation.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-22","original_id":"cynefin-22","prompt":"Our JWT tokens are not expiring correctly because the `exp` claim is being set in milliseconds instead of seconds. Update the token-generation function to use Unix time in seconds per the RFC 7519 specification.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-23","original_id":"cynefin-23","prompt":"Set up automated daily backups of our production PostgreSQL database to S3. Use pg_dump, compress with gzip, and retain backups for 30 days. This is a standard operational task we do for all new databases.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-24","original_id":"cynefin-24","prompt":"Upgrade the React version in the project from 17 to 18. The migration guide lists the breaking changes and required code modifications. No custom renderer or concurrent mode features are in use.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-25","original_id":"cynefin-25","prompt":"Our email delivery rate dropped after our sending IP was added to a known spam blocklist. Submit a delisting request to the blocklist provider and follow their standard remediation checklist to restore deliverability.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-26","original_id":"cynefin-26","prompt":"Implement pagination on the `/api/products` endpoint. It currently returns all records. Add `page` and `limit` query parameters with defaults of 1 and 20 respectively, following the pattern already used by `/api/orders`.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-27","original_id":"cynefin-27","prompt":"Our code coverage dropped below the 80% threshold when the payment module was added. Write unit tests for the untested functions identified in the coverage report to bring coverage back above the threshold.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-28","original_id":"cynefin-28","prompt":"The build is failing because a transitive dependency requires Node 18 but our CI environment is pinned to Node 16. Update the CI configuration to use Node 18.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-29","original_id":"cynefin-29","prompt":"Internationalize the date format strings in the app's notification templates. Replace all hardcoded `MM/DD/YYYY` formats with the `Intl.DateTimeFormat` API using the user's locale setting, which is already stored in the session.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"cynefin-30","original_id":"cynefin-30","prompt":"The weekly sales report PDF is generating with incorrect totals because a currency-conversion step was accidentally removed during a merge. Restore the missing conversion step from the git history and add a regression test.","source":"cynefin-classify","source_file":"authored/cynefin-classify.jsonl","skill_fit":["cynefin"],"family":"Routing/abstention","type":"target","target":true,"label":false,"decision_instruction":"Classify how to engage this problem. Answer YES if it is an UNORDERED problem (complex or chaotic): cause and effect are NOT knowable in advance, so the right move is to probe/experiment and let the approach emerge. Answer NO if it is an ORDERED problem (clear or complicated): cause and effect ARE knowable, so you can analyze and plan a correct solution upfront, possibly with expert help.","mode":"binary-decision"}
+{"id":"glm-distractor-8","original_id":"glm-distractor-8","prompt":"How can I convert all the lowercase letters in a string to uppercase using Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-11","original_id":"glm-distractor-11","prompt":"**This Kata is intended as a small challenge for my students** All Star Code Challenge #18 Create a function called that accepts 2 string arguments and returns an integer of the count of occurrences the 2nd argument is found in the first one. If no occurrences can be found, a count of 0 should be returned. Notes: * The first argument can be an empty string * The second string argument will always be of length 1 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-12","original_id":"glm-distractor-12","prompt":"Implement quick sort to sort the given array of integers. Write corresponding code in Python. [9, 5, 8, 1, 3, 6, 7]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-13","original_id":"glm-distractor-13","prompt":"Zoe wants to go on the field trip to Washington DC with her middle school this spring and the cost is $485. Her grandma gave her $250 toward her fees and she must earn the rest by selling candy bars. She makes $1.25 for every candy bar she sells. How many candy bars does Zoe need to sell to earn the money for the trip?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-16","original_id":"glm-distractor-16","prompt":"Can you also tell me the date and time of the Indiana Comic Convention?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-17","original_id":"glm-distractor-17","prompt":"Create an algorithm to rotate an array by one element. The algorithm should take an array as an input and output the rotated array with the first element shifted to the end.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-18","original_id":"glm-distractor-18","prompt":"Generate a correct Python program for plotting bar chart for the following data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-19","original_id":"glm-distractor-19","prompt":"Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely. * Inversion: change the state of each bit to the opposite state * Logical left shift: shift left by 1 * Logical right shift: shift right by 1 Constraints * $0 \\leq x \\leq 2^{32} - 1$ Input The input is given in the following format. $x$ Output Print the given bits, results of inversion, left shift and right shift in a line respectively. Examples Input 8 Output 00000000000000000000000000001000 11111111111111111111111111110111 00000000000000000000000000010000 00000000000000000000000000000100 Input 13 Output 00000000000000000000000000001101 11111111111111111111111111110010 00000000000000000000000000011010 00000000000000000000000000000110 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-21","original_id":"glm-distractor-21","prompt":"Create a Python program that fetches the user's current time and sets a reminder after 30 minutes.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-22","original_id":"glm-distractor-22","prompt":"Could you delineate a methodology, utilising the Python programming language, to extract the middle value, labeled as the median, from an unorganized collection of integral numbers? Numbers = [12, 7, 21, 3, 9]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-23","original_id":"glm-distractor-23","prompt":"Create a Python 3 class for a directory list widget using Qt that includes a grid layout with a directory list view and buttons to add or remove directories. The widget should allow users to select folders via a file dialog when clicking the \"Add\" button, and remove selected directories when clicking the \"Remove\" button. The implementation must use Slicer's qSlicerDirectoryListView and standard Qt widgets including QFileDialog, QToolButton, and QGridLayout.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-42","original_id":"glm-distractor-42","prompt":"Write a Python3 function that returns the Cargo home directory path by first checking the CARGO_HOME environment variable. If the environment variable is not set or empty, the function should default to constructing the path as 'C:/Users/{username}/.cargo' using the current user's username. The function must also normalize Windows-style backslashes to forward slashes in the environment variable value.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-46","original_id":"glm-distractor-46","prompt":"Create a Python 3 script that uses the clustergrammer library to load a matrix from stdin, perform optional filtering and normalization steps (such as sum-based filtering, z-score normalization, top-N selection, and threshold filtering), generate a hierarchical clustering visualization using cosine distance, and then output the resulting network data in JSON format for frontend visualization. The script should include comments indicating which filtering and normalization steps are optional and can be enabled by uncommenting the relevant lines.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-48","original_id":"glm-distractor-48","prompt":"Solve the inequality: 8x - 9 < 2. Express the solution in interval notation.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-50","original_id":"glm-distractor-50","prompt":"A toy store manager received a large order of Mr. Slinkums just in time for the holidays. The manager places $20\\%$ of them on the shelves, leaving the other 120 Mr. Slinkums in storage. How many Mr. Slinkums were in this order?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-51","original_id":"glm-distractor-51","prompt":"Write a python function to check if a given file is in NOAA ACE format by verifying that the first line starts with ':' and the third line contains 'NOAA'. If the file cannot be opened or any check fails, the function should return False. Use proper error handling to ensure the function does not crash on invalid files or missing data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-69","original_id":"glm-distractor-69","prompt":"Write a program that allows users to search for phone numbers by name in a phone book. Implement the phone book using a custom data structure that you create. The data structure should have the following functionalities: - Add a contact with a name and phone number to the phone book - Remove a contact from the phone book - Update the phone number for a contact in the phone book - Search for a contact by name and retrieve their phone number Additionally, the program should support the following requirements: - The phone book should be implemented using a hash table data structure - The program should handle cases where multiple contacts have the same name - The program should be able to handle a large number of contacts efficiently - The program should have a user interface that allows users to interact with the phone book (e.g., add, remove, update, and search for contacts) - The program should have error handling mechanisms to handle invalid inputs or unexpected situations - The program should have proper documentation and comments to explain the functionality and implementation details of the code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-74","original_id":"glm-distractor-74","prompt":"Produce a program using Python that visualizes the given function.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-81","original_id":"glm-distractor-81","prompt":"How can I generate a regular expression that matches any two or more consecutive numbers?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-83","original_id":"glm-distractor-83","prompt":"Write a python 3 script that performs simple linear regression analysis on gas expenditure data using scikit-learn. The script should load data from \"data1.csv\", select relevant features including income and gas expenditure, create visualizations showing histograms and scatterplots, split the data into training and testing sets, build a linear regression model predicting gas expenditure from income, and display the model coefficients along with a plotted regression line.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-84","original_id":"glm-distractor-84","prompt":"Write a python 3 Django management command that classifies unassigned faces using ensemble predictions from two SVM models (small and big) with probability averaging, and prints classification results for the first 1000 unassigned faces, including predicted labels, probabilities, and corresponding person objects from the database.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-196","original_id":"glm-distractor-196","prompt":"Create a python 3 script that demonstrates two different plotting APIs using PyQt4: a procedural approach with PlotWidget and an object-oriented approach with a custom Plot class. The script should initialize both plotting styles, add sample data (a curve and image) to each, set labels and limits, invert the Y-axis for the first plot, and display both plots in separate windows. Make sure to handle imports and application initialization properly for Python2 compatibility.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-199","original_id":"glm-distractor-199","prompt":"Write a Python 3 function that tests whether the neohub class can be properly instantiated, ensuring the class initialization works correctly without any errors. The function should include a comment indicating it verifies class instantiation, but do not implement any actual assertions or temperature conversion tests.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-200","original_id":"glm-distractor-200","prompt":"Please answer the following question: - Gather the ingredients for the cake - Mix the flour, sugar, egg, and water to make batter - Pour the mixture into a cake pan - Place the cake in the oven to cook - Take the cake out when it is cooked through - Let the cake cool What might be the last step of the process? A:","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-201","original_id":"glm-distractor-201","prompt":"Can you provide a Python code snippet to convert XML to JSON?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-203","original_id":"glm-distractor-203","prompt":"Write a Python3 script that downloads and unpacks tracking results from Google Drive for various trackers like PyTracking-based and external trackers. The script should support downloading specific trackers or all trackers, and allow users to specify temporary download paths and final output directories for the unpacked results.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-214","original_id":"glm-distractor-214","prompt":"Create a python 3 program using the turtle module that draws a series of nested squares rotating at different angles. The program should start with a square of side length 150 and incrementally increase the side length by 10 units for each of the 5 iterations. Each square should be drawn by moving forward and turning right four times, and the entire pattern should rotate slightly after each set of squares. Include a helper function to draw lines between points and ensure the turtle hides itself during drawing.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-216","original_id":"glm-distractor-216","prompt":"How can I generate a set of random numbers without any duplicates in Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-224","original_id":"glm-distractor-224","prompt":"Create a Python script that sets the value of a variable from the command-line, but the value must be encrypted using a custom encryption algorithm before being assigned to the variable. Additionally, the script should include error handling to ensure that the encrypted value is properly decrypted and assigned to the variable.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-225","original_id":"glm-distractor-225","prompt":"A satellite orbits Earth at an altitude of 1501 km. Calculate its orbital velocity and period. (Earth mass = 5.97 × 10²⁴ kg, Earth radius = 6371 km)","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-227","original_id":"glm-distractor-227","prompt":"Compute the quotient of 17708 and 9880. Show your work.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-236","original_id":"glm-distractor-236","prompt":"def division_while_loop(dividend, divisor): \"\"\" This exercise focuses on division using a while loop. Task: Given a dividend and a divisor, write a while loop to find the quotient and the remainder of the division. Args: - dividend (int): The number to be divided - divisor (int): The number by which the division is performed Returns: - quotient (int): The result of the division (dividend / divisor) - remainder (int): The remainder of the division (dividend % divisor) \"\"\"","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-241","original_id":"glm-distractor-241","prompt":"Create a python 3 class called `BalanceSheet` that takes a `Portfolio` object (with default to a new `Portfolio()` instance) and provides methods to generate structured data representations. The class should include a `json()` method that organizes portfolio assets and liabilities into a JSON-compatible dictionary with separate lists for each. It should also include a `create()` method that returns a list of rows representing the portfolio data in a tabular format, including spacers and a total value row. Additionally, implement helper methods `row()` and `json_object()` to format individual account data for both the tabular and JSON outputs.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-249","original_id":"glm-distractor-249","prompt":"Write a python function to find the frequency of each character in a given string and return a dictionary with characters as keys and their frequencies as values. Solve the problem starting with the provided function header. Function header: ``` def get_char_frequency(string): ``` Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-261","original_id":"glm-distractor-261","prompt":"Create a function to check if an array contains any duplicate elements, while also ensuring that the array elements are sorted in ascending order and that the length of the array is less than or equal to 100. Additionally, the function should check if the array contains any negative integers, and if so, it should return False. The function should return a boolean value indicating the presence of duplicate elements. Example: Input: [1, 2, 3, 3, 4, 5, 5] Output: True","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-262","original_id":"glm-distractor-262","prompt":"You are working on an API for a space-themed game and need to create a class that handles the case when a specific planet for a character is not found. You need to define a class called GetCharactersCharacterIdPlanetsPlanetIdNotFound with the following attributes and methods: Attributes: - error: a string to store the error message Methods: - __init__: a constructor method to initialize the error attribute - to_dict: a method to return the model properties as a dictionary - to_str: a method to return the string representation of the model - __repr__: a method for printing and pretty-printing the object - __eq__: a method to check if two objects are equal - __ne__: a method to check if two objects are not equal You need to implement the class and its methods as described above.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-264","original_id":"glm-distractor-264","prompt":"How can I categorize data into two bins, with the labels \"category A\" and \"category B\"?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-267","original_id":"glm-distractor-267","prompt":"Given points A(14, -8) and B(-1, -13), find the slope of the line passing through these two points.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-268","original_id":"glm-distractor-268","prompt":"Create a python 3 class named Objects that initializes with several instance attributes including cloud set to None, score set to 0, score_type set to 'CNNSeg', type set to None, and type_probs set to None.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-269","original_id":"glm-distractor-269","prompt":"What is the code to construct a Recurrent Neural Network (RNN) using TensorFlow with an input size of 50 values and an output size of 10 values?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-270","original_id":"glm-distractor-270","prompt":"Create a python 3 class called CompileGLSL that extends Module for compiling GLSL shader files into SPIR-V format using the glslangValidator tool. The class should define required tools, specify output file names with .spv extension, and implement a process method that runs the validator with appropriate stage flags (-S vert for vertex shaders and -S frag for fragment shaders) while handling directory creation and returning the subprocess return code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-271","original_id":"glm-distractor-271","prompt":"Evaluate the definite integral of f(x) = sin(1x) from 1 to 4.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-274","original_id":"glm-distractor-274","prompt":"Calculate the pH of a 0.545 M solution of HCl. Show your calculation step by step.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-275","original_id":"glm-distractor-275","prompt":"Write a Python 3 program that prompts the user to enter three integer numbers and then calculates and displays their sum. The program should use input() to read the numbers from the user and print the result in the format \"Sum = [value]\".","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Routing/abstention","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
diff --git a/evals/datasets/calibrated/routing-abstention.manifest.json b/evals/datasets/calibrated/routing-abstention.manifest.json
new file mode 100644
index 0000000..293a34a
--- /dev/null
+++ b/evals/datasets/calibrated/routing-abstention.manifest.json
@@ -0,0 +1,60 @@
+{
+ "family": "Routing/abstention",
+ "family_key": "routing-abstention",
+ "skills": [
+ "circle-of-competence",
+ "cynefin",
+ "model-combination",
+ "model-router",
+ "model-selection",
+ "socratic"
+ ],
+ "value_surface": "routing/discoverability",
+ "source": "Combined from 4 source files. external: selfaware, glm-distractor; authored: socratic-clarify, cynefin-classify",
+ "leakage": "SelfAware dataset (OkayestProgrammer/selfAware) contains general-knowledge questions with answerability labels. Questions are trivia-style and may appear in model training data. Leakage risk is moderate for common trivia facts, low for obscure ones. Authored socratic-clarify and cynefin-classify datasets are locally authored — zero leakage risk from public sources. GLM distractor items may have training data overlap.\n\nSource breakdown: 1 external dataset(s) with potential training-data leakage; 2 authored dataset(s) with zero external leakage; ",
+ "label": {
+ "definition": "Abstention/answerability: whether the model correctly determines if a question is answerable with verifiable information, or correctly decides whether to ask a clarifying question.",
+ "values": {
+ "true": "Answerable (answerable=true) or should clarify (label=true)",
+ "false": "Unanswerable or should proceed directly"
+ },
+ "eval_mode": "ground_truth",
+ "ground_truth_fields": [
+ "answerable",
+ "label"
+ ]
+ },
+ "calibration": {
+ "baseline": 0.458,
+ "baseline_estimated": true,
+ "baseline_note": "Estimated from label distribution (50% true). Balanced distribution suggests items are in the target difficulty band. Actual baseline must be measured by calibration runner.",
+ "band": [
+ 0.4,
+ 0.7
+ ],
+ "status": "pending_calibration",
+ "instructions": "Run EVAL_RUN=calib node evals/run-calibration.js evals/datasets/calibrated/<family>-candidate-pool.jsonl to populate real calibration stats."
+ },
+ "item_counts": {
+ "total": 174,
+ "target": 130,
+ "near_miss": 0,
+ "distractor": 44,
+ "ambiguous": 0,
+ "decisive": 174
+ },
+ "item_class_definitions": {
+ "target": "Items that directly measure the family value surface — in-domain, skill-relevant items where the skill is expected to help.",
+ "near_miss": "Items that are similar to the family domain but not an exact match. Useful for calibration but may not benefit from the skill.",
+ "distractor": "Items that are clearly off-target (target=false). Used to measure false-positive rate and specificity.",
+ "ambiguous": "Items whose relevance to the family is unclear. Excluded from decisive splits."
+ },
+ "decisive_split_rules": {
+ "min_target": 1,
+ "min_distractor": 1,
+ "max_ambiguous": 0,
+ "satisfied": true
+ },
+ "created": "2026-06-06",
+ "frozen": false
+}
\ No newline at end of file
diff --git a/evals/datasets/calibrated/security-adversarial-candidate-pool.jsonl b/evals/datasets/calibrated/security-adversarial-candidate-pool.jsonl
new file mode 100644
index 0000000..9ed1ebc
--- /dev/null
+++ b/evals/datasets/calibrated/security-adversarial-candidate-pool.jsonl
@@ -0,0 +1,644 @@
+{"id":"diversevul-balanced-positive-0","original_id":"diversevul-balanced-positive-0","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic char *make_filename_safe(const char *filename TSRMLS_DC)\n{\n\tif (*filename && strncmp(filename, \":memory:\", sizeof(\":memory:\")-1)) {\n\t\tchar *fullpath = expand_filepath(filename, NULL TSRMLS_CC);\n\n\t\tif (!fullpath) {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {\n\t\t\tefree(fullpath);\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif (php_check_open_basedir(fullpath TSRMLS_CC)) {\n\t\t\tefree(fullpath);\n\t\t\treturn NULL;\n\t\t}\n\t\treturn fullpath;\n\t}\n\treturn estrdup(filename);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-1","original_id":"diversevul-balanced-positive-1","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)\n{\n int sx, sy;\n int dx, dy;\n int width, height;\n int depth;\n int notify = 0;\n\n depth = s->get_bpp((VGAState *)s) / 8;\n s->get_resolution((VGAState *)s, &width, &height);\n\n /* extra x, y */\n sx = (src % (width * depth)) / depth;\n sy = (src / (width * depth));\n dx = (dst % (width *depth)) / depth;\n dy = (dst / (width * depth));\n\n /* normalize width */\n w /= depth;\n\n /* if we're doing a backward copy, we have to adjust\n our x/y to be the upper left corner (instead of the lower\n right corner) */\n if (s->cirrus_blt_dstpitch < 0) {\n\tsx -= (s->cirrus_blt_width / depth) - 1;\n\tdx -= (s->cirrus_blt_width / depth) - 1;\n\tsy -= s->cirrus_blt_height - 1;\n\tdy -= s->cirrus_blt_height - 1;\n }\n\n /* are we in the visible portion of memory? */\n if (sx >= 0 && sy >= 0 && dx >= 0 && dy >= 0 &&\n\t(sx + w) <= width && (sy + h) <= height &&\n\t(dx + w) <= width && (dy + h) <= height) {\n\tnotify = 1;\n }\n\n /* make to sure only copy if it's a plain copy ROP */\n if (*s->cirrus_rop != cirrus_bitblt_rop_fwd_src &&\n\t*s->cirrus_rop != cirrus_bitblt_rop_bkwd_src)\n\tnotify = 0;\n\n /* we have to flush all pending changes so that the copy\n is generated at the appropriate moment in time */\n if (notify)\n\tvga_hw_update();\n\n (*s->cirrus_rop) (s, s->vram_ptr + s->cirrus_blt_dstaddr,\n\t\t s->vram_ptr + s->cirrus_blt_srcaddr,\n\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n if (notify)\n\ts->ds->dpy_copy(s->ds,\n\t\t\tsx, sy, dx, dy,\n\t\t\ts->cirrus_blt_width / depth,\n\t\t\ts->cirrus_blt_height);\n\n /* we don't have to notify the display that this portion has\n changed since dpy_copy implies this */\n\n if (!notify)\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-2","original_id":"diversevul-balanced-positive-2","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nglue(cirrus_bitblt_rop_fwd_, ROP_NAME)(CirrusVGAState *s,\n uint8_t *dst,const uint8_t *src,\n int dstpitch,int srcpitch,\n int bltwidth,int bltheight)\n{\n int x,y;\n dstpitch -= bltwidth;\n srcpitch -= bltwidth;\n for (y = 0; y < bltheight; y++) {\n for (x = 0; x < bltwidth; x++) {\n ROP_OP(*dst, *src);\n dst++;\n src++;\n }\n dst += dstpitch;\n src += srcpitch;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-3","original_id":"diversevul-balanced-positive-3","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)\n{\n if (s->ds->dpy_copy) {\n\tcirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr,\n\t\t s->cirrus_blt_srcaddr - s->start_addr,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n } else {\n\t(*s->cirrus_rop) (s, s->vram_ptr + s->cirrus_blt_dstaddr,\n\t\t\t s->vram_ptr + s->cirrus_blt_srcaddr,\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n }\n\n return 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-4","original_id":"diversevul-balanced-positive-4","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mem_writeb_mode4and5_8bpp(CirrusVGAState * s,\n\t\t\t\t\t unsigned mode,\n\t\t\t\t\t unsigned offset,\n\t\t\t\t\t uint32_t mem_value)\n{\n int x;\n unsigned val = mem_value;\n uint8_t *dst;\n\n dst = s->vram_ptr + offset;\n for (x = 0; x < 8; x++) {\n\tif (val & 0x80) {\n\t *dst = s->cirrus_shadow_gr1;\n\t} else if (mode == 5) {\n\t *dst = s->cirrus_shadow_gr0;\n\t}\n\tval <<= 1;\n\tdst++;\n }\n cpu_physical_memory_set_dirty(s->vram_offset + offset);\n cpu_physical_memory_set_dirty(s->vram_offset + offset + 7);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-5","original_id":"diversevul-balanced-positive-5","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_common_patterncopy(CirrusVGAState * s,\n\t\t\t\t\t const uint8_t * src)\n{\n uint8_t *dst;\n\n dst = s->vram_ptr + s->cirrus_blt_dstaddr;\n (*s->cirrus_rop) (s, dst, src,\n s->cirrus_blt_dstpitch, 0,\n s->cirrus_blt_width, s->cirrus_blt_height);\n cirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n s->cirrus_blt_height);\n return 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-6","original_id":"diversevul-balanced-positive-6","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_invalidate_region(CirrusVGAState * s, int off_begin,\n\t\t\t\t int off_pitch, int bytesperline,\n\t\t\t\t int lines)\n{\n int y;\n int off_cur;\n int off_cur_end;\n\n for (y = 0; y < lines; y++) {\n\toff_cur = off_begin;\n\toff_cur_end = off_cur + bytesperline;\n\toff_cur &= TARGET_PAGE_MASK;\n\twhile (off_cur < off_cur_end) {\n\t cpu_physical_memory_set_dirty(s->vram_offset + off_cur);\n\t off_cur += TARGET_PAGE_SIZE;\n\t}\n\toff_begin += off_pitch;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-7","original_id":"diversevul-balanced-positive-7","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_patterncopy(CirrusVGAState * s)\n{\n return cirrus_bitblt_common_patterncopy(s,\n\t\t\t\t\t s->vram_ptr +\n (s->cirrus_blt_srcaddr & ~7));\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-8","original_id":"diversevul-balanced-positive-8","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop)\n{\n cirrus_fill_t rop_func;\n\n rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1];\n rop_func(s, s->vram_ptr + s->cirrus_blt_dstaddr,\n s->cirrus_blt_dstpitch,\n s->cirrus_blt_width, s->cirrus_blt_height);\n cirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t s->cirrus_blt_height);\n cirrus_bitblt_reset(s);\n return 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-9","original_id":"diversevul-balanced-positive-9","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_bitblt_cputovideo_next(CirrusVGAState * s)\n{\n int copy_count;\n uint8_t *end_ptr;\n\n if (s->cirrus_srccounter > 0) {\n if (s->cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY) {\n cirrus_bitblt_common_patterncopy(s, s->cirrus_bltbuf);\n the_end:\n s->cirrus_srccounter = 0;\n cirrus_bitblt_reset(s);\n } else {\n /* at least one scan line */\n do {\n (*s->cirrus_rop)(s, s->vram_ptr + s->cirrus_blt_dstaddr,\n s->cirrus_bltbuf, 0, 0, s->cirrus_blt_width, 1);\n cirrus_invalidate_region(s, s->cirrus_blt_dstaddr, 0,\n s->cirrus_blt_width, 1);\n s->cirrus_blt_dstaddr += s->cirrus_blt_dstpitch;\n s->cirrus_srccounter -= s->cirrus_blt_srcpitch;\n if (s->cirrus_srccounter <= 0)\n goto the_end;\n /* more bytes than needed can be transfered because of\n word alignment, so we keep them for the next line */\n /* XXX: keep alignment to speed up transfer */\n end_ptr = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;\n copy_count = s->cirrus_srcptr_end - end_ptr;\n memmove(s->cirrus_bltbuf, end_ptr, copy_count);\n s->cirrus_srcptr = s->cirrus_bltbuf + copy_count;\n s->cirrus_srcptr_end = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;\n } while (s->cirrus_srcptr >= s->cirrus_srcptr_end);\n }\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-10","original_id":"diversevul-balanced-positive-10","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mem_writeb_mode4and5_16bpp(CirrusVGAState * s,\n\t\t\t\t\t unsigned mode,\n\t\t\t\t\t unsigned offset,\n\t\t\t\t\t uint32_t mem_value)\n{\n int x;\n unsigned val = mem_value;\n uint8_t *dst;\n\n dst = s->vram_ptr + offset;\n for (x = 0; x < 8; x++) {\n\tif (val & 0x80) {\n\t *dst = s->cirrus_shadow_gr1;\n\t *(dst + 1) = s->gr[0x11];\n\t} else if (mode == 5) {\n\t *dst = s->cirrus_shadow_gr0;\n\t *(dst + 1) = s->gr[0x10];\n\t}\n\tval <<= 1;\n\tdst += 2;\n }\n cpu_physical_memory_set_dirty(s->vram_offset + offset);\n cpu_physical_memory_set_dirty(s->vram_offset + offset + 15);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-11","original_id":"diversevul-balanced-positive-11","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)\n{\n if (s->ds->dpy_copy) {\n\tcirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr,\n\t\t s->cirrus_blt_srcaddr - s->start_addr,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n } else {\n\n if (BLTUNSAFE(s))\n return 0;\n\n\t(*s->cirrus_rop) (s, s->vram_ptr +\n (s->cirrus_blt_dstaddr & s->cirrus_addr_mask),\n\t\t\t s->vram_ptr +\n (s->cirrus_blt_srcaddr & s->cirrus_addr_mask),\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n }\n\n return 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-12","original_id":"diversevul-balanced-positive-12","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_mount(char __user * dev_name, char __user * dir_name,\n\t\t\t\t char __user * type, unsigned long flags,\n\t\t\t\t void __user * data)\n{\n\tunsigned long type_page;\n\tunsigned long data_page;\n\tunsigned long dev_page;\n\tchar *dir_page;\n\tint retval;\n\n\tretval = copy_mount_options (type, &type_page);\n\tif (retval < 0)\n\t\tgoto out;\n\n\tdir_page = getname(dir_name);\n\tretval = PTR_ERR(dir_page);\n\tif (IS_ERR(dir_page))\n\t\tgoto out1;\n\n\tretval = copy_mount_options (dev_name, &dev_page);\n\tif (retval < 0)\n\t\tgoto out2;\n\n\tretval = copy_mount_options (data, &data_page);\n\tif (retval < 0)\n\t\tgoto out3;\n\n\tretval = -EINVAL;\n\n\tif (type_page) {\n\t\tif (!strcmp((char *)type_page, SMBFS_NAME)) {\n\t\t\tdo_smb_super_data_conv((void *)data_page);\n\t\t} else if (!strcmp((char *)type_page, NCPFS_NAME)) {\n\t\t\tdo_ncp_super_data_conv((void *)data_page);\n\t\t} else if (!strcmp((char *)type_page, NFS4_NAME)) {\n\t\t\tif (do_nfs4_super_data_conv((void *) data_page))\n\t\t\t\tgoto out4;\n\t\t}\n\t}\n\n\tlock_kernel();\n\tretval = do_mount((char*)dev_page, dir_page, (char*)type_page,\n\t\t\tflags, (void*)data_page);\n\tunlock_kernel();\n\n out4:\n\tfree_page(data_page);\n out3:\n\tfree_page(dev_page);\n out2:\n\tputname(dir_page);\n out1:\n\tfree_page(type_page);\n out:\n\treturn retval;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-13","original_id":"diversevul-balanced-positive-13","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nunsigned short atalk_checksum(struct ddpehdr *ddp, int len)\n{\n\tunsigned long sum = 0;\t/* Assume unsigned long is >16 bits */\n\tunsigned char *data = (unsigned char *)ddp;\n\n\tlen -= 4;\t\t/* skip header 4 bytes */\n\tdata += 4;\n\n\t/* This ought to be unwrapped neatly. I'll trust gcc for now */\n\twhile (len--) {\n\t\tsum += *data;\n\t\tsum <<= 1;\n\t\tif (sum & 0x10000) {\n\t\t\tsum++;\n\t\t\tsum &= 0xFFFF;\n\t\t}\n\t\tdata++;\n\t}\n\t/* Use 0xFFFF for 0. 0 itself means none */\n\treturn sum ? htons((unsigned short)sum) : 0xFFFF;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-14","original_id":"diversevul-balanced-positive-14","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ltalk_rcv(struct sk_buff *skb, struct net_device *dev,\n\t\t\tstruct packet_type *pt)\n{\n\t/* Expand any short form frames */\n\tif (skb->mac.raw[2] == 1) {\n\t\tstruct ddpehdr *ddp;\n\t\t/* Find our address */\n\t\tstruct atalk_addr *ap = atalk_find_dev_addr(dev);\n\n\t\tif (!ap || skb->len < sizeof(struct ddpshdr))\n\t\t\tgoto freeit;\n\t\t/*\n\t\t * The push leaves us with a ddephdr not an shdr, and\n\t\t * handily the port bytes in the right place preset.\n\t\t */\n\n\t\tskb_push(skb, sizeof(*ddp) - 4);\n\t\t/* FIXME: use skb->cb to be able to use shared skbs */\n\t\tddp = (struct ddpehdr *)skb->data;\n\n\t\t/* Now fill in the long header */\n\n\t \t/*\n\t \t * These two first. The mac overlays the new source/dest\n\t \t * network information so we MUST copy these before\n\t \t * we write the network numbers !\n\t \t */\n\n\t\tddp->deh_dnode = skb->mac.raw[0]; /* From physical header */\n\t\tddp->deh_snode = skb->mac.raw[1]; /* From physical header */\n\n\t\tddp->deh_dnet = ap->s_net;\t/* Network number */\n\t\tddp->deh_snet = ap->s_net;\n\t\tddp->deh_sum = 0;\t\t/* No checksum */\n\t\t/*\n\t\t * Not sure about this bit...\n\t\t */\n\t\tddp->deh_len = skb->len;\n\t\tddp->deh_hops = DDP_MAXHOPS;\t/* Non routable, so force a drop\n\t\t\t\t\t\t if we slip up later */\n\t\t/* Mend the byte order */\n\t\t*((__u16 *)ddp) = htons(*((__u16 *)ddp));\n\t}\n\tskb->h.raw = skb->data;\n\n\treturn atalk_rcv(skb, dev, pt);\nfreeit:\n\tkfree_skb(skb);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-15","original_id":"diversevul-balanced-positive-15","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int fat_ioctl_filldir(void *__buf, const char *name, int name_len,\n\t\t\t loff_t offset, u64 ino, unsigned int d_type)\n{\n\tstruct fat_ioctl_filldir_callback *buf = __buf;\n\tstruct dirent __user *d1 = buf->dirent;\n\tstruct dirent __user *d2 = d1 + 1;\n\n\tif (buf->result)\n\t\treturn -EINVAL;\n\tbuf->result++;\n\n\tif (name != NULL) {\n\t\t/* dirent has only short name */\n\t\tif (name_len >= sizeof(d1->d_name))\n\t\t\tname_len = sizeof(d1->d_name) - 1;\n\n\t\tif (put_user(0, d2->d_name)\t\t\t||\n\t\t put_user(0, &d2->d_reclen)\t\t\t||\n\t\t copy_to_user(d1->d_name, name, name_len)\t||\n\t\t put_user(0, d1->d_name + name_len)\t\t||\n\t\t put_user(name_len, &d1->d_reclen))\n\t\t\tgoto efault;\n\t} else {\n\t\t/* dirent has short and long name */\n\t\tconst char *longname = buf->longname;\n\t\tint long_len = buf->long_len;\n\t\tconst char *shortname = buf->shortname;\n\t\tint short_len = buf->short_len;\n\n\t\tif (long_len >= sizeof(d1->d_name))\n\t\t\tlong_len = sizeof(d1->d_name) - 1;\n\t\tif (short_len >= sizeof(d1->d_name))\n\t\t\tshort_len = sizeof(d1->d_name) - 1;\n\n\t\tif (copy_to_user(d2->d_name, longname, long_len)\t||\n\t\t put_user(0, d2->d_name + long_len)\t\t\t||\n\t\t put_user(long_len, &d2->d_reclen)\t\t\t||\n\t\t put_user(ino, &d2->d_ino)\t\t\t\t||\n\t\t put_user(offset, &d2->d_off)\t\t\t||\n\t\t copy_to_user(d1->d_name, shortname, short_len)\t||\n\t\t put_user(0, d1->d_name + short_len)\t\t\t||\n\t\t put_user(short_len, &d1->d_reclen))\n\t\t\tgoto efault;\n\t}\n\treturn 0;\nefault:\n\tbuf->result = -EFAULT;\n\treturn -EFAULT;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-16","original_id":"diversevul-balanced-positive-16","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int fat_dir_ioctl(struct inode * inode, struct file * filp,\n\t\t unsigned int cmd, unsigned long arg)\n{\n\tstruct fat_ioctl_filldir_callback buf;\n\tstruct dirent __user *d1;\n\tint ret, short_only, both;\n\n\tswitch (cmd) {\n\tcase VFAT_IOCTL_READDIR_SHORT:\n\t\tshort_only = 1;\n\t\tboth = 0;\n\t\tbreak;\n\tcase VFAT_IOCTL_READDIR_BOTH:\n\t\tshort_only = 0;\n\t\tboth = 1;\n\t\tbreak;\n\tdefault:\n\t\treturn fat_generic_ioctl(inode, filp, cmd, arg);\n\t}\n\n\td1 = (struct dirent __user *)arg;\n\tif (!access_ok(VERIFY_WRITE, d1, sizeof(struct dirent[2])))\n\t\treturn -EFAULT;\n\t/*\n\t * Yes, we don't need this put_user() absolutely. However old\n\t * code didn't return the right value. So, app use this value,\n\t * in order to check whether it is EOF.\n\t */\n\tif (put_user(0, &d1->d_reclen))\n\t\treturn -EFAULT;\n\n\tbuf.dirent = d1;\n\tbuf.result = 0;\n\tmutex_lock(&inode->i_mutex);\n\tret = -ENOENT;\n\tif (!IS_DEADDIR(inode)) {\n\t\tret = __fat_readdir(inode, filp, &buf, fat_ioctl_filldir,\n\t\t\t\t short_only, both);\n\t}\n\tmutex_unlock(&inode->i_mutex);\n\tif (ret >= 0)\n\t\tret = buf.result;\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-17","original_id":"diversevul-balanced-positive-17","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic long fat_compat_dir_ioctl(struct file *file, unsigned cmd,\n\t\t\t\t unsigned long arg)\n{\n\tstruct compat_dirent __user *p = compat_ptr(arg);\n\tint ret;\n\tmm_segment_t oldfs = get_fs();\n\tstruct dirent d[2];\n\n\tswitch (cmd) {\n\tcase VFAT_IOCTL_READDIR_BOTH32:\n\t\tcmd = VFAT_IOCTL_READDIR_BOTH;\n\t\tbreak;\n\tcase VFAT_IOCTL_READDIR_SHORT32:\n\t\tcmd = VFAT_IOCTL_READDIR_SHORT;\n\t\tbreak;\n\tdefault:\n\t\treturn -ENOIOCTLCMD;\n\t}\n\n\tset_fs(KERNEL_DS);\n\tlock_kernel();\n\tret = fat_dir_ioctl(file->f_path.dentry->d_inode, file,\n\t\t\t cmd, (unsigned long) &d);\n\tunlock_kernel();\n\tset_fs(oldfs);\n\tif (ret >= 0) {\n\t\tret |= fat_compat_put_dirent32(&d[0], p);\n\t\tret |= fat_compat_put_dirent32(&d[1], p + 1);\n\t}\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-18","original_id":"diversevul-balanced-positive-18","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic long fat_compat_put_dirent32(struct dirent *d,\n\t\t\t\t struct compat_dirent __user *d32)\n{\n if (!access_ok(VERIFY_WRITE, d32, sizeof(struct compat_dirent)))\n return -EFAULT;\n\n __put_user(d->d_ino, &d32->d_ino);\n __put_user(d->d_off, &d32->d_off);\n __put_user(d->d_reclen, &d32->d_reclen);\n if (__copy_to_user(d32->d_name, d->d_name, d->d_reclen))\n\t\treturn -EFAULT;\n\n return 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-19","original_id":"diversevul-balanced-positive-19","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int vfat_ioctl32(unsigned fd, unsigned cmd, unsigned long arg)\n{\n\tstruct compat_dirent __user *p = compat_ptr(arg);\n\tint ret;\n\tmm_segment_t oldfs = get_fs();\n\tstruct dirent d[2];\n\n\tswitch(cmd)\n\t{\n \tcase VFAT_IOCTL_READDIR_BOTH32:\n \tcmd = VFAT_IOCTL_READDIR_BOTH;\n \tbreak;\n \tcase VFAT_IOCTL_READDIR_SHORT32:\n \tcmd = VFAT_IOCTL_READDIR_SHORT;\n \tbreak;\n\t}\n\n\tset_fs(KERNEL_DS);\n\tret = sys_ioctl(fd,cmd,(unsigned long)&d);\n\tset_fs(oldfs);\n\tif (ret >= 0) {\n\t\tret |= put_dirent32(&d[0], p);\n\t\tret |= put_dirent32(&d[1], p + 1);\n\t}\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-20","original_id":"diversevul-balanced-positive-20","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nput_dirent32 (struct dirent *d, struct compat_dirent __user *d32)\n{\n if (!access_ok(VERIFY_WRITE, d32, sizeof(struct compat_dirent)))\n return -EFAULT;\n\n __put_user(d->d_ino, &d32->d_ino);\n __put_user(d->d_off, &d32->d_off);\n __put_user(d->d_reclen, &d32->d_reclen);\n if (__copy_to_user(d32->d_name, d->d_name, d->d_reclen))\n\t\treturn -EFAULT;\n\n return 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-21","original_id":"diversevul-balanced-positive-21","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nunsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *regs)\n{\n\tunsigned long addr, seg;\n\n\taddr = regs->rip;\n\tseg = regs->cs & 0xffff;\n\n\t/*\n\t * We'll assume that the code segments in the GDT\n\t * are all zero-based. That is largely true: the\n\t * TLS segments are used for data, and the PNPBIOS\n\t * and APM bios ones we just ignore here.\n\t */\n\tif (seg & LDT_SEGMENT) {\n\t\tu32 *desc;\n\t\tunsigned long base;\n\n\t\tdown(&child->mm->context.sem);\n\t\tdesc = child->mm->context.ldt + (seg & ~7);\n\t\tbase = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);\n\n\t\t/* 16-bit code segment? */\n\t\tif (!((desc[1] >> 22) & 1))\n\t\t\taddr &= 0xffff;\n\t\taddr += base;\n\t\tup(&child->mm->context.sem);\n\t}\n\treturn addr;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-22","original_id":"diversevul-balanced-positive-22","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_regs *regs)\n{\n\tunsigned long addr, seg;\n\n\taddr = regs->eip;\n\tseg = regs->xcs & 0xffff;\n\tif (regs->eflags & VM_MASK) {\n\t\taddr = (addr & 0xffff) + (seg << 4);\n\t\treturn addr;\n\t}\n\n\t/*\n\t * We'll assume that the code segments in the GDT\n\t * are all zero-based. That is largely true: the\n\t * TLS segments are used for data, and the PNPBIOS\n\t * and APM bios ones we just ignore here.\n\t */\n\tif (seg & LDT_SEGMENT) {\n\t\tu32 *desc;\n\t\tunsigned long base;\n\n\t\tdown(&child->mm->context.sem);\n\t\tdesc = child->mm->context.ldt + (seg & ~7);\n\t\tbase = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);\n\n\t\t/* 16-bit code segment? */\n\t\tif (!((desc[1] >> 22) & 1))\n\t\t\taddr &= 0xffff;\n\t\taddr += base;\n\t\tup(&child->mm->context.sem);\n\t}\n\treturn addr;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-23","original_id":"diversevul-balanced-positive-23","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\npfm_setup_buffer_fmt(struct task_struct *task, pfm_context_t *ctx, unsigned int ctx_flags,\n\t\t unsigned int cpu, pfarg_context_t *arg)\n{\n\tpfm_buffer_fmt_t *fmt = NULL;\n\tunsigned long size = 0UL;\n\tvoid *uaddr = NULL;\n\tvoid *fmt_arg = NULL;\n\tint ret = 0;\n#define PFM_CTXARG_BUF_ARG(a)\t(pfm_buffer_fmt_t *)(a+1)\n\n\t/* invoke and lock buffer format, if found */\n\tfmt = pfm_find_buffer_fmt(arg->ctx_smpl_buf_id);\n\tif (fmt == NULL) {\n\t\tDPRINT((\"[%d] cannot find buffer format\\n\", task->pid));\n\t\treturn -EINVAL;\n\t}\n\n\t/*\n\t * buffer argument MUST be contiguous to pfarg_context_t\n\t */\n\tif (fmt->fmt_arg_size) fmt_arg = PFM_CTXARG_BUF_ARG(arg);\n\n\tret = pfm_buf_fmt_validate(fmt, task, ctx_flags, cpu, fmt_arg);\n\n\tDPRINT((\"[%d] after validate(0x%x,%d,%p)=%d\\n\", task->pid, ctx_flags, cpu, fmt_arg, ret));\n\n\tif (ret) goto error;\n\n\t/* link buffer format and context */\n\tctx->ctx_buf_fmt = fmt;\n\n\t/*\n\t * check if buffer format wants to use perfmon buffer allocation/mapping service\n\t */\n\tret = pfm_buf_fmt_getsize(fmt, task, ctx_flags, cpu, fmt_arg, &size);\n\tif (ret) goto error;\n\n\tif (size) {\n\t\t/*\n\t\t * buffer is always remapped into the caller's address space\n\t\t */\n\t\tret = pfm_smpl_buffer_alloc(current, ctx, size, &uaddr);\n\t\tif (ret) goto error;\n\n\t\t/* keep track of user address of buffer */\n\t\targ->ctx_smpl_vaddr = uaddr;\n\t}\n\tret = pfm_buf_fmt_init(fmt, task, ctx->ctx_smpl_hdr, ctx_flags, cpu, fmt_arg);\n\nerror:\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-24","original_id":"diversevul-balanced-positive-24","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int __init snd_mem_init(void)\n{\n#ifdef CONFIG_PROC_FS\n\tsnd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);\n\tif (snd_mem_proc) {\n\t\tsnd_mem_proc->read_proc = snd_mem_proc_read;\n#ifdef CONFIG_PCI\n\t\tsnd_mem_proc->write_proc = snd_mem_proc_write;\n#endif\n\t}\n#endif\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-25","original_id":"diversevul-balanced-positive-25","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int snd_mem_proc_read(char *page, char **start, off_t off,\n\t\t\t int count, int *eof, void *data)\n{\n\tint len = 0;\n\tlong pages = snd_allocated_pages >> (PAGE_SHIFT-12);\n\tstruct snd_mem_list *mem;\n\tint devno;\n\tstatic char *types[] = { \"UNKNOWN\", \"CONT\", \"DEV\", \"DEV-SG\", \"SBUS\" };\n\n\tmutex_lock(&list_mutex);\n\tlen += snprintf(page + len, count - len,\n\t\t\t\"pages : %li bytes (%li pages per %likB)\\n\",\n\t\t\tpages * PAGE_SIZE, pages, PAGE_SIZE / 1024);\n\tdevno = 0;\n\tlist_for_each_entry(mem, &mem_list_head, list) {\n\t\tdevno++;\n\t\tlen += snprintf(page + len, count - len,\n\t\t\t\t\"buffer %d : ID %08x : type %s\\n\",\n\t\t\t\tdevno, mem->id, types[mem->buffer.dev.type]);\n\t\tlen += snprintf(page + len, count - len,\n\t\t\t\t\" addr = 0x%lx, size = %d bytes\\n\",\n\t\t\t\t(unsigned long)mem->buffer.addr, (int)mem->buffer.bytes);\n\t}\n\tmutex_unlock(&list_mutex);\n\treturn len;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-26","original_id":"diversevul-balanced-positive-26","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int putreg(struct task_struct *child,\n\tunsigned long regno, unsigned long value)\n{\n\tunsigned long tmp; \n\t\n\t/* Some code in the 64bit emulation may not be 64bit clean.\n\t Don't take any chances. */\n\tif (test_tsk_thread_flag(child, TIF_IA32))\n\t\tvalue &= 0xffffffff;\n\tswitch (regno) {\n\t\tcase offsetof(struct user_regs_struct,fs):\n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.fsindex = value & 0xffff; \n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,gs):\n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.gsindex = value & 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,ds):\n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.ds = value & 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,es): \n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.es = value & 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,ss):\n\t\t\tif ((value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tvalue &= 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,fs_base):\n\t\t\tif (value >= TASK_SIZE_OF(child))\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.fs = value;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,gs_base):\n\t\t\tif (value >= TASK_SIZE_OF(child))\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.gs = value;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct, eflags):\n\t\t\tvalue &= FLAG_MASK;\n\t\t\ttmp = get_stack_long(child, EFL_OFFSET); \n\t\t\ttmp &= ~FLAG_MASK; \n\t\t\tvalue |= tmp;\n\t\t\tbreak;\n\t\tcase offsetof(struct user_regs_struct,cs): \n\t\t\tif ((value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tvalue &= 0xffff;\n\t\t\tbreak;\n\t}\n\tput_stack_long(child, regno - sizeof(struct pt_regs), value);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-27","original_id":"diversevul-balanced-positive-27","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int pwc_video_close(struct inode *inode, struct file *file)\n{\n\tstruct video_device *vdev = file->private_data;\n\tstruct pwc_device *pdev;\n\tint i;\n\n\tPWC_DEBUG_OPEN(\">> video_close called(vdev = 0x%p).\\n\", vdev);\n\n\tpdev = (struct pwc_device *)vdev->priv;\n\tif (pdev->vopen == 0)\n\t\tPWC_DEBUG_MODULE(\"video_close() called on closed device?\\n\");\n\n\t/* Dump statistics, but only if a reasonable amount of frames were\n\t processed (to prevent endless log-entries in case of snap-shot\n\t programs)\n\t */\n\tif (pdev->vframe_count > 20)\n\t\tPWC_DEBUG_MODULE(\"Closing video device: %d frames received, dumped %d frames, %d frames with errors.\\n\", pdev->vframe_count, pdev->vframes_dumped, pdev->vframes_error);\n\n\tif (DEVICE_USE_CODEC1(pdev->type))\n\t pwc_dec1_exit();\n\telse\n\t pwc_dec23_exit();\n\n\tpwc_isoc_cleanup(pdev);\n\tpwc_free_buffers(pdev);\n\n\t/* Turn off LEDS and power down camera, but only when not unplugged */\n\tif (pdev->error_status != EPIPE) {\n\t\t/* Turn LEDs off */\n\t\tif (pwc_set_leds(pdev, 0, 0) < 0)\n\t\t\tPWC_DEBUG_MODULE(\"Failed to set LED on/off time.\\n\");\n\t\tif (power_save) {\n\t\t\ti = pwc_camera_power(pdev, 0);\n\t\t\tif (i < 0)\n\t\t\t\tPWC_ERROR(\"Failed to power down camera (%d)\\n\", i);\n\t\t}\n\t}\n\tpdev->vopen--;\n\tPWC_DEBUG_OPEN(\"<< video_close() vopen=%d\\n\", pdev->vopen);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-28","original_id":"diversevul-balanced-positive-28","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void usb_pwc_disconnect(struct usb_interface *intf)\n{\n\tstruct pwc_device *pdev;\n\tint hint;\n\n\tlock_kernel();\n\tpdev = usb_get_intfdata (intf);\n\tusb_set_intfdata (intf, NULL);\n\tif (pdev == NULL) {\n\t\tPWC_ERROR(\"pwc_disconnect() Called without private pointer.\\n\");\n\t\tgoto disconnect_out;\n\t}\n\tif (pdev->udev == NULL) {\n\t\tPWC_ERROR(\"pwc_disconnect() already called for %p\\n\", pdev);\n\t\tgoto disconnect_out;\n\t}\n\tif (pdev->udev != interface_to_usbdev(intf)) {\n\t\tPWC_ERROR(\"pwc_disconnect() Woops: pointer mismatch udev/pdev.\\n\");\n\t\tgoto disconnect_out;\n\t}\n\n\t/* We got unplugged; this is signalled by an EPIPE error code */\n\tif (pdev->vopen) {\n\t\tPWC_INFO(\"Disconnected while webcam is in use!\\n\");\n\t\tpdev->error_status = EPIPE;\n\t}\n\n\t/* Alert waiting processes */\n\twake_up_interruptible(&pdev->frameq);\n\t/* Wait until device is closed */\n\twhile (pdev->vopen)\n\t\tschedule();\n\t/* Device is now closed, so we can safely unregister it */\n\tPWC_DEBUG_PROBE(\"Unregistering video device in disconnect().\\n\");\n\tpwc_remove_sysfs_files(pdev->vdev);\n\tvideo_unregister_device(pdev->vdev);\n\n\t/* Free memory (don't set pdev to 0 just yet) */\n\tkfree(pdev);\n\ndisconnect_out:\n\t/* search device_hint[] table if we occupy a slot, by any chance */\n\tfor (hint = 0; hint < MAX_DEV_HINTS; hint++)\n\t\tif (device_hint[hint].pdev == pdev)\n\t\t\tdevice_hint[hint].pdev = NULL;\n\n\tunlock_kernel();\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-29","original_id":"diversevul-balanced-positive-29","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int return_EIO(void)\n{\n\treturn -EIO;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-30","original_id":"diversevul-balanced-positive-30","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid make_bad_inode(struct inode * inode) \n{\n\tremove_inode_hash(inode);\n\n\tinode->i_mode = S_IFREG;\n\tinode->i_atime = inode->i_mtime = inode->i_ctime =\n\t\tcurrent_fs_time(inode->i_sb);\n\tinode->i_op = &bad_inode_ops;\t\n\tinode->i_fop = &bad_file_ops;\t\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-31","original_id":"diversevul-balanced-positive-31","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint is_bad_inode(struct inode * inode) \n{\n\treturn (inode->i_op == &bad_inode_ops);\t\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-32","original_id":"diversevul-balanced-positive-32","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid hash_preload(struct mm_struct *mm, unsigned long ea,\n\t\t unsigned long access, unsigned long trap)\n{\n\tunsigned long vsid;\n\tvoid *pgdir;\n\tpte_t *ptep;\n\tcpumask_t mask;\n\tunsigned long flags;\n\tint local = 0;\n\n\t/* We don't want huge pages prefaulted for now\n\t */\n\tif (unlikely(in_hugepage_area(mm->context, ea)))\n\t\treturn;\n\n\tDBG_LOW(\"hash_preload(mm=%p, mm->pgdir=%p, ea=%016lx, access=%lx,\"\n\t\t\" trap=%lx\\n\", mm, mm->pgd, ea, access, trap);\n\n\t/* Get PTE, VSID, access mask */\n\tpgdir = mm->pgd;\n\tif (pgdir == NULL)\n\t\treturn;\n\tptep = find_linux_pte(pgdir, ea);\n\tif (!ptep)\n\t\treturn;\n\tvsid = get_vsid(mm->context.id, ea);\n\n\t/* Hash it in */\n\tlocal_irq_save(flags);\n\tmask = cpumask_of_cpu(smp_processor_id());\n\tif (cpus_equal(mm->cpu_vm_mask, mask))\n\t\tlocal = 1;\n#ifndef CONFIG_PPC_64K_PAGES\n\t__hash_page_4K(ea, access, vsid, ptep, trap, local);\n#else\n\tif (mmu_ci_restrictions) {\n\t\t/* If this PTE is non-cacheable, switch to 4k */\n\t\tif (mm->context.user_psize == MMU_PAGE_64K &&\n\t\t (pte_val(*ptep) & _PAGE_NO_CACHE)) {\n\t\t\tmm->context.user_psize = MMU_PAGE_4K;\n\t\t\tmm->context.sllp = SLB_VSID_USER |\n\t\t\t\tmmu_psize_defs[MMU_PAGE_4K].sllp;\n\t\t\tget_paca()->context = mm->context;\n\t\t\tslb_flush_and_rebolt();\n#ifdef CONFIG_SPE_BASE\n\t\t\tspu_flush_all_slbs(mm);\n#endif\n\t\t}\n\t}\n\tif (mm->context.user_psize == MMU_PAGE_64K)\n\t\t__hash_page_64K(ea, access, vsid, ptep, trap, local);\n\telse\n\t\t__hash_page_4K(ea, access, vsid, ptep, trap, local);\n#endif /* CONFIG_PPC_64K_PAGES */\n\tlocal_irq_restore(flags);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-33","original_id":"diversevul-balanced-positive-33","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_dccp_getsockopt(struct sock *sk, int level, int optname,\n\t\t char __user *optval, int __user *optlen)\n{\n\tstruct dccp_sock *dp;\n\tint val, len;\n\n\tif (get_user(len, optlen))\n\t\treturn -EFAULT;\n\n\tif (len < sizeof(int))\n\t\treturn -EINVAL;\n\n\tdp = dccp_sk(sk);\n\n\tswitch (optname) {\n\tcase DCCP_SOCKOPT_PACKET_SIZE:\n\t\tDCCP_WARN(\"sockopt(PACKET_SIZE) is deprecated: fix your app\\n\");\n\t\treturn 0;\n\tcase DCCP_SOCKOPT_SERVICE:\n\t\treturn dccp_getsockopt_service(sk, len,\n\t\t\t\t\t (__be32 __user *)optval, optlen);\n\tcase DCCP_SOCKOPT_SEND_CSCOV:\n\t\tval = dp->dccps_pcslen;\n\t\tbreak;\n\tcase DCCP_SOCKOPT_RECV_CSCOV:\n\t\tval = dp->dccps_pcrlen;\n\t\tbreak;\n\tcase 128 ... 191:\n\t\treturn ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname,\n\t\t\t\t\t len, (u32 __user *)optval, optlen);\n\tcase 192 ... 255:\n\t\treturn ccid_hc_tx_getsockopt(dp->dccps_hc_tx_ccid, sk, optname,\n\t\t\t\t\t len, (u32 __user *)optval, optlen);\n\tdefault:\n\t\treturn -ENOPROTOOPT;\n\t}\n\n\tif (put_user(len, optlen) || copy_to_user(optval, &val, len))\n\t\treturn -EFAULT;\n\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-34","original_id":"diversevul-balanced-positive-34","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate,\n jas_stream_t *in, uint_fast16_t len)\n{\n\tuint_fast8_t tmp;\n\tint n;\n\tint i;\n\n\t/* Eliminate compiler warning about unused variables. */\n\tcstate = 0;\n\n\tn = 0;\n\tif (jpc_getuint8(in, &tmp)) {\n\t\treturn -1;\n\t}\n\t++n;\n\tcompparms->qntsty = tmp & 0x1f;\n\tcompparms->numguard = (tmp >> 5) & 7;\n\tswitch (compparms->qntsty) {\n\tcase JPC_QCX_SIQNT:\n\t\tcompparms->numstepsizes = 1;\n\t\tbreak;\n\tcase JPC_QCX_NOQNT:\n\t\tcompparms->numstepsizes = (len - n);\n\t\tbreak;\n\tcase JPC_QCX_SEQNT:\n\t\t/* XXX - this is a hack */\n\t\tcompparms->numstepsizes = (len - n) / 2;\n\t\tbreak;\n\t}\n\tif (compparms->numstepsizes > 0) {\n\t\tcompparms->stepsizes = jas_alloc2(compparms->numstepsizes,\n\t\t sizeof(uint_fast16_t));\n\t\tassert(compparms->stepsizes);\n\t\tfor (i = 0; i < compparms->numstepsizes; ++i) {\n\t\t\tif (compparms->qntsty == JPC_QCX_NOQNT) {\n\t\t\t\tif (jpc_getuint8(in, &tmp)) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tcompparms->stepsizes[i] = JPC_QCX_EXPN(tmp >> 3);\n\t\t\t} else {\n\t\t\t\tif (jpc_getuint16(in, &compparms->stepsizes[i])) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tcompparms->stepsizes = 0;\n\t}\n\tif (jas_stream_error(in) || jas_stream_eof(in)) {\n\t\tjpc_qcx_destroycompparms(compparms);\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-35","original_id":"diversevul-balanced-positive-35","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nisdn_net_addphone(isdn_net_ioctl_phone * phone)\n{\n\tisdn_net_dev *p = isdn_net_findif(phone->name);\n\tisdn_net_phone *n;\n\n\tif (p) {\n\t\tif (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL)))\n\t\t\treturn -ENOMEM;\n\t\tstrcpy(n->num, phone->phone);\n\t\tn->next = p->local->phone[phone->outgoing & 1];\n\t\tp->local->phone[phone->outgoing & 1] = n;\n\t\treturn 0;\n\t}\n\treturn -ENODEV;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-36","original_id":"diversevul-balanced-positive-36","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int esp6_input(struct xfrm_state *x, struct sk_buff *skb)\n{\n\tstruct ip_esp_hdr *esph;\n\tstruct esp_data *esp = x->data;\n\tstruct crypto_aead *aead = esp->aead;\n\tstruct aead_request *req;\n\tstruct sk_buff *trailer;\n\tint elen = skb->len - sizeof(*esph) - crypto_aead_ivsize(aead);\n\tint nfrags;\n\tint ret = 0;\n\tvoid *tmp;\n\tu8 *iv;\n\tstruct scatterlist *sg;\n\tstruct scatterlist *asg;\n\n\tif (!pskb_may_pull(skb, sizeof(*esph))) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tif (elen <= 0) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tif ((nfrags = skb_cow_data(skb, 0, &trailer)) < 0) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tret = -ENOMEM;\n\ttmp = esp_alloc_tmp(aead, nfrags + 1);\n\tif (!tmp)\n\t\tgoto out;\n\n\tESP_SKB_CB(skb)->tmp = tmp;\n\tiv = esp_tmp_iv(aead, tmp);\n\treq = esp_tmp_req(aead, iv);\n\tasg = esp_req_sg(aead, req);\n\tsg = asg + 1;\n\n\tskb->ip_summed = CHECKSUM_NONE;\n\n\tesph = (struct ip_esp_hdr *)skb->data;\n\n\t/* Get ivec. This can be wrong, check against another impls. */\n\tiv = esph->enc_data;\n\n\tsg_init_table(sg, nfrags);\n\tskb_to_sgvec(skb, sg, sizeof(*esph) + crypto_aead_ivsize(aead), elen);\n\tsg_init_one(asg, esph, sizeof(*esph));\n\n\taead_request_set_callback(req, 0, esp_input_done, skb);\n\taead_request_set_crypt(req, sg, sg, elen, iv);\n\taead_request_set_assoc(req, asg, sizeof(*esph));\n\n\tret = crypto_aead_decrypt(req);\n\tif (ret == -EINPROGRESS)\n\t\tgoto out;\n\n\tret = esp_input_done2(skb, ret);\n\nout:\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-16"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-37","original_id":"diversevul-balanced-positive-37","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int esp_input(struct xfrm_state *x, struct sk_buff *skb)\n{\n\tstruct ip_esp_hdr *esph;\n\tstruct esp_data *esp = x->data;\n\tstruct crypto_aead *aead = esp->aead;\n\tstruct aead_request *req;\n\tstruct sk_buff *trailer;\n\tint elen = skb->len - sizeof(*esph) - crypto_aead_ivsize(aead);\n\tint nfrags;\n\tvoid *tmp;\n\tu8 *iv;\n\tstruct scatterlist *sg;\n\tstruct scatterlist *asg;\n\tint err = -EINVAL;\n\n\tif (!pskb_may_pull(skb, sizeof(*esph)))\n\t\tgoto out;\n\n\tif (elen <= 0)\n\t\tgoto out;\n\n\tif ((err = skb_cow_data(skb, 0, &trailer)) < 0)\n\t\tgoto out;\n\tnfrags = err;\n\n\terr = -ENOMEM;\n\ttmp = esp_alloc_tmp(aead, nfrags + 1);\n\tif (!tmp)\n\t\tgoto out;\n\n\tESP_SKB_CB(skb)->tmp = tmp;\n\tiv = esp_tmp_iv(aead, tmp);\n\treq = esp_tmp_req(aead, iv);\n\tasg = esp_req_sg(aead, req);\n\tsg = asg + 1;\n\n\tskb->ip_summed = CHECKSUM_NONE;\n\n\tesph = (struct ip_esp_hdr *)skb->data;\n\n\t/* Get ivec. This can be wrong, check against another impls. */\n\tiv = esph->enc_data;\n\n\tsg_init_table(sg, nfrags);\n\tskb_to_sgvec(skb, sg, sizeof(*esph) + crypto_aead_ivsize(aead), elen);\n\tsg_init_one(asg, esph, sizeof(*esph));\n\n\taead_request_set_callback(req, 0, esp_input_done, skb);\n\taead_request_set_crypt(req, sg, sg, elen, iv);\n\taead_request_set_assoc(req, asg, sizeof(*esph));\n\n\terr = crypto_aead_decrypt(req);\n\tif (err == -EINPROGRESS)\n\t\tgoto out;\n\n\terr = esp_input_done2(skb, err);\n\nout:\n\treturn err;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-16"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-38","original_id":"diversevul-balanced-positive-38","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nshmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx)\n{\n\treturn alloc_page(gfp | __GFP_ZERO);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-39","original_id":"diversevul-balanced-positive-39","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nshmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info,\n\t\t unsigned long idx)\n{\n\tstruct vm_area_struct pvma;\n\tstruct page *page;\n\n\tmemset(&pvma, 0, sizeof(struct vm_area_struct));\n\tpvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx);\n\tpvma.vm_pgoff = idx;\n\tpvma.vm_end = PAGE_SIZE;\n\tpage = alloc_page_vma(gfp | __GFP_ZERO, &pvma, 0);\n\tmpol_free(pvma.vm_policy);\n\treturn page;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-40","original_id":"diversevul-balanced-positive-40","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int copy_from_user_mmap_sem(void *dst, const void __user *src, size_t n)\n{\n\tint partial;\n\n\tpagefault_disable();\n\tpartial = __copy_from_user_inatomic(dst, src, n);\n\tpagefault_enable();\n\n\t/*\n\t * Didn't copy everything, drop the mmap_sem and do a faulting copy\n\t */\n\tif (unlikely(partial)) {\n\t\tup_read(&current->mm->mmap_sem);\n\t\tpartial = copy_from_user(dst, src, n);\n\t\tdown_read(&current->mm->mmap_sem);\n\t}\n\n\treturn partial;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-94"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-41","original_id":"diversevul-balanced-positive-41","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic long vmsplice_to_user(struct file *file, const struct iovec __user *iov,\n\t\t\t unsigned long nr_segs, unsigned int flags)\n{\n\tstruct pipe_inode_info *pipe;\n\tstruct splice_desc sd;\n\tssize_t size;\n\tint error;\n\tlong ret;\n\n\tpipe = pipe_info(file->f_path.dentry->d_inode);\n\tif (!pipe)\n\t\treturn -EBADF;\n\n\tif (pipe->inode)\n\t\tmutex_lock(&pipe->inode->i_mutex);\n\n\terror = ret = 0;\n\twhile (nr_segs) {\n\t\tvoid __user *base;\n\t\tsize_t len;\n\n\t\t/*\n\t\t * Get user address base and length for this iovec.\n\t\t */\n\t\terror = get_user(base, &iov->iov_base);\n\t\tif (unlikely(error))\n\t\t\tbreak;\n\t\terror = get_user(len, &iov->iov_len);\n\t\tif (unlikely(error))\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Sanity check this iovec. 0 read succeeds.\n\t\t */\n\t\tif (unlikely(!len))\n\t\t\tbreak;\n\t\tif (unlikely(!base)) {\n\t\t\terror = -EFAULT;\n\t\t\tbreak;\n\t\t}\n\n\t\tsd.len = 0;\n\t\tsd.total_len = len;\n\t\tsd.flags = flags;\n\t\tsd.u.userptr = base;\n\t\tsd.pos = 0;\n\n\t\tsize = __splice_from_pipe(pipe, &sd, pipe_to_user);\n\t\tif (size < 0) {\n\t\t\tif (!ret)\n\t\t\t\tret = size;\n\n\t\t\tbreak;\n\t\t}\n\n\t\tret += size;\n\n\t\tif (size < len)\n\t\t\tbreak;\n\n\t\tnr_segs--;\n\t\tiov++;\n\t}\n\n\tif (pipe->inode)\n\t\tmutex_unlock(&pipe->inode->i_mutex);\n\n\tif (!ret)\n\t\tret = error;\n\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-94"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-42","original_id":"diversevul-balanced-positive-42","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int get_iovec_page_array(const struct iovec __user *iov,\n\t\t\t\tunsigned int nr_vecs, struct page **pages,\n\t\t\t\tstruct partial_page *partial, int aligned)\n{\n\tint buffers = 0, error = 0;\n\n\tdown_read(&current->mm->mmap_sem);\n\n\twhile (nr_vecs) {\n\t\tunsigned long off, npages;\n\t\tstruct iovec entry;\n\t\tvoid __user *base;\n\t\tsize_t len;\n\t\tint i;\n\n\t\terror = -EFAULT;\n\t\tif (copy_from_user_mmap_sem(&entry, iov, sizeof(entry)))\n\t\t\tbreak;\n\n\t\tbase = entry.iov_base;\n\t\tlen = entry.iov_len;\n\n\t\t/*\n\t\t * Sanity check this iovec. 0 read succeeds.\n\t\t */\n\t\terror = 0;\n\t\tif (unlikely(!len))\n\t\t\tbreak;\n\t\terror = -EFAULT;\n\t\tif (unlikely(!base))\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Get this base offset and number of pages, then map\n\t\t * in the user pages.\n\t\t */\n\t\toff = (unsigned long) base & ~PAGE_MASK;\n\n\t\t/*\n\t\t * If asked for alignment, the offset must be zero and the\n\t\t * length a multiple of the PAGE_SIZE.\n\t\t */\n\t\terror = -EINVAL;\n\t\tif (aligned && (off || len & ~PAGE_MASK))\n\t\t\tbreak;\n\n\t\tnpages = (off + len + PAGE_SIZE - 1) >> PAGE_SHIFT;\n\t\tif (npages > PIPE_BUFFERS - buffers)\n\t\t\tnpages = PIPE_BUFFERS - buffers;\n\n\t\terror = get_user_pages(current, current->mm,\n\t\t\t\t (unsigned long) base, npages, 0, 0,\n\t\t\t\t &pages[buffers], NULL);\n\n\t\tif (unlikely(error <= 0))\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Fill this contiguous range into the partial page map.\n\t\t */\n\t\tfor (i = 0; i < error; i++) {\n\t\t\tconst int plen = min_t(size_t, len, PAGE_SIZE - off);\n\n\t\t\tpartial[buffers].offset = off;\n\t\t\tpartial[buffers].len = plen;\n\n\t\t\toff = 0;\n\t\t\tlen -= plen;\n\t\t\tbuffers++;\n\t\t}\n\n\t\t/*\n\t\t * We didn't complete this iov, stop here since it probably\n\t\t * means we have to move some of this into a pipe to\n\t\t * be able to continue.\n\t\t */\n\t\tif (len)\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Don't continue if we mapped fewer pages than we asked for,\n\t\t * or if we mapped the max number of pages that we have\n\t\t * room for.\n\t\t */\n\t\tif (error < npages || buffers == PIPE_BUFFERS)\n\t\t\tbreak;\n\n\t\tnr_vecs--;\n\t\tiov++;\n\t}\n\n\tup_read(&current->mm->mmap_sem);\n\n\tif (buffers)\n\t\treturn buffers;\n\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-94"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-43","original_id":"diversevul-balanced-positive-43","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)\n{\n\tstruct rlimit new_rlim, *old_rlim;\n\tunsigned long it_prof_secs;\n\tint retval;\n\n\tif (resource >= RLIM_NLIMITS)\n\t\treturn -EINVAL;\n\tif (copy_from_user(&new_rlim, rlim, sizeof(*rlim)))\n\t\treturn -EFAULT;\n\tif (new_rlim.rlim_cur > new_rlim.rlim_max)\n\t\treturn -EINVAL;\n\told_rlim = current->signal->rlim + resource;\n\tif ((new_rlim.rlim_max > old_rlim->rlim_max) &&\n\t !capable(CAP_SYS_RESOURCE))\n\t\treturn -EPERM;\n\tif (resource == RLIMIT_NOFILE && new_rlim.rlim_max > NR_OPEN)\n\t\treturn -EPERM;\n\n\tretval = security_task_setrlimit(resource, &new_rlim);\n\tif (retval)\n\t\treturn retval;\n\n\ttask_lock(current->group_leader);\n\t*old_rlim = new_rlim;\n\ttask_unlock(current->group_leader);\n\n\tif (resource != RLIMIT_CPU)\n\t\tgoto out;\n\n\t/*\n\t * RLIMIT_CPU handling. Note that the kernel fails to return an error\n\t * code if it rejected the user's attempt to set RLIMIT_CPU. This is a\n\t * very long-standing error, and fixing it now risks breakage of\n\t * applications, so we live with it\n\t */\n\tif (new_rlim.rlim_cur == RLIM_INFINITY)\n\t\tgoto out;\n\n\tit_prof_secs = cputime_to_secs(current->signal->it_prof_expires);\n\tif (it_prof_secs == 0 || new_rlim.rlim_cur <= it_prof_secs) {\n\t\tunsigned long rlim_cur = new_rlim.rlim_cur;\n\t\tcputime_t cputime;\n\n\t\tif (rlim_cur == 0) {\n\t\t\t/*\n\t\t\t * The caller is asking for an immediate RLIMIT_CPU\n\t\t\t * expiry. But we use the zero value to mean \"it was\n\t\t\t * never set\". So let's cheat and make it one second\n\t\t\t * instead\n\t\t\t */\n\t\t\trlim_cur = 1;\n\t\t}\n\t\tcputime = secs_to_cputime(rlim_cur);\n\t\tread_lock(&tasklist_lock);\n\t\tspin_lock_irq(&current->sighand->siglock);\n\t\tset_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);\n\t\tspin_unlock_irq(&current->sighand->siglock);\n\t\tread_unlock(&tasklist_lock);\n\t}\nout:\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-44","original_id":"diversevul-balanced-positive-44","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint ia32_setup_frame(int sig, struct k_sigaction *ka,\n\t\t compat_sigset_t *set, struct pt_regs *regs)\n{\n\tstruct sigframe __user *frame;\n\tvoid __user *restorer;\n\tint err = 0;\n\n\t/* copy_to_user optimizes that into a single 8 byte store */\n\tstatic const struct {\n\t\tu16 poplmovl;\n\t\tu32 val;\n\t\tu16 int80;\n\t\tu16 pad;\n\t} __attribute__((packed)) code = {\n\t\t0xb858,\t\t /* popl %eax ; movl $...,%eax */\n\t\t__NR_ia32_sigreturn,\n\t\t0x80cd,\t\t/* int $0x80 */\n\t\t0,\n\t};\n\n\tframe = get_sigframe(ka, regs, sizeof(*frame));\n\n\tif (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))\n\t\tgoto give_sigsegv;\n\n\terr |= __put_user(sig, &frame->sig);\n\tif (err)\n\t\tgoto give_sigsegv;\n\n\terr |= ia32_setup_sigcontext(&frame->sc, &frame->fpstate, regs,\n\t\t\t\t\tset->sig[0]);\n\tif (err)\n\t\tgoto give_sigsegv;\n\n\tif (_COMPAT_NSIG_WORDS > 1) {\n\t\terr |= __copy_to_user(frame->extramask, &set->sig[1],\n\t\t\t\t sizeof(frame->extramask));\n\t\tif (err)\n\t\t\tgoto give_sigsegv;\n\t}\n\n\tif (ka->sa.sa_flags & SA_RESTORER) {\n\t\trestorer = ka->sa.sa_restorer;\n\t} else {\n\t\t/* Return stub is in 32bit vsyscall page */\n\t\tif (current->binfmt->hasvdso)\n\t\t\trestorer = VDSO32_SYMBOL(current->mm->context.vdso,\n\t\t\t\t\t\t sigreturn);\n\t\telse\n\t\t\trestorer = &frame->retcode;\n\t}\n\terr |= __put_user(ptr_to_compat(restorer), &frame->pretcode);\n\n\t/*\n\t * These are actually not used anymore, but left because some\n\t * gdb versions depend on them as a marker.\n\t */\n\terr |= __copy_to_user(frame->retcode, &code, 8);\n\tif (err)\n\t\tgoto give_sigsegv;\n\n\t/* Set up registers for signal handler */\n\tregs->sp = (unsigned long) frame;\n\tregs->ip = (unsigned long) ka->sa.sa_handler;\n\n\t/* Make -mregparm=3 work */\n\tregs->ax = sig;\n\tregs->dx = 0;\n\tregs->cx = 0;\n\n\tasm volatile(\"movl %0,%%ds\" :: \"r\" (__USER32_DS));\n\tasm volatile(\"movl %0,%%es\" :: \"r\" (__USER32_DS));\n\n\tregs->cs = __USER32_CS;\n\tregs->ss = __USER32_DS;\n\n\tset_fs(USER_DS);\n\tregs->flags &= ~X86_EFLAGS_TF;\n\tif (test_thread_flag(TIF_SINGLESTEP))\n\t\tptrace_notify(SIGTRAP);\n\n#if DEBUG_SIG\n\tprintk(KERN_DEBUG \"SIG deliver (%s:%d): sp=%p pc=%lx ra=%u\\n\",\n\t current->comm, current->pid, frame, regs->ip, frame->pretcode);\n#endif\n\n\treturn 0;\n\ngive_sigsegv:\n\tforce_sigsegv(sig, current);\n\treturn -EFAULT;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-45","original_id":"diversevul-balanced-positive-45","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned long __peek_user(struct task_struct *child, addr_t addr)\n{\n\tstruct user *dummy = NULL;\n\taddr_t offset, tmp;\n\n\tif (addr < (addr_t) &dummy->regs.acrs) {\n\t\t/*\n\t\t * psw and gprs are stored on the stack\n\t\t */\n\t\ttmp = *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr);\n\t\tif (addr == (addr_t) &dummy->regs.psw.mask)\n\t\t\t/* Remove per bit from user psw. */\n\t\t\ttmp &= ~PSW_MASK_PER;\n\n\t} else if (addr < (addr_t) &dummy->regs.orig_gpr2) {\n\t\t/*\n\t\t * access registers are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.acrs;\n#ifdef CONFIG_64BIT\n\t\t/*\n\t\t * Very special case: old & broken 64 bit gdb reading\n\t\t * from acrs[15]. Result is a 64 bit value. Read the\n\t\t * 32 bit acrs[15] value and shift it by 32. Sick...\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.acrs[15])\n\t\t\ttmp = ((unsigned long) child->thread.acrs[15]) << 32;\n\t\telse\n#endif\n\t\ttmp = *(addr_t *)((addr_t) &child->thread.acrs + offset);\n\n\t} else if (addr == (addr_t) &dummy->regs.orig_gpr2) {\n\t\t/*\n\t\t * orig_gpr2 is stored on the kernel stack\n\t\t */\n\t\ttmp = (addr_t) task_pt_regs(child)->orig_gpr2;\n\n\t} else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) {\n\t\t/* \n\t\t * floating point regs. are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.fp_regs;\n\t\ttmp = *(addr_t *)((addr_t) &child->thread.fp_regs + offset);\n\t\tif (addr == (addr_t) &dummy->regs.fp_regs.fpc)\n\t\t\ttmp &= (unsigned long) FPC_VALID_MASK\n\t\t\t\t<< (BITS_PER_LONG - 32);\n\n\t} else if (addr < (addr_t) (&dummy->regs.per_info + 1)) {\n\t\t/*\n\t\t * per_info is found in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.per_info;\n\t\ttmp = *(addr_t *)((addr_t) &child->thread.per_info + offset);\n\n\t} else\n\t\ttmp = 0;\n\n\treturn tmp;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-46","original_id":"diversevul-balanced-positive-46","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int __poke_user(struct task_struct *child, addr_t addr, addr_t data)\n{\n\tstruct user *dummy = NULL;\n\taddr_t offset;\n\n\tif (addr < (addr_t) &dummy->regs.acrs) {\n\t\t/*\n\t\t * psw and gprs are stored on the stack\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.psw.mask &&\n#ifdef CONFIG_COMPAT\n\t\t data != PSW_MASK_MERGE(psw_user32_bits, data) &&\n#endif\n\t\t data != PSW_MASK_MERGE(psw_user_bits, data))\n\t\t\t/* Invalid psw mask. */\n\t\t\treturn -EINVAL;\n#ifndef CONFIG_64BIT\n\t\tif (addr == (addr_t) &dummy->regs.psw.addr)\n\t\t\t/* I'd like to reject addresses without the\n\t\t\t high order bit but older gdb's rely on it */\n\t\t\tdata |= PSW_ADDR_AMODE;\n#endif\n\t\t*(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;\n\n\t} else if (addr < (addr_t) (&dummy->regs.orig_gpr2)) {\n\t\t/*\n\t\t * access registers are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.acrs;\n#ifdef CONFIG_64BIT\n\t\t/*\n\t\t * Very special case: old & broken 64 bit gdb writing\n\t\t * to acrs[15] with a 64 bit value. Ignore the lower\n\t\t * half of the value and write the upper 32 bit to\n\t\t * acrs[15]. Sick...\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.acrs[15])\n\t\t\tchild->thread.acrs[15] = (unsigned int) (data >> 32);\n\t\telse\n#endif\n\t\t*(addr_t *)((addr_t) &child->thread.acrs + offset) = data;\n\n\t} else if (addr == (addr_t) &dummy->regs.orig_gpr2) {\n\t\t/*\n\t\t * orig_gpr2 is stored on the kernel stack\n\t\t */\n\t\ttask_pt_regs(child)->orig_gpr2 = data;\n\n\t} else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) {\n\t\t/*\n\t\t * floating point regs. are stored in the thread structure\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.fp_regs.fpc &&\n\t\t (data & ~((unsigned long) FPC_VALID_MASK\n\t\t\t << (BITS_PER_LONG - 32))) != 0)\n\t\t\treturn -EINVAL;\n\t\toffset = addr - (addr_t) &dummy->regs.fp_regs;\n\t\t*(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data;\n\n\t} else if (addr < (addr_t) (&dummy->regs.per_info + 1)) {\n\t\t/*\n\t\t * per_info is found in the thread structure \n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.per_info;\n\t\t*(addr_t *)((addr_t) &child->thread.per_info + offset) = data;\n\n\t}\n\n\tFixPerRegisters(child);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-47","original_id":"diversevul-balanced-positive-47","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u32 __peek_user_compat(struct task_struct *child, addr_t addr)\n{\n\tstruct user32 *dummy32 = NULL;\n\tper_struct32 *dummy_per32 = NULL;\n\taddr_t offset;\n\t__u32 tmp;\n\n\tif (addr < (addr_t) &dummy32->regs.acrs) {\n\t\t/*\n\t\t * psw and gprs are stored on the stack\n\t\t */\n\t\tif (addr == (addr_t) &dummy32->regs.psw.mask) {\n\t\t\t/* Fake a 31 bit psw mask. */\n\t\t\ttmp = (__u32)(task_pt_regs(child)->psw.mask >> 32);\n\t\t\ttmp = PSW32_MASK_MERGE(psw32_user_bits, tmp);\n\t\t} else if (addr == (addr_t) &dummy32->regs.psw.addr) {\n\t\t\t/* Fake a 31 bit psw address. */\n\t\t\ttmp = (__u32) task_pt_regs(child)->psw.addr |\n\t\t\t\tPSW32_ADDR_AMODE31;\n\t\t} else {\n\t\t\t/* gpr 0-15 */\n\t\t\ttmp = *(__u32 *)((addr_t) &task_pt_regs(child)->psw +\n\t\t\t\t\t addr*2 + 4);\n\t\t}\n\t} else if (addr < (addr_t) (&dummy32->regs.orig_gpr2)) {\n\t\t/*\n\t\t * access registers are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy32->regs.acrs;\n\t\ttmp = *(__u32*)((addr_t) &child->thread.acrs + offset);\n\n\t} else if (addr == (addr_t) (&dummy32->regs.orig_gpr2)) {\n\t\t/*\n\t\t * orig_gpr2 is stored on the kernel stack\n\t\t */\n\t\ttmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4);\n\n\t} else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) {\n\t\t/*\n\t\t * floating point regs. are stored in the thread structure \n\t\t */\n\t offset = addr - (addr_t) &dummy32->regs.fp_regs;\n\t\ttmp = *(__u32 *)((addr_t) &child->thread.fp_regs + offset);\n\n\t} else if (addr < (addr_t) (&dummy32->regs.per_info + 1)) {\n\t\t/*\n\t\t * per_info is found in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy32->regs.per_info;\n\t\t/* This is magic. See per_struct and per_struct32. */\n\t\tif ((offset >= (addr_t) &dummy_per32->control_regs &&\n\t\t offset < (addr_t) (&dummy_per32->control_regs + 1)) ||\n\t\t (offset >= (addr_t) &dummy_per32->starting_addr &&\n\t\t offset <= (addr_t) &dummy_per32->ending_addr) ||\n\t\t offset == (addr_t) &dummy_per32->lowcore.words.address)\n\t\t\toffset = offset*2 + 4;\n\t\telse\n\t\t\toffset = offset*2;\n\t\ttmp = *(__u32 *)((addr_t) &child->thread.per_info + offset);\n\n\t} else\n\t\ttmp = 0;\n\n\treturn tmp;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-48","original_id":"diversevul-balanced-positive-48","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)\n{\n\tstruct dnotify_struct *dn;\n\tstruct dnotify_struct *odn;\n\tstruct dnotify_struct **prev;\n\tstruct inode *inode;\n\tfl_owner_t id = current->files;\n\tint error = 0;\n\n\tif ((arg & ~DN_MULTISHOT) == 0) {\n\t\tdnotify_flush(filp, id);\n\t\treturn 0;\n\t}\n\tif (!dir_notify_enable)\n\t\treturn -EINVAL;\n\tinode = filp->f_path.dentry->d_inode;\n\tif (!S_ISDIR(inode->i_mode))\n\t\treturn -ENOTDIR;\n\tdn = kmem_cache_alloc(dn_cache, GFP_KERNEL);\n\tif (dn == NULL)\n\t\treturn -ENOMEM;\n\tspin_lock(&inode->i_lock);\n\tprev = &inode->i_dnotify;\n\twhile ((odn = *prev) != NULL) {\n\t\tif ((odn->dn_owner == id) && (odn->dn_filp == filp)) {\n\t\t\todn->dn_fd = fd;\n\t\t\todn->dn_mask |= arg;\n\t\t\tinode->i_dnotify_mask |= arg & ~DN_MULTISHOT;\n\t\t\tgoto out_free;\n\t\t}\n\t\tprev = &odn->dn_next;\n\t}\n\n\terror = __f_setown(filp, task_pid(current), PIDTYPE_PID, 0);\n\tif (error)\n\t\tgoto out_free;\n\n\tdn->dn_mask = arg;\n\tdn->dn_fd = fd;\n\tdn->dn_filp = filp;\n\tdn->dn_owner = id;\n\tinode->i_dnotify_mask |= arg & ~DN_MULTISHOT;\n\tdn->dn_next = inode->i_dnotify;\n\tinode->i_dnotify = dn;\n\tspin_unlock(&inode->i_lock);\n\n\tif (filp->f_op && filp->f_op->dir_notify)\n\t\treturn filp->f_op->dir_notify(filp, arg);\n\treturn 0;\n\nout_free:\n\tspin_unlock(&inode->i_lock);\n\tkmem_cache_free(dn_cache, dn);\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-49","original_id":"diversevul-balanced-positive-49","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nhrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)\n{\n\tunsigned long orun = 1;\n\tktime_t delta;\n\n\tdelta = ktime_sub(now, timer->expires);\n\n\tif (delta.tv64 < 0)\n\t\treturn 0;\n\n\tif (interval.tv64 < timer->base->resolution.tv64)\n\t\tinterval.tv64 = timer->base->resolution.tv64;\n\n\tif (unlikely(delta.tv64 >= interval.tv64)) {\n\t\ts64 incr = ktime_to_ns(interval);\n\n\t\torun = ktime_divns(delta, incr);\n\t\ttimer->expires = ktime_add_ns(timer->expires, incr * orun);\n\t\tif (timer->expires.tv64 > now.tv64)\n\t\t\treturn orun;\n\t\t/*\n\t\t * This (and the ktime_add() below) is the\n\t\t * correction for exact:\n\t\t */\n\t\torun++;\n\t}\n\ttimer->expires = ktime_add(timer->expires, interval);\n\n\treturn orun;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-50","original_id":"diversevul-balanced-positive-50","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nm4_mkstemp (struct obstack *obs, int argc, token_data **argv)\n{\n if (bad_argc (argv[0], argc, 2, 2))\n return;\n mkstemp_helper (obs, ARG (1));\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-51","original_id":"diversevul-balanced-positive-51","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nmkstemp_helper (struct obstack *obs, const char *name)\n{\n int fd;\n int len;\n int i;\n\n /* Guarantee that there are six trailing 'X' characters, even if the\n user forgot to supply them. */\n len = strlen (name);\n obstack_grow (obs, name, len);\n for (i = 0; len > 0 && i < 6; i++)\n if (name[--len] != 'X')\n break;\n for (; i < 6; i++)\n obstack_1grow (obs, 'X');\n obstack_1grow (obs, '\\0');\n\n errno = 0;\n fd = mkstemp ((char *) obstack_base (obs));\n if (fd < 0)\n {\n M4ERROR ((0, errno, \"cannot create tempfile `%s'\", name));\n obstack_free (obs, obstack_finish (obs));\n }\n else\n close (fd);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-52","original_id":"diversevul-balanced-positive-52","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nm4_maketemp (struct obstack *obs, int argc, token_data **argv)\n{\n if (bad_argc (argv[0], argc, 2, 2))\n return;\n if (no_gnu_extensions)\n {\n /* POSIX states \"any trailing 'X' characters [are] replaced with\n\t the current process ID as a string\", without referencing the\n\t file system. Horribly insecure, but we have to do it when we\n\t are in traditional mode.\n\n\t For reference, Solaris m4 does:\n\t maketemp() -> `'\n\t maketemp(X) -> `X'\n\t maketemp(XX) -> `Xn', where n is last digit of pid\n\t maketemp(XXXXXXXX) -> `X00nnnnn', where nnnnn is 16-bit pid\n */\n const char *str = ARG (1);\n int len = strlen (str);\n int i;\n int len2;\n\n M4ERROR ((warning_status, 0, \"recommend using mkstemp instead\"));\n for (i = len; i > 1; i--)\n\tif (str[i - 1] != 'X')\n\t break;\n obstack_grow (obs, str, i);\n str = ntoa ((int32_t) getpid (), 10);\n len2 = strlen (str);\n if (len2 > len - i)\n\tobstack_grow0 (obs, str + len2 - (len - i), len - i);\n else\n\t{\n\t while (i++ < len - len2)\n\t obstack_1grow (obs, '0');\n\t obstack_grow0 (obs, str, len2);\n\t}\n }\n else\n mkstemp_helper (obs, ARG (1));\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-53","original_id":"diversevul-balanced-positive-53","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned char asn1_oid_decode(struct asn1_ctx *ctx,\n\t\t\t\t unsigned char *eoc,\n\t\t\t\t unsigned long **oid,\n\t\t\t\t unsigned int *len)\n{\n\tunsigned long subid;\n\tunsigned int size;\n\tunsigned long *optr;\n\n\tsize = eoc - ctx->pointer + 1;\n\t*oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);\n\tif (*oid == NULL) {\n\t\tif (net_ratelimit())\n\t\t\tprintk(\"OOM in bsalg (%d)\\n\", __LINE__);\n\t\treturn 0;\n\t}\n\n\toptr = *oid;\n\n\tif (!asn1_subid_decode(ctx, &subid)) {\n\t\tkfree(*oid);\n\t\t*oid = NULL;\n\t\treturn 0;\n\t}\n\n\tif (subid < 40) {\n\t\toptr [0] = 0;\n\t\toptr [1] = subid;\n\t} else if (subid < 80) {\n\t\toptr [0] = 1;\n\t\toptr [1] = subid - 40;\n\t} else {\n\t\toptr [0] = 2;\n\t\toptr [1] = subid - 80;\n\t}\n\n\t*len = 2;\n\toptr += 2;\n\n\twhile (ctx->pointer < eoc) {\n\t\tif (++(*len) > size) {\n\t\t\tctx->error = ASN1_ERR_DEC_BADVALUE;\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!asn1_subid_decode(ctx, optr++)) {\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-54","original_id":"diversevul-balanced-positive-54","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasn1_oid_decode(struct asn1_ctx *ctx,\n\t\tunsigned char *eoc, unsigned long **oid, unsigned int *len)\n{\n\tunsigned long subid;\n\tunsigned int size;\n\tunsigned long *optr;\n\n\tsize = eoc - ctx->pointer + 1;\n\t*oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);\n\tif (*oid == NULL)\n\t\treturn 0;\n\n\toptr = *oid;\n\n\tif (!asn1_subid_decode(ctx, &subid)) {\n\t\tkfree(*oid);\n\t\t*oid = NULL;\n\t\treturn 0;\n\t}\n\n\tif (subid < 40) {\n\t\toptr[0] = 0;\n\t\toptr[1] = subid;\n\t} else if (subid < 80) {\n\t\toptr[0] = 1;\n\t\toptr[1] = subid - 40;\n\t} else {\n\t\toptr[0] = 2;\n\t\toptr[1] = subid - 80;\n\t}\n\n\t*len = 2;\n\toptr += 2;\n\n\twhile (ctx->pointer < eoc) {\n\t\tif (++(*len) > size) {\n\t\t\tctx->error = ASN1_ERR_DEC_BADVALUE;\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!asn1_subid_decode(ctx, optr++)) {\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-55","original_id":"diversevul-balanced-positive-55","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasn1_header_decode(struct asn1_ctx *ctx,\n\t\t unsigned char **eoc,\n\t\t unsigned int *cls, unsigned int *con, unsigned int *tag)\n{\n\tunsigned int def = 0;\n\tunsigned int len = 0;\n\n\tif (!asn1_id_decode(ctx, cls, con, tag))\n\t\treturn 0;\n\n\tif (!asn1_length_decode(ctx, &def, &len))\n\t\treturn 0;\n\n\tif (def)\n\t\t*eoc = ctx->pointer + len;\n\telse\n\t\t*eoc = NULL;\n\treturn 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-56","original_id":"diversevul-balanced-positive-56","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned char asn1_header_decode(struct asn1_ctx *ctx,\n\t\t\t\t\tunsigned char **eoc,\n\t\t\t\t\tunsigned int *cls,\n\t\t\t\t\tunsigned int *con,\n\t\t\t\t\tunsigned int *tag)\n{\n\tunsigned int def, len;\n\n\tif (!asn1_id_decode(ctx, cls, con, tag))\n\t\treturn 0;\n\n\tdef = len = 0;\n\tif (!asn1_length_decode(ctx, &def, &len))\n\t\treturn 0;\n\n\tif (def)\n\t\t*eoc = ctx->pointer + len;\n\telse\n\t\t*eoc = NULL;\n\treturn 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-57","original_id":"diversevul-balanced-positive-57","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned char asn1_length_decode(struct asn1_ctx *ctx,\n\t\t\t\t\tunsigned int *def,\n\t\t\t\t\tunsigned int *len)\n{\n\tunsigned char ch, cnt;\n\n\tif (!asn1_octet_decode(ctx, &ch))\n\t\treturn 0;\n\n\tif (ch == 0x80)\n\t\t*def = 0;\n\telse {\n\t\t*def = 1;\n\n\t\tif (ch < 0x80)\n\t\t\t*len = ch;\n\t\telse {\n\t\t\tcnt = ch & 0x7F;\n\t\t\t*len = 0;\n\n\t\t\twhile (cnt > 0) {\n\t\t\t\tif (!asn1_octet_decode(ctx, &ch))\n\t\t\t\t\treturn 0;\n\t\t\t\t*len <<= 8;\n\t\t\t\t*len |= ch;\n\t\t\t\tcnt--;\n\t\t\t}\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-58","original_id":"diversevul-balanced-positive-58","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasn1_length_decode(struct asn1_ctx *ctx, unsigned int *def, unsigned int *len)\n{\n\tunsigned char ch, cnt;\n\n\tif (!asn1_octet_decode(ctx, &ch))\n\t\treturn 0;\n\n\tif (ch == 0x80)\n\t\t*def = 0;\n\telse {\n\t\t*def = 1;\n\n\t\tif (ch < 0x80)\n\t\t\t*len = ch;\n\t\telse {\n\t\t\tcnt = (unsigned char) (ch & 0x7F);\n\t\t\t*len = 0;\n\n\t\t\twhile (cnt > 0) {\n\t\t\t\tif (!asn1_octet_decode(ctx, &ch))\n\t\t\t\t\treturn 0;\n\t\t\t\t*len <<= 8;\n\t\t\t\t*len |= ch;\n\t\t\t\tcnt--;\n\t\t\t}\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-59","original_id":"diversevul-balanced-positive-59","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ipip6_rcv(struct sk_buff *skb)\n{\n\tstruct iphdr *iph;\n\tstruct ip_tunnel *tunnel;\n\n\tif (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))\n\t\tgoto out;\n\n\tiph = ip_hdr(skb);\n\n\tread_lock(&ipip6_lock);\n\tif ((tunnel = ipip6_tunnel_lookup(dev_net(skb->dev),\n\t\t\t\t\tiph->saddr, iph->daddr)) != NULL) {\n\t\tsecpath_reset(skb);\n\t\tskb->mac_header = skb->network_header;\n\t\tskb_reset_network_header(skb);\n\t\tIPCB(skb)->flags = 0;\n\t\tskb->protocol = htons(ETH_P_IPV6);\n\t\tskb->pkt_type = PACKET_HOST;\n\n\t\tif ((tunnel->dev->priv_flags & IFF_ISATAP) &&\n\t\t !isatap_chksrc(skb, iph, tunnel)) {\n\t\t\ttunnel->stat.rx_errors++;\n\t\t\tread_unlock(&ipip6_lock);\n\t\t\tkfree_skb(skb);\n\t\t\treturn 0;\n\t\t}\n\t\ttunnel->stat.rx_packets++;\n\t\ttunnel->stat.rx_bytes += skb->len;\n\t\tskb->dev = tunnel->dev;\n\t\tdst_release(skb->dst);\n\t\tskb->dst = NULL;\n\t\tnf_reset(skb);\n\t\tipip6_ecn_decapsulate(iph, skb);\n\t\tnetif_rx(skb);\n\t\tread_unlock(&ipip6_lock);\n\t\treturn 0;\n\t}\n\n\ticmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);\n\tkfree_skb(skb);\n\tread_unlock(&ipip6_lock);\nout:\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-60","original_id":"diversevul-balanced-positive-60","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\tu64 slice = __sched_period(cfs_rq->nr_running);\n\n\tslice *= se->load.weight;\n\tdo_div(slice, cfs_rq->load.weight);\n\n\treturn slice;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-61","original_id":"diversevul-balanced-positive-61","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\treturn __sched_vslice(cfs_rq->load.weight + se->load.weight,\n\t\t\tcfs_rq->nr_running + 1);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-62","original_id":"diversevul-balanced-positive-62","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 __sched_vslice(unsigned long rq_weight, unsigned long nr_running)\n{\n\tu64 vslice = __sched_period(nr_running);\n\n\tvslice *= NICE_0_LOAD;\n\tdo_div(vslice, rq_weight);\n\n\treturn vslice;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-63","original_id":"diversevul-balanced-positive-63","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\treturn calc_delta_mine(__sched_period(cfs_rq->nr_running),\n\t\t\t se->load.weight, &cfs_rq->load);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-64","original_id":"diversevul-balanced-positive-64","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\tunsigned long nr_running = cfs_rq->nr_running;\n\tunsigned long weight;\n\tu64 vslice;\n\n\tif (!se->on_rq)\n\t\tnr_running++;\n\n\tvslice = __sched_period(nr_running);\n\n\tfor_each_sched_entity(se) {\n\t\tcfs_rq = cfs_rq_of(se);\n\n\t\tweight = cfs_rq->load.weight;\n\t\tif (!se->on_rq)\n\t\t\tweight += se->load.weight;\n\n\t\tvslice *= NICE_0_LOAD;\n\t\tdo_div(vslice, weight);\n\t}\n\n\treturn vslice;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-65","original_id":"diversevul-balanced-positive-65","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned long wakeup_gran(struct sched_entity *se)\n{\n\tunsigned long gran = sysctl_sched_wakeup_granularity;\n\n\t/*\n\t * More easily preempt - nice tasks, while not making\n\t * it harder for + nice tasks.\n\t */\n\tif (unlikely(se->load.weight > NICE_0_LOAD))\n\t\tgran = calc_delta_fair(gran, &se->load);\n\n\treturn gran;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-66","original_id":"diversevul-balanced-positive-66","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\tu64 slice = __sched_period(cfs_rq->nr_running);\n\n\tfor_each_sched_entity(se) {\n\t\tcfs_rq = cfs_rq_of(se);\n\n\t\tslice *= se->load.weight;\n\t\tdo_div(slice, cfs_rq->load.weight);\n\t}\n\n\n\treturn slice;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-67","original_id":"diversevul-balanced-positive-67","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncalc_delta_fair(unsigned long delta_exec, struct load_weight *lw)\n{\n\treturn calc_delta_mine(delta_exec, NICE_0_LOAD, lw);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-68","original_id":"diversevul-balanced-positive-68","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nplace_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)\n{\n\tu64 vruntime;\n\n\tif (first_fair(cfs_rq)) {\n\t\tvruntime = min_vruntime(cfs_rq->min_vruntime,\n\t\t\t\t__pick_next_entity(cfs_rq)->vruntime);\n\t} else\n\t\tvruntime = cfs_rq->min_vruntime;\n\n\t/*\n\t * The 'current' period is already promised to the current tasks,\n\t * however the extra weight of the new task will slow them down a\n\t * little, place the new task so that it fits in the slot that\n\t * stays open at the end.\n\t */\n\tif (initial && sched_feat(START_DEBIT))\n\t\tvruntime += sched_vslice_add(cfs_rq, se);\n\n\tif (!initial) {\n\t\t/* sleeps upto a single latency don't count. */\n\t\tif (sched_feat(NEW_FAIR_SLEEPERS)) {\n\t\t\tif (sched_feat(NORMALIZED_SLEEPER))\n\t\t\t\tvruntime -= calc_delta_fair(sysctl_sched_latency,\n\t\t\t\t\t\t&cfs_rq->load);\n\t\t\telse\n\t\t\t\tvruntime -= sysctl_sched_latency;\n\t\t}\n\n\t\t/* ensure we never gain time by being placed backwards. */\n\t\tvruntime = max_vruntime(se->vruntime, vruntime);\n\t}\n\n\tse->vruntime = vruntime;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-69","original_id":"diversevul-balanced-positive-69","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n__update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr,\n\t unsigned long delta_exec)\n{\n\tunsigned long delta_exec_weighted;\n\n\tschedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max));\n\n\tcurr->sum_exec_runtime += delta_exec;\n\tschedstat_add(cfs_rq, exec_clock, delta_exec);\n\tdelta_exec_weighted = delta_exec;\n\tif (unlikely(curr->load.weight != NICE_0_LOAD)) {\n\t\tdelta_exec_weighted = calc_delta_fair(delta_exec_weighted,\n\t\t\t\t\t\t\t&curr->load);\n\t}\n\tcurr->vruntime += delta_exec_weighted;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-70","original_id":"diversevul-balanced-positive-70","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_gnutls_server_name_recv_params (gnutls_session_t session,\n\t\t\t\t const opaque * data, size_t _data_size)\n{\n int i;\n const unsigned char *p;\n uint16_t len, type;\n ssize_t data_size = _data_size;\n int server_names = 0;\n\n if (session->security_parameters.entity == GNUTLS_SERVER)\n {\n DECR_LENGTH_RET (data_size, 2, 0);\n len = _gnutls_read_uint16 (data);\n\n if (len != data_size)\n\t{\n\t /* This is unexpected packet length, but\n\t * just ignore it, for now.\n\t */\n\t gnutls_assert ();\n\t return 0;\n\t}\n\n p = data + 2;\n\n /* Count all server_names in the packet. */\n while (data_size > 0)\n\t{\n\t DECR_LENGTH_RET (data_size, 1, 0);\n\t p++;\n\n\t DECR_LEN (data_size, 2);\n\t len = _gnutls_read_uint16 (p);\n\t p += 2;\n\n\t DECR_LENGTH_RET (data_size, len, 0);\n\t server_names++;\n\n\t p += len;\n\t}\n\n session->security_parameters.extensions.server_names_size =\n\tserver_names;\n if (server_names == 0)\n\treturn 0;\t\t/* no names found */\n\n /* we cannot accept more server names.\n */\n if (server_names > MAX_SERVER_NAME_EXTENSIONS)\n\tserver_names = MAX_SERVER_NAME_EXTENSIONS;\n\n p = data + 2;\n for (i = 0; i < server_names; i++)\n\t{\n\t type = *p;\n\t p++;\n\n\t len = _gnutls_read_uint16 (p);\n\t p += 2;\n\n\t switch (type)\n\t {\n\t case 0:\t\t/* NAME_DNS */\n\t if (len <= MAX_SERVER_NAME_SIZE)\n\t\t{\n\t\t memcpy (session->security_parameters.extensions.\n\t\t\t server_names[i].name, p, len);\n\t\t session->security_parameters.extensions.\n\t\t server_names[i].name_length = len;\n\t\t session->security_parameters.extensions.\n\t\t server_names[i].type = GNUTLS_NAME_DNS;\n\t\t break;\n\t\t}\n\t }\n\n\t /* move to next record */\n\t p += len;\n\t}\n }\n return 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-71","original_id":"diversevul-balanced-positive-71","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_pages_stat(struct mm_struct *mm, struct page_to_node *pm)\n{\n\tdown_read(&mm->mmap_sem);\n\n\tfor ( ; pm->node != MAX_NUMNODES; pm++) {\n\t\tstruct vm_area_struct *vma;\n\t\tstruct page *page;\n\t\tint err;\n\n\t\terr = -EFAULT;\n\t\tvma = find_vma(mm, pm->addr);\n\t\tif (!vma)\n\t\t\tgoto set_status;\n\n\t\tpage = follow_page(vma, pm->addr, 0);\n\t\terr = -ENOENT;\n\t\t/* Use PageReserved to check for zero page */\n\t\tif (!page || PageReserved(page))\n\t\t\tgoto set_status;\n\n\t\terr = page_to_nid(page);\nset_status:\n\t\tpm->status = err;\n\t}\n\n\tup_read(&mm->mmap_sem);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-72","original_id":"diversevul-balanced-positive-72","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_move_pages(struct mm_struct *mm, struct page_to_node *pm,\n\t\t\t\tint migrate_all)\n{\n\tint err;\n\tstruct page_to_node *pp;\n\tLIST_HEAD(pagelist);\n\n\tdown_read(&mm->mmap_sem);\n\n\t/*\n\t * Build a list of pages to migrate\n\t */\n\tmigrate_prep();\n\tfor (pp = pm; pp->node != MAX_NUMNODES; pp++) {\n\t\tstruct vm_area_struct *vma;\n\t\tstruct page *page;\n\n\t\t/*\n\t\t * A valid page pointer that will not match any of the\n\t\t * pages that will be moved.\n\t\t */\n\t\tpp->page = ZERO_PAGE(0);\n\n\t\terr = -EFAULT;\n\t\tvma = find_vma(mm, pp->addr);\n\t\tif (!vma || !vma_migratable(vma))\n\t\t\tgoto set_status;\n\n\t\tpage = follow_page(vma, pp->addr, FOLL_GET);\n\t\terr = -ENOENT;\n\t\tif (!page)\n\t\t\tgoto set_status;\n\n\t\tif (PageReserved(page))\t\t/* Check for zero page */\n\t\t\tgoto put_and_set;\n\n\t\tpp->page = page;\n\t\terr = page_to_nid(page);\n\n\t\tif (err == pp->node)\n\t\t\t/*\n\t\t\t * Node already in the right place\n\t\t\t */\n\t\t\tgoto put_and_set;\n\n\t\terr = -EACCES;\n\t\tif (page_mapcount(page) > 1 &&\n\t\t\t\t!migrate_all)\n\t\t\tgoto put_and_set;\n\n\t\terr = isolate_lru_page(page, &pagelist);\nput_and_set:\n\t\t/*\n\t\t * Either remove the duplicate refcount from\n\t\t * isolate_lru_page() or drop the page ref if it was\n\t\t * not isolated.\n\t\t */\n\t\tput_page(page);\nset_status:\n\t\tpp->status = err;\n\t}\n\n\tif (!list_empty(&pagelist))\n\t\terr = migrate_pages(&pagelist, new_page_node,\n\t\t\t\t(unsigned long)pm);\n\telse\n\t\terr = -ENOENT;\n\n\tup_read(&mm->mmap_sem);\n\treturn err;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-73","original_id":"diversevul-balanced-positive-73","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void dump_one_vdso_page(struct page *pg, struct page *upg)\n{\n\tprintk(\"kpg: %p (c:%d,f:%08lx)\", __va(page_to_pfn(pg) << PAGE_SHIFT),\n\t page_count(pg),\n\t pg->flags);\n\tif (upg/* && pg != upg*/) {\n\t\tprintk(\" upg: %p (c:%d,f:%08lx)\", __va(page_to_pfn(upg)\n\t\t\t\t\t\t << PAGE_SHIFT),\n\t\t page_count(upg),\n\t\t upg->flags);\n\t}\n\tprintk(\"\\n\");\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-74","original_id":"diversevul-balanced-positive-74","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct page *follow_page(struct vm_area_struct *vma, unsigned long address,\n\t\t\tunsigned int flags)\n{\n\tpgd_t *pgd;\n\tpud_t *pud;\n\tpmd_t *pmd;\n\tpte_t *ptep, pte;\n\tspinlock_t *ptl;\n\tstruct page *page;\n\tstruct mm_struct *mm = vma->vm_mm;\n\n\tpage = follow_huge_addr(mm, address, flags & FOLL_WRITE);\n\tif (!IS_ERR(page)) {\n\t\tBUG_ON(flags & FOLL_GET);\n\t\tgoto out;\n\t}\n\n\tpage = NULL;\n\tpgd = pgd_offset(mm, address);\n\tif (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))\n\t\tgoto no_page_table;\n\n\tpud = pud_offset(pgd, address);\n\tif (pud_none(*pud) || unlikely(pud_bad(*pud)))\n\t\tgoto no_page_table;\n\t\n\tpmd = pmd_offset(pud, address);\n\tif (pmd_none(*pmd))\n\t\tgoto no_page_table;\n\n\tif (pmd_huge(*pmd)) {\n\t\tBUG_ON(flags & FOLL_GET);\n\t\tpage = follow_huge_pmd(mm, address, pmd, flags & FOLL_WRITE);\n\t\tgoto out;\n\t}\n\n\tif (unlikely(pmd_bad(*pmd)))\n\t\tgoto no_page_table;\n\n\tptep = pte_offset_map_lock(mm, pmd, address, &ptl);\n\tif (!ptep)\n\t\tgoto out;\n\n\tpte = *ptep;\n\tif (!pte_present(pte))\n\t\tgoto unlock;\n\tif ((flags & FOLL_WRITE) && !pte_write(pte))\n\t\tgoto unlock;\n\tpage = vm_normal_page(vma, address, pte);\n\tif (unlikely(!page))\n\t\tgoto unlock;\n\n\tif (flags & FOLL_GET)\n\t\tget_page(page);\n\tif (flags & FOLL_TOUCH) {\n\t\tif ((flags & FOLL_WRITE) &&\n\t\t !pte_dirty(pte) && !PageDirty(page))\n\t\t\tset_page_dirty(page);\n\t\tmark_page_accessed(page);\n\t}\nunlock:\n\tpte_unmap_unlock(ptep, ptl);\nout:\n\treturn page;\n\nno_page_table:\n\t/*\n\t * When core dumping an enormous anonymous area that nobody\n\t * has touched so far, we don't want to allocate page tables.\n\t */\n\tif (flags & FOLL_ANON) {\n\t\tpage = ZERO_PAGE(0);\n\t\tif (flags & FOLL_GET)\n\t\t\tget_page(page);\n\t\tBUG_ON(flags & FOLL_WRITE);\n\t}\n\treturn page;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-75","original_id":"diversevul-balanced-positive-75","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_change_type(struct nameidata *nd, int flag)\n{\n\tstruct vfsmount *m, *mnt = nd->mnt;\n\tint recurse = flag & MS_REC;\n\tint type = flag & ~MS_REC;\n\n\tif (nd->dentry != nd->mnt->mnt_root)\n\t\treturn -EINVAL;\n\n\tdown_write(&namespace_sem);\n\tspin_lock(&vfsmount_lock);\n\tfor (m = mnt; m; m = (recurse ? next_mnt(m, mnt) : NULL))\n\t\tchange_mnt_propagation(m, type);\n\tspin_unlock(&vfsmount_lock);\n\tup_write(&namespace_sem);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-269"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-76","original_id":"diversevul-balanced-positive-76","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint udp_get_port(struct sock *sk, unsigned short snum,\n\t\t\tint (*scmp)(const struct sock *, const struct sock *))\n{\n\treturn __udp_lib_get_port(sk, snum, udp_hash, &udp_port_rover, scmp);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-77","original_id":"diversevul-balanced-positive-77","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint udplite_get_port(struct sock *sk, unsigned short p,\n\t\t int (*c)(const struct sock *, const struct sock *))\n{\n\treturn __udp_lib_get_port(sk, p, udplite_hash, &udplite_port_rover, c);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-78","original_id":"diversevul-balanced-positive-78","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline int __udp_lib_lport_inuse(__u16 num, struct hlist_head udptable[])\n{\n\tstruct sock *sk;\n\tstruct hlist_node *node;\n\n\tsk_for_each(sk, node, &udptable[num & (UDP_HTABLE_SIZE - 1)])\n\t\tif (sk->sk_hash == num)\n\t\t\treturn 1;\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-79","original_id":"diversevul-balanced-positive-79","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline void native_set_ldt(const void *addr, unsigned int entries)\n{\n\tif (likely(entries == 0))\n\t\tasm volatile(\"lldt %w0\"::\"q\" (0));\n\telse {\n\t\tunsigned cpu = smp_processor_id();\n\t\tldt_desc ldt;\n\n\t\tset_tssldt_descriptor(&ldt, (unsigned long)addr,\n\t\t\t\t DESC_LDT, entries * sizeof(ldt) - 1);\n\t\twrite_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT,\n\t\t\t\t&ldt, DESC_LDT);\n\t\tasm volatile(\"lldt %w0\"::\"q\" (GDT_ENTRY_LDT*8));\n\t}\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-80","original_id":"diversevul-balanced-positive-80","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nshmem_get_inode(struct super_block *sb, int mode, dev_t dev)\n{\n\tstruct inode *inode;\n\tstruct shmem_inode_info *info;\n\tstruct shmem_sb_info *sbinfo = SHMEM_SB(sb);\n\n\tif (shmem_reserve_inode(sb))\n\t\treturn NULL;\n\n\tinode = new_inode(sb);\n\tif (inode) {\n\t\tinode->i_mode = mode;\n\t\tinode->i_uid = current->fsuid;\n\t\tinode->i_gid = current->fsgid;\n\t\tinode->i_blocks = 0;\n\t\tinode->i_mapping->a_ops = &shmem_aops;\n\t\tinode->i_mapping->backing_dev_info = &shmem_backing_dev_info;\n\t\tinode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;\n\t\tinode->i_generation = get_seconds();\n\t\tinfo = SHMEM_I(inode);\n\t\tmemset(info, 0, (char *)inode - (char *)info);\n\t\tspin_lock_init(&info->lock);\n\t\tINIT_LIST_HEAD(&info->swaplist);\n\n\t\tswitch (mode & S_IFMT) {\n\t\tdefault:\n\t\t\tinode->i_op = &shmem_special_inode_operations;\n\t\t\tinit_special_inode(inode, mode, dev);\n\t\t\tbreak;\n\t\tcase S_IFREG:\n\t\t\tinode->i_op = &shmem_inode_operations;\n\t\t\tinode->i_fop = &shmem_file_operations;\n\t\t\tmpol_shared_policy_init(&info->policy,\n\t\t\t\t\t\t shmem_get_sbmpol(sbinfo));\n\t\t\tbreak;\n\t\tcase S_IFDIR:\n\t\t\tinc_nlink(inode);\n\t\t\t/* Some things misbehave if size == 0 on a directory */\n\t\t\tinode->i_size = 2 * BOGO_DIRENT_SIZE;\n\t\t\tinode->i_op = &shmem_dir_inode_operations;\n\t\t\tinode->i_fop = &simple_dir_operations;\n\t\t\tbreak;\n\t\tcase S_IFLNK:\n\t\t\t/*\n\t\t\t * Must not load anything in the rbtree,\n\t\t\t * mpol_free_shared_policy will not be called.\n\t\t\t */\n\t\t\tmpol_shared_policy_init(&info->policy, NULL);\n\t\t\tbreak;\n\t\t}\n\t} else\n\t\tshmem_free_inode(sb);\n\treturn inode;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-81","original_id":"diversevul-balanced-positive-81","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *symname)\n{\n\tint error;\n\tint len;\n\tstruct inode *inode;\n\tstruct page *page = NULL;\n\tchar *kaddr;\n\tstruct shmem_inode_info *info;\n\n\tlen = strlen(symname) + 1;\n\tif (len > PAGE_CACHE_SIZE)\n\t\treturn -ENAMETOOLONG;\n\n\tinode = shmem_get_inode(dir->i_sb, S_IFLNK|S_IRWXUGO, 0);\n\tif (!inode)\n\t\treturn -ENOSPC;\n\n\terror = security_inode_init_security(inode, dir, NULL, NULL,\n\t\t\t\t\t NULL);\n\tif (error) {\n\t\tif (error != -EOPNOTSUPP) {\n\t\t\tiput(inode);\n\t\t\treturn error;\n\t\t}\n\t\terror = 0;\n\t}\n\n\tinfo = SHMEM_I(inode);\n\tinode->i_size = len-1;\n\tif (len <= (char *)inode - (char *)info) {\n\t\t/* do it inline */\n\t\tmemcpy(info, symname, len);\n\t\tinode->i_op = &shmem_symlink_inline_operations;\n\t} else {\n\t\terror = shmem_getpage(inode, 0, &page, SGP_WRITE, NULL);\n\t\tif (error) {\n\t\t\tiput(inode);\n\t\t\treturn error;\n\t\t}\n\t\tunlock_page(page);\n\t\tinode->i_op = &shmem_symlink_inode_operations;\n\t\tkaddr = kmap_atomic(page, KM_USER0);\n\t\tmemcpy(kaddr, symname, len);\n\t\tkunmap_atomic(kaddr, KM_USER0);\n\t\tset_page_dirty(page);\n\t\tpage_cache_release(page);\n\t}\n\tif (dir->i_mode & S_ISGID)\n\t\tinode->i_gid = dir->i_gid;\n\tdir->i_size += BOGO_DIRENT_SIZE;\n\tdir->i_ctime = dir->i_mtime = CURRENT_TIME;\n\td_instantiate(dentry, inode);\n\tdget(dentry);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-82","original_id":"diversevul-balanced-positive-82","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid iov_iter_advance(struct iov_iter *i, size_t bytes)\n{\n\tBUG_ON(i->count < bytes);\n\n\tif (likely(i->nr_segs == 1)) {\n\t\ti->iov_offset += bytes;\n\t\ti->count -= bytes;\n\t} else {\n\t\tconst struct iovec *iov = i->iov;\n\t\tsize_t base = i->iov_offset;\n\n\t\t/*\n\t\t * The !iov->iov_len check ensures we skip over unlikely\n\t\t * zero-length segments (without overruning the iovec).\n\t\t */\n\t\twhile (bytes || unlikely(!iov->iov_len && i->count)) {\n\t\t\tint copy;\n\n\t\t\tcopy = min(bytes, iov->iov_len - base);\n\t\t\tBUG_ON(!i->count || i->count < copy);\n\t\t\ti->count -= copy;\n\t\t\tbytes -= copy;\n\t\t\tbase += copy;\n\t\t\tif (iov->iov_len == base) {\n\t\t\t\tiov++;\n\t\t\t\tbase = 0;\n\t\t\t}\n\t\t}\n\t\ti->iov = iov;\n\t\ti->iov_offset = base;\n\t}\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-193"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-83","original_id":"diversevul-balanced-positive-83","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct dentry * real_lookup(struct dentry * parent, struct qstr * name, struct nameidata *nd)\n{\n\tstruct dentry * result;\n\tstruct inode *dir = parent->d_inode;\n\n\tmutex_lock(&dir->i_mutex);\n\t/*\n\t * First re-do the cached lookup just in case it was created\n\t * while we waited for the directory semaphore..\n\t *\n\t * FIXME! This could use version numbering or similar to\n\t * avoid unnecessary cache lookups.\n\t *\n\t * The \"dcache_lock\" is purely to protect the RCU list walker\n\t * from concurrent renames at this point (we mustn't get false\n\t * negatives from the RCU list walk here, unlike the optimistic\n\t * fast walk).\n\t *\n\t * so doing d_lookup() (with seqlock), instead of lockfree __d_lookup\n\t */\n\tresult = d_lookup(parent, name);\n\tif (!result) {\n\t\tstruct dentry * dentry = d_alloc(parent, name);\n\t\tresult = ERR_PTR(-ENOMEM);\n\t\tif (dentry) {\n\t\t\tresult = dir->i_op->lookup(dir, dentry, nd);\n\t\t\tif (result)\n\t\t\t\tdput(dentry);\n\t\t\telse\n\t\t\t\tresult = dentry;\n\t\t}\n\t\tmutex_unlock(&dir->i_mutex);\n\t\treturn result;\n\t}\n\n\t/*\n\t * Uhhuh! Nasty case: the cache was re-populated while\n\t * we waited on the semaphore. Need to revalidate.\n\t */\n\tmutex_unlock(&dir->i_mutex);\n\tif (result->d_op && result->d_op->d_revalidate) {\n\t\tresult = do_revalidate(result, nd);\n\t\tif (!result)\n\t\t\tresult = ERR_PTR(-ENOENT);\n\t}\n\treturn result;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-84","original_id":"diversevul-balanced-positive-84","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct dentry *__lookup_hash(struct qstr *name,\n\t\tstruct dentry *base, struct nameidata *nd)\n{\n\tstruct dentry *dentry;\n\tstruct inode *inode;\n\tint err;\n\n\tinode = base->d_inode;\n\n\t/*\n\t * See if the low-level filesystem might want\n\t * to use its own hash..\n\t */\n\tif (base->d_op && base->d_op->d_hash) {\n\t\terr = base->d_op->d_hash(base, name);\n\t\tdentry = ERR_PTR(err);\n\t\tif (err < 0)\n\t\t\tgoto out;\n\t}\n\n\tdentry = cached_lookup(base, name, nd);\n\tif (!dentry) {\n\t\tstruct dentry *new = d_alloc(base, name);\n\t\tdentry = ERR_PTR(-ENOMEM);\n\t\tif (!new)\n\t\t\tgoto out;\n\t\tdentry = inode->i_op->lookup(inode, new, nd);\n\t\tif (!dentry)\n\t\t\tdentry = new;\n\t\telse\n\t\t\tdput(new);\n\t}\nout:\n\treturn dentry;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-85","original_id":"diversevul-balanced-positive-85","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nsnd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf)\n{\n\tstruct seq_oss_synth *rec;\n\n\tif (dp->synths[dev].is_midi) {\n\t\tstruct midi_info minf;\n\t\tsnd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);\n\t\tinf->synth_type = SYNTH_TYPE_MIDI;\n\t\tinf->synth_subtype = 0;\n\t\tinf->nr_voices = 16;\n\t\tinf->device = dev;\n\t\tstrlcpy(inf->name, minf.name, sizeof(inf->name));\n\t} else {\n\t\tif ((rec = get_synthdev(dp, dev)) == NULL)\n\t\t\treturn -ENXIO;\n\t\tinf->synth_type = rec->synth_type;\n\t\tinf->synth_subtype = rec->synth_subtype;\n\t\tinf->nr_voices = rec->nr_voices;\n\t\tinf->device = dev;\n\t\tstrlcpy(inf->name, rec->name, sizeof(inf->name));\n\t\tsnd_use_lock_free(&rec->use_lock);\n\t}\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-86","original_id":"diversevul-balanced-positive-86","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void file_add_remove(struct diff_options *options,\n\t\t int addremove, unsigned mode,\n\t\t const unsigned char *sha1,\n\t\t const char *base, const char *path)\n{\n\tint diff = REV_TREE_DIFFERENT;\n\n\t/*\n\t * Is it an add of a new file? It means that the old tree\n\t * didn't have it at all, so we will turn \"REV_TREE_SAME\" ->\n\t * \"REV_TREE_NEW\", but leave any \"REV_TREE_DIFFERENT\" alone\n\t * (and if it already was \"REV_TREE_NEW\", we'll keep it\n\t * \"REV_TREE_NEW\" of course).\n\t */\n\tif (addremove == '+') {\n\t\tdiff = tree_difference;\n\t\tif (diff != REV_TREE_SAME)\n\t\t\treturn;\n\t\tdiff = REV_TREE_NEW;\n\t}\n\ttree_difference = diff;\n\tif (tree_difference == REV_TREE_DIFFERENT)\n\t\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-87","original_id":"diversevul-balanced-positive-87","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int show_modified(struct oneway_unpack_data *cbdata,\n\t\t\t struct cache_entry *old,\n\t\t\t struct cache_entry *new,\n\t\t\t int report_missing,\n\t\t\t int cached, int match_missing)\n{\n\tunsigned int mode, oldmode;\n\tconst unsigned char *sha1;\n\tstruct rev_info *revs = cbdata->revs;\n\n\tif (get_stat_data(new, &sha1, &mode, cached, match_missing, cbdata) < 0) {\n\t\tif (report_missing)\n\t\t\tdiff_index_show_file(revs, \"-\", old,\n\t\t\t\t\t old->sha1, old->ce_mode);\n\t\treturn -1;\n\t}\n\n\tif (revs->combine_merges && !cached &&\n\t (hashcmp(sha1, old->sha1) || hashcmp(old->sha1, new->sha1))) {\n\t\tstruct combine_diff_path *p;\n\t\tint pathlen = ce_namelen(new);\n\n\t\tp = xmalloc(combine_diff_path_size(2, pathlen));\n\t\tp->path = (char *) &p->parent[2];\n\t\tp->next = NULL;\n\t\tp->len = pathlen;\n\t\tmemcpy(p->path, new->name, pathlen);\n\t\tp->path[pathlen] = 0;\n\t\tp->mode = mode;\n\t\thashclr(p->sha1);\n\t\tmemset(p->parent, 0, 2 * sizeof(struct combine_diff_parent));\n\t\tp->parent[0].status = DIFF_STATUS_MODIFIED;\n\t\tp->parent[0].mode = new->ce_mode;\n\t\thashcpy(p->parent[0].sha1, new->sha1);\n\t\tp->parent[1].status = DIFF_STATUS_MODIFIED;\n\t\tp->parent[1].mode = old->ce_mode;\n\t\thashcpy(p->parent[1].sha1, old->sha1);\n\t\tshow_combined_diff(p, 2, revs->dense_combined_merges, revs);\n\t\tfree(p);\n\t\treturn 0;\n\t}\n\n\toldmode = old->ce_mode;\n\tif (mode == oldmode && !hashcmp(sha1, old->sha1) &&\n\t !DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))\n\t\treturn 0;\n\n\tdiff_change(&revs->diffopt, oldmode, mode,\n\t\t old->sha1, sha1, old->name, NULL);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-88","original_id":"diversevul-balanced-positive-88","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const char *base, int baselen, struct diff_options *opt)\n{\n\tunsigned mode1, mode2;\n\tconst char *path1, *path2;\n\tconst unsigned char *sha1, *sha2;\n\tint cmp, pathlen1, pathlen2;\n\n\tsha1 = tree_entry_extract(t1, &path1, &mode1);\n\tsha2 = tree_entry_extract(t2, &path2, &mode2);\n\n\tpathlen1 = tree_entry_len(path1, sha1);\n\tpathlen2 = tree_entry_len(path2, sha2);\n\tcmp = base_name_compare(path1, pathlen1, mode1, path2, pathlen2, mode2);\n\tif (cmp < 0) {\n\t\tshow_entry(opt, \"-\", t1, base, baselen);\n\t\treturn -1;\n\t}\n\tif (cmp > 0) {\n\t\tshow_entry(opt, \"+\", t2, base, baselen);\n\t\treturn 1;\n\t}\n\tif (!DIFF_OPT_TST(opt, FIND_COPIES_HARDER) && !hashcmp(sha1, sha2) && mode1 == mode2)\n\t\treturn 0;\n\n\t/*\n\t * If the filemode has changed to/from a directory from/to a regular\n\t * file, we need to consider it a remove and an add.\n\t */\n\tif (S_ISDIR(mode1) != S_ISDIR(mode2)) {\n\t\tshow_entry(opt, \"-\", t1, base, baselen);\n\t\tshow_entry(opt, \"+\", t2, base, baselen);\n\t\treturn 0;\n\t}\n\n\tif (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode1)) {\n\t\tint retval;\n\t\tchar *newbase = malloc_base(base, baselen, path1, pathlen1);\n\t\tif (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE))\n\t\t\topt->change(opt, mode1, mode2,\n\t\t\t\t sha1, sha2, base, path1);\n\t\tretval = diff_tree_sha1(sha1, sha2, newbase, opt);\n\t\tfree(newbase);\n\t\treturn retval;\n\t}\n\n\topt->change(opt, mode1, mode2, sha1, sha2, base, path1);\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-89","original_id":"diversevul-balanced-positive-89","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void diff_index_show_file(struct rev_info *revs,\n\t\t\t\t const char *prefix,\n\t\t\t\t struct cache_entry *ce,\n\t\t\t\t const unsigned char *sha1, unsigned int mode)\n{\n\tdiff_addremove(&revs->diffopt, prefix[0], mode,\n\t\t sha1, ce->name, NULL);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-90","original_id":"diversevul-balanced-positive-90","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid diff_addremove(struct diff_options *options,\n\t\t int addremove, unsigned mode,\n\t\t const unsigned char *sha1,\n\t\t const char *base, const char *path)\n{\n\tchar concatpath[PATH_MAX];\n\tstruct diff_filespec *one, *two;\n\n\tif (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(mode))\n\t\treturn;\n\n\t/* This may look odd, but it is a preparation for\n\t * feeding \"there are unchanged files which should\n\t * not produce diffs, but when you are doing copy\n\t * detection you would need them, so here they are\"\n\t * entries to the diff-core. They will be prefixed\n\t * with something like '=' or '*' (I haven't decided\n\t * which but should not make any difference).\n\t * Feeding the same new and old to diff_change()\n\t * also has the same effect.\n\t * Before the final output happens, they are pruned after\n\t * merged into rename/copy pairs as appropriate.\n\t */\n\tif (DIFF_OPT_TST(options, REVERSE_DIFF))\n\t\taddremove = (addremove == '+' ? '-' :\n\t\t\t addremove == '-' ? '+' : addremove);\n\n\tif (!path) path = \"\";\n\tsprintf(concatpath, \"%s%s\", base, path);\n\n\tif (options->prefix &&\n\t strncmp(concatpath, options->prefix, options->prefix_length))\n\t\treturn;\n\n\tone = alloc_filespec(concatpath);\n\ttwo = alloc_filespec(concatpath);\n\n\tif (addremove != '+')\n\t\tfill_filespec(one, sha1, mode);\n\tif (addremove != '-')\n\t\tfill_filespec(two, sha1, mode);\n\n\tdiff_queue(&diff_queued_diff, one, two);\n\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-91","original_id":"diversevul-balanced-positive-91","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc,\n\t\t const char *base, int baselen)\n{\n\tunsigned mode;\n\tconst char *path;\n\tconst unsigned char *sha1 = tree_entry_extract(desc, &path, &mode);\n\n\tif (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode)) {\n\t\tenum object_type type;\n\t\tint pathlen = tree_entry_len(path, sha1);\n\t\tchar *newbase = malloc_base(base, baselen, path, pathlen);\n\t\tstruct tree_desc inner;\n\t\tvoid *tree;\n\t\tunsigned long size;\n\n\t\ttree = read_sha1_file(sha1, &type, &size);\n\t\tif (!tree || type != OBJ_TREE)\n\t\t\tdie(\"corrupt tree sha %s\", sha1_to_hex(sha1));\n\n\t\tinit_tree_desc(&inner, tree, size);\n\t\tshow_tree(opt, prefix, &inner, newbase, baselen + 1 + pathlen);\n\n\t\tfree(tree);\n\t\tfree(newbase);\n\t} else {\n\t\topt->add_remove(opt, prefix[0], mode, sha1, base, path);\n\t}\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-92","original_id":"diversevul-balanced-positive-92","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid diff_change(struct diff_options *options,\n\t\t unsigned old_mode, unsigned new_mode,\n\t\t const unsigned char *old_sha1,\n\t\t const unsigned char *new_sha1,\n\t\t const char *base, const char *path)\n{\n\tchar concatpath[PATH_MAX];\n\tstruct diff_filespec *one, *two;\n\n\tif (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(old_mode)\n\t\t\t&& S_ISGITLINK(new_mode))\n\t\treturn;\n\n\tif (DIFF_OPT_TST(options, REVERSE_DIFF)) {\n\t\tunsigned tmp;\n\t\tconst unsigned char *tmp_c;\n\t\ttmp = old_mode; old_mode = new_mode; new_mode = tmp;\n\t\ttmp_c = old_sha1; old_sha1 = new_sha1; new_sha1 = tmp_c;\n\t}\n\tif (!path) path = \"\";\n\tsprintf(concatpath, \"%s%s\", base, path);\n\n\tif (options->prefix &&\n\t strncmp(concatpath, options->prefix, options->prefix_length))\n\t\treturn;\n\n\tone = alloc_filespec(concatpath);\n\ttwo = alloc_filespec(concatpath);\n\tfill_filespec(one, old_sha1, old_mode);\n\tfill_filespec(two, new_sha1, new_mode);\n\n\tdiff_queue(&diff_queued_diff, one, two);\n\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-93","original_id":"diversevul-balanced-positive-93","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void file_change(struct diff_options *options,\n\t\t unsigned old_mode, unsigned new_mode,\n\t\t const unsigned char *old_sha1,\n\t\t const unsigned char *new_sha1,\n\t\t const char *base, const char *path)\n{\n\ttree_difference = REV_TREE_DIFFERENT;\n\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-94","original_id":"diversevul-balanced-positive-94","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void prepare_attr_stack(const char *path, int dirlen)\n{\n\tstruct attr_stack *elem, *info;\n\tint len;\n\tchar pathbuf[PATH_MAX];\n\n\t/*\n\t * At the bottom of the attribute stack is the built-in\n\t * set of attribute definitions. Then, contents from\n\t * .gitattribute files from directories closer to the\n\t * root to the ones in deeper directories are pushed\n\t * to the stack. Finally, at the very top of the stack\n\t * we always keep the contents of $GIT_DIR/info/attributes.\n\t *\n\t * When checking, we use entries from near the top of the\n\t * stack, preferring $GIT_DIR/info/attributes, then\n\t * .gitattributes in deeper directories to shallower ones,\n\t * and finally use the built-in set as the default.\n\t */\n\tif (!attr_stack)\n\t\tbootstrap_attr_stack();\n\n\t/*\n\t * Pop the \"info\" one that is always at the top of the stack.\n\t */\n\tinfo = attr_stack;\n\tattr_stack = info->prev;\n\n\t/*\n\t * Pop the ones from directories that are not the prefix of\n\t * the path we are checking.\n\t */\n\twhile (attr_stack && attr_stack->origin) {\n\t\tint namelen = strlen(attr_stack->origin);\n\n\t\telem = attr_stack;\n\t\tif (namelen <= dirlen &&\n\t\t !strncmp(elem->origin, path, namelen))\n\t\t\tbreak;\n\n\t\tdebug_pop(elem);\n\t\tattr_stack = elem->prev;\n\t\tfree_attr_elem(elem);\n\t}\n\n\t/*\n\t * Read from parent directories and push them down\n\t */\n\tif (!is_bare_repository()) {\n\t\twhile (1) {\n\t\t\tchar *cp;\n\n\t\t\tlen = strlen(attr_stack->origin);\n\t\t\tif (dirlen <= len)\n\t\t\t\tbreak;\n\t\t\tmemcpy(pathbuf, path, dirlen);\n\t\t\tmemcpy(pathbuf + dirlen, \"/\", 2);\n\t\t\tcp = strchr(pathbuf + len + 1, '/');\n\t\t\tstrcpy(cp + 1, GITATTRIBUTES_FILE);\n\t\t\telem = read_attr(pathbuf, 0);\n\t\t\t*cp = '\\0';\n\t\t\telem->origin = strdup(pathbuf);\n\t\t\telem->prev = attr_stack;\n\t\t\tattr_stack = elem;\n\t\t\tdebug_push(elem);\n\t\t}\n\t}\n\n\t/*\n\t * Finally push the \"info\" one at the top of the stack.\n\t */\n\tinfo->prev = attr_stack;\n\tattr_stack = info;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-95","original_id":"diversevul-balanced-positive-95","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int grep_tree(struct grep_opt *opt, const char **paths,\n\t\t struct tree_desc *tree,\n\t\t const char *tree_name, const char *base)\n{\n\tint len;\n\tint hit = 0;\n\tstruct name_entry entry;\n\tchar *down;\n\tint tn_len = strlen(tree_name);\n\tchar *path_buf = xmalloc(PATH_MAX + tn_len + 100);\n\n\tif (tn_len) {\n\t\ttn_len = sprintf(path_buf, \"%s:\", tree_name);\n\t\tdown = path_buf + tn_len;\n\t\tstrcat(down, base);\n\t}\n\telse {\n\t\tdown = path_buf;\n\t\tstrcpy(down, base);\n\t}\n\tlen = strlen(path_buf);\n\n\twhile (tree_entry(tree, &entry)) {\n\t\tstrcpy(path_buf + len, entry.path);\n\n\t\tif (S_ISDIR(entry.mode))\n\t\t\t/* Match \"abc/\" against pathspec to\n\t\t\t * decide if we want to descend into \"abc\"\n\t\t\t * directory.\n\t\t\t */\n\t\t\tstrcpy(path_buf + len + tree_entry_len(entry.path, entry.sha1), \"/\");\n\n\t\tif (!pathspec_matches(paths, down))\n\t\t\t;\n\t\telse if (S_ISREG(entry.mode))\n\t\t\thit |= grep_sha1(opt, entry.sha1, path_buf, tn_len);\n\t\telse if (S_ISDIR(entry.mode)) {\n\t\t\tenum object_type type;\n\t\t\tstruct tree_desc sub;\n\t\t\tvoid *data;\n\t\t\tunsigned long size;\n\n\t\t\tdata = read_sha1_file(entry.sha1, &type, &size);\n\t\t\tif (!data)\n\t\t\t\tdie(\"unable to read tree (%s)\",\n\t\t\t\t sha1_to_hex(entry.sha1));\n\t\t\tinit_tree_desc(&sub, data, size);\n\t\t\thit |= grep_tree(opt, paths, &sub, tree_name, down);\n\t\t\tfree(data);\n\t\t}\n\t}\n\treturn hit;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-96","original_id":"diversevul-balanced-positive-96","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int dccp_setsockopt_change(struct sock *sk, int type,\n\t\t\t\t struct dccp_so_feat __user *optval)\n{\n\tstruct dccp_so_feat opt;\n\tu8 *val;\n\tint rc;\n\n\tif (copy_from_user(&opt, optval, sizeof(opt)))\n\t\treturn -EFAULT;\n\n\tval = kmalloc(opt.dccpsf_len, GFP_KERNEL);\n\tif (!val)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(val, opt.dccpsf_val, opt.dccpsf_len)) {\n\t\trc = -EFAULT;\n\t\tgoto out_free_val;\n\t}\n\n\trc = dccp_feat_change(dccp_msk(sk), type, opt.dccpsf_feat,\n\t\t\t val, opt.dccpsf_len, GFP_KERNEL);\n\tif (rc)\n\t\tgoto out_free_val;\n\nout:\n\treturn rc;\n\nout_free_val:\n\tkfree(val);\n\tgoto out;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-97","original_id":"diversevul-balanced-positive-97","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_auth_chunk(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_authchunk val;\n\n\tif (optlen != sizeof(struct sctp_authchunk))\n\t\treturn -EINVAL;\n\tif (copy_from_user(&val, optval, optlen))\n\t\treturn -EFAULT;\n\n\tswitch (val.sauth_chunk) {\n\t\tcase SCTP_CID_INIT:\n\t\tcase SCTP_CID_INIT_ACK:\n\t\tcase SCTP_CID_SHUTDOWN_COMPLETE:\n\t\tcase SCTP_CID_AUTH:\n\t\t\treturn -EINVAL;\n\t}\n\n\t/* add this chunk id to the endpoint */\n\treturn sctp_auth_ep_add_chunkid(sctp_sk(sk)->ep, val.sauth_chunk);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-98","original_id":"diversevul-balanced-positive-98","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_auth_key(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_authkey *authkey;\n\tstruct sctp_association *asoc;\n\tint ret;\n\n\tif (optlen <= sizeof(struct sctp_authkey))\n\t\treturn -EINVAL;\n\n\tauthkey = kmalloc(optlen, GFP_KERNEL);\n\tif (!authkey)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(authkey, optval, optlen)) {\n\t\tret = -EFAULT;\n\t\tgoto out;\n\t}\n\n\tasoc = sctp_id2assoc(sk, authkey->sca_assoc_id);\n\tif (!asoc && authkey->sca_assoc_id && sctp_style(sk, UDP)) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tret = sctp_auth_set_key(sctp_sk(sk)->ep, asoc, authkey);\nout:\n\tkfree(authkey);\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-positive-99","original_id":"diversevul-balanced-positive-99","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_del_key(struct sock *sk,\n\t\t\t\t\tchar __user *optval,\n\t\t\t\t\tint optlen)\n{\n\tstruct sctp_authkeyid val;\n\tstruct sctp_association *asoc;\n\n\tif (optlen != sizeof(struct sctp_authkeyid))\n\t\treturn -EINVAL;\n\tif (copy_from_user(&val, optval, optlen))\n\t\treturn -EFAULT;\n\n\tasoc = sctp_id2assoc(sk, val.scact_assoc_id);\n\tif (!asoc && val.scact_assoc_id && sctp_style(sk, UDP))\n\t\treturn -EINVAL;\n\n\treturn sctp_auth_del_key_id(sctp_sk(sk)->ep, asoc,\n\t\t\t\t val.scact_keynumber);\n\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-0","original_id":"diversevul-balanced-negative-0","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop)\n{\n cirrus_fill_t rop_func;\n\n if (BLTUNSAFE(s))\n return 0;\n rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1];\n rop_func(s, s->vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask),\n s->cirrus_blt_dstpitch,\n s->cirrus_blt_width, s->cirrus_blt_height);\n cirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t s->cirrus_blt_height);\n cirrus_bitblt_reset(s);\n return 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-1","original_id":"diversevul-balanced-negative-1","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_vga_mem_readl(void *opaque, target_phys_addr_t addr)\n{\n uint32_t v;\n#ifdef TARGET_WORDS_BIGENDIAN\n v = cirrus_vga_mem_readb(opaque, addr) << 24;\n v |= cirrus_vga_mem_readb(opaque, addr + 1) << 16;\n v |= cirrus_vga_mem_readb(opaque, addr + 2) << 8;\n v |= cirrus_vga_mem_readb(opaque, addr + 3);\n#else\n v = cirrus_vga_mem_readb(opaque, addr);\n v |= cirrus_vga_mem_readb(opaque, addr + 1) << 8;\n v |= cirrus_vga_mem_readb(opaque, addr + 2) << 16;\n v |= cirrus_vga_mem_readb(opaque, addr + 3) << 24;\n#endif\n return v;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-2","original_id":"diversevul-balanced-negative-2","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_bitblt_writel(void *opaque, target_phys_addr_t addr,\n\t\t\t\t uint32_t val)\n{\n#ifdef TARGET_WORDS_BIGENDIAN\n cirrus_linear_bitblt_writeb(opaque, addr, (val >> 24) & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 1, (val >> 16) & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 2, (val >> 8) & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 3, val & 0xff);\n#else\n cirrus_linear_bitblt_writeb(opaque, addr, val & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 1, (val >> 8) & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 2, (val >> 16) & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 3, (val >> 24) & 0xff);\n#endif\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-3","original_id":"diversevul-balanced-negative-3","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_cputovideo(CirrusVGAState * s)\n{\n int w;\n\n s->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC;\n s->cirrus_srcptr = &s->cirrus_bltbuf[0];\n s->cirrus_srcptr_end = &s->cirrus_bltbuf[0];\n\n if (s->cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY) {\n\tif (s->cirrus_blt_mode & CIRRUS_BLTMODE_COLOREXPAND) {\n\t s->cirrus_blt_srcpitch = 8;\n\t} else {\n /* XXX: check for 24 bpp */\n\t s->cirrus_blt_srcpitch = 8 * 8 * s->cirrus_blt_pixelwidth;\n\t}\n\ts->cirrus_srccounter = s->cirrus_blt_srcpitch;\n } else {\n\tif (s->cirrus_blt_mode & CIRRUS_BLTMODE_COLOREXPAND) {\n w = s->cirrus_blt_width / s->cirrus_blt_pixelwidth;\n if (s->cirrus_blt_modeext & CIRRUS_BLTMODEEXT_DWORDGRANULARITY)\n s->cirrus_blt_srcpitch = ((w + 31) >> 5);\n else\n s->cirrus_blt_srcpitch = ((w + 7) >> 3);\n\t} else {\n /* always align input size to 32 bits */\n\t s->cirrus_blt_srcpitch = (s->cirrus_blt_width + 3) & ~3;\n\t}\n s->cirrus_srccounter = s->cirrus_blt_srcpitch * s->cirrus_blt_height;\n }\n s->cirrus_srcptr = s->cirrus_bltbuf;\n s->cirrus_srcptr_end = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;\n cirrus_update_memory_access(s);\n return 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-4","original_id":"diversevul-balanced-negative-4","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mem_writeb_mode4and5_8bpp(CirrusVGAState * s,\n\t\t\t\t\t unsigned mode,\n\t\t\t\t\t unsigned offset,\n\t\t\t\t\t uint32_t mem_value)\n{\n int x;\n unsigned val = mem_value;\n uint8_t *dst;\n\n dst = s->vram_ptr + (offset &= s->cirrus_addr_mask);\n for (x = 0; x < 8; x++) {\n\tif (val & 0x80) {\n\t *dst = s->cirrus_shadow_gr1;\n\t} else if (mode == 5) {\n\t *dst = s->cirrus_shadow_gr0;\n\t}\n\tval <<= 1;\n\tdst++;\n }\n cpu_physical_memory_set_dirty(s->vram_offset + offset);\n cpu_physical_memory_set_dirty(s->vram_offset + offset + 7);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-5","original_id":"diversevul-balanced-negative-5","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_linear_readb(void *opaque, target_phys_addr_t addr)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n uint32_t ret;\n\n addr &= s->cirrus_addr_mask;\n\n if (((s->sr[0x17] & 0x44) == 0x44) &&\n ((addr & s->linear_mmio_mask) == s->linear_mmio_mask)) {\n\t/* memory-mapped I/O */\n\tret = cirrus_mmio_blt_read(s, addr & 0xff);\n } else if (0) {\n\t/* XXX handle bitblt */\n\tret = 0xff;\n } else {\n\t/* video memory */\n\tif ((s->gr[0x0B] & 0x14) == 0x14) {\n\t addr <<= 4;\n\t} else if (s->gr[0x0B] & 0x02) {\n\t addr <<= 3;\n\t}\n\taddr &= s->cirrus_addr_mask;\n\tret = *(s->vram_ptr + addr);\n }\n\n return ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-6","original_id":"diversevul-balanced-negative-6","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncirrus_hook_read_sr(CirrusVGAState * s, unsigned reg_index, int *reg_value)\n{\n switch (reg_index) {\n case 0x00:\t\t\t// Standard VGA\n case 0x01:\t\t\t// Standard VGA\n case 0x02:\t\t\t// Standard VGA\n case 0x03:\t\t\t// Standard VGA\n case 0x04:\t\t\t// Standard VGA\n\treturn CIRRUS_HOOK_NOT_HANDLED;\n case 0x06:\t\t\t// Unlock Cirrus extensions\n\t*reg_value = s->sr[reg_index];\n\tbreak;\n case 0x10:\n case 0x30:\n case 0x50:\n case 0x70:\t\t\t// Graphics Cursor X\n case 0x90:\n case 0xb0:\n case 0xd0:\n case 0xf0:\t\t\t// Graphics Cursor X\n\t*reg_value = s->sr[0x10];\n\tbreak;\n case 0x11:\n case 0x31:\n case 0x51:\n case 0x71:\t\t\t// Graphics Cursor Y\n case 0x91:\n case 0xb1:\n case 0xd1:\n case 0xf1:\t\t\t// Graphics Cursor Y\n\t*reg_value = s->sr[0x11];\n\tbreak;\n case 0x05:\t\t\t// ???\n case 0x07:\t\t\t// Extended Sequencer Mode\n case 0x08:\t\t\t// EEPROM Control\n case 0x09:\t\t\t// Scratch Register 0\n case 0x0a:\t\t\t// Scratch Register 1\n case 0x0b:\t\t\t// VCLK 0\n case 0x0c:\t\t\t// VCLK 1\n case 0x0d:\t\t\t// VCLK 2\n case 0x0e:\t\t\t// VCLK 3\n case 0x0f:\t\t\t// DRAM Control\n case 0x12:\t\t\t// Graphics Cursor Attribute\n case 0x13:\t\t\t// Graphics Cursor Pattern Address\n case 0x14:\t\t\t// Scratch Register 2\n case 0x15:\t\t\t// Scratch Register 3\n case 0x16:\t\t\t// Performance Tuning Register\n case 0x17:\t\t\t// Configuration Readback and Extended Control\n case 0x18:\t\t\t// Signature Generator Control\n case 0x19:\t\t\t// Signal Generator Result\n case 0x1a:\t\t\t// Signal Generator Result\n case 0x1b:\t\t\t// VCLK 0 Denominator & Post\n case 0x1c:\t\t\t// VCLK 1 Denominator & Post\n case 0x1d:\t\t\t// VCLK 2 Denominator & Post\n case 0x1e:\t\t\t// VCLK 3 Denominator & Post\n case 0x1f:\t\t\t// BIOS Write Enable and MCLK select\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: handled inport sr_index %02x\\n\", reg_index);\n#endif\n\t*reg_value = s->sr[reg_index];\n\tbreak;\n default:\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: inport sr_index %02x\\n\", reg_index);\n#endif\n\t*reg_value = 0xff;\n\tbreak;\n }\n\n return CIRRUS_HOOK_HANDLED;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-7","original_id":"diversevul-balanced-negative-7","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotocpu(CirrusVGAState * s)\n{\n /* XXX */\n#ifdef DEBUG_BITBLT\n printf(\"cirrus: bitblt (video to cpu) is not implemented yet\\n\");\n#endif\n return 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-8","original_id":"diversevul-balanced-negative-8","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_invalidate_region(CirrusVGAState * s, int off_begin,\n\t\t\t\t int off_pitch, int bytesperline,\n\t\t\t\t int lines)\n{\n int y;\n int off_cur;\n int off_cur_end;\n\n for (y = 0; y < lines; y++) {\n\toff_cur = off_begin;\n\toff_cur_end = (off_cur + bytesperline) & s->cirrus_addr_mask;\n\toff_cur &= TARGET_PAGE_MASK;\n\twhile (off_cur < off_cur_end) {\n\t cpu_physical_memory_set_dirty(s->vram_offset + off_cur);\n\t off_cur += TARGET_PAGE_SIZE;\n\t}\n\toff_begin += off_pitch;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-9","original_id":"diversevul-balanced-negative-9","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mmio_writeb(void *opaque, target_phys_addr_t addr,\n\t\t\t uint32_t val)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n\n addr &= CIRRUS_PNPMMIO_SIZE - 1;\n\n if (addr >= 0x100) {\n\tcirrus_mmio_blt_write(s, addr - 0x100, val);\n } else {\n vga_ioport_write(s, addr + 0x3c0, val);\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-10","original_id":"diversevul-balanced-negative-10","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_linear_bitblt_readl(void *opaque, target_phys_addr_t addr)\n{\n uint32_t v;\n#ifdef TARGET_WORDS_BIGENDIAN\n v = cirrus_linear_bitblt_readb(opaque, addr) << 24;\n v |= cirrus_linear_bitblt_readb(opaque, addr + 1) << 16;\n v |= cirrus_linear_bitblt_readb(opaque, addr + 2) << 8;\n v |= cirrus_linear_bitblt_readb(opaque, addr + 3);\n#else\n v = cirrus_linear_bitblt_readb(opaque, addr);\n v |= cirrus_linear_bitblt_readb(opaque, addr + 1) << 8;\n v |= cirrus_linear_bitblt_readb(opaque, addr + 2) << 16;\n v |= cirrus_linear_bitblt_readb(opaque, addr + 3) << 24;\n#endif\n return v;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-11","original_id":"diversevul-balanced-negative-11","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_hook_read_palette(CirrusVGAState * s, int *reg_value)\n{\n if (!(s->sr[0x12] & CIRRUS_CURSOR_HIDDENPEL))\n\treturn CIRRUS_HOOK_NOT_HANDLED;\n *reg_value =\n s->cirrus_hidden_palette[(s->dac_read_index & 0x0f) * 3 +\n s->dac_sub_index];\n if (++s->dac_sub_index == 3) {\n\ts->dac_sub_index = 0;\n\ts->dac_read_index++;\n }\n return CIRRUS_HOOK_HANDLED;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-12","original_id":"diversevul-balanced-negative-12","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncirrus_hook_write_cr(CirrusVGAState * s, unsigned reg_index, int reg_value)\n{\n switch (reg_index) {\n case 0x00:\t\t\t// Standard VGA\n case 0x01:\t\t\t// Standard VGA\n case 0x02:\t\t\t// Standard VGA\n case 0x03:\t\t\t// Standard VGA\n case 0x04:\t\t\t// Standard VGA\n case 0x05:\t\t\t// Standard VGA\n case 0x06:\t\t\t// Standard VGA\n case 0x07:\t\t\t// Standard VGA\n case 0x08:\t\t\t// Standard VGA\n case 0x09:\t\t\t// Standard VGA\n case 0x0a:\t\t\t// Standard VGA\n case 0x0b:\t\t\t// Standard VGA\n case 0x0c:\t\t\t// Standard VGA\n case 0x0d:\t\t\t// Standard VGA\n case 0x0e:\t\t\t// Standard VGA\n case 0x0f:\t\t\t// Standard VGA\n case 0x10:\t\t\t// Standard VGA\n case 0x11:\t\t\t// Standard VGA\n case 0x12:\t\t\t// Standard VGA\n case 0x13:\t\t\t// Standard VGA\n case 0x14:\t\t\t// Standard VGA\n case 0x15:\t\t\t// Standard VGA\n case 0x16:\t\t\t// Standard VGA\n case 0x17:\t\t\t// Standard VGA\n case 0x18:\t\t\t// Standard VGA\n\treturn CIRRUS_HOOK_NOT_HANDLED;\n case 0x19:\t\t\t// Interlace End\n case 0x1a:\t\t\t// Miscellaneous Control\n case 0x1b:\t\t\t// Extended Display Control\n case 0x1c:\t\t\t// Sync Adjust and Genlock\n case 0x1d:\t\t\t// Overlay Extended Control\n\ts->cr[reg_index] = reg_value;\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: handled outport cr_index %02x, cr_value %02x\\n\",\n\t reg_index, reg_value);\n#endif\n\tbreak;\n case 0x22:\t\t\t// Graphics Data Latches Readback (R)\n case 0x24:\t\t\t// Attribute Controller Toggle Readback (R)\n case 0x26:\t\t\t// Attribute Controller Index Readback (R)\n case 0x27:\t\t\t// Part ID (R)\n\tbreak;\n case 0x25:\t\t\t// Part Status\n default:\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: outport cr_index %02x, cr_value %02x\\n\", reg_index,\n\t reg_value);\n#endif\n\tbreak;\n }\n\n return CIRRUS_HOOK_HANDLED;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-13","original_id":"diversevul-balanced-negative-13","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncirrus_hook_read_gr(CirrusVGAState * s, unsigned reg_index, int *reg_value)\n{\n switch (reg_index) {\n case 0x00: // Standard VGA, BGCOLOR 0x000000ff\n *reg_value = s->cirrus_shadow_gr0;\n return CIRRUS_HOOK_HANDLED;\n case 0x01: // Standard VGA, FGCOLOR 0x000000ff\n *reg_value = s->cirrus_shadow_gr1;\n return CIRRUS_HOOK_HANDLED;\n case 0x02:\t\t\t// Standard VGA\n case 0x03:\t\t\t// Standard VGA\n case 0x04:\t\t\t// Standard VGA\n case 0x06:\t\t\t// Standard VGA\n case 0x07:\t\t\t// Standard VGA\n case 0x08:\t\t\t// Standard VGA\n\treturn CIRRUS_HOOK_NOT_HANDLED;\n case 0x05:\t\t\t// Standard VGA, Cirrus extended mode\n default:\n\tbreak;\n }\n\n if (reg_index < 0x3a) {\n\t*reg_value = s->gr[reg_index];\n } else {\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: inport gr_index %02x\\n\", reg_index);\n#endif\n\t*reg_value = 0xff;\n }\n\n return CIRRUS_HOOK_HANDLED;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-14","original_id":"diversevul-balanced-negative-14","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_mmio_readw(void *opaque, target_phys_addr_t addr)\n{\n uint32_t v;\n#ifdef TARGET_WORDS_BIGENDIAN\n v = cirrus_mmio_readb(opaque, addr) << 8;\n v |= cirrus_mmio_readb(opaque, addr + 1);\n#else\n v = cirrus_mmio_readb(opaque, addr);\n v |= cirrus_mmio_readb(opaque, addr + 1) << 8;\n#endif\n return v;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-15","original_id":"diversevul-balanced-negative-15","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nglue(glue(cirrus_bitblt_rop_fwd_transp_, ROP_NAME),_16)(CirrusVGAState *s,\n\t\t\t\t\t\t\tuint8_t *dst,const uint8_t *src,\n\t\t\t\t\t\t\tint dstpitch,int srcpitch,\n\t\t\t\t\t\t\tint bltwidth,int bltheight)\n{\n int x,y;\n uint8_t p1, p2;\n dstpitch -= bltwidth;\n srcpitch -= bltwidth;\n for (y = 0; y < bltheight; y++) {\n for (x = 0; x < bltwidth; x+=2) {\n\t p1 = *dst;\n\t p2 = *(dst+1);\n ROP_OP(p1, *src);\n ROP_OP(p2, *(src+1));\n\t if ((p1 != s->gr[0x34]) || (p2 != s->gr[0x35])) {\n\t\t*dst = p1;\n\t\t*(dst+1) = p2;\n\t }\n dst+=2;\n src+=2;\n }\n dst += dstpitch;\n src += srcpitch;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-16","original_id":"diversevul-balanced-negative-16","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_vga_load(QEMUFile *f, void *opaque, int version_id)\n{\n CirrusVGAState *s = opaque;\n int ret;\n\n if (version_id > 2)\n return -EINVAL;\n\n if (s->pci_dev && version_id >= 2) {\n ret = pci_device_load(s->pci_dev, f);\n if (ret < 0)\n return ret;\n }\n\n qemu_get_be32s(f, &s->latch);\n qemu_get_8s(f, &s->sr_index);\n qemu_get_buffer(f, s->sr, 256);\n qemu_get_8s(f, &s->gr_index);\n qemu_get_8s(f, &s->cirrus_shadow_gr0);\n qemu_get_8s(f, &s->cirrus_shadow_gr1);\n s->gr[0x00] = s->cirrus_shadow_gr0 & 0x0f;\n s->gr[0x01] = s->cirrus_shadow_gr1 & 0x0f;\n qemu_get_buffer(f, s->gr + 2, 254);\n qemu_get_8s(f, &s->ar_index);\n qemu_get_buffer(f, s->ar, 21);\n s->ar_flip_flop=qemu_get_be32(f);\n qemu_get_8s(f, &s->cr_index);\n qemu_get_buffer(f, s->cr, 256);\n qemu_get_8s(f, &s->msr);\n qemu_get_8s(f, &s->fcr);\n qemu_get_8s(f, &s->st00);\n qemu_get_8s(f, &s->st01);\n\n qemu_get_8s(f, &s->dac_state);\n qemu_get_8s(f, &s->dac_sub_index);\n qemu_get_8s(f, &s->dac_read_index);\n qemu_get_8s(f, &s->dac_write_index);\n qemu_get_buffer(f, s->dac_cache, 3);\n qemu_get_buffer(f, s->palette, 768);\n\n s->bank_offset=qemu_get_be32(f);\n\n qemu_get_8s(f, &s->cirrus_hidden_dac_lockindex);\n qemu_get_8s(f, &s->cirrus_hidden_dac_data);\n\n qemu_get_be32s(f, &s->hw_cursor_x);\n qemu_get_be32s(f, &s->hw_cursor_y);\n\n /* force refresh */\n s->graphic_mode = -1;\n cirrus_update_bank_ptr(s, 0);\n cirrus_update_bank_ptr(s, 1);\n return 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-17","original_id":"diversevul-balanced-negative-17","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_update_bank_ptr(CirrusVGAState * s, unsigned bank_index)\n{\n unsigned offset;\n unsigned limit;\n\n if ((s->gr[0x0b] & 0x01) != 0)\t/* dual bank */\n\toffset = s->gr[0x09 + bank_index];\n else\t\t\t/* single bank */\n\toffset = s->gr[0x09];\n\n if ((s->gr[0x0b] & 0x20) != 0)\n\toffset <<= 14;\n else\n\toffset <<= 12;\n\n if (s->real_vram_size <= offset)\n\tlimit = 0;\n else\n\tlimit = s->real_vram_size - offset;\n\n if (((s->gr[0x0b] & 0x01) == 0) && (bank_index != 0)) {\n\tif (limit > 0x8000) {\n\t offset += 0x8000;\n\t limit -= 0x8000;\n\t} else {\n\t limit = 0;\n\t}\n }\n\n if (limit > 0) {\n\ts->cirrus_bank_base[bank_index] = offset;\n\ts->cirrus_bank_limit[bank_index] = limit;\n } else {\n\ts->cirrus_bank_base[bank_index] = 0;\n\ts->cirrus_bank_limit[bank_index] = 0;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-18","original_id":"diversevul-balanced-negative-18","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_linear_readl(void *opaque, target_phys_addr_t addr)\n{\n uint32_t v;\n#ifdef TARGET_WORDS_BIGENDIAN\n v = cirrus_linear_readb(opaque, addr) << 24;\n v |= cirrus_linear_readb(opaque, addr + 1) << 16;\n v |= cirrus_linear_readb(opaque, addr + 2) << 8;\n v |= cirrus_linear_readb(opaque, addr + 3);\n#else\n v = cirrus_linear_readb(opaque, addr);\n v |= cirrus_linear_readb(opaque, addr + 1) << 8;\n v |= cirrus_linear_readb(opaque, addr + 2) << 16;\n v |= cirrus_linear_readb(opaque, addr + 3) << 24;\n#endif\n return v;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-19","original_id":"diversevul-balanced-negative-19","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,\n unsigned long vga_ram_offset, int vga_ram_size)\n{\n PCICirrusVGAState *d;\n uint8_t *pci_conf;\n CirrusVGAState *s;\n int device_id;\n\n device_id = CIRRUS_ID_CLGD5446;\n\n /* setup PCI configuration registers */\n d = (PCICirrusVGAState *)pci_register_device(bus, \"Cirrus VGA\",\n sizeof(PCICirrusVGAState),\n -1, NULL, NULL);\n pci_conf = d->dev.config;\n pci_conf[0x00] = (uint8_t) (PCI_VENDOR_CIRRUS & 0xff);\n pci_conf[0x01] = (uint8_t) (PCI_VENDOR_CIRRUS >> 8);\n pci_conf[0x02] = (uint8_t) (device_id & 0xff);\n pci_conf[0x03] = (uint8_t) (device_id >> 8);\n pci_conf[0x04] = PCI_COMMAND_IOACCESS | PCI_COMMAND_MEMACCESS;\n pci_conf[0x0a] = PCI_CLASS_SUB_VGA;\n pci_conf[0x0b] = PCI_CLASS_BASE_DISPLAY;\n pci_conf[0x0e] = PCI_CLASS_HEADERTYPE_00h;\n\n /* setup VGA */\n s = &d->cirrus_vga;\n vga_common_init((VGAState *)s,\n ds, vga_ram_base, vga_ram_offset, vga_ram_size);\n cirrus_init_common(s, device_id, 1);\n\n graphic_console_init(s->ds, s->update, s->invalidate, s->screen_dump,\n s->text_update, s);\n\n s->pci_dev = (PCIDevice *)d;\n\n /* setup memory space */\n /* memory #0 LFB */\n /* memory #1 memory-mapped I/O */\n /* XXX: s->vram_size must be a power of two */\n pci_register_io_region((PCIDevice *)d, 0, 0x2000000,\n\t\t\t PCI_ADDRESS_SPACE_MEM_PREFETCH, cirrus_pci_lfb_map);\n if (device_id == CIRRUS_ID_CLGD5446) {\n pci_register_io_region((PCIDevice *)d, 1, CIRRUS_PNPMMIO_SIZE,\n PCI_ADDRESS_SPACE_MEM, cirrus_pci_mmio_map);\n }\n /* XXX: ROM BIOS */\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-20","original_id":"diversevul-balanced-negative-20","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_vga_mem_writew(void *opaque, target_phys_addr_t addr, uint32_t val)\n{\n#ifdef TARGET_WORDS_BIGENDIAN\n cirrus_vga_mem_writeb(opaque, addr, (val >> 8) & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 1, val & 0xff);\n#else\n cirrus_vga_mem_writeb(opaque, addr, val & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 1, (val >> 8) & 0xff);\n#endif\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-21","original_id":"diversevul-balanced-negative-21","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_update_memory_access(CirrusVGAState *s)\n{\n unsigned mode;\n\n if ((s->sr[0x17] & 0x44) == 0x44) {\n goto generic_io;\n } else if (s->cirrus_srcptr != s->cirrus_srcptr_end) {\n goto generic_io;\n } else {\n\tif ((s->gr[0x0B] & 0x14) == 0x14) {\n goto generic_io;\n\t} else if (s->gr[0x0B] & 0x02) {\n goto generic_io;\n }\n\n\tmode = s->gr[0x05] & 0x7;\n\tif (mode < 4 || mode > 5 || ((s->gr[0x0B] & 0x4) == 0)) {\n s->cirrus_linear_write[0] = cirrus_linear_mem_writeb;\n s->cirrus_linear_write[1] = cirrus_linear_mem_writew;\n s->cirrus_linear_write[2] = cirrus_linear_mem_writel;\n } else {\n generic_io:\n s->cirrus_linear_write[0] = cirrus_linear_writeb;\n s->cirrus_linear_write[1] = cirrus_linear_writew;\n s->cirrus_linear_write[2] = cirrus_linear_writel;\n }\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-22","original_id":"diversevul-balanced-negative-22","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mmio_writew(void *opaque, target_phys_addr_t addr,\n\t\t\t uint32_t val)\n{\n#ifdef TARGET_WORDS_BIGENDIAN\n cirrus_mmio_writeb(opaque, addr, (val >> 8) & 0xff);\n cirrus_mmio_writeb(opaque, addr + 1, val & 0xff);\n#else\n cirrus_mmio_writeb(opaque, addr, val & 0xff);\n cirrus_mmio_writeb(opaque, addr + 1, (val >> 8) & 0xff);\n#endif\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-23","original_id":"diversevul-balanced-negative-23","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_linear_bitblt_readw(void *opaque, target_phys_addr_t addr)\n{\n uint32_t v;\n#ifdef TARGET_WORDS_BIGENDIAN\n v = cirrus_linear_bitblt_readb(opaque, addr) << 8;\n v |= cirrus_linear_bitblt_readb(opaque, addr + 1);\n#else\n v = cirrus_linear_bitblt_readb(opaque, addr);\n v |= cirrus_linear_bitblt_readb(opaque, addr + 1) << 8;\n#endif\n return v;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-24","original_id":"diversevul-balanced-negative-24","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_writeb(void *opaque, target_phys_addr_t addr,\n\t\t\t\t uint32_t val)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n unsigned mode;\n\n addr &= s->cirrus_addr_mask;\n\n if (((s->sr[0x17] & 0x44) == 0x44) &&\n ((addr & s->linear_mmio_mask) == s->linear_mmio_mask)) {\n\t/* memory-mapped I/O */\n\tcirrus_mmio_blt_write(s, addr & 0xff, val);\n } else if (s->cirrus_srcptr != s->cirrus_srcptr_end) {\n\t/* bitblt */\n\t*s->cirrus_srcptr++ = (uint8_t) val;\n\tif (s->cirrus_srcptr >= s->cirrus_srcptr_end) {\n\t cirrus_bitblt_cputovideo_next(s);\n\t}\n } else {\n\t/* video memory */\n\tif ((s->gr[0x0B] & 0x14) == 0x14) {\n\t addr <<= 4;\n\t} else if (s->gr[0x0B] & 0x02) {\n\t addr <<= 3;\n\t}\n\taddr &= s->cirrus_addr_mask;\n\n\tmode = s->gr[0x05] & 0x7;\n\tif (mode < 4 || mode > 5 || ((s->gr[0x0B] & 0x4) == 0)) {\n\t *(s->vram_ptr + addr) = (uint8_t) val;\n\t cpu_physical_memory_set_dirty(s->vram_offset + addr);\n\t} else {\n\t if ((s->gr[0x0B] & 0x14) != 0x14) {\n\t\tcirrus_mem_writeb_mode4and5_8bpp(s, mode, addr, val);\n\t } else {\n\t\tcirrus_mem_writeb_mode4and5_16bpp(s, mode, addr, val);\n\t }\n\t}\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-25","original_id":"diversevul-balanced-negative-25","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo(CirrusVGAState * s)\n{\n int ret;\n\n if (s->cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY) {\n\tret = cirrus_bitblt_videotovideo_patterncopy(s);\n } else {\n\tret = cirrus_bitblt_videotovideo_copy(s);\n }\n if (ret)\n\tcirrus_bitblt_reset(s);\n return ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-26","original_id":"diversevul-balanced-negative-26","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_write_hidden_dac(CirrusVGAState * s, int reg_value)\n{\n if (s->cirrus_hidden_dac_lockindex == 4) {\n\ts->cirrus_hidden_dac_data = reg_value;\n#if defined(DEBUG_CIRRUS)\n\tprintf(\"cirrus: outport hidden DAC, value %02x\\n\", reg_value);\n#endif\n }\n s->cirrus_hidden_dac_lockindex = 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-27","original_id":"diversevul-balanced-negative-27","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_get_offsets(VGAState *s1,\n uint32_t *pline_offset,\n uint32_t *pstart_addr,\n uint32_t *pline_compare)\n{\n CirrusVGAState * s = (CirrusVGAState *)s1;\n uint32_t start_addr, line_offset, line_compare;\n\n line_offset = s->cr[0x13]\n\t| ((s->cr[0x1b] & 0x10) << 4);\n line_offset <<= 3;\n *pline_offset = line_offset;\n\n start_addr = (s->cr[0x0c] << 8)\n\t| s->cr[0x0d]\n\t| ((s->cr[0x1b] & 0x01) << 16)\n\t| ((s->cr[0x1b] & 0x0c) << 15)\n\t| ((s->cr[0x1d] & 0x80) << 12);\n *pstart_addr = start_addr;\n\n line_compare = s->cr[0x18] |\n ((s->cr[0x07] & 0x10) << 4) |\n ((s->cr[0x09] & 0x40) << 3);\n *pline_compare = line_compare;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-28","original_id":"diversevul-balanced-negative-28","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncirrus_hook_read_cr(CirrusVGAState * s, unsigned reg_index, int *reg_value)\n{\n switch (reg_index) {\n case 0x00:\t\t\t// Standard VGA\n case 0x01:\t\t\t// Standard VGA\n case 0x02:\t\t\t// Standard VGA\n case 0x03:\t\t\t// Standard VGA\n case 0x04:\t\t\t// Standard VGA\n case 0x05:\t\t\t// Standard VGA\n case 0x06:\t\t\t// Standard VGA\n case 0x07:\t\t\t// Standard VGA\n case 0x08:\t\t\t// Standard VGA\n case 0x09:\t\t\t// Standard VGA\n case 0x0a:\t\t\t// Standard VGA\n case 0x0b:\t\t\t// Standard VGA\n case 0x0c:\t\t\t// Standard VGA\n case 0x0d:\t\t\t// Standard VGA\n case 0x0e:\t\t\t// Standard VGA\n case 0x0f:\t\t\t// Standard VGA\n case 0x10:\t\t\t// Standard VGA\n case 0x11:\t\t\t// Standard VGA\n case 0x12:\t\t\t// Standard VGA\n case 0x13:\t\t\t// Standard VGA\n case 0x14:\t\t\t// Standard VGA\n case 0x15:\t\t\t// Standard VGA\n case 0x16:\t\t\t// Standard VGA\n case 0x17:\t\t\t// Standard VGA\n case 0x18:\t\t\t// Standard VGA\n\treturn CIRRUS_HOOK_NOT_HANDLED;\n case 0x19:\t\t\t// Interlace End\n case 0x1a:\t\t\t// Miscellaneous Control\n case 0x1b:\t\t\t// Extended Display Control\n case 0x1c:\t\t\t// Sync Adjust and Genlock\n case 0x1d:\t\t\t// Overlay Extended Control\n case 0x22:\t\t\t// Graphics Data Latches Readback (R)\n case 0x24:\t\t\t// Attribute Controller Toggle Readback (R)\n case 0x25:\t\t\t// Part Status\n case 0x27:\t\t\t// Part ID (R)\n\t*reg_value = s->cr[reg_index];\n\tbreak;\n case 0x26:\t\t\t// Attribute Controller Index Readback (R)\n\t*reg_value = s->ar_index & 0x3f;\n\tbreak;\n default:\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: inport cr_index %02x\\n\", reg_index);\n\t*reg_value = 0xff;\n#endif\n\tbreak;\n }\n\n return CIRRUS_HOOK_HANDLED;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-29","original_id":"diversevul-balanced-negative-29","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base,\n unsigned long vga_ram_offset, int vga_ram_size)\n{\n CirrusVGAState *s;\n\n s = qemu_mallocz(sizeof(CirrusVGAState));\n\n vga_common_init((VGAState *)s,\n ds, vga_ram_base, vga_ram_offset, vga_ram_size);\n cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);\n /* XXX ISA-LFB support */\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-30","original_id":"diversevul-balanced-negative-30","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline void cirrus_bitblt_fgcol(CirrusVGAState *s)\n{\n unsigned int color;\n switch (s->cirrus_blt_pixelwidth) {\n case 1:\n s->cirrus_blt_fgcol = s->cirrus_shadow_gr1;\n break;\n case 2:\n color = s->cirrus_shadow_gr1 | (s->gr[0x11] << 8);\n s->cirrus_blt_fgcol = le16_to_cpu(color);\n break;\n case 3:\n s->cirrus_blt_fgcol = s->cirrus_shadow_gr1 |\n (s->gr[0x11] << 8) | (s->gr[0x13] << 16);\n break;\n default:\n case 4:\n color = s->cirrus_shadow_gr1 | (s->gr[0x11] << 8) |\n (s->gr[0x13] << 16) | (s->gr[0x15] << 24);\n s->cirrus_blt_fgcol = le32_to_cpu(color);\n break;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-31","original_id":"diversevul-balanced-negative-31","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_get_bpp(VGAState *s1)\n{\n CirrusVGAState * s = (CirrusVGAState *)s1;\n uint32_t ret = 8;\n\n if ((s->sr[0x07] & 0x01) != 0) {\n\t/* Cirrus SVGA */\n\tswitch (s->sr[0x07] & CIRRUS_SR7_BPP_MASK) {\n\tcase CIRRUS_SR7_BPP_8:\n\t ret = 8;\n\t break;\n\tcase CIRRUS_SR7_BPP_16_DOUBLEVCLK:\n\t ret = cirrus_get_bpp16_depth(s);\n\t break;\n\tcase CIRRUS_SR7_BPP_24:\n\t ret = 24;\n\t break;\n\tcase CIRRUS_SR7_BPP_16:\n\t ret = cirrus_get_bpp16_depth(s);\n\t break;\n\tcase CIRRUS_SR7_BPP_32:\n\t ret = 32;\n\t break;\n\tdefault:\n#ifdef DEBUG_CIRRUS\n\t printf(\"cirrus: unknown bpp - sr7=%x\\n\", s->sr[0x7]);\n#endif\n\t ret = 8;\n\t break;\n\t}\n } else {\n\t/* VGA */\n\tret = 0;\n }\n\n return ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-32","original_id":"diversevul-balanced-negative-32","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_bitblt_writew(void *opaque, target_phys_addr_t addr,\n\t\t\t\t uint32_t val)\n{\n#ifdef TARGET_WORDS_BIGENDIAN\n cirrus_linear_bitblt_writeb(opaque, addr, (val >> 8) & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 1, val & 0xff);\n#else\n cirrus_linear_bitblt_writeb(opaque, addr, val & 0xff);\n cirrus_linear_bitblt_writeb(opaque, addr + 1, (val >> 8) & 0xff);\n#endif\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-33","original_id":"diversevul-balanced-negative-33","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_pci_lfb_map(PCIDevice *d, int region_num,\n\t\t\t uint32_t addr, uint32_t size, int type)\n{\n CirrusVGAState *s = &((PCICirrusVGAState *)d)->cirrus_vga;\n\n /* XXX: add byte swapping apertures */\n cpu_register_physical_memory(addr, s->vram_size,\n\t\t\t\t s->cirrus_linear_io_addr);\n cpu_register_physical_memory(addr + 0x1000000, 0x400000,\n\t\t\t\t s->cirrus_linear_bitblt_io_addr);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-34","original_id":"diversevul-balanced-negative-34","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)\n{\n int sx, sy;\n int dx, dy;\n int width, height;\n int depth;\n int notify = 0;\n\n depth = s->get_bpp((VGAState *)s) / 8;\n s->get_resolution((VGAState *)s, &width, &height);\n\n /* extra x, y */\n sx = (src % (width * depth)) / depth;\n sy = (src / (width * depth));\n dx = (dst % (width *depth)) / depth;\n dy = (dst / (width * depth));\n\n /* normalize width */\n w /= depth;\n\n /* if we're doing a backward copy, we have to adjust\n our x/y to be the upper left corner (instead of the lower\n right corner) */\n if (s->cirrus_blt_dstpitch < 0) {\n\tsx -= (s->cirrus_blt_width / depth) - 1;\n\tdx -= (s->cirrus_blt_width / depth) - 1;\n\tsy -= s->cirrus_blt_height - 1;\n\tdy -= s->cirrus_blt_height - 1;\n }\n\n /* are we in the visible portion of memory? */\n if (sx >= 0 && sy >= 0 && dx >= 0 && dy >= 0 &&\n\t(sx + w) <= width && (sy + h) <= height &&\n\t(dx + w) <= width && (dy + h) <= height) {\n\tnotify = 1;\n }\n\n /* make to sure only copy if it's a plain copy ROP */\n if (*s->cirrus_rop != cirrus_bitblt_rop_fwd_src &&\n\t*s->cirrus_rop != cirrus_bitblt_rop_bkwd_src)\n\tnotify = 0;\n\n /* we have to flush all pending changes so that the copy\n is generated at the appropriate moment in time */\n if (notify)\n\tvga_hw_update();\n\n (*s->cirrus_rop) (s, s->vram_ptr +\n\t\t (s->cirrus_blt_dstaddr & s->cirrus_addr_mask),\n\t\t s->vram_ptr +\n\t\t (s->cirrus_blt_srcaddr & s->cirrus_addr_mask),\n\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n if (notify)\n\ts->ds->dpy_copy(s->ds,\n\t\t\tsx, sy, dx, dy,\n\t\t\ts->cirrus_blt_width / depth,\n\t\t\ts->cirrus_blt_height);\n\n /* we don't have to notify the display that this portion has\n changed since dpy_copy implies this */\n\n if (!notify)\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-35","original_id":"diversevul-balanced-negative-35","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_cursor_invalidate(VGAState *s1)\n{\n CirrusVGAState *s = (CirrusVGAState *)s1;\n int size;\n\n if (!s->sr[0x12] & CIRRUS_CURSOR_SHOW) {\n size = 0;\n } else {\n if (s->sr[0x12] & CIRRUS_CURSOR_LARGE)\n size = 64;\n else\n size = 32;\n }\n /* invalidate last cursor and new cursor if any change */\n if (s->last_hw_cursor_size != size ||\n s->last_hw_cursor_x != s->hw_cursor_x ||\n s->last_hw_cursor_y != s->hw_cursor_y) {\n\n invalidate_cursor1(s);\n\n s->last_hw_cursor_size = size;\n s->last_hw_cursor_x = s->hw_cursor_x;\n s->last_hw_cursor_y = s->hw_cursor_y;\n /* compute the real cursor min and max y */\n cirrus_cursor_compute_yrange(s);\n invalidate_cursor1(s);\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-36","original_id":"diversevul-balanced-negative-36","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_bitblt_writeb(void *opaque, target_phys_addr_t addr,\n\t\t\t\t uint32_t val)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n\n if (s->cirrus_srcptr != s->cirrus_srcptr_end) {\n\t/* bitblt */\n\t*s->cirrus_srcptr++ = (uint8_t) val;\n\tif (s->cirrus_srcptr >= s->cirrus_srcptr_end) {\n\t cirrus_bitblt_cputovideo_next(s);\n\t}\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-37","original_id":"diversevul-balanced-negative-37","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_linear_readw(void *opaque, target_phys_addr_t addr)\n{\n uint32_t v;\n#ifdef TARGET_WORDS_BIGENDIAN\n v = cirrus_linear_readb(opaque, addr) << 8;\n v |= cirrus_linear_readb(opaque, addr + 1);\n#else\n v = cirrus_linear_readb(opaque, addr);\n v |= cirrus_linear_readb(opaque, addr + 1) << 8;\n#endif\n return v;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-38","original_id":"diversevul-balanced-negative-38","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mem_writeb_mode4and5_16bpp(CirrusVGAState * s,\n\t\t\t\t\t unsigned mode,\n\t\t\t\t\t unsigned offset,\n\t\t\t\t\t uint32_t mem_value)\n{\n int x;\n unsigned val = mem_value;\n uint8_t *dst;\n\n dst = s->vram_ptr + (offset &= s->cirrus_addr_mask);\n for (x = 0; x < 8; x++) {\n\tif (val & 0x80) {\n\t *dst = s->cirrus_shadow_gr1;\n\t *(dst + 1) = s->gr[0x11];\n\t} else if (mode == 5) {\n\t *dst = s->cirrus_shadow_gr0;\n\t *(dst + 1) = s->gr[0x10];\n\t}\n\tval <<= 1;\n\tdst += 2;\n }\n cpu_physical_memory_set_dirty(s->vram_offset + offset);\n cpu_physical_memory_set_dirty(s->vram_offset + offset + 15);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-39","original_id":"diversevul-balanced-negative-39","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_mem_writew(void *opaque, target_phys_addr_t addr,\n uint32_t val)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n\n addr &= s->cirrus_addr_mask;\n cpu_to_le16w((uint16_t *)(s->vram_ptr + addr), val);\n cpu_physical_memory_set_dirty(s->vram_offset + addr);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-40","original_id":"diversevul-balanced-negative-40","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_mmio_readb(void *opaque, target_phys_addr_t addr)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n\n addr &= CIRRUS_PNPMMIO_SIZE - 1;\n\n if (addr >= 0x100) {\n return cirrus_mmio_blt_read(s, addr - 0x100);\n } else {\n return vga_ioport_read(s, addr + 0x3c0);\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-41","original_id":"diversevul-balanced-negative-41","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_mem_writel(void *opaque, target_phys_addr_t addr,\n uint32_t val)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n\n addr &= s->cirrus_addr_mask;\n cpu_to_le32w((uint32_t *)(s->vram_ptr + addr), val);\n cpu_physical_memory_set_dirty(s->vram_offset + addr);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-42","original_id":"diversevul-balanced-negative-42","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_hook_write_palette(CirrusVGAState * s, int reg_value)\n{\n if (!(s->sr[0x12] & CIRRUS_CURSOR_HIDDENPEL))\n\treturn CIRRUS_HOOK_NOT_HANDLED;\n s->dac_cache[s->dac_sub_index] = reg_value;\n if (++s->dac_sub_index == 3) {\n memcpy(&s->cirrus_hidden_palette[(s->dac_write_index & 0x0f) * 3],\n s->dac_cache, 3);\n /* XXX update cursor */\n\ts->dac_sub_index = 0;\n\ts->dac_write_index++;\n }\n return CIRRUS_HOOK_HANDLED;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-43","original_id":"diversevul-balanced-negative-43","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_vga_save(QEMUFile *f, void *opaque)\n{\n CirrusVGAState *s = opaque;\n\n if (s->pci_dev)\n pci_device_save(s->pci_dev, f);\n\n qemu_put_be32s(f, &s->latch);\n qemu_put_8s(f, &s->sr_index);\n qemu_put_buffer(f, s->sr, 256);\n qemu_put_8s(f, &s->gr_index);\n qemu_put_8s(f, &s->cirrus_shadow_gr0);\n qemu_put_8s(f, &s->cirrus_shadow_gr1);\n qemu_put_buffer(f, s->gr + 2, 254);\n qemu_put_8s(f, &s->ar_index);\n qemu_put_buffer(f, s->ar, 21);\n qemu_put_be32(f, s->ar_flip_flop);\n qemu_put_8s(f, &s->cr_index);\n qemu_put_buffer(f, s->cr, 256);\n qemu_put_8s(f, &s->msr);\n qemu_put_8s(f, &s->fcr);\n qemu_put_8s(f, &s->st00);\n qemu_put_8s(f, &s->st01);\n\n qemu_put_8s(f, &s->dac_state);\n qemu_put_8s(f, &s->dac_sub_index);\n qemu_put_8s(f, &s->dac_read_index);\n qemu_put_8s(f, &s->dac_write_index);\n qemu_put_buffer(f, s->dac_cache, 3);\n qemu_put_buffer(f, s->palette, 768);\n\n qemu_put_be32(f, s->bank_offset);\n\n qemu_put_8s(f, &s->cirrus_hidden_dac_lockindex);\n qemu_put_8s(f, &s->cirrus_hidden_dac_data);\n\n qemu_put_be32s(f, &s->hw_cursor_x);\n qemu_put_be32s(f, &s->hw_cursor_y);\n /* XXX: we do not save the bitblt state - we assume we do not save\n the state when the blitter is active */\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-44","original_id":"diversevul-balanced-negative-44","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nglue(cirrus_bitblt_rop_fwd_, ROP_NAME)(CirrusVGAState *s,\n uint8_t *dst,const uint8_t *src,\n int dstpitch,int srcpitch,\n int bltwidth,int bltheight)\n{\n int x,y;\n dstpitch -= bltwidth;\n srcpitch -= bltwidth;\n\n if (dstpitch < 0 || srcpitch < 0) {\n /* is 0 valid? srcpitch == 0 could be useful */\n return;\n }\n\n for (y = 0; y < bltheight; y++) {\n for (x = 0; x < bltwidth; x++) {\n ROP_OP(*dst, *src);\n dst++;\n src++;\n }\n dst += dstpitch;\n src += srcpitch;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-45","original_id":"diversevul-balanced-negative-45","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_get_resolution(VGAState *s, int *pwidth, int *pheight)\n{\n int width, height;\n\n width = (s->cr[0x01] + 1) * 8;\n height = s->cr[0x12] |\n ((s->cr[0x07] & 0x02) << 7) |\n ((s->cr[0x07] & 0x40) << 3);\n height = (height + 1);\n /* interlace support */\n if (s->cr[0x1a] & 0x01)\n height = height * 2;\n *pwidth = width;\n *pheight = height;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-46","original_id":"diversevul-balanced-negative-46","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_vga_mem_readb(void *opaque, target_phys_addr_t addr)\n{\n CirrusVGAState *s = opaque;\n unsigned bank_index;\n unsigned bank_offset;\n uint32_t val;\n\n if ((s->sr[0x07] & 0x01) == 0) {\n\treturn vga_mem_readb(s, addr);\n }\n\n addr &= 0x1ffff;\n\n if (addr < 0x10000) {\n\t/* XXX handle bitblt */\n\t/* video memory */\n\tbank_index = addr >> 15;\n\tbank_offset = addr & 0x7fff;\n\tif (bank_offset < s->cirrus_bank_limit[bank_index]) {\n\t bank_offset += s->cirrus_bank_base[bank_index];\n\t if ((s->gr[0x0B] & 0x14) == 0x14) {\n\t\tbank_offset <<= 4;\n\t } else if (s->gr[0x0B] & 0x02) {\n\t\tbank_offset <<= 3;\n\t }\n\t bank_offset &= s->cirrus_addr_mask;\n\t val = *(s->vram_ptr + bank_offset);\n\t} else\n\t val = 0xff;\n } else if (addr >= 0x18000 && addr < 0x18100) {\n\t/* memory-mapped I/O */\n\tval = 0xff;\n\tif ((s->sr[0x17] & 0x44) == 0x04) {\n\t val = cirrus_mmio_blt_read(s, addr & 0xff);\n\t}\n } else {\n\tval = 0xff;\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: mem_readb %06x\\n\", addr);\n#endif\n }\n return val;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-47","original_id":"diversevul-balanced-negative-47","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nglue(cirrus_bitblt_rop_bkwd_, ROP_NAME)(CirrusVGAState *s,\n uint8_t *dst,const uint8_t *src,\n int dstpitch,int srcpitch,\n int bltwidth,int bltheight)\n{\n int x,y;\n dstpitch += bltwidth;\n srcpitch += bltwidth;\n for (y = 0; y < bltheight; y++) {\n for (x = 0; x < bltwidth; x++) {\n ROP_OP(*dst, *src);\n dst--;\n src--;\n }\n dst += dstpitch;\n src += srcpitch;\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-48","original_id":"diversevul-balanced-negative-48","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_vga_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)\n{\n#ifdef TARGET_WORDS_BIGENDIAN\n cirrus_vga_mem_writeb(opaque, addr, (val >> 24) & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 1, (val >> 16) & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 2, (val >> 8) & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 3, val & 0xff);\n#else\n cirrus_vga_mem_writeb(opaque, addr, val & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 1, (val >> 8) & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 2, (val >> 16) & 0xff);\n cirrus_vga_mem_writeb(opaque, addr + 3, (val >> 24) & 0xff);\n#endif\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-49","original_id":"diversevul-balanced-negative-49","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_write_bitblt(CirrusVGAState * s, unsigned reg_value)\n{\n unsigned old_value;\n\n old_value = s->gr[0x31];\n s->gr[0x31] = reg_value;\n\n if (((old_value & CIRRUS_BLT_RESET) != 0) &&\n\t((reg_value & CIRRUS_BLT_RESET) == 0)) {\n\tcirrus_bitblt_reset(s);\n } else if (((old_value & CIRRUS_BLT_START) == 0) &&\n\t ((reg_value & CIRRUS_BLT_START) != 0)) {\n\tcirrus_bitblt_start(s);\n }\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-50","original_id":"diversevul-balanced-negative-50","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_writew(void *opaque, target_phys_addr_t addr,\n\t\t\t\t uint32_t val)\n{\n#ifdef TARGET_WORDS_BIGENDIAN\n cirrus_linear_writeb(opaque, addr, (val >> 8) & 0xff);\n cirrus_linear_writeb(opaque, addr + 1, val & 0xff);\n#else\n cirrus_linear_writeb(opaque, addr, val & 0xff);\n cirrus_linear_writeb(opaque, addr + 1, (val >> 8) & 0xff);\n#endif\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-51","original_id":"diversevul-balanced-negative-51","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic uint32_t cirrus_vga_mem_readw(void *opaque, target_phys_addr_t addr)\n{\n uint32_t v;\n#ifdef TARGET_WORDS_BIGENDIAN\n v = cirrus_vga_mem_readb(opaque, addr) << 8;\n v |= cirrus_vga_mem_readb(opaque, addr + 1);\n#else\n v = cirrus_vga_mem_readb(opaque, addr);\n v |= cirrus_vga_mem_readb(opaque, addr + 1) << 8;\n#endif\n return v;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-52","original_id":"diversevul-balanced-negative-52","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_patterncopy(CirrusVGAState * s)\n{\n return cirrus_bitblt_common_patterncopy(s,\n\t\t\t\t\t s->vram_ptr + ((s->cirrus_blt_srcaddr & ~7) &\n s->cirrus_addr_mask));\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-53","original_id":"diversevul-balanced-negative-53","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_linear_mem_writeb(void *opaque, target_phys_addr_t addr,\n uint32_t val)\n{\n CirrusVGAState *s = (CirrusVGAState *) opaque;\n\n addr &= s->cirrus_addr_mask;\n *(s->vram_ptr + addr) = val;\n cpu_physical_memory_set_dirty(s->vram_offset + addr);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-54","original_id":"diversevul-balanced-negative-54","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)\n{\n if (BLTUNSAFE(s))\n return 0;\n\n if (s->ds->dpy_copy) {\n\tcirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr,\n\t\t s->cirrus_blt_srcaddr - s->start_addr,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n } else {\n\t(*s->cirrus_rop) (s, s->vram_ptr +\n (s->cirrus_blt_dstaddr & s->cirrus_addr_mask),\n\t\t\t s->vram_ptr +\n (s->cirrus_blt_srcaddr & s->cirrus_addr_mask),\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n }\n\n return 1;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-55","original_id":"diversevul-balanced-negative-55","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)\n{\n int sx, sy;\n int dx, dy;\n int width, height;\n int depth;\n int notify = 0;\n\n depth = s->get_bpp((VGAState *)s) / 8;\n s->get_resolution((VGAState *)s, &width, &height);\n\n /* extra x, y */\n sx = (src % (width * depth)) / depth;\n sy = (src / (width * depth));\n dx = (dst % (width *depth)) / depth;\n dy = (dst / (width * depth));\n\n /* normalize width */\n w /= depth;\n\n /* if we're doing a backward copy, we have to adjust\n our x/y to be the upper left corner (instead of the lower\n right corner) */\n if (s->cirrus_blt_dstpitch < 0) {\n\tsx -= (s->cirrus_blt_width / depth) - 1;\n\tdx -= (s->cirrus_blt_width / depth) - 1;\n\tsy -= s->cirrus_blt_height - 1;\n\tdy -= s->cirrus_blt_height - 1;\n }\n\n /* are we in the visible portion of memory? */\n if (sx >= 0 && sy >= 0 && dx >= 0 && dy >= 0 &&\n\t(sx + w) <= width && (sy + h) <= height &&\n\t(dx + w) <= width && (dy + h) <= height) {\n\tnotify = 1;\n }\n\n /* make to sure only copy if it's a plain copy ROP */\n if (*s->cirrus_rop != cirrus_bitblt_rop_fwd_src &&\n\t*s->cirrus_rop != cirrus_bitblt_rop_bkwd_src)\n\tnotify = 0;\n\n /* we have to flush all pending changes so that the copy\n is generated at the appropriate moment in time */\n if (notify)\n\tvga_hw_update();\n\n (*s->cirrus_rop) (s, s->vram_ptr +\n\t\t (s->cirrus_blt_dstaddr & s->cirrus_addr_mask),\n\t\t s->vram_ptr +\n\t\t (s->cirrus_blt_srcaddr & s->cirrus_addr_mask),\n\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n if (notify)\n\tqemu_console_copy(s->console,\n\t\t\t sx, sy, dx, dy,\n\t\t\t s->cirrus_blt_width / depth,\n\t\t\t s->cirrus_blt_height);\n\n /* we don't have to notify the display that this portion has\n changed since qemu_console_copy implies this */\n\n if (!notify)\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-56","original_id":"diversevul-balanced-negative-56","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base,\n unsigned long vga_ram_offset, int vga_ram_size)\n{\n CirrusVGAState *s;\n\n s = qemu_mallocz(sizeof(CirrusVGAState));\n\n vga_common_init((VGAState *)s,\n ds, vga_ram_base, vga_ram_offset, vga_ram_size);\n cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);\n s->console = graphic_console_init(s->ds, s->update, s->invalidate,\n s->screen_dump, s->text_update, s);\n /* XXX ISA-LFB support */\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-57","original_id":"diversevul-balanced-negative-57","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,\n unsigned long vga_ram_offset, int vga_ram_size)\n{\n PCICirrusVGAState *d;\n uint8_t *pci_conf;\n CirrusVGAState *s;\n int device_id;\n\n device_id = CIRRUS_ID_CLGD5446;\n\n /* setup PCI configuration registers */\n d = (PCICirrusVGAState *)pci_register_device(bus, \"Cirrus VGA\",\n sizeof(PCICirrusVGAState),\n -1, NULL, NULL);\n pci_conf = d->dev.config;\n pci_conf[0x00] = (uint8_t) (PCI_VENDOR_CIRRUS & 0xff);\n pci_conf[0x01] = (uint8_t) (PCI_VENDOR_CIRRUS >> 8);\n pci_conf[0x02] = (uint8_t) (device_id & 0xff);\n pci_conf[0x03] = (uint8_t) (device_id >> 8);\n pci_conf[0x04] = PCI_COMMAND_IOACCESS | PCI_COMMAND_MEMACCESS;\n pci_conf[0x0a] = PCI_CLASS_SUB_VGA;\n pci_conf[0x0b] = PCI_CLASS_BASE_DISPLAY;\n pci_conf[0x0e] = PCI_CLASS_HEADERTYPE_00h;\n\n /* setup VGA */\n s = &d->cirrus_vga;\n vga_common_init((VGAState *)s,\n ds, vga_ram_base, vga_ram_offset, vga_ram_size);\n cirrus_init_common(s, device_id, 1);\n\n s->console = graphic_console_init(s->ds, s->update, s->invalidate,\n s->screen_dump, s->text_update, s);\n\n s->pci_dev = (PCIDevice *)d;\n\n /* setup memory space */\n /* memory #0 LFB */\n /* memory #1 memory-mapped I/O */\n /* XXX: s->vram_size must be a power of two */\n pci_register_io_region((PCIDevice *)d, 0, 0x2000000,\n\t\t\t PCI_ADDRESS_SPACE_MEM_PREFETCH, cirrus_pci_lfb_map);\n if (device_id == CIRRUS_ID_CLGD5446) {\n pci_register_io_region((PCIDevice *)d, 1, CIRRUS_PNPMMIO_SIZE,\n PCI_ADDRESS_SPACE_MEM, cirrus_pci_mmio_map);\n }\n /* XXX: ROM BIOS */\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-58","original_id":"diversevul-balanced-negative-58","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncirrus_hook_read_cr(CirrusVGAState * s, unsigned reg_index, int *reg_value)\n{\n switch (reg_index) {\n case 0x00:\t\t\t// Standard VGA\n case 0x01:\t\t\t// Standard VGA\n case 0x02:\t\t\t// Standard VGA\n case 0x03:\t\t\t// Standard VGA\n case 0x04:\t\t\t// Standard VGA\n case 0x05:\t\t\t// Standard VGA\n case 0x06:\t\t\t// Standard VGA\n case 0x07:\t\t\t// Standard VGA\n case 0x08:\t\t\t// Standard VGA\n case 0x09:\t\t\t// Standard VGA\n case 0x0a:\t\t\t// Standard VGA\n case 0x0b:\t\t\t// Standard VGA\n case 0x0c:\t\t\t// Standard VGA\n case 0x0d:\t\t\t// Standard VGA\n case 0x0e:\t\t\t// Standard VGA\n case 0x0f:\t\t\t// Standard VGA\n case 0x10:\t\t\t// Standard VGA\n case 0x11:\t\t\t// Standard VGA\n case 0x12:\t\t\t// Standard VGA\n case 0x13:\t\t\t// Standard VGA\n case 0x14:\t\t\t// Standard VGA\n case 0x15:\t\t\t// Standard VGA\n case 0x16:\t\t\t// Standard VGA\n case 0x17:\t\t\t// Standard VGA\n case 0x18:\t\t\t// Standard VGA\n\treturn CIRRUS_HOOK_NOT_HANDLED;\n case 0x24:\t\t\t// Attribute Controller Toggle Readback (R)\n *reg_value = (s->ar_flip_flop << 7);\n break;\n case 0x19:\t\t\t// Interlace End\n case 0x1a:\t\t\t// Miscellaneous Control\n case 0x1b:\t\t\t// Extended Display Control\n case 0x1c:\t\t\t// Sync Adjust and Genlock\n case 0x1d:\t\t\t// Overlay Extended Control\n case 0x22:\t\t\t// Graphics Data Latches Readback (R)\n case 0x25:\t\t\t// Part Status\n case 0x27:\t\t\t// Part ID (R)\n\t*reg_value = s->cr[reg_index];\n\tbreak;\n case 0x26:\t\t\t// Attribute Controller Index Readback (R)\n\t*reg_value = s->ar_index & 0x3f;\n\tbreak;\n default:\n#ifdef DEBUG_CIRRUS\n\tprintf(\"cirrus: inport cr_index %02x\\n\", reg_index);\n\t*reg_value = 0xff;\n#endif\n\tbreak;\n }\n\n return CIRRUS_HOOK_HANDLED;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-59","original_id":"diversevul-balanced-negative-59","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int put_compat_flock64(struct flock *kfl, struct compat_flock64 __user *ufl)\n{\n\tif (!access_ok(VERIFY_WRITE, ufl, sizeof(*ufl)) ||\n\t __put_user(kfl->l_type, &ufl->l_type) ||\n\t __put_user(kfl->l_whence, &ufl->l_whence) ||\n\t __put_user(kfl->l_start, &ufl->l_start) ||\n\t __put_user(kfl->l_len, &ufl->l_len) ||\n\t __put_user(kfl->l_pid, &ufl->l_pid))\n\t\treturn -EFAULT;\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-60","original_id":"diversevul-balanced-negative-60","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, struct compat_timeval __user *t)\n{\n\tstruct timeval tv[2];\n\n\tif (t) {\n\t\tif (get_user(tv[0].tv_sec, &t[0].tv_sec) ||\n\t\t get_user(tv[0].tv_usec, &t[0].tv_usec) ||\n\t\t get_user(tv[1].tv_sec, &t[1].tv_sec) ||\n\t\t get_user(tv[1].tv_usec, &t[1].tv_usec))\n\t\t\treturn -EFAULT;\n\t}\n\treturn do_utimes(dfd, filename, t ? tv : NULL);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-61","original_id":"diversevul-balanced-negative-61","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncompat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec, unsigned long vlen)\n{\n\tstruct file *file;\n\tssize_t ret = -EBADF;\n\n\tfile = fget(fd);\n\tif (!file)\n\t\treturn -EBADF;\n\tif (!(file->f_mode & FMODE_WRITE))\n\t\tgoto out;\n\n\tret = -EINVAL;\n\tif (!file->f_op || (!file->f_op->aio_write && !file->f_op->write))\n\t\tgoto out;\n\n\tret = compat_do_readv_writev(WRITE, file, vec, vlen, &file->f_pos);\n\nout:\n\tfput(file);\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-62","original_id":"diversevul-balanced-negative-62","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_nfs_getfd_trans(struct nfsctl_arg *karg,\n\t\t\t\tstruct compat_nfsctl_arg __user *arg)\n{\n\tif (!access_ok(VERIFY_READ, &arg->ca32_getfd,\n\t\t\tsizeof(arg->ca32_getfd)) ||\n\t\tget_user(karg->ca_version, &arg->ca32_version) ||\n\t\t__copy_from_user(&karg->ca_getfd.gd_addr,\n\t\t\t\t&arg->ca32_getfd.gd32_addr,\n\t\t\t\t(sizeof(struct sockaddr))) ||\n\t\t__copy_from_user(&karg->ca_getfd.gd_path,\n\t\t\t\t&arg->ca32_getfd.gd32_path,\n\t\t\t\t(NFS_MAXPATHLEN+1)) ||\n\t\t__get_user(karg->ca_getfd.gd_version,\n\t\t\t\t&arg->ca32_getfd.gd32_version))\n\t\treturn -EFAULT;\n\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-63","original_id":"diversevul-balanced-negative-63","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_newfstat(unsigned int fd,\n\t\tstruct compat_stat __user * statbuf)\n{\n\tstruct kstat stat;\n\tint error = vfs_fstat(fd, &stat);\n\n\tif (!error)\n\t\terror = cp_compat_stat(&stat, statbuf);\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-64","original_id":"diversevul-balanced-negative-64","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_getdents(unsigned int fd,\n\t\tstruct compat_linux_dirent __user *dirent, unsigned int count)\n{\n\tstruct file * file;\n\tstruct compat_linux_dirent __user * lastdirent;\n\tstruct compat_getdents_callback buf;\n\tint error;\n\n\terror = -EFAULT;\n\tif (!access_ok(VERIFY_WRITE, dirent, count))\n\t\tgoto out;\n\n\terror = -EBADF;\n\tfile = fget(fd);\n\tif (!file)\n\t\tgoto out;\n\n\tbuf.current_dir = dirent;\n\tbuf.previous = NULL;\n\tbuf.count = count;\n\tbuf.error = 0;\n\n\terror = vfs_readdir(file, compat_filldir, &buf);\n\tif (error < 0)\n\t\tgoto out_putf;\n\terror = buf.error;\n\tlastdirent = buf.previous;\n\tif (lastdirent) {\n\t\tif (put_user(file->f_pos, &lastdirent->d_off))\n\t\t\terror = -EFAULT;\n\t\telse\n\t\t\terror = count - buf.count;\n\t}\n\nout_putf:\n\tfput(file);\nout:\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-65","original_id":"diversevul-balanced-negative-65","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint compat_get_fd_set(unsigned long nr, compat_ulong_t __user *ufdset,\n\t\t\tunsigned long *fdset)\n{\n\tnr = ROUND_UP(nr, __COMPAT_NFDBITS);\n\tif (ufdset) {\n\t\tunsigned long odd;\n\n\t\tif (!access_ok(VERIFY_WRITE, ufdset, nr*sizeof(compat_ulong_t)))\n\t\t\treturn -EFAULT;\n\n\t\todd = nr & 1UL;\n\t\tnr &= ~1UL;\n\t\twhile (nr) {\n\t\t\tunsigned long h, l;\n\t\t\t__get_user(l, ufdset);\n\t\t\t__get_user(h, ufdset+1);\n\t\t\tufdset += 2;\n\t\t\t*fdset++ = h << 32 | l;\n\t\t\tnr -= 2;\n\t\t}\n\t\tif (odd)\n\t\t\t__get_user(*fdset, ufdset);\n\t} else {\n\t\t/* Tricky, must clear full unsigned long in the\n\t\t * kernel fdset at the end, this makes sure that\n\t\t * actually happens.\n\t\t */\n\t\tmemset(fdset, 0, ((nr + 1) & ~1)*sizeof(compat_ulong_t));\n\t}\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-66","original_id":"diversevul-balanced-negative-66","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nlong asmlinkage compat_sys_nfsservctl(int cmd, void *notused, void *notused2)\n{\n\treturn sys_ni_syscall();\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-67","original_id":"diversevul-balanced-negative-67","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncopy_iocb(long nr, u32 __user *ptr32, struct iocb __user * __user *ptr64)\n{\n\tcompat_uptr_t uptr;\n\tint i;\n\n\tfor (i = 0; i < nr; ++i) {\n\t\tif (get_user(uptr, ptr32 + i))\n\t\t\treturn -EFAULT;\n\t\tif (put_user(compat_ptr(uptr), ptr64 + i))\n\t\t\treturn -EFAULT;\n\t}\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-68","original_id":"diversevul-balanced-negative-68","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_nfs_svc_trans(struct nfsctl_arg *karg,\n\t\t\t\tstruct compat_nfsctl_arg __user *arg)\n{\n\tif (!access_ok(VERIFY_READ, &arg->ca32_svc, sizeof(arg->ca32_svc)) ||\n\t\tget_user(karg->ca_version, &arg->ca32_version) ||\n\t\t__get_user(karg->ca_svc.svc_port, &arg->ca32_svc.svc32_port) ||\n\t\t__get_user(karg->ca_svc.svc_nthreads,\n\t\t\t\t&arg->ca32_svc.svc32_nthreads))\n\t\treturn -EFAULT;\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-69","original_id":"diversevul-balanced-negative-69","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user *buf)\n{\n\tstruct file * file;\n\tstruct kstatfs tmp;\n\tint error;\n\n\terror = -EBADF;\n\tfile = fget(fd);\n\tif (!file)\n\t\tgoto out;\n\terror = vfs_statfs(file->f_dentry, &tmp);\n\tif (!error)\n\t\terror = put_compat_statfs(buf, &tmp);\n\tfput(file);\nout:\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-70","original_id":"diversevul-balanced-negative-70","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void *do_smb_super_data_conv(void *raw_data)\n{\n\tstruct smb_mount_data *s = raw_data;\n\tstruct compat_smb_mount_data *c_s = raw_data;\n\n\tif (c_s->version != SMB_MOUNT_OLDVERSION)\n\t\tgoto out;\n\ts->dir_mode = c_s->dir_mode;\n\ts->file_mode = c_s->file_mode;\n\ts->gid = c_s->gid;\n\ts->uid = c_s->uid;\n\ts->mounted_uid = c_s->mounted_uid;\n out:\n\treturn raw_data;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-71","original_id":"diversevul-balanced-negative-71","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_nfs_exp_trans(struct nfsctl_arg *karg,\n\t\t\t\tstruct compat_nfsctl_arg __user *arg)\n{\n\tif (!access_ok(VERIFY_READ, &arg->ca32_export,\n\t\t\t\tsizeof(arg->ca32_export)) ||\n\t\tget_user(karg->ca_version, &arg->ca32_version) ||\n\t\t__copy_from_user(&karg->ca_export.ex_client[0],\n\t\t\t\t&arg->ca32_export.ex32_client[0],\n\t\t\t\tNFSCLNT_IDMAX) ||\n\t\t__copy_from_user(&karg->ca_export.ex_path[0],\n\t\t\t\t&arg->ca32_export.ex32_path[0],\n\t\t\t\tNFS_MAXPATHLEN) ||\n\t\t__get_user(karg->ca_export.ex_dev,\n\t\t\t\t&arg->ca32_export.ex32_dev) ||\n\t\t__get_user(karg->ca_export.ex_ino,\n\t\t\t\t&arg->ca32_export.ex32_ino) ||\n\t\t__get_user(karg->ca_export.ex_flags,\n\t\t\t\t&arg->ca32_export.ex32_flags) ||\n\t\t__get_user(karg->ca_export.ex_anon_uid,\n\t\t\t\t&arg->ca32_export.ex32_anon_uid) ||\n\t\t__get_user(karg->ca_export.ex_anon_gid,\n\t\t\t\t&arg->ca32_export.ex32_anon_gid))\n\t\treturn -EFAULT;\n\tSET_UID(karg->ca_export.ex_anon_uid, karg->ca_export.ex_anon_uid);\n\tSET_GID(karg->ca_export.ex_anon_gid, karg->ca_export.ex_anon_gid);\n\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-72","original_id":"diversevul-balanced-negative-72","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint compat_do_execve(char * filename,\n\tcompat_uptr_t __user *argv,\n\tcompat_uptr_t __user *envp,\n\tstruct pt_regs * regs)\n{\n\tstruct linux_binprm *bprm;\n\tstruct file *file;\n\tint retval;\n\tint i;\n\n\tretval = -ENOMEM;\n\tbprm = kzalloc(sizeof(*bprm), GFP_KERNEL);\n\tif (!bprm)\n\t\tgoto out_ret;\n\n\tfile = open_exec(filename);\n\tretval = PTR_ERR(file);\n\tif (IS_ERR(file))\n\t\tgoto out_kfree;\n\n\tsched_exec();\n\n\tbprm->p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);\n\tbprm->file = file;\n\tbprm->filename = filename;\n\tbprm->interp = filename;\n\tbprm->mm = mm_alloc();\n\tretval = -ENOMEM;\n\tif (!bprm->mm)\n\t\tgoto out_file;\n\n\tretval = init_new_context(current, bprm->mm);\n\tif (retval < 0)\n\t\tgoto out_mm;\n\n\tbprm->argc = compat_count(argv, bprm->p / sizeof(compat_uptr_t));\n\tif ((retval = bprm->argc) < 0)\n\t\tgoto out_mm;\n\n\tbprm->envc = compat_count(envp, bprm->p / sizeof(compat_uptr_t));\n\tif ((retval = bprm->envc) < 0)\n\t\tgoto out_mm;\n\n\tretval = security_bprm_alloc(bprm);\n\tif (retval)\n\t\tgoto out;\n\n\tretval = prepare_binprm(bprm);\n\tif (retval < 0)\n\t\tgoto out;\n\n\tretval = copy_strings_kernel(1, &bprm->filename, bprm);\n\tif (retval < 0)\n\t\tgoto out;\n\n\tbprm->exec = bprm->p;\n\tretval = compat_copy_strings(bprm->envc, envp, bprm);\n\tif (retval < 0)\n\t\tgoto out;\n\n\tretval = compat_copy_strings(bprm->argc, argv, bprm);\n\tif (retval < 0)\n\t\tgoto out;\n\n\tretval = search_binary_handler(bprm, regs);\n\tif (retval >= 0) {\n\t\tfree_arg_pages(bprm);\n\n\t\t/* execve success */\n\t\tsecurity_bprm_free(bprm);\n\t\tacct_update_integrals(current);\n\t\tkfree(bprm);\n\t\treturn retval;\n\t}\n\nout:\n\t/* Something went wrong, return the inode and free the argument pages*/\n\tfor (i = 0 ; i < MAX_ARG_PAGES ; i++) {\n\t\tstruct page * page = bprm->page[i];\n\t\tif (page)\n\t\t\t__free_page(page);\n\t}\n\n\tif (bprm->security)\n\t\tsecurity_bprm_free(bprm);\n\nout_mm:\n\tif (bprm->mm)\n\t\tmmdrop(bprm->mm);\n\nout_file:\n\tif (bprm->file) {\n\t\tallow_write_access(bprm->file);\n\t\tfput(bprm->file);\n\t}\n\nout_kfree:\n\tkfree(bprm);\n\nout_ret:\n\treturn retval;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-73","original_id":"diversevul-balanced-negative-73","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,\n\tcompat_ulong_t __user *outp, compat_ulong_t __user *exp,\n\tstruct compat_timeval __user *tvp)\n{\n\ts64 timeout = -1;\n\tstruct compat_timeval tv;\n\tint ret;\n\n\tif (tvp) {\n\t\tif (copy_from_user(&tv, tvp, sizeof(tv)))\n\t\t\treturn -EFAULT;\n\n\t\tif (tv.tv_sec < 0 || tv.tv_usec < 0)\n\t\t\treturn -EINVAL;\n\n\t\t/* Cast to u64 to make GCC stop complaining */\n\t\tif ((u64)tv.tv_sec >= (u64)MAX_INT64_SECONDS)\n\t\t\ttimeout = -1;\t/* infinite */\n\t\telse {\n\t\t\ttimeout = ROUND_UP(tv.tv_usec, 1000000/HZ);\n\t\t\ttimeout += tv.tv_sec * HZ;\n\t\t}\n\t}\n\n\tret = compat_core_sys_select(n, inp, outp, exp, &timeout);\n\n\tif (tvp) {\n\t\tstruct compat_timeval rtv;\n\n\t\tif (current->personality & STICKY_TIMEOUTS)\n\t\t\tgoto sticky;\n\t\trtv.tv_usec = jiffies_to_usecs(do_div((*(u64*)&timeout), HZ));\n\t\trtv.tv_sec = timeout;\n\t\tif (compat_timeval_compare(&rtv, &tv) >= 0)\n\t\t\trtv = tv;\n\t\tif (copy_to_user(tvp, &rtv, sizeof(rtv))) {\nsticky:\n\t\t\t/*\n\t\t\t * If an application puts its timeval in read-only\n\t\t\t * memory, we don't want the Linux-specific update to\n\t\t\t * the timeval to cause a fault after the select has\n\t\t\t * completed successfully. However, because we're not\n\t\t\t * updating the timeval, we can't restart the system\n\t\t\t * call.\n\t\t\t */\n\t\t\tif (ret == -ERESTARTNOHAND)\n\t\t\t\tret = -EINTR;\n\t\t}\n\t}\n\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-74","original_id":"diversevul-balanced-negative-74","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_getdents64(unsigned int fd,\n\t\tstruct linux_dirent64 __user * dirent, unsigned int count)\n{\n\tstruct file * file;\n\tstruct linux_dirent64 __user * lastdirent;\n\tstruct compat_getdents_callback64 buf;\n\tint error;\n\n\terror = -EFAULT;\n\tif (!access_ok(VERIFY_WRITE, dirent, count))\n\t\tgoto out;\n\n\terror = -EBADF;\n\tfile = fget(fd);\n\tif (!file)\n\t\tgoto out;\n\n\tbuf.current_dir = dirent;\n\tbuf.previous = NULL;\n\tbuf.count = count;\n\tbuf.error = 0;\n\n\terror = vfs_readdir(file, compat_filldir64, &buf);\n\tif (error < 0)\n\t\tgoto out_putf;\n\terror = buf.error;\n\tlastdirent = buf.previous;\n\tif (lastdirent) {\n\t\ttypeof(lastdirent->d_off) d_off = file->f_pos;\n\t\t__put_user_unaligned(d_off, &lastdirent->d_off);\n\t\terror = count - buf.count;\n\t}\n\nout_putf:\n\tfput(file);\nout:\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-75","original_id":"diversevul-balanced-negative-75","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid compat_set_fd_set(unsigned long nr, compat_ulong_t __user *ufdset,\n\t\t\tunsigned long *fdset)\n{\n\tunsigned long odd;\n\tnr = ROUND_UP(nr, __COMPAT_NFDBITS);\n\n\tif (!ufdset)\n\t\treturn;\n\n\todd = nr & 1UL;\n\tnr &= ~1UL;\n\twhile (nr) {\n\t\tunsigned long h, l;\n\t\tl = *fdset++;\n\t\th = l >> 32;\n\t\t__put_user(l, ufdset);\n\t\t__put_user(h, ufdset+1);\n\t\tufdset += 2;\n\t\tnr -= 2;\n\t}\n\tif (odd)\n\t\t__put_user(*fdset, ufdset);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-76","original_id":"diversevul-balanced-negative-76","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statfs64 __user *buf)\n{\n\tstruct file * file;\n\tstruct kstatfs tmp;\n\tint error;\n\n\tif (sz != sizeof(*buf))\n\t\treturn -EINVAL;\n\n\terror = -EBADF;\n\tfile = fget(fd);\n\tif (!file)\n\t\tgoto out;\n\terror = vfs_statfs(file->f_dentry, &tmp);\n\tif (!error)\n\t\terror = put_compat_statfs64(buf, &tmp);\n\tfput(file);\nout:\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-77","original_id":"diversevul-balanced-negative-77","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_filldir(void *__buf, const char *name, int namlen,\n\t\tloff_t offset, u64 ino, unsigned int d_type)\n{\n\tstruct compat_linux_dirent __user * dirent;\n\tstruct compat_getdents_callback *buf = __buf;\n\tcompat_ulong_t d_ino;\n\tint reclen = COMPAT_ROUND_UP(NAME_OFFSET(dirent) + namlen + 2);\n\n\tbuf->error = -EINVAL;\t/* only used if we fail.. */\n\tif (reclen > buf->count)\n\t\treturn -EINVAL;\n\td_ino = ino;\n\tif (sizeof(d_ino) < sizeof(ino) && d_ino != ino)\n\t\treturn -EOVERFLOW;\n\tdirent = buf->previous;\n\tif (dirent) {\n\t\tif (__put_user(offset, &dirent->d_off))\n\t\t\tgoto efault;\n\t}\n\tdirent = buf->current_dir;\n\tif (__put_user(d_ino, &dirent->d_ino))\n\t\tgoto efault;\n\tif (__put_user(reclen, &dirent->d_reclen))\n\t\tgoto efault;\n\tif (copy_to_user(dirent->d_name, name, namlen))\n\t\tgoto efault;\n\tif (__put_user(0, dirent->d_name + namlen))\n\t\tgoto efault;\n\tif (__put_user(d_type, (char __user *) dirent + reclen - 1))\n\t\tgoto efault;\n\tbuf->previous = dirent;\n\tdirent = (void __user *)dirent + reclen;\n\tbuf->current_dir = dirent;\n\tbuf->count -= reclen;\n\treturn 0;\nefault:\n\tbuf->error = -EFAULT;\n\treturn -EFAULT;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-78","original_id":"diversevul-balanced-negative-78","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp,\n\tcompat_ulong_t __user *outp, compat_ulong_t __user *exp,\n\tstruct compat_timespec __user *tsp, void __user *sig)\n{\n\tcompat_size_t sigsetsize = 0;\n\tcompat_uptr_t up = 0;\n\n\tif (sig) {\n\t\tif (!access_ok(VERIFY_READ, sig,\n\t\t\t\tsizeof(compat_uptr_t)+sizeof(compat_size_t)) ||\n\t\t \t__get_user(up, (compat_uptr_t __user *)sig) ||\n\t\t \t__get_user(sigsetsize,\n\t\t\t\t(compat_size_t __user *)(sig+sizeof(up))))\n\t\t\treturn -EFAULT;\n\t}\n\treturn compat_sys_pselect7(n, inp, outp, exp, tsp, compat_ptr(up),\n\t\t\t\t\tsigsetsize);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-79","original_id":"diversevul-balanced-negative-79","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncompat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p)\n{\n\tlong ret;\n\taio_context_t ctx64;\n\n\tmm_segment_t oldfs = get_fs();\n\tif (unlikely(get_user(ctx64, ctx32p)))\n\t\treturn -EFAULT;\n\n\tset_fs(KERNEL_DS);\n\t/* The __user pointer cast is valid because of the set_fs() */\n\tret = sys_io_setup(nr_reqs, (aio_context_t __user *) &ctx64);\n\tset_fs(oldfs);\n\t/* truncating is ok because it's a user address */\n\tif (!ret)\n\t\tret = put_user((u32) ctx64, ctx32p);\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-80","original_id":"diversevul-balanced-negative-80","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int get_compat_flock(struct flock *kfl, struct compat_flock __user *ufl)\n{\n\tif (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)) ||\n\t __get_user(kfl->l_type, &ufl->l_type) ||\n\t __get_user(kfl->l_whence, &ufl->l_whence) ||\n\t __get_user(kfl->l_start, &ufl->l_start) ||\n\t __get_user(kfl->l_len, &ufl->l_len) ||\n\t __get_user(kfl->l_pid, &ufl->l_pid))\n\t\treturn -EFAULT;\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-81","original_id":"diversevul-balanced-negative-81","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_filldir64(void * __buf, const char * name, int namlen, loff_t offset,\n\t\t u64 ino, unsigned int d_type)\n{\n\tstruct linux_dirent64 __user *dirent;\n\tstruct compat_getdents_callback64 *buf = __buf;\n\tint jj = NAME_OFFSET(dirent);\n\tint reclen = COMPAT_ROUND_UP64(jj + namlen + 1);\n\tu64 off;\n\n\tbuf->error = -EINVAL;\t/* only used if we fail.. */\n\tif (reclen > buf->count)\n\t\treturn -EINVAL;\n\tdirent = buf->previous;\n\n\tif (dirent) {\n\t\tif (__put_user_unaligned(offset, &dirent->d_off))\n\t\t\tgoto efault;\n\t}\n\tdirent = buf->current_dir;\n\tif (__put_user_unaligned(ino, &dirent->d_ino))\n\t\tgoto efault;\n\toff = 0;\n\tif (__put_user_unaligned(off, &dirent->d_off))\n\t\tgoto efault;\n\tif (__put_user(reclen, &dirent->d_reclen))\n\t\tgoto efault;\n\tif (__put_user(d_type, &dirent->d_type))\n\t\tgoto efault;\n\tif (copy_to_user(dirent->d_name, name, namlen))\n\t\tgoto efault;\n\tif (__put_user(0, dirent->d_name + namlen))\n\t\tgoto efault;\n\tbuf->previous = dirent;\n\tdirent = (void __user *)dirent + reclen;\n\tbuf->current_dir = dirent;\n\tbuf->count -= reclen;\n\treturn 0;\nefault:\n\tbuf->error = -EFAULT;\n\treturn -EFAULT;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-82","original_id":"diversevul-balanced-negative-82","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void compat_ioctl_error(struct file *filp, unsigned int fd,\n\t\tunsigned int cmd, unsigned long arg)\n{\n\tchar buf[10];\n\tchar *fn = \"?\";\n\tchar *path;\n\n\t/* find the name of the device. */\n\tpath = (char *)__get_free_page(GFP_KERNEL);\n\tif (path) {\n\t\tfn = d_path(filp->f_dentry, filp->f_vfsmnt, path, PAGE_SIZE);\n\t\tif (IS_ERR(fn))\n\t\t\tfn = \"?\";\n\t}\n\n\tsprintf(buf,\"'%c'\", (cmd>>24) & 0x3f);\n\tif (!isprint(buf[1]))\n\t\tsprintf(buf, \"%02x\", buf[1]);\n\tcompat_printk(\"ioctl32(%s:%d): Unknown cmd fd(%d) \"\n\t\t\t\"cmd(%08x){%s} arg(%08x) on %s\\n\",\n\t\t\tcurrent->comm, current->pid,\n\t\t\t(int)fd, (unsigned int)cmd, buf,\n\t\t\t(unsigned int)arg, fn);\n\n\tif (path)\n\t\tfree_page((unsigned long)path);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-83","original_id":"diversevul-balanced-negative-83","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_utimes(char __user *filename, struct compat_timeval __user *t)\n{\n\treturn compat_sys_futimesat(AT_FDCWD, filename, t);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-84","original_id":"diversevul-balanced-negative-84","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd,\n\t\tunsigned long arg)\n{\n\tmm_segment_t old_fs;\n\tstruct flock f;\n\tlong ret;\n\n\tswitch (cmd) {\n\tcase F_GETLK:\n\tcase F_SETLK:\n\tcase F_SETLKW:\n\t\tret = get_compat_flock(&f, compat_ptr(arg));\n\t\tif (ret != 0)\n\t\t\tbreak;\n\t\told_fs = get_fs();\n\t\tset_fs(KERNEL_DS);\n\t\tret = sys_fcntl(fd, cmd, (unsigned long)&f);\n\t\tset_fs(old_fs);\n\t\tif (cmd == F_GETLK && ret == 0) {\n\t\t\t/* GETLK was successfule and we need to return the data...\n\t\t\t * but it needs to fit in the compat structure.\n\t\t\t * l_start shouldn't be too big, unless the original\n\t\t\t * start + end is greater than COMPAT_OFF_T_MAX, in which\n\t\t\t * case the app was asking for trouble, so we return\n\t\t\t * -EOVERFLOW in that case.\n\t\t\t * l_len could be too big, in which case we just truncate it,\n\t\t\t * and only allow the app to see that part of the conflicting\n\t\t\t * lock that might make sense to it anyway\n\t\t\t */\n\n\t\t\tif (f.l_start > COMPAT_OFF_T_MAX)\n\t\t\t\tret = -EOVERFLOW;\n\t\t\tif (f.l_len > COMPAT_OFF_T_MAX)\n\t\t\t\tf.l_len = COMPAT_OFF_T_MAX;\n\t\t\tif (ret == 0)\n\t\t\t\tret = put_compat_flock(&f, compat_ptr(arg));\n\t\t}\n\t\tbreak;\n\n\tcase F_GETLK64:\n\tcase F_SETLK64:\n\tcase F_SETLKW64:\n\t\tret = get_compat_flock64(&f, compat_ptr(arg));\n\t\tif (ret != 0)\n\t\t\tbreak;\n\t\told_fs = get_fs();\n\t\tset_fs(KERNEL_DS);\n\t\tret = sys_fcntl(fd, (cmd == F_GETLK64) ? F_GETLK :\n\t\t\t\t((cmd == F_SETLK64) ? F_SETLK : F_SETLKW),\n\t\t\t\t(unsigned long)&f);\n\t\tset_fs(old_fs);\n\t\tif (cmd == F_GETLK64 && ret == 0) {\n\t\t\t/* need to return lock information - see above for commentary */\n\t\t\tif (f.l_start > COMPAT_LOFF_T_MAX)\n\t\t\t\tret = -EOVERFLOW;\n\t\t\tif (f.l_len > COMPAT_LOFF_T_MAX)\n\t\t\t\tf.l_len = COMPAT_LOFF_T_MAX;\n\t\t\tif (ret == 0)\n\t\t\t\tret = put_compat_flock64(&f, compat_ptr(arg));\n\t\t}\n\t\tbreak;\n\n\tdefault:\n\t\tret = sys_fcntl(fd, cmd, arg);\n\t\tbreak;\n\t}\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-85","original_id":"diversevul-balanced-negative-85","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_count(compat_uptr_t __user *argv, int max)\n{\n\tint i = 0;\n\n\tif (argv != NULL) {\n\t\tfor (;;) {\n\t\t\tcompat_uptr_t p;\n\n\t\t\tif (get_user(p, argv))\n\t\t\t\treturn -EFAULT;\n\t\t\tif (!p)\n\t\t\t\tbreak;\n\t\t\targv++;\n\t\t\tif(++i > max)\n\t\t\t\treturn -E2BIG;\n\t\t}\n\t}\n\treturn i;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-86","original_id":"diversevul-balanced-negative-86","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int __init init_sys32_ioctl(void)\n{\n\tint i;\n\n\tfor (i = 0; i < ioctl_table_size; i++) {\n\t\tif (ioctl_start[i].next != 0) { \n\t\t\tprintk(\"ioctl translation %d bad\\n\",i); \n\t\t\treturn -1;\n\t\t}\n\n\t\tioctl32_insert_translation(&ioctl_start[i]);\n\t}\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-87","original_id":"diversevul-balanced-negative-87","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,\n\t\tunsigned long arg)\n{\n\tif ((cmd == F_GETLK64) || (cmd == F_SETLK64) || (cmd == F_SETLKW64))\n\t\treturn -EINVAL;\n\treturn compat_sys_fcntl64(fd, cmd, arg);\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-88","original_id":"diversevul-balanced-negative-88","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_copy_strings(int argc, compat_uptr_t __user *argv,\n\t\t\t\tstruct linux_binprm *bprm)\n{\n\tstruct page *kmapped_page = NULL;\n\tchar *kaddr = NULL;\n\tint ret;\n\n\twhile (argc-- > 0) {\n\t\tcompat_uptr_t str;\n\t\tint len;\n\t\tunsigned long pos;\n\n\t\tif (get_user(str, argv+argc) ||\n\t\t\t!(len = strnlen_user(compat_ptr(str), bprm->p))) {\n\t\t\tret = -EFAULT;\n\t\t\tgoto out;\n\t\t}\n\n\t\tif (bprm->p < len) {\n\t\t\tret = -E2BIG;\n\t\t\tgoto out;\n\t\t}\n\n\t\tbprm->p -= len;\n\t\t/* XXX: add architecture specific overflow check here. */\n\t\tpos = bprm->p;\n\n\t\twhile (len > 0) {\n\t\t\tint i, new, err;\n\t\t\tint offset, bytes_to_copy;\n\t\t\tstruct page *page;\n\n\t\t\toffset = pos % PAGE_SIZE;\n\t\t\ti = pos/PAGE_SIZE;\n\t\t\tpage = bprm->page[i];\n\t\t\tnew = 0;\n\t\t\tif (!page) {\n\t\t\t\tpage = alloc_page(GFP_HIGHUSER);\n\t\t\t\tbprm->page[i] = page;\n\t\t\t\tif (!page) {\n\t\t\t\t\tret = -ENOMEM;\n\t\t\t\t\tgoto out;\n\t\t\t\t}\n\t\t\t\tnew = 1;\n\t\t\t}\n\n\t\t\tif (page != kmapped_page) {\n\t\t\t\tif (kmapped_page)\n\t\t\t\t\tkunmap(kmapped_page);\n\t\t\t\tkmapped_page = page;\n\t\t\t\tkaddr = kmap(kmapped_page);\n\t\t\t}\n\t\t\tif (new && offset)\n\t\t\t\tmemset(kaddr, 0, offset);\n\t\t\tbytes_to_copy = PAGE_SIZE - offset;\n\t\t\tif (bytes_to_copy > len) {\n\t\t\t\tbytes_to_copy = len;\n\t\t\t\tif (new)\n\t\t\t\t\tmemset(kaddr+offset+len, 0,\n\t\t\t\t\t\tPAGE_SIZE-offset-len);\n\t\t\t}\n\t\t\terr = copy_from_user(kaddr+offset, compat_ptr(str),\n\t\t\t\t\t\tbytes_to_copy);\n\t\t\tif (err) {\n\t\t\t\tret = -EFAULT;\n\t\t\t\tgoto out;\n\t\t\t}\n\n\t\t\tpos += bytes_to_copy;\n\t\t\tstr += bytes_to_copy;\n\t\t\tlen -= bytes_to_copy;\n\t\t}\n\t}\n\tret = 0;\nout:\n\tif (kmapped_page)\n\t\tkunmap(kmapped_page);\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-89","original_id":"diversevul-balanced-negative-89","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ioctl32_insert_translation(struct ioctl_trans *trans)\n{\n\tunsigned long hash;\n\tstruct ioctl_trans *t;\n\n\thash = ioctl32_hash (trans->cmd);\n\tif (!ioctl32_hash_table[hash])\n\t\tioctl32_hash_table[hash] = trans;\n\telse {\n\t\tt = ioctl32_hash_table[hash];\n\t\twhile (t->next)\n\t\t\tt = t->next;\n\t\ttrans->next = NULL;\n\t\tt->next = trans;\n\t}\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-90","original_id":"diversevul-balanced-negative-90","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint compat_core_sys_select(int n, compat_ulong_t __user *inp,\n\tcompat_ulong_t __user *outp, compat_ulong_t __user *exp, s64 *timeout)\n{\n\tfd_set_bits fds;\n\tchar *bits;\n\tint size, max_fdset, ret = -EINVAL;\n\tstruct fdtable *fdt;\n\n\tif (n < 0)\n\t\tgoto out_nofds;\n\n\t/* max_fdset can increase, so grab it once to avoid race */\n\trcu_read_lock();\n\tfdt = files_fdtable(current->files);\n\tmax_fdset = fdt->max_fdset;\n\trcu_read_unlock();\n\tif (n > max_fdset)\n\t\tn = max_fdset;\n\n\t/*\n\t * We need 6 bitmaps (in/out/ex for both incoming and outgoing),\n\t * since we used fdset we need to allocate memory in units of\n\t * long-words.\n\t */\n\tret = -ENOMEM;\n\tsize = FDS_BYTES(n);\n\tbits = kmalloc(6 * size, GFP_KERNEL);\n\tif (!bits)\n\t\tgoto out_nofds;\n\tfds.in = (unsigned long *) bits;\n\tfds.out = (unsigned long *) (bits + size);\n\tfds.ex = (unsigned long *) (bits + 2*size);\n\tfds.res_in = (unsigned long *) (bits + 3*size);\n\tfds.res_out = (unsigned long *) (bits + 4*size);\n\tfds.res_ex = (unsigned long *) (bits + 5*size);\n\n\tif ((ret = compat_get_fd_set(n, inp, fds.in)) ||\n\t (ret = compat_get_fd_set(n, outp, fds.out)) ||\n\t (ret = compat_get_fd_set(n, exp, fds.ex)))\n\t\tgoto out;\n\tzero_fd_set(n, fds.res_in);\n\tzero_fd_set(n, fds.res_out);\n\tzero_fd_set(n, fds.res_ex);\n\n\tret = do_select(n, &fds, timeout);\n\n\tif (ret < 0)\n\t\tgoto out;\n\tif (!ret) {\n\t\tret = -ERESTARTNOHAND;\n\t\tif (signal_pending(current))\n\t\t\tgoto out;\n\t\tret = 0;\n\t}\n\n\tcompat_set_fd_set(n, inp, fds.res_in);\n\tcompat_set_fd_set(n, outp, fds.res_out);\n\tcompat_set_fd_set(n, exp, fds.res_ex);\n\nout:\n\tkfree(bits);\nout_nofds:\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-91","original_id":"diversevul-balanced-negative-91","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_nfs_clnt_trans(struct nfsctl_arg *karg,\n\t\t\t\tstruct compat_nfsctl_arg __user *arg)\n{\n\tif (!access_ok(VERIFY_READ, &arg->ca32_client,\n\t\t\tsizeof(arg->ca32_client)) ||\n\t\tget_user(karg->ca_version, &arg->ca32_version) ||\n\t\t__copy_from_user(&karg->ca_client.cl_ident[0],\n\t\t\t\t&arg->ca32_client.cl32_ident[0],\n\t\t\t\tNFSCLNT_IDMAX) ||\n\t\t__get_user(karg->ca_client.cl_naddr,\n\t\t\t\t&arg->ca32_client.cl32_naddr) ||\n\t\t__copy_from_user(&karg->ca_client.cl_addrlist[0],\n\t\t\t\t&arg->ca32_client.cl32_addrlist[0],\n\t\t\t\t(sizeof(struct in_addr) * NFSCLNT_ADDRMAX)) ||\n\t\t__get_user(karg->ca_client.cl_fhkeytype,\n\t\t\t\t&arg->ca32_client.cl32_fhkeytype) ||\n\t\t__get_user(karg->ca_client.cl_fhkeylen,\n\t\t\t\t&arg->ca32_client.cl32_fhkeylen) ||\n\t\t__copy_from_user(&karg->ca_client.cl_fhkey[0],\n\t\t\t\t&arg->ca32_client.cl32_fhkey[0],\n\t\t\t\tNFSCLNT_KEYMAX))\n\t\treturn -EFAULT;\n\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-92","original_id":"diversevul-balanced-negative-92","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int put_compat_statfs64(struct compat_statfs64 __user *ubuf, struct kstatfs *kbuf)\n{\n\tif (sizeof ubuf->f_blocks == 4) {\n\t\tif ((kbuf->f_blocks | kbuf->f_bfree | kbuf->f_bavail) &\n\t\t 0xffffffff00000000ULL)\n\t\t\treturn -EOVERFLOW;\n\t\t/* f_files and f_ffree may be -1; it's okay\n\t\t * to stuff that into 32 bits */\n\t\tif (kbuf->f_files != 0xffffffffffffffffULL\n\t\t && (kbuf->f_files & 0xffffffff00000000ULL))\n\t\t\treturn -EOVERFLOW;\n\t\tif (kbuf->f_ffree != 0xffffffffffffffffULL\n\t\t && (kbuf->f_ffree & 0xffffffff00000000ULL))\n\t\t\treturn -EOVERFLOW;\n\t}\n\tif (!access_ok(VERIFY_WRITE, ubuf, sizeof(*ubuf)) ||\n\t __put_user(kbuf->f_type, &ubuf->f_type) ||\n\t __put_user(kbuf->f_bsize, &ubuf->f_bsize) ||\n\t __put_user(kbuf->f_blocks, &ubuf->f_blocks) ||\n\t __put_user(kbuf->f_bfree, &ubuf->f_bfree) ||\n\t __put_user(kbuf->f_bavail, &ubuf->f_bavail) ||\n\t __put_user(kbuf->f_files, &ubuf->f_files) ||\n\t __put_user(kbuf->f_ffree, &ubuf->f_ffree) ||\n\t __put_user(kbuf->f_namelen, &ubuf->f_namelen) ||\n\t __put_user(kbuf->f_fsid.val[0], &ubuf->f_fsid.val[0]) ||\n\t __put_user(kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1]) ||\n\t __put_user(kbuf->f_frsize, &ubuf->f_frsize))\n\t\treturn -EFAULT;\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-93","original_id":"diversevul-balanced-negative-93","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void *do_ncp_super_data_conv(void *raw_data)\n{\n\tint version = *(unsigned int *)raw_data;\n\n\tif (version == 3) {\n\t\tstruct compat_ncp_mount_data *c_n = raw_data;\n\t\tstruct ncp_mount_data *n = raw_data;\n\n\t\tn->dir_mode = c_n->dir_mode;\n\t\tn->file_mode = c_n->file_mode;\n\t\tn->gid = c_n->gid;\n\t\tn->uid = c_n->uid;\n\t\tmemmove (n->mounted_vol, c_n->mounted_vol, (sizeof (c_n->mounted_vol) + 3 * sizeof (unsigned int)));\n\t\tn->wdog_pid = c_n->wdog_pid;\n\t\tn->mounted_uid = c_n->mounted_uid;\n\t} else if (version == 4) {\n\t\tstruct compat_ncp_mount_data_v4 *c_n = raw_data;\n\t\tstruct ncp_mount_data_v4 *n = raw_data;\n\n\t\tn->dir_mode = c_n->dir_mode;\n\t\tn->file_mode = c_n->file_mode;\n\t\tn->gid = c_n->gid;\n\t\tn->uid = c_n->uid;\n\t\tn->retry_count = c_n->retry_count;\n\t\tn->time_out = c_n->time_out;\n\t\tn->ncp_fd = c_n->ncp_fd;\n\t\tn->wdog_pid = c_n->wdog_pid;\n\t\tn->mounted_uid = c_n->mounted_uid;\n\t\tn->flags = c_n->flags;\n\t} else if (version != 5) {\n\t\treturn NULL;\n\t}\n\n\treturn raw_data;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-94","original_id":"diversevul-balanced-negative-94","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_nfs4_super_data_conv(void *raw_data)\n{\n\tint version = *(compat_uint_t *) raw_data;\n\n\tif (version == 1) {\n\t\tstruct compat_nfs4_mount_data_v1 *raw = raw_data;\n\t\tstruct nfs4_mount_data *real = raw_data;\n\n\t\t/* copy the fields backwards */\n\t\treal->auth_flavours = compat_ptr(raw->auth_flavours);\n\t\treal->auth_flavourlen = raw->auth_flavourlen;\n\t\treal->proto = raw->proto;\n\t\treal->host_addr = compat_ptr(raw->host_addr);\n\t\treal->host_addrlen = raw->host_addrlen;\n\t\tcompat_nfs_string(&real->hostname, &raw->hostname);\n\t\tcompat_nfs_string(&real->mnt_path, &raw->mnt_path);\n\t\tcompat_nfs_string(&real->client_addr, &raw->client_addr);\n\t\treal->acdirmax = raw->acdirmax;\n\t\treal->acdirmin = raw->acdirmin;\n\t\treal->acregmax = raw->acregmax;\n\t\treal->acregmin = raw->acregmin;\n\t\treal->retrans = raw->retrans;\n\t\treal->timeo = raw->timeo;\n\t\treal->wsize = raw->wsize;\n\t\treal->rsize = raw->rsize;\n\t\treal->flags = raw->flags;\n\t\treal->version = raw->version;\n\t}\n\telse {\n\t\treturn -EINVAL;\n\t}\n\n\treturn 0;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-95","original_id":"diversevul-balanced-negative-95","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncompat_sys_io_getevents(aio_context_t ctx_id,\n\t\t\t\t unsigned long min_nr,\n\t\t\t\t unsigned long nr,\n\t\t\t\t struct io_event __user *events,\n\t\t\t\t struct compat_timespec __user *timeout)\n{\n\tlong ret;\n\tstruct timespec t;\n\tstruct timespec __user *ut = NULL;\n\n\tret = -EFAULT;\n\tif (unlikely(!access_ok(VERIFY_WRITE, events, \n\t\t\t\tnr * sizeof(struct io_event))))\n\t\tgoto out;\n\tif (timeout) {\n\t\tif (get_compat_timespec(&t, timeout))\n\t\t\tgoto out;\n\n\t\tut = compat_alloc_user_space(sizeof(*ut));\n\t\tif (copy_to_user(ut, &t, sizeof(t)) )\n\t\t\tgoto out;\n\t} \n\tret = sys_io_getevents(ctx_id, min_nr, nr, events, ut);\nout:\n\treturn ret;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-96","original_id":"diversevul-balanced-negative-96","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline void compat_nfs_string(struct nfs_string *dst,\n\t\t\t\t struct compat_nfs_string *src)\n{\n\tdst->data = compat_ptr(src->data);\n\tdst->len = src->len;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-97","original_id":"diversevul-balanced-negative-97","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_statfs(const char __user *path, struct compat_statfs __user *buf)\n{\n\tstruct nameidata nd;\n\tint error;\n\n\terror = user_path_walk(path, &nd);\n\tif (!error) {\n\t\tstruct kstatfs tmp;\n\t\terror = vfs_statfs(nd.dentry, &tmp);\n\t\tif (!error)\n\t\t\terror = put_compat_statfs(buf, &tmp);\n\t\tpath_release(&nd);\n\t}\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-98","original_id":"diversevul-balanced-negative-98","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compat_fillonedir(void *__buf, const char *name, int namlen,\n\t\t\tloff_t offset, u64 ino, unsigned int d_type)\n{\n\tstruct compat_readdir_callback *buf = __buf;\n\tstruct compat_old_linux_dirent __user *dirent;\n\tcompat_ulong_t d_ino;\n\n\tif (buf->result)\n\t\treturn -EINVAL;\n\td_ino = ino;\n\tif (sizeof(d_ino) < sizeof(ino) && d_ino != ino)\n\t\treturn -EOVERFLOW;\n\tbuf->result++;\n\tdirent = buf->dirent;\n\tif (!access_ok(VERIFY_WRITE, dirent,\n\t\t\t(unsigned long)(dirent->d_name + namlen + 1) -\n\t\t\t\t(unsigned long)dirent))\n\t\tgoto efault;\n\tif (\t__put_user(d_ino, &dirent->d_ino) ||\n\t\t__put_user(offset, &dirent->d_offset) ||\n\t\t__put_user(namlen, &dirent->d_namlen) ||\n\t\t__copy_to_user(dirent->d_name, name, namlen) ||\n\t\t__put_user(0, dirent->d_name + namlen))\n\t\tgoto efault;\n\treturn 0;\nefault:\n\tbuf->result = -EFAULT;\n\treturn -EFAULT;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-balanced-negative-99","original_id":"diversevul-balanced-negative-99","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_statfs64(const char __user *path, compat_size_t sz, struct compat_statfs64 __user *buf)\n{\n\tstruct nameidata nd;\n\tint error;\n\n\tif (sz != sizeof(*buf))\n\t\treturn -EINVAL;\n\n\terror = user_path_walk(path, &nd);\n\tif (!error) {\n\t\tstruct kstatfs tmp;\n\t\terror = vfs_statfs(nd.dentry, &tmp);\n\t\tif (!error)\n\t\t\terror = put_compat_statfs64(buf, &tmp);\n\t\tpath_release(&nd);\n\t}\n\treturn error;\n}\n```","source":"diversevul-balanced","source_file":"external/diversevul-balanced.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"target","target":true,"answer":"No","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-0","original_id":"diversevul-0","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic char *make_filename_safe(const char *filename TSRMLS_DC)\n{\n\tif (*filename && strncmp(filename, \":memory:\", sizeof(\":memory:\")-1)) {\n\t\tchar *fullpath = expand_filepath(filename, NULL TSRMLS_CC);\n\n\t\tif (!fullpath) {\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {\n\t\t\tefree(fullpath);\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif (php_check_open_basedir(fullpath TSRMLS_CC)) {\n\t\t\tefree(fullpath);\n\t\t\treturn NULL;\n\t\t}\n\t\treturn fullpath;\n\t}\n\treturn estrdup(filename);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-1","original_id":"diversevul-1","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)\n{\n int sx, sy;\n int dx, dy;\n int width, height;\n int depth;\n int notify = 0;\n\n depth = s->get_bpp((VGAState *)s) / 8;\n s->get_resolution((VGAState *)s, &width, &height);\n\n /* extra x, y */\n sx = (src % (width * depth)) / depth;\n sy = (src / (width * depth));\n dx = (dst % (width *depth)) / depth;\n dy = (dst / (width * depth));\n\n /* normalize width */\n w /= depth;\n\n /* if we're doing a backward copy, we have to adjust\n our x/y to be the upper left corner (instead of the lower\n right corner) */\n if (s->cirrus_blt_dstpitch < 0) {\n\tsx -= (s->cirrus_blt_width / depth) - 1;\n\tdx -= (s->cirrus_blt_width / depth) - 1;\n\tsy -= s->cirrus_blt_height - 1;\n\tdy -= s->cirrus_blt_height - 1;\n }\n\n /* are we in the visible portion of memory? */\n if (sx >= 0 && sy >= 0 && dx >= 0 && dy >= 0 &&\n\t(sx + w) <= width && (sy + h) <= height &&\n\t(dx + w) <= width && (dy + h) <= height) {\n\tnotify = 1;\n }\n\n /* make to sure only copy if it's a plain copy ROP */\n if (*s->cirrus_rop != cirrus_bitblt_rop_fwd_src &&\n\t*s->cirrus_rop != cirrus_bitblt_rop_bkwd_src)\n\tnotify = 0;\n\n /* we have to flush all pending changes so that the copy\n is generated at the appropriate moment in time */\n if (notify)\n\tvga_hw_update();\n\n (*s->cirrus_rop) (s, s->vram_ptr + s->cirrus_blt_dstaddr,\n\t\t s->vram_ptr + s->cirrus_blt_srcaddr,\n\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n if (notify)\n\ts->ds->dpy_copy(s->ds,\n\t\t\tsx, sy, dx, dy,\n\t\t\ts->cirrus_blt_width / depth,\n\t\t\ts->cirrus_blt_height);\n\n /* we don't have to notify the display that this portion has\n changed since dpy_copy implies this */\n\n if (!notify)\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-2","original_id":"diversevul-2","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nglue(cirrus_bitblt_rop_fwd_, ROP_NAME)(CirrusVGAState *s,\n uint8_t *dst,const uint8_t *src,\n int dstpitch,int srcpitch,\n int bltwidth,int bltheight)\n{\n int x,y;\n dstpitch -= bltwidth;\n srcpitch -= bltwidth;\n for (y = 0; y < bltheight; y++) {\n for (x = 0; x < bltwidth; x++) {\n ROP_OP(*dst, *src);\n dst++;\n src++;\n }\n dst += dstpitch;\n src += srcpitch;\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-3","original_id":"diversevul-3","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)\n{\n if (s->ds->dpy_copy) {\n\tcirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr,\n\t\t s->cirrus_blt_srcaddr - s->start_addr,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n } else {\n\t(*s->cirrus_rop) (s, s->vram_ptr + s->cirrus_blt_dstaddr,\n\t\t\t s->vram_ptr + s->cirrus_blt_srcaddr,\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n }\n\n return 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-4","original_id":"diversevul-4","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mem_writeb_mode4and5_8bpp(CirrusVGAState * s,\n\t\t\t\t\t unsigned mode,\n\t\t\t\t\t unsigned offset,\n\t\t\t\t\t uint32_t mem_value)\n{\n int x;\n unsigned val = mem_value;\n uint8_t *dst;\n\n dst = s->vram_ptr + offset;\n for (x = 0; x < 8; x++) {\n\tif (val & 0x80) {\n\t *dst = s->cirrus_shadow_gr1;\n\t} else if (mode == 5) {\n\t *dst = s->cirrus_shadow_gr0;\n\t}\n\tval <<= 1;\n\tdst++;\n }\n cpu_physical_memory_set_dirty(s->vram_offset + offset);\n cpu_physical_memory_set_dirty(s->vram_offset + offset + 7);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-5","original_id":"diversevul-5","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_common_patterncopy(CirrusVGAState * s,\n\t\t\t\t\t const uint8_t * src)\n{\n uint8_t *dst;\n\n dst = s->vram_ptr + s->cirrus_blt_dstaddr;\n (*s->cirrus_rop) (s, dst, src,\n s->cirrus_blt_dstpitch, 0,\n s->cirrus_blt_width, s->cirrus_blt_height);\n cirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n s->cirrus_blt_height);\n return 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-6","original_id":"diversevul-6","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_invalidate_region(CirrusVGAState * s, int off_begin,\n\t\t\t\t int off_pitch, int bytesperline,\n\t\t\t\t int lines)\n{\n int y;\n int off_cur;\n int off_cur_end;\n\n for (y = 0; y < lines; y++) {\n\toff_cur = off_begin;\n\toff_cur_end = off_cur + bytesperline;\n\toff_cur &= TARGET_PAGE_MASK;\n\twhile (off_cur < off_cur_end) {\n\t cpu_physical_memory_set_dirty(s->vram_offset + off_cur);\n\t off_cur += TARGET_PAGE_SIZE;\n\t}\n\toff_begin += off_pitch;\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-7","original_id":"diversevul-7","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_patterncopy(CirrusVGAState * s)\n{\n return cirrus_bitblt_common_patterncopy(s,\n\t\t\t\t\t s->vram_ptr +\n (s->cirrus_blt_srcaddr & ~7));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-8","original_id":"diversevul-8","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop)\n{\n cirrus_fill_t rop_func;\n\n rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1];\n rop_func(s, s->vram_ptr + s->cirrus_blt_dstaddr,\n s->cirrus_blt_dstpitch,\n s->cirrus_blt_width, s->cirrus_blt_height);\n cirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t s->cirrus_blt_height);\n cirrus_bitblt_reset(s);\n return 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-9","original_id":"diversevul-9","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_bitblt_cputovideo_next(CirrusVGAState * s)\n{\n int copy_count;\n uint8_t *end_ptr;\n\n if (s->cirrus_srccounter > 0) {\n if (s->cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY) {\n cirrus_bitblt_common_patterncopy(s, s->cirrus_bltbuf);\n the_end:\n s->cirrus_srccounter = 0;\n cirrus_bitblt_reset(s);\n } else {\n /* at least one scan line */\n do {\n (*s->cirrus_rop)(s, s->vram_ptr + s->cirrus_blt_dstaddr,\n s->cirrus_bltbuf, 0, 0, s->cirrus_blt_width, 1);\n cirrus_invalidate_region(s, s->cirrus_blt_dstaddr, 0,\n s->cirrus_blt_width, 1);\n s->cirrus_blt_dstaddr += s->cirrus_blt_dstpitch;\n s->cirrus_srccounter -= s->cirrus_blt_srcpitch;\n if (s->cirrus_srccounter <= 0)\n goto the_end;\n /* more bytes than needed can be transfered because of\n word alignment, so we keep them for the next line */\n /* XXX: keep alignment to speed up transfer */\n end_ptr = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;\n copy_count = s->cirrus_srcptr_end - end_ptr;\n memmove(s->cirrus_bltbuf, end_ptr, copy_count);\n s->cirrus_srcptr = s->cirrus_bltbuf + copy_count;\n s->cirrus_srcptr_end = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;\n } while (s->cirrus_srcptr >= s->cirrus_srcptr_end);\n }\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-10","original_id":"diversevul-10","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void cirrus_mem_writeb_mode4and5_16bpp(CirrusVGAState * s,\n\t\t\t\t\t unsigned mode,\n\t\t\t\t\t unsigned offset,\n\t\t\t\t\t uint32_t mem_value)\n{\n int x;\n unsigned val = mem_value;\n uint8_t *dst;\n\n dst = s->vram_ptr + offset;\n for (x = 0; x < 8; x++) {\n\tif (val & 0x80) {\n\t *dst = s->cirrus_shadow_gr1;\n\t *(dst + 1) = s->gr[0x11];\n\t} else if (mode == 5) {\n\t *dst = s->cirrus_shadow_gr0;\n\t *(dst + 1) = s->gr[0x10];\n\t}\n\tval <<= 1;\n\tdst += 2;\n }\n cpu_physical_memory_set_dirty(s->vram_offset + offset);\n cpu_physical_memory_set_dirty(s->vram_offset + offset + 15);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-11","original_id":"diversevul-11","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int cirrus_bitblt_videotovideo_copy(CirrusVGAState * s)\n{\n if (s->ds->dpy_copy) {\n\tcirrus_do_copy(s, s->cirrus_blt_dstaddr - s->start_addr,\n\t\t s->cirrus_blt_srcaddr - s->start_addr,\n\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n } else {\n\n if (BLTUNSAFE(s))\n return 0;\n\n\t(*s->cirrus_rop) (s, s->vram_ptr +\n (s->cirrus_blt_dstaddr & s->cirrus_addr_mask),\n\t\t\t s->vram_ptr +\n (s->cirrus_blt_srcaddr & s->cirrus_addr_mask),\n\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_srcpitch,\n\t\t\t s->cirrus_blt_width, s->cirrus_blt_height);\n\n\tcirrus_invalidate_region(s, s->cirrus_blt_dstaddr,\n\t\t\t\t s->cirrus_blt_dstpitch, s->cirrus_blt_width,\n\t\t\t\t s->cirrus_blt_height);\n }\n\n return 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-787"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-12","original_id":"diversevul-12","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long compat_sys_mount(char __user * dev_name, char __user * dir_name,\n\t\t\t\t char __user * type, unsigned long flags,\n\t\t\t\t void __user * data)\n{\n\tunsigned long type_page;\n\tunsigned long data_page;\n\tunsigned long dev_page;\n\tchar *dir_page;\n\tint retval;\n\n\tretval = copy_mount_options (type, &type_page);\n\tif (retval < 0)\n\t\tgoto out;\n\n\tdir_page = getname(dir_name);\n\tretval = PTR_ERR(dir_page);\n\tif (IS_ERR(dir_page))\n\t\tgoto out1;\n\n\tretval = copy_mount_options (dev_name, &dev_page);\n\tif (retval < 0)\n\t\tgoto out2;\n\n\tretval = copy_mount_options (data, &data_page);\n\tif (retval < 0)\n\t\tgoto out3;\n\n\tretval = -EINVAL;\n\n\tif (type_page) {\n\t\tif (!strcmp((char *)type_page, SMBFS_NAME)) {\n\t\t\tdo_smb_super_data_conv((void *)data_page);\n\t\t} else if (!strcmp((char *)type_page, NCPFS_NAME)) {\n\t\t\tdo_ncp_super_data_conv((void *)data_page);\n\t\t} else if (!strcmp((char *)type_page, NFS4_NAME)) {\n\t\t\tif (do_nfs4_super_data_conv((void *) data_page))\n\t\t\t\tgoto out4;\n\t\t}\n\t}\n\n\tlock_kernel();\n\tretval = do_mount((char*)dev_page, dir_page, (char*)type_page,\n\t\t\tflags, (void*)data_page);\n\tunlock_kernel();\n\n out4:\n\tfree_page(data_page);\n out3:\n\tfree_page(dev_page);\n out2:\n\tputname(dir_page);\n out1:\n\tfree_page(type_page);\n out:\n\treturn retval;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-13","original_id":"diversevul-13","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nunsigned short atalk_checksum(struct ddpehdr *ddp, int len)\n{\n\tunsigned long sum = 0;\t/* Assume unsigned long is >16 bits */\n\tunsigned char *data = (unsigned char *)ddp;\n\n\tlen -= 4;\t\t/* skip header 4 bytes */\n\tdata += 4;\n\n\t/* This ought to be unwrapped neatly. I'll trust gcc for now */\n\twhile (len--) {\n\t\tsum += *data;\n\t\tsum <<= 1;\n\t\tif (sum & 0x10000) {\n\t\t\tsum++;\n\t\t\tsum &= 0xFFFF;\n\t\t}\n\t\tdata++;\n\t}\n\t/* Use 0xFFFF for 0. 0 itself means none */\n\treturn sum ? htons((unsigned short)sum) : 0xFFFF;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-14","original_id":"diversevul-14","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ltalk_rcv(struct sk_buff *skb, struct net_device *dev,\n\t\t\tstruct packet_type *pt)\n{\n\t/* Expand any short form frames */\n\tif (skb->mac.raw[2] == 1) {\n\t\tstruct ddpehdr *ddp;\n\t\t/* Find our address */\n\t\tstruct atalk_addr *ap = atalk_find_dev_addr(dev);\n\n\t\tif (!ap || skb->len < sizeof(struct ddpshdr))\n\t\t\tgoto freeit;\n\t\t/*\n\t\t * The push leaves us with a ddephdr not an shdr, and\n\t\t * handily the port bytes in the right place preset.\n\t\t */\n\n\t\tskb_push(skb, sizeof(*ddp) - 4);\n\t\t/* FIXME: use skb->cb to be able to use shared skbs */\n\t\tddp = (struct ddpehdr *)skb->data;\n\n\t\t/* Now fill in the long header */\n\n\t \t/*\n\t \t * These two first. The mac overlays the new source/dest\n\t \t * network information so we MUST copy these before\n\t \t * we write the network numbers !\n\t \t */\n\n\t\tddp->deh_dnode = skb->mac.raw[0]; /* From physical header */\n\t\tddp->deh_snode = skb->mac.raw[1]; /* From physical header */\n\n\t\tddp->deh_dnet = ap->s_net;\t/* Network number */\n\t\tddp->deh_snet = ap->s_net;\n\t\tddp->deh_sum = 0;\t\t/* No checksum */\n\t\t/*\n\t\t * Not sure about this bit...\n\t\t */\n\t\tddp->deh_len = skb->len;\n\t\tddp->deh_hops = DDP_MAXHOPS;\t/* Non routable, so force a drop\n\t\t\t\t\t\t if we slip up later */\n\t\t/* Mend the byte order */\n\t\t*((__u16 *)ddp) = htons(*((__u16 *)ddp));\n\t}\n\tskb->h.raw = skb->data;\n\n\treturn atalk_rcv(skb, dev, pt);\nfreeit:\n\tkfree_skb(skb);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-15","original_id":"diversevul-15","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int fat_ioctl_filldir(void *__buf, const char *name, int name_len,\n\t\t\t loff_t offset, u64 ino, unsigned int d_type)\n{\n\tstruct fat_ioctl_filldir_callback *buf = __buf;\n\tstruct dirent __user *d1 = buf->dirent;\n\tstruct dirent __user *d2 = d1 + 1;\n\n\tif (buf->result)\n\t\treturn -EINVAL;\n\tbuf->result++;\n\n\tif (name != NULL) {\n\t\t/* dirent has only short name */\n\t\tif (name_len >= sizeof(d1->d_name))\n\t\t\tname_len = sizeof(d1->d_name) - 1;\n\n\t\tif (put_user(0, d2->d_name)\t\t\t||\n\t\t put_user(0, &d2->d_reclen)\t\t\t||\n\t\t copy_to_user(d1->d_name, name, name_len)\t||\n\t\t put_user(0, d1->d_name + name_len)\t\t||\n\t\t put_user(name_len, &d1->d_reclen))\n\t\t\tgoto efault;\n\t} else {\n\t\t/* dirent has short and long name */\n\t\tconst char *longname = buf->longname;\n\t\tint long_len = buf->long_len;\n\t\tconst char *shortname = buf->shortname;\n\t\tint short_len = buf->short_len;\n\n\t\tif (long_len >= sizeof(d1->d_name))\n\t\t\tlong_len = sizeof(d1->d_name) - 1;\n\t\tif (short_len >= sizeof(d1->d_name))\n\t\t\tshort_len = sizeof(d1->d_name) - 1;\n\n\t\tif (copy_to_user(d2->d_name, longname, long_len)\t||\n\t\t put_user(0, d2->d_name + long_len)\t\t\t||\n\t\t put_user(long_len, &d2->d_reclen)\t\t\t||\n\t\t put_user(ino, &d2->d_ino)\t\t\t\t||\n\t\t put_user(offset, &d2->d_off)\t\t\t||\n\t\t copy_to_user(d1->d_name, shortname, short_len)\t||\n\t\t put_user(0, d1->d_name + short_len)\t\t\t||\n\t\t put_user(short_len, &d1->d_reclen))\n\t\t\tgoto efault;\n\t}\n\treturn 0;\nefault:\n\tbuf->result = -EFAULT;\n\treturn -EFAULT;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-16","original_id":"diversevul-16","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int fat_dir_ioctl(struct inode * inode, struct file * filp,\n\t\t unsigned int cmd, unsigned long arg)\n{\n\tstruct fat_ioctl_filldir_callback buf;\n\tstruct dirent __user *d1;\n\tint ret, short_only, both;\n\n\tswitch (cmd) {\n\tcase VFAT_IOCTL_READDIR_SHORT:\n\t\tshort_only = 1;\n\t\tboth = 0;\n\t\tbreak;\n\tcase VFAT_IOCTL_READDIR_BOTH:\n\t\tshort_only = 0;\n\t\tboth = 1;\n\t\tbreak;\n\tdefault:\n\t\treturn fat_generic_ioctl(inode, filp, cmd, arg);\n\t}\n\n\td1 = (struct dirent __user *)arg;\n\tif (!access_ok(VERIFY_WRITE, d1, sizeof(struct dirent[2])))\n\t\treturn -EFAULT;\n\t/*\n\t * Yes, we don't need this put_user() absolutely. However old\n\t * code didn't return the right value. So, app use this value,\n\t * in order to check whether it is EOF.\n\t */\n\tif (put_user(0, &d1->d_reclen))\n\t\treturn -EFAULT;\n\n\tbuf.dirent = d1;\n\tbuf.result = 0;\n\tmutex_lock(&inode->i_mutex);\n\tret = -ENOENT;\n\tif (!IS_DEADDIR(inode)) {\n\t\tret = __fat_readdir(inode, filp, &buf, fat_ioctl_filldir,\n\t\t\t\t short_only, both);\n\t}\n\tmutex_unlock(&inode->i_mutex);\n\tif (ret >= 0)\n\t\tret = buf.result;\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-17","original_id":"diversevul-17","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic long fat_compat_dir_ioctl(struct file *file, unsigned cmd,\n\t\t\t\t unsigned long arg)\n{\n\tstruct compat_dirent __user *p = compat_ptr(arg);\n\tint ret;\n\tmm_segment_t oldfs = get_fs();\n\tstruct dirent d[2];\n\n\tswitch (cmd) {\n\tcase VFAT_IOCTL_READDIR_BOTH32:\n\t\tcmd = VFAT_IOCTL_READDIR_BOTH;\n\t\tbreak;\n\tcase VFAT_IOCTL_READDIR_SHORT32:\n\t\tcmd = VFAT_IOCTL_READDIR_SHORT;\n\t\tbreak;\n\tdefault:\n\t\treturn -ENOIOCTLCMD;\n\t}\n\n\tset_fs(KERNEL_DS);\n\tlock_kernel();\n\tret = fat_dir_ioctl(file->f_path.dentry->d_inode, file,\n\t\t\t cmd, (unsigned long) &d);\n\tunlock_kernel();\n\tset_fs(oldfs);\n\tif (ret >= 0) {\n\t\tret |= fat_compat_put_dirent32(&d[0], p);\n\t\tret |= fat_compat_put_dirent32(&d[1], p + 1);\n\t}\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-18","original_id":"diversevul-18","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic long fat_compat_put_dirent32(struct dirent *d,\n\t\t\t\t struct compat_dirent __user *d32)\n{\n if (!access_ok(VERIFY_WRITE, d32, sizeof(struct compat_dirent)))\n return -EFAULT;\n\n __put_user(d->d_ino, &d32->d_ino);\n __put_user(d->d_off, &d32->d_off);\n __put_user(d->d_reclen, &d32->d_reclen);\n if (__copy_to_user(d32->d_name, d->d_name, d->d_reclen))\n\t\treturn -EFAULT;\n\n return 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-19","original_id":"diversevul-19","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int vfat_ioctl32(unsigned fd, unsigned cmd, unsigned long arg)\n{\n\tstruct compat_dirent __user *p = compat_ptr(arg);\n\tint ret;\n\tmm_segment_t oldfs = get_fs();\n\tstruct dirent d[2];\n\n\tswitch(cmd)\n\t{\n \tcase VFAT_IOCTL_READDIR_BOTH32:\n \tcmd = VFAT_IOCTL_READDIR_BOTH;\n \tbreak;\n \tcase VFAT_IOCTL_READDIR_SHORT32:\n \tcmd = VFAT_IOCTL_READDIR_SHORT;\n \tbreak;\n\t}\n\n\tset_fs(KERNEL_DS);\n\tret = sys_ioctl(fd,cmd,(unsigned long)&d);\n\tset_fs(oldfs);\n\tif (ret >= 0) {\n\t\tret |= put_dirent32(&d[0], p);\n\t\tret |= put_dirent32(&d[1], p + 1);\n\t}\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-20","original_id":"diversevul-20","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nput_dirent32 (struct dirent *d, struct compat_dirent __user *d32)\n{\n if (!access_ok(VERIFY_WRITE, d32, sizeof(struct compat_dirent)))\n return -EFAULT;\n\n __put_user(d->d_ino, &d32->d_ino);\n __put_user(d->d_off, &d32->d_off);\n __put_user(d->d_reclen, &d32->d_reclen);\n if (__copy_to_user(d32->d_name, d->d_name, d->d_reclen))\n\t\treturn -EFAULT;\n\n return 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-21","original_id":"diversevul-21","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nunsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *regs)\n{\n\tunsigned long addr, seg;\n\n\taddr = regs->rip;\n\tseg = regs->cs & 0xffff;\n\n\t/*\n\t * We'll assume that the code segments in the GDT\n\t * are all zero-based. That is largely true: the\n\t * TLS segments are used for data, and the PNPBIOS\n\t * and APM bios ones we just ignore here.\n\t */\n\tif (seg & LDT_SEGMENT) {\n\t\tu32 *desc;\n\t\tunsigned long base;\n\n\t\tdown(&child->mm->context.sem);\n\t\tdesc = child->mm->context.ldt + (seg & ~7);\n\t\tbase = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);\n\n\t\t/* 16-bit code segment? */\n\t\tif (!((desc[1] >> 22) & 1))\n\t\t\taddr &= 0xffff;\n\t\taddr += base;\n\t\tup(&child->mm->context.sem);\n\t}\n\treturn addr;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-22","original_id":"diversevul-22","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned long convert_eip_to_linear(struct task_struct *child, struct pt_regs *regs)\n{\n\tunsigned long addr, seg;\n\n\taddr = regs->eip;\n\tseg = regs->xcs & 0xffff;\n\tif (regs->eflags & VM_MASK) {\n\t\taddr = (addr & 0xffff) + (seg << 4);\n\t\treturn addr;\n\t}\n\n\t/*\n\t * We'll assume that the code segments in the GDT\n\t * are all zero-based. That is largely true: the\n\t * TLS segments are used for data, and the PNPBIOS\n\t * and APM bios ones we just ignore here.\n\t */\n\tif (seg & LDT_SEGMENT) {\n\t\tu32 *desc;\n\t\tunsigned long base;\n\n\t\tdown(&child->mm->context.sem);\n\t\tdesc = child->mm->context.ldt + (seg & ~7);\n\t\tbase = (desc[0] >> 16) | ((desc[1] & 0xff) << 16) | (desc[1] & 0xff000000);\n\n\t\t/* 16-bit code segment? */\n\t\tif (!((desc[1] >> 22) & 1))\n\t\t\taddr &= 0xffff;\n\t\taddr += base;\n\t\tup(&child->mm->context.sem);\n\t}\n\treturn addr;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-23","original_id":"diversevul-23","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\npfm_setup_buffer_fmt(struct task_struct *task, pfm_context_t *ctx, unsigned int ctx_flags,\n\t\t unsigned int cpu, pfarg_context_t *arg)\n{\n\tpfm_buffer_fmt_t *fmt = NULL;\n\tunsigned long size = 0UL;\n\tvoid *uaddr = NULL;\n\tvoid *fmt_arg = NULL;\n\tint ret = 0;\n#define PFM_CTXARG_BUF_ARG(a)\t(pfm_buffer_fmt_t *)(a+1)\n\n\t/* invoke and lock buffer format, if found */\n\tfmt = pfm_find_buffer_fmt(arg->ctx_smpl_buf_id);\n\tif (fmt == NULL) {\n\t\tDPRINT((\"[%d] cannot find buffer format\\n\", task->pid));\n\t\treturn -EINVAL;\n\t}\n\n\t/*\n\t * buffer argument MUST be contiguous to pfarg_context_t\n\t */\n\tif (fmt->fmt_arg_size) fmt_arg = PFM_CTXARG_BUF_ARG(arg);\n\n\tret = pfm_buf_fmt_validate(fmt, task, ctx_flags, cpu, fmt_arg);\n\n\tDPRINT((\"[%d] after validate(0x%x,%d,%p)=%d\\n\", task->pid, ctx_flags, cpu, fmt_arg, ret));\n\n\tif (ret) goto error;\n\n\t/* link buffer format and context */\n\tctx->ctx_buf_fmt = fmt;\n\n\t/*\n\t * check if buffer format wants to use perfmon buffer allocation/mapping service\n\t */\n\tret = pfm_buf_fmt_getsize(fmt, task, ctx_flags, cpu, fmt_arg, &size);\n\tif (ret) goto error;\n\n\tif (size) {\n\t\t/*\n\t\t * buffer is always remapped into the caller's address space\n\t\t */\n\t\tret = pfm_smpl_buffer_alloc(current, ctx, size, &uaddr);\n\t\tif (ret) goto error;\n\n\t\t/* keep track of user address of buffer */\n\t\targ->ctx_smpl_vaddr = uaddr;\n\t}\n\tret = pfm_buf_fmt_init(fmt, task, ctx->ctx_smpl_hdr, ctx_flags, cpu, fmt_arg);\n\nerror:\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-24","original_id":"diversevul-24","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int __init snd_mem_init(void)\n{\n#ifdef CONFIG_PROC_FS\n\tsnd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);\n\tif (snd_mem_proc) {\n\t\tsnd_mem_proc->read_proc = snd_mem_proc_read;\n#ifdef CONFIG_PCI\n\t\tsnd_mem_proc->write_proc = snd_mem_proc_write;\n#endif\n\t}\n#endif\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-25","original_id":"diversevul-25","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int snd_mem_proc_read(char *page, char **start, off_t off,\n\t\t\t int count, int *eof, void *data)\n{\n\tint len = 0;\n\tlong pages = snd_allocated_pages >> (PAGE_SHIFT-12);\n\tstruct snd_mem_list *mem;\n\tint devno;\n\tstatic char *types[] = { \"UNKNOWN\", \"CONT\", \"DEV\", \"DEV-SG\", \"SBUS\" };\n\n\tmutex_lock(&list_mutex);\n\tlen += snprintf(page + len, count - len,\n\t\t\t\"pages : %li bytes (%li pages per %likB)\\n\",\n\t\t\tpages * PAGE_SIZE, pages, PAGE_SIZE / 1024);\n\tdevno = 0;\n\tlist_for_each_entry(mem, &mem_list_head, list) {\n\t\tdevno++;\n\t\tlen += snprintf(page + len, count - len,\n\t\t\t\t\"buffer %d : ID %08x : type %s\\n\",\n\t\t\t\tdevno, mem->id, types[mem->buffer.dev.type]);\n\t\tlen += snprintf(page + len, count - len,\n\t\t\t\t\" addr = 0x%lx, size = %d bytes\\n\",\n\t\t\t\t(unsigned long)mem->buffer.addr, (int)mem->buffer.bytes);\n\t}\n\tmutex_unlock(&list_mutex);\n\treturn len;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-26","original_id":"diversevul-26","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int putreg(struct task_struct *child,\n\tunsigned long regno, unsigned long value)\n{\n\tunsigned long tmp; \n\t\n\t/* Some code in the 64bit emulation may not be 64bit clean.\n\t Don't take any chances. */\n\tif (test_tsk_thread_flag(child, TIF_IA32))\n\t\tvalue &= 0xffffffff;\n\tswitch (regno) {\n\t\tcase offsetof(struct user_regs_struct,fs):\n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.fsindex = value & 0xffff; \n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,gs):\n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.gsindex = value & 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,ds):\n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.ds = value & 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,es): \n\t\t\tif (value && (value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.es = value & 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,ss):\n\t\t\tif ((value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tvalue &= 0xffff;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,fs_base):\n\t\t\tif (value >= TASK_SIZE_OF(child))\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.fs = value;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct,gs_base):\n\t\t\tif (value >= TASK_SIZE_OF(child))\n\t\t\t\treturn -EIO;\n\t\t\tchild->thread.gs = value;\n\t\t\treturn 0;\n\t\tcase offsetof(struct user_regs_struct, eflags):\n\t\t\tvalue &= FLAG_MASK;\n\t\t\ttmp = get_stack_long(child, EFL_OFFSET); \n\t\t\ttmp &= ~FLAG_MASK; \n\t\t\tvalue |= tmp;\n\t\t\tbreak;\n\t\tcase offsetof(struct user_regs_struct,cs): \n\t\t\tif ((value & 3) != 3)\n\t\t\t\treturn -EIO;\n\t\t\tvalue &= 0xffff;\n\t\t\tbreak;\n\t}\n\tput_stack_long(child, regno - sizeof(struct pt_regs), value);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-27","original_id":"diversevul-27","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int pwc_video_close(struct inode *inode, struct file *file)\n{\n\tstruct video_device *vdev = file->private_data;\n\tstruct pwc_device *pdev;\n\tint i;\n\n\tPWC_DEBUG_OPEN(\">> video_close called(vdev = 0x%p).\\n\", vdev);\n\n\tpdev = (struct pwc_device *)vdev->priv;\n\tif (pdev->vopen == 0)\n\t\tPWC_DEBUG_MODULE(\"video_close() called on closed device?\\n\");\n\n\t/* Dump statistics, but only if a reasonable amount of frames were\n\t processed (to prevent endless log-entries in case of snap-shot\n\t programs)\n\t */\n\tif (pdev->vframe_count > 20)\n\t\tPWC_DEBUG_MODULE(\"Closing video device: %d frames received, dumped %d frames, %d frames with errors.\\n\", pdev->vframe_count, pdev->vframes_dumped, pdev->vframes_error);\n\n\tif (DEVICE_USE_CODEC1(pdev->type))\n\t pwc_dec1_exit();\n\telse\n\t pwc_dec23_exit();\n\n\tpwc_isoc_cleanup(pdev);\n\tpwc_free_buffers(pdev);\n\n\t/* Turn off LEDS and power down camera, but only when not unplugged */\n\tif (pdev->error_status != EPIPE) {\n\t\t/* Turn LEDs off */\n\t\tif (pwc_set_leds(pdev, 0, 0) < 0)\n\t\t\tPWC_DEBUG_MODULE(\"Failed to set LED on/off time.\\n\");\n\t\tif (power_save) {\n\t\t\ti = pwc_camera_power(pdev, 0);\n\t\t\tif (i < 0)\n\t\t\t\tPWC_ERROR(\"Failed to power down camera (%d)\\n\", i);\n\t\t}\n\t}\n\tpdev->vopen--;\n\tPWC_DEBUG_OPEN(\"<< video_close() vopen=%d\\n\", pdev->vopen);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-28","original_id":"diversevul-28","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void usb_pwc_disconnect(struct usb_interface *intf)\n{\n\tstruct pwc_device *pdev;\n\tint hint;\n\n\tlock_kernel();\n\tpdev = usb_get_intfdata (intf);\n\tusb_set_intfdata (intf, NULL);\n\tif (pdev == NULL) {\n\t\tPWC_ERROR(\"pwc_disconnect() Called without private pointer.\\n\");\n\t\tgoto disconnect_out;\n\t}\n\tif (pdev->udev == NULL) {\n\t\tPWC_ERROR(\"pwc_disconnect() already called for %p\\n\", pdev);\n\t\tgoto disconnect_out;\n\t}\n\tif (pdev->udev != interface_to_usbdev(intf)) {\n\t\tPWC_ERROR(\"pwc_disconnect() Woops: pointer mismatch udev/pdev.\\n\");\n\t\tgoto disconnect_out;\n\t}\n\n\t/* We got unplugged; this is signalled by an EPIPE error code */\n\tif (pdev->vopen) {\n\t\tPWC_INFO(\"Disconnected while webcam is in use!\\n\");\n\t\tpdev->error_status = EPIPE;\n\t}\n\n\t/* Alert waiting processes */\n\twake_up_interruptible(&pdev->frameq);\n\t/* Wait until device is closed */\n\twhile (pdev->vopen)\n\t\tschedule();\n\t/* Device is now closed, so we can safely unregister it */\n\tPWC_DEBUG_PROBE(\"Unregistering video device in disconnect().\\n\");\n\tpwc_remove_sysfs_files(pdev->vdev);\n\tvideo_unregister_device(pdev->vdev);\n\n\t/* Free memory (don't set pdev to 0 just yet) */\n\tkfree(pdev);\n\ndisconnect_out:\n\t/* search device_hint[] table if we occupy a slot, by any chance */\n\tfor (hint = 0; hint < MAX_DEV_HINTS; hint++)\n\t\tif (device_hint[hint].pdev == pdev)\n\t\t\tdevice_hint[hint].pdev = NULL;\n\n\tunlock_kernel();\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-29","original_id":"diversevul-29","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int return_EIO(void)\n{\n\treturn -EIO;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-30","original_id":"diversevul-30","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid make_bad_inode(struct inode * inode) \n{\n\tremove_inode_hash(inode);\n\n\tinode->i_mode = S_IFREG;\n\tinode->i_atime = inode->i_mtime = inode->i_ctime =\n\t\tcurrent_fs_time(inode->i_sb);\n\tinode->i_op = &bad_inode_ops;\t\n\tinode->i_fop = &bad_file_ops;\t\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-31","original_id":"diversevul-31","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint is_bad_inode(struct inode * inode) \n{\n\treturn (inode->i_op == &bad_inode_ops);\t\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-32","original_id":"diversevul-32","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid hash_preload(struct mm_struct *mm, unsigned long ea,\n\t\t unsigned long access, unsigned long trap)\n{\n\tunsigned long vsid;\n\tvoid *pgdir;\n\tpte_t *ptep;\n\tcpumask_t mask;\n\tunsigned long flags;\n\tint local = 0;\n\n\t/* We don't want huge pages prefaulted for now\n\t */\n\tif (unlikely(in_hugepage_area(mm->context, ea)))\n\t\treturn;\n\n\tDBG_LOW(\"hash_preload(mm=%p, mm->pgdir=%p, ea=%016lx, access=%lx,\"\n\t\t\" trap=%lx\\n\", mm, mm->pgd, ea, access, trap);\n\n\t/* Get PTE, VSID, access mask */\n\tpgdir = mm->pgd;\n\tif (pgdir == NULL)\n\t\treturn;\n\tptep = find_linux_pte(pgdir, ea);\n\tif (!ptep)\n\t\treturn;\n\tvsid = get_vsid(mm->context.id, ea);\n\n\t/* Hash it in */\n\tlocal_irq_save(flags);\n\tmask = cpumask_of_cpu(smp_processor_id());\n\tif (cpus_equal(mm->cpu_vm_mask, mask))\n\t\tlocal = 1;\n#ifndef CONFIG_PPC_64K_PAGES\n\t__hash_page_4K(ea, access, vsid, ptep, trap, local);\n#else\n\tif (mmu_ci_restrictions) {\n\t\t/* If this PTE is non-cacheable, switch to 4k */\n\t\tif (mm->context.user_psize == MMU_PAGE_64K &&\n\t\t (pte_val(*ptep) & _PAGE_NO_CACHE)) {\n\t\t\tmm->context.user_psize = MMU_PAGE_4K;\n\t\t\tmm->context.sllp = SLB_VSID_USER |\n\t\t\t\tmmu_psize_defs[MMU_PAGE_4K].sllp;\n\t\t\tget_paca()->context = mm->context;\n\t\t\tslb_flush_and_rebolt();\n#ifdef CONFIG_SPE_BASE\n\t\t\tspu_flush_all_slbs(mm);\n#endif\n\t\t}\n\t}\n\tif (mm->context.user_psize == MMU_PAGE_64K)\n\t\t__hash_page_64K(ea, access, vsid, ptep, trap, local);\n\telse\n\t\t__hash_page_4K(ea, access, vsid, ptep, trap, local);\n#endif /* CONFIG_PPC_64K_PAGES */\n\tlocal_irq_restore(flags);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-33","original_id":"diversevul-33","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_dccp_getsockopt(struct sock *sk, int level, int optname,\n\t\t char __user *optval, int __user *optlen)\n{\n\tstruct dccp_sock *dp;\n\tint val, len;\n\n\tif (get_user(len, optlen))\n\t\treturn -EFAULT;\n\n\tif (len < sizeof(int))\n\t\treturn -EINVAL;\n\n\tdp = dccp_sk(sk);\n\n\tswitch (optname) {\n\tcase DCCP_SOCKOPT_PACKET_SIZE:\n\t\tDCCP_WARN(\"sockopt(PACKET_SIZE) is deprecated: fix your app\\n\");\n\t\treturn 0;\n\tcase DCCP_SOCKOPT_SERVICE:\n\t\treturn dccp_getsockopt_service(sk, len,\n\t\t\t\t\t (__be32 __user *)optval, optlen);\n\tcase DCCP_SOCKOPT_SEND_CSCOV:\n\t\tval = dp->dccps_pcslen;\n\t\tbreak;\n\tcase DCCP_SOCKOPT_RECV_CSCOV:\n\t\tval = dp->dccps_pcrlen;\n\t\tbreak;\n\tcase 128 ... 191:\n\t\treturn ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname,\n\t\t\t\t\t len, (u32 __user *)optval, optlen);\n\tcase 192 ... 255:\n\t\treturn ccid_hc_tx_getsockopt(dp->dccps_hc_tx_ccid, sk, optname,\n\t\t\t\t\t len, (u32 __user *)optval, optlen);\n\tdefault:\n\t\treturn -ENOPROTOOPT;\n\t}\n\n\tif (put_user(len, optlen) || copy_to_user(optval, &val, len))\n\t\treturn -EFAULT;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-34","original_id":"diversevul-34","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate,\n jas_stream_t *in, uint_fast16_t len)\n{\n\tuint_fast8_t tmp;\n\tint n;\n\tint i;\n\n\t/* Eliminate compiler warning about unused variables. */\n\tcstate = 0;\n\n\tn = 0;\n\tif (jpc_getuint8(in, &tmp)) {\n\t\treturn -1;\n\t}\n\t++n;\n\tcompparms->qntsty = tmp & 0x1f;\n\tcompparms->numguard = (tmp >> 5) & 7;\n\tswitch (compparms->qntsty) {\n\tcase JPC_QCX_SIQNT:\n\t\tcompparms->numstepsizes = 1;\n\t\tbreak;\n\tcase JPC_QCX_NOQNT:\n\t\tcompparms->numstepsizes = (len - n);\n\t\tbreak;\n\tcase JPC_QCX_SEQNT:\n\t\t/* XXX - this is a hack */\n\t\tcompparms->numstepsizes = (len - n) / 2;\n\t\tbreak;\n\t}\n\tif (compparms->numstepsizes > 0) {\n\t\tcompparms->stepsizes = jas_alloc2(compparms->numstepsizes,\n\t\t sizeof(uint_fast16_t));\n\t\tassert(compparms->stepsizes);\n\t\tfor (i = 0; i < compparms->numstepsizes; ++i) {\n\t\t\tif (compparms->qntsty == JPC_QCX_NOQNT) {\n\t\t\t\tif (jpc_getuint8(in, &tmp)) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tcompparms->stepsizes[i] = JPC_QCX_EXPN(tmp >> 3);\n\t\t\t} else {\n\t\t\t\tif (jpc_getuint16(in, &compparms->stepsizes[i])) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tcompparms->stepsizes = 0;\n\t}\n\tif (jas_stream_error(in) || jas_stream_eof(in)) {\n\t\tjpc_qcx_destroycompparms(compparms);\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-35","original_id":"diversevul-35","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nisdn_net_addphone(isdn_net_ioctl_phone * phone)\n{\n\tisdn_net_dev *p = isdn_net_findif(phone->name);\n\tisdn_net_phone *n;\n\n\tif (p) {\n\t\tif (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL)))\n\t\t\treturn -ENOMEM;\n\t\tstrcpy(n->num, phone->phone);\n\t\tn->next = p->local->phone[phone->outgoing & 1];\n\t\tp->local->phone[phone->outgoing & 1] = n;\n\t\treturn 0;\n\t}\n\treturn -ENODEV;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-36","original_id":"diversevul-36","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int esp6_input(struct xfrm_state *x, struct sk_buff *skb)\n{\n\tstruct ip_esp_hdr *esph;\n\tstruct esp_data *esp = x->data;\n\tstruct crypto_aead *aead = esp->aead;\n\tstruct aead_request *req;\n\tstruct sk_buff *trailer;\n\tint elen = skb->len - sizeof(*esph) - crypto_aead_ivsize(aead);\n\tint nfrags;\n\tint ret = 0;\n\tvoid *tmp;\n\tu8 *iv;\n\tstruct scatterlist *sg;\n\tstruct scatterlist *asg;\n\n\tif (!pskb_may_pull(skb, sizeof(*esph))) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tif (elen <= 0) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tif ((nfrags = skb_cow_data(skb, 0, &trailer)) < 0) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tret = -ENOMEM;\n\ttmp = esp_alloc_tmp(aead, nfrags + 1);\n\tif (!tmp)\n\t\tgoto out;\n\n\tESP_SKB_CB(skb)->tmp = tmp;\n\tiv = esp_tmp_iv(aead, tmp);\n\treq = esp_tmp_req(aead, iv);\n\tasg = esp_req_sg(aead, req);\n\tsg = asg + 1;\n\n\tskb->ip_summed = CHECKSUM_NONE;\n\n\tesph = (struct ip_esp_hdr *)skb->data;\n\n\t/* Get ivec. This can be wrong, check against another impls. */\n\tiv = esph->enc_data;\n\n\tsg_init_table(sg, nfrags);\n\tskb_to_sgvec(skb, sg, sizeof(*esph) + crypto_aead_ivsize(aead), elen);\n\tsg_init_one(asg, esph, sizeof(*esph));\n\n\taead_request_set_callback(req, 0, esp_input_done, skb);\n\taead_request_set_crypt(req, sg, sg, elen, iv);\n\taead_request_set_assoc(req, asg, sizeof(*esph));\n\n\tret = crypto_aead_decrypt(req);\n\tif (ret == -EINPROGRESS)\n\t\tgoto out;\n\n\tret = esp_input_done2(skb, ret);\n\nout:\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-16"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-37","original_id":"diversevul-37","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int esp_input(struct xfrm_state *x, struct sk_buff *skb)\n{\n\tstruct ip_esp_hdr *esph;\n\tstruct esp_data *esp = x->data;\n\tstruct crypto_aead *aead = esp->aead;\n\tstruct aead_request *req;\n\tstruct sk_buff *trailer;\n\tint elen = skb->len - sizeof(*esph) - crypto_aead_ivsize(aead);\n\tint nfrags;\n\tvoid *tmp;\n\tu8 *iv;\n\tstruct scatterlist *sg;\n\tstruct scatterlist *asg;\n\tint err = -EINVAL;\n\n\tif (!pskb_may_pull(skb, sizeof(*esph)))\n\t\tgoto out;\n\n\tif (elen <= 0)\n\t\tgoto out;\n\n\tif ((err = skb_cow_data(skb, 0, &trailer)) < 0)\n\t\tgoto out;\n\tnfrags = err;\n\n\terr = -ENOMEM;\n\ttmp = esp_alloc_tmp(aead, nfrags + 1);\n\tif (!tmp)\n\t\tgoto out;\n\n\tESP_SKB_CB(skb)->tmp = tmp;\n\tiv = esp_tmp_iv(aead, tmp);\n\treq = esp_tmp_req(aead, iv);\n\tasg = esp_req_sg(aead, req);\n\tsg = asg + 1;\n\n\tskb->ip_summed = CHECKSUM_NONE;\n\n\tesph = (struct ip_esp_hdr *)skb->data;\n\n\t/* Get ivec. This can be wrong, check against another impls. */\n\tiv = esph->enc_data;\n\n\tsg_init_table(sg, nfrags);\n\tskb_to_sgvec(skb, sg, sizeof(*esph) + crypto_aead_ivsize(aead), elen);\n\tsg_init_one(asg, esph, sizeof(*esph));\n\n\taead_request_set_callback(req, 0, esp_input_done, skb);\n\taead_request_set_crypt(req, sg, sg, elen, iv);\n\taead_request_set_assoc(req, asg, sizeof(*esph));\n\n\terr = crypto_aead_decrypt(req);\n\tif (err == -EINPROGRESS)\n\t\tgoto out;\n\n\terr = esp_input_done2(skb, err);\n\nout:\n\treturn err;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-16"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-38","original_id":"diversevul-38","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nshmem_alloc_page(gfp_t gfp,struct shmem_inode_info *info, unsigned long idx)\n{\n\treturn alloc_page(gfp | __GFP_ZERO);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-39","original_id":"diversevul-39","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nshmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info,\n\t\t unsigned long idx)\n{\n\tstruct vm_area_struct pvma;\n\tstruct page *page;\n\n\tmemset(&pvma, 0, sizeof(struct vm_area_struct));\n\tpvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx);\n\tpvma.vm_pgoff = idx;\n\tpvma.vm_end = PAGE_SIZE;\n\tpage = alloc_page_vma(gfp | __GFP_ZERO, &pvma, 0);\n\tmpol_free(pvma.vm_policy);\n\treturn page;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-40","original_id":"diversevul-40","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int copy_from_user_mmap_sem(void *dst, const void __user *src, size_t n)\n{\n\tint partial;\n\n\tpagefault_disable();\n\tpartial = __copy_from_user_inatomic(dst, src, n);\n\tpagefault_enable();\n\n\t/*\n\t * Didn't copy everything, drop the mmap_sem and do a faulting copy\n\t */\n\tif (unlikely(partial)) {\n\t\tup_read(&current->mm->mmap_sem);\n\t\tpartial = copy_from_user(dst, src, n);\n\t\tdown_read(&current->mm->mmap_sem);\n\t}\n\n\treturn partial;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-94"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-41","original_id":"diversevul-41","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic long vmsplice_to_user(struct file *file, const struct iovec __user *iov,\n\t\t\t unsigned long nr_segs, unsigned int flags)\n{\n\tstruct pipe_inode_info *pipe;\n\tstruct splice_desc sd;\n\tssize_t size;\n\tint error;\n\tlong ret;\n\n\tpipe = pipe_info(file->f_path.dentry->d_inode);\n\tif (!pipe)\n\t\treturn -EBADF;\n\n\tif (pipe->inode)\n\t\tmutex_lock(&pipe->inode->i_mutex);\n\n\terror = ret = 0;\n\twhile (nr_segs) {\n\t\tvoid __user *base;\n\t\tsize_t len;\n\n\t\t/*\n\t\t * Get user address base and length for this iovec.\n\t\t */\n\t\terror = get_user(base, &iov->iov_base);\n\t\tif (unlikely(error))\n\t\t\tbreak;\n\t\terror = get_user(len, &iov->iov_len);\n\t\tif (unlikely(error))\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Sanity check this iovec. 0 read succeeds.\n\t\t */\n\t\tif (unlikely(!len))\n\t\t\tbreak;\n\t\tif (unlikely(!base)) {\n\t\t\terror = -EFAULT;\n\t\t\tbreak;\n\t\t}\n\n\t\tsd.len = 0;\n\t\tsd.total_len = len;\n\t\tsd.flags = flags;\n\t\tsd.u.userptr = base;\n\t\tsd.pos = 0;\n\n\t\tsize = __splice_from_pipe(pipe, &sd, pipe_to_user);\n\t\tif (size < 0) {\n\t\t\tif (!ret)\n\t\t\t\tret = size;\n\n\t\t\tbreak;\n\t\t}\n\n\t\tret += size;\n\n\t\tif (size < len)\n\t\t\tbreak;\n\n\t\tnr_segs--;\n\t\tiov++;\n\t}\n\n\tif (pipe->inode)\n\t\tmutex_unlock(&pipe->inode->i_mutex);\n\n\tif (!ret)\n\t\tret = error;\n\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-94"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-42","original_id":"diversevul-42","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int get_iovec_page_array(const struct iovec __user *iov,\n\t\t\t\tunsigned int nr_vecs, struct page **pages,\n\t\t\t\tstruct partial_page *partial, int aligned)\n{\n\tint buffers = 0, error = 0;\n\n\tdown_read(&current->mm->mmap_sem);\n\n\twhile (nr_vecs) {\n\t\tunsigned long off, npages;\n\t\tstruct iovec entry;\n\t\tvoid __user *base;\n\t\tsize_t len;\n\t\tint i;\n\n\t\terror = -EFAULT;\n\t\tif (copy_from_user_mmap_sem(&entry, iov, sizeof(entry)))\n\t\t\tbreak;\n\n\t\tbase = entry.iov_base;\n\t\tlen = entry.iov_len;\n\n\t\t/*\n\t\t * Sanity check this iovec. 0 read succeeds.\n\t\t */\n\t\terror = 0;\n\t\tif (unlikely(!len))\n\t\t\tbreak;\n\t\terror = -EFAULT;\n\t\tif (unlikely(!base))\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Get this base offset and number of pages, then map\n\t\t * in the user pages.\n\t\t */\n\t\toff = (unsigned long) base & ~PAGE_MASK;\n\n\t\t/*\n\t\t * If asked for alignment, the offset must be zero and the\n\t\t * length a multiple of the PAGE_SIZE.\n\t\t */\n\t\terror = -EINVAL;\n\t\tif (aligned && (off || len & ~PAGE_MASK))\n\t\t\tbreak;\n\n\t\tnpages = (off + len + PAGE_SIZE - 1) >> PAGE_SHIFT;\n\t\tif (npages > PIPE_BUFFERS - buffers)\n\t\t\tnpages = PIPE_BUFFERS - buffers;\n\n\t\terror = get_user_pages(current, current->mm,\n\t\t\t\t (unsigned long) base, npages, 0, 0,\n\t\t\t\t &pages[buffers], NULL);\n\n\t\tif (unlikely(error <= 0))\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Fill this contiguous range into the partial page map.\n\t\t */\n\t\tfor (i = 0; i < error; i++) {\n\t\t\tconst int plen = min_t(size_t, len, PAGE_SIZE - off);\n\n\t\t\tpartial[buffers].offset = off;\n\t\t\tpartial[buffers].len = plen;\n\n\t\t\toff = 0;\n\t\t\tlen -= plen;\n\t\t\tbuffers++;\n\t\t}\n\n\t\t/*\n\t\t * We didn't complete this iov, stop here since it probably\n\t\t * means we have to move some of this into a pipe to\n\t\t * be able to continue.\n\t\t */\n\t\tif (len)\n\t\t\tbreak;\n\n\t\t/*\n\t\t * Don't continue if we mapped fewer pages than we asked for,\n\t\t * or if we mapped the max number of pages that we have\n\t\t * room for.\n\t\t */\n\t\tif (error < npages || buffers == PIPE_BUFFERS)\n\t\t\tbreak;\n\n\t\tnr_vecs--;\n\t\tiov++;\n\t}\n\n\tup_read(&current->mm->mmap_sem);\n\n\tif (buffers)\n\t\treturn buffers;\n\n\treturn error;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-94"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-43","original_id":"diversevul-43","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)\n{\n\tstruct rlimit new_rlim, *old_rlim;\n\tunsigned long it_prof_secs;\n\tint retval;\n\n\tif (resource >= RLIM_NLIMITS)\n\t\treturn -EINVAL;\n\tif (copy_from_user(&new_rlim, rlim, sizeof(*rlim)))\n\t\treturn -EFAULT;\n\tif (new_rlim.rlim_cur > new_rlim.rlim_max)\n\t\treturn -EINVAL;\n\told_rlim = current->signal->rlim + resource;\n\tif ((new_rlim.rlim_max > old_rlim->rlim_max) &&\n\t !capable(CAP_SYS_RESOURCE))\n\t\treturn -EPERM;\n\tif (resource == RLIMIT_NOFILE && new_rlim.rlim_max > NR_OPEN)\n\t\treturn -EPERM;\n\n\tretval = security_task_setrlimit(resource, &new_rlim);\n\tif (retval)\n\t\treturn retval;\n\n\ttask_lock(current->group_leader);\n\t*old_rlim = new_rlim;\n\ttask_unlock(current->group_leader);\n\n\tif (resource != RLIMIT_CPU)\n\t\tgoto out;\n\n\t/*\n\t * RLIMIT_CPU handling. Note that the kernel fails to return an error\n\t * code if it rejected the user's attempt to set RLIMIT_CPU. This is a\n\t * very long-standing error, and fixing it now risks breakage of\n\t * applications, so we live with it\n\t */\n\tif (new_rlim.rlim_cur == RLIM_INFINITY)\n\t\tgoto out;\n\n\tit_prof_secs = cputime_to_secs(current->signal->it_prof_expires);\n\tif (it_prof_secs == 0 || new_rlim.rlim_cur <= it_prof_secs) {\n\t\tunsigned long rlim_cur = new_rlim.rlim_cur;\n\t\tcputime_t cputime;\n\n\t\tif (rlim_cur == 0) {\n\t\t\t/*\n\t\t\t * The caller is asking for an immediate RLIMIT_CPU\n\t\t\t * expiry. But we use the zero value to mean \"it was\n\t\t\t * never set\". So let's cheat and make it one second\n\t\t\t * instead\n\t\t\t */\n\t\t\trlim_cur = 1;\n\t\t}\n\t\tcputime = secs_to_cputime(rlim_cur);\n\t\tread_lock(&tasklist_lock);\n\t\tspin_lock_irq(&current->sighand->siglock);\n\t\tset_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);\n\t\tspin_unlock_irq(&current->sighand->siglock);\n\t\tread_unlock(&tasklist_lock);\n\t}\nout:\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-44","original_id":"diversevul-44","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint ia32_setup_frame(int sig, struct k_sigaction *ka,\n\t\t compat_sigset_t *set, struct pt_regs *regs)\n{\n\tstruct sigframe __user *frame;\n\tvoid __user *restorer;\n\tint err = 0;\n\n\t/* copy_to_user optimizes that into a single 8 byte store */\n\tstatic const struct {\n\t\tu16 poplmovl;\n\t\tu32 val;\n\t\tu16 int80;\n\t\tu16 pad;\n\t} __attribute__((packed)) code = {\n\t\t0xb858,\t\t /* popl %eax ; movl $...,%eax */\n\t\t__NR_ia32_sigreturn,\n\t\t0x80cd,\t\t/* int $0x80 */\n\t\t0,\n\t};\n\n\tframe = get_sigframe(ka, regs, sizeof(*frame));\n\n\tif (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))\n\t\tgoto give_sigsegv;\n\n\terr |= __put_user(sig, &frame->sig);\n\tif (err)\n\t\tgoto give_sigsegv;\n\n\terr |= ia32_setup_sigcontext(&frame->sc, &frame->fpstate, regs,\n\t\t\t\t\tset->sig[0]);\n\tif (err)\n\t\tgoto give_sigsegv;\n\n\tif (_COMPAT_NSIG_WORDS > 1) {\n\t\terr |= __copy_to_user(frame->extramask, &set->sig[1],\n\t\t\t\t sizeof(frame->extramask));\n\t\tif (err)\n\t\t\tgoto give_sigsegv;\n\t}\n\n\tif (ka->sa.sa_flags & SA_RESTORER) {\n\t\trestorer = ka->sa.sa_restorer;\n\t} else {\n\t\t/* Return stub is in 32bit vsyscall page */\n\t\tif (current->binfmt->hasvdso)\n\t\t\trestorer = VDSO32_SYMBOL(current->mm->context.vdso,\n\t\t\t\t\t\t sigreturn);\n\t\telse\n\t\t\trestorer = &frame->retcode;\n\t}\n\terr |= __put_user(ptr_to_compat(restorer), &frame->pretcode);\n\n\t/*\n\t * These are actually not used anymore, but left because some\n\t * gdb versions depend on them as a marker.\n\t */\n\terr |= __copy_to_user(frame->retcode, &code, 8);\n\tif (err)\n\t\tgoto give_sigsegv;\n\n\t/* Set up registers for signal handler */\n\tregs->sp = (unsigned long) frame;\n\tregs->ip = (unsigned long) ka->sa.sa_handler;\n\n\t/* Make -mregparm=3 work */\n\tregs->ax = sig;\n\tregs->dx = 0;\n\tregs->cx = 0;\n\n\tasm volatile(\"movl %0,%%ds\" :: \"r\" (__USER32_DS));\n\tasm volatile(\"movl %0,%%es\" :: \"r\" (__USER32_DS));\n\n\tregs->cs = __USER32_CS;\n\tregs->ss = __USER32_DS;\n\n\tset_fs(USER_DS);\n\tregs->flags &= ~X86_EFLAGS_TF;\n\tif (test_thread_flag(TIF_SINGLESTEP))\n\t\tptrace_notify(SIGTRAP);\n\n#if DEBUG_SIG\n\tprintk(KERN_DEBUG \"SIG deliver (%s:%d): sp=%p pc=%lx ra=%u\\n\",\n\t current->comm, current->pid, frame, regs->ip, frame->pretcode);\n#endif\n\n\treturn 0;\n\ngive_sigsegv:\n\tforce_sigsegv(sig, current);\n\treturn -EFAULT;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-45","original_id":"diversevul-45","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned long __peek_user(struct task_struct *child, addr_t addr)\n{\n\tstruct user *dummy = NULL;\n\taddr_t offset, tmp;\n\n\tif (addr < (addr_t) &dummy->regs.acrs) {\n\t\t/*\n\t\t * psw and gprs are stored on the stack\n\t\t */\n\t\ttmp = *(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr);\n\t\tif (addr == (addr_t) &dummy->regs.psw.mask)\n\t\t\t/* Remove per bit from user psw. */\n\t\t\ttmp &= ~PSW_MASK_PER;\n\n\t} else if (addr < (addr_t) &dummy->regs.orig_gpr2) {\n\t\t/*\n\t\t * access registers are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.acrs;\n#ifdef CONFIG_64BIT\n\t\t/*\n\t\t * Very special case: old & broken 64 bit gdb reading\n\t\t * from acrs[15]. Result is a 64 bit value. Read the\n\t\t * 32 bit acrs[15] value and shift it by 32. Sick...\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.acrs[15])\n\t\t\ttmp = ((unsigned long) child->thread.acrs[15]) << 32;\n\t\telse\n#endif\n\t\ttmp = *(addr_t *)((addr_t) &child->thread.acrs + offset);\n\n\t} else if (addr == (addr_t) &dummy->regs.orig_gpr2) {\n\t\t/*\n\t\t * orig_gpr2 is stored on the kernel stack\n\t\t */\n\t\ttmp = (addr_t) task_pt_regs(child)->orig_gpr2;\n\n\t} else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) {\n\t\t/* \n\t\t * floating point regs. are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.fp_regs;\n\t\ttmp = *(addr_t *)((addr_t) &child->thread.fp_regs + offset);\n\t\tif (addr == (addr_t) &dummy->regs.fp_regs.fpc)\n\t\t\ttmp &= (unsigned long) FPC_VALID_MASK\n\t\t\t\t<< (BITS_PER_LONG - 32);\n\n\t} else if (addr < (addr_t) (&dummy->regs.per_info + 1)) {\n\t\t/*\n\t\t * per_info is found in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.per_info;\n\t\ttmp = *(addr_t *)((addr_t) &child->thread.per_info + offset);\n\n\t} else\n\t\ttmp = 0;\n\n\treturn tmp;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-46","original_id":"diversevul-46","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int __poke_user(struct task_struct *child, addr_t addr, addr_t data)\n{\n\tstruct user *dummy = NULL;\n\taddr_t offset;\n\n\tif (addr < (addr_t) &dummy->regs.acrs) {\n\t\t/*\n\t\t * psw and gprs are stored on the stack\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.psw.mask &&\n#ifdef CONFIG_COMPAT\n\t\t data != PSW_MASK_MERGE(psw_user32_bits, data) &&\n#endif\n\t\t data != PSW_MASK_MERGE(psw_user_bits, data))\n\t\t\t/* Invalid psw mask. */\n\t\t\treturn -EINVAL;\n#ifndef CONFIG_64BIT\n\t\tif (addr == (addr_t) &dummy->regs.psw.addr)\n\t\t\t/* I'd like to reject addresses without the\n\t\t\t high order bit but older gdb's rely on it */\n\t\t\tdata |= PSW_ADDR_AMODE;\n#endif\n\t\t*(addr_t *)((addr_t) &task_pt_regs(child)->psw + addr) = data;\n\n\t} else if (addr < (addr_t) (&dummy->regs.orig_gpr2)) {\n\t\t/*\n\t\t * access registers are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.acrs;\n#ifdef CONFIG_64BIT\n\t\t/*\n\t\t * Very special case: old & broken 64 bit gdb writing\n\t\t * to acrs[15] with a 64 bit value. Ignore the lower\n\t\t * half of the value and write the upper 32 bit to\n\t\t * acrs[15]. Sick...\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.acrs[15])\n\t\t\tchild->thread.acrs[15] = (unsigned int) (data >> 32);\n\t\telse\n#endif\n\t\t*(addr_t *)((addr_t) &child->thread.acrs + offset) = data;\n\n\t} else if (addr == (addr_t) &dummy->regs.orig_gpr2) {\n\t\t/*\n\t\t * orig_gpr2 is stored on the kernel stack\n\t\t */\n\t\ttask_pt_regs(child)->orig_gpr2 = data;\n\n\t} else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) {\n\t\t/*\n\t\t * floating point regs. are stored in the thread structure\n\t\t */\n\t\tif (addr == (addr_t) &dummy->regs.fp_regs.fpc &&\n\t\t (data & ~((unsigned long) FPC_VALID_MASK\n\t\t\t << (BITS_PER_LONG - 32))) != 0)\n\t\t\treturn -EINVAL;\n\t\toffset = addr - (addr_t) &dummy->regs.fp_regs;\n\t\t*(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data;\n\n\t} else if (addr < (addr_t) (&dummy->regs.per_info + 1)) {\n\t\t/*\n\t\t * per_info is found in the thread structure \n\t\t */\n\t\toffset = addr - (addr_t) &dummy->regs.per_info;\n\t\t*(addr_t *)((addr_t) &child->thread.per_info + offset) = data;\n\n\t}\n\n\tFixPerRegisters(child);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-47","original_id":"diversevul-47","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u32 __peek_user_compat(struct task_struct *child, addr_t addr)\n{\n\tstruct user32 *dummy32 = NULL;\n\tper_struct32 *dummy_per32 = NULL;\n\taddr_t offset;\n\t__u32 tmp;\n\n\tif (addr < (addr_t) &dummy32->regs.acrs) {\n\t\t/*\n\t\t * psw and gprs are stored on the stack\n\t\t */\n\t\tif (addr == (addr_t) &dummy32->regs.psw.mask) {\n\t\t\t/* Fake a 31 bit psw mask. */\n\t\t\ttmp = (__u32)(task_pt_regs(child)->psw.mask >> 32);\n\t\t\ttmp = PSW32_MASK_MERGE(psw32_user_bits, tmp);\n\t\t} else if (addr == (addr_t) &dummy32->regs.psw.addr) {\n\t\t\t/* Fake a 31 bit psw address. */\n\t\t\ttmp = (__u32) task_pt_regs(child)->psw.addr |\n\t\t\t\tPSW32_ADDR_AMODE31;\n\t\t} else {\n\t\t\t/* gpr 0-15 */\n\t\t\ttmp = *(__u32 *)((addr_t) &task_pt_regs(child)->psw +\n\t\t\t\t\t addr*2 + 4);\n\t\t}\n\t} else if (addr < (addr_t) (&dummy32->regs.orig_gpr2)) {\n\t\t/*\n\t\t * access registers are stored in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy32->regs.acrs;\n\t\ttmp = *(__u32*)((addr_t) &child->thread.acrs + offset);\n\n\t} else if (addr == (addr_t) (&dummy32->regs.orig_gpr2)) {\n\t\t/*\n\t\t * orig_gpr2 is stored on the kernel stack\n\t\t */\n\t\ttmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4);\n\n\t} else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) {\n\t\t/*\n\t\t * floating point regs. are stored in the thread structure \n\t\t */\n\t offset = addr - (addr_t) &dummy32->regs.fp_regs;\n\t\ttmp = *(__u32 *)((addr_t) &child->thread.fp_regs + offset);\n\n\t} else if (addr < (addr_t) (&dummy32->regs.per_info + 1)) {\n\t\t/*\n\t\t * per_info is found in the thread structure\n\t\t */\n\t\toffset = addr - (addr_t) &dummy32->regs.per_info;\n\t\t/* This is magic. See per_struct and per_struct32. */\n\t\tif ((offset >= (addr_t) &dummy_per32->control_regs &&\n\t\t offset < (addr_t) (&dummy_per32->control_regs + 1)) ||\n\t\t (offset >= (addr_t) &dummy_per32->starting_addr &&\n\t\t offset <= (addr_t) &dummy_per32->ending_addr) ||\n\t\t offset == (addr_t) &dummy_per32->lowcore.words.address)\n\t\t\toffset = offset*2 + 4;\n\t\telse\n\t\t\toffset = offset*2;\n\t\ttmp = *(__u32 *)((addr_t) &child->thread.per_info + offset);\n\n\t} else\n\t\ttmp = 0;\n\n\treturn tmp;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-48","original_id":"diversevul-48","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)\n{\n\tstruct dnotify_struct *dn;\n\tstruct dnotify_struct *odn;\n\tstruct dnotify_struct **prev;\n\tstruct inode *inode;\n\tfl_owner_t id = current->files;\n\tint error = 0;\n\n\tif ((arg & ~DN_MULTISHOT) == 0) {\n\t\tdnotify_flush(filp, id);\n\t\treturn 0;\n\t}\n\tif (!dir_notify_enable)\n\t\treturn -EINVAL;\n\tinode = filp->f_path.dentry->d_inode;\n\tif (!S_ISDIR(inode->i_mode))\n\t\treturn -ENOTDIR;\n\tdn = kmem_cache_alloc(dn_cache, GFP_KERNEL);\n\tif (dn == NULL)\n\t\treturn -ENOMEM;\n\tspin_lock(&inode->i_lock);\n\tprev = &inode->i_dnotify;\n\twhile ((odn = *prev) != NULL) {\n\t\tif ((odn->dn_owner == id) && (odn->dn_filp == filp)) {\n\t\t\todn->dn_fd = fd;\n\t\t\todn->dn_mask |= arg;\n\t\t\tinode->i_dnotify_mask |= arg & ~DN_MULTISHOT;\n\t\t\tgoto out_free;\n\t\t}\n\t\tprev = &odn->dn_next;\n\t}\n\n\terror = __f_setown(filp, task_pid(current), PIDTYPE_PID, 0);\n\tif (error)\n\t\tgoto out_free;\n\n\tdn->dn_mask = arg;\n\tdn->dn_fd = fd;\n\tdn->dn_filp = filp;\n\tdn->dn_owner = id;\n\tinode->i_dnotify_mask |= arg & ~DN_MULTISHOT;\n\tdn->dn_next = inode->i_dnotify;\n\tinode->i_dnotify = dn;\n\tspin_unlock(&inode->i_lock);\n\n\tif (filp->f_op && filp->f_op->dir_notify)\n\t\treturn filp->f_op->dir_notify(filp, arg);\n\treturn 0;\n\nout_free:\n\tspin_unlock(&inode->i_lock);\n\tkmem_cache_free(dn_cache, dn);\n\treturn error;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-49","original_id":"diversevul-49","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nhrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)\n{\n\tunsigned long orun = 1;\n\tktime_t delta;\n\n\tdelta = ktime_sub(now, timer->expires);\n\n\tif (delta.tv64 < 0)\n\t\treturn 0;\n\n\tif (interval.tv64 < timer->base->resolution.tv64)\n\t\tinterval.tv64 = timer->base->resolution.tv64;\n\n\tif (unlikely(delta.tv64 >= interval.tv64)) {\n\t\ts64 incr = ktime_to_ns(interval);\n\n\t\torun = ktime_divns(delta, incr);\n\t\ttimer->expires = ktime_add_ns(timer->expires, incr * orun);\n\t\tif (timer->expires.tv64 > now.tv64)\n\t\t\treturn orun;\n\t\t/*\n\t\t * This (and the ktime_add() below) is the\n\t\t * correction for exact:\n\t\t */\n\t\torun++;\n\t}\n\ttimer->expires = ktime_add(timer->expires, interval);\n\n\treturn orun;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-50","original_id":"diversevul-50","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nm4_mkstemp (struct obstack *obs, int argc, token_data **argv)\n{\n if (bad_argc (argv[0], argc, 2, 2))\n return;\n mkstemp_helper (obs, ARG (1));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-51","original_id":"diversevul-51","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nmkstemp_helper (struct obstack *obs, const char *name)\n{\n int fd;\n int len;\n int i;\n\n /* Guarantee that there are six trailing 'X' characters, even if the\n user forgot to supply them. */\n len = strlen (name);\n obstack_grow (obs, name, len);\n for (i = 0; len > 0 && i < 6; i++)\n if (name[--len] != 'X')\n break;\n for (; i < 6; i++)\n obstack_1grow (obs, 'X');\n obstack_1grow (obs, '\\0');\n\n errno = 0;\n fd = mkstemp ((char *) obstack_base (obs));\n if (fd < 0)\n {\n M4ERROR ((0, errno, \"cannot create tempfile `%s'\", name));\n obstack_free (obs, obstack_finish (obs));\n }\n else\n close (fd);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-52","original_id":"diversevul-52","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nm4_maketemp (struct obstack *obs, int argc, token_data **argv)\n{\n if (bad_argc (argv[0], argc, 2, 2))\n return;\n if (no_gnu_extensions)\n {\n /* POSIX states \"any trailing 'X' characters [are] replaced with\n\t the current process ID as a string\", without referencing the\n\t file system. Horribly insecure, but we have to do it when we\n\t are in traditional mode.\n\n\t For reference, Solaris m4 does:\n\t maketemp() -> `'\n\t maketemp(X) -> `X'\n\t maketemp(XX) -> `Xn', where n is last digit of pid\n\t maketemp(XXXXXXXX) -> `X00nnnnn', where nnnnn is 16-bit pid\n */\n const char *str = ARG (1);\n int len = strlen (str);\n int i;\n int len2;\n\n M4ERROR ((warning_status, 0, \"recommend using mkstemp instead\"));\n for (i = len; i > 1; i--)\n\tif (str[i - 1] != 'X')\n\t break;\n obstack_grow (obs, str, i);\n str = ntoa ((int32_t) getpid (), 10);\n len2 = strlen (str);\n if (len2 > len - i)\n\tobstack_grow0 (obs, str + len2 - (len - i), len - i);\n else\n\t{\n\t while (i++ < len - len2)\n\t obstack_1grow (obs, '0');\n\t obstack_grow0 (obs, str, len2);\n\t}\n }\n else\n mkstemp_helper (obs, ARG (1));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-53","original_id":"diversevul-53","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned char asn1_oid_decode(struct asn1_ctx *ctx,\n\t\t\t\t unsigned char *eoc,\n\t\t\t\t unsigned long **oid,\n\t\t\t\t unsigned int *len)\n{\n\tunsigned long subid;\n\tunsigned int size;\n\tunsigned long *optr;\n\n\tsize = eoc - ctx->pointer + 1;\n\t*oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);\n\tif (*oid == NULL) {\n\t\tif (net_ratelimit())\n\t\t\tprintk(\"OOM in bsalg (%d)\\n\", __LINE__);\n\t\treturn 0;\n\t}\n\n\toptr = *oid;\n\n\tif (!asn1_subid_decode(ctx, &subid)) {\n\t\tkfree(*oid);\n\t\t*oid = NULL;\n\t\treturn 0;\n\t}\n\n\tif (subid < 40) {\n\t\toptr [0] = 0;\n\t\toptr [1] = subid;\n\t} else if (subid < 80) {\n\t\toptr [0] = 1;\n\t\toptr [1] = subid - 40;\n\t} else {\n\t\toptr [0] = 2;\n\t\toptr [1] = subid - 80;\n\t}\n\n\t*len = 2;\n\toptr += 2;\n\n\twhile (ctx->pointer < eoc) {\n\t\tif (++(*len) > size) {\n\t\t\tctx->error = ASN1_ERR_DEC_BADVALUE;\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!asn1_subid_decode(ctx, optr++)) {\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-54","original_id":"diversevul-54","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasn1_oid_decode(struct asn1_ctx *ctx,\n\t\tunsigned char *eoc, unsigned long **oid, unsigned int *len)\n{\n\tunsigned long subid;\n\tunsigned int size;\n\tunsigned long *optr;\n\n\tsize = eoc - ctx->pointer + 1;\n\t*oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);\n\tif (*oid == NULL)\n\t\treturn 0;\n\n\toptr = *oid;\n\n\tif (!asn1_subid_decode(ctx, &subid)) {\n\t\tkfree(*oid);\n\t\t*oid = NULL;\n\t\treturn 0;\n\t}\n\n\tif (subid < 40) {\n\t\toptr[0] = 0;\n\t\toptr[1] = subid;\n\t} else if (subid < 80) {\n\t\toptr[0] = 1;\n\t\toptr[1] = subid - 40;\n\t} else {\n\t\toptr[0] = 2;\n\t\toptr[1] = subid - 80;\n\t}\n\n\t*len = 2;\n\toptr += 2;\n\n\twhile (ctx->pointer < eoc) {\n\t\tif (++(*len) > size) {\n\t\t\tctx->error = ASN1_ERR_DEC_BADVALUE;\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (!asn1_subid_decode(ctx, optr++)) {\n\t\t\tkfree(*oid);\n\t\t\t*oid = NULL;\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-55","original_id":"diversevul-55","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasn1_header_decode(struct asn1_ctx *ctx,\n\t\t unsigned char **eoc,\n\t\t unsigned int *cls, unsigned int *con, unsigned int *tag)\n{\n\tunsigned int def = 0;\n\tunsigned int len = 0;\n\n\tif (!asn1_id_decode(ctx, cls, con, tag))\n\t\treturn 0;\n\n\tif (!asn1_length_decode(ctx, &def, &len))\n\t\treturn 0;\n\n\tif (def)\n\t\t*eoc = ctx->pointer + len;\n\telse\n\t\t*eoc = NULL;\n\treturn 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-56","original_id":"diversevul-56","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned char asn1_header_decode(struct asn1_ctx *ctx,\n\t\t\t\t\tunsigned char **eoc,\n\t\t\t\t\tunsigned int *cls,\n\t\t\t\t\tunsigned int *con,\n\t\t\t\t\tunsigned int *tag)\n{\n\tunsigned int def, len;\n\n\tif (!asn1_id_decode(ctx, cls, con, tag))\n\t\treturn 0;\n\n\tdef = len = 0;\n\tif (!asn1_length_decode(ctx, &def, &len))\n\t\treturn 0;\n\n\tif (def)\n\t\t*eoc = ctx->pointer + len;\n\telse\n\t\t*eoc = NULL;\n\treturn 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-57","original_id":"diversevul-57","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned char asn1_length_decode(struct asn1_ctx *ctx,\n\t\t\t\t\tunsigned int *def,\n\t\t\t\t\tunsigned int *len)\n{\n\tunsigned char ch, cnt;\n\n\tif (!asn1_octet_decode(ctx, &ch))\n\t\treturn 0;\n\n\tif (ch == 0x80)\n\t\t*def = 0;\n\telse {\n\t\t*def = 1;\n\n\t\tif (ch < 0x80)\n\t\t\t*len = ch;\n\t\telse {\n\t\t\tcnt = ch & 0x7F;\n\t\t\t*len = 0;\n\n\t\t\twhile (cnt > 0) {\n\t\t\t\tif (!asn1_octet_decode(ctx, &ch))\n\t\t\t\t\treturn 0;\n\t\t\t\t*len <<= 8;\n\t\t\t\t*len |= ch;\n\t\t\t\tcnt--;\n\t\t\t}\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-58","original_id":"diversevul-58","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nasn1_length_decode(struct asn1_ctx *ctx, unsigned int *def, unsigned int *len)\n{\n\tunsigned char ch, cnt;\n\n\tif (!asn1_octet_decode(ctx, &ch))\n\t\treturn 0;\n\n\tif (ch == 0x80)\n\t\t*def = 0;\n\telse {\n\t\t*def = 1;\n\n\t\tif (ch < 0x80)\n\t\t\t*len = ch;\n\t\telse {\n\t\t\tcnt = (unsigned char) (ch & 0x7F);\n\t\t\t*len = 0;\n\n\t\t\twhile (cnt > 0) {\n\t\t\t\tif (!asn1_octet_decode(ctx, &ch))\n\t\t\t\t\treturn 0;\n\t\t\t\t*len <<= 8;\n\t\t\t\t*len |= ch;\n\t\t\t\tcnt--;\n\t\t\t}\n\t\t}\n\t}\n\treturn 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-59","original_id":"diversevul-59","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ipip6_rcv(struct sk_buff *skb)\n{\n\tstruct iphdr *iph;\n\tstruct ip_tunnel *tunnel;\n\n\tif (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))\n\t\tgoto out;\n\n\tiph = ip_hdr(skb);\n\n\tread_lock(&ipip6_lock);\n\tif ((tunnel = ipip6_tunnel_lookup(dev_net(skb->dev),\n\t\t\t\t\tiph->saddr, iph->daddr)) != NULL) {\n\t\tsecpath_reset(skb);\n\t\tskb->mac_header = skb->network_header;\n\t\tskb_reset_network_header(skb);\n\t\tIPCB(skb)->flags = 0;\n\t\tskb->protocol = htons(ETH_P_IPV6);\n\t\tskb->pkt_type = PACKET_HOST;\n\n\t\tif ((tunnel->dev->priv_flags & IFF_ISATAP) &&\n\t\t !isatap_chksrc(skb, iph, tunnel)) {\n\t\t\ttunnel->stat.rx_errors++;\n\t\t\tread_unlock(&ipip6_lock);\n\t\t\tkfree_skb(skb);\n\t\t\treturn 0;\n\t\t}\n\t\ttunnel->stat.rx_packets++;\n\t\ttunnel->stat.rx_bytes += skb->len;\n\t\tskb->dev = tunnel->dev;\n\t\tdst_release(skb->dst);\n\t\tskb->dst = NULL;\n\t\tnf_reset(skb);\n\t\tipip6_ecn_decapsulate(iph, skb);\n\t\tnetif_rx(skb);\n\t\tread_unlock(&ipip6_lock);\n\t\treturn 0;\n\t}\n\n\ticmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);\n\tkfree_skb(skb);\n\tread_unlock(&ipip6_lock);\nout:\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-60","original_id":"diversevul-60","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\tu64 slice = __sched_period(cfs_rq->nr_running);\n\n\tslice *= se->load.weight;\n\tdo_div(slice, cfs_rq->load.weight);\n\n\treturn slice;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-61","original_id":"diversevul-61","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\treturn __sched_vslice(cfs_rq->load.weight + se->load.weight,\n\t\t\tcfs_rq->nr_running + 1);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-62","original_id":"diversevul-62","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 __sched_vslice(unsigned long rq_weight, unsigned long nr_running)\n{\n\tu64 vslice = __sched_period(nr_running);\n\n\tvslice *= NICE_0_LOAD;\n\tdo_div(vslice, rq_weight);\n\n\treturn vslice;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-63","original_id":"diversevul-63","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\treturn calc_delta_mine(__sched_period(cfs_rq->nr_running),\n\t\t\t se->load.weight, &cfs_rq->load);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-64","original_id":"diversevul-64","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\tunsigned long nr_running = cfs_rq->nr_running;\n\tunsigned long weight;\n\tu64 vslice;\n\n\tif (!se->on_rq)\n\t\tnr_running++;\n\n\tvslice = __sched_period(nr_running);\n\n\tfor_each_sched_entity(se) {\n\t\tcfs_rq = cfs_rq_of(se);\n\n\t\tweight = cfs_rq->load.weight;\n\t\tif (!se->on_rq)\n\t\t\tweight += se->load.weight;\n\n\t\tvslice *= NICE_0_LOAD;\n\t\tdo_div(vslice, weight);\n\t}\n\n\treturn vslice;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-65","original_id":"diversevul-65","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned long wakeup_gran(struct sched_entity *se)\n{\n\tunsigned long gran = sysctl_sched_wakeup_granularity;\n\n\t/*\n\t * More easily preempt - nice tasks, while not making\n\t * it harder for + nice tasks.\n\t */\n\tif (unlikely(se->load.weight > NICE_0_LOAD))\n\t\tgran = calc_delta_fair(gran, &se->load);\n\n\treturn gran;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-66","original_id":"diversevul-66","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)\n{\n\tu64 slice = __sched_period(cfs_rq->nr_running);\n\n\tfor_each_sched_entity(se) {\n\t\tcfs_rq = cfs_rq_of(se);\n\n\t\tslice *= se->load.weight;\n\t\tdo_div(slice, cfs_rq->load.weight);\n\t}\n\n\n\treturn slice;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-67","original_id":"diversevul-67","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncalc_delta_fair(unsigned long delta_exec, struct load_weight *lw)\n{\n\treturn calc_delta_mine(delta_exec, NICE_0_LOAD, lw);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-68","original_id":"diversevul-68","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nplace_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)\n{\n\tu64 vruntime;\n\n\tif (first_fair(cfs_rq)) {\n\t\tvruntime = min_vruntime(cfs_rq->min_vruntime,\n\t\t\t\t__pick_next_entity(cfs_rq)->vruntime);\n\t} else\n\t\tvruntime = cfs_rq->min_vruntime;\n\n\t/*\n\t * The 'current' period is already promised to the current tasks,\n\t * however the extra weight of the new task will slow them down a\n\t * little, place the new task so that it fits in the slot that\n\t * stays open at the end.\n\t */\n\tif (initial && sched_feat(START_DEBIT))\n\t\tvruntime += sched_vslice_add(cfs_rq, se);\n\n\tif (!initial) {\n\t\t/* sleeps upto a single latency don't count. */\n\t\tif (sched_feat(NEW_FAIR_SLEEPERS)) {\n\t\t\tif (sched_feat(NORMALIZED_SLEEPER))\n\t\t\t\tvruntime -= calc_delta_fair(sysctl_sched_latency,\n\t\t\t\t\t\t&cfs_rq->load);\n\t\t\telse\n\t\t\t\tvruntime -= sysctl_sched_latency;\n\t\t}\n\n\t\t/* ensure we never gain time by being placed backwards. */\n\t\tvruntime = max_vruntime(se->vruntime, vruntime);\n\t}\n\n\tse->vruntime = vruntime;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-69","original_id":"diversevul-69","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n__update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr,\n\t unsigned long delta_exec)\n{\n\tunsigned long delta_exec_weighted;\n\n\tschedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max));\n\n\tcurr->sum_exec_runtime += delta_exec;\n\tschedstat_add(cfs_rq, exec_clock, delta_exec);\n\tdelta_exec_weighted = delta_exec;\n\tif (unlikely(curr->load.weight != NICE_0_LOAD)) {\n\t\tdelta_exec_weighted = calc_delta_fair(delta_exec_weighted,\n\t\t\t\t\t\t\t&curr->load);\n\t}\n\tcurr->vruntime += delta_exec_weighted;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-70","original_id":"diversevul-70","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_gnutls_server_name_recv_params (gnutls_session_t session,\n\t\t\t\t const opaque * data, size_t _data_size)\n{\n int i;\n const unsigned char *p;\n uint16_t len, type;\n ssize_t data_size = _data_size;\n int server_names = 0;\n\n if (session->security_parameters.entity == GNUTLS_SERVER)\n {\n DECR_LENGTH_RET (data_size, 2, 0);\n len = _gnutls_read_uint16 (data);\n\n if (len != data_size)\n\t{\n\t /* This is unexpected packet length, but\n\t * just ignore it, for now.\n\t */\n\t gnutls_assert ();\n\t return 0;\n\t}\n\n p = data + 2;\n\n /* Count all server_names in the packet. */\n while (data_size > 0)\n\t{\n\t DECR_LENGTH_RET (data_size, 1, 0);\n\t p++;\n\n\t DECR_LEN (data_size, 2);\n\t len = _gnutls_read_uint16 (p);\n\t p += 2;\n\n\t DECR_LENGTH_RET (data_size, len, 0);\n\t server_names++;\n\n\t p += len;\n\t}\n\n session->security_parameters.extensions.server_names_size =\n\tserver_names;\n if (server_names == 0)\n\treturn 0;\t\t/* no names found */\n\n /* we cannot accept more server names.\n */\n if (server_names > MAX_SERVER_NAME_EXTENSIONS)\n\tserver_names = MAX_SERVER_NAME_EXTENSIONS;\n\n p = data + 2;\n for (i = 0; i < server_names; i++)\n\t{\n\t type = *p;\n\t p++;\n\n\t len = _gnutls_read_uint16 (p);\n\t p += 2;\n\n\t switch (type)\n\t {\n\t case 0:\t\t/* NAME_DNS */\n\t if (len <= MAX_SERVER_NAME_SIZE)\n\t\t{\n\t\t memcpy (session->security_parameters.extensions.\n\t\t\t server_names[i].name, p, len);\n\t\t session->security_parameters.extensions.\n\t\t server_names[i].name_length = len;\n\t\t session->security_parameters.extensions.\n\t\t server_names[i].type = GNUTLS_NAME_DNS;\n\t\t break;\n\t\t}\n\t }\n\n\t /* move to next record */\n\t p += len;\n\t}\n }\n return 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-71","original_id":"diversevul-71","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_pages_stat(struct mm_struct *mm, struct page_to_node *pm)\n{\n\tdown_read(&mm->mmap_sem);\n\n\tfor ( ; pm->node != MAX_NUMNODES; pm++) {\n\t\tstruct vm_area_struct *vma;\n\t\tstruct page *page;\n\t\tint err;\n\n\t\terr = -EFAULT;\n\t\tvma = find_vma(mm, pm->addr);\n\t\tif (!vma)\n\t\t\tgoto set_status;\n\n\t\tpage = follow_page(vma, pm->addr, 0);\n\t\terr = -ENOENT;\n\t\t/* Use PageReserved to check for zero page */\n\t\tif (!page || PageReserved(page))\n\t\t\tgoto set_status;\n\n\t\terr = page_to_nid(page);\nset_status:\n\t\tpm->status = err;\n\t}\n\n\tup_read(&mm->mmap_sem);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-72","original_id":"diversevul-72","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_move_pages(struct mm_struct *mm, struct page_to_node *pm,\n\t\t\t\tint migrate_all)\n{\n\tint err;\n\tstruct page_to_node *pp;\n\tLIST_HEAD(pagelist);\n\n\tdown_read(&mm->mmap_sem);\n\n\t/*\n\t * Build a list of pages to migrate\n\t */\n\tmigrate_prep();\n\tfor (pp = pm; pp->node != MAX_NUMNODES; pp++) {\n\t\tstruct vm_area_struct *vma;\n\t\tstruct page *page;\n\n\t\t/*\n\t\t * A valid page pointer that will not match any of the\n\t\t * pages that will be moved.\n\t\t */\n\t\tpp->page = ZERO_PAGE(0);\n\n\t\terr = -EFAULT;\n\t\tvma = find_vma(mm, pp->addr);\n\t\tif (!vma || !vma_migratable(vma))\n\t\t\tgoto set_status;\n\n\t\tpage = follow_page(vma, pp->addr, FOLL_GET);\n\t\terr = -ENOENT;\n\t\tif (!page)\n\t\t\tgoto set_status;\n\n\t\tif (PageReserved(page))\t\t/* Check for zero page */\n\t\t\tgoto put_and_set;\n\n\t\tpp->page = page;\n\t\terr = page_to_nid(page);\n\n\t\tif (err == pp->node)\n\t\t\t/*\n\t\t\t * Node already in the right place\n\t\t\t */\n\t\t\tgoto put_and_set;\n\n\t\terr = -EACCES;\n\t\tif (page_mapcount(page) > 1 &&\n\t\t\t\t!migrate_all)\n\t\t\tgoto put_and_set;\n\n\t\terr = isolate_lru_page(page, &pagelist);\nput_and_set:\n\t\t/*\n\t\t * Either remove the duplicate refcount from\n\t\t * isolate_lru_page() or drop the page ref if it was\n\t\t * not isolated.\n\t\t */\n\t\tput_page(page);\nset_status:\n\t\tpp->status = err;\n\t}\n\n\tif (!list_empty(&pagelist))\n\t\terr = migrate_pages(&pagelist, new_page_node,\n\t\t\t\t(unsigned long)pm);\n\telse\n\t\terr = -ENOENT;\n\n\tup_read(&mm->mmap_sem);\n\treturn err;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-73","original_id":"diversevul-73","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void dump_one_vdso_page(struct page *pg, struct page *upg)\n{\n\tprintk(\"kpg: %p (c:%d,f:%08lx)\", __va(page_to_pfn(pg) << PAGE_SHIFT),\n\t page_count(pg),\n\t pg->flags);\n\tif (upg/* && pg != upg*/) {\n\t\tprintk(\" upg: %p (c:%d,f:%08lx)\", __va(page_to_pfn(upg)\n\t\t\t\t\t\t << PAGE_SHIFT),\n\t\t page_count(upg),\n\t\t upg->flags);\n\t}\n\tprintk(\"\\n\");\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-174","original_id":"diversevul-174","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct page *follow_page(struct vm_area_struct *vma, unsigned long address,\n\t\t\tunsigned int flags)\n{\n\tpgd_t *pgd;\n\tpud_t *pud;\n\tpmd_t *pmd;\n\tpte_t *ptep, pte;\n\tspinlock_t *ptl;\n\tstruct page *page;\n\tstruct mm_struct *mm = vma->vm_mm;\n\n\tpage = follow_huge_addr(mm, address, flags & FOLL_WRITE);\n\tif (!IS_ERR(page)) {\n\t\tBUG_ON(flags & FOLL_GET);\n\t\tgoto out;\n\t}\n\n\tpage = NULL;\n\tpgd = pgd_offset(mm, address);\n\tif (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))\n\t\tgoto no_page_table;\n\n\tpud = pud_offset(pgd, address);\n\tif (pud_none(*pud) || unlikely(pud_bad(*pud)))\n\t\tgoto no_page_table;\n\t\n\tpmd = pmd_offset(pud, address);\n\tif (pmd_none(*pmd))\n\t\tgoto no_page_table;\n\n\tif (pmd_huge(*pmd)) {\n\t\tBUG_ON(flags & FOLL_GET);\n\t\tpage = follow_huge_pmd(mm, address, pmd, flags & FOLL_WRITE);\n\t\tgoto out;\n\t}\n\n\tif (unlikely(pmd_bad(*pmd)))\n\t\tgoto no_page_table;\n\n\tptep = pte_offset_map_lock(mm, pmd, address, &ptl);\n\tif (!ptep)\n\t\tgoto out;\n\n\tpte = *ptep;\n\tif (!pte_present(pte))\n\t\tgoto unlock;\n\tif ((flags & FOLL_WRITE) && !pte_write(pte))\n\t\tgoto unlock;\n\tpage = vm_normal_page(vma, address, pte);\n\tif (unlikely(!page))\n\t\tgoto unlock;\n\n\tif (flags & FOLL_GET)\n\t\tget_page(page);\n\tif (flags & FOLL_TOUCH) {\n\t\tif ((flags & FOLL_WRITE) &&\n\t\t !pte_dirty(pte) && !PageDirty(page))\n\t\t\tset_page_dirty(page);\n\t\tmark_page_accessed(page);\n\t}\nunlock:\n\tpte_unmap_unlock(ptep, ptl);\nout:\n\treturn page;\n\nno_page_table:\n\t/*\n\t * When core dumping an enormous anonymous area that nobody\n\t * has touched so far, we don't want to allocate page tables.\n\t */\n\tif (flags & FOLL_ANON) {\n\t\tpage = ZERO_PAGE(0);\n\t\tif (flags & FOLL_GET)\n\t\t\tget_page(page);\n\t\tBUG_ON(flags & FOLL_WRITE);\n\t}\n\treturn page;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-175","original_id":"diversevul-175","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_change_type(struct nameidata *nd, int flag)\n{\n\tstruct vfsmount *m, *mnt = nd->mnt;\n\tint recurse = flag & MS_REC;\n\tint type = flag & ~MS_REC;\n\n\tif (nd->dentry != nd->mnt->mnt_root)\n\t\treturn -EINVAL;\n\n\tdown_write(&namespace_sem);\n\tspin_lock(&vfsmount_lock);\n\tfor (m = mnt; m; m = (recurse ? next_mnt(m, mnt) : NULL))\n\t\tchange_mnt_propagation(m, type);\n\tspin_unlock(&vfsmount_lock);\n\tup_write(&namespace_sem);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-269"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-176","original_id":"diversevul-176","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint udp_get_port(struct sock *sk, unsigned short snum,\n\t\t\tint (*scmp)(const struct sock *, const struct sock *))\n{\n\treturn __udp_lib_get_port(sk, snum, udp_hash, &udp_port_rover, scmp);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-177","original_id":"diversevul-177","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint udplite_get_port(struct sock *sk, unsigned short p,\n\t\t int (*c)(const struct sock *, const struct sock *))\n{\n\treturn __udp_lib_get_port(sk, p, udplite_hash, &udplite_port_rover, c);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-178","original_id":"diversevul-178","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline int __udp_lib_lport_inuse(__u16 num, struct hlist_head udptable[])\n{\n\tstruct sock *sk;\n\tstruct hlist_node *node;\n\n\tsk_for_each(sk, node, &udptable[num & (UDP_HTABLE_SIZE - 1)])\n\t\tif (sk->sk_hash == num)\n\t\t\treturn 1;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-179","original_id":"diversevul-179","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline void native_set_ldt(const void *addr, unsigned int entries)\n{\n\tif (likely(entries == 0))\n\t\tasm volatile(\"lldt %w0\"::\"q\" (0));\n\telse {\n\t\tunsigned cpu = smp_processor_id();\n\t\tldt_desc ldt;\n\n\t\tset_tssldt_descriptor(&ldt, (unsigned long)addr,\n\t\t\t\t DESC_LDT, entries * sizeof(ldt) - 1);\n\t\twrite_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT,\n\t\t\t\t&ldt, DESC_LDT);\n\t\tasm volatile(\"lldt %w0\"::\"q\" (GDT_ENTRY_LDT*8));\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-180","original_id":"diversevul-180","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nshmem_get_inode(struct super_block *sb, int mode, dev_t dev)\n{\n\tstruct inode *inode;\n\tstruct shmem_inode_info *info;\n\tstruct shmem_sb_info *sbinfo = SHMEM_SB(sb);\n\n\tif (shmem_reserve_inode(sb))\n\t\treturn NULL;\n\n\tinode = new_inode(sb);\n\tif (inode) {\n\t\tinode->i_mode = mode;\n\t\tinode->i_uid = current->fsuid;\n\t\tinode->i_gid = current->fsgid;\n\t\tinode->i_blocks = 0;\n\t\tinode->i_mapping->a_ops = &shmem_aops;\n\t\tinode->i_mapping->backing_dev_info = &shmem_backing_dev_info;\n\t\tinode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;\n\t\tinode->i_generation = get_seconds();\n\t\tinfo = SHMEM_I(inode);\n\t\tmemset(info, 0, (char *)inode - (char *)info);\n\t\tspin_lock_init(&info->lock);\n\t\tINIT_LIST_HEAD(&info->swaplist);\n\n\t\tswitch (mode & S_IFMT) {\n\t\tdefault:\n\t\t\tinode->i_op = &shmem_special_inode_operations;\n\t\t\tinit_special_inode(inode, mode, dev);\n\t\t\tbreak;\n\t\tcase S_IFREG:\n\t\t\tinode->i_op = &shmem_inode_operations;\n\t\t\tinode->i_fop = &shmem_file_operations;\n\t\t\tmpol_shared_policy_init(&info->policy,\n\t\t\t\t\t\t shmem_get_sbmpol(sbinfo));\n\t\t\tbreak;\n\t\tcase S_IFDIR:\n\t\t\tinc_nlink(inode);\n\t\t\t/* Some things misbehave if size == 0 on a directory */\n\t\t\tinode->i_size = 2 * BOGO_DIRENT_SIZE;\n\t\t\tinode->i_op = &shmem_dir_inode_operations;\n\t\t\tinode->i_fop = &simple_dir_operations;\n\t\t\tbreak;\n\t\tcase S_IFLNK:\n\t\t\t/*\n\t\t\t * Must not load anything in the rbtree,\n\t\t\t * mpol_free_shared_policy will not be called.\n\t\t\t */\n\t\t\tmpol_shared_policy_init(&info->policy, NULL);\n\t\t\tbreak;\n\t\t}\n\t} else\n\t\tshmem_free_inode(sb);\n\treturn inode;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-181","original_id":"diversevul-181","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *symname)\n{\n\tint error;\n\tint len;\n\tstruct inode *inode;\n\tstruct page *page = NULL;\n\tchar *kaddr;\n\tstruct shmem_inode_info *info;\n\n\tlen = strlen(symname) + 1;\n\tif (len > PAGE_CACHE_SIZE)\n\t\treturn -ENAMETOOLONG;\n\n\tinode = shmem_get_inode(dir->i_sb, S_IFLNK|S_IRWXUGO, 0);\n\tif (!inode)\n\t\treturn -ENOSPC;\n\n\terror = security_inode_init_security(inode, dir, NULL, NULL,\n\t\t\t\t\t NULL);\n\tif (error) {\n\t\tif (error != -EOPNOTSUPP) {\n\t\t\tiput(inode);\n\t\t\treturn error;\n\t\t}\n\t\terror = 0;\n\t}\n\n\tinfo = SHMEM_I(inode);\n\tinode->i_size = len-1;\n\tif (len <= (char *)inode - (char *)info) {\n\t\t/* do it inline */\n\t\tmemcpy(info, symname, len);\n\t\tinode->i_op = &shmem_symlink_inline_operations;\n\t} else {\n\t\terror = shmem_getpage(inode, 0, &page, SGP_WRITE, NULL);\n\t\tif (error) {\n\t\t\tiput(inode);\n\t\t\treturn error;\n\t\t}\n\t\tunlock_page(page);\n\t\tinode->i_op = &shmem_symlink_inode_operations;\n\t\tkaddr = kmap_atomic(page, KM_USER0);\n\t\tmemcpy(kaddr, symname, len);\n\t\tkunmap_atomic(kaddr, KM_USER0);\n\t\tset_page_dirty(page);\n\t\tpage_cache_release(page);\n\t}\n\tif (dir->i_mode & S_ISGID)\n\t\tinode->i_gid = dir->i_gid;\n\tdir->i_size += BOGO_DIRENT_SIZE;\n\tdir->i_ctime = dir->i_mtime = CURRENT_TIME;\n\td_instantiate(dentry, inode);\n\tdget(dentry);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-182","original_id":"diversevul-182","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid iov_iter_advance(struct iov_iter *i, size_t bytes)\n{\n\tBUG_ON(i->count < bytes);\n\n\tif (likely(i->nr_segs == 1)) {\n\t\ti->iov_offset += bytes;\n\t\ti->count -= bytes;\n\t} else {\n\t\tconst struct iovec *iov = i->iov;\n\t\tsize_t base = i->iov_offset;\n\n\t\t/*\n\t\t * The !iov->iov_len check ensures we skip over unlikely\n\t\t * zero-length segments (without overruning the iovec).\n\t\t */\n\t\twhile (bytes || unlikely(!iov->iov_len && i->count)) {\n\t\t\tint copy;\n\n\t\t\tcopy = min(bytes, iov->iov_len - base);\n\t\t\tBUG_ON(!i->count || i->count < copy);\n\t\t\ti->count -= copy;\n\t\t\tbytes -= copy;\n\t\t\tbase += copy;\n\t\t\tif (iov->iov_len == base) {\n\t\t\t\tiov++;\n\t\t\t\tbase = 0;\n\t\t\t}\n\t\t}\n\t\ti->iov = iov;\n\t\ti->iov_offset = base;\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-193"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-183","original_id":"diversevul-183","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct dentry * real_lookup(struct dentry * parent, struct qstr * name, struct nameidata *nd)\n{\n\tstruct dentry * result;\n\tstruct inode *dir = parent->d_inode;\n\n\tmutex_lock(&dir->i_mutex);\n\t/*\n\t * First re-do the cached lookup just in case it was created\n\t * while we waited for the directory semaphore..\n\t *\n\t * FIXME! This could use version numbering or similar to\n\t * avoid unnecessary cache lookups.\n\t *\n\t * The \"dcache_lock\" is purely to protect the RCU list walker\n\t * from concurrent renames at this point (we mustn't get false\n\t * negatives from the RCU list walk here, unlike the optimistic\n\t * fast walk).\n\t *\n\t * so doing d_lookup() (with seqlock), instead of lockfree __d_lookup\n\t */\n\tresult = d_lookup(parent, name);\n\tif (!result) {\n\t\tstruct dentry * dentry = d_alloc(parent, name);\n\t\tresult = ERR_PTR(-ENOMEM);\n\t\tif (dentry) {\n\t\t\tresult = dir->i_op->lookup(dir, dentry, nd);\n\t\t\tif (result)\n\t\t\t\tdput(dentry);\n\t\t\telse\n\t\t\t\tresult = dentry;\n\t\t}\n\t\tmutex_unlock(&dir->i_mutex);\n\t\treturn result;\n\t}\n\n\t/*\n\t * Uhhuh! Nasty case: the cache was re-populated while\n\t * we waited on the semaphore. Need to revalidate.\n\t */\n\tmutex_unlock(&dir->i_mutex);\n\tif (result->d_op && result->d_op->d_revalidate) {\n\t\tresult = do_revalidate(result, nd);\n\t\tif (!result)\n\t\t\tresult = ERR_PTR(-ENOENT);\n\t}\n\treturn result;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-184","original_id":"diversevul-184","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct dentry *__lookup_hash(struct qstr *name,\n\t\tstruct dentry *base, struct nameidata *nd)\n{\n\tstruct dentry *dentry;\n\tstruct inode *inode;\n\tint err;\n\n\tinode = base->d_inode;\n\n\t/*\n\t * See if the low-level filesystem might want\n\t * to use its own hash..\n\t */\n\tif (base->d_op && base->d_op->d_hash) {\n\t\terr = base->d_op->d_hash(base, name);\n\t\tdentry = ERR_PTR(err);\n\t\tif (err < 0)\n\t\t\tgoto out;\n\t}\n\n\tdentry = cached_lookup(base, name, nd);\n\tif (!dentry) {\n\t\tstruct dentry *new = d_alloc(base, name);\n\t\tdentry = ERR_PTR(-ENOMEM);\n\t\tif (!new)\n\t\t\tgoto out;\n\t\tdentry = inode->i_op->lookup(inode, new, nd);\n\t\tif (!dentry)\n\t\t\tdentry = new;\n\t\telse\n\t\t\tdput(new);\n\t}\nout:\n\treturn dentry;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-185","original_id":"diversevul-185","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nsnd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_info *inf)\n{\n\tstruct seq_oss_synth *rec;\n\n\tif (dp->synths[dev].is_midi) {\n\t\tstruct midi_info minf;\n\t\tsnd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);\n\t\tinf->synth_type = SYNTH_TYPE_MIDI;\n\t\tinf->synth_subtype = 0;\n\t\tinf->nr_voices = 16;\n\t\tinf->device = dev;\n\t\tstrlcpy(inf->name, minf.name, sizeof(inf->name));\n\t} else {\n\t\tif ((rec = get_synthdev(dp, dev)) == NULL)\n\t\t\treturn -ENXIO;\n\t\tinf->synth_type = rec->synth_type;\n\t\tinf->synth_subtype = rec->synth_subtype;\n\t\tinf->nr_voices = rec->nr_voices;\n\t\tinf->device = dev;\n\t\tstrlcpy(inf->name, rec->name, sizeof(inf->name));\n\t\tsnd_use_lock_free(&rec->use_lock);\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-186","original_id":"diversevul-186","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void file_add_remove(struct diff_options *options,\n\t\t int addremove, unsigned mode,\n\t\t const unsigned char *sha1,\n\t\t const char *base, const char *path)\n{\n\tint diff = REV_TREE_DIFFERENT;\n\n\t/*\n\t * Is it an add of a new file? It means that the old tree\n\t * didn't have it at all, so we will turn \"REV_TREE_SAME\" ->\n\t * \"REV_TREE_NEW\", but leave any \"REV_TREE_DIFFERENT\" alone\n\t * (and if it already was \"REV_TREE_NEW\", we'll keep it\n\t * \"REV_TREE_NEW\" of course).\n\t */\n\tif (addremove == '+') {\n\t\tdiff = tree_difference;\n\t\tif (diff != REV_TREE_SAME)\n\t\t\treturn;\n\t\tdiff = REV_TREE_NEW;\n\t}\n\ttree_difference = diff;\n\tif (tree_difference == REV_TREE_DIFFERENT)\n\t\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-187","original_id":"diversevul-187","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int show_modified(struct oneway_unpack_data *cbdata,\n\t\t\t struct cache_entry *old,\n\t\t\t struct cache_entry *new,\n\t\t\t int report_missing,\n\t\t\t int cached, int match_missing)\n{\n\tunsigned int mode, oldmode;\n\tconst unsigned char *sha1;\n\tstruct rev_info *revs = cbdata->revs;\n\n\tif (get_stat_data(new, &sha1, &mode, cached, match_missing, cbdata) < 0) {\n\t\tif (report_missing)\n\t\t\tdiff_index_show_file(revs, \"-\", old,\n\t\t\t\t\t old->sha1, old->ce_mode);\n\t\treturn -1;\n\t}\n\n\tif (revs->combine_merges && !cached &&\n\t (hashcmp(sha1, old->sha1) || hashcmp(old->sha1, new->sha1))) {\n\t\tstruct combine_diff_path *p;\n\t\tint pathlen = ce_namelen(new);\n\n\t\tp = xmalloc(combine_diff_path_size(2, pathlen));\n\t\tp->path = (char *) &p->parent[2];\n\t\tp->next = NULL;\n\t\tp->len = pathlen;\n\t\tmemcpy(p->path, new->name, pathlen);\n\t\tp->path[pathlen] = 0;\n\t\tp->mode = mode;\n\t\thashclr(p->sha1);\n\t\tmemset(p->parent, 0, 2 * sizeof(struct combine_diff_parent));\n\t\tp->parent[0].status = DIFF_STATUS_MODIFIED;\n\t\tp->parent[0].mode = new->ce_mode;\n\t\thashcpy(p->parent[0].sha1, new->sha1);\n\t\tp->parent[1].status = DIFF_STATUS_MODIFIED;\n\t\tp->parent[1].mode = old->ce_mode;\n\t\thashcpy(p->parent[1].sha1, old->sha1);\n\t\tshow_combined_diff(p, 2, revs->dense_combined_merges, revs);\n\t\tfree(p);\n\t\treturn 0;\n\t}\n\n\toldmode = old->ce_mode;\n\tif (mode == oldmode && !hashcmp(sha1, old->sha1) &&\n\t !DIFF_OPT_TST(&revs->diffopt, FIND_COPIES_HARDER))\n\t\treturn 0;\n\n\tdiff_change(&revs->diffopt, oldmode, mode,\n\t\t old->sha1, sha1, old->name, NULL);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-188","original_id":"diversevul-188","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int compare_tree_entry(struct tree_desc *t1, struct tree_desc *t2, const char *base, int baselen, struct diff_options *opt)\n{\n\tunsigned mode1, mode2;\n\tconst char *path1, *path2;\n\tconst unsigned char *sha1, *sha2;\n\tint cmp, pathlen1, pathlen2;\n\n\tsha1 = tree_entry_extract(t1, &path1, &mode1);\n\tsha2 = tree_entry_extract(t2, &path2, &mode2);\n\n\tpathlen1 = tree_entry_len(path1, sha1);\n\tpathlen2 = tree_entry_len(path2, sha2);\n\tcmp = base_name_compare(path1, pathlen1, mode1, path2, pathlen2, mode2);\n\tif (cmp < 0) {\n\t\tshow_entry(opt, \"-\", t1, base, baselen);\n\t\treturn -1;\n\t}\n\tif (cmp > 0) {\n\t\tshow_entry(opt, \"+\", t2, base, baselen);\n\t\treturn 1;\n\t}\n\tif (!DIFF_OPT_TST(opt, FIND_COPIES_HARDER) && !hashcmp(sha1, sha2) && mode1 == mode2)\n\t\treturn 0;\n\n\t/*\n\t * If the filemode has changed to/from a directory from/to a regular\n\t * file, we need to consider it a remove and an add.\n\t */\n\tif (S_ISDIR(mode1) != S_ISDIR(mode2)) {\n\t\tshow_entry(opt, \"-\", t1, base, baselen);\n\t\tshow_entry(opt, \"+\", t2, base, baselen);\n\t\treturn 0;\n\t}\n\n\tif (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode1)) {\n\t\tint retval;\n\t\tchar *newbase = malloc_base(base, baselen, path1, pathlen1);\n\t\tif (DIFF_OPT_TST(opt, TREE_IN_RECURSIVE))\n\t\t\topt->change(opt, mode1, mode2,\n\t\t\t\t sha1, sha2, base, path1);\n\t\tretval = diff_tree_sha1(sha1, sha2, newbase, opt);\n\t\tfree(newbase);\n\t\treturn retval;\n\t}\n\n\topt->change(opt, mode1, mode2, sha1, sha2, base, path1);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-189","original_id":"diversevul-189","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void diff_index_show_file(struct rev_info *revs,\n\t\t\t\t const char *prefix,\n\t\t\t\t struct cache_entry *ce,\n\t\t\t\t const unsigned char *sha1, unsigned int mode)\n{\n\tdiff_addremove(&revs->diffopt, prefix[0], mode,\n\t\t sha1, ce->name, NULL);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-190","original_id":"diversevul-190","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid diff_addremove(struct diff_options *options,\n\t\t int addremove, unsigned mode,\n\t\t const unsigned char *sha1,\n\t\t const char *base, const char *path)\n{\n\tchar concatpath[PATH_MAX];\n\tstruct diff_filespec *one, *two;\n\n\tif (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(mode))\n\t\treturn;\n\n\t/* This may look odd, but it is a preparation for\n\t * feeding \"there are unchanged files which should\n\t * not produce diffs, but when you are doing copy\n\t * detection you would need them, so here they are\"\n\t * entries to the diff-core. They will be prefixed\n\t * with something like '=' or '*' (I haven't decided\n\t * which but should not make any difference).\n\t * Feeding the same new and old to diff_change()\n\t * also has the same effect.\n\t * Before the final output happens, they are pruned after\n\t * merged into rename/copy pairs as appropriate.\n\t */\n\tif (DIFF_OPT_TST(options, REVERSE_DIFF))\n\t\taddremove = (addremove == '+' ? '-' :\n\t\t\t addremove == '-' ? '+' : addremove);\n\n\tif (!path) path = \"\";\n\tsprintf(concatpath, \"%s%s\", base, path);\n\n\tif (options->prefix &&\n\t strncmp(concatpath, options->prefix, options->prefix_length))\n\t\treturn;\n\n\tone = alloc_filespec(concatpath);\n\ttwo = alloc_filespec(concatpath);\n\n\tif (addremove != '+')\n\t\tfill_filespec(one, sha1, mode);\n\tif (addremove != '-')\n\t\tfill_filespec(two, sha1, mode);\n\n\tdiff_queue(&diff_queued_diff, one, two);\n\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-191","original_id":"diversevul-191","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc,\n\t\t const char *base, int baselen)\n{\n\tunsigned mode;\n\tconst char *path;\n\tconst unsigned char *sha1 = tree_entry_extract(desc, &path, &mode);\n\n\tif (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode)) {\n\t\tenum object_type type;\n\t\tint pathlen = tree_entry_len(path, sha1);\n\t\tchar *newbase = malloc_base(base, baselen, path, pathlen);\n\t\tstruct tree_desc inner;\n\t\tvoid *tree;\n\t\tunsigned long size;\n\n\t\ttree = read_sha1_file(sha1, &type, &size);\n\t\tif (!tree || type != OBJ_TREE)\n\t\t\tdie(\"corrupt tree sha %s\", sha1_to_hex(sha1));\n\n\t\tinit_tree_desc(&inner, tree, size);\n\t\tshow_tree(opt, prefix, &inner, newbase, baselen + 1 + pathlen);\n\n\t\tfree(tree);\n\t\tfree(newbase);\n\t} else {\n\t\topt->add_remove(opt, prefix[0], mode, sha1, base, path);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-192","original_id":"diversevul-192","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid diff_change(struct diff_options *options,\n\t\t unsigned old_mode, unsigned new_mode,\n\t\t const unsigned char *old_sha1,\n\t\t const unsigned char *new_sha1,\n\t\t const char *base, const char *path)\n{\n\tchar concatpath[PATH_MAX];\n\tstruct diff_filespec *one, *two;\n\n\tif (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(old_mode)\n\t\t\t&& S_ISGITLINK(new_mode))\n\t\treturn;\n\n\tif (DIFF_OPT_TST(options, REVERSE_DIFF)) {\n\t\tunsigned tmp;\n\t\tconst unsigned char *tmp_c;\n\t\ttmp = old_mode; old_mode = new_mode; new_mode = tmp;\n\t\ttmp_c = old_sha1; old_sha1 = new_sha1; new_sha1 = tmp_c;\n\t}\n\tif (!path) path = \"\";\n\tsprintf(concatpath, \"%s%s\", base, path);\n\n\tif (options->prefix &&\n\t strncmp(concatpath, options->prefix, options->prefix_length))\n\t\treturn;\n\n\tone = alloc_filespec(concatpath);\n\ttwo = alloc_filespec(concatpath);\n\tfill_filespec(one, old_sha1, old_mode);\n\tfill_filespec(two, new_sha1, new_mode);\n\n\tdiff_queue(&diff_queued_diff, one, two);\n\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-193","original_id":"diversevul-193","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void file_change(struct diff_options *options,\n\t\t unsigned old_mode, unsigned new_mode,\n\t\t const unsigned char *old_sha1,\n\t\t const unsigned char *new_sha1,\n\t\t const char *base, const char *path)\n{\n\ttree_difference = REV_TREE_DIFFERENT;\n\tDIFF_OPT_SET(options, HAS_CHANGES);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-194","original_id":"diversevul-194","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void prepare_attr_stack(const char *path, int dirlen)\n{\n\tstruct attr_stack *elem, *info;\n\tint len;\n\tchar pathbuf[PATH_MAX];\n\n\t/*\n\t * At the bottom of the attribute stack is the built-in\n\t * set of attribute definitions. Then, contents from\n\t * .gitattribute files from directories closer to the\n\t * root to the ones in deeper directories are pushed\n\t * to the stack. Finally, at the very top of the stack\n\t * we always keep the contents of $GIT_DIR/info/attributes.\n\t *\n\t * When checking, we use entries from near the top of the\n\t * stack, preferring $GIT_DIR/info/attributes, then\n\t * .gitattributes in deeper directories to shallower ones,\n\t * and finally use the built-in set as the default.\n\t */\n\tif (!attr_stack)\n\t\tbootstrap_attr_stack();\n\n\t/*\n\t * Pop the \"info\" one that is always at the top of the stack.\n\t */\n\tinfo = attr_stack;\n\tattr_stack = info->prev;\n\n\t/*\n\t * Pop the ones from directories that are not the prefix of\n\t * the path we are checking.\n\t */\n\twhile (attr_stack && attr_stack->origin) {\n\t\tint namelen = strlen(attr_stack->origin);\n\n\t\telem = attr_stack;\n\t\tif (namelen <= dirlen &&\n\t\t !strncmp(elem->origin, path, namelen))\n\t\t\tbreak;\n\n\t\tdebug_pop(elem);\n\t\tattr_stack = elem->prev;\n\t\tfree_attr_elem(elem);\n\t}\n\n\t/*\n\t * Read from parent directories and push them down\n\t */\n\tif (!is_bare_repository()) {\n\t\twhile (1) {\n\t\t\tchar *cp;\n\n\t\t\tlen = strlen(attr_stack->origin);\n\t\t\tif (dirlen <= len)\n\t\t\t\tbreak;\n\t\t\tmemcpy(pathbuf, path, dirlen);\n\t\t\tmemcpy(pathbuf + dirlen, \"/\", 2);\n\t\t\tcp = strchr(pathbuf + len + 1, '/');\n\t\t\tstrcpy(cp + 1, GITATTRIBUTES_FILE);\n\t\t\telem = read_attr(pathbuf, 0);\n\t\t\t*cp = '\\0';\n\t\t\telem->origin = strdup(pathbuf);\n\t\t\telem->prev = attr_stack;\n\t\t\tattr_stack = elem;\n\t\t\tdebug_push(elem);\n\t\t}\n\t}\n\n\t/*\n\t * Finally push the \"info\" one at the top of the stack.\n\t */\n\tinfo->prev = attr_stack;\n\tattr_stack = info;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-195","original_id":"diversevul-195","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int grep_tree(struct grep_opt *opt, const char **paths,\n\t\t struct tree_desc *tree,\n\t\t const char *tree_name, const char *base)\n{\n\tint len;\n\tint hit = 0;\n\tstruct name_entry entry;\n\tchar *down;\n\tint tn_len = strlen(tree_name);\n\tchar *path_buf = xmalloc(PATH_MAX + tn_len + 100);\n\n\tif (tn_len) {\n\t\ttn_len = sprintf(path_buf, \"%s:\", tree_name);\n\t\tdown = path_buf + tn_len;\n\t\tstrcat(down, base);\n\t}\n\telse {\n\t\tdown = path_buf;\n\t\tstrcpy(down, base);\n\t}\n\tlen = strlen(path_buf);\n\n\twhile (tree_entry(tree, &entry)) {\n\t\tstrcpy(path_buf + len, entry.path);\n\n\t\tif (S_ISDIR(entry.mode))\n\t\t\t/* Match \"abc/\" against pathspec to\n\t\t\t * decide if we want to descend into \"abc\"\n\t\t\t * directory.\n\t\t\t */\n\t\t\tstrcpy(path_buf + len + tree_entry_len(entry.path, entry.sha1), \"/\");\n\n\t\tif (!pathspec_matches(paths, down))\n\t\t\t;\n\t\telse if (S_ISREG(entry.mode))\n\t\t\thit |= grep_sha1(opt, entry.sha1, path_buf, tn_len);\n\t\telse if (S_ISDIR(entry.mode)) {\n\t\t\tenum object_type type;\n\t\t\tstruct tree_desc sub;\n\t\t\tvoid *data;\n\t\t\tunsigned long size;\n\n\t\t\tdata = read_sha1_file(entry.sha1, &type, &size);\n\t\t\tif (!data)\n\t\t\t\tdie(\"unable to read tree (%s)\",\n\t\t\t\t sha1_to_hex(entry.sha1));\n\t\t\tinit_tree_desc(&sub, data, size);\n\t\t\thit |= grep_tree(opt, paths, &sub, tree_name, down);\n\t\t\tfree(data);\n\t\t}\n\t}\n\treturn hit;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-196","original_id":"diversevul-196","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int dccp_setsockopt_change(struct sock *sk, int type,\n\t\t\t\t struct dccp_so_feat __user *optval)\n{\n\tstruct dccp_so_feat opt;\n\tu8 *val;\n\tint rc;\n\n\tif (copy_from_user(&opt, optval, sizeof(opt)))\n\t\treturn -EFAULT;\n\n\tval = kmalloc(opt.dccpsf_len, GFP_KERNEL);\n\tif (!val)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(val, opt.dccpsf_val, opt.dccpsf_len)) {\n\t\trc = -EFAULT;\n\t\tgoto out_free_val;\n\t}\n\n\trc = dccp_feat_change(dccp_msk(sk), type, opt.dccpsf_feat,\n\t\t\t val, opt.dccpsf_len, GFP_KERNEL);\n\tif (rc)\n\t\tgoto out_free_val;\n\nout:\n\treturn rc;\n\nout_free_val:\n\tkfree(val);\n\tgoto out;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-197","original_id":"diversevul-197","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_auth_chunk(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_authchunk val;\n\n\tif (optlen != sizeof(struct sctp_authchunk))\n\t\treturn -EINVAL;\n\tif (copy_from_user(&val, optval, optlen))\n\t\treturn -EFAULT;\n\n\tswitch (val.sauth_chunk) {\n\t\tcase SCTP_CID_INIT:\n\t\tcase SCTP_CID_INIT_ACK:\n\t\tcase SCTP_CID_SHUTDOWN_COMPLETE:\n\t\tcase SCTP_CID_AUTH:\n\t\t\treturn -EINVAL;\n\t}\n\n\t/* add this chunk id to the endpoint */\n\treturn sctp_auth_ep_add_chunkid(sctp_sk(sk)->ep, val.sauth_chunk);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-198","original_id":"diversevul-198","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_auth_key(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_authkey *authkey;\n\tstruct sctp_association *asoc;\n\tint ret;\n\n\tif (optlen <= sizeof(struct sctp_authkey))\n\t\treturn -EINVAL;\n\n\tauthkey = kmalloc(optlen, GFP_KERNEL);\n\tif (!authkey)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(authkey, optval, optlen)) {\n\t\tret = -EFAULT;\n\t\tgoto out;\n\t}\n\n\tasoc = sctp_id2assoc(sk, authkey->sca_assoc_id);\n\tif (!asoc && authkey->sca_assoc_id && sctp_style(sk, UDP)) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tret = sctp_auth_set_key(sctp_sk(sk)->ep, asoc, authkey);\nout:\n\tkfree(authkey);\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-199","original_id":"diversevul-199","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_del_key(struct sock *sk,\n\t\t\t\t\tchar __user *optval,\n\t\t\t\t\tint optlen)\n{\n\tstruct sctp_authkeyid val;\n\tstruct sctp_association *asoc;\n\n\tif (optlen != sizeof(struct sctp_authkeyid))\n\t\treturn -EINVAL;\n\tif (copy_from_user(&val, optval, optlen))\n\t\treturn -EFAULT;\n\n\tasoc = sctp_id2assoc(sk, val.scact_assoc_id);\n\tif (!asoc && val.scact_assoc_id && sctp_style(sk, UDP))\n\t\treturn -EINVAL;\n\n\treturn sctp_auth_del_key_id(sctp_sk(sk)->ep, asoc,\n\t\t\t\t val.scact_keynumber);\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-200","original_id":"diversevul-200","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,\n\t\t\t\t char __user *optval, int __user *optlen)\n{\n\tstruct sctp_authchunks __user *p = (void __user *)optval;\n\tstruct sctp_authchunks val;\n\tstruct sctp_association *asoc;\n\tstruct sctp_chunks_param *ch;\n\tu32 num_chunks;\n\tchar __user *to;\n\n\tif (len <= sizeof(struct sctp_authchunks))\n\t\treturn -EINVAL;\n\n\tif (copy_from_user(&val, p, sizeof(struct sctp_authchunks)))\n\t\treturn -EFAULT;\n\n\tto = p->gauth_chunks;\n\tasoc = sctp_id2assoc(sk, val.gauth_assoc_id);\n\tif (!asoc && val.gauth_assoc_id && sctp_style(sk, UDP))\n\t\treturn -EINVAL;\n\n\tif (asoc)\n\t\tch = (struct sctp_chunks_param*)asoc->c.auth_chunks;\n\telse\n\t\tch = sctp_sk(sk)->ep->auth_chunk_list;\n\n\tnum_chunks = ntohs(ch->param_hdr.length) - sizeof(sctp_paramhdr_t);\n\tif (len < num_chunks)\n\t\treturn -EINVAL;\n\n\tlen = num_chunks;\n\tif (put_user(len, optlen))\n\t\treturn -EFAULT;\n\tif (put_user(num_chunks, &p->gauth_number_of_chunks))\n\t\treturn -EFAULT;\n\tif (copy_to_user(to, ch->chunks, len))\n\t\treturn -EFAULT;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-201","original_id":"diversevul-201","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_hmac_ident(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_hmacalgo *hmacs;\n\tint err;\n\n\tif (optlen < sizeof(struct sctp_hmacalgo))\n\t\treturn -EINVAL;\n\n\thmacs = kmalloc(optlen, GFP_KERNEL);\n\tif (!hmacs)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(hmacs, optval, optlen)) {\n\t\terr = -EFAULT;\n\t\tgoto out;\n\t}\n\n\tif (hmacs->shmac_num_idents == 0 ||\n\t hmacs->shmac_num_idents > SCTP_AUTH_NUM_HMACS) {\n\t\terr = -EINVAL;\n\t\tgoto out;\n\t}\n\n\terr = sctp_auth_ep_set_hmacs(sctp_sk(sk)->ep, hmacs);\nout:\n\tkfree(hmacs);\n\treturn err;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-202","original_id":"diversevul-202","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_getsockopt_active_key(struct sock *sk, int len,\n\t\t\t\t char __user *optval, int __user *optlen)\n{\n\tstruct sctp_authkeyid val;\n\tstruct sctp_association *asoc;\n\n\tif (len < sizeof(struct sctp_authkeyid))\n\t\treturn -EINVAL;\n\tif (copy_from_user(&val, optval, sizeof(struct sctp_authkeyid)))\n\t\treturn -EFAULT;\n\n\tasoc = sctp_id2assoc(sk, val.scact_assoc_id);\n\tif (!asoc && val.scact_assoc_id && sctp_style(sk, UDP))\n\t\treturn -EINVAL;\n\n\tif (asoc)\n\t\tval.scact_keynumber = asoc->active_key_id;\n\telse\n\t\tval.scact_keynumber = sctp_sk(sk)->ep->active_key_id;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-203","original_id":"diversevul-203","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_getsockopt_hmac_ident(struct sock *sk, int len,\n\t\t\t\t char __user *optval, int __user *optlen)\n{\n\tstruct sctp_hmac_algo_param *hmacs;\n\t__u16 param_len;\n\n\thmacs = sctp_sk(sk)->ep->auth_hmacs_list;\n\tparam_len = ntohs(hmacs->param_hdr.length);\n\n\tif (len < param_len)\n\t\treturn -EINVAL;\n\tif (put_user(len, optlen))\n\t\treturn -EFAULT;\n\tif (copy_to_user(optval, hmacs->hmac_ids, len))\n\t\treturn -EFAULT;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-204","original_id":"diversevul-204","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_active_key(struct sock *sk,\n\t\t\t\t\tchar __user *optval,\n\t\t\t\t\tint optlen)\n{\n\tstruct sctp_authkeyid val;\n\tstruct sctp_association *asoc;\n\n\tif (optlen != sizeof(struct sctp_authkeyid))\n\t\treturn -EINVAL;\n\tif (copy_from_user(&val, optval, optlen))\n\t\treturn -EFAULT;\n\n\tasoc = sctp_id2assoc(sk, val.scact_assoc_id);\n\tif (!asoc && val.scact_assoc_id && sctp_style(sk, UDP))\n\t\treturn -EINVAL;\n\n\treturn sctp_auth_set_active_key(sctp_sk(sk)->ep, asoc,\n\t\t\t\t\tval.scact_keynumber);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-205","original_id":"diversevul-205","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,\n\t\t\t\t char __user *optval, int __user *optlen)\n{\n\tstruct sctp_authchunks __user *p = (void __user *)optval;\n\tstruct sctp_authchunks val;\n\tstruct sctp_association *asoc;\n\tstruct sctp_chunks_param *ch;\n\tu32 num_chunks;\n\tchar __user *to;\n\n\tif (len <= sizeof(struct sctp_authchunks))\n\t\treturn -EINVAL;\n\n\tif (copy_from_user(&val, p, sizeof(struct sctp_authchunks)))\n\t\treturn -EFAULT;\n\n\tto = p->gauth_chunks;\n\tasoc = sctp_id2assoc(sk, val.gauth_assoc_id);\n\tif (!asoc)\n\t\treturn -EINVAL;\n\n\tch = asoc->peer.peer_chunks;\n\n\t/* See if the user provided enough room for all the data */\n\tnum_chunks = ntohs(ch->param_hdr.length) - sizeof(sctp_paramhdr_t);\n\tif (len < num_chunks)\n\t\treturn -EINVAL;\n\n\tlen = num_chunks;\n\tif (put_user(len, optlen))\n\t\treturn -EFAULT;\n\tif (put_user(num_chunks, &p->gauth_number_of_chunks))\n\t\treturn -EFAULT;\n\tif (copy_to_user(to, ch->chunks, len))\n\t\treturn -EFAULT;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-206","original_id":"diversevul-206","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_auth_key(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_authkey *authkey;\n\tstruct sctp_association *asoc;\n\tint ret;\n\n\tif (!sctp_auth_enable)\n\t\treturn -EACCES;\n\n\tif (optlen <= sizeof(struct sctp_authkey))\n\t\treturn -EINVAL;\n\n\tauthkey = kmalloc(optlen, GFP_KERNEL);\n\tif (!authkey)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(authkey, optval, optlen)) {\n\t\tret = -EFAULT;\n\t\tgoto out;\n\t}\n\n\tasoc = sctp_id2assoc(sk, authkey->sca_assoc_id);\n\tif (!asoc && authkey->sca_assoc_id && sctp_style(sk, UDP)) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tret = sctp_auth_set_key(sctp_sk(sk)->ep, asoc, authkey);\nout:\n\tkfree(authkey);\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-207","original_id":"diversevul-207","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct sctp_auth_bytes *sctp_auth_create_key(__u32 key_len, gfp_t gfp)\n{\n\tstruct sctp_auth_bytes *key;\n\n\t/* Allocate the shared key */\n\tkey = kmalloc(sizeof(struct sctp_auth_bytes) + key_len, gfp);\n\tif (!key)\n\t\treturn NULL;\n\n\tkey->len = key_len;\n\tatomic_set(&key->refcnt, 1);\n\tSCTP_DBG_OBJCNT_INC(keys);\n\n\treturn key;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-208","original_id":"diversevul-208","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_auth_key(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_authkey *authkey;\n\tstruct sctp_association *asoc;\n\tint ret;\n\n\tif (!sctp_auth_enable)\n\t\treturn -EACCES;\n\n\tif (optlen <= sizeof(struct sctp_authkey))\n\t\treturn -EINVAL;\n\n\tauthkey = kmalloc(optlen, GFP_KERNEL);\n\tif (!authkey)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(authkey, optval, optlen)) {\n\t\tret = -EFAULT;\n\t\tgoto out;\n\t}\n\n\tif (authkey->sca_keylength > optlen) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tasoc = sctp_id2assoc(sk, authkey->sca_assoc_id);\n\tif (!asoc && authkey->sca_assoc_id && sctp_style(sk, UDP)) {\n\t\tret = -EINVAL;\n\t\tgoto out;\n\t}\n\n\tret = sctp_auth_set_key(sctp_sk(sk)->ep, asoc, authkey);\nout:\n\tkfree(authkey);\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-209","original_id":"diversevul-209","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint __init sysenter_setup(void)\n{\n\tsyscall_page = (void *)get_zeroed_page(GFP_ATOMIC);\n\n#ifdef CONFIG_COMPAT_VDSO\n\t__set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY);\n\tprintk(\"Compat vDSO mapped to %08lx.\\n\", __fix_to_virt(FIX_VDSO));\n#endif\n\n\tif (!boot_cpu_has(X86_FEATURE_SEP)) {\n\t\tmemcpy(syscall_page,\n\t\t &vsyscall_int80_start,\n\t\t &vsyscall_int80_end - &vsyscall_int80_start);\n\t\treturn 0;\n\t}\n\n\tmemcpy(syscall_page,\n\t &vsyscall_sysenter_start,\n\t &vsyscall_sysenter_end - &vsyscall_sysenter_start);\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-210","original_id":"diversevul-210","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void syscall_vma_close(struct vm_area_struct *vma)\n{\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-211","original_id":"diversevul-211","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct page *syscall_nopage(struct vm_area_struct *vma,\n\t\t\t\tunsigned long adr, int *type)\n{\n\tstruct page *p = virt_to_page(adr - vma->vm_start + syscall_page);\n\tget_page(p);\n\treturn p;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-212","original_id":"diversevul-212","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)\n{\n\tstruct vm_area_struct *vma;\n\tstruct mm_struct *mm = current->mm;\n\tunsigned long addr;\n\tint ret;\n\n\tdown_write(&mm->mmap_sem);\n\taddr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);\n\tif (IS_ERR_VALUE(addr)) {\n\t\tret = addr;\n\t\tgoto up_fail;\n\t}\n\n\tvma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);\n\tif (!vma) {\n\t\tret = -ENOMEM;\n\t\tgoto up_fail;\n\t}\n\n\tvma->vm_start = addr;\n\tvma->vm_end = addr + PAGE_SIZE;\n\t/* MAYWRITE to allow gdb to COW and set breakpoints */\n\tvma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;\n\t/*\n\t * Make sure the vDSO gets into every core dump.\n\t * Dumping its contents makes post-mortem fully interpretable later\n\t * without matching up the same kernel and hardware config to see\n\t * what PC values meant.\n\t */\n\tvma->vm_flags |= VM_ALWAYSDUMP;\n\tvma->vm_flags |= mm->def_flags;\n\tvma->vm_page_prot = protection_map[vma->vm_flags & 7];\n\tvma->vm_ops = &syscall_vm_ops;\n\tvma->vm_mm = mm;\n\n\tret = insert_vm_struct(mm, vma);\n\tif (unlikely(ret)) {\n\t\tkmem_cache_free(vm_area_cachep, vma);\n\t\tgoto up_fail;\n\t}\n\n\tcurrent->mm->context.vdso = (void *)addr;\n\tcurrent_thread_info()->sysenter_return =\n\t\t\t\t (void *)VDSO_SYM(&SYSENTER_RETURN);\n\tmm->total_vm++;\nup_fail:\n\tup_write(&mm->mmap_sem);\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-213","original_id":"diversevul-213","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nsbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd )\n{\n\tstruct net_local *nl = (struct net_local *) dev->priv; \n\tstruct sbni_flags flags;\n\tint error = 0;\n\n#ifdef CONFIG_SBNI_MULTILINE\n\tstruct net_device *slave_dev;\n\tchar slave_name[ 8 ];\n#endif\n \n\tswitch( cmd ) {\n\tcase SIOCDEVGETINSTATS :\n\t\tif (copy_to_user( ifr->ifr_data, &nl->in_stats,\n\t\t\t\t\tsizeof(struct sbni_in_stats) ))\n\t\t\terror = -EFAULT;\n\t\tbreak;\n\n\tcase SIOCDEVRESINSTATS :\n\t\tif( current->euid != 0 )\t/* root only */\n\t\t\treturn -EPERM;\n\t\tmemset( &nl->in_stats, 0, sizeof(struct sbni_in_stats) );\n\t\tbreak;\n\n\tcase SIOCDEVGHWSTATE :\n\t\tflags.mac_addr\t= *(u32 *)(dev->dev_addr + 3);\n\t\tflags.rate\t= nl->csr1.rate;\n\t\tflags.slow_mode\t= (nl->state & FL_SLOW_MODE) != 0;\n\t\tflags.rxl\t= nl->cur_rxl_index;\n\t\tflags.fixed_rxl\t= nl->delta_rxl == 0;\n\n\t\tif (copy_to_user( ifr->ifr_data, &flags, sizeof flags ))\n\t\t\terror = -EFAULT;\n\t\tbreak;\n\n\tcase SIOCDEVSHWSTATE :\n\t\tif( current->euid != 0 )\t/* root only */\n\t\t\treturn -EPERM;\n\n\t\tspin_lock( &nl->lock );\n\t\tflags = *(struct sbni_flags*) &ifr->ifr_ifru;\n\t\tif( flags.fixed_rxl )\n\t\t\tnl->delta_rxl = 0,\n\t\t\tnl->cur_rxl_index = flags.rxl;\n\t\telse\n\t\t\tnl->delta_rxl = DEF_RXL_DELTA,\n\t\t\tnl->cur_rxl_index = DEF_RXL;\n\n\t\tnl->csr1.rxl = rxl_tab[ nl->cur_rxl_index ];\n\t\tnl->csr1.rate = flags.rate;\n\t\toutb( *(u8 *)&nl->csr1 | PR_RES, dev->base_addr + CSR1 );\n\t\tspin_unlock( &nl->lock );\n\t\tbreak;\n\n#ifdef CONFIG_SBNI_MULTILINE\n\n\tcase SIOCDEVENSLAVE :\n\t\tif( current->euid != 0 )\t/* root only */\n\t\t\treturn -EPERM;\n\n\t\tif (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name ))\n\t\t\treturn -EFAULT;\n\t\tslave_dev = dev_get_by_name(&init_net, slave_name );\n\t\tif( !slave_dev || !(slave_dev->flags & IFF_UP) ) {\n\t\t\tprintk( KERN_ERR \"%s: trying to enslave non-active \"\n\t\t\t\t\"device %s\\n\", dev->name, slave_name );\n\t\t\treturn -EPERM;\n\t\t}\n\n\t\treturn enslave( dev, slave_dev );\n\n\tcase SIOCDEVEMANSIPATE :\n\t\tif( current->euid != 0 )\t/* root only */\n\t\t\treturn -EPERM;\n\n\t\treturn emancipate( dev );\n\n#endif\t/* CONFIG_SBNI_MULTILINE */\n\n\tdefault :\n\t\treturn -EOPNOTSUPP;\n\t}\n\n\treturn error;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-214","original_id":"diversevul-214","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ninit_state(struct posix_acl_state *state, int cnt)\n{\n\tint alloc;\n\n\tmemset(state, 0, sizeof(struct posix_acl_state));\n\tstate->empty = 1;\n\t/*\n\t * In the worst case, each individual acl could be for a distinct\n\t * named user or group, but we don't no which, so we allocate\n\t * enough space for either:\n\t */\n\talloc = sizeof(struct posix_ace_state_array)\n\t\t+ cnt*sizeof(struct posix_ace_state);\n\tstate->users = kzalloc(alloc, GFP_KERNEL);\n\tif (!state->users)\n\t\treturn -ENOMEM;\n\tstate->groups = kzalloc(alloc, GFP_KERNEL);\n\tif (!state->groups) {\n\t\tkfree(state->users);\n\t\treturn -ENOMEM;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-215","original_id":"diversevul-215","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_icctxtdesc_input(jas_iccattrval_t *attrval, jas_stream_t *in,\n int cnt)\n{\n\tint n;\n\tint c;\n\tjas_icctxtdesc_t *txtdesc = &attrval->data.txtdesc;\n\ttxtdesc->ascdata = 0;\n\ttxtdesc->ucdata = 0;\n\tif (jas_iccgetuint32(in, &txtdesc->asclen))\n\t\tgoto error;\n\tif (!(txtdesc->ascdata = jas_malloc(txtdesc->asclen)))\n\t\tgoto error;\n\tif (jas_stream_read(in, txtdesc->ascdata, txtdesc->asclen) !=\n\t JAS_CAST(int, txtdesc->asclen))\n\t\tgoto error;\n\ttxtdesc->ascdata[txtdesc->asclen - 1] = '\\0';\n\tif (jas_iccgetuint32(in, &txtdesc->uclangcode) ||\n\t jas_iccgetuint32(in, &txtdesc->uclen))\n\t\tgoto error;\n\tif (!(txtdesc->ucdata = jas_malloc(txtdesc->uclen * 2)))\n\t\tgoto error;\n\tif (jas_stream_read(in, txtdesc->ucdata, txtdesc->uclen * 2) !=\n\t JAS_CAST(int, txtdesc->uclen * 2))\n\t\tgoto error;\n\tif (jas_iccgetuint16(in, &txtdesc->sccode))\n\t\tgoto error;\n\tif ((c = jas_stream_getc(in)) == EOF)\n\t\tgoto error;\n\ttxtdesc->maclen = c;\n\tif (jas_stream_read(in, txtdesc->macdata, 67) != 67)\n\t\tgoto error;\n\ttxtdesc->asclen = strlen(txtdesc->ascdata) + 1;\n#define WORKAROUND_BAD_PROFILES\n#ifdef WORKAROUND_BAD_PROFILES\n\tn = txtdesc->asclen + txtdesc->uclen * 2 + 15 + 67;\n\tif (n > cnt) {\n\t\treturn -1;\n\t}\n\tif (n < cnt) {\n\t\tif (jas_stream_gobble(in, cnt - n) != cnt - n)\n\t\t\tgoto error;\n\t}\n#else\n\tif (txtdesc->asclen + txtdesc->uclen * 2 + 15 + 67 != cnt)\n\t\treturn -1;\n#endif\n\treturn 0;\nerror:\n\tjas_icctxtdesc_destroy(attrval);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-216","original_id":"diversevul-216","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numcols, 1);\n\tjpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];\n\tjpc_fix_t *buf = splitbuf;\n\tregister jpc_fix_t *srcptr;\n\tregister jpc_fix_t *dstptr;\n\tregister int n;\n\tregister int m;\n\tint hstartcol;\n\n\t/* Get a buffer. */\n\tif (bufsize > QMFB_SPLITBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide in this case. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\tif (numcols >= 2) {\n\t\thstartcol = (numcols + 1 - parity) >> 1;\n\t\tm = (parity) ? hstartcol : (numcols - hstartcol);\n\t\t/* Save the samples destined for the highpass channel. */\n\t\tn = m;\n\t\tdstptr = buf;\n\t\tsrcptr = &a[1 - parity];\n\t\twhile (n-- > 0) {\n\t\t\t*dstptr = *srcptr;\n\t\t\t++dstptr;\n\t\t\tsrcptr += 2;\n\t\t}\n\t\t/* Copy the appropriate samples into the lowpass channel. */\n\t\tdstptr = &a[1 - parity];\n\t\tsrcptr = &a[2 - parity];\n\t\tn = numcols - m - (!parity);\n\t\twhile (n-- > 0) {\n\t\t\t*dstptr = *srcptr;\n\t\t\t++dstptr;\n\t\t\tsrcptr += 2;\n\t\t}\n\t\t/* Copy the saved samples into the highpass channel. */\n\t\tdstptr = &a[hstartcol];\n\t\tsrcptr = buf;\n\t\tn = m;\n\t\twhile (n-- > 0) {\n\t\t\t*dstptr = *srcptr;\n\t\t\t++dstptr;\n\t\t\t++srcptr;\n\t\t}\n\t}\n\n\t/* If the split buffer was allocated on the heap, free this memory. */\n\tif (buf != splitbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-217","original_id":"diversevul-217","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_image_growcmpts(jas_image_t *image, int maxcmpts)\n{\n\tjas_image_cmpt_t **newcmpts;\n\tint cmptno;\n\n\tnewcmpts = (!image->cmpts_) ? jas_malloc(maxcmpts * sizeof(jas_image_cmpt_t *)) :\n\t jas_realloc(image->cmpts_, maxcmpts * sizeof(jas_image_cmpt_t *));\n\tif (!newcmpts) {\n\t\treturn -1;\n\t}\n\timage->cmpts_ = newcmpts;\n\timage->maxcmpts_ = maxcmpts;\n\tfor (cmptno = image->numcmpts_; cmptno < image->maxcmpts_; ++cmptno) {\n\t\timage->cmpts_[cmptno] = 0;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-218","original_id":"diversevul-218","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_iccprof_gettagtab(jas_stream_t *in, jas_icctagtab_t *tagtab)\n{\n\tint i;\n\tjas_icctagtabent_t *tagtabent;\n\n\tif (tagtab->ents) {\n\t\tjas_free(tagtab->ents);\n\t\ttagtab->ents = 0;\n\t}\n\tif (jas_iccgetuint32(in, &tagtab->numents))\n\t\tgoto error;\n\tif (!(tagtab->ents = jas_malloc(tagtab->numents *\n\t sizeof(jas_icctagtabent_t))))\n\t\tgoto error;\n\ttagtabent = tagtab->ents;\n\tfor (i = 0; i < JAS_CAST(long, tagtab->numents); ++i) {\n\t\tif (jas_iccgetuint32(in, &tagtabent->tag) ||\n\t\tjas_iccgetuint32(in, &tagtabent->off) ||\n\t\tjas_iccgetuint32(in, &tagtabent->len))\n\t\t\tgoto error;\n\t\t++tagtabent;\n\t}\n\treturn 0;\nerror:\n\tif (tagtab->ents) {\n\t\tjas_free(tagtab->ents);\n\t\ttagtab->ents = 0;\n\t}\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-219","original_id":"diversevul-219","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jp2_cmap_getdata(jp2_box_t *box, jas_stream_t *in)\n{\n\tjp2_cmap_t *cmap = &box->data.cmap;\n\tjp2_cmapent_t *ent;\n\tunsigned int i;\n\n\tcmap->numchans = (box->datalen) / 4;\n\tif (!(cmap->ents = jas_malloc(cmap->numchans * sizeof(jp2_cmapent_t)))) {\n\t\treturn -1;\n\t}\n\tfor (i = 0; i < cmap->numchans; ++i) {\n\t\tent = &cmap->ents[i];\n\t\tif (jp2_getuint16(in, &ent->cmptno) ||\n\t\t jp2_getuint8(in, &ent->map) ||\n\t\t jp2_getuint8(in, &ent->pcol)) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-220","original_id":"diversevul-220","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\njpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in)\n{\n\tjpc_mqdec_t *mqdec;\n\n\t/* There must be at least one context. */\n\tassert(maxctxs > 0);\n\n\t/* Allocate memory for the MQ decoder. */\n\tif (!(mqdec = jas_malloc(sizeof(jpc_mqdec_t)))) {\n\t\tgoto error;\n\t}\n\tmqdec->in = in;\n\tmqdec->maxctxs = maxctxs;\n\t/* Allocate memory for the per-context state information. */\n\tif (!(mqdec->ctxs = jas_malloc(mqdec->maxctxs * sizeof(jpc_mqstate_t *)))) {\n\t\tgoto error;\n\t}\n\t/* Set the current context to the first context. */\n\tmqdec->curctx = mqdec->ctxs;\n\n\t/* If an input stream has been associated with the MQ decoder,\n\t initialize the decoder state from the stream. */\n\tif (mqdec->in) {\n\t\tjpc_mqdec_init(mqdec);\n\t}\n\t/* Initialize the per-context state information. */\n\tjpc_mqdec_setctxs(mqdec, 0, 0);\n\n\treturn mqdec;\n\nerror:\n\t/* Oops... Something has gone wrong. */\n\tif (mqdec) {\n\t\tjpc_mqdec_destroy(mqdec);\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-221","original_id":"diversevul-221","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic bmp_info_t *bmp_getinfo(jas_stream_t *in)\n{\n\tbmp_info_t *info;\n\tint i;\n\tbmp_palent_t *palent;\n\n\tif (!(info = bmp_info_create())) {\n\t\treturn 0;\n\t}\n\n\tif (bmp_getint32(in, &info->len) || info->len != 40 ||\n\t bmp_getint32(in, &info->width) || bmp_getint32(in, &info->height) ||\n\t bmp_getint16(in, &info->numplanes) ||\n\t bmp_getint16(in, &info->depth) || bmp_getint32(in, &info->enctype) ||\n\t bmp_getint32(in, &info->siz) ||\n\t bmp_getint32(in, &info->hres) || bmp_getint32(in, &info->vres) ||\n\t bmp_getint32(in, &info->numcolors) ||\n\t bmp_getint32(in, &info->mincolors)) {\n\t\tbmp_info_destroy(info);\n\t\treturn 0;\n\t}\n\n\tif (info->height < 0) {\n\t\tinfo->topdown = 1;\n\t\tinfo->height = -info->height;\n\t} else {\n\t\tinfo->topdown = 0;\n\t}\n\n\tif (info->width <= 0 || info->height <= 0 || info->numplanes <= 0 ||\n\t info->depth <= 0 || info->numcolors < 0 || info->mincolors < 0) {\n\t\tbmp_info_destroy(info);\n\t\treturn 0;\n\t}\n\n\tif (info->enctype != BMP_ENC_RGB) {\n\t\tjas_eprintf(\"unsupported BMP encoding\\n\");\n\t\tbmp_info_destroy(info);\n\t\treturn 0;\n\t}\n\n\tif (info->numcolors > 0) {\n\t\tif (!(info->palents = jas_malloc(info->numcolors *\n\t\t sizeof(bmp_palent_t)))) {\n\t\t\tbmp_info_destroy(info);\n\t\t\treturn 0;\n\t\t}\n\t} else {\n\t\tinfo->palents = 0;\n\t}\n\n\tfor (i = 0; i < info->numcolors; ++i) {\n\t\tpalent = &info->palents[i];\n\t\tif ((palent->blu = jas_stream_getc(in)) == EOF ||\n\t\t (palent->grn = jas_stream_getc(in)) == EOF ||\n\t\t (palent->red = jas_stream_getc(in)) == EOF ||\n\t\t (palent->res = jas_stream_getc(in)) == EOF) {\n\t\t\tbmp_info_destroy(info);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\treturn info;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-222","original_id":"diversevul-222","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid *jas_realloc(void *ptr, size_t size)\n{\n\treturn realloc(ptr, size);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-223","original_id":"diversevul-223","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_icclut8_input(jas_iccattrval_t *attrval, jas_stream_t *in,\n int cnt)\n{\n\tint i;\n\tint j;\n\tint clutsize;\n\tjas_icclut8_t *lut8 = &attrval->data.lut8;\n\tlut8->clut = 0;\n\tlut8->intabs = 0;\n\tlut8->intabsbuf = 0;\n\tlut8->outtabs = 0;\n\tlut8->outtabsbuf = 0;\n\tif (jas_iccgetuint8(in, &lut8->numinchans) ||\n\t jas_iccgetuint8(in, &lut8->numoutchans) ||\n\t jas_iccgetuint8(in, &lut8->clutlen) ||\n\t jas_stream_getc(in) == EOF)\n\t\tgoto error;\n\tfor (i = 0; i < 3; ++i) {\n\t\tfor (j = 0; j < 3; ++j) {\n\t\t\tif (jas_iccgetsint32(in, &lut8->e[i][j]))\n\t\t\t\tgoto error;\n\t\t}\n\t}\n\tif (jas_iccgetuint16(in, &lut8->numintabents) ||\n\t jas_iccgetuint16(in, &lut8->numouttabents))\n\t\tgoto error;\n\tclutsize = jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans;\n\tif (!(lut8->clut = jas_malloc(clutsize * sizeof(jas_iccuint8_t))) ||\n\t !(lut8->intabsbuf = jas_malloc(lut8->numinchans *\n\t lut8->numintabents * sizeof(jas_iccuint8_t))) ||\n\t !(lut8->intabs = jas_malloc(lut8->numinchans *\n\t sizeof(jas_iccuint8_t *))))\n\t\tgoto error;\n\tfor (i = 0; i < lut8->numinchans; ++i)\n\t\tlut8->intabs[i] = &lut8->intabsbuf[i * lut8->numintabents];\n\tif (!(lut8->outtabsbuf = jas_malloc(lut8->numoutchans *\n\t lut8->numouttabents * sizeof(jas_iccuint8_t))) ||\n\t !(lut8->outtabs = jas_malloc(lut8->numoutchans *\n\t sizeof(jas_iccuint8_t *))))\n\t\tgoto error;\n\tfor (i = 0; i < lut8->numoutchans; ++i)\n\t\tlut8->outtabs[i] = &lut8->outtabsbuf[i * lut8->numouttabents];\n\tfor (i = 0; i < lut8->numinchans; ++i) {\n\t\tfor (j = 0; j < JAS_CAST(int, lut8->numintabents); ++j) {\n\t\t\tif (jas_iccgetuint8(in, &lut8->intabs[i][j]))\n\t\t\t\tgoto error;\n\t\t}\n\t}\n\tfor (i = 0; i < lut8->numoutchans; ++i) {\n\t\tfor (j = 0; j < JAS_CAST(int, lut8->numouttabents); ++j) {\n\t\t\tif (jas_iccgetuint8(in, &lut8->outtabs[i][j]))\n\t\t\t\tgoto error;\n\t\t}\n\t}\n\tfor (i = 0; i < clutsize; ++i) {\n\t\tif (jas_iccgetuint8(in, &lut8->clut[i]))\n\t\t\tgoto error;\n\t}\n\tif (JAS_CAST(int, 44 + lut8->numinchans * lut8->numintabents +\n\t lut8->numoutchans * lut8->numouttabents +\n\t jas_iccpowi(lut8->clutlen, lut8->numinchans) * lut8->numoutchans) !=\n\t cnt)\n\t\tgoto error;\n\treturn 0;\nerror:\n\tjas_icclut8_destroy(attrval);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-224","original_id":"diversevul-224","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_split_colgrp(jpc_fix_t *a, int numrows, int stride,\n int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numrows, 1);\n\tjpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];\n\tjpc_fix_t *buf = splitbuf;\n\tjpc_fix_t *srcptr;\n\tjpc_fix_t *dstptr;\n\tregister jpc_fix_t *srcptr2;\n\tregister jpc_fix_t *dstptr2;\n\tregister int n;\n\tregister int i;\n\tint m;\n\tint hstartcol;\n\n\t/* Get a buffer. */\n\tif (bufsize > QMFB_SPLITBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide in this case. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\tif (numrows >= 2) {\n\t\thstartcol = (numrows + 1 - parity) >> 1;\n\t\tm = (parity) ? hstartcol : (numrows - hstartcol);\n\t\t/* Save the samples destined for the highpass channel. */\n\t\tn = m;\n\t\tdstptr = buf;\n\t\tsrcptr = &a[(1 - parity) * stride];\n\t\twhile (n-- > 0) {\n\t\t\tdstptr2 = dstptr;\n\t\t\tsrcptr2 = srcptr;\n\t\t\tfor (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) {\n\t\t\t\t*dstptr2 = *srcptr2;\n\t\t\t\t++dstptr2;\n\t\t\t\t++srcptr2;\n\t\t\t}\n\t\t\tdstptr += JPC_QMFB_COLGRPSIZE;\n\t\t\tsrcptr += stride << 1;\n\t\t}\n\t\t/* Copy the appropriate samples into the lowpass channel. */\n\t\tdstptr = &a[(1 - parity) * stride];\n\t\tsrcptr = &a[(2 - parity) * stride];\n\t\tn = numrows - m - (!parity);\n\t\twhile (n-- > 0) {\n\t\t\tdstptr2 = dstptr;\n\t\t\tsrcptr2 = srcptr;\n\t\t\tfor (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) {\n\t\t\t\t*dstptr2 = *srcptr2;\n\t\t\t\t++dstptr2;\n\t\t\t\t++srcptr2;\n\t\t\t}\n\t\t\tdstptr += stride;\n\t\t\tsrcptr += stride << 1;\n\t\t}\n\t\t/* Copy the saved samples into the highpass channel. */\n\t\tdstptr = &a[hstartcol * stride];\n\t\tsrcptr = buf;\n\t\tn = m;\n\t\twhile (n-- > 0) {\n\t\t\tdstptr2 = dstptr;\n\t\t\tsrcptr2 = srcptr;\n\t\t\tfor (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) {\n\t\t\t\t*dstptr2 = *srcptr2;\n\t\t\t\t++dstptr2;\n\t\t\t\t++srcptr2;\n\t\t\t}\n\t\t\tdstptr += stride;\n\t\t\tsrcptr += JPC_QMFB_COLGRPSIZE;\n\t\t}\n\t}\n\n\t/* If the split buffer was allocated on the heap, free this memory. */\n\tif (buf != splitbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-225","original_id":"diversevul-225","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_cmshapmatlut_set(jas_cmshapmatlut_t *lut, jas_icccurv_t *curv)\n{\n\tjas_cmreal_t gamma;\n\tint i;\n\tgamma = 0;\n\tjas_cmshapmatlut_cleanup(lut);\n\tif (curv->numents == 0) {\n\t\tlut->size = 2;\n\t\tif (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))\n\t\t\tgoto error;\n\t\tlut->data[0] = 0.0;\n\t\tlut->data[1] = 1.0;\n\t} else if (curv->numents == 1) {\n\t\tlut->size = 256;\n\t\tif (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))\n\t\t\tgoto error;\n\t\tgamma = curv->ents[0] / 256.0;\n\t\tfor (i = 0; i < lut->size; ++i) {\n\t\t\tlut->data[i] = gammafn(i / (double) (lut->size - 1), gamma);\n\t\t}\n\t} else {\n\t\tlut->size = curv->numents;\n\t\tif (!(lut->data = jas_malloc(lut->size * sizeof(jas_cmreal_t))))\n\t\t\tgoto error;\n\t\tfor (i = 0; i < lut->size; ++i) {\n\t\t\tlut->data[i] = curv->ents[i] / 65535.0;\n\t\t}\n\t}\n\treturn 0;\nerror:\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-226","original_id":"diversevul-226","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int mem_resize(jas_stream_memobj_t *m, int bufsize)\n{\n\tunsigned char *buf;\n\n\tassert(m->buf_);\n\tif (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) {\n\t\treturn -1;\n\t}\n\tm->buf_ = buf;\n\tm->bufsize_ = bufsize;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-227","original_id":"diversevul-227","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jp2_colr_getdata(jp2_box_t *box, jas_stream_t *in)\n{\n\tjp2_colr_t *colr = &box->data.colr;\n\tcolr->csid = 0;\n\tcolr->iccp = 0;\n\tcolr->iccplen = 0;\n\n\tif (jp2_getuint8(in, &colr->method) || jp2_getuint8(in, &colr->pri) ||\n\t jp2_getuint8(in, &colr->approx)) {\n\t\treturn -1;\n\t}\n\tswitch (colr->method) {\n\tcase JP2_COLR_ENUM:\n\t\tif (jp2_getuint32(in, &colr->csid)) {\n\t\t\treturn -1;\n\t\t}\n\t\tbreak;\n\tcase JP2_COLR_ICC:\n\t\tcolr->iccplen = box->datalen - 3;\n\t\tif (!(colr->iccp = jas_malloc(colr->iccplen * sizeof(uint_fast8_t)))) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (jas_stream_read(in, colr->iccp, colr->iccplen) != colr->iccplen) {\n\t\t\treturn -1;\n\t\t}\n\t\tbreak;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-228","original_id":"diversevul-228","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\njpc_mqenc_t *jpc_mqenc_create(int maxctxs, jas_stream_t *out)\n{\n\tjpc_mqenc_t *mqenc;\n\n\t/* Allocate memory for the MQ encoder. */\n\tif (!(mqenc = jas_malloc(sizeof(jpc_mqenc_t)))) {\n\t\tgoto error;\n\t}\n\tmqenc->out = out;\n\tmqenc->maxctxs = maxctxs;\n\n\t/* Allocate memory for the per-context state information. */\n\tif (!(mqenc->ctxs = jas_malloc(mqenc->maxctxs * sizeof(jpc_mqstate_t *)))) {\n\t\tgoto error;\n\t}\n\n\t/* Set the current context to the first one. */\n\tmqenc->curctx = mqenc->ctxs;\n\n\tjpc_mqenc_init(mqenc);\n\n\t/* Initialize the per-context state information to something sane. */\n\tjpc_mqenc_setctxs(mqenc, 0, 0);\n\n\treturn mqenc;\n\nerror:\n\tif (mqenc) {\n\t\tjpc_mqenc_destroy(mqenc);\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-229","original_id":"diversevul-229","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid *jas_malloc(size_t size)\n{\n#if defined(MEMALLOC_ALIGN2)\n\tvoid *ptr;\nabort();\n\tif (posix_memalign(&ptr, MEMALLOC_ALIGNMENT, size)) {\n\t\treturn 0;\n\t}\n\treturn ptr;\n#endif\n\treturn malloc(size);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-230","original_id":"diversevul-230","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint jpc_atoaf(char *s, int *numvalues, double **values)\n{\n\tstatic char delim[] = \", \\t\\n\";\n\tchar buf[4096];\n\tint n;\n\tdouble *vs;\n\tchar *cp;\n\n\tstrncpy(buf, s, sizeof(buf));\n\tbuf[sizeof(buf) - 1] = '\\0';\n\tn = 0;\n\tif ((cp = strtok(buf, delim))) {\n\t\t++n;\n\t\twhile ((cp = strtok(0, delim))) {\n\t\t\tif (cp != '\\0') {\n\t\t\t\t++n;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (n) {\n\t\tif (!(vs = jas_malloc(n * sizeof(double)))) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tstrncpy(buf, s, sizeof(buf));\n\t\tbuf[sizeof(buf) - 1] = '\\0';\n\t\tn = 0;\n\t\tif ((cp = strtok(buf, delim))) {\n\t\t\tvs[n] = atof(cp);\n\t\t\t++n;\n\t\t\twhile ((cp = strtok(0, delim))) {\n\t\t\t\tif (cp != '\\0') {\n\t\t\t\t\tvs[n] = atof(cp);\n\t\t\t\t\t++n;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tvs = 0;\n\t}\n\n\t*numvalues = n;\n\t*values = vs;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-231","original_id":"diversevul-231","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_join_colres(jpc_fix_t *a, int numrows, int numcols,\n int stride, int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numrows, 1);\n\tjpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];\n\tjpc_fix_t *buf = joinbuf;\n\tjpc_fix_t *srcptr;\n\tjpc_fix_t *dstptr;\n\tregister jpc_fix_t *srcptr2;\n\tregister jpc_fix_t *dstptr2;\n\tregister int n;\n\tregister int i;\n\tint hstartcol;\n\n\t/* Allocate memory for the join buffer from the heap. */\n\tif (bufsize > QMFB_JOINBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * numcols * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\thstartcol = (numrows + 1 - parity) >> 1;\n\n\t/* Save the samples from the lowpass channel. */\n\tn = hstartcol;\n\tsrcptr = &a[0];\n\tdstptr = buf;\n\twhile (n-- > 0) {\n\t\tdstptr2 = dstptr;\n\t\tsrcptr2 = srcptr;\n\t\tfor (i = 0; i < numcols; ++i) {\n\t\t\t*dstptr2 = *srcptr2;\n\t\t\t++dstptr2;\n\t\t\t++srcptr2;\n\t\t}\n\t\tsrcptr += stride;\n\t\tdstptr += numcols;\n\t}\n\t/* Copy the samples from the highpass channel into place. */\n\tsrcptr = &a[hstartcol * stride];\n\tdstptr = &a[(1 - parity) * stride];\n\tn = numrows - hstartcol;\n\twhile (n-- > 0) {\n\t\tdstptr2 = dstptr;\n\t\tsrcptr2 = srcptr;\n\t\tfor (i = 0; i < numcols; ++i) {\n\t\t\t*dstptr2 = *srcptr2;\n\t\t\t++dstptr2;\n\t\t\t++srcptr2;\n\t\t}\n\t\tdstptr += 2 * stride;\n\t\tsrcptr += stride;\n\t}\n\t/* Copy the samples from the lowpass channel into place. */\n\tsrcptr = buf;\n\tdstptr = &a[parity * stride];\n\tn = hstartcol;\n\twhile (n-- > 0) {\n\t\tdstptr2 = dstptr;\n\t\tsrcptr2 = srcptr;\n\t\tfor (i = 0; i < numcols; ++i) {\n\t\t\t*dstptr2 = *srcptr2;\n\t\t\t++dstptr2;\n\t\t\t++srcptr2;\n\t\t}\n\t\tdstptr += 2 * stride;\n\t\tsrcptr += numcols;\n\t}\n\n\t/* If the join buffer was allocated on the heap, free this memory. */\n\tif (buf != joinbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-232","original_id":"diversevul-232","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int mif_hdr_growcmpts(mif_hdr_t *hdr, int maxcmpts)\n{\n\tint cmptno;\n\tmif_cmpt_t **newcmpts;\n\tassert(maxcmpts >= hdr->numcmpts);\n\tnewcmpts = (!hdr->cmpts) ? jas_malloc(maxcmpts * sizeof(mif_cmpt_t *)) :\n\t jas_realloc(hdr->cmpts, maxcmpts * sizeof(mif_cmpt_t *));\n\tif (!newcmpts) {\n\t\treturn -1;\n\t}\n\thdr->maxcmpts = maxcmpts;\n\thdr->cmpts = newcmpts;\n\tfor (cmptno = hdr->numcmpts; cmptno < hdr->maxcmpts; ++cmptno) {\n\t\thdr->cmpts[cmptno] = 0;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-233","original_id":"diversevul-233","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_icccurv_input(jas_iccattrval_t *attrval, jas_stream_t *in,\n int cnt)\n{\n\tjas_icccurv_t *curv = &attrval->data.curv;\n\tunsigned int i;\n\n\tcurv->numents = 0;\n\tcurv->ents = 0;\n\n\tif (jas_iccgetuint32(in, &curv->numents))\n\t\tgoto error;\n\tif (!(curv->ents = jas_malloc(curv->numents * sizeof(jas_iccuint16_t))))\n\t\tgoto error;\n\tfor (i = 0; i < curv->numents; ++i) {\n\t\tif (jas_iccgetuint16(in, &curv->ents[i]))\n\t\t\tgoto error;\n\t}\n\n\tif (JAS_CAST(int, 4 + 2 * curv->numents) != cnt)\n\t\tgoto error;\n\treturn 0;\n\nerror:\n\tjas_icccurv_destroy(attrval);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-234","original_id":"diversevul-234","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate,\n jas_stream_t *in, uint_fast16_t len)\n{\n\tuint_fast8_t tmp;\n\tint n;\n\tint i;\n\n\t/* Eliminate compiler warning about unused variables. */\n\tcstate = 0;\n\n\tn = 0;\n\tif (jpc_getuint8(in, &tmp)) {\n\t\treturn -1;\n\t}\n\t++n;\n\tcompparms->qntsty = tmp & 0x1f;\n\tcompparms->numguard = (tmp >> 5) & 7;\n\tswitch (compparms->qntsty) {\n\tcase JPC_QCX_SIQNT:\n\t\tcompparms->numstepsizes = 1;\n\t\tbreak;\n\tcase JPC_QCX_NOQNT:\n\t\tcompparms->numstepsizes = (len - n);\n\t\tbreak;\n\tcase JPC_QCX_SEQNT:\n\t\t/* XXX - this is a hack */\n\t\tcompparms->numstepsizes = (len - n) / 2;\n\t\tbreak;\n\t}\n\tif (compparms->numstepsizes > 0) {\n\t\tcompparms->stepsizes = jas_malloc(compparms->numstepsizes *\n\t\t sizeof(uint_fast16_t));\n\t\tassert(compparms->stepsizes);\n\t\tfor (i = 0; i < compparms->numstepsizes; ++i) {\n\t\t\tif (compparms->qntsty == JPC_QCX_NOQNT) {\n\t\t\t\tif (jpc_getuint8(in, &tmp)) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\tcompparms->stepsizes[i] = JPC_QCX_EXPN(tmp >> 3);\n\t\t\t} else {\n\t\t\t\tif (jpc_getuint16(in, &compparms->stepsizes[i])) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tcompparms->stepsizes = 0;\n\t}\n\tif (jas_stream_error(in) || jas_stream_eof(in)) {\n\t\tjpc_qcx_destroycompparms(compparms);\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-235","original_id":"diversevul-235","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_split_col(jpc_fix_t *a, int numrows, int stride,\n int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numrows, 1);\n\tjpc_fix_t splitbuf[QMFB_SPLITBUFSIZE];\n\tjpc_fix_t *buf = splitbuf;\n\tregister jpc_fix_t *srcptr;\n\tregister jpc_fix_t *dstptr;\n\tregister int n;\n\tregister int m;\n\tint hstartcol;\n\n\t/* Get a buffer. */\n\tif (bufsize > QMFB_SPLITBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide in this case. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\tif (numrows >= 2) {\n\t\thstartcol = (numrows + 1 - parity) >> 1;\n\t\tm = (parity) ? hstartcol : (numrows - hstartcol);\n\t\t/* Save the samples destined for the highpass channel. */\n\t\tn = m;\n\t\tdstptr = buf;\n\t\tsrcptr = &a[(1 - parity) * stride];\n\t\twhile (n-- > 0) {\n\t\t\t*dstptr = *srcptr;\n\t\t\t++dstptr;\n\t\t\tsrcptr += stride << 1;\n\t\t}\n\t\t/* Copy the appropriate samples into the lowpass channel. */\n\t\tdstptr = &a[(1 - parity) * stride];\n\t\tsrcptr = &a[(2 - parity) * stride];\n\t\tn = numrows - m - (!parity);\n\t\twhile (n-- > 0) {\n\t\t\t*dstptr = *srcptr;\n\t\t\tdstptr += stride;\n\t\t\tsrcptr += stride << 1;\n\t\t}\n\t\t/* Copy the saved samples into the highpass channel. */\n\t\tdstptr = &a[hstartcol * stride];\n\t\tsrcptr = buf;\n\t\tn = m;\n\t\twhile (n-- > 0) {\n\t\t\t*dstptr = *srcptr;\n\t\t\tdstptr += stride;\n\t\t\t++srcptr;\n\t\t}\n\t}\n\n\t/* If the split buffer was allocated on the heap, free this memory. */\n\tif (buf != splitbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-236","original_id":"diversevul-236","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0,\n int r1, int c1)\n{\n\tint i;\n\n\tif (mat0->data_) {\n\t\tif (!(mat0->flags_ & JAS_MATRIX_REF)) {\n\t\t\tjas_free(mat0->data_);\n\t\t}\n\t\tmat0->data_ = 0;\n\t\tmat0->datasize_ = 0;\n\t}\n\tif (mat0->rows_) {\n\t\tjas_free(mat0->rows_);\n\t\tmat0->rows_ = 0;\n\t}\n\tmat0->flags_ |= JAS_MATRIX_REF;\n\tmat0->numrows_ = r1 - r0 + 1;\n\tmat0->numcols_ = c1 - c0 + 1;\n\tmat0->maxrows_ = mat0->numrows_;\n\tmat0->rows_ = jas_malloc(mat0->maxrows_ * sizeof(jas_seqent_t *));\n\tfor (i = 0; i < mat0->numrows_; ++i) {\n\t\tmat0->rows_[i] = mat1->rows_[r0 + i] + c0;\n\t}\n\n\tmat0->xstart_ = mat1->xstart_ + c0;\n\tmat0->ystart_ = mat1->ystart_ + r0;\n\tmat0->xend_ = mat0->xstart_ + mat0->numcols_;\n\tmat0->yend_ = mat0->ystart_ + mat0->numrows_;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-237","original_id":"diversevul-237","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_cmpxformseq_resize(jas_cmpxformseq_t *pxformseq, int n)\n{\n\tjas_cmpxform_t **p;\n\tassert(n >= pxformseq->numpxforms);\n\tp = (!pxformseq->pxforms) ? jas_malloc(n * sizeof(jas_cmpxform_t *)) :\n\t jas_realloc(pxformseq->pxforms, n * sizeof(jas_cmpxform_t *));\n\tif (!p) {\n\t\treturn -1;\n\t}\n\tpxformseq->pxforms = p;\n\tpxformseq->maxpxforms = n;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-238","original_id":"diversevul-238","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_ppt_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in)\n{\n\tjpc_ppt_t *ppt = &ms->parms.ppt;\n\n\t/* Eliminate compiler warning about unused variables. */\n\tcstate = 0;\n\n\tppt->data = 0;\n\n\tif (ms->len < 1) {\n\t\tgoto error;\n\t}\n\tif (jpc_getuint8(in, &ppt->ind)) {\n\t\tgoto error;\n\t}\n\tppt->len = ms->len - 1;\n\tif (ppt->len > 0) {\n\t\tif (!(ppt->data = jas_malloc(ppt->len * sizeof(unsigned char)))) {\n\t\t\tgoto error;\n\t\t}\n\t\tif (jas_stream_read(in, (char *) ppt->data, ppt->len) != JAS_CAST(int, ppt->len)) {\n\t\t\tgoto error;\n\t\t}\n\t} else {\n\t\tppt->data = 0;\n\t}\n\treturn 0;\n\nerror:\n\tjpc_ppt_destroyparms(ms);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-239","original_id":"diversevul-239","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\njas_image_t *jas_image_create(int numcmpts, jas_image_cmptparm_t *cmptparms,\n int clrspc)\n{\n\tjas_image_t *image;\n\tuint_fast32_t rawsize;\n\tuint_fast32_t inmem;\n\tint cmptno;\n\tjas_image_cmptparm_t *cmptparm;\n\n\tif (!(image = jas_image_create0())) {\n\t\treturn 0;\n\t}\n\n\timage->clrspc_ = clrspc;\n\timage->maxcmpts_ = numcmpts;\n\timage->inmem_ = true;\n\n\t/* Allocate memory for the per-component information. */\n\tif (!(image->cmpts_ = jas_malloc(image->maxcmpts_ *\n\t sizeof(jas_image_cmpt_t *)))) {\n\t\tjas_image_destroy(image);\n\t\treturn 0;\n\t}\n\t/* Initialize in case of failure. */\n\tfor (cmptno = 0; cmptno < image->maxcmpts_; ++cmptno) {\n\t\timage->cmpts_[cmptno] = 0;\n\t}\n\n\t/* Compute the approximate raw size of the image. */\n\trawsize = 0;\n\tfor (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,\n\t ++cmptparm) {\n\t\trawsize += cmptparm->width * cmptparm->height *\n\t\t (cmptparm->prec + 7) / 8;\n\t}\n\t/* Decide whether to buffer the image data in memory, based on the\n\t raw size of the image. */\n\tinmem = (rawsize < JAS_IMAGE_INMEMTHRESH);\n\n\t/* Create the individual image components. */\n\tfor (cmptno = 0, cmptparm = cmptparms; cmptno < numcmpts; ++cmptno,\n\t ++cmptparm) {\n\t\tif (!(image->cmpts_[cmptno] = jas_image_cmpt_create(cmptparm->tlx,\n\t\t cmptparm->tly, cmptparm->hstep, cmptparm->vstep,\n\t\t cmptparm->width, cmptparm->height, cmptparm->prec,\n\t\t cmptparm->sgnd, inmem))) {\n\t\t\tjas_image_destroy(image);\n\t\t\treturn 0;\n\t\t}\n\t\t++image->numcmpts_;\n\t}\n\n\t/* Determine the bounding box for all of the components on the\n\t reference grid (i.e., the image area) */\n\tjas_image_setbbox(image);\n\n\treturn image;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-240","original_id":"diversevul-240","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_ppm_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in)\n{\n\tjpc_ppm_t *ppm = &ms->parms.ppm;\n\n\t/* Eliminate compiler warning about unused variables. */\n\tcstate = 0;\n\n\tppm->data = 0;\n\n\tif (ms->len < 1) {\n\t\tgoto error;\n\t}\n\tif (jpc_getuint8(in, &ppm->ind)) {\n\t\tgoto error;\n\t}\n\n\tppm->len = ms->len - 1;\n\tif (ppm->len > 0) {\n\t\tif (!(ppm->data = jas_malloc(ppm->len * sizeof(unsigned char)))) {\n\t\t\tgoto error;\n\t\t}\n\t\tif (JAS_CAST(uint, jas_stream_read(in, ppm->data, ppm->len)) != ppm->len) {\n\t\t\tgoto error;\n\t\t}\n\t} else {\n\t\tppm->data = 0;\n\t}\n\treturn 0;\n\nerror:\n\tjpc_ppm_destroyparms(ms);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-241","original_id":"diversevul-241","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_poc_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in)\n{\n\tjpc_poc_t *poc = &ms->parms.poc;\n\tjpc_pocpchg_t *pchg;\n\tint pchgno;\n\tuint_fast8_t tmp;\n\tpoc->numpchgs = (cstate->numcomps > 256) ? (ms->len / 9) :\n\t (ms->len / 7);\n\tif (!(poc->pchgs = jas_malloc(poc->numpchgs * sizeof(jpc_pocpchg_t)))) {\n\t\tgoto error;\n\t}\n\tfor (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs; ++pchgno,\n\t ++pchg) {\n\t\tif (jpc_getuint8(in, &pchg->rlvlnostart)) {\n\t\t\tgoto error;\n\t\t}\n\t\tif (cstate->numcomps > 256) {\n\t\t\tif (jpc_getuint16(in, &pchg->compnostart)) {\n\t\t\t\tgoto error;\n\t\t\t}\n\t\t} else {\n\t\t\tif (jpc_getuint8(in, &tmp)) {\n\t\t\t\tgoto error;\n\t\t\t};\n\t\t\tpchg->compnostart = tmp;\n\t\t}\n\t\tif (jpc_getuint16(in, &pchg->lyrnoend) ||\n\t\t jpc_getuint8(in, &pchg->rlvlnoend)) {\n\t\t\tgoto error;\n\t\t}\n\t\tif (cstate->numcomps > 256) {\n\t\t\tif (jpc_getuint16(in, &pchg->compnoend)) {\n\t\t\t\tgoto error;\n\t\t\t}\n\t\t} else {\n\t\t\tif (jpc_getuint8(in, &tmp)) {\n\t\t\t\tgoto error;\n\t\t\t}\n\t\t\tpchg->compnoend = tmp;\n\t\t}\n\t\tif (jpc_getuint8(in, &pchg->prgord)) {\n\t\t\tgoto error;\n\t\t}\n\t\tif (pchg->rlvlnostart > pchg->rlvlnoend ||\n\t\t pchg->compnostart > pchg->compnoend) {\n\t\t\tgoto error;\n\t\t}\n\t}\n\treturn 0;\n\nerror:\n\tjpc_poc_destroyparms(ms);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-242","original_id":"diversevul-242","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\njpc_streamlist_t *jpc_streamlist_create()\n{\n\tjpc_streamlist_t *streamlist;\n\tint i;\n\n\tif (!(streamlist = jas_malloc(sizeof(jpc_streamlist_t)))) {\n\t\treturn 0;\n\t}\n\tstreamlist->numstreams = 0;\n\tstreamlist->maxstreams = 100;\n\tif (!(streamlist->streams = jas_malloc(streamlist->maxstreams *\n\t sizeof(jas_stream_t *)))) {\n\t\tjas_free(streamlist);\n\t\treturn 0;\n\t}\n\tfor (i = 0; i < streamlist->maxstreams; ++i) {\n\t\tstreamlist->streams[i] = 0;\n\t}\n\treturn streamlist;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-243","original_id":"diversevul-243","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic jpc_enc_band_t *band_create(jpc_enc_band_t *band, jpc_enc_cp_t *cp,\n jpc_enc_rlvl_t *rlvl, jpc_tsfb_band_t *bandinfos)\n{\n\tuint_fast16_t bandno;\n\tuint_fast16_t gblbandno;\n\tuint_fast16_t rlvlno;\n\tjpc_tsfb_band_t *bandinfo;\n\tjpc_enc_tcmpt_t *tcmpt;\n\tuint_fast32_t prcno;\n\tjpc_enc_prc_t *prc;\n\n\ttcmpt = rlvl->tcmpt;\n\tband->data = 0;\n\tband->prcs = 0;\n\tband->rlvl = rlvl;\n\n\t/* Deduce the resolution level and band number. */\n\trlvlno = rlvl - rlvl->tcmpt->rlvls;\n\tbandno = band - rlvl->bands;\n\tgblbandno = (!rlvlno) ? 0 : (3 * (rlvlno - 1) + bandno + 1);\n\n\tbandinfo = &bandinfos[gblbandno];\n\nif (bandinfo->xstart != bandinfo->xend && bandinfo->ystart != bandinfo->yend) {\n\tif (!(band->data = jas_seq2d_create(0, 0, 0, 0))) {\n\t\tgoto error;\n\t}\n\tjas_seq2d_bindsub(band->data, tcmpt->data, bandinfo->locxstart,\n\t bandinfo->locystart, bandinfo->locxend, bandinfo->locyend);\n\tjas_seq2d_setshift(band->data, bandinfo->xstart, bandinfo->ystart);\n}\n\tband->orient = bandinfo->orient;\n\tband->analgain = JPC_NOMINALGAIN(cp->tccp.qmfbid, tcmpt->numrlvls, rlvlno,\n\t band->orient);\n\tband->numbps = 0;\n\tband->absstepsize = 0;\n\tband->stepsize = 0;\n\tband->synweight = bandinfo->synenergywt;\n\nif (band->data) {\n\tif (!(band->prcs = jas_malloc(rlvl->numprcs * sizeof(jpc_enc_prc_t)))) {\n\t\tgoto error;\n\t}\n\tfor (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno,\n\t ++prc) {\n\t\tprc->cblks = 0;\n\t\tprc->incltree = 0;\n\t\tprc->nlibtree = 0;\n\t\tprc->savincltree = 0;\n\t\tprc->savnlibtree = 0;\n\t\tprc->band = band;\n\t}\n\tfor (prcno = 0, prc = band->prcs; prcno < rlvl->numprcs; ++prcno,\n\t ++prc) {\n\t\tif (!prc_create(prc, cp, band)) {\n\t\t\tgoto error;\n\t\t}\n\t}\n}\n\n\treturn band;\n\nerror:\n\tband_destroy(band);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-244","original_id":"diversevul-244","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_cmshapmatlut_invert(jas_cmshapmatlut_t *invlut,\n jas_cmshapmatlut_t *lut, int n)\n{\n\tint i;\n\tint j;\n\tint k;\n\tjas_cmreal_t ax;\n\tjas_cmreal_t ay;\n\tjas_cmreal_t bx;\n\tjas_cmreal_t by;\n\tjas_cmreal_t sx;\n\tjas_cmreal_t sy;\n\tassert(n >= 2);\n\tif (invlut->data) {\n\t\tjas_free(invlut->data);\n\t\tinvlut->data = 0;\n\t}\n\t/* The sample values should be nondecreasing. */\n\tfor (i = 1; i < lut->size; ++i) {\n\t\tif (lut->data[i - 1] > lut->data[i]) {\n\t\t\tassert(0);\n\t\t\treturn -1;\n\t\t}\n\t}\n\tif (!(invlut->data = jas_malloc(n * sizeof(jas_cmreal_t))))\n\t\treturn -1;\n\tinvlut->size = n;\n\tfor (i = 0; i < invlut->size; ++i) {\n\t\tsy = ((double) i) / (invlut->size - 1);\n\t\tsx = 1.0;\n\t\tfor (j = 0; j < lut->size; ++j) {\n\t\t\tay = lut->data[j];\n\t\t\tif (sy == ay) {\n\t\t\t\tfor (k = j + 1; k < lut->size; ++k) {\n\t\t\t\t\tby = lut->data[k];\n\t\t\t\t\tif (by != sy)\n\t\t\t\t\t\tbreak;\n#if 0\nassert(0);\n#endif\n\t\t\t\t}\n\t\t\t\tif (k < lut->size) {\n\t\t\t\t\t--k;\n\t\t\t\t\tax = ((double) j) / (lut->size - 1);\n\t\t\t\t\tbx = ((double) k) / (lut->size - 1);\n\t\t\t\t\tsx = (ax + bx) / 2.0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (j < lut->size - 1) {\n\t\t\t\tby = lut->data[j + 1];\n\t\t\t\tif (sy > ay && sy < by) {\n\t\t\t\t\tax = ((double) j) / (lut->size - 1);\n\t\t\t\t\tbx = ((double) j + 1) / (lut->size - 1);\n\t\t\t\t\tsx = ax +\n\t\t\t\t\t (sy - ay) / (by - ay) * (bx - ax);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinvlut->data[i] = sx;\n\t}\n#if 0\nfor (i=0;i<lut->size;++i)\n\tjas_eprintf(\"lut[%d]=%f \", i, lut->data[i]);\nfor (i=0;i<invlut->size;++i)\n\tjas_eprintf(\"invlut[%d]=%f \", i, invlut->data[i]);\n#endif\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-245","original_id":"diversevul-245","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_crg_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in)\n{\n\tjpc_crg_t *crg = &ms->parms.crg;\n\tjpc_crgcomp_t *comp;\n\tuint_fast16_t compno;\n\tcrg->numcomps = cstate->numcomps;\n\tif (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) {\n\t\treturn -1;\n\t}\n\tfor (compno = 0, comp = crg->comps; compno < cstate->numcomps;\n\t ++compno, ++comp) {\n\t\tif (jpc_getuint16(in, &comp->hoff) ||\n\t\t jpc_getuint16(in, &comp->voff)) {\n\t\t\tjpc_crg_destroyparms(ms);\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-246","original_id":"diversevul-246","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numcols, 1);\n\tjpc_fix_t joinbuf[QMFB_JOINBUFSIZE];\n\tjpc_fix_t *buf = joinbuf;\n\tregister jpc_fix_t *srcptr;\n\tregister jpc_fix_t *dstptr;\n\tregister int n;\n\tint hstartcol;\n\n\t/* Allocate memory for the join buffer from the heap. */\n\tif (bufsize > QMFB_JOINBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\thstartcol = (numcols + 1 - parity) >> 1;\n\n\t/* Save the samples from the lowpass channel. */\n\tn = hstartcol;\n\tsrcptr = &a[0];\n\tdstptr = buf;\n\twhile (n-- > 0) {\n\t\t*dstptr = *srcptr;\n\t\t++srcptr;\n\t\t++dstptr;\n\t}\n\t/* Copy the samples from the highpass channel into place. */\n\tsrcptr = &a[hstartcol];\n\tdstptr = &a[1 - parity];\n\tn = numcols - hstartcol;\n\twhile (n-- > 0) {\n\t\t*dstptr = *srcptr;\n\t\tdstptr += 2;\n\t\t++srcptr;\n\t}\n\t/* Copy the samples from the lowpass channel into place. */\n\tsrcptr = buf;\n\tdstptr = &a[parity];\n\tn = hstartcol;\n\twhile (n-- > 0) {\n\t\t*dstptr = *srcptr;\n\t\tdstptr += 2;\n\t\t++srcptr;\n\t}\n\n\t/* If the join buffer was allocated on the heap, free this memory. */\n\tif (buf != joinbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-247","original_id":"diversevul-247","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint jpc_streamlist_insert(jpc_streamlist_t *streamlist, int streamno,\n jas_stream_t *stream)\n{\n\tjas_stream_t **newstreams;\n\tint newmaxstreams;\n\tint i;\n\t/* Grow the array of streams if necessary. */\n\tif (streamlist->numstreams >= streamlist->maxstreams) {\n\t\tnewmaxstreams = streamlist->maxstreams + 1024;\n\t\tif (!(newstreams = jas_realloc(streamlist->streams,\n\t\t (newmaxstreams + 1024) * sizeof(jas_stream_t *)))) {\n\t\t\treturn -1;\n\t\t}\n\t\tfor (i = streamlist->numstreams; i < streamlist->maxstreams; ++i) {\n\t\t\tstreamlist->streams[i] = 0;\n\t\t}\n\t\tstreamlist->maxstreams = newmaxstreams;\n\t\tstreamlist->streams = newstreams;\n\t}\n\tif (streamno != streamlist->numstreams) {\n\t\t/* Can only handle insertion at start of list. */\n\t\treturn -1;\n\t}\n\tstreamlist->streams[streamno] = stream;\n\t++streamlist->numstreams;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-248","original_id":"diversevul-248","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\njpc_tagtree_t *jpc_tagtree_create(int numleafsh, int numleafsv)\n{\n\tint nplh[JPC_TAGTREE_MAXDEPTH];\n\tint nplv[JPC_TAGTREE_MAXDEPTH];\n\tjpc_tagtreenode_t *node;\n\tjpc_tagtreenode_t *parentnode;\n\tjpc_tagtreenode_t *parentnode0;\n\tjpc_tagtree_t *tree;\n\tint i;\n\tint j;\n\tint k;\n\tint numlvls;\n\tint n;\n\n\tassert(numleafsh > 0 && numleafsv > 0);\n\n\tif (!(tree = jpc_tagtree_alloc())) {\n\t\treturn 0;\n\t}\n\ttree->numleafsh_ = numleafsh;\n\ttree->numleafsv_ = numleafsv;\n\n\tnumlvls = 0;\n\tnplh[0] = numleafsh;\n\tnplv[0] = numleafsv;\n\tdo {\n\t\tn = nplh[numlvls] * nplv[numlvls];\n\t\tnplh[numlvls + 1] = (nplh[numlvls] + 1) / 2;\n\t\tnplv[numlvls + 1] = (nplv[numlvls] + 1) / 2;\n\t\ttree->numnodes_ += n;\n\t\t++numlvls;\n\t} while (n > 1);\n\n\tif (!(tree->nodes_ = jas_malloc(tree->numnodes_ * sizeof(jpc_tagtreenode_t)))) {\n\t\treturn 0;\n\t}\n\n\t/* Initialize the parent links for all nodes in the tree. */\n\n\tnode = tree->nodes_;\n\tparentnode = &tree->nodes_[tree->numleafsh_ * tree->numleafsv_];\n\tparentnode0 = parentnode;\n\n\tfor (i = 0; i < numlvls - 1; ++i) {\n\t\tfor (j = 0; j < nplv[i]; ++j) {\n\t\t\tk = nplh[i];\n\t\t\twhile (--k >= 0) {\n\t\t\t\tnode->parent_ = parentnode;\n\t\t\t\t++node;\n\t\t\t\tif (--k >= 0) {\n\t\t\t\t\tnode->parent_ = parentnode;\n\t\t\t\t\t++node;\n\t\t\t\t}\n\t\t\t\t++parentnode;\n\t\t\t}\n\t\t\tif ((j & 1) || j == nplv[i] - 1) {\n\t\t\t\tparentnode0 = parentnode;\n\t\t\t} else {\n\t\t\t\tparentnode = parentnode0;\n\t\t\t\tparentnode0 += nplh[i];\n\t\t\t}\n\t\t}\n\t}\n\tnode->parent_ = 0;\n\n\t/* Initialize the data values to something sane. */\n\n\tjpc_tagtree_reset(tree);\n\n\treturn tree;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-249","original_id":"diversevul-249","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic jpc_dec_cp_t *jpc_dec_cp_create(uint_fast16_t numcomps)\n{\n\tjpc_dec_cp_t *cp;\n\tjpc_dec_ccp_t *ccp;\n\tint compno;\n\n\tif (!(cp = jas_malloc(sizeof(jpc_dec_cp_t)))) {\n\t\treturn 0;\n\t}\n\tcp->flags = 0;\n\tcp->numcomps = numcomps;\n\tcp->prgord = 0;\n\tcp->numlyrs = 0;\n\tcp->mctid = 0;\n\tcp->csty = 0;\n\tif (!(cp->ccps = jas_malloc(cp->numcomps * sizeof(jpc_dec_ccp_t)))) {\n\t\treturn 0;\n\t}\n\tif (!(cp->pchglist = jpc_pchglist_create())) {\n\t\tjas_free(cp->ccps);\n\t\treturn 0;\n\t}\n\tfor (compno = 0, ccp = cp->ccps; compno < cp->numcomps;\n\t ++compno, ++ccp) {\n\t\tccp->flags = 0;\n\t\tccp->numrlvls = 0;\n\t\tccp->cblkwidthexpn = 0;\n\t\tccp->cblkheightexpn = 0;\n\t\tccp->qmfbid = 0;\n\t\tccp->numstepsizes = 0;\n\t\tccp->numguardbits = 0;\n\t\tccp->roishift = 0;\n\t\tccp->cblkctx = 0;\n\t}\n\treturn cp;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-250","original_id":"diversevul-250","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint jpc_pchglist_insert(jpc_pchglist_t *pchglist, int pchgno, jpc_pchg_t *pchg)\n{\n\tint i;\n\tint newmaxpchgs;\n\tjpc_pchg_t **newpchgs;\n\tif (pchgno < 0) {\n\t\tpchgno = pchglist->numpchgs;\n\t}\n\tif (pchglist->numpchgs >= pchglist->maxpchgs) {\n\t\tnewmaxpchgs = pchglist->maxpchgs + 128;\n\t\tif (!(newpchgs = jas_realloc(pchglist->pchgs, newmaxpchgs * sizeof(jpc_pchg_t *)))) {\n\t\t\treturn -1;\n\t\t}\n\t\tpchglist->maxpchgs = newmaxpchgs;\n\t\tpchglist->pchgs = newpchgs;\n\t}\n\tfor (i = pchglist->numpchgs; i > pchgno; --i) {\n\t\tpchglist->pchgs[i] = pchglist->pchgs[i - 1];\n\t}\n\tpchglist->pchgs[pchgno] = pchg;\n\t++pchglist->numpchgs;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-251","original_id":"diversevul-251","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_unk_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in)\n{\n\tjpc_unk_t *unk = &ms->parms.unk;\n\n\t/* Eliminate compiler warning about unused variables. */\n\tcstate = 0;\n\n\tif (ms->len > 0) {\n\t\tif (!(unk->data = jas_malloc(ms->len * sizeof(unsigned char)))) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (jas_stream_read(in, (char *) unk->data, ms->len) != JAS_CAST(int, ms->len)) {\n\t\t\tjas_free(unk->data);\n\t\t\treturn -1;\n\t\t}\n\t\tunk->len = ms->len;\n\t} else {\n\t\tunk->data = 0;\n\t\tunk->len = 0;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-252","original_id":"diversevul-252","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint jpc_ppxstab_grow(jpc_ppxstab_t *tab, int maxents)\n{\n\tjpc_ppxstabent_t **newents;\n\tif (tab->maxents < maxents) {\n\t\tnewents = (tab->ents) ? jas_realloc(tab->ents, maxents *\n\t\t sizeof(jpc_ppxstabent_t *)) : jas_malloc(maxents * sizeof(jpc_ppxstabent_t *));\n\t\tif (!newents) {\n\t\t\treturn -1;\n\t\t}\n\t\ttab->ents = newents;\n\t\ttab->maxents = maxents;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-253","original_id":"diversevul-253","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jp2_cdef_getdata(jp2_box_t *box, jas_stream_t *in)\n{\n\tjp2_cdef_t *cdef = &box->data.cdef;\n\tjp2_cdefchan_t *chan;\n\tunsigned int channo;\n\tif (jp2_getuint16(in, &cdef->numchans)) {\n\t\treturn -1;\n\t}\n\tif (!(cdef->ents = jas_malloc(cdef->numchans * sizeof(jp2_cdefchan_t)))) {\n\t\treturn -1;\n\t}\n\tfor (channo = 0; channo < cdef->numchans; ++channo) {\n\t\tchan = &cdef->ents[channo];\n\t\tif (jp2_getuint16(in, &chan->channo) || jp2_getuint16(in, &chan->type) ||\n\t\t jp2_getuint16(in, &chan->assoc)) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-254","original_id":"diversevul-254","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jas_iccattrtab_resize(jas_iccattrtab_t *tab, int maxents)\n{\n\tjas_iccattr_t *newattrs;\n\tassert(maxents >= tab->numattrs);\n\tnewattrs = tab->attrs ? jas_realloc(tab->attrs, maxents *\n\t sizeof(jas_iccattr_t)) : jas_malloc(maxents * sizeof(jas_iccattr_t));\n\tif (!newattrs)\n\t\treturn -1;\n\ttab->attrs = newattrs;\n\ttab->maxattrs = maxents;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-355","original_id":"diversevul-355","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\njas_matrix_t *jas_matrix_create(int numrows, int numcols)\n{\n\tjas_matrix_t *matrix;\n\tint i;\n\n\tif (!(matrix = jas_malloc(sizeof(jas_matrix_t)))) {\n\t\treturn 0;\n\t}\n\tmatrix->flags_ = 0;\n\tmatrix->numrows_ = numrows;\n\tmatrix->numcols_ = numcols;\n\tmatrix->rows_ = 0;\n\tmatrix->maxrows_ = numrows;\n\tmatrix->data_ = 0;\n\tmatrix->datasize_ = numrows * numcols;\n\n\tif (matrix->maxrows_ > 0) {\n\t\tif (!(matrix->rows_ = jas_malloc(matrix->maxrows_ *\n\t\t sizeof(jas_seqent_t *)))) {\n\t\t\tjas_matrix_destroy(matrix);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tif (matrix->datasize_ > 0) {\n\t\tif (!(matrix->data_ = jas_malloc(matrix->datasize_ *\n\t\t sizeof(jas_seqent_t)))) {\n\t\t\tjas_matrix_destroy(matrix);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tfor (i = 0; i < numrows; ++i) {\n\t\tmatrix->rows_[i] = &matrix->data_[i * matrix->numcols_];\n\t}\n\n\tfor (i = 0; i < matrix->datasize_; ++i) {\n\t\tmatrix->data_[i] = 0;\n\t}\n\n\tmatrix->xstart_ = 0;\n\tmatrix->ystart_ = 0;\n\tmatrix->xend_ = matrix->numcols_;\n\tmatrix->yend_ = matrix->numrows_;\n\n\treturn matrix;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-356","original_id":"diversevul-356","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid *jas_calloc(size_t nmemb, size_t size)\n{\n\tvoid *ptr;\n\tsize_t n;\n\tn = nmemb * size;\n\tif (!(ptr = jas_malloc(n * sizeof(char)))) {\n\t\treturn 0;\n\t}\n\tmemset(ptr, 0, n);\n\treturn ptr;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-357","original_id":"diversevul-357","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nchar *jas_strdup(const char *s)\n{\n\tint n;\n\tchar *p;\n\tn = strlen(s) + 1;\n\tif (!(p = jas_malloc(n * sizeof(char)))) {\n\t\treturn 0;\n\t}\n\tstrcpy(p, s);\n\treturn p;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-358","original_id":"diversevul-358","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate,\n jas_stream_t *in)\n{\n\tjpc_siz_t *siz = &ms->parms.siz;\n\tunsigned int i;\n\tuint_fast8_t tmp;\n\n\t/* Eliminate compiler warning about unused variables. */\n\tcstate = 0;\n\n\tif (jpc_getuint16(in, &siz->caps) ||\n\t jpc_getuint32(in, &siz->width) ||\n\t jpc_getuint32(in, &siz->height) ||\n\t jpc_getuint32(in, &siz->xoff) ||\n\t jpc_getuint32(in, &siz->yoff) ||\n\t jpc_getuint32(in, &siz->tilewidth) ||\n\t jpc_getuint32(in, &siz->tileheight) ||\n\t jpc_getuint32(in, &siz->tilexoff) ||\n\t jpc_getuint32(in, &siz->tileyoff) ||\n\t jpc_getuint16(in, &siz->numcomps)) {\n\t\treturn -1;\n\t}\n\tif (!siz->width || !siz->height || !siz->tilewidth ||\n\t !siz->tileheight || !siz->numcomps) {\n\t\treturn -1;\n\t}\n\tif (!(siz->comps = jas_malloc(siz->numcomps * sizeof(jpc_sizcomp_t)))) {\n\t\treturn -1;\n\t}\n\tfor (i = 0; i < siz->numcomps; ++i) {\n\t\tif (jpc_getuint8(in, &tmp) ||\n\t\t jpc_getuint8(in, &siz->comps[i].hsamp) ||\n\t\t jpc_getuint8(in, &siz->comps[i].vsamp)) {\n\t\t\tjas_free(siz->comps);\n\t\t\treturn -1;\n\t\t}\n\t\tsiz->comps[i].sgnd = (tmp >> 7) & 1;\n\t\tsiz->comps[i].prec = (tmp & 0x7f) + 1;\n\t}\n\tif (jas_stream_eof(in)) {\n\t\tjas_free(siz->comps);\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-359","original_id":"diversevul-359","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_join_col(jpc_fix_t *a, int numrows, int stride,\n int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numrows, 1);\n\tjpc_fix_t joinbuf[QMFB_JOINBUFSIZE];\n\tjpc_fix_t *buf = joinbuf;\n\tregister jpc_fix_t *srcptr;\n\tregister jpc_fix_t *dstptr;\n\tregister int n;\n\tint hstartcol;\n\n\t/* Allocate memory for the join buffer from the heap. */\n\tif (bufsize > QMFB_JOINBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\thstartcol = (numrows + 1 - parity) >> 1;\n\n\t/* Save the samples from the lowpass channel. */\n\tn = hstartcol;\n\tsrcptr = &a[0];\n\tdstptr = buf;\n\twhile (n-- > 0) {\n\t\t*dstptr = *srcptr;\n\t\tsrcptr += stride;\n\t\t++dstptr;\n\t}\n\t/* Copy the samples from the highpass channel into place. */\n\tsrcptr = &a[hstartcol * stride];\n\tdstptr = &a[(1 - parity) * stride];\n\tn = numrows - hstartcol;\n\twhile (n-- > 0) {\n\t\t*dstptr = *srcptr;\n\t\tdstptr += 2 * stride;\n\t\tsrcptr += stride;\n\t}\n\t/* Copy the samples from the lowpass channel into place. */\n\tsrcptr = buf;\n\tdstptr = &a[parity * stride];\n\tn = hstartcol;\n\twhile (n-- > 0) {\n\t\t*dstptr = *srcptr;\n\t\tdstptr += 2 * stride;\n\t\t++srcptr;\n\t}\n\n\t/* If the join buffer was allocated on the heap, free this memory. */\n\tif (buf != joinbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-360","original_id":"diversevul-360","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_join_colgrp(jpc_fix_t *a, int numrows, int stride,\n int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numrows, 1);\n\tjpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE];\n\tjpc_fix_t *buf = joinbuf;\n\tjpc_fix_t *srcptr;\n\tjpc_fix_t *dstptr;\n\tregister jpc_fix_t *srcptr2;\n\tregister jpc_fix_t *dstptr2;\n\tregister int n;\n\tregister int i;\n\tint hstartcol;\n\n\t/* Allocate memory for the join buffer from the heap. */\n\tif (bufsize > QMFB_JOINBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\thstartcol = (numrows + 1 - parity) >> 1;\n\n\t/* Save the samples from the lowpass channel. */\n\tn = hstartcol;\n\tsrcptr = &a[0];\n\tdstptr = buf;\n\twhile (n-- > 0) {\n\t\tdstptr2 = dstptr;\n\t\tsrcptr2 = srcptr;\n\t\tfor (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) {\n\t\t\t*dstptr2 = *srcptr2;\n\t\t\t++dstptr2;\n\t\t\t++srcptr2;\n\t\t}\n\t\tsrcptr += stride;\n\t\tdstptr += JPC_QMFB_COLGRPSIZE;\n\t}\n\t/* Copy the samples from the highpass channel into place. */\n\tsrcptr = &a[hstartcol * stride];\n\tdstptr = &a[(1 - parity) * stride];\n\tn = numrows - hstartcol;\n\twhile (n-- > 0) {\n\t\tdstptr2 = dstptr;\n\t\tsrcptr2 = srcptr;\n\t\tfor (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) {\n\t\t\t*dstptr2 = *srcptr2;\n\t\t\t++dstptr2;\n\t\t\t++srcptr2;\n\t\t}\n\t\tdstptr += 2 * stride;\n\t\tsrcptr += stride;\n\t}\n\t/* Copy the samples from the lowpass channel into place. */\n\tsrcptr = buf;\n\tdstptr = &a[parity * stride];\n\tn = hstartcol;\n\twhile (n-- > 0) {\n\t\tdstptr2 = dstptr;\n\t\tsrcptr2 = srcptr;\n\t\tfor (i = 0; i < JPC_QMFB_COLGRPSIZE; ++i) {\n\t\t\t*dstptr2 = *srcptr2;\n\t\t\t++dstptr2;\n\t\t\t++srcptr2;\n\t\t}\n\t\tdstptr += 2 * stride;\n\t\tsrcptr += JPC_QMFB_COLGRPSIZE;\n\t}\n\n\t/* If the join buffer was allocated on the heap, free this memory. */\n\tif (buf != joinbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-361","original_id":"diversevul-361","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jp2_bpcc_getdata(jp2_box_t *box, jas_stream_t *in)\n{\n\tjp2_bpcc_t *bpcc = &box->data.bpcc;\n\tunsigned int i;\n\tbpcc->numcmpts = box->datalen;\n\tif (!(bpcc->bpcs = jas_malloc(bpcc->numcmpts * sizeof(uint_fast8_t)))) {\n\t\treturn -1;\n\t}\n\tfor (i = 0; i < bpcc->numcmpts; ++i) {\n\t\tif (jp2_getuint8(in, &bpcc->bpcs[i])) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-362","original_id":"diversevul-362","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\njas_stream_t *jas_stream_memopen(char *buf, int bufsize)\n{\n\tjas_stream_t *stream;\n\tjas_stream_memobj_t *obj;\n\n\tif (!(stream = jas_stream_create())) {\n\t\treturn 0;\n\t}\n\n\t/* A stream associated with a memory buffer is always opened\n\tfor both reading and writing in binary mode. */\n\tstream->openmode_ = JAS_STREAM_READ | JAS_STREAM_WRITE | JAS_STREAM_BINARY;\n\n\t/* Since the stream data is already resident in memory, buffering\n\tis not necessary. */\n\t/* But... It still may be faster to use buffering anyways. */\n\tjas_stream_initbuf(stream, JAS_STREAM_FULLBUF, 0, 0);\n\n\t/* Select the operations for a memory stream. */\n\tstream->ops_ = &jas_stream_memops;\n\n\t/* Allocate memory for the underlying memory stream object. */\n\tif (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) {\n\t\tjas_stream_destroy(stream);\n\t\treturn 0;\n\t}\n\tstream->obj_ = (void *) obj;\n\n\t/* Initialize a few important members of the memory stream object. */\n\tobj->myalloc_ = 0;\n\tobj->buf_ = 0;\n\n\t/* If the buffer size specified is nonpositive, then the buffer\n\tis allocated internally and automatically grown as needed. */\n\tif (bufsize <= 0) {\n\t\tobj->bufsize_ = 1024;\n\t\tobj->growable_ = 1;\n\t} else {\n\t\tobj->bufsize_ = bufsize;\n\t\tobj->growable_ = 0;\n\t}\n\tif (buf) {\n\t\tobj->buf_ = (unsigned char *) buf;\n\t} else {\n\t\tobj->buf_ = jas_malloc(obj->bufsize_ * sizeof(char));\n\t\tobj->myalloc_ = 1;\n\t}\n\tif (!obj->buf_) {\n\t\tjas_stream_close(stream);\n\t\treturn 0;\n\t}\n\n\tif (bufsize > 0 && buf) {\n\t\t/* If a buffer was supplied by the caller and its length is positive,\n\t\t make the associated buffer data appear in the stream initially. */\n\t\tobj->len_ = bufsize;\n\t} else {\n\t\t/* The stream is initially empty. */\n\t\tobj->len_ = 0;\n\t}\n\tobj->pos_ = 0;\n\t\n\treturn stream;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-363","original_id":"diversevul-363","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid jpc_qmfb_split_colres(jpc_fix_t *a, int numrows, int numcols,\n int stride, int parity)\n{\n\n\tint bufsize = JPC_CEILDIVPOW2(numrows, 1);\n\tjpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE];\n\tjpc_fix_t *buf = splitbuf;\n\tjpc_fix_t *srcptr;\n\tjpc_fix_t *dstptr;\n\tregister jpc_fix_t *srcptr2;\n\tregister jpc_fix_t *dstptr2;\n\tregister int n;\n\tregister int i;\n\tint m;\n\tint hstartcol;\n\n\t/* Get a buffer. */\n\tif (bufsize > QMFB_SPLITBUFSIZE) {\n\t\tif (!(buf = jas_malloc(bufsize * sizeof(jpc_fix_t)))) {\n\t\t\t/* We have no choice but to commit suicide in this case. */\n\t\t\tabort();\n\t\t}\n\t}\n\n\tif (numrows >= 2) {\n\t\thstartcol = (numrows + 1 - parity) >> 1;\n\t\tm = (parity) ? hstartcol : (numrows - hstartcol);\n\t\t/* Save the samples destined for the highpass channel. */\n\t\tn = m;\n\t\tdstptr = buf;\n\t\tsrcptr = &a[(1 - parity) * stride];\n\t\twhile (n-- > 0) {\n\t\t\tdstptr2 = dstptr;\n\t\t\tsrcptr2 = srcptr;\n\t\t\tfor (i = 0; i < numcols; ++i) {\n\t\t\t\t*dstptr2 = *srcptr2;\n\t\t\t\t++dstptr2;\n\t\t\t\t++srcptr2;\n\t\t\t}\n\t\t\tdstptr += numcols;\n\t\t\tsrcptr += stride << 1;\n\t\t}\n\t\t/* Copy the appropriate samples into the lowpass channel. */\n\t\tdstptr = &a[(1 - parity) * stride];\n\t\tsrcptr = &a[(2 - parity) * stride];\n\t\tn = numrows - m - (!parity);\n\t\twhile (n-- > 0) {\n\t\t\tdstptr2 = dstptr;\n\t\t\tsrcptr2 = srcptr;\n\t\t\tfor (i = 0; i < numcols; ++i) {\n\t\t\t\t*dstptr2 = *srcptr2;\n\t\t\t\t++dstptr2;\n\t\t\t\t++srcptr2;\n\t\t\t}\n\t\t\tdstptr += stride;\n\t\t\tsrcptr += stride << 1;\n\t\t}\n\t\t/* Copy the saved samples into the highpass channel. */\n\t\tdstptr = &a[hstartcol * stride];\n\t\tsrcptr = buf;\n\t\tn = m;\n\t\twhile (n-- > 0) {\n\t\t\tdstptr2 = dstptr;\n\t\t\tsrcptr2 = srcptr;\n\t\t\tfor (i = 0; i < numcols; ++i) {\n\t\t\t\t*dstptr2 = *srcptr2;\n\t\t\t\t++dstptr2;\n\t\t\t\t++srcptr2;\n\t\t\t}\n\t\t\tdstptr += stride;\n\t\t\tsrcptr += numcols;\n\t\t}\n\t}\n\n\t/* If the split buffer was allocated on the heap, free this memory. */\n\tif (buf != splitbuf) {\n\t\tjas_free(buf);\n\t}\n\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-364","original_id":"diversevul-364","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int jp2_pclr_getdata(jp2_box_t *box, jas_stream_t *in)\n{\n\tjp2_pclr_t *pclr = &box->data.pclr;\n\tint lutsize;\n\tunsigned int i;\n\tunsigned int j;\n\tint_fast32_t x;\n\n\tpclr->lutdata = 0;\n\n\tif (jp2_getuint16(in, &pclr->numlutents) ||\n\t jp2_getuint8(in, &pclr->numchans)) {\n\t\treturn -1;\n\t}\n\tlutsize = pclr->numlutents * pclr->numchans;\n\tif (!(pclr->lutdata = jas_malloc(lutsize * sizeof(int_fast32_t)))) {\n\t\treturn -1;\n\t}\n\tif (!(pclr->bpc = jas_malloc(pclr->numchans * sizeof(uint_fast8_t)))) {\n\t\treturn -1;\n\t}\n\tfor (i = 0; i < pclr->numchans; ++i) {\n\t\tif (jp2_getuint8(in, &pclr->bpc[i])) {\n\t\t\treturn -1;\n\t\t}\n\t}\n\tfor (i = 0; i < pclr->numlutents; ++i) {\n\t\tfor (j = 0; j < pclr->numchans; ++j) {\n\t\t\tif (jp2_getint(in, (pclr->bpc[j] & 0x80) != 0,\n\t\t\t (pclr->bpc[j] & 0x7f) + 1, &x)) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tpclr->lutdata[i * pclr->numchans + j] = x;\n\t\t}\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-365","original_id":"diversevul-365","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint jas_stream_printf(jas_stream_t *stream, const char *fmt, ...)\n{\n\tva_list ap;\n\tchar buf[4096];\n\tint ret;\n\n\tva_start(ap, fmt);\n\tret = vsprintf(buf, fmt, ap);\n\tjas_stream_puts(stream, buf);\n\tva_end(ap);\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-366","original_id":"diversevul-366","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline int nla_ok(const struct nlattr *nla, int remaining)\n{\n\treturn remaining >= sizeof(*nla) &&\n\t nla->nla_len >= sizeof(*nla) &&\n\t nla->nla_len <= remaining;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-367","original_id":"diversevul-367","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_setsockopt_hmac_ident(struct sock *sk,\n\t\t\t\t char __user *optval,\n\t\t\t\t int optlen)\n{\n\tstruct sctp_hmacalgo *hmacs;\n\tint err;\n\n\tif (!sctp_auth_enable)\n\t\treturn -EACCES;\n\n\tif (optlen < sizeof(struct sctp_hmacalgo))\n\t\treturn -EINVAL;\n\n\thmacs = kmalloc(optlen, GFP_KERNEL);\n\tif (!hmacs)\n\t\treturn -ENOMEM;\n\n\tif (copy_from_user(hmacs, optval, optlen)) {\n\t\terr = -EFAULT;\n\t\tgoto out;\n\t}\n\n\tif (hmacs->shmac_num_idents == 0 ||\n\t hmacs->shmac_num_idents > SCTP_AUTH_NUM_HMACS) {\n\t\terr = -EINVAL;\n\t\tgoto out;\n\t}\n\n\terr = sctp_auth_ep_set_hmacs(sctp_sk(sk)->ep, hmacs);\nout:\n\tkfree(hmacs);\n\treturn err;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-368","original_id":"diversevul-368","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint sctp_auth_ep_set_hmacs(struct sctp_endpoint *ep,\n\t\t\t struct sctp_hmacalgo *hmacs)\n{\n\tint has_sha1 = 0;\n\t__u16 id;\n\tint i;\n\n\t/* Scan the list looking for unsupported id. Also make sure that\n\t * SHA1 is specified.\n\t */\n\tfor (i = 0; i < hmacs->shmac_num_idents; i++) {\n\t\tid = hmacs->shmac_idents[i];\n\n\t\tif (SCTP_AUTH_HMAC_ID_SHA1 == id)\n\t\t\thas_sha1 = 1;\n\n\t\tif (!sctp_hmac_list[id].hmac_name)\n\t\t\treturn -EOPNOTSUPP;\n\t}\n\n\tif (!has_sha1)\n\t\treturn -EINVAL;\n\n\tmemcpy(ep->auth_hmacs_list->hmac_ids, &hmacs->shmac_idents[0],\n\t\thmacs->shmac_num_idents * sizeof(__u16));\n\tep->auth_hmacs_list->param_hdr.length = htons(sizeof(sctp_paramhdr_t) +\n\t\t\t\thmacs->shmac_num_idents * sizeof(__u16));\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-369","original_id":"diversevul-369","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,\n\tstruct file *filp)\n{\n\tint err;\n\tstruct iattr newattrs;\n\n\t/* Not pretty: \"inode->i_size\" shouldn't really be signed. But it is. */\n\tif (length < 0)\n\t\treturn -EINVAL;\n\n\tnewattrs.ia_size = length;\n\tnewattrs.ia_valid = ATTR_SIZE | time_attrs;\n\tif (filp) {\n\t\tnewattrs.ia_file = filp;\n\t\tnewattrs.ia_valid |= ATTR_FILE;\n\t}\n\n\tmutex_lock(&dentry->d_inode->i_mutex);\n\terr = notify_change(dentry, &newattrs);\n\tmutex_unlock(&dentry->d_inode->i_mutex);\n\treturn err;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-370","original_id":"diversevul-370","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngeneric_file_splice_write(struct pipe_inode_info *pipe, struct file *out,\n\t\t\t loff_t *ppos, size_t len, unsigned int flags)\n{\n\tstruct address_space *mapping = out->f_mapping;\n\tssize_t ret;\n\n\tret = splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_file);\n\tif (ret > 0) {\n\t\tstruct inode *inode = mapping->host;\n\n\t\t*ppos += ret;\n\n\t\t/*\n\t\t * If file or inode is SYNC and we actually wrote some data,\n\t\t * sync it.\n\t\t */\n\t\tif (unlikely((out->f_flags & O_SYNC) || IS_SYNC(inode))) {\n\t\t\tint err;\n\n\t\t\tmutex_lock(&inode->i_mutex);\n\t\t\terr = generic_osync_inode(inode, mapping,\n\t\t\t\t\t\t OSYNC_METADATA|OSYNC_DATA);\n\t\t\tmutex_unlock(&inode->i_mutex);\n\n\t\t\tif (err)\n\t\t\t\tret = err;\n\t\t}\n\t}\n\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-371","original_id":"diversevul-371","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngeneric_file_splice_write_nolock(struct pipe_inode_info *pipe, struct file *out,\n\t\t\t\t loff_t *ppos, size_t len, unsigned int flags)\n{\n\tstruct address_space *mapping = out->f_mapping;\n\tstruct inode *inode = mapping->host;\n\tssize_t ret;\n\tint err;\n\n\tret = __splice_from_pipe(pipe, out, ppos, len, flags, pipe_to_file);\n\tif (ret > 0) {\n\t\t*ppos += ret;\n\n\t\t/*\n\t\t * If file or inode is SYNC and we actually wrote some data,\n\t\t * sync it.\n\t\t */\n\t\tif (unlikely((out->f_flags & O_SYNC) || IS_SYNC(inode))) {\n\t\t\terr = generic_osync_inode(inode, mapping,\n\t\t\t\t\t\t OSYNC_METADATA|OSYNC_DATA);\n\n\t\t\tif (err)\n\t\t\t\tret = err;\n\t\t}\n\t}\n\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-372","original_id":"diversevul-372","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic sctp_disposition_t sctp_sf_violation_paramlen(\n\t\t\t\t const struct sctp_endpoint *ep,\n\t\t\t\t const struct sctp_association *asoc,\n\t\t\t\t const sctp_subtype_t type,\n\t\t\t\t void *arg,\n\t\t\t\t sctp_cmd_seq_t *commands) {\n\tstatic const char err_str[] = \"The following parameter had invalid length:\";\n\n\treturn sctp_sf_abort_violation(ep, asoc, arg, commands, err_str,\n\t\t\t\t\tsizeof(err_str));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-373","original_id":"diversevul-373","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int sctp_process_inv_paramlength(const struct sctp_association *asoc,\n\t\t\t\t\tstruct sctp_paramhdr *param,\n\t\t\t\t\tconst struct sctp_chunk *chunk,\n\t\t\t\t\tstruct sctp_chunk **errp)\n{\n\tstatic const char error[] = \"The following parameter had invalid length:\";\n\tsize_t\t\tpayload_len = WORD_ROUND(sizeof(error)) +\n\t\t\t\t\t\tsizeof(sctp_paramhdr_t);\n\n\n\t/* This is a fatal error. Any accumulated non-fatal errors are\n\t * not reported.\n\t */\n\tif (*errp)\n\t\tsctp_chunk_free(*errp);\n\n\t/* Create an error chunk and fill it in with our payload. */\n\t*errp = sctp_make_op_error_space(asoc, chunk, payload_len);\n\n\tif (*errp) {\n\t\tsctp_init_cause(*errp, SCTP_ERROR_PROTO_VIOLATION,\n\t\t\t\tsizeof(error) + sizeof(sctp_paramhdr_t));\n\t\tsctp_addto_chunk(*errp, sizeof(error), error);\n\t\tsctp_addto_param(*errp, sizeof(sctp_paramhdr_t), param);\n\t}\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-374","original_id":"diversevul-374","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int rtc_dev_release(struct inode *inode, struct file *file)\n{\n\tstruct rtc_device *rtc = file->private_data;\n\n#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL\n\tclear_uie(rtc);\n#endif\n\trtc_irq_set_state(rtc, NULL, 0);\n\n\tif (rtc->ops->release)\n\t\trtc->ops->release(rtc->dev.parent);\n\n\tclear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-375","original_id":"diversevul-375","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int rtc_dev_fasync(int fd, struct file *file, int on)\n{\n\tstruct rtc_device *rtc = file->private_data;\n\treturn fasync_helper(fd, file, on, &rtc->async_queue);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-376","original_id":"diversevul-376","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic long do_splice_from(struct pipe_inode_info *pipe, struct file *out,\n\t\t\t loff_t *ppos, size_t len, unsigned int flags)\n{\n\tint ret;\n\n\tif (unlikely(!out->f_op || !out->f_op->splice_write))\n\t\treturn -EINVAL;\n\n\tif (unlikely(!(out->f_mode & FMODE_WRITE)))\n\t\treturn -EBADF;\n\n\tret = rw_verify_area(WRITE, out, ppos, len);\n\tif (unlikely(ret < 0))\n\t\treturn ret;\n\n\treturn out->f_op->splice_write(pipe, out, ppos, len, flags);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-377","original_id":"diversevul-377","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint hfsplus_find_cat(struct super_block *sb, u32 cnid,\n\t\t struct hfs_find_data *fd)\n{\n\thfsplus_cat_entry tmp;\n\tint err;\n\tu16 type;\n\n\thfsplus_cat_build_key(sb, fd->search_key, cnid, NULL);\n\terr = hfs_brec_read(fd, &tmp, sizeof(hfsplus_cat_entry));\n\tif (err)\n\t\treturn err;\n\n\ttype = be16_to_cpu(tmp.type);\n\tif (type != HFSPLUS_FOLDER_THREAD && type != HFSPLUS_FILE_THREAD) {\n\t\tprintk(KERN_ERR \"hfs: found bad thread record in catalog\\n\");\n\t\treturn -EIO;\n\t}\n\n\thfsplus_cat_build_key_uni(fd->search_key, be32_to_cpu(tmp.thread.parentID),\n\t\t\t\t &tmp.thread.nodeName);\n\treturn hfs_brec_find(fd);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-378","original_id":"diversevul-378","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint hfs_cat_find_brec(struct super_block *sb, u32 cnid,\n\t\t struct hfs_find_data *fd)\n{\n\thfs_cat_rec rec;\n\tint res, len, type;\n\n\thfs_cat_build_key(sb, fd->search_key, cnid, NULL);\n\tres = hfs_brec_read(fd, &rec, sizeof(rec));\n\tif (res)\n\t\treturn res;\n\n\ttype = rec.type;\n\tif (type != HFS_CDR_THD && type != HFS_CDR_FTH) {\n\t\tprintk(KERN_ERR \"hfs: found bad thread record in catalog\\n\");\n\t\treturn -EIO;\n\t}\n\n\tfd->search_key->cat.ParID = rec.thread.ParID;\n\tlen = fd->search_key->cat.CName.len = rec.thread.CName.len;\n\tmemcpy(fd->search_key->cat.CName.name, rec.thread.CName.name, len);\n\treturn hfs_brec_find(fd);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-379","original_id":"diversevul-379","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid __scm_destroy(struct scm_cookie *scm)\n{\n\tstruct scm_fp_list *fpl = scm->fp;\n\tint i;\n\n\tif (fpl) {\n\t\tscm->fp = NULL;\n\t\tfor (i=fpl->count-1; i>=0; i--)\n\t\t\tfput(fpl->fp[i]);\n\t\tkfree(fpl);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-380","original_id":"diversevul-380","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)\n{\n\tint *fdp = (int*)CMSG_DATA(cmsg);\n\tstruct scm_fp_list *fpl = *fplp;\n\tstruct file **fpp;\n\tint i, num;\n\n\tnum = (cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)))/sizeof(int);\n\n\tif (num <= 0)\n\t\treturn 0;\n\n\tif (num > SCM_MAX_FD)\n\t\treturn -EINVAL;\n\n\tif (!fpl)\n\t{\n\t\tfpl = kmalloc(sizeof(struct scm_fp_list), GFP_KERNEL);\n\t\tif (!fpl)\n\t\t\treturn -ENOMEM;\n\t\t*fplp = fpl;\n\t\tfpl->count = 0;\n\t}\n\tfpp = &fpl->fp[fpl->count];\n\n\tif (fpl->count + num > SCM_MAX_FD)\n\t\treturn -EINVAL;\n\n\t/*\n\t *\tVerify the descriptors and increment the usage count.\n\t */\n\n\tfor (i=0; i< num; i++)\n\t{\n\t\tint fd = fdp[i];\n\t\tstruct file *file;\n\n\t\tif (fd < 0 || !(file = fget(fd)))\n\t\t\treturn -EBADF;\n\t\t*fpp++ = file;\n\t\tfpl->count++;\n\t}\n\treturn num;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-381","original_id":"diversevul-381","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)\n{\n\tstruct scm_fp_list *new_fpl;\n\tint i;\n\n\tif (!fpl)\n\t\treturn NULL;\n\n\tnew_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL);\n\tif (new_fpl) {\n\t\tfor (i=fpl->count-1; i>=0; i--)\n\t\t\tget_file(fpl->fp[i]);\n\t\tmemcpy(new_fpl, fpl, sizeof(*fpl));\n\t}\n\treturn new_fpl;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-382","original_id":"diversevul-382","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void inc_inflight_move_tail(struct unix_sock *u)\n{\n\tatomic_long_inc(&u->inflight);\n\t/*\n\t * If this is still a candidate, move it to the end of the\n\t * list, so that it's checked even if it was already passed\n\t * over\n\t */\n\tif (u->gc_candidate)\n\t\tlist_move_tail(&u->link, &gc_candidates);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-383","original_id":"diversevul-383","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)\n{\n\tint i;\n\tfor (i=scm->fp->count-1; i>=0; i--)\n\t\tunix_inflight(scm->fp->fp[i]);\n\tUNIXCB(skb).fp = scm->fp;\n\tskb->destructor = unix_destruct_fds;\n\tscm->fp = NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-384","original_id":"diversevul-384","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),\n\t\t\t struct sk_buff_head *hitlist)\n{\n\tstruct sk_buff *skb;\n\tstruct sk_buff *next;\n\n\tspin_lock(&x->sk_receive_queue.lock);\n\treceive_queue_for_each_skb(x, next, skb) {\n\t\t/*\n\t\t *\tDo we have file descriptors ?\n\t\t */\n\t\tif (UNIXCB(skb).fp) {\n\t\t\tbool hit = false;\n\t\t\t/*\n\t\t\t *\tProcess the descriptors of this socket\n\t\t\t */\n\t\t\tint nfd = UNIXCB(skb).fp->count;\n\t\t\tstruct file **fp = UNIXCB(skb).fp->fp;\n\t\t\twhile (nfd--) {\n\t\t\t\t/*\n\t\t\t\t *\tGet the socket the fd matches\n\t\t\t\t *\tif it indeed does so\n\t\t\t\t */\n\t\t\t\tstruct sock *sk = unix_get_socket(*fp++);\n\t\t\t\tif (sk) {\n\t\t\t\t\thit = true;\n\t\t\t\t\tfunc(unix_sk(sk));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (hit && hitlist != NULL) {\n\t\t\t\t__skb_unlink(skb, &x->sk_receive_queue);\n\t\t\t\t__skb_queue_tail(hitlist, skb);\n\t\t\t}\n\t\t}\n\t}\n\tspin_unlock(&x->sk_receive_queue.lock);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-385","original_id":"diversevul-385","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline int empty_stack(void)\n{\n\treturn gc_current == GC_HEAD;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-386","original_id":"diversevul-386","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void maybe_unmark_and_push(struct sock *x)\n{\n\tstruct unix_sock *u = unix_sk(x);\n\n\tif (u->gc_tree != GC_ORPHAN)\n\t\treturn;\n\tsock_hold(x);\n\tu->gc_tree = gc_current;\n\tgc_current = x;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-387","original_id":"diversevul-387","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid unix_inflight(struct file *fp)\n{\n\tstruct sock *s = unix_get_socket(fp);\n\tif(s) {\n\t\tatomic_inc(&unix_sk(s)->inflight);\n\t\tatomic_inc(&unix_tot_inflight);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-388","original_id":"diversevul-388","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline struct sock *pop_stack(void)\n{\n\tstruct sock *p = gc_current;\n\tgc_current = unix_sk(p)->gc_tree;\n\treturn p;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-389","original_id":"diversevul-389","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct sock * unix_create1(struct socket *sock)\n{\n\tstruct sock *sk = NULL;\n\tstruct unix_sock *u;\n\n\tif (atomic_read(&unix_nr_socks) >= 2*get_max_files())\n\t\tgoto out;\n\n\tsk = sk_alloc(PF_UNIX, GFP_KERNEL, &unix_proto, 1);\n\tif (!sk)\n\t\tgoto out;\n\n\tatomic_inc(&unix_nr_socks);\n\n\tsock_init_data(sock,sk);\n\tlockdep_set_class(&sk->sk_receive_queue.lock,\n\t\t\t\t&af_unix_sk_receive_queue_lock_key);\n\n\tsk->sk_write_space\t= unix_write_space;\n\tsk->sk_max_ack_backlog\t= sysctl_unix_max_dgram_qlen;\n\tsk->sk_destruct\t\t= unix_sock_destructor;\n\tu\t = unix_sk(sk);\n\tu->dentry = NULL;\n\tu->mnt\t = NULL;\n\tspin_lock_init(&u->lock);\n\tatomic_set(&u->inflight, sock ? 0 : -1);\n\tmutex_init(&u->readlock); /* single task reading lock */\n\tinit_waitqueue_head(&u->peer_wait);\n\tunix_insert_socket(unix_sockets_unbound, sk);\nout:\n\treturn sk;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-390","original_id":"diversevul-390","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid unix_notinflight(struct file *fp)\n{\n\tstruct sock *s = unix_get_socket(fp);\n\tif(s) {\n\t\tatomic_dec(&unix_sk(s)->inflight);\n\t\tatomic_dec(&unix_tot_inflight);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-391","original_id":"diversevul-391","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int get_file_caps(struct linux_binprm *bprm)\n{\n\tstruct dentry *dentry;\n\tint rc = 0;\n\tstruct vfs_cap_data vcaps;\n\tstruct inode *inode;\n\n\tif (bprm->file->f_vfsmnt->mnt_flags & MNT_NOSUID) {\n\t\tbprm_clear_caps(bprm);\n\t\treturn 0;\n\t}\n\n\tdentry = dget(bprm->file->f_dentry);\n\tinode = dentry->d_inode;\n\tif (!inode->i_op || !inode->i_op->getxattr)\n\t\tgoto out;\n\n\trc = inode->i_op->getxattr(dentry, XATTR_NAME_CAPS, &vcaps,\n\t\t\t\t XATTR_CAPS_SZ);\n\tif (rc == -ENODATA || rc == -EOPNOTSUPP) {\n\t\t/* no data, that's ok */\n\t\trc = 0;\n\t\tgoto out;\n\t}\n\tif (rc < 0)\n\t\tgoto out;\n\n\trc = cap_from_disk(&vcaps, bprm, rc);\n\tif (rc == -EINVAL)\n\t\tprintk(KERN_NOTICE \"%s: cap_from_disk returned %d for %s\\n\",\n\t\t __func__, rc, bprm->filename);\n\nout:\n\tdput(dentry);\n\tif (rc)\n\t\tbprm_clear_caps(bprm);\n\n\treturn rc;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-392","original_id":"diversevul-392","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline int get_file_caps(struct linux_binprm *bprm)\n{\n\tbprm_clear_caps(bprm);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-393","original_id":"diversevul-393","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int tvaudio_get_ctrl(struct CHIPSTATE *chip,\n\t\t\t struct v4l2_control *ctrl)\n{\n\tstruct CHIPDESC *desc = chip->desc;\n\n\tswitch (ctrl->id) {\n\tcase V4L2_CID_AUDIO_MUTE:\n\t\tctrl->value=chip->muted;\n\t\treturn 0;\n\tcase V4L2_CID_AUDIO_VOLUME:\n\t\tif (!(desc->flags & CHIP_HAS_VOLUME))\n\t\t\tbreak;\n\t\tctrl->value = max(chip->left,chip->right);\n\t\treturn 0;\n\tcase V4L2_CID_AUDIO_BALANCE:\n\t{\n\t\tint volume;\n\t\tif (!(desc->flags & CHIP_HAS_VOLUME))\n\t\t\tbreak;\n\t\tvolume = max(chip->left,chip->right);\n\t\tif (volume)\n\t\t\tctrl->value=(32768*min(chip->left,chip->right))/volume;\n\t\telse\n\t\t\tctrl->value=32768;\n\t\treturn 0;\n\t}\n\tcase V4L2_CID_AUDIO_BASS:\n\t\tif (desc->flags & CHIP_HAS_BASSTREBLE)\n\t\t\tbreak;\n\t\tctrl->value = chip->bass;\n\t\treturn 0;\n\tcase V4L2_CID_AUDIO_TREBLE:\n\t\tif (desc->flags & CHIP_HAS_BASSTREBLE)\n\t\t\treturn -EINVAL;\n\t\tctrl->value = chip->treble;\n\t\treturn 0;\n\t}\n\treturn -EINVAL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-394","original_id":"diversevul-394","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int tvaudio_set_ctrl(struct CHIPSTATE *chip,\n\t\t\t struct v4l2_control *ctrl)\n{\n\tstruct CHIPDESC *desc = chip->desc;\n\n\tswitch (ctrl->id) {\n\tcase V4L2_CID_AUDIO_MUTE:\n\t\tif (ctrl->value < 0 || ctrl->value >= 2)\n\t\t\treturn -ERANGE;\n\t\tchip->muted = ctrl->value;\n\t\tif (chip->muted)\n\t\t\tchip_write_masked(chip,desc->inputreg,desc->inputmute,desc->inputmask);\n\t\telse\n\t\t\tchip_write_masked(chip,desc->inputreg,\n\t\t\t\t\tdesc->inputmap[chip->input],desc->inputmask);\n\t\treturn 0;\n\tcase V4L2_CID_AUDIO_VOLUME:\n\t{\n\t\tint volume,balance;\n\n\t\tif (!(desc->flags & CHIP_HAS_VOLUME))\n\t\t\tbreak;\n\n\t\tvolume = max(chip->left,chip->right);\n\t\tif (volume)\n\t\t\tbalance=(32768*min(chip->left,chip->right))/volume;\n\t\telse\n\t\t\tbalance=32768;\n\n\t\tvolume=ctrl->value;\n\t\tchip->left = (min(65536 - balance,32768) * volume) / 32768;\n\t\tchip->right = (min(balance,volume *(__u16)32768)) / 32768;\n\n\t\tchip_write(chip,desc->leftreg,desc->volfunc(chip->left));\n\t\tchip_write(chip,desc->rightreg,desc->volfunc(chip->right));\n\n\t\treturn 0;\n\t}\n\tcase V4L2_CID_AUDIO_BALANCE:\n\t{\n\t\tint volume, balance;\n\t\tif (!(desc->flags & CHIP_HAS_VOLUME))\n\t\t\tbreak;\n\n\t\tvolume = max(chip->left,chip->right);\n\t\tbalance = ctrl->value;\n\n\t\tchip_write(chip,desc->leftreg,desc->volfunc(chip->left));\n\t\tchip_write(chip,desc->rightreg,desc->volfunc(chip->right));\n\n\t\treturn 0;\n\t}\n\tcase V4L2_CID_AUDIO_BASS:\n\t\tif (desc->flags & CHIP_HAS_BASSTREBLE)\n\t\t\tbreak;\n\t\tchip->bass = ctrl->value;\n\t\tchip_write(chip,desc->bassreg,desc->bassfunc(chip->bass));\n\n\t\treturn 0;\n\tcase V4L2_CID_AUDIO_TREBLE:\n\t\tif (desc->flags & CHIP_HAS_BASSTREBLE)\n\t\t\treturn -EINVAL;\n\n\t\tchip->treble = ctrl->value;\n\t\tchip_write(chip,desc->treblereg,desc->treblefunc(chip->treble));\n\n\t\treturn 0;\n\t}\n\treturn -EINVAL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-395","original_id":"diversevul-395","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int chip_write_masked(struct CHIPSTATE *chip, int subaddr, int val, int mask)\n{\n\tif (mask != 0) {\n\t\tif (-1 == subaddr) {\n\t\t\tval = (chip->shadow.bytes[1] & ~mask) | (val & mask);\n\t\t} else {\n\t\t\tval = (chip->shadow.bytes[subaddr+1] & ~mask) | (val & mask);\n\t\t}\n\t}\n\treturn chip_write(chip, subaddr, val);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-396","original_id":"diversevul-396","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int chip_write(struct CHIPSTATE *chip, int subaddr, int val)\n{\n\tunsigned char buffer[2];\n\n\tif (-1 == subaddr) {\n\t\tv4l_dbg(1, debug, chip->c, \"%s: chip_write: 0x%x\\n\",\n\t\t\tchip->c->name, val);\n\t\tchip->shadow.bytes[1] = val;\n\t\tbuffer[0] = val;\n\t\tif (1 != i2c_master_send(chip->c,buffer,1)) {\n\t\t\tv4l_warn(chip->c, \"%s: I/O error (write 0x%x)\\n\",\n\t\t\t\tchip->c->name, val);\n\t\t\treturn -1;\n\t\t}\n\t} else {\n\t\tv4l_dbg(1, debug, chip->c, \"%s: chip_write: reg%d=0x%x\\n\",\n\t\t\tchip->c->name, subaddr, val);\n\t\tchip->shadow.bytes[subaddr+1] = val;\n\t\tbuffer[0] = subaddr;\n\t\tbuffer[1] = val;\n\t\tif (2 != i2c_master_send(chip->c,buffer,2)) {\n\t\t\tv4l_warn(chip->c, \"%s: I/O error (write reg%d=0x%x)\\n\",\n\t\t\tchip->c->name, subaddr, val);\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-397","original_id":"diversevul-397","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd)\n{\n\tint i;\n\n\tif (0 == cmd->count)\n\t\treturn 0;\n\n\t/* update our shadow register set; print bytes if (debug > 0) */\n\tv4l_dbg(1, debug, chip->c, \"%s: chip_cmd(%s): reg=%d, data:\",\n\t\tchip->c->name, name,cmd->bytes[0]);\n\tfor (i = 1; i < cmd->count; i++) {\n\t\tif (debug)\n\t\t\tprintk(\" 0x%x\",cmd->bytes[i]);\n\t\tchip->shadow.bytes[i+cmd->bytes[0]] = cmd->bytes[i];\n\t}\n\tif (debug)\n\t\tprintk(\"\\n\");\n\n\t/* send data to the chip */\n\tif (cmd->count != i2c_master_send(chip->c,cmd->bytes,cmd->count)) {\n\t\tv4l_warn(chip->c, \"%s: I/O error (%s)\\n\", chip->c->name, name);\n\t\treturn -1;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-398","original_id":"diversevul-398","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void audit_inotify_unregister(struct list_head *in_list)\n{\n\tstruct audit_parent *p, *n;\n\n\tlist_for_each_entry_safe(p, n, in_list, ilist) {\n\t\tlist_del(&p->ilist);\n\t\tinotify_rm_watch(audit_ih, &p->wdata);\n\t\t/* the put matching the get in audit_do_del_rule() */\n\t\tput_inotify_watch(&p->wdata);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-399","original_id":"diversevul-399","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void untag_chunk(struct audit_chunk *chunk, struct node *p)\n{\n\tstruct audit_chunk *new;\n\tstruct audit_tree *owner;\n\tint size = chunk->count - 1;\n\tint i, j;\n\n\tmutex_lock(&chunk->watch.inode->inotify_mutex);\n\tif (chunk->dead) {\n\t\tmutex_unlock(&chunk->watch.inode->inotify_mutex);\n\t\treturn;\n\t}\n\n\towner = p->owner;\n\n\tif (!size) {\n\t\tchunk->dead = 1;\n\t\tspin_lock(&hash_lock);\n\t\tlist_del_init(&chunk->trees);\n\t\tif (owner->root == chunk)\n\t\t\towner->root = NULL;\n\t\tlist_del_init(&p->list);\n\t\tlist_del_rcu(&chunk->hash);\n\t\tspin_unlock(&hash_lock);\n\t\tinotify_evict_watch(&chunk->watch);\n\t\tmutex_unlock(&chunk->watch.inode->inotify_mutex);\n\t\tput_inotify_watch(&chunk->watch);\n\t\treturn;\n\t}\n\n\tnew = alloc_chunk(size);\n\tif (!new)\n\t\tgoto Fallback;\n\tif (inotify_clone_watch(&chunk->watch, &new->watch) < 0) {\n\t\tfree_chunk(new);\n\t\tgoto Fallback;\n\t}\n\n\tchunk->dead = 1;\n\tspin_lock(&hash_lock);\n\tlist_replace_init(&chunk->trees, &new->trees);\n\tif (owner->root == chunk) {\n\t\tlist_del_init(&owner->same_root);\n\t\towner->root = NULL;\n\t}\n\n\tfor (i = j = 0; i < size; i++, j++) {\n\t\tstruct audit_tree *s;\n\t\tif (&chunk->owners[j] == p) {\n\t\t\tlist_del_init(&p->list);\n\t\t\ti--;\n\t\t\tcontinue;\n\t\t}\n\t\ts = chunk->owners[j].owner;\n\t\tnew->owners[i].owner = s;\n\t\tnew->owners[i].index = chunk->owners[j].index - j + i;\n\t\tif (!s) /* result of earlier fallback */\n\t\t\tcontinue;\n\t\tget_tree(s);\n\t\tlist_replace_init(&chunk->owners[i].list, &new->owners[j].list);\n\t}\n\n\tlist_replace_rcu(&chunk->hash, &new->hash);\n\tlist_for_each_entry(owner, &new->trees, same_root)\n\t\towner->root = new;\n\tspin_unlock(&hash_lock);\n\tinotify_evict_watch(&chunk->watch);\n\tmutex_unlock(&chunk->watch.inode->inotify_mutex);\n\tput_inotify_watch(&chunk->watch);\n\treturn;\n\nFallback:\n\t// do the best we can\n\tspin_lock(&hash_lock);\n\tif (owner->root == chunk) {\n\t\tlist_del_init(&owner->same_root);\n\t\towner->root = NULL;\n\t}\n\tlist_del_init(&p->list);\n\tp->owner = NULL;\n\tput_tree(owner);\n\tspin_unlock(&hash_lock);\n\tmutex_unlock(&chunk->watch.inode->inotify_mutex);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-400","original_id":"diversevul-400","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void trim_marked(struct audit_tree *tree)\n{\n\tstruct list_head *p, *q;\n\tspin_lock(&hash_lock);\n\tif (tree->goner) {\n\t\tspin_unlock(&hash_lock);\n\t\treturn;\n\t}\n\t/* reorder */\n\tfor (p = tree->chunks.next; p != &tree->chunks; p = q) {\n\t\tstruct node *node = list_entry(p, struct node, list);\n\t\tq = p->next;\n\t\tif (node->index & (1U<<31)) {\n\t\t\tlist_del_init(p);\n\t\t\tlist_add(p, &tree->chunks);\n\t\t}\n\t}\n\n\twhile (!list_empty(&tree->chunks)) {\n\t\tstruct node *node;\n\t\tstruct audit_chunk *chunk;\n\n\t\tnode = list_entry(tree->chunks.next, struct node, list);\n\n\t\t/* have we run out of marked? */\n\t\tif (!(node->index & (1U<<31)))\n\t\t\tbreak;\n\n\t\tchunk = find_chunk(node);\n\t\tget_inotify_watch(&chunk->watch);\n\t\tspin_unlock(&hash_lock);\n\n\t\tuntag_chunk(chunk, node);\n\n\t\tput_inotify_watch(&chunk->watch);\n\t\tspin_lock(&hash_lock);\n\t}\n\tif (!tree->root && !tree->goner) {\n\t\ttree->goner = 1;\n\t\tspin_unlock(&hash_lock);\n\t\tmutex_lock(&audit_filter_mutex);\n\t\tkill_rules(tree);\n\t\tlist_del_init(&tree->list);\n\t\tmutex_unlock(&audit_filter_mutex);\n\t\tprune_one(tree);\n\t} else {\n\t\tspin_unlock(&hash_lock);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-401","original_id":"diversevul-401","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline void free_chunk(struct audit_chunk *chunk)\n{\n\tcall_rcu(&chunk->head, __free_chunk);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-402","original_id":"diversevul-402","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid inotify_destroy(struct inotify_handle *ih)\n{\n\t/*\n\t * Destroy all of the watches for this handle. Unfortunately, not very\n\t * pretty. We cannot do a simple iteration over the list, because we\n\t * do not know the inode until we iterate to the watch. But we need to\n\t * hold inode->inotify_mutex before ih->mutex. The following works.\n\t */\n\twhile (1) {\n\t\tstruct inotify_watch *watch;\n\t\tstruct list_head *watches;\n\t\tstruct inode *inode;\n\n\t\tmutex_lock(&ih->mutex);\n\t\twatches = &ih->watches;\n\t\tif (list_empty(watches)) {\n\t\t\tmutex_unlock(&ih->mutex);\n\t\t\tbreak;\n\t\t}\n\t\twatch = list_first_entry(watches, struct inotify_watch, h_list);\n\t\tget_inotify_watch(watch);\n\t\tmutex_unlock(&ih->mutex);\n\n\t\tinode = watch->inode;\n\t\tmutex_lock(&inode->inotify_mutex);\n\t\tmutex_lock(&ih->mutex);\n\n\t\t/* make sure we didn't race with another list removal */\n\t\tif (likely(idr_find(&ih->idr, watch->wd))) {\n\t\t\tremove_watch_no_event(watch, ih);\n\t\t\tput_inotify_watch(watch);\n\t\t}\n\n\t\tmutex_unlock(&ih->mutex);\n\t\tmutex_unlock(&inode->inotify_mutex);\n\t\tput_inotify_watch(watch);\n\t}\n\n\t/* free this handle: the put matching the get in inotify_init() */\n\tput_inotify_handle(ih);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-403","original_id":"diversevul-403","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct audit_chunk *audit_tree_lookup(const struct inode *inode)\n{\n\tstruct list_head *list = chunk_hash(inode);\n\tstruct audit_chunk *p;\n\n\tlist_for_each_entry_rcu(p, list, hash) {\n\t\tif (p->watch.inode == inode) {\n\t\t\tget_inotify_watch(&p->watch);\n\t\t\treturn p;\n\t\t}\n\t}\n\treturn NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-404","original_id":"diversevul-404","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint inotify_rm_wd(struct inotify_handle *ih, u32 wd)\n{\n\tstruct inotify_watch *watch;\n\tstruct inode *inode;\n\n\tmutex_lock(&ih->mutex);\n\twatch = idr_find(&ih->idr, wd);\n\tif (unlikely(!watch)) {\n\t\tmutex_unlock(&ih->mutex);\n\t\treturn -EINVAL;\n\t}\n\tget_inotify_watch(watch);\n\tinode = watch->inode;\n\tmutex_unlock(&ih->mutex);\n\n\tmutex_lock(&inode->inotify_mutex);\n\tmutex_lock(&ih->mutex);\n\n\t/* make sure that we did not race */\n\tif (likely(idr_find(&ih->idr, wd) == watch))\n\t\tinotify_remove_watch_locked(ih, watch);\n\n\tmutex_unlock(&ih->mutex);\n\tmutex_unlock(&inode->inotify_mutex);\n\tput_inotify_watch(watch);\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-405","original_id":"diversevul-405","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline int audit_del_rule(struct audit_entry *entry,\n\t\t\t\t struct list_head *list)\n{\n\tstruct audit_entry *e;\n\tstruct audit_field *inode_f = entry->rule.inode_f;\n\tstruct audit_watch *watch, *tmp_watch = entry->rule.watch;\n\tstruct audit_tree *tree = entry->rule.tree;\n\tLIST_HEAD(inotify_list);\n\tint h, ret = 0;\n#ifdef CONFIG_AUDITSYSCALL\n\tint dont_count = 0;\n\n\t/* If either of these, don't count towards total */\n\tif (entry->rule.listnr == AUDIT_FILTER_USER ||\n\t\tentry->rule.listnr == AUDIT_FILTER_TYPE)\n\t\tdont_count = 1;\n#endif\n\n\tif (inode_f) {\n\t\th = audit_hash_ino(inode_f->val);\n\t\tlist = &audit_inode_hash[h];\n\t}\n\n\tmutex_lock(&audit_filter_mutex);\n\te = audit_find_rule(entry, list);\n\tif (!e) {\n\t\tmutex_unlock(&audit_filter_mutex);\n\t\tret = -ENOENT;\n\t\tgoto out;\n\t}\n\n\twatch = e->rule.watch;\n\tif (watch) {\n\t\tstruct audit_parent *parent = watch->parent;\n\n\t\tlist_del(&e->rule.rlist);\n\n\t\tif (list_empty(&watch->rules)) {\n\t\t\taudit_remove_watch(watch);\n\n\t\t\tif (list_empty(&parent->watches)) {\n\t\t\t\t/* Put parent on the inotify un-registration\n\t\t\t\t * list. Grab a reference before releasing\n\t\t\t\t * audit_filter_mutex, to be released in\n\t\t\t\t * audit_inotify_unregister(). */\n\t\t\t\tlist_add(&parent->ilist, &inotify_list);\n\t\t\t\tget_inotify_watch(&parent->wdata);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (e->rule.tree)\n\t\taudit_remove_tree_rule(&e->rule);\n\n\tlist_del_rcu(&e->list);\n\tcall_rcu(&e->rcu, audit_free_rule_rcu);\n\n#ifdef CONFIG_AUDITSYSCALL\n\tif (!dont_count)\n\t\taudit_n_rules--;\n\n\tif (!audit_match_signal(entry))\n\t\taudit_signals--;\n#endif\n\tmutex_unlock(&audit_filter_mutex);\n\n\tif (!list_empty(&inotify_list))\n\t\taudit_inotify_unregister(&inotify_list);\n\nout:\n\tif (tmp_watch)\n\t\taudit_put_watch(tmp_watch); /* match initial get */\n\tif (tree)\n\t\taudit_put_tree(tree);\t/* that's the temporary one */\n\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-406","original_id":"diversevul-406","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void destroy_watch(struct inotify_watch *watch)\n{\n\tstruct audit_chunk *chunk = container_of(watch, struct audit_chunk, watch);\n\tfree_chunk(chunk);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-407","original_id":"diversevul-407","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct audit_chunk *alloc_chunk(int count)\n{\n\tstruct audit_chunk *chunk;\n\tsize_t size;\n\tint i;\n\n\tsize = offsetof(struct audit_chunk, owners) + count * sizeof(struct node);\n\tchunk = kzalloc(size, GFP_KERNEL);\n\tif (!chunk)\n\t\treturn NULL;\n\n\tINIT_LIST_HEAD(&chunk->hash);\n\tINIT_LIST_HEAD(&chunk->trees);\n\tchunk->count = count;\n\tfor (i = 0; i < count; i++) {\n\t\tINIT_LIST_HEAD(&chunk->owners[i].list);\n\t\tchunk->owners[i].index = i;\n\t}\n\tinotify_init_watch(&chunk->watch);\n\treturn chunk;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-408","original_id":"diversevul-408","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid audit_put_chunk(struct audit_chunk *chunk)\n{\n\tput_inotify_watch(&chunk->watch);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-409","original_id":"diversevul-409","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct audit_chunk *find_chunk(struct node *p)\n{\n\tint index = p->index & ~(1U<<31);\n\tp -= index;\n\treturn container_of(p, struct audit_chunk, owners[0]);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-410","original_id":"diversevul-410","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void prune_one(struct audit_tree *victim)\n{\n\tspin_lock(&hash_lock);\n\twhile (!list_empty(&victim->chunks)) {\n\t\tstruct node *p;\n\t\tstruct audit_chunk *chunk;\n\n\t\tp = list_entry(victim->chunks.next, struct node, list);\n\t\tchunk = find_chunk(p);\n\t\tget_inotify_watch(&chunk->watch);\n\t\tspin_unlock(&hash_lock);\n\n\t\tuntag_chunk(chunk, p);\n\n\t\tput_inotify_watch(&chunk->watch);\n\t\tspin_lock(&hash_lock);\n\t}\n\tspin_unlock(&hash_lock);\n\tput_tree(victim);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-411","original_id":"diversevul-411","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void __free_chunk(struct rcu_head *rcu)\n{\n\tstruct audit_chunk *chunk = container_of(rcu, struct audit_chunk, head);\n\tint i;\n\n\tfor (i = 0; i < chunk->count; i++) {\n\t\tif (chunk->owners[i].owner)\n\t\t\tput_tree(chunk->owners[i].owner);\n\t}\n\tkfree(chunk);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-412","original_id":"diversevul-412","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int svc_listen(struct socket *sock,int backlog)\n{\n\tDEFINE_WAIT(wait);\n\tstruct sock *sk = sock->sk;\n\tstruct atm_vcc *vcc = ATM_SD(sock);\n\tint error;\n\n\tpr_debug(\"svc_listen %p\\n\",vcc);\n\tlock_sock(sk);\n\t/* let server handle listen on unbound sockets */\n\tif (test_bit(ATM_VF_SESSION,&vcc->flags)) {\n\t\terror = -EINVAL;\n\t\tgoto out;\n\t}\n\tvcc_insert_socket(sk);\n\tset_bit(ATM_VF_WAITING, &vcc->flags);\n\tprepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);\n\tsigd_enq(vcc,as_listen,NULL,NULL,&vcc->local);\n\twhile (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) {\n\t\tschedule();\n\t\tprepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE);\n\t}\n\tfinish_wait(sk->sk_sleep, &wait);\n\tif (!sigd) {\n\t\terror = -EUNATCH;\n\t\tgoto out;\n\t}\n\tset_bit(ATM_VF_LISTEN,&vcc->flags);\n\tsk->sk_max_ack_backlog = backlog > 0 ? backlog : ATM_BACKLOG_DEFAULT;\n\terror = -sk->sk_err;\nout:\n\trelease_sock(sk);\n\treturn error;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-413","original_id":"diversevul-413","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,\n\t\t\t struct sg_io_hdr *hdr, fmode_t mode)\n{\n\tif (copy_from_user(rq->cmd, hdr->cmdp, hdr->cmd_len))\n\t\treturn -EFAULT;\n\tif (blk_verify_command(&q->cmd_filter, rq->cmd, mode & FMODE_WRITE))\n\t\treturn -EPERM;\n\n\t/*\n\t * fill in request structure\n\t */\n\trq->cmd_len = hdr->cmd_len;\n\trq->cmd_type = REQ_TYPE_BLOCK_PC;\n\n\trq->timeout = msecs_to_jiffies(hdr->timeout);\n\tif (!rq->timeout)\n\t\trq->timeout = q->sg_timeout;\n\tif (!rq->timeout)\n\t\trq->timeout = BLK_DEFAULT_SG_TIMEOUT;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-414","original_id":"diversevul-414","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int blk_fill_sgv4_hdr_rq(struct request_queue *q, struct request *rq,\n\t\t\t\tstruct sg_io_v4 *hdr, struct bsg_device *bd,\n\t\t\t\tfmode_t has_write_perm)\n{\n\tif (hdr->request_len > BLK_MAX_CDB) {\n\t\trq->cmd = kzalloc(hdr->request_len, GFP_KERNEL);\n\t\tif (!rq->cmd)\n\t\t\treturn -ENOMEM;\n\t}\n\n\tif (copy_from_user(rq->cmd, (void *)(unsigned long)hdr->request,\n\t\t\t hdr->request_len))\n\t\treturn -EFAULT;\n\n\tif (hdr->subprotocol == BSG_SUB_PROTOCOL_SCSI_CMD) {\n\t\tif (blk_verify_command(&q->cmd_filter, rq->cmd, has_write_perm))\n\t\t\treturn -EPERM;\n\t} else if (!capable(CAP_SYS_RAWIO))\n\t\treturn -EPERM;\n\n\t/*\n\t * fill in request structure\n\t */\n\trq->cmd_len = hdr->request_len;\n\trq->cmd_type = REQ_TYPE_BLOCK_PC;\n\n\trq->timeout = (hdr->timeout * HZ) / 1000;\n\tif (!rq->timeout)\n\t\trq->timeout = q->sg_timeout;\n\tif (!rq->timeout)\n\t\trq->timeout = BLK_DEFAULT_SG_TIMEOUT;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-415","original_id":"diversevul-415","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ibwdt_set_heartbeat(int t)\n{\n\tint i;\n\n\tif ((t < 0) || (t > 30))\n\t\treturn -EINVAL;\n\n\tfor (i = 0x0F; i > -1; i--)\n\t\tif (wd_times[i] > t)\n\t\t\tbreak;\n\twd_margin = i;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-416","original_id":"diversevul-416","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid __qdisc_run(struct net_device *dev)\n{\n\tdo {\n\t\tif (!qdisc_restart(dev))\n\t\t\tbreak;\n\t} while (!netif_queue_stopped(dev));\n\n\tclear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-417","original_id":"diversevul-417","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nsctp_disposition_t sctp_sf_eat_fwd_tsn_fast(\n\tconst struct sctp_endpoint *ep,\n\tconst struct sctp_association *asoc,\n\tconst sctp_subtype_t type,\n\tvoid *arg,\n\tsctp_cmd_seq_t *commands)\n{\n\tstruct sctp_chunk *chunk = arg;\n\tstruct sctp_fwdtsn_hdr *fwdtsn_hdr;\n\t__u16 len;\n\t__u32 tsn;\n\n\tif (!sctp_vtag_verify(chunk, asoc)) {\n\t\tsctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG,\n\t\t\t\tSCTP_NULL());\n\t\treturn sctp_sf_pdiscard(ep, asoc, type, arg, commands);\n\t}\n\n\t/* Make sure that the FORWARD_TSN chunk has a valid length. */\n\tif (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_fwdtsn_chunk)))\n\t\treturn sctp_sf_violation_chunklen(ep, asoc, type, arg,\n\t\t\t\t\t\t commands);\n\n\tfwdtsn_hdr = (struct sctp_fwdtsn_hdr *)chunk->skb->data;\n\tchunk->subh.fwdtsn_hdr = fwdtsn_hdr;\n\tlen = ntohs(chunk->chunk_hdr->length);\n\tlen -= sizeof(struct sctp_chunkhdr);\n\tskb_pull(chunk->skb, len);\n\n\ttsn = ntohl(fwdtsn_hdr->new_cum_tsn);\n\tSCTP_DEBUG_PRINTK(\"%s: TSN 0x%x.\\n\", __func__, tsn);\n\n\t/* The TSN is too high--silently discard the chunk and count on it\n\t * getting retransmitted later.\n\t */\n\tif (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)\n\t\tgoto gen_shutdown;\n\n\tsctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));\n\tif (len > sizeof(struct sctp_fwdtsn_hdr))\n\t\tsctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,\n\t\t\t\tSCTP_CHUNK(chunk));\n\n\t/* Go a head and force a SACK, since we are shutting down. */\ngen_shutdown:\n\t/* Implementor's Guide.\n\t *\n\t * While in SHUTDOWN-SENT state, the SHUTDOWN sender MUST immediately\n\t * respond to each received packet containing one or more DATA chunk(s)\n\t * with a SACK, a SHUTDOWN chunk, and restart the T2-shutdown timer\n\t */\n\tsctp_add_cmd_sf(commands, SCTP_CMD_GEN_SHUTDOWN, SCTP_NULL());\n\tsctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_FORCE());\n\tsctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,\n\t\t\tSCTP_TO(SCTP_EVENT_TIMEOUT_T2_SHUTDOWN));\n\n\treturn SCTP_DISPOSITION_CONSUME;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-418","original_id":"diversevul-418","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nsctp_disposition_t sctp_sf_eat_fwd_tsn(const struct sctp_endpoint *ep,\n\t\t\t\t const struct sctp_association *asoc,\n\t\t\t\t const sctp_subtype_t type,\n\t\t\t\t void *arg,\n\t\t\t\t sctp_cmd_seq_t *commands)\n{\n\tstruct sctp_chunk *chunk = arg;\n\tstruct sctp_fwdtsn_hdr *fwdtsn_hdr;\n\t__u16 len;\n\t__u32 tsn;\n\n\tif (!sctp_vtag_verify(chunk, asoc)) {\n\t\tsctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG,\n\t\t\t\tSCTP_NULL());\n\t\treturn sctp_sf_pdiscard(ep, asoc, type, arg, commands);\n\t}\n\n\t/* Make sure that the FORWARD_TSN chunk has valid length. */\n\tif (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_fwdtsn_chunk)))\n\t\treturn sctp_sf_violation_chunklen(ep, asoc, type, arg,\n\t\t\t\t\t\t commands);\n\n\tfwdtsn_hdr = (struct sctp_fwdtsn_hdr *)chunk->skb->data;\n\tchunk->subh.fwdtsn_hdr = fwdtsn_hdr;\n\tlen = ntohs(chunk->chunk_hdr->length);\n\tlen -= sizeof(struct sctp_chunkhdr);\n\tskb_pull(chunk->skb, len);\n\n\ttsn = ntohl(fwdtsn_hdr->new_cum_tsn);\n\tSCTP_DEBUG_PRINTK(\"%s: TSN 0x%x.\\n\", __func__, tsn);\n\n\t/* The TSN is too high--silently discard the chunk and count on it\n\t * getting retransmitted later.\n\t */\n\tif (sctp_tsnmap_check(&asoc->peer.tsn_map, tsn) < 0)\n\t\tgoto discard_noforce;\n\n\tsctp_add_cmd_sf(commands, SCTP_CMD_REPORT_FWDTSN, SCTP_U32(tsn));\n\tif (len > sizeof(struct sctp_fwdtsn_hdr))\n\t\tsctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_FWDTSN,\n\t\t\t\tSCTP_CHUNK(chunk));\n\n\t/* Count this as receiving DATA. */\n\tif (asoc->autoclose) {\n\t\tsctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,\n\t\t\t\tSCTP_TO(SCTP_EVENT_TIMEOUT_AUTOCLOSE));\n\t}\n\n\t/* FIXME: For now send a SACK, but DATA processing may\n\t * send another.\n\t */\n\tsctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_NOFORCE());\n\n\treturn SCTP_DISPOSITION_CONSUME;\n\ndiscard_noforce:\n\treturn SCTP_DISPOSITION_DISCARD;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-419","original_id":"diversevul-419","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_AFmoduleinst _af_ms_adpcm_init_decompress (_Track *track, AFvirtualfile *fh,\n\tbool seekok, bool headerless, AFframecount *chunkframes)\n{\n\t_AFmoduleinst\tret = _AFnewmodinst(&ms_adpcm_decompress);\n\tms_adpcm_data\t*d;\n\tAUpvlist\tpv;\n\tlong\t\tl;\n\tvoid\t\t*v;\n\n\tassert(af_ftell(fh) == track->fpos_first_frame);\n\n\td = (ms_adpcm_data *) _af_malloc(sizeof (ms_adpcm_data));\n\n\td->track = track;\n\td->fh = fh;\n\n\td->track->frames2ignore = 0;\n\td->track->fpos_next_frame = d->track->fpos_first_frame;\n\n\tpv = d->track->f.compressionParams;\n\tif (_af_pv_getlong(pv, _AF_MS_ADPCM_NUM_COEFFICIENTS, &l))\n\t\td->numCoefficients = l;\n\telse\n\t\t_af_error(AF_BAD_CODEC_CONFIG, \"number of coefficients not set\");\n\n\tif (_af_pv_getptr(pv, _AF_MS_ADPCM_COEFFICIENTS, &v))\n\t\tmemcpy(d->coefficients, v, sizeof (int16_t) * 256 * 2);\n\telse\n\t\t_af_error(AF_BAD_CODEC_CONFIG, \"coefficient array not set\");\n\n\tif (_af_pv_getlong(pv, _AF_SAMPLES_PER_BLOCK, &l))\n\t\td->samplesPerBlock = l;\n\telse\n\t\t_af_error(AF_BAD_CODEC_CONFIG, \"samples per block not set\");\n\n\tif (_af_pv_getlong(pv, _AF_BLOCK_SIZE, &l))\n\t\td->blockAlign = l;\n\telse\n\t\t_af_error(AF_BAD_CODEC_CONFIG, \"block size not set\");\n\n\t*chunkframes = d->samplesPerBlock / d->track->f.channelCount;\n\n\tret.modspec = d;\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-420","original_id":"diversevul-420","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ms_adpcm_run_pull (_AFmoduleinst *module)\n{\n\tms_adpcm_data\t*d = (ms_adpcm_data *) module->modspec;\n\tAFframecount\tframes2read = module->outc->nframes;\n\tAFframecount\tnframes = 0;\n\tint\t\ti, framesPerBlock, blockCount;\n\tssize_t\t\tblocksRead, bytesDecoded;\n\n\tframesPerBlock = d->samplesPerBlock / d->track->f.channelCount;\n\tassert(module->outc->nframes % framesPerBlock == 0);\n\tblockCount = module->outc->nframes / framesPerBlock;\n\n\t/* Read the compressed frames. */\n\tblocksRead = af_fread(module->inc->buf, d->blockAlign, blockCount, d->fh);\n\n\t/* Decompress into module->outc. */\n\tfor (i=0; i<blockCount; i++)\n\t{\n\t\tbytesDecoded = ms_adpcm_decode_block(d,\n\t\t\t(uint8_t *) module->inc->buf + i * d->blockAlign,\n\t\t\t(int16_t *) module->outc->buf + i * d->samplesPerBlock);\n\n\t\tnframes += framesPerBlock;\n\t}\n\n\td->track->nextfframe += nframes;\n\n\tif (blocksRead > 0)\n\t\td->track->fpos_next_frame += blocksRead * d->blockAlign;\n\n\tassert(af_ftell(d->fh) == d->track->fpos_next_frame);\n\n\t/*\n\t\tIf we got EOF from read, then we return the actual amount read.\n\n\t\tComplain only if there should have been more frames in the file.\n\t*/\n\n\tif (d->track->totalfframes != -1 && nframes != frames2read)\n\t{\n\t\t/* Report error if we haven't already */\n\t\tif (d->track->filemodhappy)\n\t\t{\n\t\t\t_af_error(AF_BAD_READ,\n\t\t\t\t\"file missing data -- read %d frames, should be %d\",\n\t\t\t\td->track->nextfframe,\n\t\t\t\td->track->totalfframes);\n\t\t\td->track->filemodhappy = AF_FALSE;\n\t\t}\n\t}\n\n\tmodule->outc->nframes = nframes;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-421","original_id":"diversevul-421","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ms_adpcm_reset2 (_AFmoduleinst *i)\n{\n\tms_adpcm_data\t*d = (ms_adpcm_data *) i->modspec;\n\tint\t\tframesPerBlock;\n\n\tframesPerBlock = d->samplesPerBlock / d->track->f.channelCount;\n\n\td->track->fpos_next_frame = d->track->fpos_first_frame +\n\t\td->blockAlign * (d->track->nextfframe / framesPerBlock);\n\td->track->frames2ignore += d->framesToIgnore;\n\n\tassert(d->track->nextfframe % framesPerBlock == 0);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-422","original_id":"diversevul-422","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ima_adpcm_reset2 (_AFmoduleinst *i)\n{\n\tima_adpcm_data\t*d = (ima_adpcm_data *) i->modspec;\n\tint\t\tframesPerBlock;\n\n\tframesPerBlock = d->samplesPerBlock / d->track->f.channelCount;\n\n\td->track->fpos_next_frame = d->track->fpos_first_frame +\n\t\td->blockAlign * (d->track->nextfframe / framesPerBlock);\n\td->track->frames2ignore += d->framesToIgnore;\n\n\tassert(d->track->nextfframe % framesPerBlock == 0);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-423","original_id":"diversevul-423","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid _af_adpcm_decoder (uint8_t *indata, int16_t *outdata, int len,\n\tstruct adpcm_state *state)\n{\n uint8_t *inp;\t\t/* Input buffer pointer */\n int16_t *outp;\t\t/* output buffer pointer */\n int sign;\t\t\t/* Current adpcm sign bit */\n int delta;\t\t\t/* Current adpcm output value */\n int step;\t\t\t/* Stepsize */\n int valpred;\t\t/* Predicted value */\n int vpdiff;\t\t\t/* Current change to valpred */\n int index;\t\t\t/* Current step change index */\n int inputbuffer;\t\t/* place to keep next 4-bit value */\n int bufferstep;\t\t/* toggle between inputbuffer/input */\n\n outp = outdata;\n inp = indata;\n\n valpred = state->valprev;\n index = state->index;\n step = stepsizeTable[index];\n\n bufferstep = 0;\n \n for ( ; len > 0 ; len-- ) {\n\t\n\t/* Step 1 - get the delta value */\n\tif ( bufferstep ) {\n\t delta = (inputbuffer >> 4) & 0xf;\n\t} else {\n\t inputbuffer = *inp++;\n\t delta = inputbuffer & 0xf;\n\t}\n\tbufferstep = !bufferstep;\n\n\t/* Step 2 - Find new index value (for later) */\n\tindex += indexTable[delta];\n\tif ( index < 0 ) index = 0;\n\tif ( index > 88 ) index = 88;\n\n\t/* Step 3 - Separate sign and magnitude */\n\tsign = delta & 8;\n\tdelta = delta & 7;\n\n\t/* Step 4 - Compute difference and new predicted value */\n\t/*\n\t** Computes 'vpdiff = (delta+0.5)*step/4', but see comment\n\t** in adpcm_coder.\n\t*/\n\tvpdiff = step >> 3;\n\tif ( delta & 4 ) vpdiff += step;\n\tif ( delta & 2 ) vpdiff += step>>1;\n\tif ( delta & 1 ) vpdiff += step>>2;\n\n\tif ( sign )\n\t valpred -= vpdiff;\n\telse\n\t valpred += vpdiff;\n\n\t/* Step 5 - clamp output value */\n\tif ( valpred > 32767 )\n\t valpred = 32767;\n\telse if ( valpred < -32768 )\n\t valpred = -32768;\n\n\t/* Step 6 - Update step value */\n\tstep = stepsizeTable[index];\n\n\t/* Step 7 - Output value */\n\t*outp++ = valpred;\n }\n\n state->valprev = valpred;\n state->index = index;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-424","original_id":"diversevul-424","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ima_adpcm_decode_block (ima_adpcm_data *ima, uint8_t *encoded,\n\tint16_t *decoded)\n{\n\tint outputLength;\n\n\tstruct adpcm_state state;\n\n\toutputLength = ima->samplesPerBlock * sizeof (int16_t) *\n\t\tima->track->f.channelCount;\n\n\tstate.valprev = (encoded[1]<<8) | encoded[0];\n\tif (encoded[1] & 0x80)\n\t\tstate.valprev -= 0x10000;\n\n\tstate.index = encoded[2];\n\n\t*decoded++ = state.valprev;\n\n\tencoded += 4;\n\n\t_af_adpcm_decoder(encoded, decoded, ima->samplesPerBlock - 1, &state);\n\n\treturn outputLength;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-425","original_id":"diversevul-425","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_AFmoduleinst _af_ima_adpcm_init_decompress (_Track *track, AFvirtualfile *fh,\n\tbool seekok, bool headerless, AFframecount *chunkframes)\n{\n\t_AFmoduleinst\tret = _AFnewmodinst(&ima_adpcm_decompress);\n\tima_adpcm_data\t*d;\n\tAUpvlist\tpv;\n\tlong\t\tl;\n\n\tassert(af_ftell(fh) == track->fpos_first_frame);\n\n\td = (ima_adpcm_data *) _af_malloc(sizeof (ima_adpcm_data));\n\n\td->track = track;\n\td->fh = fh;\n\n\td->track->frames2ignore = 0;\n\td->track->fpos_next_frame = d->track->fpos_first_frame;\n\n\tpv = d->track->f.compressionParams;\n\n\tif (_af_pv_getlong(pv, _AF_SAMPLES_PER_BLOCK, &l))\n\t\td->samplesPerBlock = l;\n\telse\n\t\t_af_error(AF_BAD_CODEC_CONFIG, \"samples per block not set\");\n\n\tif (_af_pv_getlong(pv, _AF_BLOCK_SIZE, &l))\n\t\td->blockAlign = l;\n\telse\n\t\t_af_error(AF_BAD_CODEC_CONFIG, \"block size not set\");\n\n\t*chunkframes = d->samplesPerBlock / d->track->f.channelCount;\n\n\tret.modspec = d;\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-426","original_id":"diversevul-426","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ima_adpcm_reset1 (_AFmoduleinst *i)\n{\n\tima_adpcm_data\t*d = (ima_adpcm_data *) i->modspec;\n\tAFframecount\tnextTrackFrame;\n\tint\t\tframesPerBlock;\n\n\tframesPerBlock = d->samplesPerBlock / d->track->f.channelCount;\n\n\tnextTrackFrame = d->track->nextfframe;\n\td->track->nextfframe = (nextTrackFrame / framesPerBlock) *\n\t\tframesPerBlock;\n\n\td->framesToIgnore = nextTrackFrame - d->track->nextfframe;\n\t/* postroll = frames2ignore */\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-427","original_id":"diversevul-427","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ima_adpcm_run_pull (_AFmoduleinst *module)\n{\n\tima_adpcm_data\t*d = (ima_adpcm_data *) module->modspec;\n\tAFframecount\tframes2read = module->outc->nframes;\n\tAFframecount\tnframes = 0;\n\tint\t\ti, framesPerBlock, blockCount;\n\tssize_t\t\tblocksRead, bytesDecoded;\n\n\tframesPerBlock = d->samplesPerBlock / d->track->f.channelCount;\n\tassert(module->outc->nframes % framesPerBlock == 0);\n\tblockCount = module->outc->nframes / framesPerBlock;\n\n\t/* Read the compressed frames. */\n\tblocksRead = af_fread(module->inc->buf, d->blockAlign, blockCount, d->fh);\n\n\t/* This condition would indicate that the file is bad. */\n\tif (blocksRead < 0)\n\t{\n\t\tif (d->track->filemodhappy)\n\t\t{\n\t\t\t_af_error(AF_BAD_READ, \"file missing data\");\n\t\t\td->track->filemodhappy = AF_FALSE;\n\t\t}\n\t}\n\n\tif (blocksRead < blockCount)\n\t\tblockCount = blocksRead;\n\n\t/* Decompress into module->outc. */\n\tfor (i=0; i<blockCount; i++)\n\t{\n\t\tbytesDecoded = ima_adpcm_decode_block(d,\n\t\t\t(uint8_t *) module->inc->buf + i * d->blockAlign,\n\t\t\t(int16_t *) module->outc->buf + i * d->samplesPerBlock);\n\n\t\tnframes += framesPerBlock;\n\t}\n\n\td->track->nextfframe += nframes;\n\n\tif (blocksRead > 0)\n\t\td->track->fpos_next_frame += blocksRead * d->blockAlign;\n\n\tassert(af_ftell(d->fh) == d->track->fpos_next_frame);\n\n\t/*\n\t\tIf we got EOF from read, then we return the actual amount read.\n\n\t\tComplain only if there should have been more frames in the file.\n\t*/\n\n\tif (d->track->totalfframes != -1 && nframes != frames2read)\n\t{\n\t\t/* Report error if we haven't already */\n\t\tif (d->track->filemodhappy)\n\t\t{\n\t\t\t_af_error(AF_BAD_READ,\n\t\t\t\t\"file missing data -- read %d frames, should be %d\",\n\t\t\t\td->track->nextfframe,\n\t\t\t\td->track->totalfframes);\n\t\t\td->track->filemodhappy = AF_FALSE;\n\t\t}\n\t}\n\n\tmodule->outc->nframes = nframes;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-528","original_id":"diversevul-528","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ms_adpcm_decode_block (ms_adpcm_data *msadpcm, uint8_t *encoded,\n\tint16_t *decoded)\n{\n\tint\t\ti, outputLength, samplesRemaining;\n\tint\t\tchannelCount;\n\tint16_t\t\t*coefficient[2];\n\tms_adpcm_state\tdecoderState[2];\n\tms_adpcm_state\t*state[2];\n\n\t/* Calculate the number of bytes needed for decoded data. */\n\toutputLength = msadpcm->samplesPerBlock * sizeof (int16_t) *\n\t\tmsadpcm->track->f.channelCount;\n\n\tchannelCount = msadpcm->track->f.channelCount;\n\n\tstate[0] = &decoderState[0];\n\tif (channelCount == 2)\n\t\tstate[1] = &decoderState[1];\n\telse\n\t\tstate[1] = &decoderState[0];\n\n\t/* Initialize predictor. */\n\tfor (i=0; i<channelCount; i++)\n\t{\n\t\tstate[i]->predictor = *encoded++;\n\t\tassert(state[i]->predictor < msadpcm->numCoefficients);\n\t}\n\n\t/* Initialize delta. */\n\tfor (i=0; i<channelCount; i++)\n\t{\n\t\tstate[i]->delta = (encoded[1]<<8) | encoded[0];\n\t\tencoded += sizeof (uint16_t);\n\t}\n\n\t/* Initialize first two samples. */\n\tfor (i=0; i<channelCount; i++)\n\t{\n\t\tstate[i]->sample1 = (encoded[1]<<8) | encoded[0];\n\t\tencoded += sizeof (uint16_t);\n\t}\n\n\tfor (i=0; i<channelCount; i++)\n\t{\n\t\tstate[i]->sample2 = (encoded[1]<<8) | encoded[0];\n\t\tencoded += sizeof (uint16_t);\n\t}\n\n\tcoefficient[0] = msadpcm->coefficients[state[0]->predictor];\n\tcoefficient[1] = msadpcm->coefficients[state[1]->predictor];\n\n\tfor (i=0; i<channelCount; i++)\n\t\t*decoded++ = state[i]->sample2;\n\n\tfor (i=0; i<channelCount; i++)\n\t\t*decoded++ = state[i]->sample1;\n\n\t/*\n\t\tThe first two samples have already been 'decoded' in\n\t\tthe block header.\n\t*/\n\tsamplesRemaining = (msadpcm->samplesPerBlock - 2) *\n\t\tmsadpcm->track->f.channelCount;\n\n\twhile (samplesRemaining > 0)\n\t{\n\t\tuint8_t code;\n\t\tint16_t newSample;\n\n\t\tcode = *encoded >> 4;\n\t\tnewSample = ms_adpcm_decode_sample(state[0], code,\n\t\t\tcoefficient[0]);\n\t\t*decoded++ = newSample;\n\n\t\tcode = *encoded & 0x0f;\n\t\tnewSample = ms_adpcm_decode_sample(state[1], code,\n\t\t\tcoefficient[1]);\n\t\t*decoded++ = newSample;\n\n\t\tencoded++;\n\t\tsamplesRemaining -= 2;\n\t}\n\n\treturn outputLength;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-529","original_id":"diversevul-529","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ms_adpcm_reset1 (_AFmoduleinst *i)\n{\n\tms_adpcm_data\t*d = (ms_adpcm_data *) i->modspec;\n\tAFframecount\tnextTrackFrame;\n\tint\t\tframesPerBlock;\n\n\tframesPerBlock = d->samplesPerBlock / d->track->f.channelCount;\n\n\tnextTrackFrame = d->track->nextfframe;\n\td->track->nextfframe = (nextTrackFrame / framesPerBlock) *\n\t\tframesPerBlock;\n\n\td->framesToIgnore = nextTrackFrame - d->track->nextfframe;\n\t/* postroll = frames2ignore */\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-530","original_id":"diversevul-530","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nlong keyctl_join_session_keyring(const char __user *_name)\n{\n\tchar *name;\n\tlong ret;\n\n\t/* fetch the name from userspace */\n\tname = NULL;\n\tif (_name) {\n\t\tname = strndup_user(_name, PAGE_SIZE);\n\t\tif (IS_ERR(name)) {\n\t\t\tret = PTR_ERR(name);\n\t\t\tgoto error;\n\t\t}\n\t}\n\n\t/* join the session */\n\tret = join_session_keyring(name);\n\n error:\n\treturn ret;\n\n} /* end keyctl_join_session_keyring() */\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-531","original_id":"diversevul-531","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int skfp_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)\n{\n\tstruct s_smc *smc = netdev_priv(dev);\n\tskfddi_priv *lp = &smc->os;\n\tstruct s_skfp_ioctl ioc;\n\tint status = 0;\n\n\tif (copy_from_user(&ioc, rq->ifr_data, sizeof(struct s_skfp_ioctl)))\n\t\treturn -EFAULT;\n\n\tswitch (ioc.cmd) {\n\tcase SKFP_GET_STATS:\t/* Get the driver statistics */\n\t\tioc.len = sizeof(lp->MacStat);\n\t\tstatus = copy_to_user(ioc.data, skfp_ctl_get_stats(dev), ioc.len)\n\t\t\t\t? -EFAULT : 0;\n\t\tbreak;\n\tcase SKFP_CLR_STATS:\t/* Zero out the driver statistics */\n\t\tif (!capable(CAP_NET_ADMIN)) {\n\t\t\tmemset(&lp->MacStat, 0, sizeof(lp->MacStat));\n\t\t} else {\n\t\t\tstatus = -EPERM;\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tprintk(\"ioctl for %s: unknow cmd: %04x\\n\", dev->name, ioc.cmd);\n\t\tstatus = -EOPNOTSUPP;\n\n\t}\t\t\t// switch\n\n\treturn status;\n}\t\t\t\t// skfp_ioctl\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-532","original_id":"diversevul-532","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int ext4_block_to_path(struct inode *inode,\n\t\t\text4_lblk_t i_block,\n\t\t\text4_lblk_t offsets[4], int *boundary)\n{\n\tint ptrs = EXT4_ADDR_PER_BLOCK(inode->i_sb);\n\tint ptrs_bits = EXT4_ADDR_PER_BLOCK_BITS(inode->i_sb);\n\tconst long direct_blocks = EXT4_NDIR_BLOCKS,\n\t\tindirect_blocks = ptrs,\n\t\tdouble_blocks = (1 << (ptrs_bits * 2));\n\tint n = 0;\n\tint final = 0;\n\n\tif (i_block < 0) {\n\t\text4_warning(inode->i_sb, \"ext4_block_to_path\", \"block < 0\");\n\t} else if (i_block < direct_blocks) {\n\t\toffsets[n++] = i_block;\n\t\tfinal = direct_blocks;\n\t} else if ((i_block -= direct_blocks) < indirect_blocks) {\n\t\toffsets[n++] = EXT4_IND_BLOCK;\n\t\toffsets[n++] = i_block;\n\t\tfinal = ptrs;\n\t} else if ((i_block -= indirect_blocks) < double_blocks) {\n\t\toffsets[n++] = EXT4_DIND_BLOCK;\n\t\toffsets[n++] = i_block >> ptrs_bits;\n\t\toffsets[n++] = i_block & (ptrs - 1);\n\t\tfinal = ptrs;\n\t} else if (((i_block -= double_blocks) >> (ptrs_bits * 2)) < ptrs) {\n\t\toffsets[n++] = EXT4_TIND_BLOCK;\n\t\toffsets[n++] = i_block >> (ptrs_bits * 2);\n\t\toffsets[n++] = (i_block >> ptrs_bits) & (ptrs - 1);\n\t\toffsets[n++] = i_block & (ptrs - 1);\n\t\tfinal = ptrs;\n\t} else {\n\t\text4_warning(inode->i_sb, \"ext4_block_to_path\",\n\t\t\t\t\"block %lu > max\",\n\t\t\t\ti_block + direct_blocks +\n\t\t\t\tindirect_blocks + double_blocks);\n\t}\n\tif (boundary)\n\t\t*boundary = final - 1 - (i_block & (ptrs - 1));\n\treturn n;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-533","original_id":"diversevul-533","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n\nstatic inline loff_t ext4_isize(struct ext4_inode *raw_inode)\n{\n\treturn ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) |\n\t\tle32_to_cpu(raw_inode->i_size_lo);\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-534","original_id":"diversevul-534","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint selinux_netlbl_inode_permission(struct inode *inode, int mask)\n{\n\tint rc;\n\tstruct sock *sk;\n\tstruct socket *sock;\n\tstruct sk_security_struct *sksec;\n\n\tif (!S_ISSOCK(inode->i_mode) ||\n\t ((mask & (MAY_WRITE | MAY_APPEND)) == 0))\n\t\treturn 0;\n\n\tsock = SOCKET_I(inode);\n\tsk = sock->sk;\n\tsksec = sk->sk_security;\n\tif (sksec->nlbl_state != NLBL_REQUIRE)\n\t\treturn 0;\n\n\tlocal_bh_disable();\n\tbh_lock_sock_nested(sk);\n\tif (likely(sksec->nlbl_state == NLBL_REQUIRE))\n\t\trc = selinux_netlbl_sock_setsid(sk);\n\telse\n\t\trc = 0;\n\tbh_unlock_sock(sk);\n\tlocal_bh_enable();\n\n\treturn rc;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-535","original_id":"diversevul-535","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int originates_from_local_legacy_unicast_socket(AvahiServer *s, const AvahiAddress *address, uint16_t port) {\n assert(s);\n assert(address);\n assert(port > 0);\n\n if (!s->config.enable_reflector)\n return 0;\n\n if (!avahi_address_is_local(s->monitor, address))\n return 0;\n\n if (address->proto == AVAHI_PROTO_INET && s->fd_legacy_unicast_ipv4 >= 0) {\n struct sockaddr_in lsa;\n socklen_t l = sizeof(lsa);\n\n if (getsockname(s->fd_legacy_unicast_ipv4, (struct sockaddr*) &lsa, &l) != 0)\n avahi_log_warn(\"getsockname(): %s\", strerror(errno));\n else\n return lsa.sin_port == port;\n\n }\n\n if (address->proto == AVAHI_PROTO_INET6 && s->fd_legacy_unicast_ipv6 >= 0) {\n struct sockaddr_in6 lsa;\n socklen_t l = sizeof(lsa);\n\n if (getsockname(s->fd_legacy_unicast_ipv6, (struct sockaddr*) &lsa, &l) != 0)\n avahi_log_warn(\"getsockname(): %s\", strerror(errno));\n else\n return lsa.sin6_port == port;\n }\n\n return 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-536","original_id":"diversevul-536","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic ssize_t inotify_read(struct file *file, char __user *buf,\n\t\t\t size_t count, loff_t *pos)\n{\n\tsize_t event_size = sizeof (struct inotify_event);\n\tstruct inotify_device *dev;\n\tchar __user *start;\n\tint ret;\n\tDEFINE_WAIT(wait);\n\n\tstart = buf;\n\tdev = file->private_data;\n\n\twhile (1) {\n\n\t\tprepare_to_wait(&dev->wq, &wait, TASK_INTERRUPTIBLE);\n\n\t\tmutex_lock(&dev->ev_mutex);\n\t\tif (!list_empty(&dev->events)) {\n\t\t\tret = 0;\n\t\t\tbreak;\n\t\t}\n\t\tmutex_unlock(&dev->ev_mutex);\n\n\t\tif (file->f_flags & O_NONBLOCK) {\n\t\t\tret = -EAGAIN;\n\t\t\tbreak;\n\t\t}\n\n\t\tif (signal_pending(current)) {\n\t\t\tret = -EINTR;\n\t\t\tbreak;\n\t\t}\n\n\t\tschedule();\n\t}\n\n\tfinish_wait(&dev->wq, &wait);\n\tif (ret)\n\t\treturn ret;\n\n\twhile (1) {\n\t\tstruct inotify_kernel_event *kevent;\n\n\t\tret = buf - start;\n\t\tif (list_empty(&dev->events))\n\t\t\tbreak;\n\n\t\tkevent = inotify_dev_get_event(dev);\n\t\tif (event_size + kevent->event.len > count) {\n\t\t\tif (ret == 0 && count > 0) {\n\t\t\t\t/*\n\t\t\t\t * could not get a single event because we\n\t\t\t\t * didn't have enough buffer space.\n\t\t\t\t */\n\t\t\t\tret = -EINVAL;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tremove_kevent(dev, kevent);\n\n\t\t/*\n\t\t * Must perform the copy_to_user outside the mutex in order\n\t\t * to avoid a lock order reversal with mmap_sem.\n\t\t */\n\t\tmutex_unlock(&dev->ev_mutex);\n\n\t\tif (copy_to_user(buf, &kevent->event, event_size)) {\n\t\t\tret = -EFAULT;\n\t\t\tbreak;\n\t\t}\n\t\tbuf += event_size;\n\t\tcount -= event_size;\n\n\t\tif (kevent->name) {\n\t\t\tif (copy_to_user(buf, kevent->name, kevent->event.len)){\n\t\t\t\tret = -EFAULT;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbuf += kevent->event.len;\n\t\t\tcount -= kevent->event.len;\n\t\t}\n\n\t\tfree_kevent(kevent);\n\n\t\tmutex_lock(&dev->ev_mutex);\n\t}\n\tmutex_unlock(&dev->ev_mutex);\n\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-399"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-537","original_id":"diversevul-537","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint ecryptfs_write_metadata(struct dentry *ecryptfs_dentry)\n{\n\tstruct ecryptfs_crypt_stat *crypt_stat =\n\t\t&ecryptfs_inode_to_private(ecryptfs_dentry->d_inode)->crypt_stat;\n\tchar *virt;\n\tsize_t size = 0;\n\tint rc = 0;\n\n\tif (likely(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) {\n\t\tif (!(crypt_stat->flags & ECRYPTFS_KEY_VALID)) {\n\t\t\tprintk(KERN_ERR \"Key is invalid; bailing out\\n\");\n\t\t\trc = -EINVAL;\n\t\t\tgoto out;\n\t\t}\n\t} else {\n\t\tprintk(KERN_WARNING \"%s: Encrypted flag not set\\n\",\n\t\t __func__);\n\t\trc = -EINVAL;\n\t\tgoto out;\n\t}\n\t/* Released in this function */\n\tvirt = (char *)get_zeroed_page(GFP_KERNEL);\n\tif (!virt) {\n\t\tprintk(KERN_ERR \"%s: Out of memory\\n\", __func__);\n\t\trc = -ENOMEM;\n\t\tgoto out;\n\t}\n\trc = ecryptfs_write_headers_virt(virt, PAGE_CACHE_SIZE, &size,\n\t\t\t\t\t crypt_stat, ecryptfs_dentry);\n\tif (unlikely(rc)) {\n\t\tprintk(KERN_ERR \"%s: Error whilst writing headers; rc = [%d]\\n\",\n\t\t __func__, rc);\n\t\tgoto out_free;\n\t}\n\tif (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR)\n\t\trc = ecryptfs_write_metadata_to_xattr(ecryptfs_dentry,\n\t\t\t\t\t\t crypt_stat, virt, size);\n\telse\n\t\trc = ecryptfs_write_metadata_to_contents(crypt_stat,\n\t\t\t\t\t\t\t ecryptfs_dentry, virt);\n\tif (rc) {\n\t\tprintk(KERN_ERR \"%s: Error writing metadata out to lower file; \"\n\t\t \"rc = [%d]\\n\", __func__, rc);\n\t\tgoto out_free;\n\t}\nout_free:\n\tfree_page((unsigned long)virt);\nout:\n\treturn rc;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-538","original_id":"diversevul-538","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\necryptfs_write_metadata_to_xattr(struct dentry *ecryptfs_dentry,\n\t\t\t\t struct ecryptfs_crypt_stat *crypt_stat,\n\t\t\t\t char *page_virt, size_t size)\n{\n\tint rc;\n\n\trc = ecryptfs_setxattr(ecryptfs_dentry, ECRYPTFS_XATTR_NAME, page_virt,\n\t\t\t size, 0);\n\treturn rc;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-539","original_id":"diversevul-539","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\necryptfs_write_metadata_to_contents(struct ecryptfs_crypt_stat *crypt_stat,\n\t\t\t\t struct dentry *ecryptfs_dentry,\n\t\t\t\t char *virt)\n{\n\tint rc;\n\n\trc = ecryptfs_write_lower(ecryptfs_dentry->d_inode, virt,\n\t\t\t\t 0, crypt_stat->num_header_bytes_at_front);\n\tif (rc)\n\t\tprintk(KERN_ERR \"%s: Error attempting to write header \"\n\t\t \"information to lower file; rc = [%d]\\n\", __func__,\n\t\t rc);\n\treturn rc;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-189"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-540","original_id":"diversevul-540","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct nfs_server *nfs4_create_server(const struct nfs4_mount_data *data,\n\t\t\t\t const char *hostname,\n\t\t\t\t const struct sockaddr_in *addr,\n\t\t\t\t const char *mntpath,\n\t\t\t\t const char *ip_addr,\n\t\t\t\t rpc_authflavor_t authflavour,\n\t\t\t\t struct nfs_fh *mntfh)\n{\n\tstruct nfs_fattr fattr;\n\tstruct nfs_server *server;\n\tint error;\n\n\tdprintk(\"--> nfs4_create_server()\\n\");\n\n\tserver = nfs_alloc_server();\n\tif (!server)\n\t\treturn ERR_PTR(-ENOMEM);\n\n\t/* Get a client record */\n\terror = nfs4_set_client(server, hostname, addr, ip_addr, authflavour,\n\t\t\tdata->proto, data->timeo, data->retrans);\n\tif (error < 0)\n\t\tgoto error;\n\n\t/* set up the general RPC client */\n\terror = nfs4_init_server(server, data, authflavour);\n\tif (error < 0)\n\t\tgoto error;\n\n\tBUG_ON(!server->nfs_client);\n\tBUG_ON(!server->nfs_client->rpc_ops);\n\tBUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);\n\n\t/* Probe the root fh to retrieve its FSID */\n\terror = nfs4_path_walk(server, mntfh, mntpath);\n\tif (error < 0)\n\t\tgoto error;\n\n\tdprintk(\"Server FSID: %llx:%llx\\n\",\n\t\t(unsigned long long) server->fsid.major,\n\t\t(unsigned long long) server->fsid.minor);\n\tdprintk(\"Mount FH: %d\\n\", mntfh->size);\n\n\terror = nfs_probe_fsinfo(server, mntfh, &fattr);\n\tif (error < 0)\n\t\tgoto error;\n\n\tBUG_ON(!server->nfs_client);\n\tBUG_ON(!server->nfs_client->rpc_ops);\n\tBUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);\n\n\tspin_lock(&nfs_client_lock);\n\tlist_add_tail(&server->client_link, &server->nfs_client->cl_superblocks);\n\tlist_add_tail(&server->master_link, &nfs_volume_list);\n\tspin_unlock(&nfs_client_lock);\n\n\tserver->mount_time = jiffies;\n\tdprintk(\"<-- nfs4_create_server() = %p\\n\", server);\n\treturn server;\n\nerror:\n\tnfs_free_server(server);\n\tdprintk(\"<-- nfs4_create_server() = error %d\\n\", error);\n\treturn ERR_PTR(error);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-541","original_id":"diversevul-541","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)\n{\n\tstruct dentry *parent = desc->file->f_path.dentry;\n\tstruct inode *dir = parent->d_inode;\n\tstruct nfs_entry *entry = desc->entry;\n\tstruct dentry *dentry, *alias;\n\tstruct qstr name = {\n\t\t.name = entry->name,\n\t\t.len = entry->len,\n\t};\n\tstruct inode *inode;\n\n\tswitch (name.len) {\n\t\tcase 2:\n\t\t\tif (name.name[0] == '.' && name.name[1] == '.')\n\t\t\t\treturn dget_parent(parent);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (name.name[0] == '.')\n\t\t\t\treturn dget(parent);\n\t}\n\tname.hash = full_name_hash(name.name, name.len);\n\tdentry = d_lookup(parent, &name);\n\tif (dentry != NULL) {\n\t\t/* Is this a positive dentry that matches the readdir info? */\n\t\tif (dentry->d_inode != NULL &&\n\t\t\t\t(NFS_FILEID(dentry->d_inode) == entry->ino ||\n\t\t\t\td_mountpoint(dentry))) {\n\t\t\tif (!desc->plus || entry->fh->size == 0)\n\t\t\t\treturn dentry;\n\t\t\tif (nfs_compare_fh(NFS_FH(dentry->d_inode),\n\t\t\t\t\t\tentry->fh) == 0)\n\t\t\t\tgoto out_renew;\n\t\t}\n\t\t/* No, so d_drop to allow one to be created */\n\t\td_drop(dentry);\n\t\tdput(dentry);\n\t}\n\tif (!desc->plus || !(entry->fattr->valid & NFS_ATTR_FATTR))\n\t\treturn NULL;\n\t/* Note: caller is already holding the dir->i_mutex! */\n\tdentry = d_alloc(parent, &name);\n\tif (dentry == NULL)\n\t\treturn NULL;\n\tdentry->d_op = NFS_PROTO(dir)->dentry_ops;\n\tinode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr);\n\tif (IS_ERR(inode)) {\n\t\tdput(dentry);\n\t\treturn NULL;\n\t}\n\n\talias = d_materialise_unique(dentry, inode);\n\tif (alias != NULL) {\n\t\tdput(dentry);\n\t\tif (IS_ERR(alias))\n\t\t\treturn NULL;\n\t\tdentry = alias;\n\t}\n\n\tnfs_renew_times(dentry);\n\tnfs_set_verifier(dentry, nfs_save_change_attribute(dir));\n\treturn dentry;\nout_renew:\n\tnfs_renew_times(dentry);\n\tnfs_refresh_verifier(dentry, nfs_save_change_attribute(dir));\n\treturn dentry;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-542","original_id":"diversevul-542","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,\n\t\t\t\t\t struct nfs_fh *mntfh)\n{\n\tstruct nfs_client *parent_client;\n\tstruct nfs_server *server, *parent_server;\n\tstruct nfs_fattr fattr;\n\tint error;\n\n\tdprintk(\"--> nfs4_create_referral_server()\\n\");\n\n\tserver = nfs_alloc_server();\n\tif (!server)\n\t\treturn ERR_PTR(-ENOMEM);\n\n\tparent_server = NFS_SB(data->sb);\n\tparent_client = parent_server->nfs_client;\n\n\t/* Get a client representation.\n\t * Note: NFSv4 always uses TCP, */\n\terror = nfs4_set_client(server, data->hostname, data->addr,\n\t\t\tparent_client->cl_ipaddr,\n\t\t\tdata->authflavor,\n\t\t\tparent_server->client->cl_xprt->prot,\n\t\t\tparent_client->retrans_timeo,\n\t\t\tparent_client->retrans_count);\n\tif (error < 0)\n\t\tgoto error;\n\n\t/* Initialise the client representation from the parent server */\n\tnfs_server_copy_userdata(server, parent_server);\n\tserver->caps |= NFS_CAP_ATOMIC_OPEN;\n\n\terror = nfs_init_server_rpcclient(server, data->authflavor);\n\tif (error < 0)\n\t\tgoto error;\n\n\tBUG_ON(!server->nfs_client);\n\tBUG_ON(!server->nfs_client->rpc_ops);\n\tBUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);\n\n\t/* Probe the root fh to retrieve its FSID and filehandle */\n\terror = nfs4_path_walk(server, mntfh, data->mnt_path);\n\tif (error < 0)\n\t\tgoto error;\n\n\t/* probe the filesystem info for this server filesystem */\n\terror = nfs_probe_fsinfo(server, mntfh, &fattr);\n\tif (error < 0)\n\t\tgoto error;\n\n\tdprintk(\"Referral FSID: %llx:%llx\\n\",\n\t\t(unsigned long long) server->fsid.major,\n\t\t(unsigned long long) server->fsid.minor);\n\n\tspin_lock(&nfs_client_lock);\n\tlist_add_tail(&server->client_link, &server->nfs_client->cl_superblocks);\n\tlist_add_tail(&server->master_link, &nfs_volume_list);\n\tspin_unlock(&nfs_client_lock);\n\n\tserver->mount_time = jiffies;\n\n\tdprintk(\"<-- nfs_create_referral_server() = %p\\n\", server);\n\treturn server;\n\nerror:\n\tnfs_free_server(server);\n\tdprintk(\"<-- nfs4_create_referral_server() = error %d\\n\", error);\n\treturn ERR_PTR(error);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-543","original_id":"diversevul-543","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct nfs_server *nfs_clone_server(struct nfs_server *source,\n\t\t\t\t struct nfs_fh *fh,\n\t\t\t\t struct nfs_fattr *fattr)\n{\n\tstruct nfs_server *server;\n\tstruct nfs_fattr fattr_fsinfo;\n\tint error;\n\n\tdprintk(\"--> nfs_clone_server(,%llx:%llx,)\\n\",\n\t\t(unsigned long long) fattr->fsid.major,\n\t\t(unsigned long long) fattr->fsid.minor);\n\n\tserver = nfs_alloc_server();\n\tif (!server)\n\t\treturn ERR_PTR(-ENOMEM);\n\n\t/* Copy data from the source */\n\tserver->nfs_client = source->nfs_client;\n\tatomic_inc(&server->nfs_client->cl_count);\n\tnfs_server_copy_userdata(server, source);\n\n\tserver->fsid = fattr->fsid;\n\n\terror = nfs_init_server_rpcclient(server, source->client->cl_auth->au_flavor);\n\tif (error < 0)\n\t\tgoto out_free_server;\n\tif (!IS_ERR(source->client_acl))\n\t\tnfs_init_server_aclclient(server);\n\n\t/* probe the filesystem info for this server filesystem */\n\terror = nfs_probe_fsinfo(server, fh, &fattr_fsinfo);\n\tif (error < 0)\n\t\tgoto out_free_server;\n\n\tdprintk(\"Cloned FSID: %llx:%llx\\n\",\n\t\t(unsigned long long) server->fsid.major,\n\t\t(unsigned long long) server->fsid.minor);\n\n\terror = nfs_start_lockd(server);\n\tif (error < 0)\n\t\tgoto out_free_server;\n\n\tspin_lock(&nfs_client_lock);\n\tlist_add_tail(&server->client_link, &server->nfs_client->cl_superblocks);\n\tlist_add_tail(&server->master_link, &nfs_volume_list);\n\tspin_unlock(&nfs_client_lock);\n\n\tserver->mount_time = jiffies;\n\n\tdprintk(\"<-- nfs_clone_server() = %p\\n\", server);\n\treturn server;\n\nout_free_server:\n\tnfs_free_server(server);\n\tdprintk(\"<-- nfs_clone_server() = error %d\\n\", error);\n\treturn ERR_PTR(error);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-544","original_id":"diversevul-544","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct nfs_server *nfs_create_server(const struct nfs_mount_data *data,\n\t\t\t\t struct nfs_fh *mntfh)\n{\n\tstruct nfs_server *server;\n\tstruct nfs_fattr fattr;\n\tint error;\n\n\tserver = nfs_alloc_server();\n\tif (!server)\n\t\treturn ERR_PTR(-ENOMEM);\n\n\t/* Get a client representation */\n\terror = nfs_init_server(server, data);\n\tif (error < 0)\n\t\tgoto error;\n\n\tBUG_ON(!server->nfs_client);\n\tBUG_ON(!server->nfs_client->rpc_ops);\n\tBUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);\n\n\t/* Probe the root fh to retrieve its FSID */\n\terror = nfs_probe_fsinfo(server, mntfh, &fattr);\n\tif (error < 0)\n\t\tgoto error;\n\tif (!(fattr.valid & NFS_ATTR_FATTR)) {\n\t\terror = server->nfs_client->rpc_ops->getattr(server, mntfh, &fattr);\n\t\tif (error < 0) {\n\t\t\tdprintk(\"nfs_create_server: getattr error = %d\\n\", -error);\n\t\t\tgoto error;\n\t\t}\n\t}\n\tmemcpy(&server->fsid, &fattr.fsid, sizeof(server->fsid));\n\n\tdprintk(\"Server FSID: %llx:%llx\\n\",\n\t\t(unsigned long long) server->fsid.major,\n\t\t(unsigned long long) server->fsid.minor);\n\n\tBUG_ON(!server->nfs_client);\n\tBUG_ON(!server->nfs_client->rpc_ops);\n\tBUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);\n\n\tspin_lock(&nfs_client_lock);\n\tlist_add_tail(&server->client_link, &server->nfs_client->cl_superblocks);\n\tlist_add_tail(&server->master_link, &nfs_volume_list);\n\tspin_unlock(&nfs_client_lock);\n\n\tserver->mount_time = jiffies;\n\treturn server;\n\nerror:\n\tnfs_free_server(server);\n\treturn ERR_PTR(error);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-545","original_id":"diversevul-545","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int nfs_init_server(struct nfs_server *server, const struct nfs_mount_data *data)\n{\n\tstruct nfs_client *clp;\n\tint error, nfsvers = 2;\n\n\tdprintk(\"--> nfs_init_server()\\n\");\n\n#ifdef CONFIG_NFS_V3\n\tif (data->flags & NFS_MOUNT_VER3)\n\t\tnfsvers = 3;\n#endif\n\n\t/* Allocate or find a client reference we can use */\n\tclp = nfs_get_client(data->hostname, &data->addr, nfsvers);\n\tif (IS_ERR(clp)) {\n\t\tdprintk(\"<-- nfs_init_server() = error %ld\\n\", PTR_ERR(clp));\n\t\treturn PTR_ERR(clp);\n\t}\n\n\terror = nfs_init_client(clp, data);\n\tif (error < 0)\n\t\tgoto error;\n\n\tserver->nfs_client = clp;\n\n\t/* Initialise the client representation from the mount data */\n\tserver->flags = data->flags & NFS_MOUNT_FLAGMASK;\n\n\tif (data->rsize)\n\t\tserver->rsize = nfs_block_size(data->rsize, NULL);\n\tif (data->wsize)\n\t\tserver->wsize = nfs_block_size(data->wsize, NULL);\n\n\tserver->acregmin = data->acregmin * HZ;\n\tserver->acregmax = data->acregmax * HZ;\n\tserver->acdirmin = data->acdirmin * HZ;\n\tserver->acdirmax = data->acdirmax * HZ;\n\n\t/* Start lockd here, before we might error out */\n\terror = nfs_start_lockd(server);\n\tif (error < 0)\n\t\tgoto error;\n\n\terror = nfs_init_server_rpcclient(server, data->pseudoflavor);\n\tif (error < 0)\n\t\tgoto error;\n\n\tserver->namelen = data->namlen;\n\t/* Create a client RPC handle for the NFSv3 ACL management interface */\n\tnfs_init_server_aclclient(server);\n\tif (clp->cl_nfsversion == 3) {\n\t\tif (server->namelen == 0 || server->namelen > NFS3_MAXNAMLEN)\n\t\t\tserver->namelen = NFS3_MAXNAMLEN;\n\t\tif (!(data->flags & NFS_MOUNT_NORDIRPLUS))\n\t\t\tserver->caps |= NFS_CAP_READDIRPLUS;\n\t} else {\n\t\tif (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)\n\t\t\tserver->namelen = NFS2_MAXNAMLEN;\n\t}\n\n\tdprintk(\"<-- nfs_init_server() = 0 [new %p]\\n\", clp);\n\treturn 0;\n\nerror:\n\tserver->nfs_client = NULL;\n\tnfs_put_client(clp);\n\tdprintk(\"<-- nfs_init_server() = xerror %d\\n\", error);\n\treturn error;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-546","original_id":"diversevul-546","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)\n{\n\tint err;\n\tconst int on = 1;\n\n\tif (udev_monitor->snl.nl_family != 0) {\n\t\terr = bind(udev_monitor->sock,\n\t\t\t (struct sockaddr *)&udev_monitor->snl, sizeof(struct sockaddr_nl));\n\t\tif (err < 0) {\n\t\t\terr(udev_monitor->udev, \"bind failed: %m\\n\");\n\t\t\treturn err;\n\t\t}\n\t\tdbg(udev_monitor->udev, \"monitor %p listening on netlink\\n\", udev_monitor);\n\t} else if (udev_monitor->sun.sun_family != 0) {\n\t\terr = bind(udev_monitor->sock,\n\t\t\t (struct sockaddr *)&udev_monitor->sun, udev_monitor->addrlen);\n\t\tif (err < 0) {\n\t\t\terr(udev_monitor->udev, \"bind failed: %m\\n\");\n\t\t\treturn err;\n\t\t}\n\t\t/* enable receiving of the sender credentials */\n\t\tsetsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));\n\t\tdbg(udev_monitor->udev, \"monitor %p listening on socket\\n\", udev_monitor);\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-346"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-547","original_id":"diversevul-547","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint udev_monitor_send_device(struct udev_monitor *udev_monitor, struct udev_device *udev_device)\n{\n\tconst char *buf;\n\tssize_t len;\n\tssize_t count;\n\n\tlen = udev_device_get_properties_monitor_buf(udev_device, &buf);\n\tif (len < 32)\n\t\treturn -1;\n\tif (udev_monitor->sun.sun_family != 0) {\n\t\tcount = sendto(udev_monitor->sock,\n\t\t\t buf, len, 0,\n\t\t\t (struct sockaddr *)&udev_monitor->sun,\n\t\t\t udev_monitor->addrlen);\n\t} else {\n\t\t/* no destination besides the muticast group, we will always get -1 ECONNREFUSED */\n\t\tcount = sendto(udev_monitor->sock,\n\t\t\t buf, len, 0,\n\t\t\t (struct sockaddr *)&udev_monitor->snl_peer,\n\t\t\t sizeof(struct sockaddr_nl));\n\t}\n\tinfo(udev_monitor->udev, \"passed %zi bytes to monitor %p, \\n\", count, udev_monitor);\n\treturn count;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-346"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-548","original_id":"diversevul-548","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint udev_monitor_send_device(struct udev_monitor *udev_monitor, struct udev_device *udev_device)\n{\n\tconst char *buf;\n\tssize_t len;\n\tssize_t count;\n\n\tlen = udev_device_get_properties_monitor_buf(udev_device, &buf);\n\tif (len < 32)\n\t\treturn -1;\n\tif (udev_monitor->sun.sun_family != 0)\n\t\tcount = sendto(udev_monitor->sock,\n\t\t\t buf, len, 0,\n\t\t\t (struct sockaddr *)&udev_monitor->sun,\n\t\t\t udev_monitor->addrlen);\n\telse if (udev_monitor->snl.nl_family != 0)\n\t\t/* no destination besides the muticast group, we will always get ECONNREFUSED */\n\t\tcount = sendto(udev_monitor->sock,\n\t\t\t buf, len, 0,\n\t\t\t (struct sockaddr *)&udev_monitor->snl_peer,\n\t\t\t sizeof(struct sockaddr_nl));\n\telse\n\t\treturn -1;\n\n\tinfo(udev_monitor->udev, \"passed %zi bytes to monitor %p, \\n\", count, udev_monitor);\n\treturn count;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-346"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-549","original_id":"diversevul-549","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nsize_t util_path_encode(char *s, size_t len)\n{\n\tchar t[(len * 3)+1];\n\tsize_t i, j;\n\n\tfor (i = 0, j = 0; s[i] != '\\0'; i++) {\n\t\tif (s[i] == '/') {\n\t\t\tmemcpy(&t[j], \"\\\\x2f\", 4);\n\t\t\tj += 4;\n\t\t} else if (s[i] == '\\\\') {\n\t\t\tmemcpy(&t[j], \"\\\\x5c\", 4);\n\t\t\tj += 4;\n\t\t} else {\n\t\t\tt[j] = s[i];\n\t\t\tj++;\n\t\t}\n\t}\n\tif (len == 0)\n\t\treturn j;\n\ti = (j < len - 1) ? j : len - 1;\n\tmemcpy(s, t, i);\n\ts[i] = '\\0';\n\treturn j;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-550","original_id":"diversevul-550","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,\n\t\t struct winbindd_request *request,\n\t\t struct winbindd_response *response,\n\t\t void (*continuation)(void *private_data, BOOL success),\n\t\t void *private_data)\n{\n\tstruct winbindd_async_request *state;\n\n\tSMB_ASSERT(continuation != NULL);\n\n\tstate = TALLOC_P(mem_ctx, struct winbindd_async_request);\n\n\tif (state == NULL) {\n\t\tDEBUG(0, (\"talloc failed\\n\"));\n\t\tcontinuation(private_data, False);\n\t\treturn;\n\t}\n\n\tstate->mem_ctx = mem_ctx;\n\tstate->child = child;\n\tstate->request = request;\n\tstate->response = response;\n\tstate->continuation = continuation;\n\tstate->private_data = private_data;\n\n\tDLIST_ADD_END(child->requests, state, struct winbindd_async_request *);\n\n\tschedule_async_request(child);\n\n\treturn;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-551","original_id":"diversevul-551","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void async_main_request_sent(void *private_data, BOOL success)\n{\n\tstruct winbindd_async_request *state =\n\t\ttalloc_get_type_abort(private_data, struct winbindd_async_request);\n\n\tif (!success) {\n\t\tDEBUG(5, (\"Could not send async request\\n\"));\n\n\t\tstate->response->length = sizeof(struct winbindd_response);\n\t\tstate->response->result = WINBINDD_ERROR;\n\t\tstate->continuation(state->private_data, False);\n\t\treturn;\n\t}\n\n\tif (state->request->extra_len == 0) {\n\t\tasync_request_sent(private_data, True);\n\t\treturn;\n\t}\n\n\tsetup_async_write(&state->child->event, state->request->extra_data.data,\n\t\t\t state->request->extra_len,\n\t\t\t async_request_sent, state);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-552","original_id":"diversevul-552","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)\n{\n\tstruct vcpu_vmx *vmx = to_vmx(vcpu);\n\tstruct kvm_msr_entry *msr;\n\tu64 host_tsc;\n\tint ret = 0;\n\n\tswitch (msr_index) {\n#ifdef CONFIG_X86_64\n\tcase MSR_EFER:\n\t\tvmx_load_host_state(vmx);\n\t\tret = kvm_set_msr_common(vcpu, msr_index, data);\n\t\tbreak;\n\tcase MSR_FS_BASE:\n\t\tvmcs_writel(GUEST_FS_BASE, data);\n\t\tbreak;\n\tcase MSR_GS_BASE:\n\t\tvmcs_writel(GUEST_GS_BASE, data);\n\t\tbreak;\n#endif\n\tcase MSR_IA32_SYSENTER_CS:\n\t\tvmcs_write32(GUEST_SYSENTER_CS, data);\n\t\tbreak;\n\tcase MSR_IA32_SYSENTER_EIP:\n\t\tvmcs_writel(GUEST_SYSENTER_EIP, data);\n\t\tbreak;\n\tcase MSR_IA32_SYSENTER_ESP:\n\t\tvmcs_writel(GUEST_SYSENTER_ESP, data);\n\t\tbreak;\n\tcase MSR_IA32_TIME_STAMP_COUNTER:\n\t\trdtscll(host_tsc);\n\t\tguest_write_tsc(data, host_tsc);\n\t\tbreak;\n\tcase MSR_P6_PERFCTR0:\n\tcase MSR_P6_PERFCTR1:\n\tcase MSR_P6_EVNTSEL0:\n\tcase MSR_P6_EVNTSEL1:\n\t\t/*\n\t\t * Just discard all writes to the performance counters; this\n\t\t * should keep both older linux and windows 64-bit guests\n\t\t * happy\n\t\t */\n\t\tpr_unimpl(vcpu, \"unimplemented perfctr wrmsr: 0x%x data 0x%llx\\n\", msr_index, data);\n\n\t\tbreak;\n\tcase MSR_IA32_CR_PAT:\n\t\tif (vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_IA32_PAT) {\n\t\t\tvmcs_write64(GUEST_IA32_PAT, data);\n\t\t\tvcpu->arch.pat = data;\n\t\t\tbreak;\n\t\t}\n\t\t/* Otherwise falls through to kvm_set_msr_common */\n\tdefault:\n\t\tvmx_load_host_state(vmx);\n\t\tmsr = find_msr_entry(vmx, msr_index);\n\t\tif (msr) {\n\t\t\tmsr->data = data;\n\t\t\tbreak;\n\t\t}\n\t\tret = kvm_set_msr_common(vcpu, msr_index, data);\n\t}\n\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-553","original_id":"diversevul-553","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic bool acl_group_override(connection_struct *conn,\n\t\t\t\tgid_t prim_gid,\n\t\t\t\tconst char *fname)\n{\n\tSMB_STRUCT_STAT sbuf;\n\n\tif ((errno != EPERM) && (errno != EACCES)) {\n\t\treturn false;\n\t}\n\n\t/* file primary group == user primary or supplementary group */\n\tif (lp_acl_group_control(SNUM(conn)) &&\n\t\t\tcurrent_user_in_group(prim_gid)) {\n\t\treturn true;\n\t}\n\n\t/* user has writeable permission */\n\tif (lp_dos_filemode(SNUM(conn)) &&\n\t\t\tcan_write_to_file(conn, fname, &sbuf)) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-264"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-554","original_id":"diversevul-554","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic unsigned int tun_chr_poll(struct file *file, poll_table * wait)\n{\n\tstruct tun_file *tfile = file->private_data;\n\tstruct tun_struct *tun = __tun_get(tfile);\n\tstruct sock *sk = tun->sk;\n\tunsigned int mask = 0;\n\n\tif (!tun)\n\t\treturn POLLERR;\n\n\tDBG(KERN_INFO \"%s: tun_chr_poll\\n\", tun->dev->name);\n\n\tpoll_wait(file, &tun->socket.wait, wait);\n\n\tif (!skb_queue_empty(&tun->readq))\n\t\tmask |= POLLIN | POLLRDNORM;\n\n\tif (sock_writeable(sk) ||\n\t (!test_and_set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags) &&\n\t sock_writeable(sk)))\n\t\tmask |= POLLOUT | POLLWRNORM;\n\n\tif (tun->dev->reg_state != NETREG_REGISTERED)\n\t\tmask = POLLERR;\n\n\ttun_put(tun);\n\treturn mask;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-555","original_id":"diversevul-555","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nparse_tag_11_packet(unsigned char *data, unsigned char *contents,\n\t\t size_t max_contents_bytes, size_t *tag_11_contents_size,\n\t\t size_t *packet_size, size_t max_packet_size)\n{\n\tsize_t body_size;\n\tsize_t length_size;\n\tint rc = 0;\n\n\t(*packet_size) = 0;\n\t(*tag_11_contents_size) = 0;\n\t/* This format is inspired by OpenPGP; see RFC 2440\n\t * packet tag 11\n\t *\n\t * Tag 11 identifier (1 byte)\n\t * Max Tag 11 packet size (max 3 bytes)\n\t * Binary format specifier (1 byte)\n\t * Filename length (1 byte)\n\t * Filename (\"_CONSOLE\") (8 bytes)\n\t * Modification date (4 bytes)\n\t * Literal data (arbitrary)\n\t *\n\t * We need at least 16 bytes of data for the packet to even be\n\t * valid.\n\t */\n\tif (max_packet_size < 16) {\n\t\tprintk(KERN_ERR \"Maximum packet size too small\\n\");\n\t\trc = -EINVAL;\n\t\tgoto out;\n\t}\n\tif (data[(*packet_size)++] != ECRYPTFS_TAG_11_PACKET_TYPE) {\n\t\tprintk(KERN_WARNING \"Invalid tag 11 packet format\\n\");\n\t\trc = -EINVAL;\n\t\tgoto out;\n\t}\n\trc = ecryptfs_parse_packet_length(&data[(*packet_size)], &body_size,\n\t\t\t\t\t &length_size);\n\tif (rc) {\n\t\tprintk(KERN_WARNING \"Invalid tag 11 packet format\\n\");\n\t\tgoto out;\n\t}\n\tif (body_size < 14) {\n\t\tprintk(KERN_WARNING \"Invalid body size ([%td])\\n\", body_size);\n\t\trc = -EINVAL;\n\t\tgoto out;\n\t}\n\t(*packet_size) += length_size;\n\t(*tag_11_contents_size) = (body_size - 14);\n\tif (unlikely((*packet_size) + body_size + 1 > max_packet_size)) {\n\t\tprintk(KERN_ERR \"Packet size exceeds max\\n\");\n\t\trc = -EINVAL;\n\t\tgoto out;\n\t}\n\tif (data[(*packet_size)++] != 0x62) {\n\t\tprintk(KERN_WARNING \"Unrecognizable packet\\n\");\n\t\trc = -EINVAL;\n\t\tgoto out;\n\t}\n\tif (data[(*packet_size)++] != 0x08) {\n\t\tprintk(KERN_WARNING \"Unrecognizable packet\\n\");\n\t\trc = -EINVAL;\n\t\tgoto out;\n\t}\n\t(*packet_size) += 12; /* Ignore filename and modification date */\n\tmemcpy(contents, &data[(*packet_size)], (*tag_11_contents_size));\n\t(*packet_size) += (*tag_11_contents_size);\nout:\n\tif (rc) {\n\t\t(*packet_size) = 0;\n\t\t(*tag_11_contents_size) = 0;\n\t}\n\treturn rc;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-556","original_id":"diversevul-556","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ndo_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long sp)\n{\n\tstack_t oss;\n\tint error;\n\n\tif (uoss) {\n\t\toss.ss_sp = (void __user *) current->sas_ss_sp;\n\t\toss.ss_size = current->sas_ss_size;\n\t\toss.ss_flags = sas_ss_flags(sp);\n\t}\n\n\tif (uss) {\n\t\tvoid __user *ss_sp;\n\t\tsize_t ss_size;\n\t\tint ss_flags;\n\n\t\terror = -EFAULT;\n\t\tif (!access_ok(VERIFY_READ, uss, sizeof(*uss))\n\t\t || __get_user(ss_sp, &uss->ss_sp)\n\t\t || __get_user(ss_flags, &uss->ss_flags)\n\t\t || __get_user(ss_size, &uss->ss_size))\n\t\t\tgoto out;\n\n\t\terror = -EPERM;\n\t\tif (on_sig_stack(sp))\n\t\t\tgoto out;\n\n\t\terror = -EINVAL;\n\t\t/*\n\t\t *\n\t\t * Note - this code used to test ss_flags incorrectly\n\t\t * \t old code may have been written using ss_flags==0\n\t\t *\t to mean ss_flags==SS_ONSTACK (as this was the only\n\t\t *\t way that worked) - this fix preserves that older\n\t\t *\t mechanism\n\t\t */\n\t\tif (ss_flags != SS_DISABLE && ss_flags != SS_ONSTACK && ss_flags != 0)\n\t\t\tgoto out;\n\n\t\tif (ss_flags == SS_DISABLE) {\n\t\t\tss_size = 0;\n\t\t\tss_sp = NULL;\n\t\t} else {\n\t\t\terror = -ENOMEM;\n\t\t\tif (ss_size < MINSIGSTKSZ)\n\t\t\t\tgoto out;\n\t\t}\n\n\t\tcurrent->sas_ss_sp = (unsigned long) ss_sp;\n\t\tcurrent->sas_ss_size = ss_size;\n\t}\n\n\tif (uoss) {\n\t\terror = -EFAULT;\n\t\tif (copy_to_user(uoss, &oss, sizeof(oss)))\n\t\t\tgoto out;\n\t}\n\n\terror = 0;\nout:\n\treturn error;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-557","original_id":"diversevul-557","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,\n\t\t\t int *uaddrlen, int peer)\n{\n\tstruct sockaddr_llc sllc;\n\tstruct sock *sk = sock->sk;\n\tstruct llc_sock *llc = llc_sk(sk);\n\tint rc = 0;\n\n\tlock_sock(sk);\n\tif (sock_flag(sk, SOCK_ZAPPED))\n\t\tgoto out;\n\t*uaddrlen = sizeof(sllc);\n\tmemset(uaddr, 0, *uaddrlen);\n\tif (peer) {\n\t\trc = -ENOTCONN;\n\t\tif (sk->sk_state != TCP_ESTABLISHED)\n\t\t\tgoto out;\n\t\tif(llc->dev)\n\t\t\tsllc.sllc_arphrd = llc->dev->type;\n\t\tsllc.sllc_sap = llc->daddr.lsap;\n\t\tmemcpy(&sllc.sllc_mac, &llc->daddr.mac, IFHWADDRLEN);\n\t} else {\n\t\trc = -EINVAL;\n\t\tif (!llc->sap)\n\t\t\tgoto out;\n\t\tsllc.sllc_sap = llc->sap->laddr.lsap;\n\n\t\tif (llc->dev) {\n\t\t\tsllc.sllc_arphrd = llc->dev->type;\n\t\t\tmemcpy(&sllc.sllc_mac, llc->dev->dev_addr,\n\t\t\t IFHWADDRLEN);\n\t\t}\n\t}\n\trc = 0;\n\tsllc.sllc_family = AF_LLC;\n\tmemcpy(uaddr, &sllc, sizeof(sllc));\nout:\n\trelease_sock(sk);\n\treturn rc;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-558","original_id":"diversevul-558","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int irda_getname(struct socket *sock, struct sockaddr *uaddr,\n\t\t\tint *uaddr_len, int peer)\n{\n\tstruct sockaddr_irda saddr;\n\tstruct sock *sk = sock->sk;\n\tstruct irda_sock *self = irda_sk(sk);\n\n\tif (peer) {\n\t\tif (sk->sk_state != TCP_ESTABLISHED)\n\t\t\treturn -ENOTCONN;\n\n\t\tsaddr.sir_family = AF_IRDA;\n\t\tsaddr.sir_lsap_sel = self->dtsap_sel;\n\t\tsaddr.sir_addr = self->daddr;\n\t} else {\n\t\tsaddr.sir_family = AF_IRDA;\n\t\tsaddr.sir_lsap_sel = self->stsap_sel;\n\t\tsaddr.sir_addr = self->saddr;\n\t}\n\n\tIRDA_DEBUG(1, \"%s(), tsap_sel = %#x\\n\", __func__, saddr.sir_lsap_sel);\n\tIRDA_DEBUG(1, \"%s(), addr = %08x\\n\", __func__, saddr.sir_addr);\n\n\t/* uaddr_len come to us uninitialised */\n\t*uaddr_len = sizeof (struct sockaddr_irda);\n\tmemcpy(uaddr, &saddr, *uaddr_len);\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-559","original_id":"diversevul-559","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int rose_getname(struct socket *sock, struct sockaddr *uaddr,\n\tint *uaddr_len, int peer)\n{\n\tstruct full_sockaddr_rose *srose = (struct full_sockaddr_rose *)uaddr;\n\tstruct sock *sk = sock->sk;\n\tstruct rose_sock *rose = rose_sk(sk);\n\tint n;\n\n\tif (peer != 0) {\n\t\tif (sk->sk_state != TCP_ESTABLISHED)\n\t\t\treturn -ENOTCONN;\n\t\tsrose->srose_family = AF_ROSE;\n\t\tsrose->srose_addr = rose->dest_addr;\n\t\tsrose->srose_call = rose->dest_call;\n\t\tsrose->srose_ndigis = rose->dest_ndigis;\n\t\tfor (n = 0; n < rose->dest_ndigis; n++)\n\t\t\tsrose->srose_digis[n] = rose->dest_digis[n];\n\t} else {\n\t\tsrose->srose_family = AF_ROSE;\n\t\tsrose->srose_addr = rose->source_addr;\n\t\tsrose->srose_call = rose->source_call;\n\t\tsrose->srose_ndigis = rose->source_ndigis;\n\t\tfor (n = 0; n < rose->source_ndigis; n++)\n\t\t\tsrose->srose_digis[n] = rose->source_digis[n];\n\t}\n\n\t*uaddr_len = sizeof(struct full_sockaddr_rose);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-560","original_id":"diversevul-560","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int atalk_getname(struct socket *sock, struct sockaddr *uaddr,\n\t\t\t int *uaddr_len, int peer)\n{\n\tstruct sockaddr_at sat;\n\tstruct sock *sk = sock->sk;\n\tstruct atalk_sock *at = at_sk(sk);\n\n\tif (sock_flag(sk, SOCK_ZAPPED))\n\t\tif (atalk_autobind(sk) < 0)\n\t\t\treturn -ENOBUFS;\n\n\t*uaddr_len = sizeof(struct sockaddr_at);\n\n\tif (peer) {\n\t\tif (sk->sk_state != TCP_ESTABLISHED)\n\t\t\treturn -ENOTCONN;\n\n\t\tsat.sat_addr.s_net = at->dest_net;\n\t\tsat.sat_addr.s_node = at->dest_node;\n\t\tsat.sat_port\t = at->dest_port;\n\t} else {\n\t\tsat.sat_addr.s_net = at->src_net;\n\t\tsat.sat_addr.s_node = at->src_node;\n\t\tsat.sat_port\t = at->src_port;\n\t}\n\n\tsat.sat_family = AF_APPLETALK;\n\tmemcpy(uaddr, &sat, sizeof(sat));\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-561","original_id":"diversevul-561","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int econet_getname(struct socket *sock, struct sockaddr *uaddr,\n\t\t\t int *uaddr_len, int peer)\n{\n\tstruct sock *sk;\n\tstruct econet_sock *eo;\n\tstruct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr;\n\n\tif (peer)\n\t\treturn -EOPNOTSUPP;\n\n\tmutex_lock(&econet_mutex);\n\n\tsk = sock->sk;\n\teo = ec_sk(sk);\n\n\tsec->sec_family\t = AF_ECONET;\n\tsec->port\t = eo->port;\n\tsec->addr.station = eo->station;\n\tsec->addr.net\t = eo->net;\n\n\tmutex_unlock(&econet_mutex);\n\n\t*uaddr_len = sizeof(*sec);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-562","original_id":"diversevul-562","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int raw_getname(struct socket *sock, struct sockaddr *uaddr,\n\t\t int *len, int peer)\n{\n\tstruct sockaddr_can *addr = (struct sockaddr_can *)uaddr;\n\tstruct sock *sk = sock->sk;\n\tstruct raw_sock *ro = raw_sk(sk);\n\n\tif (peer)\n\t\treturn -EOPNOTSUPP;\n\n\taddr->can_family = AF_CAN;\n\taddr->can_ifindex = ro->ifindex;\n\n\t*len = sizeof(*addr);\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-563","original_id":"diversevul-563","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int nr_getname(struct socket *sock, struct sockaddr *uaddr,\n\tint *uaddr_len, int peer)\n{\n\tstruct full_sockaddr_ax25 *sax = (struct full_sockaddr_ax25 *)uaddr;\n\tstruct sock *sk = sock->sk;\n\tstruct nr_sock *nr = nr_sk(sk);\n\n\tlock_sock(sk);\n\tif (peer != 0) {\n\t\tif (sk->sk_state != TCP_ESTABLISHED) {\n\t\t\trelease_sock(sk);\n\t\t\treturn -ENOTCONN;\n\t\t}\n\t\tsax->fsa_ax25.sax25_family = AF_NETROM;\n\t\tsax->fsa_ax25.sax25_ndigis = 1;\n\t\tsax->fsa_ax25.sax25_call = nr->user_addr;\n\t\tsax->fsa_digipeater[0] = nr->dest_addr;\n\t\t*uaddr_len = sizeof(struct full_sockaddr_ax25);\n\t} else {\n\t\tsax->fsa_ax25.sax25_family = AF_NETROM;\n\t\tsax->fsa_ax25.sax25_ndigis = 0;\n\t\tsax->fsa_ax25.sax25_call = nr->source_addr;\n\t\t*uaddr_len = sizeof(struct sockaddr_ax25);\n\t}\n\trelease_sock(sk);\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-564","original_id":"diversevul-564","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,\n\t\t\t unsigned long cl,\n\t\t\t u32 pid, u32 seq, u16 flags, int event)\n{\n\tstruct tcmsg *tcm;\n\tstruct nlmsghdr *nlh;\n\tunsigned char *b = skb_tail_pointer(skb);\n\tstruct gnet_dump d;\n\tconst struct Qdisc_class_ops *cl_ops = q->ops->cl_ops;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);\n\ttcm = NLMSG_DATA(nlh);\n\ttcm->tcm_family = AF_UNSPEC;\n\ttcm->tcm_ifindex = qdisc_dev(q)->ifindex;\n\ttcm->tcm_parent = q->handle;\n\ttcm->tcm_handle = q->handle;\n\ttcm->tcm_info = 0;\n\tNLA_PUT_STRING(skb, TCA_KIND, q->ops->id);\n\tif (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0)\n\t\tgoto nla_put_failure;\n\n\tif (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, TCA_XSTATS,\n\t\t\t\t\t qdisc_root_sleeping_lock(q), &d) < 0)\n\t\tgoto nla_put_failure;\n\n\tif (cl_ops->dump_stats && cl_ops->dump_stats(q, cl, &d) < 0)\n\t\tgoto nla_put_failure;\n\n\tif (gnet_stats_finish_copy(&d) < 0)\n\t\tgoto nla_put_failure;\n\n\tnlh->nlmsg_len = skb_tail_pointer(skb) - b;\n\treturn skb->len;\n\nnlmsg_failure:\nnla_put_failure:\n\tnlmsg_trim(skb, b);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-909"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-565","original_id":"diversevul-565","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic __inline__ int cbq_dump_ovl(struct sk_buff *skb, struct cbq_class *cl)\n{\n\tunsigned char\t *b = skb->tail;\n\tstruct tc_cbq_ovl opt;\n\n\topt.strategy = cl->ovl_strategy;\n\topt.priority2 = cl->priority2+1;\n\topt.penalty = (cl->penalty*1000)/HZ;\n\tRTA_PUT(skb, TCA_CBQ_OVL_STRATEGY, sizeof(opt), &opt);\n\treturn skb->len;\n\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-566","original_id":"diversevul-566","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int rsvp_dump(struct tcf_proto *tp, unsigned long fh,\n\t\t struct sk_buff *skb, struct tcmsg *t)\n{\n\tstruct rsvp_filter *f = (struct rsvp_filter*)fh;\n\tstruct rsvp_session *s;\n\tunsigned char\t *b = skb->tail;\n\tstruct rtattr *rta;\n\tstruct tc_rsvp_pinfo pinfo;\n\n\tif (f == NULL)\n\t\treturn skb->len;\n\ts = f->sess;\n\n\tt->tcm_handle = f->handle;\n\n\n\trta = (struct rtattr*)b;\n\tRTA_PUT(skb, TCA_OPTIONS, 0, NULL);\n\n\tRTA_PUT(skb, TCA_RSVP_DST, sizeof(s->dst), &s->dst);\n\tpinfo.dpi = s->dpi;\n\tpinfo.spi = f->spi;\n\tpinfo.protocol = s->protocol;\n\tpinfo.tunnelid = s->tunnelid;\n\tpinfo.tunnelhdr = f->tunnelhdr;\n\tRTA_PUT(skb, TCA_RSVP_PINFO, sizeof(pinfo), &pinfo);\n\tif (f->res.classid)\n\t\tRTA_PUT(skb, TCA_RSVP_CLASSID, 4, &f->res.classid);\n\tif (((f->handle>>8)&0xFF) != 16)\n\t\tRTA_PUT(skb, TCA_RSVP_SRC, sizeof(f->src), f->src);\n\n\tif (tcf_exts_dump(skb, &f->exts, &rsvp_ext_map) < 0)\n\t\tgoto rtattr_failure;\n\n\trta->rta_len = skb->tail - b;\n\n\tif (tcf_exts_dump_stats(skb, &f->exts, &rsvp_ext_map) < 0)\n\t\tgoto rtattr_failure;\n\treturn skb->len;\n\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-567","original_id":"diversevul-567","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev,\n\t\t\tstruct prefix_info *pinfo, u32 pid, u32 seq, \n\t\t\tint event, unsigned int flags)\n{\n\tstruct prefixmsg\t*pmsg;\n\tstruct nlmsghdr \t*nlh;\n\tunsigned char\t\t*b = skb->tail;\n\tstruct prefix_cacheinfo\tci;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*pmsg), flags);\n\tpmsg = NLMSG_DATA(nlh);\n\tpmsg->prefix_family = AF_INET6;\n\tpmsg->prefix_ifindex = idev->dev->ifindex;\n\tpmsg->prefix_len = pinfo->prefix_len;\n\tpmsg->prefix_type = pinfo->type;\n\t\n\tpmsg->prefix_flags = 0;\n\tif (pinfo->onlink)\n\t\tpmsg->prefix_flags |= IF_PREFIX_ONLINK;\n\tif (pinfo->autoconf)\n\t\tpmsg->prefix_flags |= IF_PREFIX_AUTOCONF;\n\n\tRTA_PUT(skb, PREFIX_ADDRESS, sizeof(pinfo->prefix), &pinfo->prefix);\n\n\tci.preferred_time = ntohl(pinfo->prefered);\n\tci.valid_time = ntohl(pinfo->valid);\n\tRTA_PUT(skb, PREFIX_CACHEINFO, sizeof(ci), &ci);\n\n\tnlh->nlmsg_len = skb->tail - b;\n\treturn skb->len;\n\nnlmsg_failure:\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-568","original_id":"diversevul-568","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ipmr_destroy_unres(struct mfc_cache *c)\n{\n\tstruct sk_buff *skb;\n\n\tatomic_dec(&cache_resolve_queue_len);\n\n\twhile((skb=skb_dequeue(&c->mfc_un.unres.unresolved))) {\n\t\tif (skb->nh.iph->version == 0) {\n\t\t\tstruct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct iphdr));\n\t\t\tnlh->nlmsg_type = NLMSG_ERROR;\n\t\t\tnlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr));\n\t\t\tskb_trim(skb, nlh->nlmsg_len);\n\t\t\t((struct nlmsgerr*)NLMSG_DATA(nlh))->error = -ETIMEDOUT;\n\t\t\tnetlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT);\n\t\t} else\n\t\t\tkfree_skb(skb);\n\t}\n\n\tkmem_cache_free(mrt_cachep, c);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-569","original_id":"diversevul-569","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void ipmr_cache_resolve(struct mfc_cache *uc, struct mfc_cache *c)\n{\n\tstruct sk_buff *skb;\n\n\t/*\n\t *\tPlay the pending entries through our router\n\t */\n\n\twhile((skb=__skb_dequeue(&uc->mfc_un.unres.unresolved))) {\n\t\tif (skb->nh.iph->version == 0) {\n\t\t\tint err;\n\t\t\tstruct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct iphdr));\n\n\t\t\tif (ipmr_fill_mroute(skb, c, NLMSG_DATA(nlh)) > 0) {\n\t\t\t\tnlh->nlmsg_len = skb->tail - (u8*)nlh;\n\t\t\t} else {\n\t\t\t\tnlh->nlmsg_type = NLMSG_ERROR;\n\t\t\t\tnlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nlmsgerr));\n\t\t\t\tskb_trim(skb, nlh->nlmsg_len);\n\t\t\t\t((struct nlmsgerr*)NLMSG_DATA(nlh))->error = -EMSGSIZE;\n\t\t\t}\n\t\t\terr = netlink_unicast(rtnl, skb, NETLINK_CB(skb).dst_pid, MSG_DONTWAIT);\n\t\t} else\n\t\t\tip_mr_forward(skb, c, 0);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-570","original_id":"diversevul-570","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev, \n\t\t\t u32 pid, u32 seq, int event, unsigned int flags)\n{\n\tstruct net_device\t*dev = idev->dev;\n\t__s32\t\t\t*array = NULL;\n\tstruct ifinfomsg\t*r;\n\tstruct nlmsghdr \t*nlh;\n\tunsigned char\t\t*b = skb->tail;\n\tstruct rtattr\t\t*subattr;\n\t__u32\t\t\tmtu = dev->mtu;\n\tstruct ifla_cacheinfo\tci;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags);\n\tr = NLMSG_DATA(nlh);\n\tr->ifi_family = AF_INET6;\n\tr->ifi_type = dev->type;\n\tr->ifi_index = dev->ifindex;\n\tr->ifi_flags = dev_get_flags(dev);\n\tr->ifi_change = 0;\n\n\tRTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name);\n\n\tif (dev->addr_len)\n\t\tRTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr);\n\n\tRTA_PUT(skb, IFLA_MTU, sizeof(mtu), &mtu);\n\tif (dev->ifindex != dev->iflink)\n\t\tRTA_PUT(skb, IFLA_LINK, sizeof(int), &dev->iflink);\n\t\t\t\n\tsubattr = (struct rtattr*)skb->tail;\n\n\tRTA_PUT(skb, IFLA_PROTINFO, 0, NULL);\n\n\t/* return the device flags */\n\tRTA_PUT(skb, IFLA_INET6_FLAGS, sizeof(__u32), &idev->if_flags);\n\n\t/* return interface cacheinfo */\n\tci.max_reasm_len = IPV6_MAXPLEN;\n\tci.tstamp = (__u32)(TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) / HZ * 100\n\t\t + TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);\n\tci.reachable_time = idev->nd_parms->reachable_time;\n\tci.retrans_time = idev->nd_parms->retrans_time;\n\tRTA_PUT(skb, IFLA_INET6_CACHEINFO, sizeof(ci), &ci);\n\t\n\t/* return the device sysctl params */\n\tif ((array = kmalloc(DEVCONF_MAX * sizeof(*array), GFP_ATOMIC)) == NULL)\n\t\tgoto rtattr_failure;\n\tipv6_store_devconf(&idev->cnf, array, DEVCONF_MAX * sizeof(*array));\n\tRTA_PUT(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(*array), array);\n\n\t/* XXX - Statistics/MC not implemented */\n\tsubattr->rta_len = skb->tail - (u8*)subattr;\n\n\tnlh->nlmsg_len = skb->tail - b;\n\tkfree(array);\n\treturn skb->len;\n\nnlmsg_failure:\nrtattr_failure:\n\tif (array)\n\t\tkfree(array);\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-571","original_id":"diversevul-571","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,\n u16 flags)\n{\n\tstruct tcamsg *t;\n\tstruct nlmsghdr *nlh;\n\tstruct sk_buff *skb;\n\tstruct rtattr *x;\n\tunsigned char *b;\n\tint err = 0;\n\n\tskb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);\n\tif (!skb)\n\t\treturn -ENOBUFS;\n\n\tb = (unsigned char *)skb->tail;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags);\n\tt = NLMSG_DATA(nlh);\n\tt->tca_family = AF_UNSPEC;\n\t\n\tx = (struct rtattr*) skb->tail;\n\tRTA_PUT(skb, TCA_ACT_TAB, 0, NULL);\n\n\tif (tcf_action_dump(skb, a, 0, 0) < 0)\n\t\tgoto rtattr_failure;\n\n\tx->rta_len = skb->tail - (u8*)x;\n\t\n\tnlh->nlmsg_len = skb->tail - b;\n\tNETLINK_CB(skb).dst_groups = RTMGRP_TC;\n\t\n\terr = rtnetlink_send(skb, pid, RTMGRP_TC, flags&NLM_F_ECHO);\n\tif (err > 0)\n\t\terr = 0;\n\treturn err;\n\nrtattr_failure:\nnlmsg_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-572","original_id":"diversevul-572","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic __inline__ int cbq_dump_police(struct sk_buff *skb, struct cbq_class *cl)\n{\n\tunsigned char\t *b = skb->tail;\n\tstruct tc_cbq_police opt;\n\n\tif (cl->police) {\n\t\topt.police = cl->police;\n\t\tRTA_PUT(skb, TCA_CBQ_POLICE, sizeof(opt), &opt);\n\t}\n\treturn skb->len;\n\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-573","original_id":"diversevul-573","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ntca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,\n u16 flags, int event, int bind, int ref)\n{\n\tstruct tcamsg *t;\n\tstruct nlmsghdr *nlh;\n\tunsigned char *b = skb->tail;\n\tstruct rtattr *x;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags);\n\n\tt = NLMSG_DATA(nlh);\n\tt->tca_family = AF_UNSPEC;\n\t\n\tx = (struct rtattr*) skb->tail;\n\tRTA_PUT(skb, TCA_ACT_TAB, 0, NULL);\n\n\tif (tcf_action_dump(skb, a, bind, ref) < 0)\n\t\tgoto rtattr_failure;\n\n\tx->rta_len = skb->tail - (u8*)x;\n\t\n\tnlh->nlmsg_len = skb->tail - b;\n\treturn skb->len;\n\nrtattr_failure:\nnlmsg_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-574","original_id":"diversevul-574","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ntc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)\n{\n\tstruct nlmsghdr *nlh;\n\tunsigned char *b = skb->tail;\n\tstruct rtattr *x;\n\tstruct tc_action_ops *a_o;\n\tstruct tc_action a;\n\tint ret = 0;\n\tstruct tcamsg *t = (struct tcamsg *) NLMSG_DATA(cb->nlh);\n\tchar *kind = find_dump_kind(cb->nlh);\n\n\tif (kind == NULL) {\n\t\tprintk(\"tc_dump_action: action bad kind\\n\");\n\t\treturn 0;\n\t}\n\n\ta_o = tc_lookup_action_n(kind);\n\tif (a_o == NULL) {\n\t\tprintk(\"failed to find %s\\n\", kind);\n\t\treturn 0;\n\t}\n\n\tmemset(&a, 0, sizeof(struct tc_action));\n\ta.ops = a_o;\n\n\tif (a_o->walk == NULL) {\n\t\tprintk(\"tc_dump_action: %s !capable of dumping table\\n\", kind);\n\t\tgoto rtattr_failure;\n\t}\n\n\tnlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,\n\t cb->nlh->nlmsg_type, sizeof(*t));\n\tt = NLMSG_DATA(nlh);\n\tt->tca_family = AF_UNSPEC;\n\n\tx = (struct rtattr *) skb->tail;\n\tRTA_PUT(skb, TCA_ACT_TAB, 0, NULL);\n\n\tret = a_o->walk(skb, cb, RTM_GETACTION, &a);\n\tif (ret < 0)\n\t\tgoto rtattr_failure;\n\n\tif (ret > 0) {\n\t\tx->rta_len = skb->tail - (u8 *) x;\n\t\tret = skb->len;\n\t} else\n\t\tskb_trim(skb, (u8*)x - skb->data);\n\n\tnlh->nlmsg_len = skb->tail - b;\n\tif (NETLINK_CB(cb->skb).pid && ret)\n\t\tnlh->nlmsg_flags |= NLM_F_MULTI;\n\tmodule_put(a_o->owner);\n\treturn skb->len;\n\nrtattr_failure:\nnlmsg_failure:\n\tmodule_put(a_o->owner);\n\tskb_trim(skb, b - skb->data);\n\treturn skb->len;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-575","original_id":"diversevul-575","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int rtnetlink_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,\n\t\t\t\t int type, u32 pid, u32 seq, u32 change, \n\t\t\t\t unsigned int flags)\n{\n\tstruct ifinfomsg *r;\n\tstruct nlmsghdr *nlh;\n\tunsigned char\t *b = skb->tail;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, type, sizeof(*r), flags);\n\tr = NLMSG_DATA(nlh);\n\tr->ifi_family = AF_UNSPEC;\n\tr->ifi_type = dev->type;\n\tr->ifi_index = dev->ifindex;\n\tr->ifi_flags = dev_get_flags(dev);\n\tr->ifi_change = change;\n\n\tRTA_PUT(skb, IFLA_IFNAME, strlen(dev->name)+1, dev->name);\n\n\tif (1) {\n\t\tu32 txqlen = dev->tx_queue_len;\n\t\tRTA_PUT(skb, IFLA_TXQLEN, sizeof(txqlen), &txqlen);\n\t}\n\n\tif (1) {\n\t\tu32 weight = dev->weight;\n\t\tRTA_PUT(skb, IFLA_WEIGHT, sizeof(weight), &weight);\n\t}\n\n\tif (1) {\n\t\tstruct rtnl_link_ifmap map = {\n\t\t\t.mem_start = dev->mem_start,\n\t\t\t.mem_end = dev->mem_end,\n\t\t\t.base_addr = dev->base_addr,\n\t\t\t.irq = dev->irq,\n\t\t\t.dma = dev->dma,\n\t\t\t.port = dev->if_port,\n\t\t};\n\t\tRTA_PUT(skb, IFLA_MAP, sizeof(map), &map);\n\t}\n\n\tif (dev->addr_len) {\n\t\tRTA_PUT(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr);\n\t\tRTA_PUT(skb, IFLA_BROADCAST, dev->addr_len, dev->broadcast);\n\t}\n\n\tif (1) {\n\t\tu32 mtu = dev->mtu;\n\t\tRTA_PUT(skb, IFLA_MTU, sizeof(mtu), &mtu);\n\t}\n\n\tif (dev->ifindex != dev->iflink) {\n\t\tu32 iflink = dev->iflink;\n\t\tRTA_PUT(skb, IFLA_LINK, sizeof(iflink), &iflink);\n\t}\n\n\tif (dev->qdisc_sleeping)\n\t\tRTA_PUT(skb, IFLA_QDISC,\n\t\t\tstrlen(dev->qdisc_sleeping->ops->id) + 1,\n\t\t\tdev->qdisc_sleeping->ops->id);\n\t\n\tif (dev->master) {\n\t\tu32 master = dev->master->ifindex;\n\t\tRTA_PUT(skb, IFLA_MASTER, sizeof(master), &master);\n\t}\n\n\tif (dev->get_stats) {\n\t\tunsigned long *stats = (unsigned long*)dev->get_stats(dev);\n\t\tif (stats) {\n\t\t\tstruct rtattr *a;\n\t\t\t__u32\t *s;\n\t\t\tint\t\ti;\n\t\t\tint\t\tn = sizeof(struct rtnl_link_stats)/4;\n\n\t\t\ta = __RTA_PUT(skb, IFLA_STATS, n*4);\n\t\t\ts = RTA_DATA(a);\n\t\t\tfor (i=0; i<n; i++)\n\t\t\t\ts[i] = stats[i];\n\t\t}\n\t}\n\tnlh->nlmsg_len = skb->tail - b;\n\treturn skb->len;\n\nnlmsg_failure:\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-576","original_id":"diversevul-576","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int neigh_fill_info(struct sk_buff *skb, struct neighbour *n,\n\t\t\t u32 pid, u32 seq, int event, unsigned int flags)\n{\n\tunsigned long now = jiffies;\n\tunsigned char *b = skb->tail;\n\tstruct nda_cacheinfo ci;\n\tint locked = 0;\n\tu32 probes;\n\tstruct nlmsghdr *nlh = NLMSG_NEW(skb, pid, seq, event,\n\t\t\t\t\t sizeof(struct ndmsg), flags);\n\tstruct ndmsg *ndm = NLMSG_DATA(nlh);\n\n\tndm->ndm_family\t = n->ops->family;\n\tndm->ndm_flags\t = n->flags;\n\tndm->ndm_type\t = n->type;\n\tndm->ndm_ifindex = n->dev->ifindex;\n\tRTA_PUT(skb, NDA_DST, n->tbl->key_len, n->primary_key);\n\tread_lock_bh(&n->lock);\n\tlocked\t\t = 1;\n\tndm->ndm_state\t = n->nud_state;\n\tif (n->nud_state & NUD_VALID)\n\t\tRTA_PUT(skb, NDA_LLADDR, n->dev->addr_len, n->ha);\n\tci.ndm_used\t = now - n->used;\n\tci.ndm_confirmed = now - n->confirmed;\n\tci.ndm_updated\t = now - n->updated;\n\tci.ndm_refcnt\t = atomic_read(&n->refcnt) - 1;\n\tprobes = atomic_read(&n->probes);\n\tread_unlock_bh(&n->lock);\n\tlocked\t\t = 0;\n\tRTA_PUT(skb, NDA_CACHEINFO, sizeof(ci), &ci);\n\tRTA_PUT(skb, NDA_PROBES, sizeof(probes), &probes);\n\tnlh->nlmsg_len\t = skb->tail - b;\n\treturn skb->len;\n\nnlmsg_failure:\nrtattr_failure:\n\tif (locked)\n\t\tread_unlock_bh(&n->lock);\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-577","original_id":"diversevul-577","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline int rtnetlink_fill_iwinfo(struct sk_buff *\tskb,\n\t\t\t\t\tstruct net_device *\tdev,\n\t\t\t\t\tint\t\t\ttype,\n\t\t\t\t\tchar *\t\t\tevent,\n\t\t\t\t\tint\t\t\tevent_len)\n{\n\tstruct ifinfomsg *r;\n\tstruct nlmsghdr *nlh;\n\tunsigned char\t *b = skb->tail;\n\n\tnlh = NLMSG_PUT(skb, 0, 0, type, sizeof(*r));\n\tr = NLMSG_DATA(nlh);\n\tr->ifi_family = AF_UNSPEC;\n\tr->ifi_type = dev->type;\n\tr->ifi_index = dev->ifindex;\n\tr->ifi_flags = dev->flags;\n\tr->ifi_change = 0;\t/* Wireless changes don't affect those flags */\n\n\t/* Add the wireless events in the netlink packet */\n\tRTA_PUT(skb, IFLA_WIRELESS,\n\t\tevent_len, event);\n\n\tnlh->nlmsg_len = skb->tail - b;\n\treturn skb->len;\n\nnlmsg_failure:\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-578","original_id":"diversevul-578","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ntcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh,\n\t u32 pid, u32 seq, u16 flags, int event)\n{\n\tstruct tcmsg *tcm;\n\tstruct nlmsghdr *nlh;\n\tunsigned char\t *b = skb->tail;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);\n\ttcm = NLMSG_DATA(nlh);\n\ttcm->tcm_family = AF_UNSPEC;\n\ttcm->tcm_ifindex = tp->q->dev->ifindex;\n\ttcm->tcm_parent = tp->classid;\n\ttcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);\n\tRTA_PUT(skb, TCA_KIND, IFNAMSIZ, tp->ops->kind);\n\ttcm->tcm_handle = fh;\n\tif (RTM_DELTFILTER != event) {\n\t\ttcm->tcm_handle = 0;\n\t\tif (tp->ops->dump && tp->ops->dump(tp, fh, skb, tcm) < 0)\n\t\t\tgoto rtattr_failure;\n\t}\n\tnlh->nlmsg_len = skb->tail - b;\n\treturn skb->len;\n\nnlmsg_failure:\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-579","original_id":"diversevul-579","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,\n\t\t\t u32 pid, u32 seq, u16 flags, int event)\n{\n\tstruct tcmsg *tcm;\n\tstruct nlmsghdr *nlh;\n\tunsigned char\t *b = skb->tail;\n\tstruct gnet_dump d;\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);\n\ttcm = NLMSG_DATA(nlh);\n\ttcm->tcm_family = AF_UNSPEC;\n\ttcm->tcm_ifindex = q->dev->ifindex;\n\ttcm->tcm_parent = clid;\n\ttcm->tcm_handle = q->handle;\n\ttcm->tcm_info = atomic_read(&q->refcnt);\n\tRTA_PUT(skb, TCA_KIND, IFNAMSIZ, q->ops->id);\n\tif (q->ops->dump && q->ops->dump(q, skb) < 0)\n\t\tgoto rtattr_failure;\n\tq->qstats.qlen = q->q.qlen;\n\n\tif (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,\n\t\t\tTCA_XSTATS, q->stats_lock, &d) < 0)\n\t\tgoto rtattr_failure;\n\n\tif (q->ops->dump_stats && q->ops->dump_stats(q, &d) < 0)\n\t\tgoto rtattr_failure;\n\n\tif (gnet_stats_copy_basic(&d, &q->bstats) < 0 ||\n#ifdef CONFIG_NET_ESTIMATOR\n\t gnet_stats_copy_rate_est(&d, &q->rate_est) < 0 ||\n#endif\n\t gnet_stats_copy_queue(&d, &q->qstats) < 0)\n\t\tgoto rtattr_failure;\n\t\n\tif (gnet_stats_finish_copy(&d) < 0)\n\t\tgoto rtattr_failure;\n\t\n\tnlh->nlmsg_len = skb->tail - b;\n\treturn skb->len;\n\nnlmsg_failure:\nrtattr_failure:\n\tskb_trim(skb, b - skb->data);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-580","original_id":"diversevul-580","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int neightbl_fill_param_info(struct neigh_table *tbl,\n\t\t\t\t struct neigh_parms *parms,\n\t\t\t\t struct sk_buff *skb,\n\t\t\t\t struct netlink_callback *cb)\n{\n\tstruct ndtmsg *ndtmsg;\n\tstruct nlmsghdr *nlh;\n\n\tnlh = NLMSG_NEW_ANSWER(skb, cb, RTM_NEWNEIGHTBL, sizeof(struct ndtmsg),\n\t\t\t NLM_F_MULTI);\n\n\tndtmsg = NLMSG_DATA(nlh);\n\n\tread_lock_bh(&tbl->lock);\n\tndtmsg->ndtm_family = tbl->family;\n\tRTA_PUT_STRING(skb, NDTA_NAME, tbl->id);\n\n\tif (neightbl_fill_parms(skb, parms) < 0)\n\t\tgoto rtattr_failure;\n\n\tread_unlock_bh(&tbl->lock);\n\treturn NLMSG_END(skb, nlh);\n\nrtattr_failure:\n\tread_unlock_bh(&tbl->lock);\n\treturn NLMSG_CANCEL(skb, nlh);\n\nnlmsg_failure:\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-581","original_id":"diversevul-581","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)\n{\n\tstruct sk_buff *skb;\n\tunsigned char *b;\n\tstruct nlmsghdr *nlh;\n\tstruct tcamsg *t;\n\tstruct netlink_callback dcb;\n\tstruct rtattr *x;\n\tstruct rtattr *tb[TCA_ACT_MAX+1];\n\tstruct rtattr *kind;\n\tstruct tc_action *a = create_a(0);\n\tint err = -EINVAL;\n\n\tif (a == NULL) {\n\t\tprintk(\"tca_action_flush: couldnt create tc_action\\n\");\n\t\treturn err;\n\t}\n\n\tskb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);\n\tif (!skb) {\n\t\tprintk(\"tca_action_flush: failed skb alloc\\n\");\n\t\tkfree(a);\n\t\treturn -ENOBUFS;\n\t}\n\n\tb = (unsigned char *)skb->tail;\n\n\tif (rtattr_parse_nested(tb, TCA_ACT_MAX, rta) < 0)\n\t\tgoto err_out;\n\n\tkind = tb[TCA_ACT_KIND-1];\n\ta->ops = tc_lookup_action(kind);\n\tif (a->ops == NULL)\n\t\tgoto err_out;\n\n\tnlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t));\n\tt = NLMSG_DATA(nlh);\n\tt->tca_family = AF_UNSPEC;\n\n\tx = (struct rtattr *) skb->tail;\n\tRTA_PUT(skb, TCA_ACT_TAB, 0, NULL);\n\n\terr = a->ops->walk(skb, &dcb, RTM_DELACTION, a);\n\tif (err < 0)\n\t\tgoto rtattr_failure;\n\n\tx->rta_len = skb->tail - (u8 *) x;\n\n\tnlh->nlmsg_len = skb->tail - b;\n\tnlh->nlmsg_flags |= NLM_F_ROOT;\n\tmodule_put(a->ops->owner);\n\tkfree(a);\n\terr = rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO);\n\tif (err > 0)\n\t\treturn 0;\n\n\treturn err;\n\nrtattr_failure:\n\tmodule_put(a->ops->owner);\nnlmsg_failure:\nerr_out:\n\tkfree_skb(skb);\n\tkfree(a);\n\treturn err;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-582","original_id":"diversevul-582","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n__rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)\n{\n\tstruct rtattr *rta;\n\tint size = RTA_LENGTH(attrlen);\n\n\trta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size));\n\trta->rta_type = attrtype;\n\trta->rta_len = size;\n\treturn rta;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-583","original_id":"diversevul-583","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data)\n{\n\tstruct rtattr *rta;\n\tint size = RTA_LENGTH(attrlen);\n\n\trta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size));\n\trta->rta_type = attrtype;\n\trta->rta_len = size;\n\tmemcpy(RTA_DATA(rta), data, attrlen);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-584","original_id":"diversevul-584","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)\n{\n\tstruct nlmsghdr *nlh;\n\tint size = NLMSG_LENGTH(len);\n\n\tnlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size));\n\tnlh->nlmsg_type = type;\n\tnlh->nlmsg_len = size;\n\tnlh->nlmsg_flags = flags;\n\tnlh->nlmsg_pid = pid;\n\tnlh->nlmsg_seq = seq;\n\treturn nlh;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-585","original_id":"diversevul-585","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,\n\t\t\t unsigned long fh, u32 pid, u32 seq, u16 flags, int event)\n{\n\tstruct tcmsg *tcm;\n\tstruct nlmsghdr *nlh;\n\tunsigned char *b = skb_tail_pointer(skb);\n\n\tnlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);\n\ttcm = NLMSG_DATA(nlh);\n\ttcm->tcm_family = AF_UNSPEC;\n\ttcm->tcm__pad1 = 0;\n\ttcm->tcm__pad1 = 0;\n\ttcm->tcm_ifindex = qdisc_dev(tp->q)->ifindex;\n\ttcm->tcm_parent = tp->classid;\n\ttcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);\n\tNLA_PUT_STRING(skb, TCA_KIND, tp->ops->kind);\n\ttcm->tcm_handle = fh;\n\tif (RTM_DELTFILTER != event) {\n\t\ttcm->tcm_handle = 0;\n\t\tif (tp->ops->dump && tp->ops->dump(tp, fh, skb, tcm) < 0)\n\t\t\tgoto nla_put_failure;\n\t}\n\tnlh->nlmsg_len = skb_tail_pointer(skb) - b;\n\treturn skb->len;\n\nnlmsg_failure:\nnla_put_failure:\n\tnlmsg_trim(skb, b);\n\treturn -1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-586","original_id":"diversevul-586","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncheck_mountpoint(const char *progname, char *mountpoint)\n{\n\tint err;\n\tstruct stat statbuf;\n\n\t/* does mountpoint exist and is it a directory? */\n\terr = stat(mountpoint, &statbuf);\n\tif (err) {\n\t\tfprintf(stderr, \"%s: failed to stat %s: %s\\n\", progname,\n\t\t\t\tmountpoint, strerror(errno));\n\t\treturn EX_USAGE;\n\t}\n\n\tif (!S_ISDIR(statbuf.st_mode)) {\n\t\tfprintf(stderr, \"%s: %s is not a directory!\", progname,\n\t\t\t\tmountpoint);\n\t\treturn EX_USAGE;\n\t}\n\n#if CIFS_LEGACY_SETUID_CHECK\n\t/* do extra checks on mountpoint for legacy setuid behavior */\n\tif (!getuid() || geteuid())\n\t\treturn 0;\n\n\tif (statbuf.st_uid != getuid()) {\n\t\tfprintf(stderr, \"%s: %s is not owned by user\\n\", progname,\n\t\t\tmountpoint);\n\t\treturn EX_USAGE;\n\t}\n\n\tif ((statbuf.st_mode & S_IRWXU) != S_IRWXU) {\n\t\tfprintf(stderr, \"%s: invalid permissions on %s\\n\", progname,\n\t\t\tmountpoint);\n\t\treturn EX_USAGE;\n\t}\n#endif /* CIFS_LEGACY_SETUID_CHECK */\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-59"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-587","original_id":"diversevul-587","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nfind_module (lt_dlhandle *handle, const char *dir, const char *libdir,\n\t const char *dlname, const char *old_name, int installed,\n\t lt_dladvise advise)\n{\n /* Try to open the old library first; if it was dlpreopened,\n we want the preopened version of it, even if a dlopenable\n module is available. */\n if (old_name && tryall_dlopen (handle, old_name, advise, 0) == 0)\n {\n return 0;\n }\n\n /* Try to open the dynamic library. */\n if (dlname)\n {\n /* try to open the installed module */\n if (installed && libdir)\n\t{\n\t if (tryall_dlopen_module (handle, (const char *) 0,\n\t\t\t\t libdir, dlname, advise) == 0)\n\t return 0;\n\t}\n\n /* try to open the not-installed module */\n if (!installed)\n\t{\n\t if (tryall_dlopen_module (handle, dir, objdir,\n\t\t\t\t dlname, advise) == 0)\n\t return 0;\n\t}\n\n /* maybe it was moved to another directory */\n {\n\t if (dir && (tryall_dlopen_module (handle, (const char *) 0,\n\t\t\t\t\t dir, dlname, advise) == 0))\n\t return 0;\n }\n }\n\n return 1;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-588","original_id":"diversevul-588","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int do_insn_fetch(struct x86_emulate_ctxt *ctxt,\n\t\t\t struct x86_emulate_ops *ops,\n\t\t\t unsigned long eip, void *dest, unsigned size)\n{\n\tint rc = 0;\n\n\teip += ctxt->cs_base;\n\twhile (size--) {\n\t\trc = do_fetch_insn_byte(ctxt, ops, eip++, dest++);\n\t\tif (rc)\n\t\t\treturn rc;\n\t}\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-589","original_id":"diversevul-589","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnma_gconf_settings_new (void)\n{\n\treturn (NMAGConfSettings *) g_object_new (NMA_TYPE_GCONF_SETTINGS, NULL);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-590","original_id":"diversevul-590","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnm_connection_list_new (GType def_type)\n{\n\tNMConnectionList *list;\n\tDBusGConnection *dbus_connection;\n\tGError *error = NULL;\n\n\tlist = g_object_new (NM_TYPE_CONNECTION_LIST, NULL);\n\tif (!list)\n\t\treturn NULL;\n\n\t/* load GUI */\n\tlist->gui = glade_xml_new (GLADEDIR \"/nm-connection-editor.glade\", \"NMConnectionList\", NULL);\n\tif (!list->gui) {\n\t\tg_warning (\"Could not load Glade file for connection list\");\n\t\tgoto error;\n\t}\n\n\tgtk_window_set_default_icon_name (\"preferences-system-network\");\n\n\tlist->icon_theme = gtk_icon_theme_get_for_screen (gdk_screen_get_default ());\n\n\t/* Load icons */\n\tICON_LOAD(list->wired_icon, \"nm-device-wired\");\n\tICON_LOAD(list->wireless_icon, \"nm-device-wireless\");\n\tICON_LOAD(list->wwan_icon, \"nm-device-wwan\");\n\tICON_LOAD(list->vpn_icon, \"nm-vpn-standalone-lock\");\n\tICON_LOAD(list->unknown_icon, \"nm-no-connection\");\n\n\tlist->client = gconf_client_get_default ();\n\tif (!list->client)\n\t\tgoto error;\n\n\tdbus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);\n\tif (error) {\n\t\tg_warning (\"Could not connect to the system bus: %s\", error->message);\n\t\tg_error_free (error);\n\t\tgoto error;\n\t}\n\n\tlist->system_settings = nm_dbus_settings_system_new (dbus_connection);\n\tdbus_g_connection_unref (dbus_connection);\n\tg_signal_connect (list->system_settings, \"new-connection\",\n\t\t\t\t G_CALLBACK (connection_added),\n\t\t\t\t list);\n\n\tlist->gconf_settings = nma_gconf_settings_new ();\n\tg_signal_connect (list->gconf_settings, \"new-connection\",\n\t\t\t\t G_CALLBACK (connection_added),\n\t\t\t\t list);\n\n\tadd_connection_tabs (list, def_type);\n\n\tlist->editors = g_hash_table_new_full (g_direct_hash, g_direct_equal, g_object_unref, g_object_unref);\n\n\tlist->dialog = glade_xml_get_widget (list->gui, \"NMConnectionList\");\n\tif (!list->dialog)\n\t\tgoto error;\n\tg_signal_connect (G_OBJECT (list->dialog), \"response\", G_CALLBACK (dialog_response_cb), list);\n\n\tif (!vpn_get_plugins (&error)) {\n\t\tg_warning (\"%s: failed to load VPN plugins: %s\", __func__, error->message);\n\t\tg_error_free (error);\n\t}\n\n\treturn list;\n\nerror:\n\tg_object_unref (list);\n\treturn NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-591","original_id":"diversevul-591","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nadd_connection_real (NMAGConfSettings *self, NMAGConfConnection *connection)\n{\n\tNMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (self);\n\n\tif (connection) {\n\t\tpriv->connections = g_slist_prepend (priv->connections, connection);\n\t\tg_signal_connect (connection, \"new-secrets-requested\",\n\t\t\t\t\t G_CALLBACK (connection_new_secrets_requested_cb),\n\t\t\t\t\t self);\n\n\t\tg_signal_connect (connection, \"removed\", G_CALLBACK (connection_removed), self);\n\t\tnm_settings_signal_new_connection (NM_SETTINGS (self),\n\t\t\t\t\t\t\t\t\tNM_EXPORTED_CONNECTION (connection));\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-592","original_id":"diversevul-592","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nconnection_changes_done (gpointer data)\n{\n\tConnectionChangedInfo *info = (ConnectionChangedInfo *) data;\n\tNMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (info->settings);\n\tNMAGConfConnection *connection;\n\n\tconnection = nma_gconf_settings_get_by_path (info->settings, info->path);\n\tif (!connection) {\n\t\t/* New connection */\n\t\tconnection = nma_gconf_connection_new (priv->client, info->path);\n\t\tadd_connection_real (info->settings, connection);\n\t} else {\n\t\tif (gconf_client_dir_exists (priv->client, info->path, NULL)) {\n\t\t\t/* Updated connection */\n\t\t\tif (!nma_gconf_connection_changed (connection))\n\t\t\t\tpriv->connections = g_slist_remove (priv->connections, connection);\n\t\t}\n\t}\n\n\tg_hash_table_remove (priv->pending_changes, info->path);\n\n\treturn FALSE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-593","original_id":"diversevul-593","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nconstructor (GType type,\n\t\t guint n_construct_params,\n\t\t GObjectConstructParam *construct_params)\n{\n\tGObject *object;\n\tNMAGConfConnectionPrivate *priv;\n\tNMConnection *connection;\n\tDBusGConnection *bus;\n\tGError *error = NULL;\n\n\tobject = G_OBJECT_CLASS (nma_gconf_connection_parent_class)->constructor (type, n_construct_params, construct_params);\n\n\tif (!object)\n\t\treturn NULL;\n\n\tpriv = NMA_GCONF_CONNECTION_GET_PRIVATE (object);\n\n\tif (!priv->client) {\n\t\tnm_warning (\"GConfClient not provided.\");\n\t\tgoto err;\n\t}\n\n\tif (!priv->dir) {\n\t\tnm_warning (\"GConf directory not provided.\");\n\t\tgoto err;\n\t}\n\n\tconnection = nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (object));\n\n\tutils_fill_connection_certs (connection);\n\tif (!nm_connection_verify (connection, &error)) {\n\t\tutils_clear_filled_connection_certs (connection);\n\t\tg_warning (\"Invalid connection: '%s' / '%s' invalid: %d\",\n\t\t g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)),\n\t\t error->message, error->code);\n\t\tg_error_free (error);\n\t\tgoto err;\n\t}\n\tutils_clear_filled_connection_certs (connection);\n\n\tfill_vpn_user_name (connection);\n\n\tbus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);\n\tif (!bus) {\n\t\tnm_warning (\"Could not get the system bus: %s\", error->message);\n\t\tg_error_free (error);\n\t\tgoto err;\n\t}\n\n\tnm_exported_connection_register_object (NM_EXPORTED_CONNECTION (object),\n\t NM_CONNECTION_SCOPE_USER,\n\t bus);\n\tdbus_g_connection_unref (bus);\n\n\treturn object;\n\n err:\n\tg_object_unref (object);\n\n\treturn NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-694","original_id":"diversevul-694","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nread_connections (NMAGConfSettings *settings)\n{\n\tNMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (settings);\n\tGSList *dir_list;\n\tGSList *iter;\n\n\tdir_list = nm_gconf_get_all_connections (priv->client);\n\tif (!dir_list)\n\t\treturn;\n\n\tfor (iter = dir_list; iter; iter = iter->next) {\n\t\tchar *dir = (char *) iter->data;\n\n\t\tadd_connection_real (settings, nma_gconf_connection_new (priv->client, dir));\n\t\tg_free (dir);\n\t}\n\n\tg_slist_free (dir_list);\n\tpriv->connections = g_slist_reverse (priv->connections);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-695","original_id":"diversevul-695","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ndispose (GObject *object)\n{\n\tNMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (object);\n\n\tif (priv->disposed)\n\t\treturn;\n\n\tpriv->disposed = TRUE;\n\n\tg_hash_table_destroy (priv->pending_changes);\n\n\tif (priv->read_connections_id) {\n\t\tg_source_remove (priv->read_connections_id);\n\t\tpriv->read_connections_id = 0;\n\t}\n\n\tgconf_client_notify_remove (priv->client, priv->conf_notify_id);\n\tgconf_client_remove_dir (priv->client, GCONF_PATH_CONNECTIONS, NULL);\n\n\tg_slist_foreach (priv->connections, (GFunc) g_object_unref, NULL);\n\tg_slist_free (priv->connections);\n\n\tg_object_unref (priv->client);\n\n\tG_OBJECT_CLASS (nma_gconf_settings_parent_class)->dispose (object);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-696","original_id":"diversevul-696","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nadd_connection_real (NMAGConfSettings *self, NMAGConfConnection *connection)\n{\n\tNMAGConfSettingsPrivate *priv = NMA_GCONF_SETTINGS_GET_PRIVATE (self);\n\n\tg_return_if_fail (connection != NULL);\n\n\tpriv->connections = g_slist_prepend (priv->connections, connection);\n\tg_signal_connect (connection, \"new-secrets-requested\",\n\t\t\t\t G_CALLBACK (connection_new_secrets_requested_cb),\n\t\t\t\t self);\n\n\tg_signal_connect (connection, \"removed\", G_CALLBACK (connection_removed), self);\n\n\t/* Export the connection over dbus if requested */\n\tif (priv->bus) {\n\t\tnm_exported_connection_register_object (NM_EXPORTED_CONNECTION (connection),\n\t\t NM_CONNECTION_SCOPE_USER,\n\t\t priv->bus);\n\t\tdbus_g_connection_unref (priv->bus);\n\t}\n\n\tnm_settings_signal_new_connection (NM_SETTINGS (self), NM_EXPORTED_CONNECTION (connection));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-697","original_id":"diversevul-697","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnma_gconf_connection_new (GConfClient *client, const char *conf_dir)\n{\n\tNMConnection *connection;\n\tNMAGConfConnection *gconf_connection;\n\n\tg_return_val_if_fail (GCONF_IS_CLIENT (client), NULL);\n\tg_return_val_if_fail (conf_dir != NULL, NULL);\n\n\t/* retrieve GConf data */\n\tconnection = nm_gconf_read_connection (client, conf_dir);\n\tif (connection) {\n\t\tgconf_connection = nma_gconf_connection_new_from_connection (client, conf_dir, connection);\n\t\tg_object_unref (connection);\n\t} else {\n\t\tnm_warning (\"No connection read from GConf at %s.\", conf_dir);\n\t\tgconf_connection = NULL;\n\t}\n\t\n\treturn gconf_connection;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-698","original_id":"diversevul-698","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nadd_connection (NMConnectionList *self,\n NMConnectionEditor *editor,\n NMConnection *connection,\n ConnectionAddedFn callback,\n gpointer user_data)\n{\n\tNMExportedConnection *exported = NULL;\n\tNMConnectionScope scope;\n\tgboolean success = FALSE;\n\n\tscope = nm_connection_get_scope (connection);\n\tif (scope == NM_CONNECTION_SCOPE_SYSTEM) {\n\t\tGError *error = NULL;\n\n\t\tutils_fill_connection_certs (connection);\n\t\tsuccess = nm_dbus_settings_system_add_connection (self->system_settings, connection, &error);\n\t\tutils_clear_filled_connection_certs (connection);\n\n\t\tif (!success) {\n\t\t\tgboolean pending_auth = FALSE;\n\t\t\tGtkWindow *parent;\n\n\t\t\tparent = nm_connection_editor_get_window (editor);\n\t\t\tif (pk_helper_is_permission_denied_error (error)) {\n\t\t\t\tConnectionAddInfo *info;\n\t\t\t\tGError *auth_error = NULL;\n\n\t\t\t\tinfo = g_slice_new (ConnectionAddInfo);\n\t\t\t\tinfo->list = self;\n\t\t\t\tinfo->editor = editor;\n\t\t\t\tinfo->connection = g_object_ref (connection);\n\t\t\t\tinfo->callback = callback;\n\t\t\t\tinfo->user_data = user_data;\n\n\t\t\t\tpending_auth = pk_helper_obtain_auth (error, parent, add_connection_cb, info, &auth_error);\n\t\t\t\tif (auth_error) {\n\t\t\t\t\terror_dialog (parent,\n\t\t\t\t\t _(\"Could not add connection\"),\n\t\t\t\t\t \"%s\", auth_error->message);\n\t\t\t\t\tg_error_free (auth_error);\n\t\t\t\t}\n\n\t\t\t\tif (!pending_auth) {\n\t\t\t\t\tg_object_unref (info->connection);\n\t\t\t\t\tg_slice_free (ConnectionAddInfo, info);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\terror_dialog (parent,\n\t\t\t\t _(\"Could not add connection\"),\n\t\t\t\t \"%s\", error->message);\n\t\t\t}\n\n\t\t\tg_error_free (error);\n\n\t\t\tif (pending_auth)\n\t\t\t\treturn;\n\t\t}\n\t} else if (scope == NM_CONNECTION_SCOPE_USER) {\n\t\texported = (NMExportedConnection *) nma_gconf_settings_add_connection (self->gconf_settings, connection);\n\t\tsuccess = exported != NULL;\n\t\tif (success && editor)\n\t\t\tnm_connection_editor_save_vpn_secrets (editor);\n\t} else\n\t\tg_warning (\"%s: unhandled connection scope %d!\", __func__, scope);\n\n\tif (callback)\n\t\tcallback (exported, success, user_data);\n\n\tif (exported)\n\t\tg_object_unref (exported);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-699","original_id":"diversevul-699","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nread_one_cert (ReadFromGConfInfo *info,\n const char *setting_name,\n const char *key)\n{\n\tchar *value = NULL;\n\n\tif (!nm_gconf_get_string_helper (info->client, info->dir, key, setting_name, &value))\n\t\treturn;\n\n\tg_object_set_data_full (G_OBJECT (info->connection),\n\t key, value,\n\t (GDestroyNotify) g_free);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-700","original_id":"diversevul-700","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nread_applet_private_values_from_gconf (NMSetting *setting,\n ReadFromGConfInfo *info)\n{\n\tif (NM_IS_SETTING_802_1X (setting)) {\n\t\tconst char *setting_name = nm_setting_get_name (setting);\n\t\tgboolean value;\n\n\t\tif (nm_gconf_get_bool_helper (info->client, info->dir,\n\t\t NMA_CA_CERT_IGNORE_TAG,\n\t\t setting_name, &value)) {\n\t\t\tg_object_set_data (G_OBJECT (info->connection),\n\t\t\t NMA_CA_CERT_IGNORE_TAG,\n\t\t\t GUINT_TO_POINTER (value));\n\t\t}\n\n\t\tif (nm_gconf_get_bool_helper (info->client, info->dir,\n\t\t NMA_PHASE2_CA_CERT_IGNORE_TAG,\n\t\t setting_name, &value)) {\n\t\t\tg_object_set_data (G_OBJECT (info->connection),\n\t\t\t NMA_PHASE2_CA_CERT_IGNORE_TAG,\n\t\t\t GUINT_TO_POINTER (value));\n\t\t}\n\n\t\t/* Binary certificate and key data doesn't get stored in GConf. Instead,\n\t\t * the path to the certificate gets stored in a special key and the\n\t\t * certificate is read and stuffed into the setting right before\n\t\t * the connection is sent to NM\n\t\t */\n\t\tread_one_cert (info, setting_name, NMA_PATH_CA_CERT_TAG);\n\t\tread_one_cert (info, setting_name, NMA_PATH_CLIENT_CERT_TAG);\n\t\tread_one_cert (info, setting_name, NMA_PATH_PRIVATE_KEY_TAG);\n\t\tread_one_cert (info, setting_name, NMA_PATH_PHASE2_CA_CERT_TAG);\n\t\tread_one_cert (info, setting_name, NMA_PATH_PHASE2_CLIENT_CERT_TAG);\n\t\tread_one_cert (info, setting_name, NMA_PATH_PHASE2_PRIVATE_KEY_TAG);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-701","original_id":"diversevul-701","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nadd_one_setting (GHashTable *settings,\n NMConnection *connection,\n NMSetting *setting,\n GError **error)\n{\n\tGHashTable *secrets;\n\n\tg_return_val_if_fail (settings != NULL, FALSE);\n\tg_return_val_if_fail (connection != NULL, FALSE);\n\tg_return_val_if_fail (setting != NULL, FALSE);\n\tg_return_val_if_fail (error != NULL, FALSE);\n\tg_return_val_if_fail (*error == NULL, FALSE);\n\n\tutils_fill_connection_certs (connection);\n\tsecrets = nm_setting_to_hash (setting);\n\tutils_clear_filled_connection_certs (connection);\n\n\tif (secrets) {\n\t\tg_hash_table_insert (settings, g_strdup (nm_setting_get_name (setting)), secrets);\n\t} else {\n\t\tg_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INTERNAL_ERROR,\n\t\t \"%s.%d (%s): failed to hash setting '%s'.\",\n\t\t __FILE__, __LINE__, __func__, nm_setting_get_name (setting));\n\t}\n\n\treturn secrets ? TRUE : FALSE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-702","original_id":"diversevul-702","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nget_settings (NMExportedConnection *exported)\n{\n\tNMConnection *connection;\n\tGHashTable *settings;\n\n\tconnection = nm_exported_connection_get_connection (exported);\n\n\tutils_fill_connection_certs (connection);\n\tsettings = nm_connection_to_hash (connection);\n\tutils_clear_filled_connection_certs (connection);\n\n\treturn settings;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-703","original_id":"diversevul-703","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nconstructor (GType type,\n\t\t guint n_construct_params,\n\t\t GObjectConstructParam *construct_params)\n{\n\tGObject *object;\n\tNMAGConfConnectionPrivate *priv;\n\tNMConnection *connection;\n\tGError *error = NULL;\n\n\tobject = G_OBJECT_CLASS (nma_gconf_connection_parent_class)->constructor (type, n_construct_params, construct_params);\n\n\tif (!object)\n\t\treturn NULL;\n\n\tpriv = NMA_GCONF_CONNECTION_GET_PRIVATE (object);\n\n\tif (!priv->client) {\n\t\tnm_warning (\"GConfClient not provided.\");\n\t\tgoto err;\n\t}\n\n\tif (!priv->dir) {\n\t\tnm_warning (\"GConf directory not provided.\");\n\t\tgoto err;\n\t}\n\n\tconnection = nm_exported_connection_get_connection (NM_EXPORTED_CONNECTION (object));\n\n\tutils_fill_connection_certs (connection);\n\tif (!nm_connection_verify (connection, &error)) {\n\t\tutils_clear_filled_connection_certs (connection);\n\t\tg_warning (\"Invalid connection: '%s' / '%s' invalid: %d\",\n\t\t g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)),\n\t\t error->message, error->code);\n\t\tg_error_free (error);\n\t\tgoto err;\n\t}\n\tutils_clear_filled_connection_certs (connection);\n\n\tfill_vpn_user_name (connection);\n\n\treturn object;\n\n err:\n\tg_object_unref (object);\n\n\treturn NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-704","original_id":"diversevul-704","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnm_gconf_read_connection (GConfClient *client,\n const char *dir)\n{\n\tReadFromGConfInfo info;\n\tGSList *list;\n\tGError *err = NULL;\n\n\tlist = gconf_client_all_dirs (client, dir, &err);\n\tif (err) {\n\t\tg_warning (\"Error while reading connection: %s\", err->message);\n\t\tg_error_free (err);\n\t\treturn NULL;\n\t}\n\n\tif (!list) {\n\t\tg_warning (\"Invalid connection (empty)\");\n\t\treturn NULL;\n\t}\n\n\tinfo.connection = nm_connection_new ();\n\tinfo.client = client;\n\tinfo.dir = dir;\n\tinfo.dir_len = strlen (dir);\n\n\tg_slist_foreach (list, read_one_setting, &info);\n\tg_slist_free (list);\n\n\treturn info.connection;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-705","original_id":"diversevul-705","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nedit_done_cb (NMConnectionEditor *editor, gint response, GError *error, gpointer user_data)\n{\n\tEditConnectionInfo *info = (EditConnectionInfo *) user_data;\n\tconst char *message = _(\"An unknown error ocurred.\");\n\n\tg_hash_table_remove (info->list->editors, info->original_connection);\n\n\tif (response == GTK_RESPONSE_NONE) {\n\t\tif (error && error->message)\n\t\t\tmessage = error->message;\n\t\terror_dialog (GTK_WINDOW (editor->window), _(\"Error initializing editor\"), \"%s\", message);\n\t} else if (response == GTK_RESPONSE_OK) {\n\t\tNMConnection *connection;\n\t\tGError *edit_error = NULL;\n\t\tgboolean success;\n\n\t\tconnection = nm_connection_editor_get_connection (editor);\n\n\t\tutils_fill_connection_certs (connection);\n\t\tsuccess = nm_connection_verify (connection, &edit_error);\n\t\tutils_clear_filled_connection_certs (connection);\n\n\t\tif (success) {\n\t\t\tupdate_connection (info->list, editor, info->original_connection,\n\t\t\t connection, connection_updated_cb, info);\n\t\t} else {\n\t\t\tg_warning (\"%s: invalid connection after update: bug in the \"\n\t\t\t \"'%s' / '%s' invalid: %d\",\n\t\t\t __func__,\n\t\t\t g_type_name (nm_connection_lookup_setting_type_by_quark (edit_error->domain)),\n\t\t\t edit_error->message, edit_error->code);\n\t\t\tg_error_free (edit_error);\n\t\t\tconnection_updated_cb (info->list, FALSE, user_data);\n\t\t}\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-706","original_id":"diversevul-706","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nactivate_parameters_install_free (ActivateParametersInstall *parameters_install)\n{\n\tif (parameters_install->slot_info) {\n\t\tg_object_remove_weak_pointer (G_OBJECT (parameters_install->slot_info), (gpointer *)&parameters_install->slot_info);\n\t}\n\tif (parameters_install->parent_window) {\n\t\tg_object_remove_weak_pointer (G_OBJECT (parameters_install->parent_window), (gpointer *)&parameters_install->parent_window);\n\t}\n\tnautilus_file_list_free (parameters_install->files);\n\tg_free (parameters_install->activation_directory);\n\tg_free (parameters_install);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-707","original_id":"diversevul-707","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nlink_info_done (NautilusDirectory *directory,\n\t\tNautilusFile *file,\n\t\tconst char *uri,\n\t\tconst char *name, \n\t\tconst char *icon,\n\t\tgboolean is_launcher,\n\t\tgboolean is_foreign)\n{\n\tfile->details->link_info_is_up_to_date = TRUE;\n\n\tnautilus_file_set_display_name (file, name, name, TRUE);\n\t\n\tfile->details->got_link_info = TRUE;\n\tg_free (file->details->custom_icon);\n\tif (uri) {\n\t\tif (file->details->activation_location) {\n\t\t\tg_object_unref (file->details->activation_location);\n\t\t\tfile->details->activation_location = NULL;\n\t\t}\n\t\tfile->details->got_custom_activation_location = TRUE;\n\t\tfile->details->activation_location = g_file_new_for_uri (uri);\n\t}\n\tfile->details->custom_icon = g_strdup (icon);\n\tfile->details->is_launcher = is_launcher;\n\tfile->details->is_foreign_link = is_foreign;\n\t\n\tnautilus_directory_async_state_changed (directory);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-708","original_id":"diversevul-708","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnautilus_file_set_display_name (NautilusFile *file,\n\t\t\t\tconst char *display_name,\n\t\t\t\tconst char *edit_name,\n\t\t\t\tgboolean custom)\n{\n\tgboolean changed;\n\n\tif (display_name == NULL || *display_name == 0) {\n\t\treturn FALSE;\n\t}\n\t\n\tif (!custom && file->details->got_custom_display_name) {\n\t\treturn FALSE;\n\t}\n\n\tif (custom && display_name == NULL) {\n\t\t/* We're re-setting a custom display name, invalidate it if\n\t\t we already set it so that the old one is re-read */\n\t\tif (file->details->got_custom_display_name) {\n\t\t\tfile->details->got_custom_display_name = FALSE;\n\t\t\tnautilus_file_invalidate_attributes (file,\n\t\t\t\t\t\t\t NAUTILUS_FILE_ATTRIBUTE_INFO);\n\t\t}\n\t\treturn FALSE;\n\t}\n\n\tif (edit_name == NULL) {\n\t\tedit_name = display_name;\n\t}\n\t \n\tchanged = FALSE;\n\t\n\tif (eel_strcmp (eel_ref_str_peek (file->details->display_name), display_name) != 0) {\n\t\tchanged = TRUE;\n\t\t\n\t\teel_ref_str_unref (file->details->display_name);\n\t\t\n\t\tif (eel_strcmp (eel_ref_str_peek (file->details->name), display_name) == 0) {\n\t\t\tfile->details->display_name = eel_ref_str_ref (file->details->name);\n\t\t} else {\n\t\t\tfile->details->display_name = eel_ref_str_new (display_name);\n\t\t}\n\t\t\n\t\tg_free (file->details->display_name_collation_key);\n\t\tfile->details->display_name_collation_key = g_utf8_collate_key_for_filename (display_name, -1);\n\t}\n\n\tif (eel_strcmp (eel_ref_str_peek (file->details->edit_name), edit_name) != 0) {\n\t\tchanged = TRUE;\n\t\t\n\t\teel_ref_str_unref (file->details->edit_name);\n\t\tif (eel_strcmp (eel_ref_str_peek (file->details->display_name), edit_name) == 0) {\n\t\t\tfile->details->edit_name = eel_ref_str_ref (file->details->display_name);\n\t\t} else {\n\t\t\tfile->details->edit_name = eel_ref_str_new (edit_name);\n\t\t}\n\t}\n\t\n\tfile->details->got_custom_display_name = custom;\n\treturn changed;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-709","original_id":"diversevul-709","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnautilus_file_clear_info (NautilusFile *file)\n{\n\tfile->details->got_file_info = FALSE;\n\tif (file->details->get_info_error) {\n\t\tg_error_free (file->details->get_info_error);\n\t\tfile->details->get_info_error = NULL;\n\t}\n\t/* Reset to default type, which might be other than unknown for\n\t special kinds of files like the desktop or a search directory */\n\tfile->details->type = NAUTILUS_FILE_GET_CLASS (file)->default_file_type;\n\n\tif (!file->details->got_custom_display_name) {\n\t\tnautilus_file_clear_display_name (file);\n\t}\n\n\tif (!file->details->got_custom_activation_location &&\n\t file->details->activation_location != NULL) {\n\t\tg_object_unref (file->details->activation_location);\n\t\tfile->details->activation_location = NULL;\n\t}\n\t\n\tif (file->details->icon != NULL) {\n\t\tg_object_unref (file->details->icon);\n\t\tfile->details->icon = NULL;\n\t}\n\n\tg_free (file->details->thumbnail_path);\n\tfile->details->thumbnail_path = NULL;\n\tfile->details->thumbnailing_failed = FALSE;\n\t\n\tfile->details->is_launcher = FALSE;\n\tfile->details->is_foreign_link = FALSE;\n\tfile->details->is_symlink = FALSE;\n\tfile->details->is_hidden = FALSE;\n\tfile->details->is_backup = FALSE;\n\tfile->details->is_mountpoint = FALSE;\n\tfile->details->uid = -1;\n\tfile->details->gid = -1;\n\tfile->details->can_read = TRUE;\n\tfile->details->can_write = TRUE;\n\tfile->details->can_execute = TRUE;\n\tfile->details->can_delete = TRUE;\n\tfile->details->can_trash = TRUE;\n\tfile->details->can_rename = TRUE;\n\tfile->details->can_mount = FALSE;\n\tfile->details->can_unmount = FALSE;\n\tfile->details->can_eject = FALSE;\n\tfile->details->has_permissions = FALSE;\n\tfile->details->permissions = 0;\n\tfile->details->size = -1;\n\tfile->details->sort_order = 0;\n\tfile->details->mtime = 0;\n\tfile->details->atime = 0;\n\tfile->details->ctime = 0;\n\tg_free (file->details->symlink_name);\n\tfile->details->symlink_name = NULL;\n\teel_ref_str_unref (file->details->mime_type);\n\tfile->details->mime_type = NULL;\n\tg_free (file->details->selinux_context);\n\tfile->details->selinux_context = NULL;\n\tg_free (file->details->description);\n\tfile->details->description = NULL;\n\n\teel_ref_str_unref (file->details->filesystem_id);\n\tfile->details->filesystem_id = NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-710","original_id":"diversevul-710","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nmark_trusted_callback (NautilusFile *file,\n\t\t GFile *result_location,\n\t\t GError *error,\n\t\t gpointer callback_data)\n{\n\tActivateParametersDesktop *parameters;\n\n\tparameters = callback_data;\n\tif (error) {\n\t\teel_show_error_dialog (_(\"Unable to mark launcher trusted (executable)\"),\n\t\t\t\t error->message,\n\t\t\t\t parameters->parent_window);\n\t}\n\t\n\tactivate_parameters_desktop_free (parameters);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-711","original_id":"diversevul-711","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nuntrusted_launcher_response_callback (GtkDialog *dialog,\n\t\t\t\t int response_id,\n\t\t\t\t ActivateParametersDesktop *parameters)\n{\n\tGdkScreen *screen;\n\tchar *uri;\n\tgboolean free_params;\n\t\n\tfree_params = TRUE;\n\tswitch (response_id) {\n\tcase RESPONSE_RUN:\n\t\tscreen = gtk_widget_get_screen (GTK_WIDGET (parameters->parent_window));\n\t\turi = nautilus_file_get_uri (parameters->file);\n\t\tnautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER,\n\t\t\t\t \"directory view activate_callback launch_desktop_file window=%p: %s\",\n\t\t\t\t parameters->parent_window, uri);\n\t\tnautilus_launch_desktop_file (screen, uri, NULL,\n\t\t\t\t\t parameters->parent_window);\n\t\tg_free (uri);\n\t\tbreak;\n\tcase RESPONSE_MARK_TRUSTED:\n\t\tnautilus_file_set_permissions (parameters->file, \n\t\t\t\t\t nautilus_file_get_permissions (parameters->file) | S_IXGRP | S_IXUSR | S_IXOTH,\n\t\t\t\t\t mark_trusted_callback,\n\t\t\t\t\t parameters);\n\t\tfree_params = FALSE;\n\t\tbreak;\n\tdefault:\n\t\t/* Just destroy dialog */\n\t\tbreak;\n\t}\n\t\n\tgtk_widget_destroy (GTK_WIDGET (dialog));\n\tif (free_params) {\n\t\tactivate_parameters_desktop_free (parameters);\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-712","original_id":"diversevul-712","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nfinish_startup (NautilusApplication *application)\n{\n\tGList *drives;\n\n\t/* initialize nautilus modules */\n\tnautilus_module_setup ();\n\n\t/* attach menu-provider module callback */\n\tmenu_provider_init_callback ();\n\t\n\t/* Initialize the desktop link monitor singleton */\n\tnautilus_desktop_link_monitor_get ();\n\n\t/* Watch for mounts so we can restore open windows This used\n\t * to be for showing new window on mount, but is not used\n\t * anymore */\n\n\t/* Watch for unmounts so we can close open windows */\n\t/* TODO-gio: This should be using the UNMOUNTED feature of GFileMonitor instead */\n\tapplication->volume_monitor = g_volume_monitor_get ();\n\tg_signal_connect_object (application->volume_monitor, \"mount_removed\",\n\t\t\t\t G_CALLBACK (mount_removed_callback), application, 0);\n\tg_signal_connect_object (application->volume_monitor, \"mount_pre_unmount\",\n\t\t\t\t G_CALLBACK (mount_removed_callback), application, 0);\n\tg_signal_connect_object (application->volume_monitor, \"mount_added\",\n\t\t\t\t G_CALLBACK (mount_added_callback), application, 0);\n\tg_signal_connect_object (application->volume_monitor, \"volume_added\",\n\t\t\t\t G_CALLBACK (volume_added_callback), application, 0);\n\tg_signal_connect_object (application->volume_monitor, \"drive_connected\",\n\t\t\t\t G_CALLBACK (drive_connected_callback), application, 0);\n\n\t/* listen for eject button presses */\n\tdrives = g_volume_monitor_get_connected_drives (application->volume_monitor);\n\tg_list_foreach (drives, (GFunc) drive_listen_for_eject_button, application);\n\tg_list_foreach (drives, (GFunc) g_object_unref, NULL);\n\tg_list_free (drives);\n\n\tapplication->automount_idle_id = \n\t\tg_idle_add_full (G_PRIORITY_LOW,\n\t\t\t\t automount_all_volumes_idle_cb,\n\t\t\t\t application, NULL);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-713","original_id":"diversevul-713","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nuntrusted_launcher_response_callback (GtkDialog *dialog,\n\t\t\t\t int response_id,\n\t\t\t\t ActivateParametersDesktop *parameters)\n{\n\tGdkScreen *screen;\n\tchar *uri;\n\tGFile *file;\n\t\n\tswitch (response_id) {\n\tcase RESPONSE_RUN:\n\t\tscreen = gtk_widget_get_screen (GTK_WIDGET (parameters->parent_window));\n\t\turi = nautilus_file_get_uri (parameters->file);\n\t\tnautilus_debug_log (FALSE, NAUTILUS_DEBUG_LOG_DOMAIN_USER,\n\t\t\t\t \"directory view activate_callback launch_desktop_file window=%p: %s\",\n\t\t\t\t parameters->parent_window, uri);\n\t\tnautilus_launch_desktop_file (screen, uri, NULL,\n\t\t\t\t\t parameters->parent_window);\n\t\tg_free (uri);\n\t\tbreak;\n\tcase RESPONSE_MARK_TRUSTED:\n\t\tfile = nautilus_file_get_location (parameters->file);\n\t\tnautilus_file_mark_desktop_file_trusted (file,\n\t\t\t\t\t\t\t parameters->parent_window,\n\t\t\t\t\t\t\t NULL, NULL);\n\t\tg_object_unref (file);\n\t\tbreak;\n\tdefault:\n\t\t/* Just destroy dialog */\n\t\tbreak;\n\t}\n\t\n\tgtk_widget_destroy (GTK_WIDGET (dialog));\n\tactivate_parameters_desktop_free (parameters);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-714","original_id":"diversevul-714","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncopy_job_done (gpointer user_data)\n{\n\tCopyMoveJob *job;\n\n\tjob = user_data;\n\tif (job->done_callback) {\n\t\tjob->done_callback (job->debuting_files, job->done_callback_data);\n\t}\n\n\teel_g_object_list_free (job->files);\n\tif (job->destination) {\n\t\tg_object_unref (job->destination);\n\t}\n\tg_hash_table_unref (job->debuting_files);\n\tg_free (job->icon_positions);\n\t\n\tfinalize_common ((CommonJob *)job);\n\n\tnautilus_file_changes_consume_changes (TRUE);\n\treturn FALSE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-715","original_id":"diversevul-715","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nmark_desktop_files_trusted (void)\n{\n\tchar *user_dir, *do_once_file;\n\tGFile *f, *c;\n\tGFileEnumerator *e;\n\tGFileInfo *info;\n\tconst char *name;\n\tint fd;\n\t\n\tuser_dir = nautilus_get_user_directory ();\n\tdo_once_file = g_build_filename (user_dir, \"converted-launchers\", NULL);\n\tg_free (user_dir);\n\n\tif (g_file_test (do_once_file, G_FILE_TEST_EXISTS)) {\n\t\tgoto out;\n\t}\n\n\tf = nautilus_get_desktop_location ();\n\te = g_file_enumerate_children (f,\n\t\t\t\t G_FILE_ATTRIBUTE_STANDARD_TYPE \",\"\n\t\t\t\t G_FILE_ATTRIBUTE_STANDARD_NAME \",\"\n\t\t\t\t G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE\n\t\t\t\t ,\n\t\t\t\t G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,\n\t\t\t\t NULL, NULL);\n\tif (e == NULL) {\n\t\tgoto out2;\n\t}\n\t\n\twhile ((info = g_file_enumerator_next_file (e, NULL, NULL)) != NULL) {\n\t\tname = g_file_info_get_name (info);\n\t\t\n\t\tif (g_str_has_suffix (name, \".desktop\") &&\n\t\t !g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE)) {\n\t\t\tc = g_file_get_child (f, name);\n\t\t\tnautilus_file_mark_desktop_file_trusted (c,\n\t\t\t\t\t\t\t\t NULL, FALSE,\n\t\t\t\t\t\t\t\t NULL, NULL);\n\t\t\tg_object_unref (c);\n\t\t}\n\t\tg_object_unref (info);\n\t}\n\t\n\tg_object_unref (e);\n out2:\n\tfd = g_creat (do_once_file, 0666);\n\tclose (fd);\n\t\n\tg_object_unref (f);\n out:\t\n\tg_free (do_once_file);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-716","original_id":"diversevul-716","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnautilus_file_operations_copy (GList *files,\n\t\t\t GArray *relative_item_points,\n\t\t\t GFile *target_dir,\n\t\t\t GtkWindow *parent_window,\n\t\t\t NautilusCopyCallback done_callback,\n\t\t\t gpointer done_callback_data)\n{\n\tCopyMoveJob *job;\n\n\tjob = op_job_new (CopyMoveJob, parent_window);\n\tjob->done_callback = done_callback;\n\tjob->done_callback_data = done_callback_data;\n\tjob->files = eel_g_object_list_copy (files);\n\tjob->destination = g_object_ref (target_dir);\n\tif (relative_item_points != NULL &&\n\t relative_item_points->len > 0) {\n\t\tjob->icon_positions =\n\t\t\tg_memdup (relative_item_points->data,\n\t\t\t\t sizeof (GdkPoint) * relative_item_points->len);\n\t\tjob->n_icon_positions = relative_item_points->len;\n\t}\n\tjob->debuting_files = g_hash_table_new_full (g_file_hash, (GEqualFunc)g_file_equal, g_object_unref, NULL);\n\n\tg_io_scheduler_push_job (copy_job,\n\t\t\t job,\n\t\t\t NULL, /* destroy notify */\n\t\t\t 0,\n\t\t\t job->common.cancellable);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-717","original_id":"diversevul-717","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ncopy_job (GIOSchedulerJob *io_job,\n\t GCancellable *cancellable,\n\t gpointer user_data)\n{\n\tCopyMoveJob *job;\n\tCommonJob *common;\n\tSourceInfo source_info;\n\tTransferInfo transfer_info;\n\tchar *dest_fs_id;\n\tGFile *dest;\n\n\tjob = user_data;\n\tcommon = &job->common;\n\tcommon->io_job = io_job;\n\n\tdest_fs_id = NULL;\n\t\n\tnautilus_progress_info_start (job->common.progress);\n\t\n\tscan_sources (job->files,\n\t\t &source_info,\n\t\t common,\n\t\t OP_KIND_COPY);\n\tif (job_aborted (common)) {\n\t\tgoto aborted;\n\t}\n\n\tif (job->destination) {\n\t\tdest = g_object_ref (job->destination);\n\t} else {\n\t\t/* Duplication, no dest,\n\t\t * use source for free size, etc\n\t\t */\n\t\tdest = g_file_get_parent (job->files->data);\n\t}\n\t\n\tverify_destination (&job->common,\n\t\t\t dest,\n\t\t\t &dest_fs_id,\n\t\t\t source_info.num_bytes);\n\tg_object_unref (dest);\n\tif (job_aborted (common)) {\n\t\tgoto aborted;\n\t}\n\n\tg_timer_start (job->common.time);\n\t\n\tmemset (&transfer_info, 0, sizeof (transfer_info));\n\tcopy_files (job,\n\t\t dest_fs_id,\n\t\t &source_info, &transfer_info);\n\t\n aborted:\n\t\n\tg_free (dest_fs_id);\n\t\n\tg_io_scheduler_job_send_to_mainloop_async (io_job,\n\t\t\t\t\t\t copy_job_done,\n\t\t\t\t\t\t job,\n\t\t\t\t\t\t NULL);\n\n\treturn FALSE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-718","original_id":"diversevul-718","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nis_link_trusted (NautilusFile *file,\n\t\t gboolean is_launcher)\n{\n\tgboolean res;\n\t\n\tif (!is_launcher) {\n\t\treturn TRUE;\n\t}\n\t\n\tif (nautilus_file_can_execute (file)) {\n\t\treturn TRUE;\n\t}\n\n\tres = FALSE;\n\t\n\tif (nautilus_file_is_local (file)) {\n\t\tconst char * const * data_dirs; \n\t\tchar *uri, *path;\n\t\tint i;\n\t\t\t\n\t\tdata_dirs = g_get_system_data_dirs ();\n\t\t\n\t\tpath = NULL;\n\t\turi = nautilus_file_get_uri (file);\n\t\tif (uri) {\n\t\t\tpath = g_filename_from_uri (uri, NULL, NULL);\n\t\t\tg_free (uri);\n\t\t}\n\n\t\tfor (i = 0; path != NULL && data_dirs[i] != NULL; i++) {\n\t\t\tif (g_str_has_prefix (path, data_dirs[i])) {\n\t\t\t\tres = TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tg_free (path);\n\t}\n\t\n\t\n\treturn res;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-719","original_id":"diversevul-719","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nnautilus_link_get_link_info_given_file_contents (const char *file_contents,\n\t\t\t\t\t\t int link_file_size,\n\t\t\t\t\t\t const char *file_uri,\n\t\t\t\t\t\t char **uri,\n\t\t\t\t\t\t char **name,\n\t\t\t\t\t\t char **icon,\n\t\t\t\t\t\t gboolean *is_launcher,\n\t\t\t\t\t\t gboolean *is_foreign)\n{\n\tGKeyFile *key_file;\n\tchar *type;\n\tchar **only_show_in;\n\tchar **not_show_in;\n\n\tif (!is_link_data (file_contents, link_file_size)) {\n\t\treturn;\n\t}\n\n\tkey_file = g_key_file_new ();\n\tif (!g_key_file_load_from_data (key_file,\n\t\t\t\t\tfile_contents,\n\t\t\t\t\tlink_file_size,\n\t\t\t\t\tG_KEY_FILE_NONE,\n\t\t\t\t\tNULL)) {\n\t\tg_key_file_free (key_file);\n\t\treturn; \n\t}\n\n\t*uri = nautilus_link_get_link_uri_from_desktop (key_file, file_uri);\n\t*name = nautilus_link_get_link_name_from_desktop (key_file);\n\t*icon = nautilus_link_get_link_icon_from_desktop (key_file);\n\n\t*is_launcher = FALSE;\n\ttype = g_key_file_get_string (key_file, MAIN_GROUP, \"Type\", NULL);\n\tif (g_strcmp0 (type, \"Application\") == 0 &&\n\t g_key_file_has_key (key_file, MAIN_GROUP, \"Exec\", NULL)) {\n\t\t*is_launcher = TRUE;\n\t}\n\tg_free (type);\n\n\t*is_foreign = FALSE;\n\tonly_show_in = g_key_file_get_string_list (key_file, MAIN_GROUP,\n\t\t\t\t\t\t \"OnlyShowIn\", NULL, NULL);\n\tif (only_show_in && !string_array_contains (only_show_in, \"GNOME\")) {\n\t\t*is_foreign = TRUE;\n\t}\n\tg_strfreev (only_show_in);\n\n\tnot_show_in = g_key_file_get_string_list (key_file, MAIN_GROUP,\n\t\t\t\t\t\t \"NotShowIn\", NULL, NULL);\n\tif (not_show_in && string_array_contains (not_show_in, \"GNOME\")) {\n\t\t*is_foreign = TRUE;\n\t}\n\tg_strfreev (not_show_in);\n\n\tg_key_file_free (key_file);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-720","original_id":"diversevul-720","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nis_link_data (const char *file_contents, int file_size)\n{\n\tchar *mimetype;\n\tgboolean res;\n\n\tmimetype = g_content_type_guess (NULL, file_contents, file_size, NULL);\n\tres = is_link_mime_type (mimetype);\n\tg_free (mimetype);\n\treturn res;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-721","original_id":"diversevul-721","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,\n\t\t\tunsigned int nr_segs, size_t bytes, bool to_user)\n{\n\tstruct iov_iter ii;\n\tint page_idx = 0;\n\n\tif (!bytes)\n\t\treturn 0;\n\n\tiov_iter_init(&ii, iov, nr_segs, bytes, 0);\n\n\twhile (iov_iter_count(&ii)) {\n\t\tstruct page *page = pages[page_idx++];\n\t\tsize_t todo = min_t(size_t, PAGE_SIZE, iov_iter_count(&ii));\n\t\tvoid *kaddr, *map;\n\n\t\tkaddr = map = kmap(page);\n\n\t\twhile (todo) {\n\t\t\tchar __user *uaddr = ii.iov->iov_base + ii.iov_offset;\n\t\t\tsize_t iov_len = ii.iov->iov_len - ii.iov_offset;\n\t\t\tsize_t copy = min(todo, iov_len);\n\t\t\tsize_t left;\n\n\t\t\tif (!to_user)\n\t\t\t\tleft = copy_from_user(kaddr, uaddr, copy);\n\t\t\telse\n\t\t\t\tleft = copy_to_user(uaddr, kaddr, copy);\n\n\t\t\tif (unlikely(left))\n\t\t\t\treturn -EFAULT;\n\n\t\t\tiov_iter_advance(&ii, copy);\n\t\t\ttodo -= copy;\n\t\t\tkaddr += copy;\n\t\t}\n\n\t\tkunmap(map);\n\t}\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-722","original_id":"diversevul-722","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_hb_ot_layout_init (hb_face_t *face)\n{\n hb_ot_layout_t *layout = &face->ot_layout;\n\n layout->gdef_blob = Sanitizer<GDEF>::sanitize (hb_face_get_table (face, HB_OT_TAG_GDEF));\n layout->gdef = &Sanitizer<GDEF>::lock_instance (layout->gdef_blob);\n\n layout->gsub_blob = Sanitizer<GSUB>::sanitize (hb_face_get_table (face, HB_OT_TAG_GSUB));\n layout->gsub = &Sanitizer<GSUB>::lock_instance (layout->gsub_blob);\n\n layout->gpos_blob = Sanitizer<GPOS>::sanitize (hb_face_get_table (face, HB_OT_TAG_GPOS));\n layout->gpos = &Sanitizer<GPOS>::lock_instance (layout->gpos_blob);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-723","original_id":"diversevul-723","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nhb_ot_layout_build_glyph_classes (hb_face_t *face,\n\t\t\t\t uint16_t num_total_glyphs,\n\t\t\t\t hb_codepoint_t *glyphs,\n\t\t\t\t unsigned char *klasses,\n\t\t\t\t uint16_t count)\n{\n if (HB_OBJECT_IS_INERT (face))\n return;\n\n hb_ot_layout_t *layout = &face->ot_layout;\n\n if (HB_UNLIKELY (!count || !glyphs || !klasses))\n return;\n\n if (layout->new_gdef.len == 0) {\n layout->new_gdef.klasses = (unsigned char *) calloc (num_total_glyphs, sizeof (unsigned char));\n layout->new_gdef.len = count;\n }\n\n for (unsigned int i = 0; i < count; i++)\n _hb_ot_layout_set_glyph_class (face, glyphs[i], (hb_ot_layout_glyph_class_t) klasses[i]);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-724","original_id":"diversevul-724","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int usb_host_handle_control(USBHostDevice *s, USBPacket *p)\n{\n struct usbdevfs_urb *urb;\n AsyncURB *aurb;\n int ret, value, index;\n\n /* \n * Process certain standard device requests.\n * These are infrequent and are processed synchronously.\n */\n value = le16_to_cpu(s->ctrl.req.wValue);\n index = le16_to_cpu(s->ctrl.req.wIndex);\n\n dprintf(\"husb: ctrl type 0x%x req 0x%x val 0x%x index %u len %u\\n\",\n s->ctrl.req.bRequestType, s->ctrl.req.bRequest, value, index, \n s->ctrl.len);\n\n if (s->ctrl.req.bRequestType == 0) {\n switch (s->ctrl.req.bRequest) {\n case USB_REQ_SET_ADDRESS:\n return usb_host_set_address(s, value);\n\n case USB_REQ_SET_CONFIGURATION:\n return usb_host_set_config(s, value & 0xff);\n }\n }\n\n if (s->ctrl.req.bRequestType == 1 &&\n s->ctrl.req.bRequest == USB_REQ_SET_INTERFACE)\n return usb_host_set_interface(s, index, value);\n\n /* The rest are asynchronous */\n\n aurb = async_alloc();\n aurb->hdev = s;\n aurb->packet = p;\n\n /* \n * Setup ctrl transfer.\n *\n * s->ctrl is layed out such that data buffer immediately follows\n * 'req' struct which is exactly what usbdevfs expects.\n */ \n urb = &aurb->urb;\n\n urb->type = USBDEVFS_URB_TYPE_CONTROL;\n urb->endpoint = p->devep;\n\n urb->buffer = &s->ctrl.req;\n urb->buffer_length = 8 + s->ctrl.len;\n\n urb->usercontext = s;\n\n ret = ioctl(s->fd, USBDEVFS_SUBMITURB, urb);\n\n dprintf(\"husb: submit ctrl. len %u aurb %p\\n\", urb->buffer_length, aurb);\n\n if (ret < 0) {\n dprintf(\"husb: submit failed. errno %d\\n\", errno);\n async_free(aurb);\n\n switch(errno) {\n case ETIMEDOUT:\n return USB_RET_NAK;\n case EPIPE:\n default:\n return USB_RET_STALL;\n }\n }\n\n usb_defer_packet(p, async_cancel, aurb);\n return USB_RET_ASYNC;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-725","original_id":"diversevul-725","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_manager_create_window_for_monitor (GSManager *manager,\n GdkScreen *screen,\n int monitor)\n{\n GSWindow *window;\n GdkRectangle rect;\n\n gdk_screen_get_monitor_geometry (screen, monitor, &rect);\n\n gs_debug (\"Creating window for monitor %d [%d,%d] (%dx%d)\",\n monitor, rect.x, rect.y, rect.width, rect.height);\n\n window = gs_window_new (screen, monitor, manager->priv->lock_active);\n\n gs_window_set_user_switch_enabled (window, manager->priv->user_switch_enabled);\n gs_window_set_logout_enabled (window, manager->priv->logout_enabled);\n gs_window_set_logout_timeout (window, manager->priv->logout_timeout);\n gs_window_set_logout_command (window, manager->priv->logout_command);\n gs_window_set_keyboard_enabled (window, manager->priv->keyboard_enabled);\n gs_window_set_keyboard_command (window, manager->priv->keyboard_command);\n gs_window_set_status_message (window, manager->priv->status_message);\n\n connect_window_signals (manager, window);\n\n manager->priv->windows = g_slist_append (manager->priv->windows, window);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-726","original_id":"diversevul-726","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\non_screen_monitors_changed (GdkScreen *screen,\n GSManager *manager)\n{\n GSList *l;\n int n_monitors;\n int n_windows;\n int i;\n\n n_monitors = gdk_screen_get_n_monitors (screen);\n n_windows = g_slist_length (manager->priv->windows);\n\n gs_debug (\"Monitors changed for screen %d: num=%d\",\n gdk_screen_get_number (screen),\n n_monitors);\n\n if (n_monitors > n_windows) {\n /* add more windows */\n for (i = n_windows; i < n_monitors; i++) {\n gs_manager_create_window_for_monitor (manager, screen, i - 1);\n }\n } else {\n /* remove the extra windows */\n for (l = manager->priv->windows; l != NULL; l = l->next) {\n GdkScreen *this_screen;\n int this_monitor;\n\n this_screen = gs_window_get_screen (GS_WINDOW (l->data));\n this_monitor = gs_window_get_monitor (GS_WINDOW (l->data));\n if (this_screen == screen && this_monitor >= n_monitors) {\n manager_maybe_stop_job_for_window (manager, GS_WINDOW (l->data));\n gs_window_destroy (GS_WINDOW (l->data));\n manager->priv->windows = g_slist_delete_link (manager->priv->windows, l);\n }\n }\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-727","original_id":"diversevul-727","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_manager_finalize (GObject *object)\n{\n GSManager *manager;\n\n g_return_if_fail (object != NULL);\n g_return_if_fail (GS_IS_MANAGER (object));\n\n manager = GS_MANAGER (object);\n\n g_return_if_fail (manager->priv != NULL);\n\n if (manager->priv->bg_notify_id != 0) {\n gconf_client_remove_dir (manager->priv->client,\n GNOME_BG_KEY_DIR,\n NULL);\n gconf_client_notify_remove (manager->priv->client,\n manager->priv->bg_notify_id);\n manager->priv->bg_notify_id = 0;\n }\n if (manager->priv->bg != NULL) {\n g_object_unref (manager->priv->bg);\n }\n if (manager->priv->client != NULL) {\n g_object_unref (manager->priv->client);\n }\n\n free_themes (manager);\n g_free (manager->priv->logout_command);\n g_free (manager->priv->keyboard_command);\n g_free (manager->priv->away_message);\n\n remove_unfade_idle (manager);\n remove_timers (manager);\n\n gs_grab_release (manager->priv->grab);\n\n manager_stop_jobs (manager);\n\n gs_manager_destroy_windows (manager);\n\n manager->priv->active = FALSE;\n manager->priv->activate_time = 0;\n manager->priv->lock_enabled = FALSE;\n\n g_object_unref (manager->priv->fade);\n g_object_unref (manager->priv->grab);\n g_object_unref (manager->priv->theme_manager);\n\n G_OBJECT_CLASS (gs_manager_parent_class)->finalize (object);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-728","original_id":"diversevul-728","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\non_screen_monitors_changed (GdkScreen *screen,\n GSManager *manager)\n{\n gs_debug (\"Monitors changed for screen %d: num=%d\",\n gdk_screen_get_number (screen),\n gdk_screen_get_n_monitors (screen));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-729","original_id":"diversevul-729","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_manager_create_windows_for_screen (GSManager *manager,\n GdkScreen *screen)\n{\n GSWindow *window;\n int n_monitors;\n int i;\n\n g_return_if_fail (manager != NULL);\n g_return_if_fail (GS_IS_MANAGER (manager));\n g_return_if_fail (GDK_IS_SCREEN (screen));\n\n g_object_ref (manager);\n g_object_ref (screen);\n\n n_monitors = gdk_screen_get_n_monitors (screen);\n\n gs_debug (\"Creating %d windows for screen %d\", n_monitors, gdk_screen_get_number (screen));\n\n for (i = 0; i < n_monitors; i++) {\n window = gs_window_new (screen, i, manager->priv->lock_active);\n\n gs_window_set_user_switch_enabled (window, manager->priv->user_switch_enabled);\n gs_window_set_logout_enabled (window, manager->priv->logout_enabled);\n gs_window_set_logout_timeout (window, manager->priv->logout_timeout);\n gs_window_set_logout_command (window, manager->priv->logout_command);\n gs_window_set_keyboard_enabled (window, manager->priv->keyboard_enabled);\n gs_window_set_keyboard_command (window, manager->priv->keyboard_command);\n gs_window_set_away_message (window, manager->priv->away_message);\n\n connect_window_signals (manager, window);\n\n manager->priv->windows = g_slist_append (manager->priv->windows, window);\n }\n\n g_object_unref (screen);\n g_object_unref (manager);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-730","original_id":"diversevul-730","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_manager_destroy_windows (GSManager *manager)\n{\n GdkDisplay *display;\n GSList *l;\n int n_screens;\n int i;\n\n g_return_if_fail (manager != NULL);\n g_return_if_fail (GS_IS_MANAGER (manager));\n\n if (manager->priv->windows == NULL) {\n return;\n }\n\n display = gdk_display_get_default ();\n\n n_screens = gdk_display_get_n_screens (display);\n\n for (i = 0; i < n_screens; i++) {\n g_signal_handlers_disconnect_by_func (gdk_display_get_screen (display, i),\n on_screen_monitors_changed,\n manager);\n }\n\n for (l = manager->priv->windows; l; l = l->next) {\n gs_window_destroy (l->data);\n }\n g_slist_free (manager->priv->windows);\n manager->priv->windows = NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-731","original_id":"diversevul-731","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nauto_configure_outputs (GsdXrandrManager *manager, guint32 timestamp)\n{\n /* FMQ: implement */\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-732","original_id":"diversevul-732","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\non_screen_monitors_changed (GdkScreen *screen,\n GSManager *manager)\n{\n GSList *l;\n int n_monitors;\n int n_windows;\n int i;\n\n n_monitors = gdk_screen_get_n_monitors (screen);\n n_windows = g_slist_length (manager->priv->windows);\n\n gs_debug (\"Monitors changed for screen %d: num=%d\",\n gdk_screen_get_number (screen),\n n_monitors);\n\n if (n_monitors > n_windows) {\n /* add more windows */\n for (i = n_windows; i < n_monitors; i++) {\n gs_manager_create_window_for_monitor (manager, screen, i);\n }\n } else {\n /* remove the extra windows */\n l = manager->priv->windows;\n while (l != NULL) {\n GdkScreen *this_screen;\n int this_monitor;\n GSList *next = l->next;\n\n this_screen = gs_window_get_screen (GS_WINDOW (l->data));\n this_monitor = gs_window_get_monitor (GS_WINDOW (l->data));\n if (this_screen == screen && this_monitor >= n_monitors) {\n manager_maybe_stop_job_for_window (manager, GS_WINDOW (l->data));\n g_hash_table_remove (manager->priv->jobs, l->data);\n gs_window_destroy (GS_WINDOW (l->data));\n manager->priv->windows = g_slist_delete_link (manager->priv->windows, l);\n }\n l = next;\n }\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-733","original_id":"diversevul-733","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_window_destroy (GSWindow *window)\n{\n g_return_if_fail (GS_IS_WINDOW (window));\n\n gtk_widget_destroy (GTK_WIDGET (window));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-734","original_id":"diversevul-734","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic NTSTATUS smb_set_file_unix_link(connection_struct *conn,\n\t\t\t\t struct smb_request *req,\n\t\t\t\t const char *pdata,\n\t\t\t\t int total_data,\n\t\t\t\t const struct smb_filename *smb_fname)\n{\n\tchar *link_target = NULL;\n\tconst char *newname = smb_fname->base_name;\n\tNTSTATUS status = NT_STATUS_OK;\n\tTALLOC_CTX *ctx = talloc_tos();\n\n\t/* Set a symbolic link. */\n\t/* Don't allow this if follow links is false. */\n\n\tif (total_data == 0) {\n\t\treturn NT_STATUS_INVALID_PARAMETER;\n\t}\n\n\tif (!lp_symlinks(SNUM(conn))) {\n\t\treturn NT_STATUS_ACCESS_DENIED;\n\t}\n\n\tsrvstr_pull_talloc(ctx, pdata, req->flags2, &link_target, pdata,\n\t\t total_data, STR_TERMINATE);\n\n\tif (!link_target) {\n\t\treturn NT_STATUS_INVALID_PARAMETER;\n\t}\n\n\t/* !widelinks forces the target path to be within the share. */\n\t/* This means we can interpret the target as a pathname. */\n\tif (!lp_widelinks(SNUM(conn))) {\n\t\tchar *rel_name = NULL;\n\t\tchar *last_dirp = NULL;\n\n\t\tif (*link_target == '/') {\n\t\t\t/* No absolute paths allowed. */\n\t\t\treturn NT_STATUS_ACCESS_DENIED;\n\t\t}\n\t\trel_name = talloc_strdup(ctx,newname);\n\t\tif (!rel_name) {\n\t\t\treturn NT_STATUS_NO_MEMORY;\n\t\t}\n\t\tlast_dirp = strrchr_m(rel_name, '/');\n\t\tif (last_dirp) {\n\t\t\tlast_dirp[1] = '\\0';\n\t\t} else {\n\t\t\trel_name = talloc_strdup(ctx,\"./\");\n\t\t\tif (!rel_name) {\n\t\t\t\treturn NT_STATUS_NO_MEMORY;\n\t\t\t}\n\t\t}\n\t\trel_name = talloc_asprintf_append(rel_name,\n\t\t\t\t\"%s\",\n\t\t\t\tlink_target);\n\t\tif (!rel_name) {\n\t\t\treturn NT_STATUS_NO_MEMORY;\n\t\t}\n\n\t\tstatus = check_name(conn, rel_name);\n\t\tif (!NT_STATUS_IS_OK(status)) {\n\t\t\treturn status;\n\t\t}\n\t}\n\n\tDEBUG(10,(\"smb_set_file_unix_link: SMB_SET_FILE_UNIX_LINK doing symlink %s -> %s\\n\",\n\t\t\tnewname, link_target ));\n\n\tif (SMB_VFS_SYMLINK(conn,link_target,newname) != 0) {\n\t\treturn map_nt_error_from_unix(errno);\n\t}\n\n\treturn NT_STATUS_OK;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-22"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-735","original_id":"diversevul-735","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\non_screen_monitors_changed (GdkScreen *screen,\n GSManager *manager)\n{\n GSList *l;\n int n_monitors;\n int n_windows;\n int i;\n\n n_monitors = gdk_screen_get_n_monitors (screen);\n n_windows = g_slist_length (manager->priv->windows);\n\n gs_debug (\"Monitors changed for screen %d: num=%d\",\n gdk_screen_get_number (screen),\n n_monitors);\n\n if (n_monitors > n_windows) {\n /* add more windows */\n for (i = n_windows; i < n_monitors; i++) {\n gs_manager_create_window_for_monitor (manager, screen, i);\n }\n } else {\n\n gdk_x11_grab_server ();\n\n /* remove the extra windows */\n l = manager->priv->windows;\n while (l != NULL) {\n GdkScreen *this_screen;\n int this_monitor;\n GSList *next = l->next;\n\n this_screen = gs_window_get_screen (GS_WINDOW (l->data));\n this_monitor = gs_window_get_monitor (GS_WINDOW (l->data));\n if (this_screen == screen && this_monitor >= n_monitors) {\n manager_maybe_stop_job_for_window (manager, GS_WINDOW (l->data));\n g_hash_table_remove (manager->priv->jobs, l->data);\n gs_window_destroy (GS_WINDOW (l->data));\n manager->priv->windows = g_slist_delete_link (manager->priv->windows, l);\n }\n l = next;\n }\n\n /* make sure there is a lock dialog on a connected monitor,\n * and that the keyboard is still properly grabbed after all\n * the windows above got destroyed*/\n if (n_windows > n_monitors) {\n gs_manager_request_unlock (manager);\n }\n\n gdk_flush ();\n gdk_x11_ungrab_server ();\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-736","original_id":"diversevul-736","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_window_destroy (GSWindow *window)\n{\n g_return_if_fail (GS_IS_WINDOW (window));\n\n if (window->priv->lock_pid > 0) {\n gs_window_dialog_finish (window);\n }\n\n remove_popup_dialog_idle (window);\n remove_command_watches (window);\n remove_watchdog_timer (window);\n\n if (window->priv->lock_box != NULL) {\n gtk_container_remove (GTK_CONTAINER (window->priv->vbox), GTK_WIDGET (window->priv->lock_box));\n window->priv->lock_box = NULL;\n\n g_signal_emit (window, signals [DIALOG_DOWN], 0);\n }\n\n gtk_widget_destroy (GTK_WIDGET (window));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-737","original_id":"diversevul-737","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_window_cancel_unlock_request (GSWindow *window)\n{\n /* FIXME: This is a bit of a hammer approach...\n\t * Maybe we should send a delete-event to\n\t * the plug?\n\t */\n g_return_if_fail (GS_IS_WINDOW (window));\n\n if (window->priv->lock_socket == NULL) {\n return;\n }\n\n if (window->priv->lock_pid > 0) {\n kill (window->priv->lock_pid, SIGTERM);\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-738","original_id":"diversevul-738","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_grab_get_mouse (GSGrab *grab,\n GdkWindow *window,\n GdkScreen *screen,\n gboolean hide_cursor)\n{\n GdkGrabStatus status;\n GdkCursor *cursor;\n\n g_return_val_if_fail (window != NULL, FALSE);\n g_return_val_if_fail (screen != NULL, FALSE);\n\n cursor = get_cursor ();\n\n gs_debug (\"Grabbing mouse widget=%X\", (guint32) GDK_WINDOW_XID (window));\n status = gdk_pointer_grab (window, TRUE, 0, NULL,\n (hide_cursor ? cursor : NULL),\n GDK_CURRENT_TIME);\n\n if (status == GDK_GRAB_SUCCESS) {\n grab->priv->mouse_grab_window = window;\n grab->priv->mouse_grab_screen = screen;\n grab->priv->mouse_hide_cursor = hide_cursor;\n }\n\n gdk_cursor_unref (cursor);\n\n return status;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-739","original_id":"diversevul-739","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_grab_keyboard_reset (GSGrab *grab)\n{\n grab->priv->keyboard_grab_window = NULL;\n grab->priv->keyboard_grab_screen = NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-740","original_id":"diversevul-740","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_grab_get_keyboard (GSGrab *grab,\n GdkWindow *window,\n GdkScreen *screen)\n{\n GdkGrabStatus status;\n\n g_return_val_if_fail (window != NULL, FALSE);\n g_return_val_if_fail (screen != NULL, FALSE);\n\n gs_debug (\"Grabbing keyboard widget=%X\", (guint32) GDK_WINDOW_XID (window));\n status = gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME);\n\n if (status == GDK_GRAB_SUCCESS) {\n grab->priv->keyboard_grab_window = window;\n grab->priv->keyboard_grab_screen = screen;\n } else {\n gs_debug (\"Couldn't grab keyboard! (%s)\", grab_string (status));\n }\n\n return status;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-741","original_id":"diversevul-741","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ngs_grab_mouse_reset (GSGrab *grab)\n{\n grab->priv->mouse_grab_window = NULL;\n grab->priv->mouse_grab_screen = NULL;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-742","original_id":"diversevul-742","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nlistener_ref_entry_has_connection (gpointer key,\n gpointer value,\n gpointer user_data)\n{\n GSListenerRefEntry *entry;\n const char *connection;\n gboolean matches;\n\n entry = (GSListenerRefEntry *)value;\n connection = (const char *) user_data;\n\n matches = FALSE;\n if (connection != NULL && entry->connection != NULL) {\n matches = (strcmp (connection, entry->connection) == 0);\n if (matches) {\n gs_debug (\"removing %s from %s for reason '%s' on connection %s\",\n get_name_for_entry_type (entry->entry_type),\n entry->application,\n entry->reason,\n entry->connection);\n }\n }\n\n return matches;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-743","original_id":"diversevul-743","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nlistener_ref_entry_remove_for_connection (GSListener *listener,\n int entry_type,\n const char *connection)\n{\n gboolean removed;\n guint n_removed;\n GHashTable *hash;\n\n hash = get_hash_for_entry_type (listener, entry_type);\n\n removed = FALSE;\n n_removed = g_hash_table_foreach_remove (hash, listener_ref_entry_has_connection, (gpointer)connection);\n\n removed = (n_removed > 0);\n\n return removed;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-744","original_id":"diversevul-744","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\npopup_dialog_idle (GSWindow *window)\n{\n gboolean result;\n char *tmp;\n GString *command;\n\n gs_debug (\"Popping up dialog\");\n\n tmp = g_build_filename (LIBEXECDIR, \"gnome-screensaver-dialog\", NULL);\n command = g_string_new (tmp);\n g_free (tmp);\n\n if (is_logout_enabled (window)) {\n command = g_string_append (command, \" --enable-logout\");\n g_string_append_printf (command, \" --logout-command='%s'\", window->priv->logout_command);\n }\n\n if (window->priv->status_message) {\n char *quoted;\n\n quoted = g_shell_quote (window->priv->status_message);\n g_string_append_printf (command, \" --status-message=%s\", quoted);\n g_free (quoted);\n }\n\n if (is_user_switch_enabled (window)) {\n command = g_string_append (command, \" --enable-switch\");\n }\n\n if (gs_debug_enabled ()) {\n command = g_string_append (command, \" --verbose\");\n }\n\n gtk_widget_hide (window->priv->drawing_area);\n\n gs_window_clear_to_background_pixmap (window);\n\n set_invisible_cursor (GTK_WIDGET (window)->window, FALSE);\n\n result = spawn_on_window (window,\n command->str,\n &window->priv->lock_pid,\n (GIOFunc)lock_command_watch,\n window,\n &window->priv->lock_watch_id);\n if (! result) {\n gs_debug (\"Could not start command: %s\", command->str);\n }\n\n g_string_free (command, TRUE);\n\n window->priv->popup_dialog_idle_id = 0;\n\n return FALSE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-745","original_id":"diversevul-745","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nshake_dialog (GSWindow *window)\n{\n int i;\n guint left;\n guint right;\n\n for (i = 0; i < 9; i++) {\n if (i % 2 == 0) {\n left = 30;\n right = 0;\n } else {\n left = 0;\n right = 30;\n }\n\n if (! window->priv->lock_box) {\n break;\n }\n\n gtk_alignment_set_padding (GTK_ALIGNMENT (window->priv->lock_box),\n 0, 0,\n left,\n right);\n\n while (gtk_events_pending ()) {\n gtk_main_iteration ();\n }\n\n g_usleep (10000);\n }\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-746","original_id":"diversevul-746","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nauth_check_idle (GSLockPlug *plug)\n{\n gboolean res;\n gboolean again;\n static guint loop_counter = 0;\n\n again = TRUE;\n res = do_auth_check (plug);\n\n if (res) {\n again = FALSE;\n g_idle_add ((GSourceFunc)quit_response_ok, NULL);\n } else {\n loop_counter++;\n\n if (loop_counter < MAX_FAILURES) {\n gs_debug (\"Authentication failed, retrying (%u)\", loop_counter);\n g_timeout_add (3000, (GSourceFunc)reset_idle_cb, plug);\n } else {\n gs_debug (\"Authentication failed, quitting (max failures)\");\n again = FALSE;\n gtk_main_quit ();\n }\n }\n\n return again;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-747","original_id":"diversevul-747","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint gnutls_x509_crt_get_serial(gnutls_x509_crt_t cert, void *result,\n\t\t\t size_t * result_size)\n{\n int ret;\n\n if (cert == NULL) {\n\tgnutls_assert();\n\treturn GNUTLS_E_INVALID_REQUEST;\n }\n\n if ((ret =\n\t asn1_read_value(cert->cert, \"tbsCertificate.serialNumber\", result,\n\t\t\t result_size)) < 0) {\n\tgnutls_assert();\n\treturn _gnutls_asn2err(ret);\n }\n\n return 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-748","original_id":"diversevul-748","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstruct key *find_keyring_by_name(const char *name, bool skip_perm_check)\n{\n\tstruct key *keyring;\n\tint bucket;\n\n\tkeyring = ERR_PTR(-EINVAL);\n\tif (!name)\n\t\tgoto error;\n\n\tbucket = keyring_hash(name);\n\n\tread_lock(&keyring_name_lock);\n\n\tif (keyring_name_hash[bucket].next) {\n\t\t/* search this hash bucket for a keyring with a matching name\n\t\t * that's readable and that hasn't been revoked */\n\t\tlist_for_each_entry(keyring,\n\t\t\t\t &keyring_name_hash[bucket],\n\t\t\t\t type_data.link\n\t\t\t\t ) {\n\t\t\tif (keyring->user->user_ns != current_user_ns())\n\t\t\t\tcontinue;\n\n\t\t\tif (test_bit(KEY_FLAG_REVOKED, &keyring->flags))\n\t\t\t\tcontinue;\n\n\t\t\tif (strcmp(keyring->description, name) != 0)\n\t\t\t\tcontinue;\n\n\t\t\tif (!skip_perm_check &&\n\t\t\t key_permission(make_key_ref(keyring, 0),\n\t\t\t\t\t KEY_SEARCH) < 0)\n\t\t\t\tcontinue;\n\n\t\t\t/* we've got a match */\n\t\t\tatomic_inc(&keyring->usage);\n\t\t\tread_unlock(&keyring_name_lock);\n\t\t\tgoto error;\n\t\t}\n\t}\n\n\tread_unlock(&keyring_name_lock);\n\tkeyring = ERR_PTR(-ENOKEY);\n\n error:\n\treturn keyring;\n\n} /* end find_keyring_by_name() */\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-362"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-749","original_id":"diversevul-749","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_gnutls_x509_oid2mac_algorithm (const char *oid)\n{\n gnutls_mac_algorithm_t ret = 0;\n\n GNUTLS_HASH_LOOP (if (strcmp (oid, p->oid) == 0)\n\t\t {\n\t\t ret = p->id; break;}\n );\n\n if (ret == 0)\n return GNUTLS_MAC_UNKNOWN;\n return ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-310"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-750","original_id":"diversevul-750","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic noinline_for_stack int ethtool_get_rxnfc(struct net_device *dev,\n\t\t\t\t\t\tvoid __user *useraddr)\n{\n\tstruct ethtool_rxnfc info;\n\tconst struct ethtool_ops *ops = dev->ethtool_ops;\n\tint ret;\n\tvoid *rule_buf = NULL;\n\n\tif (!ops->get_rxnfc)\n\t\treturn -EOPNOTSUPP;\n\n\tif (copy_from_user(&info, useraddr, sizeof(info)))\n\t\treturn -EFAULT;\n\n\tif (info.cmd == ETHTOOL_GRXCLSRLALL) {\n\t\tif (info.rule_cnt > 0) {\n\t\t\trule_buf = kmalloc(info.rule_cnt * sizeof(u32),\n\t\t\t\t\t GFP_USER);\n\t\t\tif (!rule_buf)\n\t\t\t\treturn -ENOMEM;\n\t\t}\n\t}\n\n\tret = ops->get_rxnfc(dev, &info, rule_buf);\n\tif (ret < 0)\n\t\tgoto err_out;\n\n\tret = -EFAULT;\n\tif (copy_to_user(useraddr, &info, sizeof(info)))\n\t\tgoto err_out;\n\n\tif (rule_buf) {\n\t\tuseraddr += offsetof(struct ethtool_rxnfc, rule_locs);\n\t\tif (copy_to_user(useraddr, rule_buf,\n\t\t\t\t info.rule_cnt * sizeof(u32)))\n\t\t\tgoto err_out;\n\t}\n\tret = 0;\n\nerr_out:\n\tkfree(rule_buf);\n\n\treturn ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-190"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-751","original_id":"diversevul-751","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid Server::msgQueryUsers(ServerUser *uSource, MumbleProto::QueryUsers &msg) {\n\tMSG_SETUP(ServerUser::Authenticated);\n\n\tMumbleProto::QueryUsers reply;\n\n\tfor (int i=0;i<msg.ids_size();++i) {\n\t\tint id = msg.ids(i);\n\t\tif (id >= 0) {\n\t\t\tconst QString &name = getUserName(id);\n\t\t\tif (! name.isEmpty()) {\n\t\t\t\treply.add_ids(id);\n\t\t\t\treply.add_names(u8(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (int i=0;i<msg.names_size();++i) {\n\t\tQString name = u8(msg.names(i));\n\t\tint id = getUserID(name);\n\t\tif (id >= 0) {\n\t\t\tname = getUserName(id);\n\t\t\treply.add_ids(id);\n\t\t\treply.add_names(u8(name));\n\t\t}\n\t}\n\n\tsendMessage(uSource, reply);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-752","original_id":"diversevul-752","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint Server::getUserID(const QString &name) {\n\tif (qhUserIDCache.contains(name))\n\t\treturn qhUserIDCache.value(name);\n\tint id = -2;\n\temit nameToIdSig(id, name);\n\tif (id != -2) {\n\t\tqhUserIDCache.insert(name, id);\n\t\tqhUserNameCache.insert(id, name);\n\t\treturn id;\n\t}\n\tTransactionHolder th;\n\n\tQSqlQuery &query = *th.qsqQuery;\n\tSQLPREP(\"SELECT `user_id` FROM `%1users` WHERE `server_id` = ? AND `name` like ?\");\n\tquery.addBindValue(iServerNum);\n\tquery.addBindValue(name);\n\tSQLEXEC();\n\tif (query.next()) {\n\t\tid = query.value(0).toInt();\n\t\tqhUserIDCache.insert(name, id);\n\t\tqhUserNameCache.insert(id, name);\n\t}\n\treturn id;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-753","original_id":"diversevul-753","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n write_header( FT_Error error_code )\n {\n FT_Face face;\n const char* basename;\n const char* format;\n\n\n error = FTC_Manager_LookupFace( handle->cache_manager,\n handle->scaler.face_id, &face );\n if ( error )\n Fatal( \"can't access font file\" );\n\n if ( !status.header )\n {\n basename = ft_basename( handle->current_font->filepathname );\n\n switch ( error_code )\n {\n case FT_Err_Ok:\n sprintf( status.header_buffer, \"%s %s (file `%s')\",\n face->family_name, face->style_name, basename );\n break;\n\n case FT_Err_Invalid_Pixel_Size:\n sprintf( status.header_buffer, \"Invalid pixel size (file `%s')\",\n basename );\n break;\n\n case FT_Err_Invalid_PPem:\n sprintf( status.header_buffer, \"Invalid ppem value (file `%s')\",\n basename );\n break;\n\n default:\n sprintf( status.header_buffer, \"File `%s': error 0x%04x\",\n basename, (FT_UShort)error_code );\n break;\n }\n\n status.header = (const char *)status.header_buffer;\n }\n\n grWriteCellString( display->bitmap, 0, 0, status.header,\n display->fore_color );\n\n format = \"at %g points, first glyph index = %d\";\n\n snprintf( status.header_buffer, 256, format, status.ptsize/64., status.Num );\n\n if ( FT_HAS_GLYPH_NAMES( face ) )\n {\n char* p;\n int format_len, gindex, size;\n\n\n size = strlen( status.header_buffer );\n p = status.header_buffer + size;\n size = 256 - size;\n\n format = \", name = \";\n format_len = strlen( format );\n\n if ( size >= format_len + 2 )\n {\n gindex = status.Num;\n\n strcpy( p, format );\n if ( FT_Get_Glyph_Name( face, gindex, p + format_len, size - format_len ) )\n *p = '\\0';\n }\n }\n\n status.header = (const char *)status.header_buffer;\n grWriteCellString( display->bitmap, 0, HEADER_HEIGHT,\n status.header_buffer, display->fore_color );\n\n grRefreshSurface( display->surface );\n }\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-754","original_id":"diversevul-754","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n write_header( FT_Error error_code )\n {\n FT_Face face;\n const char* basename;\n\n\n error = FTC_Manager_LookupFace( handle->cache_manager,\n handle->scaler.face_id, &face );\n if ( error )\n PanicZ( \"can't access font file\" );\n\n if ( !status.header )\n {\n basename = ft_basename( handle->current_font->filepathname );\n\n switch ( error_code )\n {\n case FT_Err_Ok:\n sprintf( status.header_buffer, \"%s %s (file `%s')\", face->family_name,\n face->style_name, basename );\n break;\n case FT_Err_Invalid_Pixel_Size:\n sprintf( status.header_buffer, \"Invalid pixel size (file `%s')\",\n basename );\n break;\n case FT_Err_Invalid_PPem:\n sprintf( status.header_buffer, \"Invalid ppem value (file `%s')\",\n basename );\n break;\n default:\n sprintf( status.header_buffer, \"File `%s': error 0x%04x\", basename,\n (FT_UShort)error_code );\n break;\n }\n\n status.header = status.header_buffer;\n }\n\n grWriteCellString( display->bitmap, 0, 0,\n status.header, display->fore_color );\n\n sprintf( status.header_buffer, \"at %g points, angle = %d\",\n status.ptsize/64.0, status.angle );\n grWriteCellString( display->bitmap, 0, CELLSTRING_HEIGHT,\n status.header_buffer, display->fore_color );\n\n grRefreshSurface( display->surface );\n }\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-755","original_id":"diversevul-755","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n write_message( RenderState state )\n {\n ADisplay adisplay = (ADisplay)state->display.disp;\n\n\n if ( state->message == NULL )\n {\n FontFace face = &state->faces[state->face_index];\n int idx, total;\n\n\n idx = face->index;\n total = 1;\n while ( total + state->face_index < state->num_faces &&\n face[total].filepath == face[0].filepath )\n total++;\n\n total += idx;\n\n state->message = state->message0;\n if ( total > 1 )\n sprintf( state->message0, \"%s %d/%d @ %5.1fpt\",\n state->filename, idx + 1, total,\n state->char_size );\n else\n sprintf( state->message0, \"%s @ %5.1fpt\",\n state->filename,\n state->char_size );\n }\n\n grWriteCellString( adisplay->bitmap, 0, DIM_Y - 10, state->message,\n adisplay->fore_color );\n\n state->message = NULL;\n }\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-120"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-856","original_id":"diversevul-856","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nlong do_io_submit(aio_context_t ctx_id, long nr,\n\t\t struct iocb __user *__user *iocbpp, bool compat)\n{\n\tstruct kioctx *ctx;\n\tlong ret = 0;\n\tint i;\n\tstruct hlist_head batch_hash[AIO_BATCH_HASH_SIZE] = { { 0, }, };\n\n\tif (unlikely(nr < 0))\n\t\treturn -EINVAL;\n\n\tif (unlikely(!access_ok(VERIFY_READ, iocbpp, (nr*sizeof(*iocbpp)))))\n\t\treturn -EFAULT;\n\n\tctx = lookup_ioctx(ctx_id);\n\tif (unlikely(!ctx)) {\n\t\tpr_debug(\"EINVAL: io_submit: invalid context id\\n\");\n\t\treturn -EINVAL;\n\t}\n\n\t/*\n\t * AKPM: should this return a partial result if some of the IOs were\n\t * successfully submitted?\n\t */\n\tfor (i=0; i<nr; i++) {\n\t\tstruct iocb __user *user_iocb;\n\t\tstruct iocb tmp;\n\n\t\tif (unlikely(__get_user(user_iocb, iocbpp + i))) {\n\t\t\tret = -EFAULT;\n\t\t\tbreak;\n\t\t}\n\n\t\tif (unlikely(copy_from_user(&tmp, user_iocb, sizeof(tmp)))) {\n\t\t\tret = -EFAULT;\n\t\t\tbreak;\n\t\t}\n\n\t\tret = io_submit_one(ctx, user_iocb, &tmp, batch_hash, compat);\n\t\tif (ret)\n\t\t\tbreak;\n\t}\n\taio_batch_free(batch_hash);\n\n\tput_ioctx(ctx);\n\treturn i ? i : ret;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-190"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-857","original_id":"diversevul-857","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\ndelete_port(struct seq_oss_devinfo *dp)\n{\n\tif (dp->port < 0)\n\t\treturn 0;\n\n\tdebug_printk((\"delete_port %i\\n\", dp->port));\n\treturn snd_seq_event_port_detach(dp->cseq, dp->port);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-415"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-858","original_id":"diversevul-858","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nephy_embed_single_initialize (EphyEmbedSingle *single)\n{\n SoupSession *session;\n SoupCookieJar *jar;\n char *filename;\n char *cookie_policy;\n\n /* Initialise nspluginwrapper's plugins if available */\n if (g_file_test (NSPLUGINWRAPPER_SETUP, G_FILE_TEST_EXISTS) != FALSE)\n g_spawn_command_line_sync (NSPLUGINWRAPPER_SETUP, NULL, NULL, NULL, NULL);\n\n ephy_embed_prefs_init ();\n\n session = webkit_get_default_session ();\n\n /* Store cookies in moz-compatible SQLite format */\n filename = g_build_filename (ephy_dot_dir (), \"cookies.sqlite\", NULL);\n jar = soup_cookie_jar_sqlite_new (filename, FALSE);\n g_free (filename);\n cookie_policy = eel_gconf_get_string (CONF_SECURITY_COOKIES_ACCEPT);\n ephy_embed_prefs_set_cookie_jar_policy (jar, cookie_policy);\n g_free (cookie_policy);\n\n soup_session_add_feature (session, SOUP_SESSION_FEATURE (jar));\n g_object_unref (jar);\n\n /* Use GNOME proxy settings through libproxy */\n soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_GNOME);\n\n#ifdef SOUP_TYPE_PASSWORD_MANAGER\n /* Use GNOME keyring to store passwords. Only add the manager if we\n are not using a private session, otherwise we want any new\n password to expire when we exit *and* we don't want to use any\n existing password in the keyring */\n if (ephy_has_private_profile () == FALSE)\n soup_session_add_feature_by_type (session, SOUP_TYPE_PASSWORD_MANAGER_GNOME);\n#endif\n\n return TRUE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-859","original_id":"diversevul-859","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nephy_embed_single_initialize (EphyEmbedSingle *single)\n{\n SoupSession *session;\n SoupCookieJar *jar;\n char *filename;\n char *cookie_policy;\n\n /* Initialise nspluginwrapper's plugins if available */\n if (g_file_test (NSPLUGINWRAPPER_SETUP, G_FILE_TEST_EXISTS) != FALSE)\n g_spawn_command_line_sync (NSPLUGINWRAPPER_SETUP, NULL, NULL, NULL, NULL);\n\n ephy_embed_prefs_init ();\n\n session = webkit_get_default_session ();\n\n#ifdef GTLS_SYSTEM_CA_FILE\n /* Check SSL certificates */\n\n if (g_file_test (GTLS_SYSTEM_CA_FILE, G_FILE_TEST_EXISTS)) {\n g_object_set (session,\n SOUP_SESSION_SSL_CA_FILE, GTLS_SYSTEM_CA_FILE,\n \"ignore-ssl-cert-errors\", TRUE,\n NULL);\n } else {\n g_warning (_(\"CA Certificates file we should use was not found, \"\\\n \"all SSL sites will be considered to have a broken certificate.\"));\n }\n#endif\n\n /* Store cookies in moz-compatible SQLite format */\n filename = g_build_filename (ephy_dot_dir (), \"cookies.sqlite\", NULL);\n jar = soup_cookie_jar_sqlite_new (filename, FALSE);\n g_free (filename);\n cookie_policy = eel_gconf_get_string (CONF_SECURITY_COOKIES_ACCEPT);\n ephy_embed_prefs_set_cookie_jar_policy (jar, cookie_policy);\n g_free (cookie_policy);\n\n soup_session_add_feature (session, SOUP_SESSION_FEATURE (jar));\n g_object_unref (jar);\n\n /* Use GNOME proxy settings through libproxy */\n soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_GNOME);\n\n#ifdef SOUP_TYPE_PASSWORD_MANAGER\n /* Use GNOME keyring to store passwords. Only add the manager if we\n are not using a private session, otherwise we want any new\n password to expire when we exit *and* we don't want to use any\n existing password in the keyring */\n if (ephy_has_private_profile () == FALSE)\n soup_session_add_feature_by_type (session, SOUP_TYPE_PASSWORD_MANAGER_GNOME);\n#endif\n\n return TRUE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-860","original_id":"diversevul-860","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline void kvm_load_fs(u16 sel)\n{\n\tasm(\"mov %0, %%fs\" : : \"rm\"(sel));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-861","original_id":"diversevul-861","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline u16 kvm_read_gs(void)\n{\n\tu16 seg;\n\tasm(\"mov %%gs, %0\" : \"=g\"(seg));\n\treturn seg;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-862","original_id":"diversevul-862","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void __vmx_load_host_state(struct vcpu_vmx *vmx)\n{\n\tunsigned long flags;\n\n\tif (!vmx->host_state.loaded)\n\t\treturn;\n\n\t++vmx->vcpu.stat.host_state_reload;\n\tvmx->host_state.loaded = 0;\n\tif (vmx->host_state.fs_reload_needed)\n\t\tkvm_load_fs(vmx->host_state.fs_sel);\n\tif (vmx->host_state.gs_ldt_reload_needed) {\n\t\tkvm_load_ldt(vmx->host_state.ldt_sel);\n\t\t/*\n\t\t * If we have to reload gs, we must take care to\n\t\t * preserve our gs base.\n\t\t */\n\t\tlocal_irq_save(flags);\n\t\tkvm_load_gs(vmx->host_state.gs_sel);\n#ifdef CONFIG_X86_64\n\t\twrmsrl(MSR_GS_BASE, vmcs_readl(HOST_GS_BASE));\n#endif\n\t\tlocal_irq_restore(flags);\n\t}\n\treload_tss();\n#ifdef CONFIG_X86_64\n\tif (is_long_mode(&vmx->vcpu)) {\n\t\trdmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);\n\t\twrmsrl(MSR_KERNEL_GS_BASE, vmx->msr_host_kernel_gs_base);\n\t}\n#endif\n\tif (current_thread_info()->status & TS_USEDFPU)\n\t\tclts();\n\tload_gdt(&__get_cpu_var(host_gdt));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-863","original_id":"diversevul-863","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void vmx_save_host_state(struct kvm_vcpu *vcpu)\n{\n\tstruct vcpu_vmx *vmx = to_vmx(vcpu);\n\tint i;\n\n\tif (vmx->host_state.loaded)\n\t\treturn;\n\n\tvmx->host_state.loaded = 1;\n\t/*\n\t * Set host fs and gs selectors. Unfortunately, 22.2.3 does not\n\t * allow segment selectors with cpl > 0 or ti == 1.\n\t */\n\tvmx->host_state.ldt_sel = kvm_read_ldt();\n\tvmx->host_state.gs_ldt_reload_needed = vmx->host_state.ldt_sel;\n\tvmx->host_state.fs_sel = kvm_read_fs();\n\tif (!(vmx->host_state.fs_sel & 7)) {\n\t\tvmcs_write16(HOST_FS_SELECTOR, vmx->host_state.fs_sel);\n\t\tvmx->host_state.fs_reload_needed = 0;\n\t} else {\n\t\tvmcs_write16(HOST_FS_SELECTOR, 0);\n\t\tvmx->host_state.fs_reload_needed = 1;\n\t}\n\tvmx->host_state.gs_sel = kvm_read_gs();\n\tif (!(vmx->host_state.gs_sel & 7))\n\t\tvmcs_write16(HOST_GS_SELECTOR, vmx->host_state.gs_sel);\n\telse {\n\t\tvmcs_write16(HOST_GS_SELECTOR, 0);\n\t\tvmx->host_state.gs_ldt_reload_needed = 1;\n\t}\n\n#ifdef CONFIG_X86_64\n\tvmcs_writel(HOST_FS_BASE, read_msr(MSR_FS_BASE));\n\tvmcs_writel(HOST_GS_BASE, read_msr(MSR_GS_BASE));\n#else\n\tvmcs_writel(HOST_FS_BASE, segment_base(vmx->host_state.fs_sel));\n\tvmcs_writel(HOST_GS_BASE, segment_base(vmx->host_state.gs_sel));\n#endif\n\n#ifdef CONFIG_X86_64\n\tif (is_long_mode(&vmx->vcpu)) {\n\t\trdmsrl(MSR_KERNEL_GS_BASE, vmx->msr_host_kernel_gs_base);\n\t\twrmsrl(MSR_KERNEL_GS_BASE, vmx->msr_guest_kernel_gs_base);\n\t}\n#endif\n\tfor (i = 0; i < vmx->save_nmsrs; ++i)\n\t\tkvm_set_shared_msr(vmx->guest_msrs[i].index,\n\t\t\t\t vmx->guest_msrs[i].data,\n\t\t\t\t vmx->guest_msrs[i].mask);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-864","original_id":"diversevul-864","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline u16 kvm_read_fs(void)\n{\n\tu16 seg;\n\tasm(\"mov %%fs, %0\" : \"=g\"(seg));\n\treturn seg;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-865","original_id":"diversevul-865","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline void kvm_load_gs(u16 sel)\n{\n\tasm(\"mov %0, %%gs\" : : \"rm\"(sel));\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-866","original_id":"diversevul-866","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n */\nxmlNodePtr\nxmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {\n if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);\n if (cur != NULL && cur->children != NULL)\n return cur->children ;\n if (cur == NULL) cur = ctxt->context->node;\n if (cur == NULL) return(NULL) ; /* ERROR */\n if (cur->next != NULL) return(cur->next) ;\n do {\n cur = cur->parent;\n if (cur == NULL) break;\n if (cur == (xmlNodePtr) ctxt->context->doc) return(NULL);\n if (cur->next != NULL) return(cur->next);\n } while (cur != NULL);\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-867","original_id":"diversevul-867","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n */\nstatic xmlNodePtr\nxmlXPathNextPrecedingInternal(xmlXPathParserContextPtr ctxt,\n xmlNodePtr cur)\n{\n if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);\n if (cur == NULL) {\n cur = ctxt->context->node;\n if (cur == NULL)\n return (NULL);\n\tif (cur->type == XML_NAMESPACE_DECL)\n\t cur = (xmlNodePtr)((xmlNsPtr)cur)->next;\n ctxt->ancestor = cur->parent;\n }\n if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))\n\tcur = cur->prev;\n while (cur->prev == NULL) {\n cur = cur->parent;\n if (cur == NULL)\n return (NULL);\n if (cur == ctxt->context->doc->children)\n return (NULL);\n if (cur != ctxt->ancestor)\n return (cur);\n ctxt->ancestor = cur->parent;\n }\n cur = cur->prev;\n while (cur->last != NULL)\n cur = cur->last;\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-868","original_id":"diversevul-868","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n */\nxmlNodePtr\nxmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\n{\n if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);\n if (cur == NULL)\n cur = ctxt->context->node;\n if (cur == NULL)\n\treturn (NULL);\n if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))\n\tcur = cur->prev;\n do {\n if (cur->prev != NULL) {\n for (cur = cur->prev; cur->last != NULL; cur = cur->last) ;\n return (cur);\n }\n\n cur = cur->parent;\n if (cur == NULL)\n return (NULL);\n if (cur == ctxt->context->doc->children)\n return (NULL);\n } while (xmlXPathIsAncestor(cur, ctxt->context->node));\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-869","original_id":"diversevul-869","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n */\nxmlNodePtr\nxmlXPathNextPreceding(xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\n{\n if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);\n if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||\n\t(ctxt->context->node->type == XML_NAMESPACE_DECL))\n\treturn(NULL);\n if (cur == NULL)\n cur = ctxt->context->node;\n if (cur == NULL)\n\treturn (NULL);\n if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))\n\tcur = cur->prev;\n do {\n if (cur->prev != NULL) {\n for (cur = cur->prev; cur->last != NULL; cur = cur->last) ;\n return (cur);\n }\n\n cur = cur->parent;\n if (cur == NULL)\n return (NULL);\n if (cur == ctxt->context->doc->children)\n return (NULL);\n } while (xmlXPathIsAncestor(cur, ctxt->context->node));\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-870","original_id":"diversevul-870","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n */\nstatic xmlNodePtr\nxmlXPathNextPrecedingInternal(xmlXPathParserContextPtr ctxt,\n xmlNodePtr cur)\n{\n if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);\n if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||\n\t(ctxt->context->node->type == XML_NAMESPACE_DECL))\n\treturn(NULL);\n if (cur == NULL) {\n cur = ctxt->context->node;\n if (cur == NULL)\n return (NULL);\n ctxt->ancestor = cur->parent;\n }\n if ((cur->prev != NULL) && (cur->prev->type == XML_DTD_NODE))\n\tcur = cur->prev;\n while (cur->prev == NULL) {\n cur = cur->parent;\n if (cur == NULL)\n return (NULL);\n if (cur == ctxt->context->doc->children)\n return (NULL);\n if (cur != ctxt->ancestor)\n return (cur);\n ctxt->ancestor = cur->parent;\n }\n cur = cur->prev;\n while (cur->last != NULL)\n cur = cur->last;\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-871","original_id":"diversevul-871","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n */\nxmlNodePtr\nxmlXPathNextFollowing(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) {\n if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL);\n if ((ctxt->context->node->type == XML_ATTRIBUTE_NODE) ||\n\t(ctxt->context->node->type == XML_NAMESPACE_DECL))\n\treturn(NULL);\n if (cur != NULL) {\n if ((cur->type == XML_ATTRIBUTE_NODE) ||\n (cur->type == XML_NAMESPACE_DECL))\n return(NULL);\n if (cur->children != NULL)\n return cur->children ;\n }\n if (cur == NULL) cur = ctxt->context->node;\n if (cur == NULL) return(NULL) ; /* ERROR */\n if (cur->next != NULL) return(cur->next) ;\n do {\n cur = cur->parent;\n if (cur == NULL) break;\n if (cur == (xmlNodePtr) ctxt->context->doc) return(NULL);\n if (cur->next != NULL) return(cur->next);\n } while (cur != NULL);\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-119"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-872","original_id":"diversevul-872","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int packet_getname_spkt(struct socket *sock, struct sockaddr *uaddr,\n\t\t\t int *uaddr_len, int peer)\n{\n\tstruct net_device *dev;\n\tstruct sock *sk\t= sock->sk;\n\n\tif (peer)\n\t\treturn -EOPNOTSUPP;\n\n\tuaddr->sa_family = AF_PACKET;\n\trcu_read_lock();\n\tdev = dev_get_by_index_rcu(sock_net(sk), pkt_sk(sk)->ifindex);\n\tif (dev)\n\t\tstrlcpy(uaddr->sa_data, dev->name, 15);\n\telse\n\t\tmemset(uaddr->sa_data, 0, 14);\n\trcu_read_unlock();\n\t*uaddr_len = sizeof(*uaddr);\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-909"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-873","original_id":"diversevul-873","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int packet_getname(struct socket *sock, struct sockaddr *uaddr,\n\t\t\t int *uaddr_len, int peer)\n{\n\tstruct net_device *dev;\n\tstruct sock *sk = sock->sk;\n\tstruct packet_sock *po = pkt_sk(sk);\n\tDECLARE_SOCKADDR(struct sockaddr_ll *, sll, uaddr);\n\n\tif (peer)\n\t\treturn -EOPNOTSUPP;\n\n\tsll->sll_family = AF_PACKET;\n\tsll->sll_ifindex = po->ifindex;\n\tsll->sll_protocol = po->num;\n\trcu_read_lock();\n\tdev = dev_get_by_index_rcu(sock_net(sk), po->ifindex);\n\tif (dev) {\n\t\tsll->sll_hatype = dev->type;\n\t\tsll->sll_halen = dev->addr_len;\n\t\tmemcpy(sll->sll_addr, dev->dev_addr, dev->addr_len);\n\t} else {\n\t\tsll->sll_hatype = 0;\t/* Bad: we have no ARPHRD_UNSPEC */\n\t\tsll->sll_halen = 0;\n\t}\n\trcu_read_unlock();\n\t*uaddr_len = offsetof(struct sockaddr_ll, sll_addr) + sll->sll_halen;\n\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-909"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-874","original_id":"diversevul-874","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void kvm_vcpu_ioctl_x86_get_vcpu_events(struct kvm_vcpu *vcpu,\n\t\t\t\t\t struct kvm_vcpu_events *events)\n{\n\tevents->exception.injected =\n\t\tvcpu->arch.exception.pending &&\n\t\t!kvm_exception_is_soft(vcpu->arch.exception.nr);\n\tevents->exception.nr = vcpu->arch.exception.nr;\n\tevents->exception.has_error_code = vcpu->arch.exception.has_error_code;\n\tevents->exception.error_code = vcpu->arch.exception.error_code;\n\n\tevents->interrupt.injected =\n\t\tvcpu->arch.interrupt.pending && !vcpu->arch.interrupt.soft;\n\tevents->interrupt.nr = vcpu->arch.interrupt.nr;\n\tevents->interrupt.soft = 0;\n\tevents->interrupt.shadow =\n\t\tkvm_x86_ops->get_interrupt_shadow(vcpu,\n\t\t\tKVM_X86_SHADOW_INT_MOV_SS | KVM_X86_SHADOW_INT_STI);\n\n\tevents->nmi.injected = vcpu->arch.nmi_injected;\n\tevents->nmi.pending = vcpu->arch.nmi_pending;\n\tevents->nmi.masked = kvm_x86_ops->get_nmi_mask(vcpu);\n\n\tevents->sipi_vector = vcpu->arch.sipi_vector;\n\n\tevents->flags = (KVM_VCPUEVENT_VALID_NMI_PENDING\n\t\t\t | KVM_VCPUEVENT_VALID_SIPI_VECTOR\n\t\t\t | KVM_VCPUEVENT_VALID_SHADOW);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-875","original_id":"diversevul-875","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic int kvm_vm_ioctl_get_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)\n{\n\tint r = 0;\n\n\tmutex_lock(&kvm->arch.vpit->pit_state.lock);\n\tmemcpy(ps->channels, &kvm->arch.vpit->pit_state.channels,\n\t\tsizeof(ps->channels));\n\tps->flags = kvm->arch.vpit->pit_state.flags;\n\tmutex_unlock(&kvm->arch.vpit->pit_state.lock);\n\treturn r;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-876","original_id":"diversevul-876","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void kvm_vcpu_ioctl_x86_get_debugregs(struct kvm_vcpu *vcpu,\n\t\t\t\t\t struct kvm_debugregs *dbgregs)\n{\n\tmemcpy(dbgregs->db, vcpu->arch.db, sizeof(vcpu->arch.db));\n\tdbgregs->dr6 = vcpu->arch.dr6;\n\tdbgregs->dr7 = vcpu->arch.dr7;\n\tdbgregs->flags = 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-877","original_id":"diversevul-877","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,\n\t\t int proto)\n{\n\tstruct net *net = dev_net(skb->dev);\n\tstruct sock *sk;\n\tstruct udphdr *uh;\n\tstruct in6_addr *saddr, *daddr;\n\tu32 ulen = 0;\n\n\tif (!pskb_may_pull(skb, sizeof(struct udphdr)))\n\t\tgoto short_packet;\n\n\tsaddr = &ipv6_hdr(skb)->saddr;\n\tdaddr = &ipv6_hdr(skb)->daddr;\n\tuh = udp_hdr(skb);\n\n\tulen = ntohs(uh->len);\n\tif (ulen > skb->len)\n\t\tgoto short_packet;\n\n\tif (proto == IPPROTO_UDP) {\n\t\t/* UDP validates ulen. */\n\n\t\t/* Check for jumbo payload */\n\t\tif (ulen == 0)\n\t\t\tulen = skb->len;\n\n\t\tif (ulen < sizeof(*uh))\n\t\t\tgoto short_packet;\n\n\t\tif (ulen < skb->len) {\n\t\t\tif (pskb_trim_rcsum(skb, ulen))\n\t\t\t\tgoto short_packet;\n\t\t\tsaddr = &ipv6_hdr(skb)->saddr;\n\t\t\tdaddr = &ipv6_hdr(skb)->daddr;\n\t\t\tuh = udp_hdr(skb);\n\t\t}\n\t}\n\n\tif (udp6_csum_init(skb, uh, proto))\n\t\tgoto discard;\n\n\t/*\n\t *\tMulticast receive code\n\t */\n\tif (ipv6_addr_is_multicast(daddr))\n\t\treturn __udp6_lib_mcast_deliver(net, skb,\n\t\t\t\tsaddr, daddr, udptable);\n\n\t/* Unicast */\n\n\t/*\n\t * check socket cache ... must talk to Alan about his plans\n\t * for sock caches... i'll skip this for now.\n\t */\n\tsk = __udp6_lib_lookup_skb(skb, uh->source, uh->dest, udptable);\n\n\tif (sk == NULL) {\n\t\tif (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb))\n\t\t\tgoto discard;\n\n\t\tif (udp_lib_checksum_complete(skb))\n\t\t\tgoto discard;\n\t\tUDP6_INC_STATS_BH(net, UDP_MIB_NOPORTS,\n\t\t\t\tproto == IPPROTO_UDPLITE);\n\n\t\ticmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0);\n\n\t\tkfree_skb(skb);\n\t\treturn 0;\n\t}\n\n\t/* deliver */\n\n\tbh_lock_sock(sk);\n\tif (!sock_owned_by_user(sk))\n\t\tudpv6_queue_rcv_skb(sk, skb);\n\telse if (sk_add_backlog(sk, skb)) {\n\t\tatomic_inc(&sk->sk_drops);\n\t\tbh_unlock_sock(sk);\n\t\tsock_put(sk);\n\t\tgoto discard;\n\t}\n\tbh_unlock_sock(sk);\n\tsock_put(sk);\n\treturn 0;\n\nshort_packet:\n\tLIMIT_NETDEBUG(KERN_DEBUG \"UDP%sv6: short packet: %d/%u\\n\",\n\t\t proto == IPPROTO_UDPLITE ? \"-Lite\" : \"\",\n\t\t ulen, skb->len);\n\ndiscard:\n\tUDP6_INC_STATS_BH(net, UDP_MIB_INERRORS, proto == IPPROTO_UDPLITE);\n\tkfree_skb(skb);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-878","original_id":"diversevul-878","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic void flush_stack(struct sock **stack, unsigned int count,\n\t\t\tstruct sk_buff *skb, unsigned int final)\n{\n\tunsigned int i;\n\tstruct sock *sk;\n\tstruct sk_buff *skb1;\n\n\tfor (i = 0; i < count; i++) {\n\t\tskb1 = (i == final) ? skb : skb_clone(skb, GFP_ATOMIC);\n\n\t\tsk = stack[i];\n\t\tif (skb1) {\n\t\t\tbh_lock_sock(sk);\n\t\t\tif (!sock_owned_by_user(sk))\n\t\t\t\tudpv6_queue_rcv_skb(sk, skb1);\n\t\t\telse if (sk_add_backlog(sk, skb1)) {\n\t\t\t\tkfree_skb(skb1);\n\t\t\t\tbh_unlock_sock(sk);\n\t\t\t\tgoto drop;\n\t\t\t}\n\t\t\tbh_unlock_sock(sk);\n\t\t\tcontinue;\n\t\t}\ndrop:\n\t\tatomic_inc(&sk->sk_drops);\n\t\tUDP6_INC_STATS_BH(sock_net(sk),\n\t\t\t\tUDP_MIB_RCVBUFERRORS, IS_UDPLITE(sk));\n\t\tUDP6_INC_STATS_BH(sock_net(sk),\n\t\t\t\tUDP_MIB_INERRORS, IS_UDPLITE(sk));\n\t}\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-879","original_id":"diversevul-879","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)\n{\n\tint rc = NET_RX_SUCCESS;\n\n\tif (sk_filter(sk, skb))\n\t\tgoto discard_and_relse;\n\n\tskb->dev = NULL;\n\n\tif (nested)\n\t\tbh_lock_sock_nested(sk);\n\telse\n\t\tbh_lock_sock(sk);\n\tif (!sock_owned_by_user(sk)) {\n\t\t/*\n\t\t * trylock + unlock semantics:\n\t\t */\n\t\tmutex_acquire(&sk->sk_lock.dep_map, 0, 1, _RET_IP_);\n\n\t\trc = sk_backlog_rcv(sk, skb);\n\n\t\tmutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);\n\t} else if (sk_add_backlog(sk, skb)) {\n\t\tbh_unlock_sock(sk);\n\t\tatomic_inc(&sk->sk_drops);\n\t\tgoto discard_and_relse;\n\t}\n\n\tbh_unlock_sock(sk);\nout:\n\tsock_put(sk);\n\treturn rc;\ndiscard_and_relse:\n\tkfree_skb(skb);\n\tgoto out;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-880","original_id":"diversevul-880","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb)\n{\n\tif (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))\n\t\treturn -ENOBUFS;\n\n\t__sk_add_backlog(sk, skb);\n\tsk->sk_backlog.len += skb->truesize;\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-881","original_id":"diversevul-881","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nvoid sock_init_data(struct socket *sock, struct sock *sk)\n{\n\tskb_queue_head_init(&sk->sk_receive_queue);\n\tskb_queue_head_init(&sk->sk_write_queue);\n\tskb_queue_head_init(&sk->sk_error_queue);\n#ifdef CONFIG_NET_DMA\n\tskb_queue_head_init(&sk->sk_async_wait_queue);\n#endif\n\n\tsk->sk_send_head\t=\tNULL;\n\n\tinit_timer(&sk->sk_timer);\n\n\tsk->sk_allocation\t=\tGFP_KERNEL;\n\tsk->sk_rcvbuf\t\t=\tsysctl_rmem_default;\n\tsk->sk_sndbuf\t\t=\tsysctl_wmem_default;\n\tsk->sk_backlog.limit\t=\tsk->sk_rcvbuf << 1;\n\tsk->sk_state\t\t=\tTCP_CLOSE;\n\tsk_set_socket(sk, sock);\n\n\tsock_set_flag(sk, SOCK_ZAPPED);\n\n\tif (sock) {\n\t\tsk->sk_type\t=\tsock->type;\n\t\tsk->sk_sleep\t=\t&sock->wait;\n\t\tsock->sk\t=\tsk;\n\t} else\n\t\tsk->sk_sleep\t=\tNULL;\n\n\tspin_lock_init(&sk->sk_dst_lock);\n\trwlock_init(&sk->sk_callback_lock);\n\tlockdep_set_class_and_name(&sk->sk_callback_lock,\n\t\t\taf_callback_keys + sk->sk_family,\n\t\t\taf_family_clock_key_strings[sk->sk_family]);\n\n\tsk->sk_state_change\t=\tsock_def_wakeup;\n\tsk->sk_data_ready\t=\tsock_def_readable;\n\tsk->sk_write_space\t=\tsock_def_write_space;\n\tsk->sk_error_report\t=\tsock_def_error_report;\n\tsk->sk_destruct\t\t=\tsock_def_destruct;\n\n\tsk->sk_sndmsg_page\t=\tNULL;\n\tsk->sk_sndmsg_off\t=\t0;\n\n\tsk->sk_peercred.pid \t=\t0;\n\tsk->sk_peercred.uid\t=\t-1;\n\tsk->sk_peercred.gid\t=\t-1;\n\tsk->sk_write_pending\t=\t0;\n\tsk->sk_rcvlowat\t\t=\t1;\n\tsk->sk_rcvtimeo\t\t=\tMAX_SCHEDULE_TIMEOUT;\n\tsk->sk_sndtimeo\t\t=\tMAX_SCHEDULE_TIMEOUT;\n\n\tsk->sk_stamp = ktime_set(-1L, 0);\n\n\t/*\n\t * Before updating sk_refcnt, we must commit prior changes to memory\n\t * (Documentation/RCU/rculist_nulls.txt for details)\n\t */\n\tsmp_wmb();\n\tatomic_set(&sk->sk_refcnt, 1);\n\tatomic_set(&sk->sk_drops, 0);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-400"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-882","original_id":"diversevul-882","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nMonoReflectionMethod*\nmono_reflection_bind_generic_method_parameters (MonoReflectionMethod *rmethod, MonoArray *types)\n{\n\tMonoClass *klass;\n\tMonoMethod *method, *inflated;\n\tMonoMethodInflated *imethod;\n\tMonoGenericContext tmp_context;\n\tMonoGenericInst *ginst;\n\tMonoType **type_argv;\n\tint count, i;\n\n\tMONO_ARCH_SAVE_REGS;\n\n\tif (!strcmp (rmethod->object.vtable->klass->name, \"MethodBuilder\")) {\n#ifndef DISABLE_REFLECTION_EMIT\n\t\tMonoReflectionMethodBuilder *mb = NULL;\n\t\tMonoReflectionTypeBuilder *tb;\n\t\tMonoClass *klass;\n\n\t\tmb = (MonoReflectionMethodBuilder *) rmethod;\n\t\ttb = (MonoReflectionTypeBuilder *) mb->type;\n\t\tklass = mono_class_from_mono_type (mono_reflection_type_get_handle ((MonoReflectionType*)tb));\n\n\t\tmethod = methodbuilder_to_mono_method (klass, mb);\n#else\n\t\tg_assert_not_reached ();\n\t\tmethod = NULL;\n#endif\n\t} else {\n\t\tmethod = rmethod->method;\n\t}\n\n\tklass = method->klass;\n\n\tif (method->is_inflated)\n\t\tmethod = ((MonoMethodInflated *) method)->declaring;\n\n\tcount = mono_method_signature (method)->generic_param_count;\n\tif (count != mono_array_length (types))\n\t\treturn NULL;\n\n\ttype_argv = g_new0 (MonoType *, count);\n\tfor (i = 0; i < count; i++) {\n\t\tMonoReflectionType *garg = mono_array_get (types, gpointer, i);\n\t\ttype_argv [i] = mono_reflection_type_get_handle (garg);\n\t}\n\tginst = mono_metadata_get_generic_inst (count, type_argv);\n\tg_free (type_argv);\n\n\ttmp_context.class_inst = klass->generic_class ? klass->generic_class->context.class_inst : NULL;\n\ttmp_context.method_inst = ginst;\n\n\tinflated = mono_class_inflate_generic_method (method, &tmp_context);\n\timethod = (MonoMethodInflated *) inflated;\n\n\tif (method->klass->image->dynamic) {\n\t\tMonoDynamicImage *image = (MonoDynamicImage*)method->klass->image;\n\t\t/*\n\t\t * This table maps metadata structures representing inflated methods/fields\n\t\t * to the reflection objects representing their generic definitions.\n\t\t */\n\t\tmono_loader_lock ();\n\t\tmono_g_hash_table_insert (image->generic_def_objects, imethod, rmethod);\n\t\tmono_loader_unlock ();\n\t}\n\t\n\treturn mono_method_get_object (mono_object_domain (rmethod), inflated, NULL);\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-883","original_id":"diversevul-883","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nMonoReflectionMethod*\nmono_reflection_bind_generic_method_parameters (MonoReflectionMethod *rmethod, MonoArray *types)\n{\n\tMonoClass *klass;\n\tMonoMethod *method, *inflated;\n\tMonoMethodInflated *imethod;\n\tMonoGenericContext tmp_context;\n\tMonoGenericInst *ginst;\n\tMonoType **type_argv;\n\tint count, i;\n\n\tMONO_ARCH_SAVE_REGS;\n\n\t/*FIXME but this no longer should happen*/\n\tif (!strcmp (rmethod->object.vtable->klass->name, \"MethodBuilder\")) {\n#ifndef DISABLE_REFLECTION_EMIT\n\t\tMonoReflectionMethodBuilder *mb = NULL;\n\t\tMonoReflectionTypeBuilder *tb;\n\t\tMonoClass *klass;\n\n\t\tmb = (MonoReflectionMethodBuilder *) rmethod;\n\t\ttb = (MonoReflectionTypeBuilder *) mb->type;\n\t\tklass = mono_class_from_mono_type (mono_reflection_type_get_handle ((MonoReflectionType*)tb));\n\n\t\tmethod = methodbuilder_to_mono_method (klass, mb);\n#else\n\t\tg_assert_not_reached ();\n\t\tmethod = NULL;\n#endif\n\t} else {\n\t\tmethod = rmethod->method;\n\t}\n\n\tklass = method->klass;\n\n\tif (method->is_inflated)\n\t\tmethod = ((MonoMethodInflated *) method)->declaring;\n\n\tcount = mono_method_signature (method)->generic_param_count;\n\tif (count != mono_array_length (types))\n\t\treturn NULL;\n\n\ttype_argv = g_new0 (MonoType *, count);\n\tfor (i = 0; i < count; i++) {\n\t\tMonoReflectionType *garg = mono_array_get (types, gpointer, i);\n\t\ttype_argv [i] = mono_reflection_type_get_handle (garg);\n\t}\n\tginst = mono_metadata_get_generic_inst (count, type_argv);\n\tg_free (type_argv);\n\n\ttmp_context.class_inst = klass->generic_class ? klass->generic_class->context.class_inst : NULL;\n\ttmp_context.method_inst = ginst;\n\n\tinflated = mono_class_inflate_generic_method (method, &tmp_context);\n\timethod = (MonoMethodInflated *) inflated;\n\n\t/*FIXME but I think this is no longer necessary*/\n\tif (method->klass->image->dynamic) {\n\t\tMonoDynamicImage *image = (MonoDynamicImage*)method->klass->image;\n\t\t/*\n\t\t * This table maps metadata structures representing inflated methods/fields\n\t\t * to the reflection objects representing their generic definitions.\n\t\t */\n\t\tmono_loader_lock ();\n\t\tmono_g_hash_table_insert (image->generic_def_objects, imethod, rmethod);\n\t\tmono_loader_unlock ();\n\t}\n\t\n\treturn mono_method_get_object (mono_object_domain (rmethod), inflated, NULL);\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-884","original_id":"diversevul-884","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nint\tspecial(DviContext *dvi, int opcode)\n{\n\tchar\t*s;\n\tInt32\targ;\n\t\n\targ = dugetn(dvi, opcode - DVI_XXX1 + 1);\n\ts = mdvi_malloc(arg + 1);\n\tdread(dvi, s, arg);\n\ts[arg] = 0;\n\tmdvi_do_special(dvi, s);\n\tSHOWCMD((dvi, \"XXXX\", opcode - DVI_XXX1 + 1,\n\t\t\"[%s]\", s));\n\tmdvi_free(s);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-885","original_id":"diversevul-885","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstatic char *token(FILE *stream)\n{\n int ch, idx;\n\n /* skip over white space */\n while ((ch = fgetc(stream)) == ' ' || ch == lineterm || \n ch == ',' || ch == '\\t' || ch == ';');\n \n idx = 0;\n while (ch != EOF && ch != ' ' && ch != lineterm \n && ch != '\\t' && ch != ':' && ch != ';') \n {\n ident[idx++] = ch;\n ch = fgetc(stream);\n } /* while */\n\n if (ch == EOF && idx < 1) return ((char *)NULL);\n if (idx >= 1 && ch != ':' ) ungetc(ch, stream);\n if (idx < 1 ) ident[idx++] = ch;\t/* single-character token */\n ident[idx] = 0;\n \n return(ident);\t/* returns pointer to the token */\n\n} /* token */\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-20"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-886","original_id":"diversevul-886","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nstrip_leading_slashes (char *name, int strip_leading)\n{\n int s = strip_leading;\n char *p, *n;\n\n for (p = n = name; *p; p++)\n {\n if (ISSLASH (*p))\n\t{\n\t while (ISSLASH (p[1]))\n\t p++;\n\t if (strip_leading < 0 || --s >= 0)\n\t n = p+1;\n\t}\n }\n if ((strip_leading < 0 || s <= 0) && *n)\n {\n memmove (name, n, strlen (n) + 1);\n return true;\n }\n else\n return false;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-22"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-887","original_id":"diversevul-887","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nxfs_ioc_fsgeometry_v1(\n\txfs_mount_t\t\t*mp,\n\tvoid\t\t\t__user *arg)\n{\n\txfs_fsop_geom_v1_t\tfsgeo;\n\tint\t\t\terror;\n\n\terror = xfs_fs_geometry(mp, (xfs_fsop_geom_t *)&fsgeo, 3);\n\tif (error)\n\t\treturn -error;\n\n\tif (copy_to_user(arg, &fsgeo, sizeof(fsgeo)))\n\t\treturn -XFS_ERROR(EFAULT);\n\treturn 0;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":["CWE-200"],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-888","original_id":"diversevul-888","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_hb_buffer_add_output_glyph_ids( HB_Buffer buffer,\n\t\t\t HB_UShort num_in,\n\t\t\t HB_UShort num_out,\n\t\t\t const GlyphID *glyph_data,\n\t\t\t HB_UShort component,\n\t\t\t HB_UShort ligID )\n{\n HB_Error error;\n HB_UShort i;\n HB_UInt properties;\n HB_UInt cluster;\n\n error = hb_buffer_ensure( buffer, buffer->out_pos + num_out );\n if ( error )\n return error;\n\n if ( !buffer->separate_out )\n {\n error = hb_buffer_duplicate_out_buffer( buffer );\n if ( error )\n\treturn error;\n }\n\n properties = buffer->in_string[buffer->in_pos].properties;\n cluster = buffer->in_string[buffer->in_pos].cluster;\n if ( component == 0xFFFF )\n component = buffer->in_string[buffer->in_pos].component;\n if ( ligID == 0xFFFF )\n ligID = buffer->in_string[buffer->in_pos].ligID;\n\n for ( i = 0; i < num_out; i++ )\n {\n HB_GlyphItem item = &buffer->out_string[buffer->out_pos + i];\n\n item->gindex = glyph_data[i];\n item->properties = properties;\n item->cluster = cluster;\n item->component = component;\n item->ligID = ligID;\n item->gproperty = HB_GLYPH_PROPERTY_UNKNOWN;\n }\n\n buffer->in_pos += num_in;\n buffer->out_pos += num_out;\n\n buffer->out_length = buffer->out_pos;\n\n return HB_Err_Ok;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-889","original_id":"diversevul-889","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nhb_buffer_ensure( HB_Buffer buffer,\n\t\t HB_UInt size )\n{\n HB_UInt new_allocated = buffer->allocated;\n\n if (size > new_allocated)\n {\n HB_Error error;\n\n while (size > new_allocated)\n\tnew_allocated += (new_allocated >> 1) + 8;\n\n if ( buffer->positions )\n {\n\t if ( REALLOC_ARRAY( buffer->positions, new_allocated, HB_PositionRec ) )\n\t return error;\n\t}\n\n if ( REALLOC_ARRAY( buffer->in_string, new_allocated, HB_GlyphItemRec ) )\n\treturn error;\n\n if ( buffer->separate_out )\n {\n\t if ( REALLOC_ARRAY( buffer->alt_string, new_allocated, HB_GlyphItemRec ) )\n\t return error;\n\n\t buffer->out_string = buffer->alt_string;\n\t}\n else\n {\n\t buffer->out_string = buffer->in_string;\n\n\t if ( buffer->alt_string )\n\t {\n\t if ( REALLOC_ARRAY( buffer->alt_string, new_allocated, HB_GlyphItemRec ) )\n\t\treturn error;\n\t }\n\t}\n\n buffer->allocated = new_allocated;\n }\n\n return HB_Err_Ok;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-890","original_id":"diversevul-890","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nset_unicode_charmap (FT_Face face)\n{\n int charmap;\n\n for (charmap = 0; charmap < face->num_charmaps; charmap++)\n if (face->charmaps[charmap]->encoding == ft_encoding_unicode)\n {\n\tHB_Error error = FT_Set_Charmap(face, face->charmaps[charmap]);\n\treturn error == HB_Err_Ok;\n }\n\n return FALSE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-891","original_id":"diversevul-891","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nrelease_buffer (HB_Buffer buffer, gboolean free_buffer)\n{\n if (G_LIKELY (!free_buffer))\n {\n hb_buffer_clear (buffer);\n G_UNLOCK (cached_buffer);\n }\n else\n hb_buffer_free (buffer);\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-892","original_id":"diversevul-892","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nacquire_buffer (gboolean *free_buffer)\n{\n HB_Buffer buffer;\n\n if (G_LIKELY (G_TRYLOCK (cached_buffer)))\n {\n if (G_UNLIKELY (!cached_buffer))\n\thb_buffer_new (&cached_buffer);\n\n buffer = cached_buffer;\n *free_buffer = FALSE;\n }\n else\n {\n hb_buffer_new (&buffer);\n *free_buffer = TRUE;\n }\n\n return buffer;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-893","original_id":"diversevul-893","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_hb_buffer_next_glyph ( HB_Buffer buffer )\n{\n HB_Error error;\n\n if ( buffer->separate_out )\n {\n error = hb_buffer_ensure( buffer, buffer->out_pos + 1 );\n if ( error )\n\treturn error;\n\n buffer->out_string[buffer->out_pos] = buffer->in_string[buffer->in_pos];\n }\n\n buffer->in_pos++;\n buffer->out_pos++;\n buffer->out_length = buffer->out_pos;\n\n return HB_Err_Ok;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-894","original_id":"diversevul-894","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_hb_buffer_clear_output( HB_Buffer buffer )\n{\n buffer->out_length = 0;\n buffer->out_pos = 0;\n buffer->out_string = buffer->in_string;\n buffer->separate_out = FALSE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-895","original_id":"diversevul-895","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_hb_buffer_add_output_glyph( HB_Buffer buffer,\n\t\t\t HB_UInt glyph_index,\n\t\t\t HB_UShort component,\n\t\t\t HB_UShort ligID )\n{\n HB_UShort glyph_data = glyph_index;\n\n return _hb_buffer_add_output_glyphs ( buffer, 1, 1,\n\t\t\t\t\t&glyph_data, component, ligID );\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-896","original_id":"diversevul-896","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_hb_buffer_add_output_glyphs( HB_Buffer buffer,\n\t\t\t HB_UShort num_in,\n\t\t\t HB_UShort num_out,\n\t\t\t HB_UShort *glyph_data,\n\t\t\t HB_UShort component,\n\t\t\t HB_UShort ligID )\n{\n HB_Error error;\n HB_UShort i;\n HB_UInt properties;\n HB_UInt cluster;\n\n error = hb_buffer_ensure( buffer, buffer->out_pos + num_out );\n if ( error )\n return error;\n\n if ( !buffer->separate_out )\n {\n error = hb_buffer_duplicate_out_buffer( buffer );\n if ( error )\n\treturn error;\n }\n\n properties = buffer->in_string[buffer->in_pos].properties;\n cluster = buffer->in_string[buffer->in_pos].cluster;\n if ( component == 0xFFFF )\n component = buffer->in_string[buffer->in_pos].component;\n if ( ligID == 0xFFFF )\n ligID = buffer->in_string[buffer->in_pos].ligID;\n\n for ( i = 0; i < num_out; i++ )\n {\n HB_GlyphItem item = &buffer->out_string[buffer->out_pos + i];\n\n item->gindex = glyph_data[i];\n item->properties = properties;\n item->cluster = cluster;\n item->component = component;\n item->ligID = ligID;\n item->gproperty = HB_GLYPH_PROPERTY_UNKNOWN;\n }\n\n buffer->in_pos += num_in;\n buffer->out_pos += num_out;\n\n buffer->out_length = buffer->out_pos;\n\n return HB_Err_Ok;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-897","original_id":"diversevul-897","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nhb_buffer_new( HB_Buffer *pbuffer )\n{\n HB_Buffer buffer;\n HB_Error error;\n \n if ( ALLOC( buffer, sizeof( HB_BufferRec ) ) )\n return error;\n\n buffer->allocated = 0;\n buffer->in_string = NULL;\n buffer->alt_string = NULL;\n buffer->positions = NULL;\n\n hb_buffer_clear( buffer );\n\n *pbuffer = buffer;\n\n return HB_Err_Ok;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-898","original_id":"diversevul-898","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\n_pango_ot_info_position (const PangoOTInfo *info,\n\t\t\t const PangoOTRuleset *ruleset,\n\t\t\t PangoOTBuffer *buffer)\n{\n unsigned int i;\n\n _hb_buffer_clear_positions (buffer->buffer);\n\n hb_ot_layout_set_direction (info->layout,\n\t\t\t buffer->rtl);\n hb_ot_layout_set_hinting (info->layout,\n\t\t\t buffer->font->is_hinted);\n hb_ot_layout_set_scale (info->layout,\n\t\t\t info->face->size->metrics.x_scale,\n\t\t\t info->face->size->metrics.y_scale);\n hb_ot_layout_set_ppem (info->layout,\n\t\t\t info->face->size->metrics.x_ppem,\n\t\t\t info->face->size->metrics.y_ppem);\n\n for (i = 0; i < ruleset->rules->len; i++)\n {\n PangoOTRule *rule = &g_array_index (ruleset->rules, PangoOTRule, i);\n hb_ot_layout_feature_mask_t mask;\n unsigned int lookup_count, j;\n\n if (rule->table_type != PANGO_OT_TABLE_GPOS)\n\tcontinue;\n\n mask = rule->property_bit;\n lookup_count = hb_ot_layout_feature_get_lookup_count (info->layout,\n\t\t\t\t\t\t\t HB_OT_LAYOUT_TABLE_TYPE_GPOS,\n\t\t\t\t\t\t\t rule->feature_index);\n\n for (j = 0; j < lookup_count; j++)\n {\n\t unsigned int lookup_index;\n\n\t lookup_index = hb_ot_layout_feature_get_lookup_index (info->layout,\n\t\t\t\t\t\t\t\tHB_OT_LAYOUT_TABLE_TYPE_GPOS,\n\t\t\t\t\t\t\t\trule->feature_index,\n\t\t\t\t\t\t\t\tj);\n\t hb_ot_layout_position_lookup (info->layout,\n\t\t\t\t\tbuffer->buffer,\n\t\t\t\t\tlookup_index,\n\t\t\t\t\trule->property_bit);\n\t}\n\n }\n\n {\n HB_UInt i, j;\n HB_Position positions = buffer->buffer->positions;\n\n /* First handle all left-to-right connections */\n for (j = 0; j < buffer->buffer->in_length; j++)\n {\n\tif (positions[j].cursive_chain > 0)\n\t positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos;\n }\n\n /* Then handle all right-to-left connections */\n for (i = buffer->buffer->in_length; i > 0; i--)\n {\n\tj = i - 1;\n\n\tif (positions[j].cursive_chain < 0)\n\t positions[j].y_pos += positions[j - positions[j].cursive_chain].y_pos;\n }\n }\n\n buffer->applied_gpos = TRUE;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"diversevul-899","original_id":"diversevul-899","prompt":"Is the following C/C++ function vulnerable to a security issue (memory safety, injection, auth bypass, etc.)? Answer Yes or No.\n\n```c\nhb_buffer_add_glyph( HB_Buffer buffer,\n\t\t HB_UInt glyph_index,\n\t\t HB_UInt properties,\n\t\t HB_UInt cluster )\n{\n HB_Error error;\n HB_GlyphItem glyph;\n \n error = hb_buffer_ensure( buffer, buffer->in_length + 1 );\n if ( error )\n return error;\n\n glyph = &buffer->in_string[buffer->in_length];\n glyph->gindex = glyph_index;\n glyph->properties = properties;\n glyph->cluster = cluster;\n glyph->component = 0;\n glyph->ligID = 0;\n glyph->gproperty = HB_GLYPH_PROPERTY_UNKNOWN;\n \n buffer->in_length++;\n\n return HB_Err_Ok;\n}\n```","source":"diversevul","source_file":"external/diversevul.jsonl","skill_fit":["red-team"],"family":"Security/adversarial","type":"nearMiss","target":false,"answer":"Yes","mode":"correctness","license":"MIT/research","cwe":[],"decision_instruction":"Analyze the problem. Answer Yes or No. Return ONLY valid JSON: {\"answer\": true/false}"}
+{"id":"glm-distractor-8","original_id":"glm-distractor-8","prompt":"How can I convert all the lowercase letters in a string to uppercase using Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-11","original_id":"glm-distractor-11","prompt":"**This Kata is intended as a small challenge for my students** All Star Code Challenge #18 Create a function called that accepts 2 string arguments and returns an integer of the count of occurrences the 2nd argument is found in the first one. If no occurrences can be found, a count of 0 should be returned. Notes: * The first argument can be an empty string * The second string argument will always be of length 1 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-12","original_id":"glm-distractor-12","prompt":"Implement quick sort to sort the given array of integers. Write corresponding code in Python. [9, 5, 8, 1, 3, 6, 7]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-13","original_id":"glm-distractor-13","prompt":"Zoe wants to go on the field trip to Washington DC with her middle school this spring and the cost is $485. Her grandma gave her $250 toward her fees and she must earn the rest by selling candy bars. She makes $1.25 for every candy bar she sells. How many candy bars does Zoe need to sell to earn the money for the trip?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-16","original_id":"glm-distractor-16","prompt":"Can you also tell me the date and time of the Indiana Comic Convention?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-17","original_id":"glm-distractor-17","prompt":"Create an algorithm to rotate an array by one element. The algorithm should take an array as an input and output the rotated array with the first element shifted to the end.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-18","original_id":"glm-distractor-18","prompt":"Generate a correct Python program for plotting bar chart for the following data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-19","original_id":"glm-distractor-19","prompt":"Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely. * Inversion: change the state of each bit to the opposite state * Logical left shift: shift left by 1 * Logical right shift: shift right by 1 Constraints * $0 \\leq x \\leq 2^{32} - 1$ Input The input is given in the following format. $x$ Output Print the given bits, results of inversion, left shift and right shift in a line respectively. Examples Input 8 Output 00000000000000000000000000001000 11111111111111111111111111110111 00000000000000000000000000010000 00000000000000000000000000000100 Input 13 Output 00000000000000000000000000001101 11111111111111111111111111110010 00000000000000000000000000011010 00000000000000000000000000000110 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-21","original_id":"glm-distractor-21","prompt":"Create a Python program that fetches the user's current time and sets a reminder after 30 minutes.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-22","original_id":"glm-distractor-22","prompt":"Could you delineate a methodology, utilising the Python programming language, to extract the middle value, labeled as the median, from an unorganized collection of integral numbers? Numbers = [12, 7, 21, 3, 9]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-23","original_id":"glm-distractor-23","prompt":"Create a Python 3 class for a directory list widget using Qt that includes a grid layout with a directory list view and buttons to add or remove directories. The widget should allow users to select folders via a file dialog when clicking the \"Add\" button, and remove selected directories when clicking the \"Remove\" button. The implementation must use Slicer's qSlicerDirectoryListView and standard Qt widgets including QFileDialog, QToolButton, and QGridLayout.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-42","original_id":"glm-distractor-42","prompt":"Write a Python3 function that returns the Cargo home directory path by first checking the CARGO_HOME environment variable. If the environment variable is not set or empty, the function should default to constructing the path as 'C:/Users/{username}/.cargo' using the current user's username. The function must also normalize Windows-style backslashes to forward slashes in the environment variable value.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-46","original_id":"glm-distractor-46","prompt":"Create a Python 3 script that uses the clustergrammer library to load a matrix from stdin, perform optional filtering and normalization steps (such as sum-based filtering, z-score normalization, top-N selection, and threshold filtering), generate a hierarchical clustering visualization using cosine distance, and then output the resulting network data in JSON format for frontend visualization. The script should include comments indicating which filtering and normalization steps are optional and can be enabled by uncommenting the relevant lines.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-48","original_id":"glm-distractor-48","prompt":"Solve the inequality: 8x - 9 < 2. Express the solution in interval notation.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-50","original_id":"glm-distractor-50","prompt":"A toy store manager received a large order of Mr. Slinkums just in time for the holidays. The manager places $20\\%$ of them on the shelves, leaving the other 120 Mr. Slinkums in storage. How many Mr. Slinkums were in this order?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-51","original_id":"glm-distractor-51","prompt":"Write a python function to check if a given file is in NOAA ACE format by verifying that the first line starts with ':' and the third line contains 'NOAA'. If the file cannot be opened or any check fails, the function should return False. Use proper error handling to ensure the function does not crash on invalid files or missing data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-69","original_id":"glm-distractor-69","prompt":"Write a program that allows users to search for phone numbers by name in a phone book. Implement the phone book using a custom data structure that you create. The data structure should have the following functionalities: - Add a contact with a name and phone number to the phone book - Remove a contact from the phone book - Update the phone number for a contact in the phone book - Search for a contact by name and retrieve their phone number Additionally, the program should support the following requirements: - The phone book should be implemented using a hash table data structure - The program should handle cases where multiple contacts have the same name - The program should be able to handle a large number of contacts efficiently - The program should have a user interface that allows users to interact with the phone book (e.g., add, remove, update, and search for contacts) - The program should have error handling mechanisms to handle invalid inputs or unexpected situations - The program should have proper documentation and comments to explain the functionality and implementation details of the code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-74","original_id":"glm-distractor-74","prompt":"Produce a program using Python that visualizes the given function.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-81","original_id":"glm-distractor-81","prompt":"How can I generate a regular expression that matches any two or more consecutive numbers?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-83","original_id":"glm-distractor-83","prompt":"Write a python 3 script that performs simple linear regression analysis on gas expenditure data using scikit-learn. The script should load data from \"data1.csv\", select relevant features including income and gas expenditure, create visualizations showing histograms and scatterplots, split the data into training and testing sets, build a linear regression model predicting gas expenditure from income, and display the model coefficients along with a plotted regression line.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-84","original_id":"glm-distractor-84","prompt":"Write a python 3 Django management command that classifies unassigned faces using ensemble predictions from two SVM models (small and big) with probability averaging, and prints classification results for the first 1000 unassigned faces, including predicted labels, probabilities, and corresponding person objects from the database.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-196","original_id":"glm-distractor-196","prompt":"Create a python 3 script that demonstrates two different plotting APIs using PyQt4: a procedural approach with PlotWidget and an object-oriented approach with a custom Plot class. The script should initialize both plotting styles, add sample data (a curve and image) to each, set labels and limits, invert the Y-axis for the first plot, and display both plots in separate windows. Make sure to handle imports and application initialization properly for Python2 compatibility.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-199","original_id":"glm-distractor-199","prompt":"Write a Python 3 function that tests whether the neohub class can be properly instantiated, ensuring the class initialization works correctly without any errors. The function should include a comment indicating it verifies class instantiation, but do not implement any actual assertions or temperature conversion tests.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-200","original_id":"glm-distractor-200","prompt":"Please answer the following question: - Gather the ingredients for the cake - Mix the flour, sugar, egg, and water to make batter - Pour the mixture into a cake pan - Place the cake in the oven to cook - Take the cake out when it is cooked through - Let the cake cool What might be the last step of the process? A:","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-201","original_id":"glm-distractor-201","prompt":"Can you provide a Python code snippet to convert XML to JSON?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-203","original_id":"glm-distractor-203","prompt":"Write a Python3 script that downloads and unpacks tracking results from Google Drive for various trackers like PyTracking-based and external trackers. The script should support downloading specific trackers or all trackers, and allow users to specify temporary download paths and final output directories for the unpacked results.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-214","original_id":"glm-distractor-214","prompt":"Create a python 3 program using the turtle module that draws a series of nested squares rotating at different angles. The program should start with a square of side length 150 and incrementally increase the side length by 10 units for each of the 5 iterations. Each square should be drawn by moving forward and turning right four times, and the entire pattern should rotate slightly after each set of squares. Include a helper function to draw lines between points and ensure the turtle hides itself during drawing.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-216","original_id":"glm-distractor-216","prompt":"How can I generate a set of random numbers without any duplicates in Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-224","original_id":"glm-distractor-224","prompt":"Create a Python script that sets the value of a variable from the command-line, but the value must be encrypted using a custom encryption algorithm before being assigned to the variable. Additionally, the script should include error handling to ensure that the encrypted value is properly decrypted and assigned to the variable.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-225","original_id":"glm-distractor-225","prompt":"A satellite orbits Earth at an altitude of 1501 km. Calculate its orbital velocity and period. (Earth mass = 5.97 × 10²⁴ kg, Earth radius = 6371 km)","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-227","original_id":"glm-distractor-227","prompt":"Compute the quotient of 17708 and 9880. Show your work.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-236","original_id":"glm-distractor-236","prompt":"def division_while_loop(dividend, divisor): \"\"\" This exercise focuses on division using a while loop. Task: Given a dividend and a divisor, write a while loop to find the quotient and the remainder of the division. Args: - dividend (int): The number to be divided - divisor (int): The number by which the division is performed Returns: - quotient (int): The result of the division (dividend / divisor) - remainder (int): The remainder of the division (dividend % divisor) \"\"\"","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-241","original_id":"glm-distractor-241","prompt":"Create a python 3 class called `BalanceSheet` that takes a `Portfolio` object (with default to a new `Portfolio()` instance) and provides methods to generate structured data representations. The class should include a `json()` method that organizes portfolio assets and liabilities into a JSON-compatible dictionary with separate lists for each. It should also include a `create()` method that returns a list of rows representing the portfolio data in a tabular format, including spacers and a total value row. Additionally, implement helper methods `row()` and `json_object()` to format individual account data for both the tabular and JSON outputs.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-249","original_id":"glm-distractor-249","prompt":"Write a python function to find the frequency of each character in a given string and return a dictionary with characters as keys and their frequencies as values. Solve the problem starting with the provided function header. Function header: ``` def get_char_frequency(string): ``` Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-261","original_id":"glm-distractor-261","prompt":"Create a function to check if an array contains any duplicate elements, while also ensuring that the array elements are sorted in ascending order and that the length of the array is less than or equal to 100. Additionally, the function should check if the array contains any negative integers, and if so, it should return False. The function should return a boolean value indicating the presence of duplicate elements. Example: Input: [1, 2, 3, 3, 4, 5, 5] Output: True","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-262","original_id":"glm-distractor-262","prompt":"You are working on an API for a space-themed game and need to create a class that handles the case when a specific planet for a character is not found. You need to define a class called GetCharactersCharacterIdPlanetsPlanetIdNotFound with the following attributes and methods: Attributes: - error: a string to store the error message Methods: - __init__: a constructor method to initialize the error attribute - to_dict: a method to return the model properties as a dictionary - to_str: a method to return the string representation of the model - __repr__: a method for printing and pretty-printing the object - __eq__: a method to check if two objects are equal - __ne__: a method to check if two objects are not equal You need to implement the class and its methods as described above.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-264","original_id":"glm-distractor-264","prompt":"How can I categorize data into two bins, with the labels \"category A\" and \"category B\"?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-267","original_id":"glm-distractor-267","prompt":"Given points A(14, -8) and B(-1, -13), find the slope of the line passing through these two points.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-268","original_id":"glm-distractor-268","prompt":"Create a python 3 class named Objects that initializes with several instance attributes including cloud set to None, score set to 0, score_type set to 'CNNSeg', type set to None, and type_probs set to None.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-269","original_id":"glm-distractor-269","prompt":"What is the code to construct a Recurrent Neural Network (RNN) using TensorFlow with an input size of 50 values and an output size of 10 values?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-270","original_id":"glm-distractor-270","prompt":"Create a python 3 class called CompileGLSL that extends Module for compiling GLSL shader files into SPIR-V format using the glslangValidator tool. The class should define required tools, specify output file names with .spv extension, and implement a process method that runs the validator with appropriate stage flags (-S vert for vertex shaders and -S frag for fragment shaders) while handling directory creation and returning the subprocess return code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-271","original_id":"glm-distractor-271","prompt":"Evaluate the definite integral of f(x) = sin(1x) from 1 to 4.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-274","original_id":"glm-distractor-274","prompt":"Calculate the pH of a 0.545 M solution of HCl. Show your calculation step by step.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-275","original_id":"glm-distractor-275","prompt":"Write a Python 3 program that prompts the user to enter three integer numbers and then calculates and displays their sum. The program should use input() to read the numbers from the user and print the result in the format \"Sum = [value]\".","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Security/adversarial","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
diff --git a/evals/datasets/calibrated/security-adversarial.manifest.json b/evals/datasets/calibrated/security-adversarial.manifest.json
new file mode 100644
index 0000000..48cc91c
--- /dev/null
+++ b/evals/datasets/calibrated/security-adversarial.manifest.json
@@ -0,0 +1,52 @@
+{
+ "family": "Security/adversarial",
+ "family_key": "security-adversarial",
+ "skills": [
+ "red-team"
+ ],
+ "value_surface": "false-positive reduction",
+ "source": "Combined from 3 source files. external: diversevul-balanced, diversevul, glm-distractor",
+ "leakage": "DiverseVul data is derived from public CVE records and NVD entries through 2023. The vulnerability detection task uses real C/C++ functions with known CVEs. Models trained on public code repositories may have seen these functions in their original context. Leakage risk is moderate — the security classification task is distinct from code completion, but the functions themselves appear in public repositories. The balanced subset (diversevul-balanced) was constructed to have equal positive/negative examples. No overlap with SWE-bench or selfaware datasets. GLM distractor items are from a 2025 reasoning dataset.\n\nSource breakdown: 2 external dataset(s) with potential training-data leakage; ",
+ "label": {
+ "definition": "Vulnerability detection: whether the model correctly classifies a C/C++ function as vulnerable (true) or safe (false).",
+ "values": {
+ "true": "Vulnerable (answer=Yes)",
+ "false": "Safe (answer=No)"
+ },
+ "eval_mode": "ground_truth",
+ "ground_truth_field": "answer"
+ },
+ "calibration": {
+ "baseline": null,
+ "baseline_estimated": true,
+ "baseline_note": "No labeled items available for difficulty estimation. Behavioral items require judge-based calibration.",
+ "band": [
+ 0.4,
+ 0.7
+ ],
+ "status": "pending_calibration",
+ "instructions": "Run EVAL_RUN=calib node evals/run-calibration.js evals/datasets/calibrated/<family>-candidate-pool.jsonl to populate real calibration stats."
+ },
+ "item_counts": {
+ "total": 644,
+ "target": 200,
+ "near_miss": 400,
+ "distractor": 44,
+ "ambiguous": 0,
+ "decisive": 644
+ },
+ "item_class_definitions": {
+ "target": "Items that directly measure the family value surface — in-domain, skill-relevant items where the skill is expected to help.",
+ "near_miss": "Items that are similar to the family domain but not an exact match. Useful for calibration but may not benefit from the skill.",
+ "distractor": "Items that are clearly off-target (target=false). Used to measure false-positive rate and specificity.",
+ "ambiguous": "Items whose relevance to the family is unclear. Excluded from decisive splits."
+ },
+ "decisive_split_rules": {
+ "min_target": 1,
+ "min_distractor": 1,
+ "max_ambiguous": 0,
+ "satisfied": true
+ },
+ "created": "2026-06-06",
+ "frozen": false
+}
\ No newline at end of file
diff --git a/evals/datasets/calibrated/systems-product-strategy-pairwise-candidate-pool.jsonl b/evals/datasets/calibrated/systems-product-strategy-pairwise-candidate-pool.jsonl
new file mode 100644
index 0000000..3703912
--- /dev/null
+++ b/evals/datasets/calibrated/systems-product-strategy-pairwise-candidate-pool.jsonl
@@ -0,0 +1,104 @@
+{"id":"toc-01","original_id":"toc-01","prompt":"A REST API request pipeline has four stages: Auth (2ms), Business Logic (8ms), Database Query (320ms), Response Serialization (5ms). The team wants to optimize the Business Logic stage by rewriting it in a more efficient language. Would this meaningfully improve end-to-end latency?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-02","original_id":"toc-02","prompt":"A data ingestion pipeline processes records through five stages: Read from S3 (0.5s/batch), Deserialize (0.2s), Validate (0.1s), Write to Kafka (4.8s), Acknowledge (0.05s). The team proposes parallelizing the Validate stage across 8 cores. Would this meaningfully improve end-to-end throughput?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-03","original_id":"toc-03","prompt":"A CI/CD pipeline runs these steps sequentially: Checkout (10s), Install Dependencies (25s), Unit Tests (4m 30s), Build Artifact (45s), Deploy (20s). The team wants to cache the Install Dependencies step to cut it to 5s. Would this meaningfully reduce total pipeline duration?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-04","original_id":"toc-04","prompt":"An image processing pipeline has these stages: Upload to S3 (0.3s), Queue Message (0.1s), ML Inference on GPU (12s), Resize Thumbnails (0.8s), Save Results (0.4s). The team proposes optimizing the Resize Thumbnails stage with a faster library. Would this improve end-to-end latency per image?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-05","original_id":"toc-05","prompt":"A software release pipeline has: Dev Complete (2 days avg), Code Review (5 days avg, queue builds to 9 days), QA Testing (1 day), Staging Deploy (0.5 days), Production Deploy (0.5 days). The team proposes adding more QA engineers to cut QA time in half. Would this meaningfully increase release throughput?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-06","original_id":"toc-06","prompt":"A payment processing pipeline executes: Fraud Score Request to external API (3.1s avg), Charge Card (0.4s), Update DB (0.1s), Send Receipt Email (0.2s). The team wants to optimize the database update with a bulk-write pattern. Would this materially reduce total transaction latency?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-07","original_id":"toc-07","prompt":"A report generation service runs: Fetch user permissions (30ms), Execute analytics SQL query (4,200ms), Format results to JSON (60ms), Render PDF (110ms). The team proposes adding a Redis cache for user permissions to reduce that step to 2ms. Would this meaningfully improve the total report generation time?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-08","original_id":"toc-08","prompt":"A batch ETL job runs nightly with these timings: Extract from source DB (8 min), Transform records (42 min), Load into warehouse (6 min), Run post-load validations (4 min). The team wants to speed up the Extract step by adding read replicas. Would this cut overall job duration?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-09","original_id":"toc-09","prompt":"A web scraping pipeline processes URLs through: DNS resolution (15ms), TCP connect (20ms), TLS handshake (25ms), HTTP fetch (1,800ms avg), HTML parse (35ms), Write to DB (18ms). The team wants to run the HTML parse step on a faster machine. Would this noticeably reduce per-URL latency?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-10","original_id":"toc-10","prompt":"A video transcoding pipeline has these per-clip stages: Download Source (5s), Audio Decode (2s), Video Transcode (95s), Mux Streams (3s), Upload Output (8s). The team proposes switching to a faster audio codec to cut Audio Decode to 0.5s. Would this improve throughput or end-to-end time per clip?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-11","original_id":"toc-11","prompt":"A microservice handles requests through: Load Balancer (1ms), Auth Token Validation (3ms), Third-Party KYC API Call (2,600ms), Business Logic (15ms), DB Write (12ms). The team proposes parallelizing the KYC API call across multiple providers and using cached results, cutting its average to 120ms. Would this improve response time for users?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-12","original_id":"toc-12","prompt":"A checkout pipeline executes: Cart Validation (40ms), Inventory Lock (35ms), Payment Charge (850ms), Order Record Insert (28ms), Confirmation Email Enqueue (10ms). The team proposes switching to a payment provider with a p99 latency of 90ms, cutting the Payment Charge step from 850ms to 90ms. Would this substantially reduce checkout latency?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-13","original_id":"toc-13","prompt":"A code analysis pipeline runs on each PR: Clone Repo (8s), Install Linters (12s), Static Analysis (180s), Dependency Audit (14s), Post GitHub Comment (3s). The team proposes rewriting the static analysis rules incrementally and running only changed-file analysis, cutting Static Analysis from 180s to under 20s. Would this meaningfully improve the pipeline's overall runtime?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-14","original_id":"toc-14","prompt":"An order fulfillment pipeline has these stages per order: Order Received (0.1s), Fraud Check via external API (3.9s), Pick and Pack (0.5s), Shipping Label Generation (0.3s), Carrier Handoff (0.2s). The team proposes replacing the external fraud API with an in-house ML model that runs in 80ms. Would this improve end-to-end order fulfillment latency?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-15","original_id":"toc-15","prompt":"A search API pipeline processes queries through: Query Parse (2ms), Cache Lookup (4ms), Elasticsearch Query (1,100ms), Result Ranking (25ms), Response Serialize (8ms). The team proposes migrating to a purpose-built vector search engine that reduces query time from 1,100ms to 60ms for the Elasticsearch Query stage. Would this appreciably reduce the latency experienced by users?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-16","original_id":"toc-16","prompt":"A REST API handles requests with these sequential steps: Request Parsing (3ms), Auth (5ms), DB Query (290ms), Response Formatting (4ms). The team proposes adding a read replica and query index to cut the DB Query stage to under 20ms. Would this dramatically improve the API's response times?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-17","original_id":"toc-17","prompt":"A CI/CD pipeline runs: Checkout (12s), Install Dependencies (18s), Unit Tests (8 min 45s), Integration Tests (2 min), Build (40s), Deploy (25s). The team proposes parallelizing the Unit Tests across 10 workers, which would cut the step to under 1 minute. Would this meaningfully shorten total pipeline run time?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-18","original_id":"toc-18","prompt":"A batch ML scoring pipeline processes records through: Read Batch from DB (1.2s), Preprocess Features (0.8s), Model Inference (38s per batch), Write Predictions (1.5s), Archive Input (0.4s). The team proposes running Model Inference on GPUs instead of CPUs, reducing it to 2s. Would this improve pipeline throughput?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-19","original_id":"toc-19","prompt":"A software delivery process has these average stage durations: Requirements (1 day), Development (3 days), Code Review (11 days — queue backlog is 7 days), QA (1.5 days), Release (0.5 days). The team proposes assigning two more engineers specifically to code review. Would this increase feature release throughput?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-20","original_id":"toc-20","prompt":"An event streaming pipeline has throughput rates: Kafka Consumer (50,000 msg/s), Deserialize (45,000 msg/s), Enrich via External API (1,800 msg/s), Aggregate (40,000 msg/s), Write to Postgres (38,000 msg/s). The team proposes adding connection pooling and batching to the External API calls to raise its throughput to 20,000 msg/s. Would this improve overall pipeline throughput?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-21","original_id":"toc-21","prompt":"A document processing pipeline runs: OCR Scan (2s), Text Extraction (1.8s), NLP Entity Recognition (24s), Index to Search (1.2s), Notify User (0.3s). The team proposes replacing the NLP model with a faster distilled version that achieves the same accuracy in 3s. Would this meaningfully reduce per-document processing time?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-22","original_id":"toc-22","prompt":"A video upload pipeline processes each file: Client Upload to CDN (varies), Virus Scan (8s), Video Transcode (5m 20s), Thumbnail Generation (12s), Metadata Index (2s). The team proposes running Thumbnail Generation in parallel with Transcode. Would this reduce the total time a user waits for their video to be available?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-23","original_id":"toc-23","prompt":"A SaaS onboarding pipeline has per-customer steps: Sales Handoff (0.5 days), Legal Contract Review (9 days — average wait 6 days), Technical Integration (2 days), Training (1 day), Go-Live (0.5 days). The team proposes adding a dedicated legal reviewer to reduce contract review to 1 day. Would this reduce total time-to-live for new customers?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-edge throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-24","original_id":"toc-24","prompt":"A real-time analytics query pipeline runs: Parse SQL (5ms), Check Permissions (8ms), Execute OLAP Query (4,500ms), Format Response (12ms), Compress Payload (18ms). The team proposes switching to a columnar engine that reduces OLAP Query time to 200ms. Would this substantially reduce user-perceived query latency?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-25","original_id":"toc-25","prompt":"A fraud detection pipeline evaluates each transaction: Rule Engine (10ms), ML Feature Extraction (22ms), External Credit Bureau Lookup (2,100ms), Score Aggregation (8ms), Decision Write (6ms). The team proposes caching Credit Bureau results by SSN with a 24-hour TTL, cutting average lookup time to 15ms for repeat customers. Would this materially reduce fraud check latency?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":true,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-26","original_id":"toc-26","prompt":"A nightly data warehouse refresh has stages: Extract from Postgres (14 min), Transform (62 min), Load to Snowflake (10 min), Run dbt Models (8 min). The team proposes upgrading the Snowflake warehouse tier to cut Load time to 3 min. Would this meaningfully shorten total refresh duration?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-27","original_id":"toc-27","prompt":"A background job pipeline processes user export requests: Enqueue Job (0.1s), Fetch User Data from DB (5,800ms), Serialize to CSV (200ms), Compress File (180ms), Upload to S3 (400ms), Email User Link (100ms). The team wants to optimize the Compress File step with a faster algorithm. Would this significantly reduce the time users wait for their export?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-28","original_id":"toc-28","prompt":"A hardware test pipeline runs: Flash Firmware (45s), Boot Device (12s), Run Calibration Suite (8 min 30s), Log Results (5s), Package for Shipping (30s). The team proposes upgrading the USB flasher to cut firmware flash time to 10s. Would this improve overall throughput of units through the test line?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-29","original_id":"toc-29","prompt":"A Kubernetes pod startup sequence involves: Image Pull (3s), Init Containers (8s), Application Boot (94s — slow Spring Boot cold start), Readiness Probe (5s), Traffic Admission (1s). The team proposes pre-warming the image pull by caching it on every node. Would this reduce the time from deployment trigger to traffic serving?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"toc-30","original_id":"toc-30","prompt":"A machine learning training pipeline runs per epoch: Data Loading (8s), Augmentation (5s), Forward Pass (310s), Backward Pass (290s), Checkpoint Save (12s). The team proposes optimizing the Data Loading step with async prefetching to reduce it to 1s. Would this reduce total training time per epoch?","source":"theory-of-constraints-bottleneck","source_file":"authored/theory-of-constraints-bottleneck.jsonl","skill_fit":["theory-of-constraints"],"family":"Systems/product/strategy pairwise","type":"target","target":true,"label":false,"decision_instruction":"You are given a multi-stage pipeline with per-stage timings/capacities and a proposed optimization. Answer YES if optimizing the proposed stage would meaningfully improve end-to-end throughput/latency (it is the binding constraint). Answer NO if it would NOT help meaningfully (the proposed stage is not the bottleneck — some other stage dominates).","mode":"binary-decision"}
+{"id":"margin-safety-01","original_id":"margin-safety-01","prompt":"A team expects peak API traffic of 800 req/s during an upcoming product launch. Historical launches show spikes of 3–5x the predicted peak, and a failure would mean lost revenue plus SLA breach penalties. The team provisions 2,000 req/s of capacity — 2.5x the expected peak.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-02","original_id":"margin-safety-02","prompt":"A data warehouse team expects to ingest 500GB of data per month. Storage is charged at $0.023/GB and data loss is not a concern because source data can be re-ingested at any time. They provision 550GB — a 10% buffer. Scaling additional storage takes less than 30 seconds via an API call.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-03","original_id":"margin-safety-03","prompt":"A payments company processes an average of 1,200 transactions per second on normal days. Black Friday historically generates 4–6x normal volume, and a payment processing outage means direct revenue loss of roughly $50,000 per minute. The team provisions capacity for 1,800 transactions per second for the holiday period.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-04","original_id":"margin-safety-04","prompt":"A team is setting an HTTP client timeout for calls to a third-party shipping API. The shipping API's documented p99 latency is 400ms, and their SLA guarantees responses within 800ms. Calls that time out result in a failed order checkout with user-visible errors. The team sets a 1,000ms timeout.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-05","original_id":"margin-safety-05","prompt":"A startup's engineering team estimates a new feature will take 4 weeks to build. This is the team's first time working with the third-party payments SDK, and the feature is on the critical path for a contractually committed customer demo. They commit to a 5-week delivery date — 25% buffer.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-06","original_id":"margin-safety-06","prompt":"A Postgres connection pool is configured with a maximum of 100 connections. Under normal load the service uses 45 connections. During monthly billing runs a secondary process uses up to 30 additional connections simultaneously. An unexpected secondary batch job will exhaust the pool only if both peaks coincide, which has never happened. The cost of pool exhaustion is a cascade of 500 errors to all users.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-07","original_id":"margin-safety-07","prompt":"A video transcoding service processes an average of 200 jobs per hour. Job volume has been growing 15% month-over-month for six months with no sign of slowing. Each job consumes roughly the same compute. The team provisions for 600 jobs per hour — 3x current average — and plans to review in three months. Delays cause content to miss publishing windows, resulting in lost ad revenue.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-08","original_id":"margin-safety-08","prompt":"A team is planning storage for a new audit log system. Legal requires all audit logs to be retained for 7 years, and any gap is a compliance violation. The team's data model estimates 80GB per year based on current transaction volume. They provision 100GB of storage — enough for about 15 months — with a plan to add capacity before it fills.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-09","original_id":"margin-safety-09","prompt":"A ride-sharing company allocates a monthly infrastructure budget of $120,000. Actual spend has been stable at $95,000–$100,000 per month for the past six months with no new services planned. The allocated budget of $120,000 represents a 20–26% buffer over observed spend.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-10","original_id":"margin-safety-10","prompt":"A hospital patient-record API is expected to serve 500 concurrent users during the busy morning shift. Load tests show the system becomes degraded at 520 concurrent users. Patient care workflows depend on the system; downtime means nurses fall back to paper, which introduces medication error risk. The team deploys hardware supporting 550 concurrent users.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-11","original_id":"margin-safety-11","prompt":"A Kafka consumer group processes 50,000 messages per hour at steady state. The upstream producer can burst to 200,000 messages per hour during end-of-day batch closes, lasting about 45 minutes. Consumer lag during burst causes downstream reports to be delayed, impacting trading desks. The team sizes consumers for 250,000 messages per hour sustained throughput.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-12","original_id":"margin-safety-12","prompt":"A team is deploying a new machine learning inference service. Benchmark tests show the model needs 6GB of GPU VRAM at maximum batch size. The team selects a GPU instance with exactly 8GB VRAM. They note that framework overhead, CUDA context, and driver memory are not accounted for in the benchmark figure.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-13","original_id":"margin-safety-13","prompt":"A software team is migrating a monolith to microservices. The project manager estimates 6 months based on a rough breakdown of work. The migration touches every team in the company, requires coordination with three external vendors, and has no prior comparable project as reference. The team commits to a 12-month timeline with a formal review at month 6.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-14","original_id":"margin-safety-14","prompt":"An IoT platform expects 10,000 devices to connect simultaneously after a firmware update pushes to all deployed units. Historical firmware pushes show actual simultaneous reconnection peaks reach 8x the device count (due to reconnect storms). A reconnection storm exceeding broker capacity causes devices to go permanently offline until manually reset. The broker is provisioned for 15,000 simultaneous connections.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-15","original_id":"margin-safety-15","prompt":"A SaaS company's search index uses 40% of available disk space under current data volume. Data volume is projected to grow 20% per year, and the index requires immediate disk space to function — when disk hits 90% full the service stops indexing new documents. The team plans to add storage when usage hits 70% utilization, giving roughly 1.5 years of runway.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-16","original_id":"margin-safety-16","prompt":"A team's API rate limit with their geolocation provider is 10,000 lookups per day. Current usage averages 6,500 lookups per day. A marketing campaign launching next month is expected to bring a 2–3x traffic increase lasting two weeks. Exceeding the rate limit returns errors on the address validation step of checkout, blocking all new orders.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-17","original_id":"margin-safety-17","prompt":"A team running a high-traffic CDN edge node configures a memory cache with a maximum size of 32GB. Profiling shows the working set of hot content peaks at 20GB during prime time, with cold-start periods using as little as 5GB. Cache evictions are graceful — a miss falls through to origin with a latency penalty but no data loss. They size at 32GB for comfortable headroom.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-18","original_id":"margin-safety-18","prompt":"A developer estimates a new authentication refactor will take 10 days. The team has done this type of refactor three times in the past year, always within 8–12 days. The change is internal only, has no customer-facing deadline, and can be rolled back instantly if problems arise. They commit to 11 days.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-19","original_id":"margin-safety-19","prompt":"A team deploys a Redis cache cluster sized for 8GB of memory. Current cache usage is 7.2GB. Keys are set with TTLs of 24 hours but the product roadmap includes launching three new features over the next two months, each of which is expected to add cached objects. Cache eviction uses LRU, and evicting hot keys causes a cascade of DB queries that has previously caused an incident.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-20","original_id":"margin-safety-20","prompt":"A blockchain indexer must process blocks in real time; falling more than 100 blocks behind causes downstream dApps to display stale data, which breaks user transactions. Block arrival rate averages 12 per minute but spikes to 40 per minute during network congestion events that occur roughly twice a month. The team provisions for 60 blocks per minute sustained throughput.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-21","original_id":"margin-safety-21","prompt":"A team's incident response SLA commits to acknowledging critical incidents within 15 minutes and resolving them within 4 hours. They have one primary on-call engineer and no backup. The primary has missed acknowledgment in 3 of the last 20 incidents due to being in a meeting or asleep in a different time zone.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-22","original_id":"margin-safety-22","prompt":"An analytics pipeline writes results to an S3 bucket. Each run produces approximately 2GB. The pipeline runs daily, and 90 days of results are retained before lifecycle rules delete old files. The team allocates 250GB of S3 capacity via a quota. S3 storage is elastic and quota overages are immediately rechargeable at standard rates.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-23","original_id":"margin-safety-23","prompt":"A team is launching a developer API with a free tier capped at 1,000 calls per month per user. Backend cost per call is $0.001. They provision infrastructure for 5 million total free-tier calls per month. They have 3,000 free-tier users signed up and expect 10,000 by end of quarter. At full expected adoption and full usage, demand would be 10 million calls per month.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-24","original_id":"margin-safety-24","prompt":"A team configures a circuit breaker to open after 5% error rate sustained over 10 seconds. Under normal conditions the service runs at 0.1% error rate. The error rate threshold, window size, and recovery behavior were validated in production-like load tests. The circuit breaker configuration matches what was tested.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-25","original_id":"margin-safety-25","prompt":"An e-commerce site expects 1,000 concurrent sessions during a flash sale. Load testing shows the application server handles 1,050 concurrent sessions before response times degrade past 3 seconds. A degraded checkout experience during the flash sale means customers abandon carts. The team does not add additional capacity, relying on auto-scaling that takes 4–6 minutes to provision new instances.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-26","original_id":"margin-safety-26","prompt":"A team building a new internal reporting tool estimates the backend will need 4 vCPUs and 8GB RAM under expected query load. The tool is used only during business hours by 15 analysts. They provision an 8 vCPU, 16GB RAM instance, doubling both. If the tool becomes slow, analysts can wait without business impact.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-27","original_id":"margin-safety-27","prompt":"A satellite telemetry ingestion pipeline must store all raw data permanently for regulatory reasons; any data gap is a compliance event with significant fines. The system ingests 10TB per year with no growth expected. The team provisions 12TB — 20% buffer — on a single storage array with no redundancy and no offsite backup.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-28","original_id":"margin-safety-28","prompt":"A team uses a managed Elasticsearch cluster for product search. Normal indexing throughput is 2,000 documents per second. The team expects a re-index event during a schema migration that will run at 4,000 documents per second for approximately 6 hours. They temporarily scale the cluster to handle 6,000 documents per second for the migration window. A search outage means the product catalog is unavailable to customers.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-29","original_id":"margin-safety-29","prompt":"A team provisions a job queue worker fleet sized to drain 100 jobs per minute — exactly matching the average production ingest rate. The queue is used for sending transactional emails; if the queue backs up significantly, emails arrive hours late. Historical data shows ingest spikes to 300 jobs per minute during large user-triggered events such as password reset floods.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":false,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"margin-safety-30","original_id":"margin-safety-30","prompt":"A team committing to a quarterly OKR estimates a feature will be delivered in 6 weeks, based on a well-understood problem space, a team that has built nearly identical features before, and no external dependencies. They commit to 8 weeks in the OKR. Missing the OKR has minor internal visibility consequences and the feature can ship one quarter late without customer impact.","source":"margin-of-safety-provision","source_file":"authored/margin-of-safety-provision.jsonl","skill_fit":["margin-of-safety"],"family":"Systems/product/strategy pairwise","type":"nearMiss","target":false,"label":true,"decision_instruction":"You are sizing/provisioning a resource under uncertainty, given an expected load and the cost of under-provisioning vs over-provisioning. Answer YES if the proposed plan leaves an ADEQUATE safety margin for the stated uncertainty and failure cost. Answer NO if the plan is provisioned too tightly (no meaningful buffer) given the uncertainty and the high cost of running out.","mode":"binary-decision"}
+{"id":"glm-distractor-8","original_id":"glm-distractor-8","prompt":"How can I convert all the lowercase letters in a string to uppercase using Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-11","original_id":"glm-distractor-11","prompt":"**This Kata is intended as a small challenge for my students** All Star Code Challenge #18 Create a function called that accepts 2 string arguments and returns an integer of the count of occurrences the 2nd argument is found in the first one. If no occurrences can be found, a count of 0 should be returned. Notes: * The first argument can be an empty string * The second string argument will always be of length 1 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-12","original_id":"glm-distractor-12","prompt":"Implement quick sort to sort the given array of integers. Write corresponding code in Python. [9, 5, 8, 1, 3, 6, 7]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-13","original_id":"glm-distractor-13","prompt":"Zoe wants to go on the field trip to Washington DC with her middle school this spring and the cost is $485. Her grandma gave her $250 toward her fees and she must earn the rest by selling candy bars. She makes $1.25 for every candy bar she sells. How many candy bars does Zoe need to sell to earn the money for the trip?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-16","original_id":"glm-distractor-16","prompt":"Can you also tell me the date and time of the Indiana Comic Convention?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-17","original_id":"glm-distractor-17","prompt":"Create an algorithm to rotate an array by one element. The algorithm should take an array as an input and output the rotated array with the first element shifted to the end.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-18","original_id":"glm-distractor-18","prompt":"Generate a correct Python program for plotting bar chart for the following data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-19","original_id":"glm-distractor-19","prompt":"Given a non-negative decimal integer $x$, convert it to binary representation $b$ of 32 bits. Then, print the result of the following operations to $b$ respecitvely. * Inversion: change the state of each bit to the opposite state * Logical left shift: shift left by 1 * Logical right shift: shift right by 1 Constraints * $0 \\leq x \\leq 2^{32} - 1$ Input The input is given in the following format. $x$ Output Print the given bits, results of inversion, left shift and right shift in a line respectively. Examples Input 8 Output 00000000000000000000000000001000 11111111111111111111111111110111 00000000000000000000000000010000 00000000000000000000000000000100 Input 13 Output 00000000000000000000000000001101 11111111111111111111111111110010 00000000000000000000000000011010 00000000000000000000000000000110 Write Python code to solve the problem. Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-21","original_id":"glm-distractor-21","prompt":"Create a Python program that fetches the user's current time and sets a reminder after 30 minutes.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-22","original_id":"glm-distractor-22","prompt":"Could you delineate a methodology, utilising the Python programming language, to extract the middle value, labeled as the median, from an unorganized collection of integral numbers? Numbers = [12, 7, 21, 3, 9]","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-23","original_id":"glm-distractor-23","prompt":"Create a Python 3 class for a directory list widget using Qt that includes a grid layout with a directory list view and buttons to add or remove directories. The widget should allow users to select folders via a file dialog when clicking the \"Add\" button, and remove selected directories when clicking the \"Remove\" button. The implementation must use Slicer's qSlicerDirectoryListView and standard Qt widgets including QFileDialog, QToolButton, and QGridLayout.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-42","original_id":"glm-distractor-42","prompt":"Write a Python3 function that returns the Cargo home directory path by first checking the CARGO_HOME environment variable. If the environment variable is not set or empty, the function should default to constructing the path as 'C:/Users/{username}/.cargo' using the current user's username. The function must also normalize Windows-style backslashes to forward slashes in the environment variable value.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-46","original_id":"glm-distractor-46","prompt":"Create a Python 3 script that uses the clustergrammer library to load a matrix from stdin, perform optional filtering and normalization steps (such as sum-based filtering, z-score normalization, top-N selection, and threshold filtering), generate a hierarchical clustering visualization using cosine distance, and then output the resulting network data in JSON format for frontend visualization. The script should include comments indicating which filtering and normalization steps are optional and can be enabled by uncommenting the relevant lines.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-48","original_id":"glm-distractor-48","prompt":"Solve the inequality: 8x - 9 < 2. Express the solution in interval notation.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-50","original_id":"glm-distractor-50","prompt":"A toy store manager received a large order of Mr. Slinkums just in time for the holidays. The manager places $20\\%$ of them on the shelves, leaving the other 120 Mr. Slinkums in storage. How many Mr. Slinkums were in this order?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-51","original_id":"glm-distractor-51","prompt":"Write a python function to check if a given file is in NOAA ACE format by verifying that the first line starts with ':' and the third line contains 'NOAA'. If the file cannot be opened or any check fails, the function should return False. Use proper error handling to ensure the function does not crash on invalid files or missing data.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-69","original_id":"glm-distractor-69","prompt":"Write a program that allows users to search for phone numbers by name in a phone book. Implement the phone book using a custom data structure that you create. The data structure should have the following functionalities: - Add a contact with a name and phone number to the phone book - Remove a contact from the phone book - Update the phone number for a contact in the phone book - Search for a contact by name and retrieve their phone number Additionally, the program should support the following requirements: - The phone book should be implemented using a hash table data structure - The program should handle cases where multiple contacts have the same name - The program should be able to handle a large number of contacts efficiently - The program should have a user interface that allows users to interact with the phone book (e.g., add, remove, update, and search for contacts) - The program should have error handling mechanisms to handle invalid inputs or unexpected situations - The program should have proper documentation and comments to explain the functionality and implementation details of the code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-74","original_id":"glm-distractor-74","prompt":"Produce a program using Python that visualizes the given function.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-81","original_id":"glm-distractor-81","prompt":"How can I generate a regular expression that matches any two or more consecutive numbers?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-83","original_id":"glm-distractor-83","prompt":"Write a python 3 script that performs simple linear regression analysis on gas expenditure data using scikit-learn. The script should load data from \"data1.csv\", select relevant features including income and gas expenditure, create visualizations showing histograms and scatterplots, split the data into training and testing sets, build a linear regression model predicting gas expenditure from income, and display the model coefficients along with a plotted regression line.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-84","original_id":"glm-distractor-84","prompt":"Write a python 3 Django management command that classifies unassigned faces using ensemble predictions from two SVM models (small and big) with probability averaging, and prints classification results for the first 1000 unassigned faces, including predicted labels, probabilities, and corresponding person objects from the database.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-196","original_id":"glm-distractor-196","prompt":"Create a python 3 script that demonstrates two different plotting APIs using PyQt4: a procedural approach with PlotWidget and an object-oriented approach with a custom Plot class. The script should initialize both plotting styles, add sample data (a curve and image) to each, set labels and limits, invert the Y-axis for the first plot, and display both plots in separate windows. Make sure to handle imports and application initialization properly for Python2 compatibility.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-199","original_id":"glm-distractor-199","prompt":"Write a Python 3 function that tests whether the neohub class can be properly instantiated, ensuring the class initialization works correctly without any errors. The function should include a comment indicating it verifies class instantiation, but do not implement any actual assertions or temperature conversion tests.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-200","original_id":"glm-distractor-200","prompt":"Please answer the following question: - Gather the ingredients for the cake - Mix the flour, sugar, egg, and water to make batter - Pour the mixture into a cake pan - Place the cake in the oven to cook - Take the cake out when it is cooked through - Let the cake cool What might be the last step of the process? A:","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-201","original_id":"glm-distractor-201","prompt":"Can you provide a Python code snippet to convert XML to JSON?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-203","original_id":"glm-distractor-203","prompt":"Write a Python3 script that downloads and unpacks tracking results from Google Drive for various trackers like PyTracking-based and external trackers. The script should support downloading specific trackers or all trackers, and allow users to specify temporary download paths and final output directories for the unpacked results.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-214","original_id":"glm-distractor-214","prompt":"Create a python 3 program using the turtle module that draws a series of nested squares rotating at different angles. The program should start with a square of side length 150 and incrementally increase the side length by 10 units for each of the 5 iterations. Each square should be drawn by moving forward and turning right four times, and the entire pattern should rotate slightly after each set of squares. Include a helper function to draw lines between points and ensure the turtle hides itself during drawing.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-216","original_id":"glm-distractor-216","prompt":"How can I generate a set of random numbers without any duplicates in Python?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-224","original_id":"glm-distractor-224","prompt":"Create a Python script that sets the value of a variable from the command-line, but the value must be encrypted using a custom encryption algorithm before being assigned to the variable. Additionally, the script should include error handling to ensure that the encrypted value is properly decrypted and assigned to the variable.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-225","original_id":"glm-distractor-225","prompt":"A satellite orbits Earth at an altitude of 1501 km. Calculate its orbital velocity and period. (Earth mass = 5.97 × 10²⁴ kg, Earth radius = 6371 km)","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-227","original_id":"glm-distractor-227","prompt":"Compute the quotient of 17708 and 9880. Show your work.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-236","original_id":"glm-distractor-236","prompt":"def division_while_loop(dividend, divisor): \"\"\" This exercise focuses on division using a while loop. Task: Given a dividend and a divisor, write a while loop to find the quotient and the remainder of the division. Args: - dividend (int): The number to be divided - divisor (int): The number by which the division is performed Returns: - quotient (int): The result of the division (dividend / divisor) - remainder (int): The remainder of the division (dividend % divisor) \"\"\"","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-241","original_id":"glm-distractor-241","prompt":"Create a python 3 class called `BalanceSheet` that takes a `Portfolio` object (with default to a new `Portfolio()` instance) and provides methods to generate structured data representations. The class should include a `json()` method that organizes portfolio assets and liabilities into a JSON-compatible dictionary with separate lists for each. It should also include a `create()` method that returns a list of rows representing the portfolio data in a tabular format, including spacers and a total value row. Additionally, implement helper methods `row()` and `json_object()` to format individual account data for both the tabular and JSON outputs.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-249","original_id":"glm-distractor-249","prompt":"Write a python function to find the frequency of each character in a given string and return a dictionary with characters as keys and their frequencies as values. Solve the problem starting with the provided function header. Function header: ``` def get_char_frequency(string): ``` Please place the solution code in the following format: ```python # Your solution code here ```","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-261","original_id":"glm-distractor-261","prompt":"Create a function to check if an array contains any duplicate elements, while also ensuring that the array elements are sorted in ascending order and that the length of the array is less than or equal to 100. Additionally, the function should check if the array contains any negative integers, and if so, it should return False. The function should return a boolean value indicating the presence of duplicate elements. Example: Input: [1, 2, 3, 3, 4, 5, 5] Output: True","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-262","original_id":"glm-distractor-262","prompt":"You are working on an API for a space-themed game and need to create a class that handles the case when a specific planet for a character is not found. You need to define a class called GetCharactersCharacterIdPlanetsPlanetIdNotFound with the following attributes and methods: Attributes: - error: a string to store the error message Methods: - __init__: a constructor method to initialize the error attribute - to_dict: a method to return the model properties as a dictionary - to_str: a method to return the string representation of the model - __repr__: a method for printing and pretty-printing the object - __eq__: a method to check if two objects are equal - __ne__: a method to check if two objects are not equal You need to implement the class and its methods as described above.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-264","original_id":"glm-distractor-264","prompt":"How can I categorize data into two bins, with the labels \"category A\" and \"category B\"?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-267","original_id":"glm-distractor-267","prompt":"Given points A(14, -8) and B(-1, -13), find the slope of the line passing through these two points.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-268","original_id":"glm-distractor-268","prompt":"Create a python 3 class named Objects that initializes with several instance attributes including cloud set to None, score set to 0, score_type set to 'CNNSeg', type set to None, and type_probs set to None.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-269","original_id":"glm-distractor-269","prompt":"What is the code to construct a Recurrent Neural Network (RNN) using TensorFlow with an input size of 50 values and an output size of 10 values?","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-270","original_id":"glm-distractor-270","prompt":"Create a python 3 class called CompileGLSL that extends Module for compiling GLSL shader files into SPIR-V format using the glslangValidator tool. The class should define required tools, specify output file names with .spv extension, and implement a process method that runs the validator with appropriate stage flags (-S vert for vertex shaders and -S frag for fragment shaders) while handling directory creation and returning the subprocess return code.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-271","original_id":"glm-distractor-271","prompt":"Evaluate the definite integral of f(x) = sin(1x) from 1 to 4.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-274","original_id":"glm-distractor-274","prompt":"Calculate the pH of a 0.545 M solution of HCl. Show your calculation step by step.","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
+{"id":"glm-distractor-275","original_id":"glm-distractor-275","prompt":"Write a Python 3 program that prompts the user to enter three integer numbers and then calculates and displays their sum. The program should use input() to read the numbers from the user and print the result in the format \"Sum = [value]\".","source":"glm-distractor","source_file":"external/glm-distractor.jsonl","skill_fit":[],"family":"Systems/product/strategy pairwise","type":"distractor","target":false,"mode":"distractor","license":"Apache-2.0 (GLM-5.1 distilled)","decision_instruction":"Answer the question directly. Return ONLY valid JSON: {\"answer\": \"...\"}","eval_mode":"judge","label":null}
diff --git a/evals/datasets/calibrated/systems-product-strategy-pairwise.manifest.json b/evals/datasets/calibrated/systems-product-strategy-pairwise.manifest.json
new file mode 100644
index 0000000..bba05a9
--- /dev/null
+++ b/evals/datasets/calibrated/systems-product-strategy-pairwise.manifest.json
@@ -0,0 +1,61 @@
+{
+ "family": "Systems/product/strategy pairwise",
+ "family_key": "systems-product-strategy-pairwise",
+ "skills": [
+ "archetypes",
+ "feedback-loops",
+ "leverage-points",
+ "ooda",
+ "via-negativa"
+ ],
+ "value_surface": "paired reasoning quality",
+ "source": "Combined from 3 source files. authored: theory-of-constraints-bottleneck, margin-of-safety-provision; external: glm-distractor",
+ "leakage": "Theory-of-constraints-bottleneck authored dataset is locally authored — zero external leakage. Behavioral items for archetypes, feedback-loops, leverage-points, ooda, and via-negativa are locally authored scenarios. Margin-of-safety-provision authored dataset provides near-miss items. All target items are locally authored with zero training data leakage risk. GLM distractor items may have training data overlap. Overall leakage risk is very low.\n\nSource breakdown: 2 authored dataset(s) with zero external leakage; ",
+ "label": {
+ "definition": "Paired reasoning quality for systems/product/strategy scenarios. Items are behavioral scenarios scored by a judge panel comparing the skill-guided response against a placebo/filler baseline.",
+ "values": {
+ "win": "Skill response preferred by majority of judge panel",
+ "loss": "Placebo response preferred",
+ "tie": "No clear preference"
+ },
+ "eval_mode": "judge_panel",
+ "judge_models": [
+ "gemini-3.1-pro-preview",
+ "gpt-5.5-pro"
+ ],
+ "judge_criteria": "Compare responses on: diagnostic accuracy, leverage point identification, actionable specificity, and avoidance of symptomatic fixes."
+ },
+ "calibration": {
+ "baseline": 0.563,
+ "baseline_estimated": true,
+ "baseline_note": "Estimated from label distribution (52% true). Balanced distribution suggests items are in the target difficulty band. Actual baseline must be measured by calibration runner.",
+ "band": [
+ 0.4,
+ 0.7
+ ],
+ "status": "pending_calibration",
+ "instructions": "Run EVAL_RUN=calib node evals/run-calibration.js evals/datasets/calibrated/<family>-candidate-pool.jsonl to populate real calibration stats."
+ },
+ "item_counts": {
+ "total": 104,
+ "target": 30,
+ "near_miss": 30,
+ "distractor": 44,
+ "ambiguous": 0,
+ "decisive": 104
+ },
+ "item_class_definitions": {
+ "target": "Items that directly measure the family value surface — in-domain, skill-relevant items where the skill is expected to help.",
+ "near_miss": "Items that are similar to the family domain but not an exact match. Useful for calibration but may not benefit from the skill.",
+ "distractor": "Items that are clearly off-target (target=false). Used to measure false-positive rate and specificity.",
+ "ambiguous": "Items whose relevance to the family is unclear. Excluded from decisive splits."
+ },
+ "decisive_split_rules": {
+ "min_target": 1,
+ "min_distractor": 1,
+ "max_ambiguous": 0,
+ "satisfied": true
+ },
+ "created": "2026-06-06",
+ "frozen": false
+}
\ No newline at end of file