Code smells are symptoms of poor software design that hinder maintainability and increase technical debt interest. Automated detection of code smells is crucial in software development industry, where manual inspection is costly and error-prone. Although several studies have explored code smell detection, most existing approaches, both structural/metric-based and textual/transformer-based, still exhibit limitations in capturing the semantic context of source code to handle complex smells effectively. This study investigates the application of UniXcoder, a pre-trained transformer model for source code, to classify Java source code methods across multiple projects as smell or clean, with a particular focus on the Switch Statements smell. The proposed method fine-tunes UniXcoder and evaluates its performance using standard metrics, namely accuracy, precision, recall, and F1-score, in comparison with traditional machine learning models based on structural metrics and textual representations. Experimental results show that the fine-tuned UniXcoder achieves the highest classification accuracy of 80.2%, the highest precision among all baseline methods evaluated, indicating its effectiveness in minimizing false positives. These findings confirm that pre-trained transformer models, particularly UniXcoder, are capable of understanding both the semantic and syntactic structures of code and demonstrate stronger performance than frequency-based textual representation approaches as well as software metrics-based approaches. Furthermore, the results highlight UniXcoder’s potential for integration into industrial software engineering workflows, supporting automated code smell detection as part of continuous code quality assurance.
Hanson Prihantoro Putro, Umi Laili Yuhana, E. M. Yuniarno et al.· IEEE Access· 0 citations
This study compares the performance between traditional feature-based classification methods and transformer architectures in mapping stress, anxiety, and depression conditions in Indonesian-language mental health discourse. The task is formulated as a multi-class classification problem, where each consultation is assigned a single dominant mental health category. By implementing an integrated experimental framework on an online consultation dataset, we tested Gradient Boosting as the baseline model against two specific transformer models, namely IndoBERT and IndoRoBERTa. Experimental findings indicate that transformer-based models consistently outperform traditional approaches, with IndoRoBERTa achieving the highest accuracy of 82%. These results affirm the capability of contextual language representation in capturing complex semantic and linguistic nuances in mental health texts. Nevertheless, this study notes ongoing challenges in differentiating categories with strong semantic overlap, particularly between stress and anxiety symptoms.
Evi Dwi Wahyuni, Wiwik Anggraeni, Reza Fuad Rachmadi et al.· International Seminar on Int...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.