Beyond Functional Correctness: Static Code Quality Profiling of LLM-Generated Code
Abstract
Large language models (LLMs) are increasingly used for code generation, yet most evaluations still focus on whether generated code passes benchmark test suites. Functional correctness alone, however, provides only a limited view of quality: benchmark tests are often incomplete, and passing them does not guarantee that code is maintainable, reliable, or well-structured. This paper presents a large-scale static quality profiling of LLM-generated Python code, with a focus on maintainability and reliability. Using 65,663 programs from 73 models in LiveCodeBench, we evaluate generated code with established static analysis tools, including Pylint, Radon, and SonarQube. Our results show systematic differences across models that are not captured by correctness alone, with maintainability emerging as the clearest source of variation. We further find that correctness often comes with structural trade-offs rather than uniformly simpler solutions. Overall, our findings motivate evaluation frameworks that assess LLM-generated code beyond pass rates alone.
Create a lesson
Metadata
- Comments
- Accepted for publication in ICECCS2026
Related papers
From Observation to Explanation: Mechanistic Interpretability of LLM-Generated Code for Principled Repair
Shared title terminologycs.SEMusfiqur Rahman
Static Analysis Guidance for Secure LLM Code Generation
Shared title terminologycs.SEDaniele Lunghi, Alberick Euraste Djiré, Zacharie Chenail-Larcher et al.
How Specification Explicitness Shapes Failure in LLM-Generated Code
Shared title terminologycs.SEElmira Onagh, Maleknaz Nayebi
Beyond Benchmarks: Evaluating Large Language Models and Agentic Patterns for Static Code Analysis Warning Classification
Shared title terminologycs.SELakmal Deshapriya, Sherlock A. Licorish, Brendon J. Woodford et al.
Compilation Is Not Correctness: Scan-by-Scan Evaluation of LLM-Generated PLC Programs
Shared title terminologycs.SEJinyun Chen, Juntao Hu, Haochen Li et al.
VerusEval: Evaluating LLM-Generated Verus Specifications Beyond Verifier Acceptance
Shared title terminologycs.SEDing Wang, Chao Jiang, Dugang Liu et al.