Automatic Human-Like Detection of Code Smells

被引:3
作者
Soomlek, Chitsutha [1 ]
van Rijn, Jan N. [2 ]
Bonsangue, Marcello M. [2 ]
机构
[1] Khon Kaen Univ, Dept Comp Sci, Khon Kaen, Thailand
[2] Leiden Univ, Leiden Inst Adv Comp Sci, Leiden, Netherlands
来源
DISCOVERY SCIENCE (DS 2021) | 2021年 / 12986卷
关键词
Code smells; Machine learning; Software engineering;
D O I
10.1007/978-3-030-88942-5_2
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Many code smell detection techniques and tools have been proposed, mainly aiming to eliminate design flaws and improve software quality. Most of them are based on heuristics which rely on a set of software metrics and corresponding threshold values. Those techniques and tools suffer from subjectivity issues, discordant results among the tools, and the reliability of the thresholds. To mitigate these problems, we used machine learning to automate developers' perception in code smells detection. Different from other existing machine learning used in code smell detection we trained our models with an extensive dataset based on more than 3000 professional reviews on 518 open source projects. We conclude by an empirical evaluation of the performance of the machine learning approach against PMD, a widely used metric-based code smell detection tool for Java. The experimental results show that the machine learning approach outperforms the PMD classifier in all evaluations.
引用
收藏
页码:19 / 28
页数:10
相关论文
共 30 条
[11]   Code smell severity classification using machine learning techniques [J].
Fontana, Francesca Arcelli ;
Zanoni, Marco .
KNOWLEDGE-BASED SYSTEMS, 2017, 128 :43-58
[12]  
Fowler M., 2018, REFACTORING IMPROVIN
[13]  
FOWLER M, 1999, REFACTORING IMPROVIN
[14]  
Kamaraj N., 2019, INT J APPL ENG RES, V14, P1599
[15]   A Review on Machine-learning Based Code Smell Detection Techniques in Object-oriented Software System(s) [J].
Kaur, Amandeep ;
Jain, Sushma ;
Goel, Shivani ;
Dhiman, Gaurav .
RECENT ADVANCES IN ELECTRICAL & ELECTRONIC ENGINEERING, 2021, 14 (03) :290-303
[16]   Adaptive Detection of Design Flaws [J].
Kreimer, Jochen .
ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 141 (04) :117-136
[17]  
Lanza M., 2006, Object-Oriented Metrics in Practice: Using Software Metrics to Characterize Evaluate and Improve the Design of Object-Oriented Systems, DOI DOI 10.1007/3-540-39538-5
[18]   Deep Learning Based Code Smell Detection [J].
Liu, Hui ;
Jin, Jiahao ;
Xu, Zhifeng ;
Zou, Yanzhen ;
Bu, Yifan ;
Zhang, Lu .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (09) :1811-1837
[19]  
Madeyski Lech, 2020, EASE2020. Proceedings of the Evaluation and Assessment in Software Engineering, P342, DOI 10.1145/3383219.3383264
[20]  
Martin RC., 2008, Clean Code: A Handbook of Agile Software Craftsmanship, V1