With the large number of software development projects in most organisations, keeping these projects up to date with the latest security patches and framework updates can be quite a task. OpenRewrite is a library that provides an automated solution to this problem. Using recipes written in Java, it can perform large-scale source code refactoring during the build process, preserving as much of the original code as possible. In this blog post, I will explain how OpenRewrite works and how you can use it to refactor your code base.