Find System.currentTimeMillis() calls
ProprietaryDirect System.currentTimeMillis() calls are convenient but couple the call site to wall-clock time, making tests deterministic only by mocking the whole class. Inject a Clock (or, on JDK 8+, java.time.Clock) and read time through it.
org. openrewrite. kotlin. interop. FindSystemCurrentTimeMillis$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. interop. FindSystemCurrentTimeMillis$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.