On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment
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 sm...
Main Authors: | , , , , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
IEEE
2023-01-01
|
Series: | IEEE Access |
Subjects: | |
Online Access: | https://ieeexplore.ieee.org/document/10209161/ |
_version_ | 1797243539510263808 |
---|---|
author | Danyllo Albuquerque Everton Guimaraes Mirko Perkusich Thiago Rique Felipe Cunha Hyggo Almeida Angelo Perkusich |
author_facet | Danyllo Albuquerque Everton Guimaraes Mirko Perkusich Thiago Rique Felipe Cunha Hyggo Almeida Angelo Perkusich |
author_sort | Danyllo Albuquerque |
collection | DOAJ |
description | 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. |
first_indexed | 2024-04-24T18:56:43Z |
format | Article |
id | doaj.art-d83170bb79a3412aa2cfbb01683ac0e9 |
institution | Directory Open Access Journal |
issn | 2169-3536 |
language | English |
last_indexed | 2024-04-24T18:56:43Z |
publishDate | 2023-01-01 |
publisher | IEEE |
record_format | Article |
series | IEEE Access |
spelling | doaj.art-d83170bb79a3412aa2cfbb01683ac0e92024-03-26T17:34:35ZengIEEEIEEE Access2169-35362023-01-0111845898460610.1109/ACCESS.2023.330226010209161On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled ExperimentDanyllo Albuquerque0https://orcid.org/0000-0001-5515-7812Everton Guimaraes1https://orcid.org/0000-0002-6740-6561Mirko Perkusich2https://orcid.org/0000-0002-9433-4962Thiago Rique3Felipe Cunha4Hyggo Almeida5https://orcid.org/0000-0002-2808-8169Angelo Perkusich6Federal Institute of Paraíba, Campina Grande, Paraiba, BrazilEngineering Division, The Pennsylvania State University, Malvern, PA, USAResearch, Development, and Innovation Centre (VIRTUS), Federal University of Campina Grande (UFCG), Campina Grande, Paraíba, BrazilResearch, Development, and Innovation Centre (VIRTUS), Federal University of Campina Grande (UFCG), Campina Grande, Paraíba, BrazilResearch, Development, and Innovation Centre (VIRTUS), Federal University of Campina Grande (UFCG), Campina Grande, Paraíba, BrazilResearch, Development, and Innovation Centre (VIRTUS), Federal University of Campina Grande (UFCG), Campina Grande, Paraíba, BrazilResearch, Development, and Innovation Centre (VIRTUS), Federal University of Campina Grande (UFCG), Campina Grande, Paraíba, BrazilCode 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.https://ieeexplore.ieee.org/document/10209161/Code smellinteractive detectionrefactoringcontrolled experimentempirical evaluation |
spellingShingle | Danyllo Albuquerque Everton Guimaraes Mirko Perkusich Thiago Rique Felipe Cunha Hyggo Almeida Angelo Perkusich On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment IEEE Access Code smell interactive detection refactoring controlled experiment empirical evaluation |
title | On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment |
title_full | On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment |
title_fullStr | On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment |
title_full_unstemmed | On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment |
title_short | On the Assessment of Interactive Detection of Code Smells in Practice: A Controlled Experiment |
title_sort | on the assessment of interactive detection of code smells in practice a controlled experiment |
topic | Code smell interactive detection refactoring controlled experiment empirical evaluation |
url | https://ieeexplore.ieee.org/document/10209161/ |
work_keys_str_mv | AT danylloalbuquerque ontheassessmentofinteractivedetectionofcodesmellsinpracticeacontrolledexperiment AT evertonguimaraes ontheassessmentofinteractivedetectionofcodesmellsinpracticeacontrolledexperiment AT mirkoperkusich ontheassessmentofinteractivedetectionofcodesmellsinpracticeacontrolledexperiment AT thiagorique ontheassessmentofinteractivedetectionofcodesmellsinpracticeacontrolledexperiment AT felipecunha ontheassessmentofinteractivedetectionofcodesmellsinpracticeacontrolledexperiment AT hyggoalmeida ontheassessmentofinteractivedetectionofcodesmellsinpracticeacontrolledexperiment AT angeloperkusich ontheassessmentofinteractivedetectionofcodesmellsinpracticeacontrolledexperiment |