Study Finds AI Code Has More Bugs Than Human Code
AI coding tools are helping developers write software faster, but a new analysis from CodeRabbit suggests that speed comes with a cost. According to the study, code written with the help of AI systems tends to contain more problems than code written solely by human developers, especially when it comes to correctness and security.
CodeRabbit examined pull requests created in real-world projects and compared those that used AI assistance with those written by humans without AI. On average, AI-assisted pull requests contained 10.83 issues, while human-only pull requests contained 6.45 issues. That means AI-generated or AI-influenced code had 1.7 times more issues overall, often leading to longer review cycles and a higher risk that bugs will slip into production systems.
Security, Logic and Performance Issues Rise with AI Tools
The study found that the increased issue count is not limited to small mistakes. AI-assisted pull requests showed 1.4 times more critical issues and 1.7 times more major issues than human-written code. This suggests that the problems go beyond minor style errors and can affect core application behaviour and safety.
Logic and correctness errors were 1.75 times more common in AI-generated code, while issues tied to code quality and long-term maintainability increased by 1.64 times. Security-related problems rose by 1.57 times and performance issues were 1.42 times more frequent. In practice, this means developers reviewing AI-produced changes are more likely to encounter broken logic, risky data handling and inefficient code paths that need to be fixed before release.
CodeRabbit highlighted several recurring vulnerabilities that appeared more often when AI was involved, including improper password handling, insecure object references, cross-site scripting flaws and insecure deserialization. These are the kinds of weaknesses that attackers can exploit, so missing them in review can lead to serious security incidents later on.
AI Still Helps with Cleanliness, Tests and Productivity
Despite the higher error rates, the report also makes it clear that AI tools offer genuine advantages. AI-generated code had 1.76 times fewer spelling errors and 1.32 times fewer testability issues, suggesting that large language models can help enforce certain patterns, structure and consistency in codebases.
For many teams, AI already plays a useful role in automating boilerplate, suggesting test cases, drafting helper functions and speeding up day-to-day tasks. Rather than removing developers from the loop, these tools are shifting human effort toward reviewing, managing and correcting AI output. In other words, the role of the engineer becomes less about typing every line and more about guiding the AI, spotting flaws and making final design decisions.
What the Findings Mean for Developer Jobs
The headline takeaway for developers is that their jobs are not disappearing. If anything, the CodeRabbit study supports the idea that human expertise is more important than ever. AI can draft code quickly, but it still struggles with deep domain context, nuanced business rules and subtle security or performance trade-offs.
Teams that rely heavily on AI-generated code will need strong human reviewers to catch logic bugs and security gaps before they reach production. Organisations may also need clearer review processes, stricter coding standards and better training so developers know how to safely integrate AI tools into their workflows. In this model, AI becomes a powerful assistant, not a replacement for skilled engineers.
More Code, More Vulnerabilities – But Not All Bad News
The report also places rising vulnerability numbers in a broader context. Microsoft, for example, patched 1,139 CVE-listed vulnerabilities in 2025, the second-highest total on record. At first glance, that might look like a sign of declining code quality. However, with AI accelerating development and increasing the total amount of code being written, it is expected that the absolute number of discovered vulnerabilities will grow as well.
The key question is not only how many issues exist, but how quickly they are found and fixed. As AI models such as OpenAI’s GPT family and other coding assistants continue to evolve, they are being updated to reduce common mistakes and to produce more reliable code. For now, the CodeRabbit study is a reminder that AI is a powerful tool but still requires careful supervision. Human developers remain central to building secure, correct and maintainable software.
