Many code changes that developers make in their projects are repeated and constitute recurrent change patterns. It is of interest to collect such patterns from the version history of open-source repositories and suggest the most useful of them as quick fixes. In this paper, we present Revizor - a tool aimed to build custom plugins for PyCharm, a popular Python IDE. A Revizor-based plugin can take change patterns and highlight potential places for their application in the developer's code editor. If the developer accepts the quick fix, the plugin automatically performs the edit. Our approach uses a graph-based representation of code changes, which allows it to support complex distributed code patterns. Experienced developers have also rated the usability and the performance of such Revizor-based plugin positively. The source code of the tool and test plugin prototype are available on GitHub: https://github.com/JetBrains-Research/revizor. A demonstration video with a short tool description can be found on YouTube: https://youtu.be/5eLs14nco7E.
翻译:开发者在项目中反复修改许多代码, 并构成反复变化模式。 有趣的是, 从开放源码库的版本历史中收集这些模式, 并推荐其中最有用的模式作为快速修正 。 在此文件中, 我们介绍Revizor ---- 一个旨在为PyCharm建立自定义插件的工具, 受欢迎的 Python IDE 。 一个基于 Revizor 的插件可以改变模式, 并在开发者代码编辑器中突出其应用的潜在位置 。 如果开发者接受快速修正, 插件自动进行编辑 。 我们的方法使用基于图形的代码修改表达方式, 从而可以支持复杂的分布代码模式 。 经验开发者还积极评价了这种基于Revizor 的插件的可用性和性 。 该工具的源代码和测试插件原型可以在 GitHub 上查阅 : https://github. com/ JetBrains- Research/ revizor 。 在YouTube上可以看到一个带有简短工具描述的演示视频: https://yotututu.be/5Ls14nco7E 。