Code Smell Detection Using Whale Optimization Algorithm
Software systems have been employed in many fields as a means to reduce human efforts; consequently, stakeholders are interested in more updates of their capabilities. Code smells arise as one of the obstacles in the software industry. They are characteristics of software source code that indicate a...
Gespeichert in:
Veröffentlicht in: | Computers, materials & continua materials & continua, 2021-01, Vol.68 (2), p.1919-1935 |
---|---|
Hauptverfasser: | , , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
container_end_page | 1935 |
---|---|
container_issue | 2 |
container_start_page | 1919 |
container_title | Computers, materials & continua |
container_volume | 68 |
creator | Draz, Moatasem M Farhan, Marwa S Abdulkader, Sarah N Gafar, M G |
description | Software systems have been employed in many fields as a means to reduce human efforts; consequently, stakeholders are interested in more updates of their capabilities. Code smells arise as one of the obstacles in the software industry. They are characteristics of software source code that indicate a deeper problem in design. These smells appear not only in the design but also in software implementation. Code smells introduce bugs, affect software maintainability, and lead to higher maintenance costs. Uncovering code smells can be formulated as an optimization problem of finding the best detection rules. Although researchers have recommended different techniques to improve the accuracy of code smell detection, these methods are still unstable and need to be improved. Previous research has sought only to discover a few at a time (three or five types) and did not set rules for detecting their types. Our research improves code smell detection by applying a search-based technique; we use the Whale Optimization Algorithm as a classifier to find ideal detection rules. Applying this algorithm, the Fisher criterion is utilized as a fitness function to maximize the between-class distance over the within-class variance. The proposed framework adopts if-then detection rules during the software development life cycle. Those rules identify the types for both medium and large projects. Experiments are conducted on five open-source software projects to discover nine smell types that mostly appear in codes. The proposed detection framework has an average of 94.24% precision and 93.4% recall. These accurate values are better than other search-based algorithms of the same field. The proposed framework improves code smell detection, which increases software quality while minimizing maintenance effort, time, and cost. Additionally, the resulting classification rules are analyzed to find the software metrics that differentiate the nine code smells. |
doi_str_mv | 10.32604/cmc.2021.015586 |
format | Article |
fullrecord | <record><control><sourceid>proquest_cross</sourceid><recordid>TN_cdi_proquest_journals_2520252041</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2520252041</sourcerecordid><originalsourceid>FETCH-LOGICAL-c313t-1ca8600775656aeb2a4de8ed79b65abbe727536751d391e8608dccbdbb00f0a93</originalsourceid><addsrcrecordid>eNpNkD1PwzAQhi0EEqWwM0ZiTjjbsZ2MVfiUKnWAitGynUubKl_Y6QC_ntAwMJzupPfRne4h5JZCwpmE9N61LmHAaAJUiEyekQUVqYwZY_L833xJrkI4AHDJc1gQVfQlRm8tNk30gCO6se67aBvqbhd97E2D0WYY67b-Nqdg1ex6X4_79ppcVKYJePPXl2T79PhevMTrzfNrsVrHjlM-xtSZTAIoJaSQBi0zaYkZliq3UhhrUTEluFSCljynOLFZ6ZwtrQWowOR8Se7mvYPvP48YRn3oj76bTmompnenSulEwUw534fgsdKDr1vjvzQFfdKjJz36V4-e9fAfE05XcQ</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>2520252041</pqid></control><display><type>article</type><title>Code Smell Detection Using Whale Optimization Algorithm</title><source>EZB-FREE-00999 freely available EZB journals</source><creator>Draz, Moatasem M ; Farhan, Marwa S ; Abdulkader, Sarah N ; Gafar, M G</creator><creatorcontrib>Draz, Moatasem M ; Farhan, Marwa S ; Abdulkader, Sarah N ; Gafar, M G</creatorcontrib><description>Software systems have been employed in many fields as a means to reduce human efforts; consequently, stakeholders are interested in more updates of their capabilities. Code smells arise as one of the obstacles in the software industry. They are characteristics of software source code that indicate a deeper problem in design. These smells appear not only in the design but also in software implementation. Code smells introduce bugs, affect software maintainability, and lead to higher maintenance costs. Uncovering code smells can be formulated as an optimization problem of finding the best detection rules. Although researchers have recommended different techniques to improve the accuracy of code smell detection, these methods are still unstable and need to be improved. Previous research has sought only to discover a few at a time (three or five types) and did not set rules for detecting their types. Our research improves code smell detection by applying a search-based technique; we use the Whale Optimization Algorithm as a classifier to find ideal detection rules. Applying this algorithm, the Fisher criterion is utilized as a fitness function to maximize the between-class distance over the within-class variance. The proposed framework adopts if-then detection rules during the software development life cycle. Those rules identify the types for both medium and large projects. Experiments are conducted on five open-source software projects to discover nine smell types that mostly appear in codes. The proposed detection framework has an average of 94.24% precision and 93.4% recall. These accurate values are better than other search-based algorithms of the same field. The proposed framework improves code smell detection, which increases software quality while minimizing maintenance effort, time, and cost. Additionally, the resulting classification rules are analyzed to find the software metrics that differentiate the nine code smells.</description><identifier>ISSN: 1546-2226</identifier><identifier>ISSN: 1546-2218</identifier><identifier>EISSN: 1546-2226</identifier><identifier>DOI: 10.32604/cmc.2021.015586</identifier><language>eng</language><publisher>Henderson: Tech Science Press</publisher><subject>Algorithms ; Cost analysis ; Maintainability ; Maintenance costs ; Open source software ; Optimization ; Optimization algorithms ; Software development ; Source code</subject><ispartof>Computers, materials & continua, 2021-01, Vol.68 (2), p.1919-1935</ispartof><rights>2021. This work is licensed under https://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-c313t-1ca8600775656aeb2a4de8ed79b65abbe727536751d391e8608dccbdbb00f0a93</citedby><cites>FETCH-LOGICAL-c313t-1ca8600775656aeb2a4de8ed79b65abbe727536751d391e8608dccbdbb00f0a93</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>314,780,784,27924,27925</link.rule.ids></links><search><creatorcontrib>Draz, Moatasem M</creatorcontrib><creatorcontrib>Farhan, Marwa S</creatorcontrib><creatorcontrib>Abdulkader, Sarah N</creatorcontrib><creatorcontrib>Gafar, M G</creatorcontrib><title>Code Smell Detection Using Whale Optimization Algorithm</title><title>Computers, materials & continua</title><description>Software systems have been employed in many fields as a means to reduce human efforts; consequently, stakeholders are interested in more updates of their capabilities. Code smells arise as one of the obstacles in the software industry. They are characteristics of software source code that indicate a deeper problem in design. These smells appear not only in the design but also in software implementation. Code smells introduce bugs, affect software maintainability, and lead to higher maintenance costs. Uncovering code smells can be formulated as an optimization problem of finding the best detection rules. Although researchers have recommended different techniques to improve the accuracy of code smell detection, these methods are still unstable and need to be improved. Previous research has sought only to discover a few at a time (three or five types) and did not set rules for detecting their types. Our research improves code smell detection by applying a search-based technique; we use the Whale Optimization Algorithm as a classifier to find ideal detection rules. Applying this algorithm, the Fisher criterion is utilized as a fitness function to maximize the between-class distance over the within-class variance. The proposed framework adopts if-then detection rules during the software development life cycle. Those rules identify the types for both medium and large projects. Experiments are conducted on five open-source software projects to discover nine smell types that mostly appear in codes. The proposed detection framework has an average of 94.24% precision and 93.4% recall. These accurate values are better than other search-based algorithms of the same field. The proposed framework improves code smell detection, which increases software quality while minimizing maintenance effort, time, and cost. Additionally, the resulting classification rules are analyzed to find the software metrics that differentiate the nine code smells.</description><subject>Algorithms</subject><subject>Cost analysis</subject><subject>Maintainability</subject><subject>Maintenance costs</subject><subject>Open source software</subject><subject>Optimization</subject><subject>Optimization algorithms</subject><subject>Software development</subject><subject>Source code</subject><issn>1546-2226</issn><issn>1546-2218</issn><issn>1546-2226</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2021</creationdate><recordtype>article</recordtype><sourceid>ABUWG</sourceid><sourceid>AFKRA</sourceid><sourceid>AZQEC</sourceid><sourceid>BENPR</sourceid><sourceid>CCPQU</sourceid><sourceid>DWQXO</sourceid><recordid>eNpNkD1PwzAQhi0EEqWwM0ZiTjjbsZ2MVfiUKnWAitGynUubKl_Y6QC_ntAwMJzupPfRne4h5JZCwpmE9N61LmHAaAJUiEyekQUVqYwZY_L833xJrkI4AHDJc1gQVfQlRm8tNk30gCO6se67aBvqbhd97E2D0WYY67b-Nqdg1ex6X4_79ppcVKYJePPXl2T79PhevMTrzfNrsVrHjlM-xtSZTAIoJaSQBi0zaYkZliq3UhhrUTEluFSCljynOLFZ6ZwtrQWowOR8Se7mvYPvP48YRn3oj76bTmompnenSulEwUw534fgsdKDr1vjvzQFfdKjJz36V4-e9fAfE05XcQ</recordid><startdate>20210101</startdate><enddate>20210101</enddate><creator>Draz, Moatasem M</creator><creator>Farhan, Marwa S</creator><creator>Abdulkader, Sarah N</creator><creator>Gafar, M G</creator><general>Tech Science Press</general><scope>AAYXX</scope><scope>CITATION</scope><scope>7SC</scope><scope>7SR</scope><scope>8BQ</scope><scope>8FD</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>JG9</scope><scope>JQ2</scope><scope>L7M</scope><scope>L~C</scope><scope>L~D</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope></search><sort><creationdate>20210101</creationdate><title>Code Smell Detection Using Whale Optimization Algorithm</title><author>Draz, Moatasem M ; Farhan, Marwa S ; Abdulkader, Sarah N ; Gafar, M G</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c313t-1ca8600775656aeb2a4de8ed79b65abbe727536751d391e8608dccbdbb00f0a93</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2021</creationdate><topic>Algorithms</topic><topic>Cost analysis</topic><topic>Maintainability</topic><topic>Maintenance costs</topic><topic>Open source software</topic><topic>Optimization</topic><topic>Optimization algorithms</topic><topic>Software development</topic><topic>Source code</topic><toplevel>online_resources</toplevel><creatorcontrib>Draz, Moatasem M</creatorcontrib><creatorcontrib>Farhan, Marwa S</creatorcontrib><creatorcontrib>Abdulkader, Sarah N</creatorcontrib><creatorcontrib>Gafar, M G</creatorcontrib><collection>CrossRef</collection><collection>Computer and Information Systems Abstracts</collection><collection>Engineered Materials Abstracts</collection><collection>METADEX</collection><collection>Technology Research Database</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</collection><collection>ProQuest Central Essentials</collection><collection>ProQuest Central</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central Korea</collection><collection>Materials Research Database</collection><collection>ProQuest Computer Science Collection</collection><collection>Advanced Technologies Database with Aerospace</collection><collection>Computer and Information Systems Abstracts Academic</collection><collection>Computer and Information Systems Abstracts Professional</collection><collection>Access via ProQuest (Open Access)</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><jtitle>Computers, materials & continua</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Draz, Moatasem M</au><au>Farhan, Marwa S</au><au>Abdulkader, Sarah N</au><au>Gafar, M G</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Code Smell Detection Using Whale Optimization Algorithm</atitle><jtitle>Computers, materials & continua</jtitle><date>2021-01-01</date><risdate>2021</risdate><volume>68</volume><issue>2</issue><spage>1919</spage><epage>1935</epage><pages>1919-1935</pages><issn>1546-2226</issn><issn>1546-2218</issn><eissn>1546-2226</eissn><abstract>Software systems have been employed in many fields as a means to reduce human efforts; consequently, stakeholders are interested in more updates of their capabilities. Code smells arise as one of the obstacles in the software industry. They are characteristics of software source code that indicate a deeper problem in design. These smells appear not only in the design but also in software implementation. Code smells introduce bugs, affect software maintainability, and lead to higher maintenance costs. Uncovering code smells can be formulated as an optimization problem of finding the best detection rules. Although researchers have recommended different techniques to improve the accuracy of code smell detection, these methods are still unstable and need to be improved. Previous research has sought only to discover a few at a time (three or five types) and did not set rules for detecting their types. Our research improves code smell detection by applying a search-based technique; we use the Whale Optimization Algorithm as a classifier to find ideal detection rules. Applying this algorithm, the Fisher criterion is utilized as a fitness function to maximize the between-class distance over the within-class variance. The proposed framework adopts if-then detection rules during the software development life cycle. Those rules identify the types for both medium and large projects. Experiments are conducted on five open-source software projects to discover nine smell types that mostly appear in codes. The proposed detection framework has an average of 94.24% precision and 93.4% recall. These accurate values are better than other search-based algorithms of the same field. The proposed framework improves code smell detection, which increases software quality while minimizing maintenance effort, time, and cost. Additionally, the resulting classification rules are analyzed to find the software metrics that differentiate the nine code smells.</abstract><cop>Henderson</cop><pub>Tech Science Press</pub><doi>10.32604/cmc.2021.015586</doi><tpages>17</tpages><oa>free_for_read</oa></addata></record> |
fulltext | fulltext |
identifier | ISSN: 1546-2226 |
ispartof | Computers, materials & continua, 2021-01, Vol.68 (2), p.1919-1935 |
issn | 1546-2226 1546-2218 1546-2226 |
language | eng |
recordid | cdi_proquest_journals_2520252041 |
source | EZB-FREE-00999 freely available EZB journals |
subjects | Algorithms Cost analysis Maintainability Maintenance costs Open source software Optimization Optimization algorithms Software development Source code |
title | Code Smell Detection Using Whale Optimization Algorithm |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2024-12-18T16%3A51%3A21IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest_cross&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Code%20Smell%20Detection%20Using%20Whale%20Optimization%20Algorithm&rft.jtitle=Computers,%20materials%20&%20continua&rft.au=Draz,%20Moatasem%20M&rft.date=2021-01-01&rft.volume=68&rft.issue=2&rft.spage=1919&rft.epage=1935&rft.pages=1919-1935&rft.issn=1546-2226&rft.eissn=1546-2226&rft_id=info:doi/10.32604/cmc.2021.015586&rft_dat=%3Cproquest_cross%3E2520252041%3C/proquest_cross%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=2520252041&rft_id=info:pmid/&rfr_iscdi=true |