论文标题
迈向复合重构的目录
Towards a Catalog of Composite Refactorings
论文作者
论文摘要
重构目录在软件维护和发展中具有关键的重要性,因为开发人员依靠此类文档来理解和执行重构操作。此外,这些目录构成了从业人员之间的沟通参考指南,因为它们标准化了常见的重构词汇。福勒的书描述了最受欢迎的重构目录,该目录记录了单身和众所周知的重构操作。但是,有时重构是复合变换,即,在给定的程序元素上执行一系列重构。例如,可以通过相同的方法或多个提交中的相同方法执行一系列提取方法操作(单个重构),以简化其实现,因此导致方法分解操作(复合重构)。在本文中,我们提出并记录一个具有八个复合重构的目录。我们还通过预处理检测工具的结果来实现一组脚本来开采复合重构。使用此类脚本,我们在代表性的重构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.