Prompt Learning for Multi-Label Code Smell Detection: A Promising Approach
Haiyang Liu, Yang Zhang, Vidya Saikrishna, Quanquan Tian, Kun Zheng

TL;DR
This paper introduces PromptSmell, a prompt learning-based method utilizing large language models to detect multi-label code smells, showing significant improvements over existing approaches in precision and F1 scores.
Contribution
The paper presents a novel prompt learning approach for multi-label code smell detection, transforming the problem into multi-classification with a customized answer space for LLMs.
Findings
PromptSmell improves precision by 11.17%.
PromptSmell enhances F1 score by 7.4%.
Effective multi-label code smell detection using prompt learning.
Abstract
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 \textit{PromptSmell}, 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, \textit{PromptSmell} 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsRespiratory and Cough-Related Research · Spam and Phishing Detection
