Skip to main navigation Skip to search Skip to main content

Specification and Detection of LLM Code Smells

  • Brahim Mahmoudi
  • , Zacharie Chenail-Larcher
  • , Naouel Moha
  • , Quentin Stiévenart
  • , Florent Avellaneda
  • École de technologie supérieure
  • Université du Québec à Montréal

Research output: Contribution to Book/Report typesContribution to conference proceedingspeer-review

Abstract

Large Language Models (LLMs) have gained massive popularity in recent years and are increasingly integrated into software systems for diverse purposes. However, poorly integrating them in source code may undermine software system quality. Yet, to our knowledge, there is no formal catalog of code smells specific to coding practices for LLM inference. In this paper, we introduce the concept of LLM code smells and formalize five recurrent problematic coding practices related to LLM inference in software systems, based on relevant literature. We extend the detection tool SpecDetect4AI to cover the newly defined LLM code smells and use it to validate their prevalence in a dataset of 200 open-source LLM systems. Our results show that LLM code smells affect 60.50% of the analyzed systems, with a detection precision of 86.06%.

Original languageEnglish
Title of host publicationProceedings - 2026 IEEE/ACM 48th International Conference on Software Engineering
Subtitle of host publicationNew Ideas and Emerging Results, ICSE-NIER 2026
PublisherAssociation for Computing Machinery, Inc
Pages181-185
Number of pages5
ISBN (Electronic)9798400724251
DOIs
Publication statusPublished - 8 Jul 2026
Event48th International Conference on Software Engineering: New Ideas and Emerging Results, ICSE-NIER 2026 - Rio de Janeiro, Brazil
Duration: 12 Apr 202618 Apr 2026

Publication series

NameProceedings - 2026 IEEE/ACM 48th International Conference on Software Engineering: New Ideas and Emerging Results, ICSE-NIER 2026

Conference

Conference48th International Conference on Software Engineering: New Ideas and Emerging Results, ICSE-NIER 2026
Country/TerritoryBrazil
CityRio de Janeiro
Period12/04/2618/04/26

!!!Keywords

  • Code Smells
  • Large Language Models
  • LLM Integration
  • LLMs

Fingerprint

Dive into the research topics of 'Specification and Detection of LLM Code Smells'. These topics are generated from the title and abstract of the publication. Together, they form a unique fingerprint.

Cite this