code: 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;
      }
docs: Parse the arguments according to the specified options and properties.
  
  @param options         the specified Options
  @param arguments       the command line arguments
  @param properties      command line option name-value pairs
  @param stopAtNonOption if <tt>true</tt> an unrecognized argument stops
  the parsing and the remaining arguments are added to the
  {@link CommandLine}s args list. If <tt>false</tt> an unrecognized
  argument triggers a ParseException.
  
  @return the list of atomic option and value tokens
  @throws ParseException if there are any problems encountered
  while parsing the command line tokens.