public static Map<Long, List<String>> groupFilesByContent(Map<String, Long> map) {
    Map<Long, List<String>> result = new HashMap<>();
    for (Map.Entry<String, Long> entry : map.entrySet()) {
      String path = entry.getKey();
      if (Digester.isFile(entry.getValue())) {
        Long hash = entry.getValue();
        List<String> paths = result.get(hash);
        if (paths == null) result.put(hash, (paths = new LinkedList<>()));
        paths.add(path);
      }
    }
    return result;
  }
public static Map<Long, List<String>> groupFilesByContent(Map<String, Long> map)