Export Ready — 

Crowdsmelling: A preliminary study on using collective knowledge in code smells detection

Bibliographic Details
Main Author: Reis, J.
Publication Date: 2022
Other Authors: Brito e Abreu, F., Figueiredo Carneiro, G.
Format: Article
Language: eng
Source: Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)
Download full: http://hdl.handle.net/10071/25596
Summary: Code smells are seen as a major source of technical debt and, as such, should be detected and removed. However, researchers argue that the subjectiveness of the code smells detection process is a major hindrance to mitigating the problem of smells-infected code. This paper presents the results of a validation experiment for the Crowdsmelling approach proposed earlier. The latter is based on supervised machine learning techniques, where the wisdom of the crowd (of software developers) is used to collectively calibrate code smells detection algorithms, thereby lessening the subjectivity issue. In the context of three consecutive years of a Software Engineering course, a total ``crowd'' of around a hundred teams, with an average of three members each, classified the presence of 3 code smells (Long Method, God Class, and Feature Envy) in Java source code. These classifications were the basis of the oracles used for training six machine learning algorithms. Over one hundred models were generated and evaluated to determine which machine learning algorithms had the best performance in detecting each of the aforementioned code smells. Good performances were obtained for God Class detection (ROC=0.896 for Naive Bayes) and Long Method detection (ROC=0.870 for AdaBoostM1), but much lower for Feature Envy (ROC=0.570 for Random Forrest). The results suggest that Crowdsmelling is a feasible approach for the detection of code smells. Further validation experiments based on dynamic learning are required to comprehensive coverage of code smells to increase external validity.
id RCAP_c933096c4e36f45a059c311be38023b5
oai_identifier_str oai:repositorio.iscte-iul.pt:10071/25596
network_acronym_str RCAP
network_name_str Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)
repository_id_str https://opendoar.ac.uk/repository/7160
spelling Crowdsmelling: A preliminary study on using collective knowledge in code smells detectionCrowdsmellingCode smellsCode smells detectionSoftware qualitySoftware maintenanceCollective knowledgeMachine learning algorithmsCode smells are seen as a major source of technical debt and, as such, should be detected and removed. However, researchers argue that the subjectiveness of the code smells detection process is a major hindrance to mitigating the problem of smells-infected code. This paper presents the results of a validation experiment for the Crowdsmelling approach proposed earlier. The latter is based on supervised machine learning techniques, where the wisdom of the crowd (of software developers) is used to collectively calibrate code smells detection algorithms, thereby lessening the subjectivity issue. In the context of three consecutive years of a Software Engineering course, a total ``crowd'' of around a hundred teams, with an average of three members each, classified the presence of 3 code smells (Long Method, God Class, and Feature Envy) in Java source code. These classifications were the basis of the oracles used for training six machine learning algorithms. Over one hundred models were generated and evaluated to determine which machine learning algorithms had the best performance in detecting each of the aforementioned code smells. Good performances were obtained for God Class detection (ROC=0.896 for Naive Bayes) and Long Method detection (ROC=0.870 for AdaBoostM1), but much lower for Feature Envy (ROC=0.570 for Random Forrest). The results suggest that Crowdsmelling is a feasible approach for the detection of code smells. Further validation experiments based on dynamic learning are required to comprehensive coverage of code smells to increase external validity.Springer2023-03-17T00:00:00Z2022-01-01T00:00:00Z20222022-06-03T15:20:54Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/articleapplication/pdfhttp://hdl.handle.net/10071/25596eng1382-325610.1007/s10664-021-10110-5Reis, J.Brito e Abreu, F.Figueiredo Carneiro, G.info:eu-repo/semantics/openAccessreponame:Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)instname:FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologiainstacron:RCAAP2024-07-07T03:10:59Zoai:repositorio.iscte-iul.pt:10071/25596Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireinfo@rcaap.ptopendoar:https://opendoar.ac.uk/repository/71602025-05-28T18:17:45.038145Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) - FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologiafalse
dc.title.none.fl_str_mv Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
title Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
spellingShingle Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
Reis, J.
Crowdsmelling
Code smells
Code smells detection
Software quality
Software maintenance
Collective knowledge
Machine learning algorithms
title_short Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
title_full Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
title_fullStr Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
title_full_unstemmed Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
title_sort Crowdsmelling: A preliminary study on using collective knowledge in code smells detection
author Reis, J.
author_facet Reis, J.
Brito e Abreu, F.
Figueiredo Carneiro, G.
author_role author
author2 Brito e Abreu, F.
Figueiredo Carneiro, G.
author2_role author
author
dc.contributor.author.fl_str_mv Reis, J.
Brito e Abreu, F.
Figueiredo Carneiro, G.
dc.subject.por.fl_str_mv Crowdsmelling
Code smells
Code smells detection
Software quality
Software maintenance
Collective knowledge
Machine learning algorithms
topic Crowdsmelling
Code smells
Code smells detection
Software quality
Software maintenance
Collective knowledge
Machine learning algorithms
description Code smells are seen as a major source of technical debt and, as such, should be detected and removed. However, researchers argue that the subjectiveness of the code smells detection process is a major hindrance to mitigating the problem of smells-infected code. This paper presents the results of a validation experiment for the Crowdsmelling approach proposed earlier. The latter is based on supervised machine learning techniques, where the wisdom of the crowd (of software developers) is used to collectively calibrate code smells detection algorithms, thereby lessening the subjectivity issue. In the context of three consecutive years of a Software Engineering course, a total ``crowd'' of around a hundred teams, with an average of three members each, classified the presence of 3 code smells (Long Method, God Class, and Feature Envy) in Java source code. These classifications were the basis of the oracles used for training six machine learning algorithms. Over one hundred models were generated and evaluated to determine which machine learning algorithms had the best performance in detecting each of the aforementioned code smells. Good performances were obtained for God Class detection (ROC=0.896 for Naive Bayes) and Long Method detection (ROC=0.870 for AdaBoostM1), but much lower for Feature Envy (ROC=0.570 for Random Forrest). The results suggest that Crowdsmelling is a feasible approach for the detection of code smells. Further validation experiments based on dynamic learning are required to comprehensive coverage of code smells to increase external validity.
publishDate 2022
dc.date.none.fl_str_mv 2022-01-01T00:00:00Z
2022
2022-06-03T15:20:54Z
2023-03-17T00:00:00Z
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/article
format article
status_str publishedVersion
dc.identifier.uri.fl_str_mv http://hdl.handle.net/10071/25596
url http://hdl.handle.net/10071/25596
dc.language.iso.fl_str_mv eng
language eng
dc.relation.none.fl_str_mv 1382-3256
10.1007/s10664-021-10110-5
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv application/pdf
dc.publisher.none.fl_str_mv Springer
publisher.none.fl_str_mv Springer
dc.source.none.fl_str_mv reponame:Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)
instname:FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia
instacron:RCAAP
instname_str FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia
instacron_str RCAAP
institution RCAAP
reponame_str Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)
collection Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)
repository.name.fl_str_mv Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) - FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia
repository.mail.fl_str_mv info@rcaap.pt
_version_ 1833597311792447488