Prompt Learning for Multi-Label Code Smell Detection: A Promising Approach
Not on the map. Why?
Abstract (arXiv)
Code smells indicate the potential problems of software quality so that developers can identify refactoring opportunities by detecting code smells. State-of-the-art approaches leverage heuristics, machine learning, and deep learning to detect code smells. However, existing approaches have not fully explored the potential of large language models (LLMs). In this paper, we propose textitPromptSmell, a novel approach based on prompt learning for detecting multi-label code smell. Firstly, code snippets are acquired by traversing abstract syntax trees. Combined code snippets with natural language prompts and mask tokens, textitPromptSmell constructs the input of LLMs. Secondly, to detect multi-label code smell, we leverage a label combination approach by converting a multi-label problem into a multi-classification problem. A customized answer space is added to the word list of pre-trained language models, and the probability distribution of intermediate answers is obtained by predicting the words at the mask positions. Finally, the intermediate answers are mapped to the target class labels by a verbalizer as the final classification result. We evaluate the effectiveness of textitPromptSmell by answering six research questions. The experimental results demonstrate that textitPromptSmell obtains an improvement of 11.17% in precisionw and 7.4% in F1w compared to existing approaches.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). First posted on arXiv 16 Feb 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 1.
3 papers.
- 2024CRScore: Grounding Automated Evaluation of Code Review Comments in Code Claims and Smellscited by 8
- 2024How Propense Are Large Language Models at Producing Code Smells? A Benchmarking Studycited by 6
- 2025Optimizing Token Consumption in LLMs: A Nano Surge Approach for Code Reasoning Efficiencycited by 2
- 2025Optimizing Token Consumption in LLMs: A Nano Surge Approach for Code Reasoning Efficiency22 Apr 2025
- 2024How Propense Are Large Language Models at Producing Code Smells? A Benchmarking Study25 Dec 2024
- 2024CRScore: Grounding Automated Evaluation of Code Review Comments in Code Claims and Smells29 Sep 2024