Skip to the main content

Original scientific paper

https://doi.org/10.24138/jcomss.v15i3.720

A User Feedback Centric Approach for Detecting and Mitigating God Class Code Smell Using Frequent Usage Patterns

Randeep Singh ; Department of Computer Science & Engineering, Maharishi Markandeshwar (Deemed to be University), India
Amit Bindal ; Department of Computer Science & Engineering, Maharishi Markandeshwar (Deemed to be University), India
Ashok Kumar ; Department of Computer Science & Engineering, Maharishi Markandeshwar (Deemed to be University), India


Full text: english pdf 1.437 Kb

page 245-253

downloads: 516

cite


Abstract

Code smells are the fragments in the source code that indicates deeper problems in the underlying software design. These code smells can hinder software evolution and maintenance. Out of different code smell types, the God Class (GC) code smell is one of the many important code smells that directly affects the software evolution and maintenance. The GC is commonly defined as a much larger class in systems that either know too much or do too much as compared to other classes in the system. God Classes are generally accidentally created overtime during software evolution because of the incremental addition of functionalities to it. Generally, a GC indicates a bad design choice and it must be detected and mitigated in order to enhance the quality of the underlying software. However, sometimes the presence of a GC is also considered a good design choice, especially in compiler design, interpreter design and parser implementation. This makes the developer’s feedback important for the correct classification of a class as a GC or a normal class. Therefore, this paper proposes a new approach that detects and proposes refactoring opportunities for GC code smell. The proposed approach makes use of different code metrics in combination along with utilizing user feedback as an important aspect while correctly identifying the GC code smell. The proposed approach that considers combined use of code metrics, is based on two newly proposed code metrics in this paper. The first newly proposed metric is a new approach of measuring the connectivity of a given class with other classes in the system (also termed as coupling). The second newly proposed code metric is proposed to measure the extent to which a given classes make use of foreign member variables. Finally, the proposed approach is also empirically evaluated on two standard open-source commonly used software systems. The obtained result indicates that the proposed approach is capable of correctly identifying the GC code smell.

Keywords

Code Smell; God Class; Refactoring; Software Evolution; Maintenance; Quality

Hrčak ID:

225830

URI

https://hrcak.srce.hr/225830

Publication date:

30.9.2019.

Visits: 1.463 *