Traits are a way to build higher-level abstractions over LST elements. They allow you to define common characteristics or behaviors that might apply to different types of LST elements or involve more context than a single element can provide.
They help consolidate shared logic that you might otherwise put in utility classes, avoiding the need to add extension methods to every LST element. This keeps the public-facing API simpler while maintaining extensibility.
Some examples of traits include the annotation trait (which represents any LST element that has an annotation, regardless of whether it's a class, method, or variable declaration) and the Gradle dependency trait (which represents different ways dependencies can be declared in Gradle files and provides a common interface to access details like group ID, artifact ID, and version).
Traits can be converted into a visitor (using asVisitor()) which allows you to process only the LST elements that implement that specific trait, effectively filtering down to what you're interested in as a recipe author.
We also demonstrated how to create a TodoComment trait with a Matcher to identify these comments across different file types.
OpenRewrite power moves part 2: Scanning recipes (September 10th, 2025)
Check out our documentation on Scanning recipes for most of the information presented during this session. We did provide more real-world examples of building and using a scanning recipe, though.
OpenRewrite power moves part 1: Using data tables (September 3rd, 2025)
The 2nd annual Code Remix Summit is happening May 11th-13th, 2026 in Florida. Please submit your session proposals by October 31st, 2025.
Summary
This week we talked about how to create and use data tables with OpenRewrite recipes. We walked through extending the DataTable class and gave examples of various ways you can interact with it. We also talked through how you can test data tables in unit tests.
A couple of important notes about data tables that were mentioned:
You do not need to create a scanning recipe to use a data table
Data tables can be used to generate reports (e.g., class hierarchy or to-do lists). They also can be used to generate visualizations.
Live Spring AI coding and real-world use cases (August 27th, 2025)
This week we welcomed Mark Heckler. He spoke about Spring AI and how it provides a unified interface to interact with various AI models (similar to how Spring Data works with different backend stores). He then demonstrated practical use cases for Spring AI. These include:
Text generation – Generating a summary or even a haiku based on a provided topic using an AI template.
Retrieval augmented generation (RAG) – Enhancing AI responses by integrating internal documents with a vector store. This allows for specific, fact-based answers relevant to the user's data.
Conversational AI – Maintaining separate conversation contexts using a conversation AI to prevent data cross-pollination between different user interactions
MCP / Tool calling – Integrating AI with deterministic external tools, like a weather service, to provide real-time, context-aware information.
Multimodal AI – Explaining an image and extracting information from it. Often combined with RAG to provide contextually relevant results.
While AI offers immense potential, it's crucial to understand that AI has weaknesses – especially regarding determinism vs. non-determinism. Mark advocated for combining AI's capabilities with deterministic options for best results.
HCL Recipes: Making them work for you (August 20th, 2025)
This week Sam and Tim compared different approaches to recipe development. They discussed how they use Claude and what the pros/cons are for using it over manual coding.
There's a bunch of new recipes – including a bunch of new C# recipes.
Main topic for the week
This week we welcomed Karsten Thoms and Tim Zöller from Operaton. They talked about their experience forking Camunda 7, modernizing it to Java 17, and significantly reducing Sonar issues.
The missing piece in your observability puzzle (July 23rd, 2025)
This week we welcomed Mohammed Aboullaite to discuss continuous profiling. We covered topics including:
The benefits of continuous profiling – identifying performance issues proactively, preventing incidents like memory leaks, and improving code performance
The challenges of continuous profiling – managing large volumes of collected data, filtering out noise, and ensuring insights are actionable
Getting started advice for engineers new to profiling
Helpful tools for implementing continuous profiling
Live Debug: Mapping release train dependencies with OpenRewrite (July 16th, 2025)
We are excited to welcome two new sponsors: CodeGate and Azul!
CodeGate, from Stacklok, is a new gateway between your AI coding assistance and LLMs, shielding your privacy and enhancing developer productivity.
Azul, a leader in high-performance Java runtimes, helps companies optimize and modernize their Java applications.
Both of these places will be participating in the Hack track at the event where attendees will be able to try out the solutions to help an actual business use case.
This week we welcomed Merlin to discuss the future of Java. We talked through things like what upcoming features we're excited about and what things we need to keep in mind going forward.
The Shanman Strikes Again: Gradle .kts Support (March 19th, 2025)
This week we welcome back Shannon Pamperl. He's one of the oldest and most prolific contributors to OpenRewrite. If you've kept up with code remix weekly sessions, you may recall Shannon as he's been on multiple times before sharing some of the cool things he's done.
His latest heroic deeds have been around Gradle Kotlin support – which has been an open issue for a few years now.
The big focus has been around adding/upgrading/changing dependencies as those are central to general migrations.
After this initial explanation, Sam asked, "Is there a path forward for type-attributed Gradle Kotlin scripts?"
The answer is "it's probably possible" - either Gradle has to start providing a library that's more easily consumable or we have to require a Gradle distribution being available anytime we need to do parsing. This would be fine for the CLI - but much harder for the Moderne Platform.
There was also some follow-up discussion on the feasibility of type tables.
Next up we talked about future goals and what Shannon's plans are going forward. Things like what recipes still need to be done and when is the Gradle Kotlin chapter "complete" or not.
This transitioned into a discussion of what other areas of OpenRewrite interest Shannon.
Meet Moddy: AI Agent for Multi-Repo Modernization (March 12th, 2025)
We've done a new release of OpenRewrite! New features include a Gradle KTS parser, the promotion of rewrite-kotlin, and the ability to parse .mvn/.mvnconfig properties.
There was a community question that we thought was particularly notable and wanted to call out. Someone asked, "Is there a way to tell rewriteTest to ignore formatting when comparing before and after? Likewise, can we just compare LST equivalence while ignoring static imports or fully qualified types?"
This week we welcomed back Justine – who talked about our new AI agent: Moddy. For a detailed written guide on this, check out our blog post where we introduced Moddy.
If you've kept up with our code remix sessions, you may remember that Justine was on a code remix session a few weeks ago talking about something similar – Mod Agent. That was the precursor to the latest version – Moddy.
One of the first key points we discussed was about what Moddy is and what it isn't. Moddy is not a fully trained LLM model like ChatGPT or Llama or whatnot. Rather, it's meant to augment those existing models and connect them to Moderne and OpenRewrite – which is the irreplaceable core. In fact, users can choose to use whatever model they want with Moddy.
By creating Moddy like this, it means that people can safely run Moddy on their own internal code base without us ever seeing or having access to their code.
We also touched upon the interesting question of, "Why do you need to augment a model like this? Can't you just ask one of those other models to rewrite a 100,000 files for me?"
There are a couple reasons for this – first of all, it takes a significant amount of time to run these models. If you're passing in millions of lines of code and thousands of repos, you're going to be waiting a ridiculous amount of time. Then, even when (if) it does finish, it will likely be filled with hallucinations that lead to broken code. Lastly, for many of these models, you would be required to give these LLMs access to your code – which doesn't make sense for most companies.
After that, Justine took us through a demo of Moddy. With it, you can discover/find relevant recipes and, also, ask it intelligent questions about your code such as, "What repositories do I use Apache Commons in?"
Moddy isn't widely available yet -- but it will be soon for Moderne customers so keep your eyes out for it.
This week we introduced Dustin Lehr, our new CISO. Sam and Dustin had a lengthy discussion about security and the culture around it. They discussed practical ways to keep team engaged in protecting code, and how to address the ongoing challenge of transitioning from a "throw-it-over-the-wall" mentality to a collaborative, empowered environment.
Top Tips & Techniques for Recipe Authors (February 26th, 2025)
If you want to attend, consider using our promo code: DN25MODERNE30.
Main topic for the week
Sam took us through a variety of recipe authoring tips. Below you can find a very high-level summary of each tip, but if you want to know more please check out the video.
Tip 1: Parse text you need into LST elements with parsers.
Tip 1.5: Save the results of those computations into the execution context so you won't have to do them frequently. When possible, cache things that are invariable.
Tip 2: Debugging JavaTemplates - use doBeforeParseTemplate().
Tip 3: Create sub-visitors when you have something complex.
Tip 4: How to do HTTP communication in a recipe
Tip 5: Delegate to scanning recipes
Type Tables: Breaking up with classpath drama (February 19th, 2025)
If you want to attend, consider using our promo code: DN25MODERNE30.
Releases:
Lombok support has been officially released. Make sure you're using version v8.45.5 or higher.
Main topic for the week - type tables
Historically, many of our recipes that updated insecure libraries to secure ones caused some problems for people that had vulnerability scanners. That's because, as part of fixing the old code, we needed to have the old JARs to compile that old code. The JARs were never executed, but it still caused people to be concerned. To remedy this, we've created type tables.
Now, instead of pulling in the whole JAR, we throw away the implementation and take just enough for type attribution. These type types are not a class and can't be re-hydrated into anything executable. This lets us run recipes against old, insecure code without having to take in a concerning JAR.
Type tables have an additional benefit beyond not getting security warnings – size savings. Using type tables, we are able to reduce the size of the libraries we need to pull in by 90%. Because of that, every release of OpenRewrite will now being significantly smaller.
Below are relevant links that you might find useful about this topic:
This week was all about Lombok. We talked through the challenges we've faced and what Lombok support means. We demonstrated various recipes that would benefit from this and also walked through some related code and tests.
Brewing Java 21: Live coding a recipe for success (January 29th, 2025)
This week Sam walked through coding a recipe live. If you're interested in seeing how a complex Java refactoring recipe is created, this would be a good watch.
Hero developer contributes TOML parser to OpenRewrite (January 22nd, 2025)
This week we welcomed back Shannon Pamperl – one of the most prolific contributors to OpenRewrite. He recently added a TOML parser to OpenRewrite, and we wanted to take some time to chat with him about it – such as his motivations, how he went about it, and what challenges he faced.
We've expanded Lombok support - such as adding support for new Java versions and new recipes. It's still behind a feature flag for now, but fingers crossed it should be coming soon.
This week we welcomed Justine back to the code remix session. In it, she demonstrated a chatbot we're working on to complement the Moderne CLI. With it, you can ask questions like, "Do I use Apache HTTP in my code?" or "Can you draw me a histogram of the top 5 most used Apache Commons methods?"
Right now, the bot is very focused on search recipes and displaying results. It can be really helpful when you want to run multiple search recipes without even knowing what those recipes are.