arrow
Return

SmellyCode++: Multi-Label Dataset for Code Smell Detection

delete2025-07-12
delete0
delete
OA
AI
N
Nawaf Alomari *
A
Amal Alazba
H
Hamoud Aljamaan
M
Mohammad Alshayeb
DOI:10.1038/s41597-025-05465-zdelete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Context: Code smells indicate poor software design, affecting maintainability. Accurate detection is vital for refactoring and quality improvement. However, existing datasets often frame detection as single-label classification, limiting realism. Objective: This paper develops a multi-label dataset for code smell detection, integrating textual features and numerical metrics from open-source Java projects. Method: We collected code from 103 Java projects, parsed it into Abstract Syntax Trees (ASTs), extracted features, and annotated samples based on prior studies. Data cleaning, unification, and merging techniques were applied to support four code smells: God Class, Data Class, Feature Envy, and Long Method. Results: The dataset comprises 107,554 samples with multi-label annotations, improving detection realism. Evaluation shows F1 scores of 95.89% (Data Class), 94.48% (God Class), 88.68% (Feature Envy), and 88.87% (Long Method). Conclusion: This dataset aids advanced studies on code smell detection, particularly for fine-tuning LLMs. Future work can expand it to other languages and additional smells, enhancing diversity and applicability.
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

Scientific Data cover
Scientific Data
IF:
6.9
Papers:
3.6K
Citations:
3.8W

Organization

I
Information and Computer Science Department
Scholars:
34
Papers: 15
Citations: 0
D
Department of Information Systems
Scholars:
78
Papers: 59
Citations: 0