• Home
  • Search
  • MARS: Detecting brain class/method code smell based on metric–attention mechanism and residual network
  • Cite Icon29
  • https://doi.org/10.1002/smr.2403Copy DOI Icon

MARS: Detecting brain class/method code smell based on metric–attention mechanism and residual network

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Abstract Code smell is the structural design defect that makes programs difficult to understand, maintain, and evolve. Existing works of code smell detection mainly focus on prevalent code smells, such as feature envy, god class, and long method. Few works have been done on detecting brain class/method. Furthermore, existing deep‐learning‐based approaches leverage the CNN model to improve accuracy by barely increasing the number of layers, which may cause a problem of gradient degradation. To this end, this paper proposes a novel approach called MARS to detect brain class/method. MARS improves the gradient degradation by employing an improved residual network. It increases the weight value of those important code metrics to label smelly samples by introducing a metric–attention mechanism. To support the training of MARS, a dataset called BrainCode is generated by extracting more than 270,000 samples from 20 real‐world applications. MARS is evaluated on BrainCode and compared to other machine‐learning‐based and deep‐learning‐based approaches. The experimental results demonstrate that the average accuracy of MARS is 2.01 % higher than that of the existing approaches, which improves state‐of‐the‐art.

Similar Papers
  • Research Article

A Systematic Review on Code Smell Detection Approaches in Open Source Projects

  • Apr 21, 2026
  • Software: Practice and Experience
  • Sawsan Alodibat +1
  • Research Article

Optimizing LSTM for Code Smell Detection: The Role of Data Balancing

  • Jan 01, 2024
  • Infocommunications journal
  • Alnor Adam Khleel Nasraldeen +1
  • Research Article
  • Citations89

Bad Smell Detection Using Machine Learning Techniques: A Systematic Literature Review

  • Jan 07, 2020
  • Arabian Journal for Science and Engineering
  • Ahmed Al-Shaaby +2
  • Book Chapter
  • Citations42

Code Smells Detection Using Artificial Intelligence Techniques: A Business-Driven Systematic Review

  • Aug 16, 2021
  • Tomasz Lewowski +1
  • PDF
  • Research Article
  • Citations13

The problem of conceptualization in god class detection: agreement, strategies and decision drivers

  • Sep 18, 2014
  • Journal of Software Engineering Research and Development
  • José Amancio M Santos +3
  • Research Article
  • Citations19

Application of machine learning algorithms for code smell prediction using object-oriented software metrics

  • Jul 29, 2020
  • Journal of Statistics and Management Systems
  • Mansi Agnihotri +1
  • PDF
  • Research Article
  • Citations1

From code to insight: studying code representation techniques for ML-based God class detection to support intelligent IDEs

  • Jul 25, 2025
  • Automated Software Engineering
  • Elmohanad Haroon +2
  • Research Article
  • Citations9

On the effectiveness of developer features in code smell prioritization: A replication study

  • Jan 08, 2024
  • Journal of Systems and Software
  • Zijie Huang +5
  • Addendum
  • Citations8

WITHDRAWN: Prioritization of code smells in object-oriented software: A review

  • Jan 01, 2021
  • Materials Today: Proceedings
  • Amandeep Kaur +3
  • Research Article

Editorial for the special issue on software refactoring: Application breadth and technical depth

  • Sep 18, 2024
  • Journal of Software: Evolution and Process
  • Zhenchang Xing
  • Conference Article
  • Citations15

Predicting software change-proneness with code smells and class imbalance learning

  • Sep 01, 2016
  • Arvinder Kaur +2
  • Conference Article
  • Citations6

Applying Machine Learning to Customized Smell Detection

  • Oct 21, 2020
  • Daniel Oliveira +5
  • Conference Article
  • Citations8

Software Analytics in Practice

  • Jan 01, 2016
  • Behjat Soltanifar +5
  • Conference Article
  • Citations30

Deep semantic-Based Feature Envy Identification

  • Oct 28, 2019
  • Xueliang Guo +2
  • Conference Article
  • Citations251

Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems

  • Sep 01, 2010
  • Steffen M Olbrich +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.