Exploring Variational Graph Auto-Encoders for Extract Class Refactoring Recommendation

03/16/2022
by   Pritom Saha Akash, et al.
0

The code smell is a sign of design and development flaws in a software system that reduces the reusability and maintainability of the system. Refactoring is done as an ongoing practice to remove the code smell from the program code. Among different code smells, the God class or Blob is one of the most common code smells. A god class contains too many responsibilities, violating object-oriented programming design's low coupling and high cohesiveness principles. This paper proposes an automatic approach to extracting a God class into multiple smaller classes with more specific responsibilities. To do this, we first construct a graph of methods (as nodes) for the concerning god class. The edge between any two methods is determined by their structural similarity, and the feature for each method is initialized using different semantic representation methods. Then, the variational graph auto-encoder is used to learn a vector representation for each method. Finally, the learned vectors are used to cluster methods into different groups to be recommended as refactored classes. We assessed the proposed framework using three different class cohesion metrics on sixteen actual God Classes collected from two well-known open-source systems. We also conducted a comparative study of our approach with a similar existing approach and found that the proposed approach generated better results for almost all the God Classes used in the experiment.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/18/2019

Decoupling feature propagation from the design of graph auto-encoders

We present two instances, L-GAE and L-VGAE, of the variational graph aut...
research
02/07/2023

Just-in-Time Code Duplicates Extraction

Refactoring is a critical task in software maintenance, and is usually p...
research
04/23/2023

Class-Specific Variational Auto-Encoder for Content-Based Image Retrieval

Using a discriminative representation obtained by supervised deep learni...
research
01/25/2018

Automatic Labeling of the Object-oriented Source Code: The Lotus Approach

Most of open-source software systems become available on the internet to...
research
02/15/2020

Recommendation of Move Method Refactoring Using Path-Based Representation of Code

Software refactoring plays an important role in increasing code quality....
research
08/20/2018

Leveraging Historical Associations between Requirements and Source Code to Identify Impacted Classes

As new requirements are introduced and implemented in a software system,...
research
02/22/2023

Semi-Supervised Approach for Early Stuck Sign Detection in Drilling Operations

A real-time stuck pipe prediction methodology is proposed in this paper....

Please sign up or login with your details

Forgot password? Click here to reset