{"title":"构造函数对类内聚度量有效性的影响","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":"{\"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}","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}
The Impact of Constructors on the Validity of Class Cohesion Metrics
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.