Merge "Extract replacePrefixes into a static method"