Rename replace() to replaceWith() since Java 1.8 introduces Map.replace() which collides
Find more occurences of replace() and substitute with replaceWith()