Map values should not be replaced unconditionally

MSAL

When map.put(key, value) is called twice in a row with the same key, or the same array element or Python dict entry is assigned twice in a row, the first write is dead code because its value is immediately overwritten. Remove the first write to make the intent clear.

org.openrewrite.staticanalysis.RemoveUnconditionalValueOverwrite
mod run . --recipe=org.openrewrite.staticanalysis.RemoveUnconditionalValueOverwrite

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.