A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Code Smell Detection

Code smells are indicators of suboptimal design that negatively impact software quality. However, automated code smell detection remains a persistent challenge: heuristics-based tools suffer from high sensitivity to threshold selection and inherent subjectivity, while Machine Learning (ML) and Deep Learning (DL) models yield unsatisfactory performance. Although Large Language Models (LLMs) offer a promising solution to these limitations, their adaptation is impeded by the prohibitive cost of full fine-tuning and the lack of “LM-ready” benchmarks, as existing code smell datasets largely rely on software metrics or contain noisy, unverified labels. To address these gaps and enable a rigorous assessment of efficient LLM adaptation for code smell detection, we present a comprehensive study comprising two synergistic contributions. First, we constructed a high-quality, source-code-centric benchmark covering four non-trivial code smells— Complex Conditional , Complex Method , Feature Envy , and Data Class —and ensured its reliability through a meticulous two-stage manual review. Second, leveraging this benchmark, we systematically evaluated the effectiveness of four Parameter-Efficient Fine-Tuning (PEFT) methods (i.e., prompt tuning, prefix tuning, LoRA, and \((IA)^{3}\) ) across four Small LMs (SLMs) and five LLMs. We benchmarked these PEFT-tuned LMs against a broad suite of baselines, including traditional heuristics-based detectors ( DesigniteJava and PMD ), DL-based approaches ( DeepSmells and AE-Dense ), and cutting-edge general-purpose LLMs (GPT-4o-mini and DeepSeek-v3) with In-Context Learning. Our results demonstrate that PEFT methods match or exceed full fine-tuning performance while significantly reducing peak GPU memory usage, and outperform all baselines with MCC improvements ranging from 0.33% to 13.69%, particularly for some code smells. Furthermore, we provide actionable insights into the choice of PEFT method for code smell detection, which should be guided by the model used, data availability, and computational resources. Our replication package is available at [1] to support reproducibility and future extensions.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Software Engineering and Methodology
Published
2026-04-03
DOI
https://doi.org/10.1145/3806390
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Code Smell Detection

Xiyu Zhou, ZeHao Li, Xin Zhou, Beiqi Zhang et al.
ACM Transactions on Software Engineering and Methodology
Software Engineering Research
article

A Comprehensive Evaluation of Parameter-Efficient Fine-Tuning on Code Smell Detection

Xiyu Zhou, ZeHao Li, Xin Zhou, Beiqi Zhang, Lin Li, Peng Liang, David Lo
article en

Abstract

Code smells are indicators of suboptimal design that negatively impact software quality. However, automated code smell detection remains a persistent challenge: heuristics-based tools suffer from high sensitivity to threshold selection and inherent subjectivity, while Machine Learning (ML) and Deep Learning (DL) models yield unsatisfactory performance. Although Large Language Models (LLMs) offer a promising solution to these limitations, their adaptation is impeded by the prohibitive cost of full fine-tuning and the lack of “LM-ready” benchmarks, as existing code smell datasets largely rely on software metrics or contain noisy, unverified labels. To address these gaps and enable a rigorous assessment of efficient LLM adaptation for code smell detection, we present a comprehensive study comprising two synergistic contributions. First, we constructed a high-quality, source-code-centric benchmark covering four non-trivial code smells— Complex Conditional , Complex Method , Feature Envy , and Data Class —and ensured its reliability through a meticulous two-stage manual review. Second, leveraging this benchmark, we systematically evaluated the effectiveness of four Parameter-Efficient Fine-Tuning (PEFT) methods (i.e., prompt tuning, prefix tuning, LoRA, and \((IA)^{3}\) ) across four Small LMs (SLMs) and five LLMs. We benchmarked these PEFT-tuned LMs against a broad suite of baselines, including traditional heuristics-based detectors ( DesigniteJava and PMD ), DL-based approaches ( DeepSmells and AE-Dense ), and cutting-edge general-purpose LLMs (GPT-4o-mini and DeepSeek-v3) with In-Context Learning. Our results demonstrate that PEFT methods match or exceed full fine-tuning performance while significantly reducing peak GPU memory usage, and outperform all baselines with MCC improvements ranging from 0.33% to 13.69%, particularly for some code smells. Furthermore, we provide actionable insights into the choice of PEFT method for code smell detection, which should be guided by the model used, data availability, and computational resources. Our replication package is available at [1] to support reproducibility and future extensions.

ACM Transactions on Software Engineering and Methodology
Wuhan University of Technology (CN), Nanjing University of Science and Technology (CN), Wuhan University (CN), Central China Normal University (CN), Singapore Management University (SG)
Openalex Percentile: Top 19%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.