An Optimized Hybrid Approach for Code Smell Detection Using Machine Learning and Attention-Based FNN

Authors

  • Taniz Fatema Jahangirnagar University
  • Nazneen Akhter Jahangirnagar University
  • Md Musfique Anwar Jahangirnagar University

Abstract

Code smells are structural flaws in the source code that have a detrimental effect on readability, maintainability, and dependability. To adress this challenges we proposed a hybrid model using ML classifiers with attention-based Feedforward Neural Network. In this work, we applied five ML classifiers (SVM, KNN, LR, DT, RF), two feature selection techniques are RFECV and Information gain on different datasets namely DC, FE, GC, LM. To enhance the performance and reduce the overfitting-underfitting issues we applied two optimization techniques are Bayesian Optimization and Grid Search while applying Information Gain feature selection technique. For deeply analyzing trained the model with attention-based Feed Forward Neural Network. Experimnetal outcome shown that our proposed model obtained the highest accuracy on Long method dataset, 99.69% by using SVM, RF classifiers and Information gain with Bayesian optimization technique. Also achieved the accuracy, 99.68% for RF, DT, LR classifiers with RFECV feature selection technique on same dataset.

Downloads

Published

2026-08-25

How to Cite

Taniz Fatema, Nazneen Akhter, & Anwar, M. M. (2026). An Optimized Hybrid Approach for Code Smell Detection Using Machine Learning and Attention-Based FNN. Jahangirnagar University Journal of Electronics and Computer Science, 17. Retrieved from https://ecs.ju-journal.org/jujecs/article/view/72