Reproduce “Prompt Learning for Multi-Label Code Smell Detection: A Promising Approach” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Haiyang Liu, Yang Zhang, Vidya Saikrishna, Quanquan Tian, Kun Zheng

PromptSmell, developed by researchers at Hebei University of Science and Technology, introduces prompt learning for multi-label code smell detection, achieving 93.08% accuracy and outperforming traditional fine-tuning approaches by 7.4% in weighted F1-score. This method leverages pre-trained language models like UniXcoder by processing raw code snippets and without relying on subjective code metrics, also demonstrating strong performance in data-scarce environments.

Key insights

  • Prompt learning effectively leverages the inherent knowledge of pre-trained language models (PLMs), often outperforming traditional fine-tuning for code smell detection.
  • The design of the verbalizer (answer space) has a more profound impact on PromptSmell's performance than the specific prompt template structure.
  • Specialized PLMs, such as UniXcoder, which are pre-trained on both natural and programming languages, are significantly more effective for code-related tasks than general-purpose PLMs like BERT.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.