Inicio  /  Computers  /  Vol: 11 Par: 8 (2022)  /  Artículo
ARTÍCULO
TITULO

Extract Class Refactoring Based on Cohesion and Coupling: A Greedy Approach

Musaad Alzahrani    

Resumen

A large class with many responsibilities is a design flaw that commonly occurs in real-world object-oriented systems during their lifespan. Such a class tends to be more difficult to comprehend, test, and change. Extract class refactoring (ECR) is the technique that is used to address this design flaw by trying to extract a set of smaller classes with better quality from the large class. Unfortunately, ECR is a costly process that takes great time and effort when it is conducted completely by hand. Thus, many approaches have been introduced in the literature that tried to automatically suggest the best set of classes that can be extracted from a large class. However, most of these approaches focus on improving the cohesion of the extracted classes yet neglect the coupling between them which can lead to the extraction of highly coupled classes. Therefore, this paper proposes a novel approach that considers the combination of the cohesion and coupling to identify the set of classes that can be extracted from a large class. The proposed approach was empirically evaluated based on real-world Blobs taken from two open-source object-oriented systems. The results of the empirical evaluation revealed that the proposed approach is potentially useful and leads to improvement in the overall quality.

 Artículos similares

       
 
Xiaoqin Lian, Xue Huang, Chao Gao, Guochun Ma, Yelan Wu, Yonggang Gong, Wenyang Guan and Jin Li    
In recent years, the advancement of deep learning technology has led to excellent performance in synthetic aperture radar (SAR) automatic target recognition (ATR) technology. However, due to the interference of speckle noise, the task of classifying SAR ... ver más
Revista: Applied Sciences

 
Hui Luo, Jiamin Li, Lianming Cai and Mingquan Wu    
Automatic pavement crack detection is crucial for reducing road maintenance costs and ensuring transportation safety. Although convolutional neural networks (CNNs) have been widely used in automatic pavement crack detection, they cannot adequately model ... ver más
Revista: Applied Sciences

 
Won Shin, Da-Sol Kim and Hyunsuk Ko    
In submarine warfare systems, passive SONAR is commonly used to detect enemy targets while concealing one?s own submarine. The bearing information of a target obtained from passive SONAR can be accumulated over time and visually represented as a two-dime... ver más

 
Renato Bruni, Gianpiero Bianchi and Pasquale Papa    
User requests to a customer service, also known as tickets, are essentially short texts in natural language. They should be grouped by topic to be answered efficiently. The effectiveness increases if this semantic categorization becomes automatic. We pur... ver más
Revista: Algorithms

 
Md. Maniruzzaman, Jungpil Shin and Md. Al Mehedi Hasan    
Attention deficit hyperactivity disorder (ADHD) is one of childhood?s most frequent neurobehavioral disorders. The purpose of this study is to: (i) extract the most prominent risk factors for children with ADHD; and (ii) propose a machine learning (ML)-b... ver más
Revista: Applied Sciences