code: private String getReplacement(String key) {
      Result result = results.get(key);
      if (result != null) {
        return result.replacement;
      }
  
      String replacement = nameGenerator.generateNextName();
      result = new Result(key, replacement);
      results.put(key, result);
      return replacement;
    }
docs: Get a replacement string for the provide key text.