{"title":"基于度量的被拒绝遗赠代码气味检测","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":"{\"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}","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}
Metric based detection of refused bequest code smell
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.