Simulating Students' Java Programming Errors with Large Language Models

23d ago · Global · primary source: export.arxiv.org

A new study examines whether large language models can generate synthetic Java programming errors that mimic real student mistakes, using a dataset of more than 74,000 authentic submissions to benchmark five models across three prompting strategies [1]. The research, posted to arXiv on June 12, 2026, draws on the CodeWorkout dataset, which contains 74,000+ unique student Java submissions spanning 37 distinct programming problems [1]. The authors evaluated five large language models under three prompting approaches: Input-Output, Chain-of-Thought, and iterative Self-Refine [1]. Performance was measured along two axes — diversity of error patterns and alignment with authentic student mistakes — and the study also tracked how results shifted across problems of varying difficulty [2]. Quantitative results showed a divergence: all models produced a wide range of errors, but their fidelity to real student submissions varied considerably [3]. Claude Sonnet 4 delivered the most balanced performance, maintaining relatively low edit distances from human code even as problem difficulty increased [4]. Other models, including GPT-5 and Gemini 2.5 Pro, exhibited substantially larger distances on medium- and high-struggle problems, meaning their synthetic errors drifted further from authentic student behavior [5]. To test whether the generated errors could pass as human, the researchers ran a blinded expert annotation study with 401 participants [1]. The annotators compared synthetic and authentic errors and found them functionally indistinguishable [1]. This qualitative finding bolsters the quantitative benchmarks, suggesting that under the right conditions, LLM-generated mistakes can serve as plausible stand-ins for real student submissions [2]. The study also identified a trade-off tied to problem difficulty. Higher-struggle-level problems elicited more diverse errors from the models, but those errors were less student-like [3]. The authors note that this pattern has implications for the design of intelligent tutoring systems and teachable agents, where synthetic errors could supplement scarce classroom data during early deployment of new programming tasks [1]. Obtaining representative student errors for newly designed assignments has historically been slow and expensive, since authentic submissions accumulate only after extensive classroom use [2]. The paper frames LLM-based simulation as a potential shortcut for learning-analytics pipelines and adaptive feedback systems, while cautioning that model choice and prompting strategy must be calibrated to the difficulty of the target problems [4].

safety-researchresearch-paperapplicationcommentary

Background sources we checked (10)
  • arxiv.org ↗ Understanding student errors in the programming is a cornerstone of programming education, yet obtaining a representative set of student errors for any newly designed task remains slow and costly, since authentic submissions only accumulate after extensive classroom deployment. T…
  • arxiv.org ↗ Understanding student errors in the programming is a cornerstone of programming education, yet obtaining a representative set of student errors for any newly designed task remains slow and costly, since authentic submissions only accumulate after extensive classroom deployment. T…
  • arxiv.org ↗ Understanding student errors in the programming is a cornerstone of programming education, yet obtaining a representative set of student errors for any newly designed task remains slow and costly, since authentic submissions only accumulate after extensive classroom deployment. T…
  • arxiv.org ↗ Understanding student errors in the programming is a cornerstone of programming education, yet obtaining a representative set of student errors for any newly designed task remains slow and costly, since authentic submissions only accumulate after extensive classroom deployment. T…
  • en.wikipedia.org ↗ In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map values to other values, rather than a…
  • en.wikipedia.org ↗ This glossary of computer science is a list of definitions of terms and concepts used in computer science, its sub-disciplines, and related fields, including terms relevant to software, data science, and computer programming.…
  • en.wikipedia.org ↗ Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named after French mathematician, philosopher and physic…
  • en.wikipedia.org ↗ This is a list of accidents and incidents involving military aircraft grouped by the year in which the accident or incident occurred. Not all of the aircraft were in operation at the time. Combat losses are not included except for a very few cases denoted by singular circumstance…
  • en.wikipedia.org ↗ Hangzhou DeepSeek Artificial Intelligence Basic Technology Research Co., Ltd., doing business as DeepSeek, is a Chinese artificial intelligence (AI) company that develops large language models (LLMs). Based in Hangzhou, Zhejiang, DeepSeek is owned and funded by High-Flyer, a Chin…
  • en.wikipedia.org ↗ The Chipko movement (Hindi: चिपको आन्दोलन, lit. 'hugging movement') is a forest conservation movement in India. Opposed to commercial logging and the government's policies on deforestation, protesters in the 1970s engaged in tree hugging, wrapping their arms around trees so that …

Sources

Spot something wrong? Report an issue