arrow
Return

Deep Learning Based Code Smell Detection

delete2021-01-01
delete79
PRE
AI
刘辉 cover
刘辉 (Hui Liu) *
J
Jiahao Jin
Z
Zhifeng Xu
Z
Zou, Yanzhen
B
Bu, Yifan
张
张璐 (Lu Zhang)
DOI:10.1109/TSE.2019.2936376delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code smells are structures in the source code that suggest the possibility of refactorings. Consequently, developers may identify refactoring opportunities by detecting code smells. However, manual identification of code smells is challenging and tedious. To this end, a number of approaches have been proposed to identify code smells automatically or semi-automatically. Most of such approaches rely on manually designed heuristics to map manually selected source code metrics into predictions. However, it is challenging to manually select the best features. It is also difficult to manually construct the optimal heuristics. To this end, in this paper we propose a deep learning based novel approach to detecting code smells. The key insight is that deep neural networks and advanced deep learning techniques could automatically select features of source code for code smell detection, and could automatically build the complex mapping between such features and predictions. A big challenge for deep learning based smell detection is that deep learning often requires a large number of labeled training data (to tune a large number of parameters within the employed deep neural network) whereas existing datasets for code smell detection are rather small. To this end, we propose an automatic approach to generating labeled training data for the neural network based classifier, which does not require any human intervention. As an initial try, we apply the proposed approach to four common and well-known code smells, i.e., feature envy, long method, large class, and misplaced class. Evaluation results on open-source applications suggest that the proposed approach significantly improves the state-of-the-art.
Keywords:
Software
Deep learning
Feature extraction
Training data
Neural networks
Measurement
Software refactoring
code smells
identification
deep learning
quality
DeleSmell: Code smell detection based on deep learning and latent semantic analysis
err2022-11-01
err14
PREAI
errZhang, Yang; Ge, Chuyan; Hong, Shuai; Tian, Ruili; Dong, Chunhao; Liu, Jingjing
errShare
errSave
A survey on code smells detection using machine learning techniques
err2026-06-01
err0
errOAAI
errMesbah, Djamel; El Madhoun, Nour; Al Agha, Khaldoun; Zouaoui, Anis
errShare
errSave
errShare
errSave
Code smell detection by deep direct-learning and transfer-learning?
err2021-06-01
err51
errOAAI
errSharma, Tushar; Efstathiou, Vasiliki; Louridas, Panos; Spinellis, Diomidis
errShare
errSave
DeepCSS: severity classification for code smell based on deep learning
err2025-05-01
err0
PREAI
errZhang, Yang; Zhang, Chunhui; Zheng, Kun; Meredith, Grant
errShare
errSave
A Novel Approach for Code Smell Detection: An Empirical Study
err2021-01-01
err22
errOAAI
errDewangan, Seema; Rao, Rajwant Singh; Mishra, Alok; Gupta, Manjari
errShare
errSave

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
3.0K
Citations:
1.3W

Organization

Peking University cover
Peking University
Scholars:
9.2K
Papers: 2.8K
Citations: 7.1W
Beijing Institute of Technology cover
Beijing Institute of Technology
Scholars:
7.8K
Papers: 2.3K
Citations: 3.6W
Cited Papers

Cited Papers

Recombination between an expressed immunoglobulin heavy-chain gene and a germline variable gene segment in a Ly 1+ B-cell lymphoma
err1986-08-01
err0
PREAI
errRobert Kleinfield; Richard R. Hardy; David Tarlinton; Jeffery Dangl; Leonard A. Herzenberg; Martin Weigert
errShare
errSave
Comparing and experimenting machine learning techniques for code smell detection
err2015-06-06
err277
PREAI
errFontana, Francesca Arcelli; Mantyla, Mika V.; Zanoni, Marco; Marino, Alessandro
errShare
errSave
errShare
errSave
JMove: A novel heuristic and tool to detect move method refactoring opportunities
err2018-04-01
err47
PREAI
errTerra, Ricardo; Valente, Marco Tulio; Miranda, Sergio; Sales, Vitor
errShare
errSave
Fragmentation of the universe
err1983-08-01
err0
PREAI
errW. K. Brown; R. R. Karpp; D. E. Grady
errShare
errSave
Identification of Move Method Refactoring Opportunities
err2009-05-01
err274
PREAI
errTsantalis, Nikolaos; Chatzigeorgiou, Alexander
errShare
errSave
researcher View more