aiqbench analysis
This study provides a critical assessment of Large Language Models for code generation, revealing that current state-of-the-art models introduce significantly more "code smells" than human-written baselines across various complexity levels. The findings highlight specific weaknesses in handling advanced object-oriented concepts and suggest that while functional correctness is often achieved, code quality remains a substantial hurdle for widespread adoption without further refinement.
Investigating The Smells of LLM Generated Code
arXiv:2510.03029v2 Announce Type: replace-cross Abstract: Context: Large Language Models (LLMs) are increasingly being used to generate program code. Much research has been reported on the functional correctness of generated code, but there is far less on code quality. Objectives: In this study, we propose a scenario-based method of evaluating the quality of LLM-generated code to identify the weakest scenarios, for which the quality of LLM-generated code should be improved. Methods: The method measures code smells, an important indicator of code quality, and compares them with a baseline formed from reference solutions of professionally written code. The test dataset is divided into various subsets according to the topics of the code and complexity of the coding tasks to represent different scenarios of using LLMs for code generation. We will also present an automated test system for this purpose and report experiments with the Java programs generated in response to prompts given to four state-of-the-art LLMs: Gemini Pro, ChatGPT, Codex, and Falcon. Results: We find that LLM-generated code has a higher incidence of code smells compared to reference solutions. Falcon performed the least badly, with a smell increase of 42.28%, followed by Gemini Pro (62.07%), ChatGPT (65.05%) and finally Codex (84.97%). The average smell increase across all LLMs was 63.34%, comprising 73.35% for implementation smells and 21.42% for design smells. We also found that the increase in code smells is greater for more complex coding tasks and for more advanced topics, such as those involving object-orientated concepts. Conclusion: In terms of code smells, LLMs' performances on various coding task complexities and topics are highly correlated to the quality of human-written code in the corresponding scenarios. However, the quality of LLM-generated code is noticeably poorer than human-written code.
Abstract:Context: Large Language Models (LLMs) are increasingly being used to generate program code. Much research has been reported on the functional correctness of generated code, but there is far less on code quality. Objectives: In this study, we propose a scenario-based method of evaluating the quality of LLM-generated code to identify the weakest scenarios, for which the quality of LLM-generated code should be improved. Methods: The method measures code smells, an important indicator of code quality, and compares them with a baseline formed from reference solutions of professionally written code. The test dataset is divided into various subsets according to the topics of the code and complexity of the coding tasks to represent different scenarios of using LLMs for code generation. We will also present an automated test system for this purpose and report experiments with the Java programs generated in response to prompts given to four state-of-the-art LLMs: Gemini Pro, ChatGPT, Codex, and Falcon. Results: We find that LLM-generated code has a higher incidence of code smells compared to reference solutions. Falcon performed the least badly, with a smell increase of 42.28%, followed by Gemini Pro (62.07%), ChatGPT (65.05%) and finally Codex (84.97%). The average smell increase across all LLMs was 63.34%, comprising 73.35% for implementation smells and 21.42% for design smells. We also found that the increase in code smells is greater for more complex coding tasks and for more advanced topics, such as those involving object-orientated concepts. Conclusion: In terms of code smells, LLMs' performances on various coding task complexities and topics are highly correlated to the quality of human-written code in the corresponding scenarios. However, the quality of LLM-generated code is noticeably poorer than human-written code.
This is a revised version of the paper done in June 2026. It improves the presentation of the work and the statistical analysis of the data. The raw data of the experiments are the same as the previous version
Software Engineering (cs.SE); Artificial Intelligence (cs.AI)
arXiv:2510.03029 [cs.SE]
(or arXiv:2510.03029v2 [cs.SE] for this version)
Full text under the publisher's open licence · 333 words
Related coverage

CodeHealth as a Prerequisite and Compass for Coding Agents
CodeScene · Jun 25, 2026

Presentation: Building Reusable Evaluation Frameworks for Agentic AI Products
InfoQ · Oct 5, 2026

Building an Enterprise AI Customer Support Platform with Claude Fable 5.1 and Claude Code
Analytics Vidhya · Oct 5, 2026
Building and evaluating model diffing agents
AI Alignment Forum · Jun 12, 2026