test_class.file: client/src/test/java/org/apache/ivory/cli/TestCLIParser.java
test_class.identifier: TestCLIParser
test_case.body: @Test
  	public void testEmptyParser() throws Exception {
  		try {
  			CLIParser parser = new CLIParser("ivory", new String[] {});
  			CLIParser.Command c = parser.parse(new String[] { "a" });
  			Assert.fail();
  		} catch (ParseException ex) {
  			// nop
  		}
  	}
test_case.class_method_signature: TestCLIParser.testEmptyParser()
test_case.full_signature: @Test public void testEmptyParser()
test_case.identifier: testEmptyParser
test_case.invocations: parse fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmptyParser()
focal_class.declarator: LEFT_PADDING = "      "
focal_class.modifier: private static final
focal_class.original_string: private static final String LEFT_PADDING = "      ";
focal_class.type: String
focal_class.var_name: LEFT_PADDING
focal_class.declarator: cliName
focal_class.modifier: private
focal_class.original_string: private String cliName;
focal_class.type: String
focal_class.var_name: cliName
focal_class.declarator: cliHelp
focal_class.modifier: private
focal_class.original_string: private String[] cliHelp;
focal_class.type: String[]
focal_class.var_name: cliHelp
focal_class.declarator: commands = new LinkedHashMap<String, Options>()
focal_class.modifier: private
focal_class.original_string: private Map<String, Options> commands = new LinkedHashMap<String, Options>();
focal_class.type: Map<String, Options>
focal_class.var_name: commands
focal_class.declarator: commandWithArgs = new LinkedHashMap<String, Boolean>()
focal_class.modifier: private
focal_class.original_string: private Map<String, Boolean> commandWithArgs = new LinkedHashMap<String, Boolean>();
focal_class.type: Map<String, Boolean>
focal_class.var_name: commandWithArgs
focal_class.declarator: commandsHelp = new LinkedHashMap<String, String>()
focal_class.modifier: private
focal_class.original_string: private Map<String, String> commandsHelp = new LinkedHashMap<String, String>();
focal_class.type: Map<String, String>
focal_class.var_name: commandsHelp
focal_class.file: client/src/main/java/org/apache/ivory/cli/CLIParser.java
focal_class.identifier: CLIParser
focal_class.class_method_signature: CLIParser.CLIParser(String cliName, String[] cliHelp)
focal_class.full_signature: public  CLIParser(String cliName, String[] cliHelp)
focal_class.identifier: CLIParser
focal_class.modifiers: public
focal_class.parameters: (String cliName, String[] cliHelp)
focal_class.signature:  CLIParser(String cliName, String[] cliHelp)
focal_class.class_method_signature: CLIParser.addCommand(String command, String argsHelp, String commandHelp, Options commandOptions,
                             boolean hasArguments)
focal_class.full_signature: public void addCommand(String command, String argsHelp, String commandHelp, Options commandOptions,
                             boolean hasArguments)
focal_class.identifier: addCommand
focal_class.modifiers: public
focal_class.parameters: (String command, String argsHelp, String commandHelp, Options commandOptions,
                             boolean hasArguments)
focal_class.return: void
focal_class.signature: void addCommand(String command, String argsHelp, String commandHelp, Options commandOptions,
                             boolean hasArguments)
focal_class.class_method_signature: CLIParser.parse(String[] args)
focal_class.full_signature: public Command parse(String[] args)
focal_class.identifier: parse
focal_class.modifiers: public
focal_class.parameters: (String[] args)
focal_class.return: Command
focal_class.signature: Command parse(String[] args)
focal_class.class_method_signature: CLIParser.shortHelp()
focal_class.full_signature: public String shortHelp()
focal_class.identifier: shortHelp
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String shortHelp()
focal_class.class_method_signature: CLIParser.showHelp()
focal_class.full_signature: public void showHelp()
focal_class.identifier: showHelp
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void showHelp()
focal_method.body: public Command parse(String[] args) throws ParseException {
          if (args.length == 0) {
              throw new ParseException("missing sub-command");
          }
          else {
              if (commands.containsKey(args[0])) {
                  GnuParser parser = new GnuParser();
                  String[] minusCommand = new String[args.length - 1];
                  System.arraycopy(args, 1, minusCommand, 0, minusCommand.length);
                  return new Command(args[0], parser.parse(commands.get(args[0]), minusCommand,
                                                           commandWithArgs.get(args[0])));
              }
              else {
                  throw new ParseException(MessageFormat.format("invalid sub-command [{0}]", args[0]));
              }
          }
      }
focal_method.class_method_signature: CLIParser.parse(String[] args)
focal_method.full_signature: public Command parse(String[] args)
focal_method.identifier: parse
focal_method.invocations: containsKey arraycopy parse get get format
focal_method.modifiers: public
focal_method.parameters: (String[] args)
focal_method.return: Command
focal_method.signature: Command parse(String[] args)