arxiv-2605-02741 SRC-0356 · paper

AI-Generated Smells: An Analysis of Code and Architecture in LLM and Agent-Driven Development

Created: 2026-05-04 · Ingested: 2026-09-19

https://arxiv.org/abs/2605.02741(opens in a new tab)

The promise of Large Language Models in automated software engineering is often measured by functional correctness, overlooking the critical issue of long term maintainability. This paper presents a systematic audit of technical debt in AI-generated software, revealing that AI does not eliminate flaws but rather introduces a distinct machine signature of defects. Our multi-scale analysis, spanning single-file algorithmic tasks and complex, agent generated systems, identifies a fundamental Reasoning-Complexity Trade-off: as models become more capable, they generate increasingly bloated and coup

In brief

Stronger code models write more bloated code, not cleaner code, and better prompting does not fix it. Human-written solutions carry a different defect profile entirely.

Two experiments with PyExamine static analysis. Experiment I: 90 problems randomly sampled from CodeContest solved in Python by deepseek-coder-v2(16b), Llama3(70b), Qwen Coder(30b), Qwen Coder(480b), and Gemini 2.5 Pro, under zero-shot and structured few-shot prompts, with 1 randomly sampled verified human submission per problem as control. Experiment II: MetaGPT with Qwen-Coder 480B generating full repositories across 5 scenarios, each with 4 prompts of increasing specificity.

Qwen-Coder-480b produced 11 Long Method instances zero-shot versus 1 for the human baseline; few-shot raised it to 13, and Gemini from 5 to 8. Temporal Field appeared only in human code (4 instances). In repositories, defects shifted to Too Many Branches, High Response for a Class, Scattered Functionality and Unstable Dependency. TLoC correlated with architectural smells at ρ=0.94 (p<0.001), ToF at ρ=0.72 (p<0.001), while prompt stage had no effect (p>0.8).

Measured, not argued, but the counts are small raw totals with no normalisation, Experiment II rests on 1 framework and 20 generated projects, and the authors themselves flag Feature Envy and Potential Shotgun Surgery as systematic false positives. No iterative debug loop was run, so these are first-pass habits.

Treat code volume, not prompt detail, as the thing to control if you care about maintainability of agent output.

Written from the abstract by claude-opus-5 on 2026-10-24, with every figure checked against it. Not a substitute for the paper.

Referenced by

Claims in this catalog that draw on this source, and whether as support or counterpoint.