首页 | 本学科首页   官方微博 | 高级检索  
     


Constructing models for predicting extract subclass refactoring opportunities using object-oriented quality metrics
Affiliation:1. Key Laboratory of Dependable Service Computing in Cyber Physical Society Ministry of Education, Chongqing 400044, PR China;2. School of Software Engineering, Chongqing University, Chongqing 401331, PR China;1. Center of Exact and Technological Sciences, Federal University of Acre, Rio Branco  AC, Brazil;2. Institute of Computing, Fluminense Federal University, Niterói  RJ, Brazil;1. Karlsruhe Institute of Technology, Karlsruhe 76131, Germany;2. Technical University of Munich, Garching 85748, Germany;1. State Key Lab of Software Engineering, Wuhan University, China;2. University of Lille, France;3. INRIA, France;1. ISTAR, Iscte - Instituto Universitário de Lisboa, Portugal;2. CISUC, University of Coimbra, Portugal;3. Huawei Munich Research Center, Germany;1. Key Laboratory of Dependable Service Computing in Cyber Physical Society, Ministry of Education, Chongqing 400044, PR China;2. School of Software Engineering, Chongqing University, Huxi Town, Shapingba, Chongqing 401331, PR China;3. State Key laboratory of Coal Mine Disaster Dynamics and Control, Chongqing 400044, PR China
Abstract:ContextRefactoring is a maintenance task that refers to the process of restructuring software source code to enhance its quality without affecting its external behavior. Inspecting and analyzing the source code of the system under consideration to identify the classes in need of extract subclass refactoring (ESR) is a time consuming and costly process.ObjectiveThis paper explores the abilities of several quality metrics considered individually and in combination to predict the classes in need of ESR.MethodFor a given a class, this paper empirically investigates, using univariate logistic regression analysis, the abilities of 25 existing size, cohesion, and coupling metrics to predict whether the class is in need of restructuring by extracting a subclass from it. In addition, models of combined metrics based on multivariate logistic regression analysis were constructed and validated to predict the classes in need of ESR, and the best model is justifiably recommended. We explored the statistical relations between the values of the selected metrics and the decisions of the developers of six open source Java systems with respect to whether the classes require ESR.ResultsThe results indicate that there was a strong statistical relation between some of the quality metrics and the decision of whether ESR activity was required. From a statistical point of view, the recommended model of metrics has practical thresholds that lead to an outstanding classification of the classes into those that require ESR and those that do not.ConclusionThe proposed model can be applied to automatically predict the classes in need of ESR and present them as suggestions to developers working to enhance the system during the maintenance phase. In addition, the model is capable of ranking the classes of the system under consideration according to their degree of need of ESR.
Keywords:
本文献已被 ScienceDirect 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号