private void examineLog(File log) throws IOException {

    LineNumberReader reader = null;

    try {
      if (log.getName().endsWith(".gz")) {
        try (FileInputStream fileInputStream = new FileInputStream(log);
            GZIPInputStream gzipInputStream = new GZIPInputStream(fileInputStream)) {
          reader = new LineNumberReader(new InputStreamReader(gzipInputStream));
        }
      } else {
        reader = new LineNumberReader(new FileReader(log));
      }
    } catch (IOException e) {
      return;
    }

    try {
      TreeMap<String, List<ThreadStack>> dumps = getThreadDumps(reader, log.getName());

      StringBuilder buffer = new StringBuilder();
      for (Map.Entry<String, List<ThreadStack>> dump : dumps.entrySet()) {
        if (dump.getValue().size() > 0) {
          buffer.append(dump.getKey());
          for (ThreadStack stack : dump.getValue()) {
            stack.appendToBuffer(buffer);
            buffer.append("\n");
          }
          buffer.append("\n\n");
        }
        if (ONE_STACK) {
          break;
        }
      }
      String output = buffer.toString();
      if (output.length() > 0) {
        System.out.println(output);
      }
    } finally {
      reader.close();
    }
  }
@param args names of files to scan for suspicious threads in thread-dumps
geode-core/src/main/java/org/apache/geode/internal/util/PluckStacks.java