arXiv cs.AI· Zacharie Chenail-Larcher, Brahim Mahmoudi, Naouel Moha, Quentin Sti\'evenart, Florent Avellaneda·· 13 小时前AI 评分38
LLM Code Smells:九类 LLM 代码坏味分类体系与检测工具 SpecDetect4LLM
LLM Code Smells: A Taxonomy and Detection Approach
AI 导读
研究者提出 LLM 代码坏味分类体系,收录九类 LLM 代码坏味,并开发静态源码分析工具 SpecDetect4LLM 用于检测。在 692 个开源项目、171,194 个源文件上的评估显示,73.5% 的系统存在 LLM 代码坏味,检测精确率 91.3%、召回率 71.8%。
正文 · 原文
Abstract:Large Language Models (LLMs) are increasingly integrated into software systems for diverse purposes, due to their versatility, flexibility, and ability to simulate human reasoning to some extent. However, poor integration of LLM inference in source code can undermine software system quality. Therefore, inadequate LLM integration coding practices must be documented to help developers mitigate such issues. Following our earlier work on LLM code smells, this paper consolidates and refines the concept by presenting a self-contained taxonomy and a catalog of nine LLM code smells. We also create SpecDetect4LLM, a static source code analysis tool for their detection, and conduct extensive empirical evaluations of its detection effectiveness (precision and recall) as well as the prevalence of LLM code smells across 692 open-source software projects (171,194 source files). Our results show that LLM code smells affect 73.5% of the analyzed systems, with a detection precision of 91.3% and a recall of 71.8%.
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI) |
| Cite as: | arXiv:2605.22976 [cs.SE] |
| (or arXiv:2605.22976v2 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2605.22976 arXiv-issued DOI via DataCite |
Submission history
From: Brahim Mahmoudi [view email]
[v1]
Thu, 21 May 2026 19:10:08 UTC (605 KB)
[v2]
Mon, 26 Oct 2026 20:34:23 UTC (535 KB)
来源:arXiv cs.AI · arxiv.org