mlsanityData to 14 Oct 2026

Human-Written vs. AI-Generated Code: A Large-Scale Study of Defects, Vulnerabilities, and Complexity

arXiv 2508.21634 ↗First posted 29 Aug 2025cs.SEcited by 16

Not on the map. Why?

Abstract (arXiv)

As AI code assistants become increasingly integrated into software development workflows, understanding how their code compares to human-written programs is critical for ensuring reliability, maintainability, and security. In this paper, we present a large-scale comparison of code authored by human developers and three state-of-the-art LLMs, i.e., ChatGPT, DeepSeek-Coder, and Qwen-Coder, on multiple dimensions of software quality: code defects, security vulnerabilities, and structural complexity. Our evaluation spans over 500k code samples in two widely used languages, Python and Java, classifying defects via Orthogonal Defect Classification and security vulnerabilities using the Common Weakness Enumeration. We find that AI-generated code is generally simpler and more repetitive, yet more prone to unused constructs and hardcoded debugging, while human-written code exhibits greater structural complexity and a higher concentration of maintainability issues. Notably, AI-generated code also contains more high-risk security vulnerabilities. These findings highlight the distinct defect profiles of AI- and human-authored code and underscore the need for specialized quality assurance practices in AI-assisted programming.

Key facts. Cited by 16 papers in the map (data through 14 Oct 2026). First posted on arXiv 29 Aug 2025.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 15.

16 papers.

Sort:

By area:

  1. 2026SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Taskscited by 30
  2. 2026Measuring AI R&D Automationcited by 9
  3. 2026What to Cut? Predicting Unnecessary Methods in Agentic Code Generationcited by 6
  4. 2026Code Change Characteristics and Description Alignment: A Comparative Study of Agentic versus Human Pull Requestscited by 3
  5. 2026Let's Make Every Pull Request Meaningful: An Empirical Analysis of Developer and Agentic Pull Requestscited by 2
  6. 2026To What Extent Does Agent-generated Code Require Maintenance? An Empirical Studycited by 2
  7. 2025PIE: Performance Interval Estimation for Free-Form Generation Taskscited by 1
  8. 2026Mining Architectural Quality Under Agentic AI Adoption: A Causal Study of Java Repositoriescited by 1
  9. 2026Towards an Agent Operating System - Lessons from Classical and Cloud OScited by 1
  10. 2026Where Did the Variability Go? From Vibe Coding to Product Lines by Regenerationcited by 0
  11. 2026Enhancing SLMs for Sustainable Code Optimization in Radio-Astronomycited by 0
  12. 2026Generation of Web Apps with Agentic IDEs: An Empirical Assessmentcited by 0
4 more
  1. 2026AI Writes Code, Humans Pay the Debt. An Empirical Study on the Sustainability and Evolution of Agent-Generated Codecited by 0
  2. 2026What is the Difference Between Me and You? Benchmarking the Quality Gap Between Human-Written and AI-Generated Codecited by 0
  3. 2026Between the Commits: Process, Error, and Claim Reliability in a Wholly AI-Authored Codebasecited by 0
  4. 2026CRJudgeBench: Can AI Detect Plausible but Invalid Code Reviews?cited by 0