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

Revizor:一种基于图匹配的数据驱动频繁代码更改自动化方法

Revizor: A Data-Driven Approach to Automate Frequent Code Changes Based on Graph Matching

Oleg Smirnov, Artyom Lobanov, Yaroslav Golubev, Elena Tikhomirova, Timofey Bryksin

摘要:

开发人员在其项目中所做的许多代码更改都是重复的,并构成了经常性的更改模式。从开放源代码库的版本历史中收集这些模式并建议其中最有用的模式作为快速修复是很有意义的。在本文中,我们介绍了Revizor-一个旨在为流行的Python IDE PyCharm构建自定义插件的工具。基于Revizer的插件可以采用更改模式,并在开发人员的代码编辑器中突出显示其应用程序的潜在位置。如果开发人员接受快速修复,插件会自动执行编辑。我们的方法使用基于图形的代码更改表示,这使得它能够支持复杂的分布式代码模式。经验丰富的开发人员也积极评价了这种基于Revizer的插件的可用性和性能。该工具的源代码和测试插件原型可在GitHub上获得:www.example.com。带有简短工具描述的演示视频可以在YouTube上找到:www.example.com。

英文摘要:

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.

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

↑