Exploring the Impact of Clone Refactoring on Test Code Size in Object-Oriented Software

被引:4
作者
Badri, Mourad [1 ]
Badri, Linda [1 ]
Hachemane, Oussama [1 ]
Ouellet, Alexandre [1 ]
机构
[1] Univ Quebec Trois Rivieres, Dept Math & Comp Sci, Software Engn Res Lab, Trois Rivieres, PQ, Canada
来源
2017 16TH IEEE INTERNATIONAL CONFERENCE ON MACHINE LEARNING AND APPLICATIONS (ICMLA) | 2017年
基金
加拿大自然科学与工程研究理事会;
关键词
Object-Oriented Software; Clone Refactoring; Source Code Attributes; Test Code Size; Metrics; Linear Regression; Machine Learning Algorithms;
D O I
10.1109/ICMLA.2017.00098
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
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, Naive 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.
引用
收藏
页码:586 / 592
页数:7
相关论文
共 45 条