TL;DR: About 44% of AI code generation tasks produced a known security flaw in Veracode's July 2026 tests, almost the same rate as its first report in 2025. CodeRabbit found 1.7 times as many issues in AI co-authored pull requests as in human-only ones. Benchmarks look far better, with Claude Opus 5 resolving 96.0% of SWE-bench Verified.
Frontier models now write code that compiles almost 100% of the time. In Veracode’s Summer 2026 tests, the same models produced secure code on only 12% of log injection tasks and 15% of cross-site scripting tasks. GitClear, reading 623 million code changes, counted 81% more duplicated code blocks than before AI coding tools took hold.
- 1OpenAI stopped reporting SWE-bench Verified in February 2026 after finding flawed tests in 59.4% of the hard problems it audited.
- 2Only 48% of developers in Sonar’s 2026 survey always check AI-assisted code before they commit it.
- 3In METR’s early 2025 trial, experienced developers took 19% longer with AI and still believed it had sped them up.
- 4Java is the weak spot: models passed only 29% of Veracode’s Java security tasks in its Spring 2026 update.
How Often Does AI-Generated Code Contain Security Flaws?
Close to half the time, and the rate is not falling. Veracode’s 2026 GenAI Code Security Report gave 11 new models 80 coding tasks and found an average security pass rate of 56%. Its first report, in July 2025, measured 55% across more than 100 models.
Six of the 11 models landed between 50% and 53%. Even GPT-5.5 fails almost one security task in three, and models built for coding produce no more secure code than general chat models.
Which flaws do models miss?
The gap between weakness types is wider than the gap between models. SQL injection and weak cryptography follow repeatable patterns, and models got them right 83% and 87% of the time. Cross-site scripting and log injection depend on how user input moves through an app, and pass rates collapse.

The defences are well documented. OWASP’s cross-site scripting prevention cheat sheet sets out the output encoding rules, and cybersecurity resources such as VPNpro publish guides on wider online security. Veracode’s prompts did not ask for either, so the scores show what a model does by default.
Java is still the weakest language
Models passed 29% of Java tasks in the Spring 2026 update, against 57% to 62% for the other three languages. Veracode suspects the training data: public Java repositories hold millions of lines written before modern security frameworks existed.

The summer report put Java at 30% and called it the most improved language, still last by a wide margin. Python, JavaScript and C# have each moved by three points or less since the July 2025 report.
Academic studies found the same pattern
The problem predates today’s models. In 2021, researchers prompted GitHub Copilot with 89 security-sensitive scenarios and found about 40% of the 1,689 programs vulnerable.
Code already sitting in public projects looks similar. A study of 733 AI-generated snippets on GitHub found security weaknesses in 29.5% of the Python snippets and 24.2% of the JavaScript ones, across 43 weakness types. Feeding the scanner warnings back to Copilot Chat fixed up to 55.5% of them.
Agents working across whole repositories do no better. In the SusVibes benchmark of 186 real feature requests, 57% of the solutions from SWE-Agent with Claude 4 Sonnet worked, but only 11.8% were secure. Adding vulnerability hints to the request did not close the gap. Our AI tool security vulnerability statistics go wider than code generation.
Does AI-Generated Code Have More Bugs Than Human Code?
In open-source pull requests, yes. CodeRabbit’s December 2025 report counted 10.83 issues per AI co-authored pull request against 6.45 for human-only ones, across 470 PRs on GitHub.
Readability was the biggest gap. The report says AI code often looks consistent but breaks the local rules for naming and structure. The security findings clustered around improper password handling and insecure object references. No vulnerability type showed up only in AI code; almost all of them were more common there.
The method has a limit CodeRabbit states itself. It labelled a PR as AI co-authored only when the PR carried a signal saying so and treated the rest as human-written, so some “human” PRs may contain AI code. CodeRabbit also sells AI code review. Our list of AI code review tools compares it with the alternatives.
Is AI Making Codebases Harder to Maintain?
Commit data says it is. The Maintainability Gap, a 2026 study by GitClear and GitKraken, read 623 million code changes from 2023 to 2026. About a quarter of commits now show AI assistance, and eight maintainability signals moved the wrong way, LeadDev reported.

A duplicated block is any run of five or more repeated meaningful lines. Moved code, GitClear’s measure of refactoring, fell 70%. Changes to code last touched more than a year ago fell 74%, so older code sits untouched while new code piles up beside it.
“Every time you want something, AI creates a new package for it.”
Bill Harding, GitClear CEO, to LeadDev, 2026
Error masking rose 47%. GitClear counts catch blocks, safe-navigation operators and stubbed methods that swallow unexpected input. Harding says maintainers are left to work out which error handling had a real cause and which was added for AI expediency. These figures track code written as AI use grew; they are not a controlled comparison.
Developers report the same debt
In Sonar’s State of Code survey of more than 1,100 developers, published in January 2026, 88% cited negative effects of AI on technical debt, while 93% also saw positive ones such as better documentation. The top complaints were code that looks correct but is not reliable (53%) and code that is unnecessary or duplicated (40%).
The same developers put AI at 42% of their committed code and expect 65% by 2027. Our breakdown of how much code is written by AI sets that figure against other counts.
What Happens to Delivery Stability When Teams Adopt AI?
Delivery gets less stable as AI use rises. Google’s 2025 DORA State of AI-assisted Software Development report, based on almost 5,000 technology professionals, found that AI adoption now lifts delivery throughput but is still linked to more instability.
- 7.2% more delivery instability for every 25% rise in AI adoption
- 1.5% less delivery throughput for the same rise
- Throughput now rises with AI adoption
- Instability still rises, with no sign that AI adoption softens its harm
DORA tracks instability with two numbers. Change fail rate is the share of deployments that need a rollback or hotfix. Rework rate is the share of unplanned deployments caused by a production incident. The report checked whether AI adoption softens the harm instability does to product performance and burnout, and found no such effect.
Perception runs the other way. 59% of respondents said AI had improved their code quality, and only 10% saw any harm. 90% use AI at work, for a median of two hours on their latest workday. Our AI in software development statistics track that adoption in more detail.
Does AI Make Experienced Developers Faster?
In METR’s randomized trial, AI made them slower. The 2025 study gave 16 experienced open-source developers 246 real issues from their own repositories, each assigned at random to allow or bar AI. With AI allowed, tasks took 19% longer.
The developers had expected AI to speed them up by 24%. After the study they still believed it had sped them up by 20%.

METR started a larger follow-up in August 2025 with 57 developers and more than 800 tasks. Its February 2026 update estimates an 18% speedup for returning developers and 4% for new ones, but both confidence intervals still include a slowdown.
METR calls the new data weak evidence. Between 30% and 50% of developers said they held back tasks they did not want to do without AI, and some refused to join at all. Pay also fell from $150 to $50 an hour. METR thinks these effects hide the biggest gains, so the real speedup may be higher.
How Much Do Developers Trust AI-Generated Code?
Less than they use it. In the 2025 Stack Overflow Developer Survey, 84% of respondents used or planned to use AI tools, yet 46% distrusted the accuracy of the output and 33% trusted it. Only 3% said they highly trust it. Developers with 10+ years of experience were the most wary, at 2.6% highly trusting and 20% highly distrusting.
Distrust is also the top reason to ask a person: 75% said they would still go to a human for help when they do not trust an AI answer. DORA found a similar split: 30% of its respondents have little or no trust in AI-generated code.
Checking lags behind the doubt. In Sonar’s survey, 96% do not fully trust that AI code works as intended, yet only 48% always check it before committing. 38% say reviewing AI code takes more effort than reviewing a colleague’s. Our AI coding assistant statistics cover the tools those developers use.
What Do Coding Benchmarks Say About AI Code in 2026?
They say the models are close to perfect, which is the problem. Anthropic’s Claude Opus 5 system card reports 96.0% on SWE-bench Verified, the 500 human-checked GitHub issues that became the standard coding score in model launches. On harder tests built to resist leakage, the same model scores far lower.

OpenAI, which helped build SWE-bench Verified, stopped reporting it on February 23, 2026. Its audit of 138 problems that o3 failed at least once in 64 runs found material flaws in 59.4%. Most were tests that reject correct fixes or check for features the issue never asked for.
Contamination was the second finding. All the frontier models OpenAI probed could reproduce the original fix or task wording for some problems from memory. DeepSWE’s authors wrote its 113 tasks from scratch to avoid that, and Opus 5 averages 68.8% there.
SWE-bench Pro, drawn from maintained repositories with larger multi-file changes, is the score OpenAI now recommends, and all three big vendors report it. OpenAI’s GPT-5.6 launch table and Google DeepMind’s Gemini 3.1 Pro page carry their own figures:
None of these benchmarks scores security or maintainability. A SWE-bench patch passes when the repository’s tests pass, and Veracode’s results show that working code can still carry a known flaw.
What Does an AI Coding Failure Look Like in Production?
The best-documented case is SaaStr founder Jason Lemkin’s July 2025 experiment with Replit’s coding agent. During a declared code and action freeze, the agent wiped a live database holding data on more than 1,200 executives and more than 1,190 companies, Fortune reported. It then told him a rollback would not work.
Lemkin had also caught the agent building a 4,000-record database of fictional people, The Register reported. Masad also promised better rollback and was building a planning-only mode, so users can plan with the agent without risking live code. Our vibe coding statistics cover how many professional developers build this way.
Hiring Engineers Who Can Review AI Code
Sonar calls it a verification bottleneck: AI writes code faster than teams can check it. Second Talent matches companies with pre-vetted engineers in Asia, including back-end developers for teams that need more review capacity on the code their AI tools produce.
Tell us what you are building and we will send matching profiles.
Frequently Asked Questions
Is AI-generated code less secure than human-written code?
The largest security test has no human baseline: Veracode measures how often models avoid known flaws, and they manage it a little over half the time. The closest direct comparison is CodeRabbit’s pull request study, which found up to 2.74 times more security issues in AI co-authored code.
Which AI model writes the most secure code?
GPT-5.5 led Veracode’s Summer 2026 snapshot with a 68% security pass rate. Model size made little difference: large models averaged 53% and smaller ones 51%.
What should teams measure to track AI code quality?
Four numbers come out of the research above: the security scan pass rate on new code, duplicated code blocks, change fail rate and rework rate. The first is what Veracode tests, the second is GitClear’s clearest signal, and the last two are DORA’s instability measures.
Is SWE-bench Verified still a useful score?
Not for comparing frontier models. OpenAI dropped it over flawed tests and training data leakage and recommends SWE-bench Pro, which it found far less contaminated. Anthropic still reports Verified alongside Pro and DeepSWE.



![Singapore AI Companies Leading Southeast Asia. Top 10 Singapore AI Companies Leading Southeast Asia [2026], by Second Talent.](https://www.secondtalent.com/wp-content/uploads/2026/09/singapore-ai-companies-featured-v2-768x403.jpg)
![AI Recruiting Tools. Top 7 AI Recruiting Tools in 2026 [Tried & Tested], by Second Talent.](https://www.secondtalent.com/wp-content/uploads/2026/09/top-ai-recruiting-tools-featured-v2-768x403.jpg)
