Towards a Catalog of Composite Refactorings

Aline Brito, Andre Hora, Marco Tulio Valente
1/12/2022
cs.SE

Official code: alinebrito/composite-refactoring-catalog (6 stars, HTML, last commit 2023-02-12).

Abstract

Catalogs of refactoring have key importance in software maintenance and evolution, since developers rely on such documents to understand and perform refactoring operations. Furthermore, these catalogs constitute a reference guide for communication between practitioners since they standardize a common refactoring vocabulary.

Show full abstract

Fowler's book describes the most popular catalog of refactorings, which documents single and well-known refactoring operations. However, sometimes refactorings are composite transformations, i.e., a sequence of refactorings is performed over a given program element. For example, a sequence of Extract Method operations (a single refactoring) can be performed over the same method, in one or in multiple commits, to simplify its implementation, therefore, leading to a Method Decomposition operation (a composite refactoring). In this paper, we propose and document a catalog with eight composite refactorings. We also implement a set of scripts to mine composite refactorings by preprocessing the results of refactoring detection tools. Using such scripts, we search for composites in a representative refactoring oracle with hundreds of confirmed single refactoring operations. Next, to complement this first study, we also search for composites in the full history of ten well-known open-source projects. We characterize the detected composite refactorings, under dimensions such as size and location. We conclude by addressing the applications and implications of the proposed catalog.

View on arXivView PDF

Code Implementations(1)

Dataset and scripts of the paper Towards a Catalog of Composite Refactoring

60HTML, PythonMar 19, 20223 years ago
catalogcompositerefactoringscripts

Similar Papers

Cite this paper

@article{brito2022towards,
  title  = {Towards a Catalog of Composite Refactorings},
  author = {Aline Brito and Andre Hora and Marco Tulio Valente},
  year   = {2022},
  eprint = {2201.04599},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.04599}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2201.04599.svg)](https://codeofpaper.com/paper/2201.04599)

Discussion