Using Software Metrics to detect Temporary Field code smell

Ruchin Gupta, S. Singh
{"title":"Using Software Metrics to detect Temporary Field code smell","authors":"Ruchin Gupta, S. Singh","doi":"10.1109/Confluence47617.2020.9058138","DOIUrl":null,"url":null,"abstract":"Code smell is a characteristic of the source code which indicates some serious problem in the code which might affect the quality of the source code. There exists a list of 22 code smells as defined by Martin Fowler. But all these code smells have not been worked upon. Temporary field code smell is one of them, which has not been considered for its detection and refactoring. In this paper, we have reconstructed a motivating example of object oriented JAVA code that indicates the impact of code smell and need to remove temporary field based on metrics and rules.We have proposed a method to detect temporary field code smell based on software metrics derived from data flow and control flow graphs. We also proposed the process of refactoring the code to improve the maintainability. Analysis of results has shown that NFM, NMN, NCF metrics can help to detect Temporary field code smell. Extract class is more appropriate refactoring technique than parameter passing to remove Temporary Field code smell.","PeriodicalId":180005,"journal":{"name":"2020 10th International Conference on Cloud Computing, Data Science & Engineering (Confluence)","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2020-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 10th International Conference on Cloud Computing, Data Science & Engineering (Confluence)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/Confluence47617.2020.9058138","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

Code smell is a characteristic of the source code which indicates some serious problem in the code which might affect the quality of the source code. There exists a list of 22 code smells as defined by Martin Fowler. But all these code smells have not been worked upon. Temporary field code smell is one of them, which has not been considered for its detection and refactoring. In this paper, we have reconstructed a motivating example of object oriented JAVA code that indicates the impact of code smell and need to remove temporary field based on metrics and rules.We have proposed a method to detect temporary field code smell based on software metrics derived from data flow and control flow graphs. We also proposed the process of refactoring the code to improve the maintainability. Analysis of results has shown that NFM, NMN, NCF metrics can help to detect Temporary field code smell. Extract class is more appropriate refactoring technique than parameter passing to remove Temporary Field code smell.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
使用软件度量来检测临时字段代码气味
代码气味是源代码的一种特征,它表明代码中存在一些严重的问题,这些问题可能会影响源代码的质量。Martin Fowler定义了一个包含22种代码气味的列表。但是所有这些代码气味都没有得到处理。临时字段代码气味就是其中之一,它的检测和重构尚未被考虑。在本文中,我们重构了一个具有启动性的面向对象JAVA代码示例,该示例指出了代码气味的影响,以及需要基于度量和规则删除临时字段。我们提出了一种基于数据流和控制流图的软件度量来检测临时字段代码气味的方法。我们还提出了重构代码的过程,以提高可维护性。分析结果表明,NFM, NMN, NCF指标可以帮助检测临时字段代码气味。提取类是比参数传递更合适的重构技术,可以消除临时字段代码的气味。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Identification of the most efficient algorithm to find Hamiltonian Path in practical conditions Segmentation and Detection of Road Region in Aerial Images using Hybrid CNN-Random Field Algorithm A Novel Approach for Isolation of Sinkhole Attack in Wireless Sensor Networks Performance Analysis of various Information Platforms for recognizing the quality of Indian Roads Time Series Data Analysis And Prediction Of CO2 Emissions
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1