M. Badri, L. Badri, Oussama Hachemane, Alexandre Ouellet
{"title":"探讨面向对象软件中克隆重构对测试代码大小的影响","authors":"M. Badri, L. Badri, Oussama Hachemane, Alexandre Ouellet","doi":"10.1109/ICMLA.2017.00098","DOIUrl":null,"url":null,"abstract":"This paper aims at exploring the impact of clone refactoring on the test code size, in terms of number of operations, in object-oriented software. We investigated three research questions: (1) the impact of clone refactoring on three important source code attributes (coupling, complexity and size) that are related to unit testability of classes, (2) the impact of clone refactoring on the test code size, and (3) the variations after clone refactoring in the source code attributes that have the most important impact on the test code size. We used linear regression and three popular machine learning techniques (i.e., k-Nearest Neighbors, Naïve Bayes and Random Forest) to develop predictive and explanatory models. We used data collected from an open source Java software system (ANT) that has been refactored using clone-refactoring techniques. The analyses indicate that there is a strong and positive relationship between clone refactoring and the reduction of the test code size. Results show that: (1) the source code attributes of refactored classes have been significantly improved, (2) the test code size of refactored classes has been significantly reduced, and (3) the variations of the test code size are more influenced by the variations of the complexity and size of refactored classes compared to coupling.","PeriodicalId":6636,"journal":{"name":"2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA)","volume":"63 1","pages":"586-592"},"PeriodicalIF":0.0000,"publicationDate":"2017-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"10","resultStr":"{\"title\":\"Exploring the Impact of Clone Refactoring on Test Code Size in Object-Oriented Software\",\"authors\":\"M. Badri, L. Badri, Oussama Hachemane, Alexandre Ouellet\",\"doi\":\"10.1109/ICMLA.2017.00098\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This paper aims at exploring the impact of clone refactoring on the test code size, in terms of number of operations, in object-oriented software. We investigated three research questions: (1) the impact of clone refactoring on three important source code attributes (coupling, complexity and size) that are related to unit testability of classes, (2) the impact of clone refactoring on the test code size, and (3) the variations after clone refactoring in the source code attributes that have the most important impact on the test code size. We used linear regression and three popular machine learning techniques (i.e., k-Nearest Neighbors, Naïve Bayes and Random Forest) to develop predictive and explanatory models. We used data collected from an open source Java software system (ANT) that has been refactored using clone-refactoring techniques. The analyses indicate that there is a strong and positive relationship between clone refactoring and the reduction of the test code size. Results show that: (1) the source code attributes of refactored classes have been significantly improved, (2) the test code size of refactored classes has been significantly reduced, and (3) the variations of the test code size are more influenced by the variations of the complexity and size of refactored classes compared to coupling.\",\"PeriodicalId\":6636,\"journal\":{\"name\":\"2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA)\",\"volume\":\"63 1\",\"pages\":\"586-592\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2017-12-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"10\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICMLA.2017.00098\",\"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 16th IEEE International Conference on Machine Learning and Applications (ICMLA)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICMLA.2017.00098","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Exploring the Impact of Clone Refactoring on Test Code Size in Object-Oriented Software
This paper aims at exploring the impact of clone refactoring on the test code size, in terms of number of operations, in object-oriented software. We investigated three research questions: (1) the impact of clone refactoring on three important source code attributes (coupling, complexity and size) that are related to unit testability of classes, (2) the impact of clone refactoring on the test code size, and (3) the variations after clone refactoring in the source code attributes that have the most important impact on the test code size. We used linear regression and three popular machine learning techniques (i.e., k-Nearest Neighbors, Naïve Bayes and Random Forest) to develop predictive and explanatory models. We used data collected from an open source Java software system (ANT) that has been refactored using clone-refactoring techniques. The analyses indicate that there is a strong and positive relationship between clone refactoring and the reduction of the test code size. Results show that: (1) the source code attributes of refactored classes have been significantly improved, (2) the test code size of refactored classes has been significantly reduced, and (3) the variations of the test code size are more influenced by the variations of the complexity and size of refactored classes compared to coupling.