public static StringBuilder dumpPropMap(String header, Map<String, String> map) {
    StringBuilder sb = new StringBuilder("START").append(header).append(":\n");
    List<String> propKeys = new ArrayList<String>(map.keySet());
    Collections.sort(propKeys);
    for(String propKey : propKeys) {
      if(propKey.toLowerCase().contains("path")) {
        StringTokenizer st = new StringTokenizer(map.get(propKey), File.pathSeparator);
        if(st.countTokens() > 1) {
          sb.append(propKey).append("=\n");
          while (st.hasMoreTokens()) {
            sb.append("    ").append(st.nextToken()).append(File.pathSeparator).append('\n');
          }
        }
        else {
          sb.append(propKey).append('=').append(map.get(propKey)).append('\n');
        }
      }
      else {
        sb.append(propKey).append('=').append(LogUtils.maskIfPassword(propKey, map.get(propKey)));
        sb.append('\n');
      }
    }
    return sb.append("END").append(header).append('\n');
  }
Find a jar that contains a class of the same name and which
file name matches the given pattern.

@param clazz the class to find.
@param fileNamePattern regex pattern that must match the jar full path
@return a jar file that contains the class, or null
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/tool/TempletonUtils.java