Improving Refactoring Speed by 10X

Improving Refactoring Speed by 10X
复制标题

DOI:
10.1145/2884781.2884802
复制
发表时间:
2016-05
期刊:
2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE)
影响因子:
--
通讯作者:
Jongwook Kim;D. Batory;Danny Dig;Maider Azanza
Jongwook Kim;D. Batory;Danny Dig;Maider Azanza
中科院分区:
其他
文献类型:
--
作者:
Jongwook Kim;D. Batory;Danny Dig;Maider Azanza

文献摘要

被引文献

相似文献

重构引擎是当今集成开发环境(IDE)中的标准工具。它们允许程序员一次执行一个重构,但程序员需要更多。Gang-of-Four文本中的大多数设计模式都可以编写为重构脚本-重构的编程序列。在本文中,我们提出了R3,一个新的Java重构引擎,支持重构脚本。它构建了一个主存的非持久性数据库来编码Java实体声明(例如,包、类、方法)、它们的包含关系以及诸如继承和修饰符之类的语言特性。与修改抽象树(AST)的经典重构引擎不同,R3重构只修改数据库;只有当引用数据库更改的AST漂亮打印时,才会产生重构代码。R3执行与Eclipse Java开发工具(JDT)相当的先决条件检查,但R3的代码库大约是JDT重构引擎的一半大小,并且运行速度快一个数量级。此外,一项用户研究表明,R3将改进设计模式的成功率提高了25%到50%。
Refactoring engines are standard tools in today's Integrated Development Environments (IDEs). They allow programmers to perform one refactoring at a time, but programmers need more. Most design patterns in the Gang-of-Four text can be written as a refactoring script - a programmatic sequence of refactorings. In this paper, we present R3, a new Java refactoring engine that supports refactoring scripts. It builds a main-memory, non-persistent database to encode Java entity declarations (e.g., packages, classes, methods), their containment relationships, and language features such as inheritance and modifiers. Unlike classical refactoring engines that modify Abstract Syntax Trees (ASTs), R3 refactorings modify only the database; refactored code is produced only when pretty-printing ASTs that reference database changes. R3 performs comparable precondition checks to those of the Eclipse Java Development Tools (JDT) but R3's codebase is about half the size of the JDT refactoring engine and runs an order of magnitude faster. Further, a user study shows that R3 improved the success rate of retrofitting design patterns by 25% up to 50%.