code: private static String changeIDs(String text, Map<String, String> mapIds) {
      String result = text;
      for (String key : mapIds.keySet()) {
        result = result.replace(key, mapIds.get(key));
      }
      return result;
    }
docs: method to change the ids in a text according to map
  
  @param text input text
  @param mapIds Map of old Id's value and new Id's
  @return text with changed ids