Skip to main content
QUICK REVIEW

[Paper Review] A Survey of Deep Learning Based Software Refactoring

Bridget Nyirongo, Yanjie Jiang|arXiv (Cornell University)|Apr 30, 2024
Software Engineering ResearchComputer Science3 citations
TL;DR

This paper presents a comprehensive survey of deep learning-based software refactoring, categorizing 48 studies into five task-based groups: code smell detection (56.25%), refactoring recommendation (33.33%), end-to-end code transformation (6.25%), refactoring mining (4.17%), and quality assurance (0%). The study reveals a significant imbalance in research focus, with minimal attention to class-level and variable-level refactoring, and identifies key challenges and future research opportunities in the field.

ABSTRACT

Refactoring is one of the most important activities in software engineering which is used to improve the quality of a software system. With the advancement of deep learning techniques, researchers are attempting to apply deep learning techniques to software refactoring. Consequently, dozens of deep learning-based refactoring approaches have been proposed. However, there is a lack of comprehensive reviews on such works as well as a taxonomy for deep learning-based refactoring. To this end, in this paper, we present a survey on deep learning-based software refactoring. We classify related works into five categories according to the major tasks they cover. Among these categories, we further present key aspects (i.e., code smell types, refactoring types, training strategies, and evaluation) to give insight into the details of the technologies that have supported refactoring through deep learning. The classification indicates that there is an imbalance in the adoption of deep learning techniques for the process of refactoring. Most of the deep learning techniques have been used for the detection of code smells and the recommendation of refactoring solutions as found in 56.25\% and 33.33\% of the literature respectively. In contrast, only 6.25\% and 4.17\% were towards the end-to-end code transformation as refactoring and the mining of refactorings, respectively. Notably, we found no literature representation for the quality assurance for refactoring. We also observe that most of the deep learning techniques have been used to support refactoring processes occurring at the method level whereas classes and variables attracted minimal attention. Finally, we discuss the challenges and limitations associated with the employment of deep learning-based refactorings and present some potential research opportunities for future work.

Motivation & Objective

  • To address the lack of comprehensive reviews and a standardized taxonomy for deep learning-based software refactoring.
  • To analyze the distribution and focus of existing deep learning techniques across different refactoring tasks.
  • To identify underexplored areas such as quality assurance for refactoring and class/variable-level refactoring.
  • To highlight research gaps and limitations in current approaches, particularly in end-to-end transformation and mining of refactorings.
  • To guide future research by outlining potential opportunities and challenges in applying deep learning to software refactoring.

Proposed method

  • The authors conducted a systematic literature review of 48 studies on deep learning-based software refactoring from peer-reviewed journals and conferences.
  • They classified the studies into five categories based on the primary task: code smell detection, refactoring recommendation, end-to-end code transformation, refactoring mining, and quality assurance.
  • For each category, they analyzed key aspects including code smell types, refactoring types, training strategies, and evaluation methodologies.
  • The survey employed a qualitative and quantitative analysis to assess the prevalence and distribution of techniques across different refactoring tasks and code elements.
  • They evaluated the maturity and focus of existing approaches by examining the proportion of studies targeting different levels of code granularity (e.g., method, class, variable).
  • The study used a structured framework to compare and contrast deep learning models, datasets, and evaluation metrics across the surveyed works.

Experimental results

Research questions

  • RQ1What are the main categories of deep learning-based software refactoring tasks, and how are they distributed across existing research?
  • RQ2Which code elements (e.g., methods, classes, variables) are most frequently targeted by deep learning-based refactoring approaches?
  • RQ3What are the dominant training strategies and evaluation methods used in deep learning-based refactoring systems?
  • RQ4Why is there a lack of research on quality assurance for refactoring in deep learning applications?
  • RQ5What are the key challenges and open research opportunities in the field of deep learning-based software refactoring?

Key findings

  • Code smell detection is the most researched task, accounting for 56.25% of the surveyed studies, indicating strong interest in identifying code quality issues.
  • Refactoring recommendation follows closely at 33.33%, showing growing focus on suggesting improvements after detection.
  • End-to-end code transformation, which automates the full refactoring process, is underexplored, with only 6.25% of studies targeting this task.
  • Refactoring mining, which involves extracting patterns of refactoring from codebases, is also underrepresented, with only 4.17% of studies in this category.
  • No studies were found addressing quality assurance for refactoring, revealing a critical research gap in validating the correctness and safety of refactored code.
  • Most deep learning techniques are applied at the method level, with minimal attention to class-level and variable-level refactoring, indicating a significant imbalance in granularity focus.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.