Use non deprecated replace method
Formatting on java completion proposal