{"title":"使用软件度量来检测临时字段代码气味","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":"{\"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}","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}
Using Software Metrics to detect Temporary Field code smell
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.