Society & Economy
Evidence check
  • Preprint
  • No code released
  • Not independently replicated

Study: Developers Understand AI-Generated Code Less Than Their Own

In a 35-person experiment from the University of Rostock, an LLM chat nearly halved coding time, but developers then needed longer to spot planted bugs in that code than in code they wrote.

Christopher Ort
By i10X News Desk · Reviewed by Christopher Ort · 7 min read
Share
A developer studies a monitor with a puzzled, concentrated look in a university computer lab
Image: AI-generated, i10X
On this page
  1. Quick Take
  2. In plain English
  3. What the study shows
  4. Why it matters: each developer is their own control
  5. Method in brief
  6. What remains open
  7. Context: from essays to code
  8. What it means for developers and teams
  9. About the analysis
  10. i10x Perspective
i10X Quick Take

Quick Take

  1. The finding: In a crossover experiment with 35 developers, people found planted bugs faster and more reliably in code they wrote themselves than in code they had just produced with an LLM chat: 32.5 versus 41.6 seconds per correctly found bug, a statistically significant 21.7% difference.
  2. Why it matters: The same LLM nearly halved programming time (14 min 31 s versus 24 min 41 s on average). The researchers read this as cognitive debt: time saved while writing is partly paid back later, when the code has to be understood, checked or fixed.
  3. What it means: Generated code was still understood far better than code nobody in the study had seen before. The developers who copied the most LLM code and the most task text into their prompts understood their results worst.

In plain English

Many programmers now ask an AI chatbot to write code for them. This study checked whether they really understand that code afterwards. Volunteers wrote one small program by hand and one with an AI chatbot, then hunted for hidden mistakes that the researchers had slipped into both. They found the mistakes faster in the code they had typed themselves. That matters for anyone who relies on software: code that works today still has to be fixed by someone tomorrow, and that is harder if nobody fully understands it.

What the study shows

Developers increasingly let large language models write the first draft of their code. Researchers have started to call the hidden cost of this habit cognitive debt or comprehension debt: the code works and the tests pass, but the person responsible for it never built a mental model of how it works. Julian Oertel and Regina Hebig from the University of Rostock and Jil Klünder from FHDW Hannover set out to measure that gap directly. Their preprint, posted to arXiv on November 18, 2026, compares how well developers understand code they generated by prompting, code they wrote by hand and code they had never seen.

  • Own code beats generated code: On average, participants found 88.5% of the planted bugs in self-written code, 80% in LLM-produced code and 66.9% in unseen code. They also submitted faster: 2 min 3 s for their own code, 2 min 33 s for generated code and 4 min 8 s for unseen code.
  • The gap holds up statistically: A mixed-effects model put the time per correctly found bug at 32.5 seconds for self-written code, 41.6 seconds for LLM code and 87.2 seconds for unseen code. Self-written code took 21.7% less time than LLM code (p = 0.043), and LLM code took 52.3% less time than unseen code (p < 0.001). All pairwise comparisons stayed significant after correction.
  • Memory explains a lot: Participants said 59.3% of the bugs they found in their own code were spotted because they remembered the original. For LLM code, that share was 34.3%.
  • Speed is the upside: Coding without the LLM took 91.3% longer than coding with it, according to a second model (p < 0.001).
  • How you use the chatbot matters: Within the LLM condition, a higher share of generated lines kept in the final solution and more task-description text copied into prompts both predicted slower bug finding, and the two together made it worse.
Bar chart of seconds needed per correctly found planted bug: 87.2 seconds for unseen code, 41.6 seconds for code produced with the LLM chat, 32.5 seconds for code developers wrote themselves.
i10X chart based on data from Oertel, Klünder and Hebig (2026), arXiv:2611.24216, Section IV-A and Table II. Own chart, no original figure reused.
Code typeBugs found (mean)Time to submit (mean)Seconds per found bug (model estimate)
Written by the participant88.5%2 min 3 s32.5 (95% CI 27.0 to 39.3)
Produced with the LLM chat80.0%2 min 33 s41.6 (95% CI 34.4 to 50.1)
Unseen code66.9%4 min 8 s87.2 (95% CI 72.2 to 105.2)
Selected results from Section IV-A and Table II of Oertel, Klünder and Hebig (2026), arXiv:2611.24216. Unseen code contained five planted bugs, the other two conditions four.

Why it matters: each developer is their own control

The design is the main strength. In a crossover experiment, every participant works in all three conditions, so differences in talent or experience cancel out instead of skewing a comparison between two groups. A biased-coin assignment balanced experience and proficiency across the six possible pairings of task and condition, and the order of tasks was randomized.

Participants did not know at first that the study was about comprehension. They were told it was about code quality and efficiency, which keeps them from memorizing their code more than they normally would. Only after reading a task did they learn whether they could use the LLM. The authors use a measure that combines speed and correctness, fit mixed-effects models that account for repeated measurements, task and order, and log-transform the outcome to meet model assumptions. Screen recordings and interviews add context to the numbers, and the authors say a replication package with materials, results and analysis scripts is available.

Method in brief

  • Participants: 38 people recruited, 35 analyzed: students, PhD candidates, academic staff and professional developers with at least basic Java skills.
  • Tasks: Three short Java methods: a string helper modeled on Apache Commons Lang, a grade calculator that the LLM never solved on the first try in 10 test attempts, and an invoice calculator spread across several classes.
  • LLM tool: A chat with a locally hosted Qwen3-32B model (8-bit quantized, thinking mode off). Solutions had to pass a test suite before moving on.
  • Comprehension test: Without any tools, participants searched for four planted bugs (off-by-one errors, flipped conditions, swapped operators and similar) in their own and their generated code, and five in unseen code.
  • Interviews: Two semi-structured interviews per person; 33 could be analyzed thematically.

What remains open

  • Small, convenience sample: 35 participants, recruited through contacts and university courses, is enough for a first measurement but limits how far the result generalizes. The authors say so explicitly.
  • Memory or understanding?: The bug hunt may partly measure recall of the code rather than deep understanding. The authors argue that both feed into cognitive debt, and self-rated comprehension did predict faster bug finding.
  • One chat tool, small tasks: The study used a single, mid-sized open model in a chat window. Coding agents and AI autocomplete were not tested, and each task was a single method. A stronger model could increase or reduce the gap, the authors note.
  • Self-reports diverge: In the ratings, 18 of 33 participants rated their understanding of both codes the same, 12 rated their own code higher and 3 rated the generated code higher.
  • Not peer-reviewed: The paper is a preprint. It names no funding source and no competing interests.

Context: from essays to code

The term cognitive debt gained attention through an EEG study by Kosmyna and colleagues, in which essay writers who used ChatGPT showed the weakest brain connectivity and the lowest sense of ownership. In software, Shen and Tamkin found that developers learning an unfamiliar Python library with AI help scored lower on a later quiz, and Balepur and colleagues found that students who built a website with a coding agent recalled less about their own code than chatbot users. Our explainer on the hidden risks of cognitive debt covers the broader debate. What this paper adds is a direct comparison inside the same person: code you prompted versus code you typed, measured with the same bug hunt.

What it means for developers and teams

  • Use LLMs where errors are cheap: Many participants already offload simple, low-risk or easily testable code and write critical parts themselves. The data supports that instinct.
  • Generate in small pieces: Seven participants said they now ask for small chunks instead of whole solutions. In the study, relying less on generated lines and writing your own prompts predicted better understanding.
  • Do not trust green tests alone: Both solutions passed the same tests, yet understanding differed. Ten participants admitted they checked the generated code only superficially; one summed it up as a problem for their future self.
  • Budget time for review: The time saved during writing is real, but some of it returns as slower debugging. Teams that measure only coding speed will miss that cost.

More research on how AI changes everyday work is collected on our Society & Economy studies page, and the latest tools are tracked in our Coding section.

About the analysis

This article is based on the full text of Oertel, Klünder and Hebig (2026), “The Comprehension Gap in LLM-Assisted Software Development: An Experiment,” arXiv:2611.24216v1 (cs.SE, submitted November 18, 2026). All numbers come from the paper. The chart was drawn by i10X from Section IV-A and Table II; the paper is distributed under the standard arXiv license, so no original figures were reused. The paper names a replication package with study materials, results and analysis scripts. No funding or conflict-of-interest statement is included. AI tools assisted with research and drafting; selection, fact-checking and final editing were done by the i10X editorial team.

i10x Perspective

This is a modest study with a clear message. Even on tiny tasks, developers understood AI-written code less well than their own, while the productivity gain was large. Neither side wins outright: the useful question for teams is not whether to use LLMs, but which code they can afford to understand less. The next step should be the same test on real projects with coding agents, where the gap is likely to be bigger.

Christopher Ort

Christopher Ort

Christopher Ort is the editor of i10X News at i10x.ai. He has worked hands-on with AI tools, models and agent workflows for years and leads i10X’s coverage of AI launches, funding and research. He is the author of “The Style Penalty”, an SSRN study on how frontier AI models judge AI-written CVs, covered by heise online and t3n.

Editor's picks

  1. Georgia Tech’s Academic AI Playbook: 20 Lessons From 67 Real Courses, Free to Reuse
  2. Arcfront’s $1B Run Rate: What the AI Data Startup Confirms and What It Doesn’t
  3. GPT-6.2 Astra Tops Blueprint-Bench 2, 70% Above May Leader GPT-5.5
  4. Deutsche Telekom Puts 100 Million Euros Into Mistral for Sovereign AI in Germany
  5. Inkling 2 Mini: Thinking Machines’ Looped Open Model Tops Qwen on Coding Tests