Towards a Catalog of Composite Refactorings

Aline Brito, Andre Hora, Marco Tulio Valente

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. Fowler's seminal book on refactoring 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 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 six composite refactorings. We also extend a refactoring detection tool to identify such composite refactoring in commits histories. We rely on our tool extension to mine composite refactorings in ten well-known open source projects and characterize the detected composite refactorings, under dimensions such as size and location. Finally, we qualitatively study the descriptions of commits including composite refactorings to shed preliminary light on the motivations behind such operations. We conclude by addressing the applications and implications of the proposed catalog.

Knowledge Graph

arrow_drop_up

Comments

Sign up or login to leave a comment