Study finds AI assistants help developers produce code that's more likely to be buggy

Thomas Claburn ยท article ยท 2022-12-13 Reader ๐Ÿ–ฅ๏ธ

Calibrated Trust (in AI Agents)Code QualityLLM Reliability Failures
A controlled Stanford user study found that developers given access to an AI coding assistant (OpenAI's codex-davinci-002, as used in GitHub Copilot) produced measurably less secure code than a control group working without it โ€” and, more strikingly, were more likely to believe their own AI-assisted code was secure than the control group was about theirs โ€” indicating AI assistance can degrade both code security and developers' self-assessment of that security simultaneously.

theoretical ยท expository โ€” A Register news report summarizing a Stanford user study (Perry, Srivastava, Kumar, Boneh, 'Do Users Write More Insecure Code with AI Assistants?,' arXiv:2211.03622) and situating it against two prior NYU studies on GitHub Copilot's code-security properties. The article itself makes no independent argument; it reports and lightly contextualizes the paper's findings. Published 2022-12-13, so 'previously' and prior studies cited (Aug 2021, Oct 2022) are anchored to that date, not today's.

Structure

PartRole
Headline finding stated: AI-assisted participants produced more security vulnerabilities and were more likely to believe their code was secureconclusion (stated upfront)
Positioning against prior work: an Aug 2021 NYU-adjacent study ('Asleep at the Keyboard?') found ~40% of Copilot-aided solutions across 89 scenarios had exploitable vulnerabilities, but was limited to 25 vulnerability types and three languages (Python, C, Verilog)context
Positioning against a second prior study ('Security Implications of Large Language Model Code Assistants'): used a weaker Codex model, focused only on C, and reported inconclusive results โ€” which the Stanford authors attribute to C being the one language in their own broader study with mixed resultscontext
Study design: 47 participants (undergrads, grad students, industry professionals) wrote code for 5 prompts in a monitored Electron app, with/without AI assistanceevidence
Prompt-by-prompt results: AI-assisted group had a lower correct-answer rate (67% vs 79%) and significantly more insecure solutions and trivial-cipher use on the encryption task; similar pattern on prompts 2-4; mixed/inconclusive but still negative signal (more integer-overflow mistakes) on the C-language prompt 5evidence
Authors' stated conclusion: AI assistants should be used cautiously because they can mislead inexperienced developers and introduce vulnerabilities, while also potentially improving productivity, lowering entry barriers, and making development more accessible than hostile forums like early Stack Overflowconclusion

Key terms

Propositions

Arguments

AI coding assistants should be used cautiously, because they can simultaneously degrade code security and inflate developers' confidence in that code's security. strength: medium
Explicit premises:
Implicit premises:
Inferences:

Questions addressed

Gaps

Related documents