LLM Code Smells: A Taxonomy and Detection Approach

Zacharie Chenail-Larcher, Brahim Mahmoudi, Naouel Moha, Quentin Stiévenart, Florent Avellaneda
5/21/2026
cs.SEcs.AI

No confident code implementation found for this paper.

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.

Show full abstract

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%.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chenaillarcher2026code,
  title  = {LLM Code Smells: A Taxonomy and Detection Approach},
  author = {Zacharie Chenail-Larcher and Brahim Mahmoudi and Naouel Moha and Quentin Stiévenart and Florent Avellaneda},
  year   = {2026},
  eprint = {2605.22976},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.22976v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.22976.svg)](https://codeofpaper.com/paper/2605.22976)

Discussion