Metric based detection of refused bequest code smell

B. M. Merzah, Y. E. Selçuk
{"title":"Metric based detection of refused bequest code smell","authors":"B. M. Merzah, Y. E. Selçuk","doi":"10.1109/CICN.2017.8319355","DOIUrl":null,"url":null,"abstract":"The concept of code smell was introduced as a signs of internal design flaws within the software. Code smells detection has become a mandatory technique to detect code issues that may affect negatively on the software quality by causing problems for further development and maintenance. Accordingly, the consensus is that all types of code smells need to be refactored to deny or diminish such issues. The refactoring techniques can get rid of particular design flaws or principle violations, and restore the code fragment that present a smell, to an acceptable quality level. In the context of object-oriented systems, the concept of inheritance has been known as a key feature proposed to increase the amount of software reusability. However, using inheritance is not always the best solution, particularly if it is utilized in improper cases where other types of relationships would be more appropriate. One of the particular issues that violate inheritance principles is the Refused Bequest code smell. It is related to an inheritance hierarchy where a subclass does not obligate the interface inherited from its parent class. Some studies, mentioned in Section 2, had been made to detect the Refused Bequest smell. In this paper we present a new detection strategy by computing the similarity between common methods of the base class with the overridden methods of the sub-class, and then by calculating the average of these values for the given sub-class. That average value is defined as a new metric in our detection mechanism.","PeriodicalId":339750,"journal":{"name":"2017 9th International Conference on Computational Intelligence and Communication Networks (CICN)","volume":"124 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2017 9th International Conference on Computational Intelligence and Communication Networks (CICN)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CICN.2017.8319355","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

The concept of code smell was introduced as a signs of internal design flaws within the software. Code smells detection has become a mandatory technique to detect code issues that may affect negatively on the software quality by causing problems for further development and maintenance. Accordingly, the consensus is that all types of code smells need to be refactored to deny or diminish such issues. The refactoring techniques can get rid of particular design flaws or principle violations, and restore the code fragment that present a smell, to an acceptable quality level. In the context of object-oriented systems, the concept of inheritance has been known as a key feature proposed to increase the amount of software reusability. However, using inheritance is not always the best solution, particularly if it is utilized in improper cases where other types of relationships would be more appropriate. One of the particular issues that violate inheritance principles is the Refused Bequest code smell. It is related to an inheritance hierarchy where a subclass does not obligate the interface inherited from its parent class. Some studies, mentioned in Section 2, had been made to detect the Refused Bequest smell. In this paper we present a new detection strategy by computing the similarity between common methods of the base class with the overridden methods of the sub-class, and then by calculating the average of these values for the given sub-class. That average value is defined as a new metric in our detection mechanism.
基于度量的被拒绝遗赠代码气味检测
代码气味的概念是作为软件内部设计缺陷的标志引入的。代码气味检测已经成为一项强制性的技术,用于检测可能会对软件质量产生负面影响的代码问题,因为这些问题会给进一步的开发和维护带来问题。因此,共识是需要重构所有类型的代码气味,以否认或减少此类问题。重构技术可以消除特定的设计缺陷或违反原则的情况,并将出现问题的代码片段恢复到可接受的质量水平。在面向对象系统的上下文中,继承的概念被认为是增加软件可重用性的关键特性。然而,使用继承并不总是最好的解决方案,特别是在其他类型的关系更合适的不适当情况下使用继承时。违反继承原则的一个特殊问题是拒绝继承代码气味。它与继承层次结构有关,在继承层次结构中,子类不要求从其父类继承接口。在第2节中提到的一些研究已经用于检测拒绝遗赠的气味。本文提出了一种新的检测策略,通过计算基类的公共方法与子类的覆盖方法之间的相似度,然后计算给定子类的这些值的平均值。在我们的检测机制中,这个平均值被定义为一个新的度量。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信