arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2201.04599cs.SE
收藏

关于复合重构的目录

Towards a Catalog of Composite Refactorings

Aline Brito, Andre Hora, Marco Tulio Valente

摘要:

重构目录在软件维护和演化中具有关键的重要性,因为开发人员依赖这些文档来理解和执行重构操作。此外,这些目录构成了从业者之间交流的参考指南,因为它们标准化了公共重构词汇表。Fowler的书描述了最流行的重构目录,其中记录了单个和众所周知的重构操作。然而,有时重构是复合变换,即,对给定程序元素执行重构序列。例如,一系列提取方法操作(单个重构)可以在同一个方法上执行,在一个或多个提交中,以简化其实现,因此,导致方法分解操作(复合重构)。在本文中,我们提出并记录了一个目录与八个复合重构。我们还实现了一组脚本,通过预处理重构检测工具的结果来挖掘复合重构。使用这样的脚本,我们在一个有代表性的重构Oracle中搜索组合,其中包含数百个已确认的单个重构操作。接下来,为了补充第一项研究,我们还在十个著名的开源项目的完整历史中寻找复合材料。我们的特点检测复合重构,尺寸,如大小和位置。最后,我们解决拟议的目录的应用和影响。

英文摘要:

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 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑