code: private double checkThreshold(int value) {
      double threshold = (double) value;
      try {
        if (threshold < 0 || threshold > 100) {
          throw new NumberFormatException();
        }
        LOG.info("Using a threshold of " + threshold);
      } catch (NumberFormatException e) {
        System.err.println("Expect a double parameter in the range of [0, 100]: "
            + value);
        throw e;
      }
      return threshold;
    }
docs: /* parse argument to get the threshold