code: private void determineCommand() {
          command = null;
          commandStr = null;
  
          boolean tooManyCommands = false;
          for (Command c : Command.values()) {
              final String alias = c.getAlias();
              if (hasOption(alias)) {
                  if (c == Command.HELP) {
                      // `--help` can be a command or just a long option for another command.
                      help = true;
                  } else if (command == null) {
                      // Found a command option
                      command = c;
                      commandStr = alias;
                  } else {
                      tooManyCommands = true;
                  }
              }
          }
  
          if (tooManyCommands) {
              command = null;
              commandStr = null;
  
              if (!help) {
                  reportable.error(format(
                          "You must specify only one command (%s).%n",
                          showCommandAliases()));
                  printHelp(true);
              }
          }
          if (help && command == null) {
              // `--help` is considered as the command if no other command is provided.
              command = Command.HELP;
              commandStr = command.getAlias();
  
          } else if (command == null) {
          	// Print usage if no commands were specified
          	printUsage();
          	reportable.error("\n");
              reportable
                      .error("No command option given. Please specify one of:  "
                              + showCommandAliases());
              end();
          }
      }
docs: Initializes the member variables command, commandStr, and help, according to the command
  option specified by the user in the command line.