mlsanityData to 7 Oct 2026

Model See, Model Do? Exposure-Aware Evaluation of Bug-vs-Fix Preference in Code LLMs

arXiv 2601.10496 ↗First posted 15 Jan 2026cs.SE cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Large language models are increasingly used for code generation and debugging, but their outputs can still contain bugs, that originate from training data. Distinguishing whether an LLM prefers correct code, or a familiar incorrect version might be influenced by what it's been exposed to during training. We introduce an exposure-aware evaluation framework that quantifies how prior exposure to buggy versus fixed code influences a model's preference. Using the ManySStuBs4J benchmark, we apply Data Portraits for membership testing on the Stack-V2 corpus to estimate whether each buggy and fixed variant was seen during training. We then stratify examples by exposure and compare model preference using code completion as well as multiple likelihood-based scoring metrics We find that most examples (67%) have neither variant in the training data, and when only one is present, fixes are more frequently present than bugs. In model generations, models reproduce buggy lines far more often than fixes, with bug-exposed examples amplifying this tendency and fix-exposed examples showing only marginal improvement. In likelihood scoring, minimum and maximum token-probability metrics consistently prefer the fixed code across all conditions, indicating a stable bias toward correct fixes. In contrast, metrics like the Gini coefficient reverse preference when only the buggy variant was seen. Our results indicate that exposure can skew bug-fix evaluations and highlight the risk that LLMs may propagate memorised errors in practice.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 35 of its 63 references that are in the map. First posted on arXiv 15 Jan 2026.

Builds on

35 of 63 references.

References · 35

  1. 2020Extracting Training Data from Large Language Modelscited by 2,144
  2. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  3. 2018ML-Leaks: Model and Data Independent Membership Inference Attacks and Defenses on Machine Learning Modelscited by 475
  4. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
  5. 2021Membership Inference Attacks on Machine Learning: A Surveycited by 306
  6. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  7. 2023Using an LLM to Help With Code Understandingcited by 222
  8. 2022Quantifying Privacy Risks of Masked Language Models Using Membership Inference Attackscited by 168
  9. 2024A Survey on Uncertainty Quantification of Large Language Models: Taxonomy, Open Research Challenges, and Future Directionscited by 115
  10. 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 110
  11. 2024Rethinking LLM Memorization through the Lens of Adversarial Compressioncited by 91
  12. 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generationcited by 72
23 more
  1. 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
  2. 2024SoK: Membership Inference Attacks on LLMs are Rushing Nowhere (and How to Fix It)cited by 54
  3. 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 49
  4. 2024Calibration and Correctness of Language Models for Codecited by 49
  5. 2023Large Language Models and Simple, Stupid Bugscited by 45
  6. 2023Exploring Memorization in Fine-tuned Language Modelscited by 44
  7. 2022Memorization in NLP Fine-tuning Methodscited by 43
  8. 2023Towards More Realistic Membership Inference Attacks on Large Diffusion Modelscited by 41
  9. 2024Measuring memorization in language models via probabilistic extractioncited by 40
  10. 2024Language Models for Code Completion: A Practical Evaluationcited by 38
  11. 2023SoK: Memorization in General-Purpose Large Language Modelscited by 36
  12. 2019How Often Do Single-Statement Bugs Occur? The ManySStuBs4J Datasetcited by 35
  13. 2023Data Portraits: Recording Foundation Model Training Datacited by 29
  14. 2023Unveiling Memorization in Code Modelscited by 29
  15. 2023Traces of Memorisation in Large Language Models for Codecited by 26
  16. 2022TSSB-3M: Mining single statement bugs at massive scalecited by 14
  17. 2025Do LLMs Memorize Recommendation Datasets? A Preliminary Study on MovieLens-1Mcited by 12
  18. 2023The (ab)use of Open Source Code to Train Large Language Modelscited by 9
  19. 2024Does Your Neural Code Completion Model Use My Code? A Membership Inference Approachcited by 9
  20. 2024An Exploratory Investigation into Code License Infringements in Large Language Model Training Datasetscited by 8
  21. 2025Code Red! On the Harmfulness of Applying Off-the-shelf Large Language Models to Programming Taskscited by 6
  22. 2025Cracks in The Stack: Hidden Vulnerabilities and Licensing Risks in LLM Pre-Training Datasetscited by 4
  23. 2025How Much Do Code Language Models Remember? An Investigation on Data Extraction Attacks before and after Fine-tuningcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Large Language Models for Programming: Actually Fixing or Reimplementing Incorrect Code?
  2. 2025LLM-Based Detection of Tangled Code Changes for Higher-Quality Method-Level Bug Datasets
  3. 2026Subjective Code Preferences in Experts and Large Language Models ↗
  4. 2025Analyzing and Mitigating Surface Bias in Code Evaluation Metrics
  5. 2024Learning Code Preference via Synthetic Evolution
  6. 2025Teaching Your Models to Understand Code via Focal Preference Alignment
  7. 2025Human-Aligned Code Readability Assessment with Large Language Models ↗
  8. 2026Bias in the Loop: Auditing LLM-as-a-Judge for Software Engineering