private String applyReplacement(final BidiMap replacement,String contents){
  for (  Object key : replacement.keySet()) {
    String attributeName=(String)key;
    String attributeInitials=(String)replacement.get(key);
    contents=contents.replaceAll(JSONSerialisation.jsonAttributeName(attributeName),JSONSerialisation.jsonAttributeName(attributeInitials));
  }
  return contents;
}

private String applyReplacement ( final BidiMap replacement , String contents ) { for ( Object key : replacement . keySet ( ) ) { String attributeName = ( String ) key ; String attributeInitials = ( String ) replacement . get ( key ) ; contents = contents . replaceAll ( JSONSerialisation . jsonAttributeName ( attributeName ) , JSONSerialisation . jsonAttributeName ( attributeInitials ) ) ; } return contents ; }
perform the keyword substitution .
