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 条
[21]  
Paiva Thanis, 2017, Journal of Software Engineering Research and Development, V5, DOI 10.1186/s40411-017-0041-1
[22]   Developer-Driven Code Smell Prioritization [J].
Pecorelli, Fabiano ;
Palomba, Fabio ;
Khomh, Foutse ;
De Lucia, Andrea .
2020 IEEE/ACM 17TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2020, :220-231
[23]  
Pedregosa F, 2011, J MACH LEARN RES, V12, P2825
[24]   Learning decision tree classifiers [J].
Quinlan, JR .
ACM COMPUTING SURVEYS, 1996, 28 (01) :71-72
[25]   A review of code smell mining techniques [J].
Rasool, Ghulam ;
Arshad, Zeeshan .
JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2015, 27 (11) :867-895
[26]   A systematic review on the code smell effect [J].
Santos, Jose Amancio M. ;
Rocha-Junior, Joao B. ;
Lins Prates, Luciana Carla ;
do Nascimento, Rogeres Santos ;
Freitas, Mydia Falcao ;
de Mendonca, Manoel Gomes .
JOURNAL OF SYSTEMS AND SOFTWARE, 2018, 144 :450-477
[27]   Code smell detection by deep direct-learning and transfer-learning? [J].
Sharma, Tushar ;
Efstathiou, Vasiliki ;
Louridas, Panos ;
Spinellis, Diomidis .
JOURNAL OF SYSTEMS AND SOFTWARE, 2021, 176 (176)
[28]  
Sirikul K, 2016, INT JOINT CONF COMP, P268
[29]  
Vanschoren J., 2014, ACM SIGKDD Explorations Newsletter, V15, P49, DOI DOI 10.1145/2641190.2641198
[30]   To what extent can maintenance problems be predicted by code smell detection? - An empirical study [J].
Yamashita, Aiko ;
Moonen, Leon .
INFORMATION AND SOFTWARE TECHNOLOGY, 2013, 55 (12) :2223-2242