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

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

November, 2021. Published in the proceedings of ASE'21 (A*).

Abstract. 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: A demonstration video with a short tool description can be found on YouTube:

DOI Pre-print Tool Video