Use distinct().toMutableList() instead of toSet().toMutableList()
ProprietaryRound-tripping through a Set to drop duplicates obscures intent. distinct() says what it does; chain toMutableList() if you actually need a mutable result.
org. openrewrite. kotlin. stdlib. UseDistinctForToSetToMutableList$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. stdlib. UseDistinctForToSetToMutableList$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.