On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment

被引:0
作者
Albuquerque, Danyllo [1 ,3 ]
Guimaraes, Everton [2 ]
Perkusich, Mirko [3 ]
Rique, Thiago [3 ]
Cunha, Felipe [3 ]
Almeida, Hyggo [3 ]
Perkusich, Angelo [3 ]
机构
[1] Fed Inst Paraiba, BR-58432300 Campina Grande, Paraiba, Brazil
[2] Penn State Univ, Engn Div, Malvern, PA 19355 USA
[3] Fed Univ Campina Grande UFCG, Res Dev & Innovat Ctr VIRTUS, BR-58429900 Campina Grande, Paraiba, Brazil
关键词
Code smell; interactive detection; refactoring; controlled experiment; empirical evaluation; SOFTWARE; CONTEXT; IMPACT; TOOLS;
D O I
10.1109/ACCESS.2023.3302260
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Code smells are structures in a program that often indicate the presence of deeper maintainability problems. Code smells should be detected as soon as they are introduced, enabling refactoring actions with less effort and time. Non-Interactive Detection (NID) techniques traditionally support code smells detection, enabling developers to reveal smells in later software program versions. NID techniques do not support developers' progressive interaction with smelly code, revealing smells in the entire source code upon an explicit developer request, which might lead to the accumulation of code smells and, consequently, the degradation of software quality. Interactive Detection (ID) has emerged as a solution to overcome NID's limitations. By revealing code smell as soon as they are introduced, developers can detect smell instances earlier, resulting in more effective refactoring actions and improved code quality. However, despite its promising potential, there is a lack of evidence regarding the ID impact on code smell detection and refactoring actions during coding analysis. Our research focused on evaluating the effectiveness of an ID technique in code smell detection. Besides, we analyzed the aid of an ID technique in performing effective refactoring actions during coding analysis. To this end, we conducted a controlled experiment with 16 subjects that underwent tasks related to detecting code smells and judging refactoring actions. The experimental tasks revealed that using the ID technique led to an increase of 60% in recall and up to 13% in precision when detecting code smells. Additionally, developers have effectively identified about 55% more code smells instances using the ID technique. Our study results revealed that using ID can improve the effectiveness of code smells detection, as developers can identify opportunities for refactoring actions earlier when compared to NID.
引用
收藏
页码:84589 / 84606
页数:18
相关论文
共 49 条
[21]   Python']Python code smells detection using conventional machine learning models [J].
Sandouka, Rana ;
Aljamaan, Hamoud .
PEERJ COMPUTER SCIENCE, 2023, 9
[22]   Automated Detection of Code Smells Caused by Null Checking Conditions in Java']Java Programs [J].
Sirikul, Kriangchai ;
Soomlek, Chitsutha .
2016 13TH INTERNATIONAL JOINT CONFERENCE ON COMPUTER SCIENCE AND SOFTWARE ENGINEERING (JCSSE), 2016, :268-274
[23]   Fusion of deep convolutional and LSTM recurrent neural networks for automated detection of code smells [J].
Ho, Anh ;
Bui, Anh M. T. ;
Nguyen, Phuong T. ;
Di Salle, Amleto .
27TH INTERNATIONAL CONFERENCE ON EVALUATION AND ASSESSMENT IN SOFTWARE ENGINEERING, EASE 2023, 2023, :229-234
[24]   An Evaluation of Multi-Label Classification Approaches for Method-Level Code Smells Detection [J].
Yadav, Pravin Singh ;
Rao, Rajwant Singh ;
Mishra, Alok .
IEEE ACCESS, 2024, 12 :53664-53676
[25]   A controlled experiment on inheritance depth as a cost factor for code maintenance [J].
Prechelt, L ;
Unger, B ;
Philippsen, M ;
Tichy, W .
JOURNAL OF SYSTEMS AND SOFTWARE, 2003, 65 (02) :115-126
[26]   Automatic detection of code smells using metrics and CodeT5 embeddings: a case study in C# [J].
Kovacevic, Aleksandar ;
Luburic, Nikola ;
Slivka, Jelena ;
Prokic, Simona ;
Grujic, Katarina-Glorija ;
Vidakovic, Dragan ;
Sladic, Goran .
NEURAL COMPUTING & APPLICATIONS, 2024, 36 (16) :9203-9220
[27]   Automatic detection of code smells using metrics and CodeT5 embeddings: a case study in C# [J].
Aleksandar Kovačević ;
Nikola Luburić ;
Jelena Slivka ;
Simona Prokić ;
Katarina-Glorija Grujić ;
Dragan Vidaković ;
Goran Sladić .
Neural Computing and Applications, 2024, 36 :9203-9220
[28]   How programmers read regular code: a controlled experiment using eye tracking [J].
Ahmad Jbara ;
Dror G. Feitelson .
Empirical Software Engineering, 2017, 22 :1440-1477
[29]   Impact of test-driven development on productivity, code and tests: A controlled experiment [J].
Pancur, Matjaz ;
Ciglaric, Mojca .
INFORMATION AND SOFTWARE TECHNOLOGY, 2011, 53 (06) :557-573
[30]   A controlled experiment of different code representations for learning-based program repair [J].
Marjane Namavar ;
Noor Nashid ;
Ali Mesbah .
Empirical Software Engineering, 2022, 27