docs: public CommandLine parse(Options options, String[] arguments, Properties properties, boolean stopAtNonOption)
              throws ParseException
      {
          this.options = options;
          this.stopAtNonOption = stopAtNonOption;
          skipParsing = false;
          currentOption = null;
          expectedOpts = new ArrayList(options.getRequiredOptions());
  
          // clear the data from the groups
          for (OptionGroup group : options.getOptionGroups())
          {
              group.setSelected(null);
          }
  
          cmd = new CommandLine();
  
          if (arguments != null)
          {
              for (String argument : arguments)
              {
                  handleToken(argument);
              }
          }
  
          // check the arguments of the last option
          checkRequiredArgs();
  
          // add the default options
          handleProperties(properties);
  
          checkRequiredOptions();
  
          return cmd;
      }