The Impact of Constructors on the Validity of Class Cohesion Metrics

Yegor Bugayenko
{"title":"The Impact of Constructors on the Validity of Class Cohesion Metrics","authors":"Yegor Bugayenko","doi":"10.1109/ICSA-C50368.2020.00021","DOIUrl":null,"url":null,"abstract":"Class cohesion is a measure of the degree to which a class’s inner elements, like methods and attributes, are bound or related to one another. There have been over thirty different formulas proposed in order to calculate the metric. None of them are explicitly designed to deal with constructors in any different way than with regular methods—they simply treat them as identical entities. However, as many object-oriented theorists say, constructors play a very specific role in object life-cycle. In the scope of this empirical research, five different formulas were implemented in two ways: including constructors and excluding them. Then both set of formulas were applied to the same set of 1000 mid-size open source Java projects. The results obtained demonstrated how much of a distraction constructors were bringing into metric calculations.","PeriodicalId":202587,"journal":{"name":"2020 IEEE International Conference on Software Architecture Companion (ICSA-C)","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE International Conference on Software Architecture Companion (ICSA-C)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSA-C50368.2020.00021","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Class cohesion is a measure of the degree to which a class’s inner elements, like methods and attributes, are bound or related to one another. There have been over thirty different formulas proposed in order to calculate the metric. None of them are explicitly designed to deal with constructors in any different way than with regular methods—they simply treat them as identical entities. However, as many object-oriented theorists say, constructors play a very specific role in object life-cycle. In the scope of this empirical research, five different formulas were implemented in two ways: including constructors and excluding them. Then both set of formulas were applied to the same set of 1000 mid-size open source Java projects. The results obtained demonstrated how much of a distraction constructors were bringing into metric calculations.
构造函数对类内聚度量有效性的影响
类内聚是对类内部元素(如方法和属性)相互绑定或关联程度的度量。为了计算度规,已经提出了三十多种不同的公式。它们都没有显式地设计为以与常规方法不同的方式处理构造函数—它们只是将它们视为相同的实体。然而,正如许多面向对象理论家所说,构造函数在对象生命周期中扮演着非常特殊的角色。在本实证研究的范围内,以两种方式实现了五种不同的公式:包含构造函数和不包含构造函数。然后将这两组公式应用于同一组1000个中等规模的开源Java项目。得到的结果表明,构造函数在度量计算中带来了多大的干扰。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信