In the context of continually growing large code repositories where code refactoring is an ongoing requirement, we highlight the effectiveness of OpenRewrite as a tool for conducting large-scale code refactoring. OpenRewrite leverages Lossless Semantic Trees (LST) to represent code and applies recipes to search and implement changes. These recipes are openly available and can be executed locally or accessed through the Moderne platform for public repositories. We provide a concise overview of the underlying technology, instructions for utilizing the tool, and we compare its performance against a manual approach and two prominent large language models (LLM): ChatGPT and StarChat-β. Our comparison is based on the execution time of the tool and the accuracy of the implemented changes. Additionally, we present three distinct use cases that demonstrate the versatile applications of the tool. A demonstration of OpenRewrite’s recipe which detects vulnerabilities and automatically fixes them is available at the following link: https://www.youtube.com/watch?v=L1-_cQUX-JA.
Machine learning research engineer at Moderne.
Program Display Configuration
Thu 5 Oct
Displayed time zone: Bogota, Lima, Quito, Rio Brancochange