Developers often change the types of program elements. Such a refactoring frequently involves updating not only the type of the element itself, but also the API of all type-dependent references in the code, thus it is tedious and time-consuming. Despite type changes being more frequent than renamings, just a few current IDE tools provide partially-automated support only for a small set of hard-coded types. Researchers have recently proposed a data-driven approach to inferring API rewrite rules for type change patterns in Java using code commits history. In this paper, we build upon these recent advances and introduce IntelliTC - a tool to perform Java type change refactoring. We implemented it as a plugin for IntelliJ IDEA, a popular Java IDE developed by JetBrains. We present 3 different ways of providing support for such a refactoring from the standpoint of the user experience: Classic mode, Suggested Refactoring, and Inspection mode. To evaluate these modalities of using IntelliTC, we surveyed 15 experienced software developers. They positively rated the usefulness of the tool. The source code and distribution of the plugin are available on GitHub: https://github.com/JetBrains-Research/data-driven-type-migration. A demonstration video is on YouTube: https://youtu.be/pdcfvADA1PY.
翻译:开发者往往会改变程序元素的类型。 这种重新设定通常不仅更新元素本身的类型, 而且还更新代码中所有类型依赖的引用的 API, 因此它既乏味又耗时。 尽管类型更改比重命名更为频繁, 但目前仅有一些 IDE 工具只为少量的硬编码类型提供部分自动支持。 研究人员最近提出了一个数据驱动方法, 用以用代码来推断 Java 类型变化模式的 API 重写规则 。 在本文中, 我们利用这些最新进展并引入 IntelliTC ---- 一种工具来进行 Java 类型变化的重构。 我们把它作为IntelliJIDA 的插件来实施, 这是由 JetBrains 开发的受欢迎的 Java IDE 。 我们从用户经验的角度提出了三种不同的方式为这种重新设定提供支持 : 经典模式, 建议重定义, 重新设置, 和检查模式。 为了评估使用 IntellicTC 的这些模式, 我们对这些有15 经验的软件开发者进行了调查 。 他们正面评价了工具的实用性工具 : 类型 ASUDRUDRUDERB/ 。 的源码 和分配。