private static int extractArgNum(String[] options) {
    for (String value : options) {
      Integer parsedValue = parseArgNum(value);
      if (parsedValue != null) {
        return parsedValue;
      }
    }

    if (options.length == 1) {
      return StringUtil.parseInt(options[0], 0);
    }

    return 0;
  }
private static int extractArgNum(String[] options)