test_class.file: herd-code/herd-core/src/test/java/org/finra/herd/core/ArgumentParserTest.java
test_class.identifier: ArgumentParserTest
test_class.superclass: extends AbstractCoreTest
test_case.body: @Test
      public void testAddArgument()
      {
          Option opt1 = new Option("a", "some_flag", false, "Some flag parameter");
          Option opt2 = new Option("b", "some_parameter", true, "Some parameter with an argument");
  
          List<String> optionsIn = Arrays.asList(optionToString(opt1), optionToString(opt2));
  
          ArgumentParser argParser = new ArgumentParser("");
  
          argParser.addArgument(opt1, true);
          argParser.addArgument(opt2.getOpt(), opt2.getLongOpt(), opt2.hasArg(), opt2.getDescription(), false);
  
          Collection resultOptions = argParser.getConfiguredOptions();
  
          List<String> optionsOut = new ArrayList<>();
  
          for (Object obj : resultOptions)
          {
              assertTrue(obj instanceof Option);
              optionsOut.add(optionToString((Option) obj));
          }
  
          optionsOut.containsAll(optionsIn);
          optionsIn.containsAll(optionsOut);
      }
test_case.class_method_signature: ArgumentParserTest.testAddArgument()
test_case.full_signature: @Test public void testAddArgument()
test_case.identifier: testAddArgument
test_case.invocations: asList optionToString optionToString addArgument addArgument getOpt getLongOpt hasArg getDescription getConfiguredOptions assertTrue add optionToString containsAll containsAll
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddArgument()
focal_class.declarator: applicationName
focal_class.modifier: protected
focal_class.original_string: protected String applicationName;
focal_class.type: String
focal_class.var_name: applicationName
focal_class.declarator: options
focal_class.modifier: protected
focal_class.original_string: protected Options options;
focal_class.type: Options
focal_class.var_name: options
focal_class.declarator: optionsIgnoreRequired
focal_class.modifier: protected
focal_class.original_string: protected Options optionsIgnoreRequired;
focal_class.type: Options
focal_class.var_name: optionsIgnoreRequired
focal_class.declarator: commandLine
focal_class.modifier: protected
focal_class.original_string: protected CommandLine commandLine;
focal_class.type: CommandLine
focal_class.var_name: commandLine
focal_class.file: herd-code/herd-core/src/main/java/org/finra/herd/core/ArgumentParser.java
focal_class.identifier: ArgumentParser
focal_class.class_method_signature: ArgumentParser.ArgumentParser(String applicationName)
focal_class.full_signature: public  ArgumentParser(String applicationName)
focal_class.identifier: ArgumentParser
focal_class.modifiers: public
focal_class.parameters: (String applicationName)
focal_class.signature:  ArgumentParser(String applicationName)
focal_class.class_method_signature: ArgumentParser.getApplicationName()
focal_class.full_signature: public String getApplicationName()
focal_class.identifier: getApplicationName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getApplicationName()
focal_class.class_method_signature: ArgumentParser.addArgument(Option option, boolean required)
focal_class.full_signature: public Option addArgument(Option option, boolean required)
focal_class.identifier: addArgument
focal_class.modifiers: public
focal_class.parameters: (Option option, boolean required)
focal_class.return: Option
focal_class.signature: Option addArgument(Option option, boolean required)
focal_class.class_method_signature: ArgumentParser.addArgument(String opt, String longOpt, boolean hasArg, String description, boolean required)
focal_class.full_signature: public Option addArgument(String opt, String longOpt, boolean hasArg, String description, boolean required)
focal_class.identifier: addArgument
focal_class.modifiers: public
focal_class.parameters: (String opt, String longOpt, boolean hasArg, String description, boolean required)
focal_class.return: Option
focal_class.signature: Option addArgument(String opt, String longOpt, boolean hasArg, String description, boolean required)
focal_class.class_method_signature: ArgumentParser.getConfiguredOptions()
focal_class.full_signature: public Collection getConfiguredOptions()
focal_class.identifier: getConfiguredOptions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection
focal_class.signature: Collection getConfiguredOptions()
focal_class.class_method_signature: ArgumentParser.parseArguments(String[] args, boolean failOnMissingRequiredOptions)
focal_class.full_signature: public void parseArguments(String[] args, boolean failOnMissingRequiredOptions)
focal_class.identifier: parseArguments
focal_class.modifiers: public
focal_class.parameters: (String[] args, boolean failOnMissingRequiredOptions)
focal_class.return: void
focal_class.signature: void parseArguments(String[] args, boolean failOnMissingRequiredOptions)
focal_class.class_method_signature: ArgumentParser.parseArguments(String[] args)
focal_class.full_signature: public void parseArguments(String[] args)
focal_class.identifier: parseArguments
focal_class.modifiers: public
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void parseArguments(String[] args)
focal_class.class_method_signature: ArgumentParser.getUsageInformation()
focal_class.full_signature: public String getUsageInformation()
focal_class.identifier: getUsageInformation
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getUsageInformation()
focal_class.class_method_signature: ArgumentParser.getBooleanValue(Option option)
focal_class.full_signature: @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public Boolean getBooleanValue(Option option)
focal_class.identifier: getBooleanValue
focal_class.modifiers: @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public
focal_class.parameters: (Option option)
focal_class.return: Boolean
focal_class.signature: Boolean getBooleanValue(Option option)
focal_class.class_method_signature: ArgumentParser.getStringValueAsBoolean(Option option, Boolean defaultValue)
focal_class.full_signature: @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public Boolean getStringValueAsBoolean(Option option, Boolean defaultValue)
focal_class.identifier: getStringValueAsBoolean
focal_class.modifiers: @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public
focal_class.parameters: (Option option, Boolean defaultValue)
focal_class.return: Boolean
focal_class.signature: Boolean getStringValueAsBoolean(Option option, Boolean defaultValue)
focal_class.class_method_signature: ArgumentParser.getStringValue(Option option)
focal_class.full_signature: @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public String getStringValue(Option option)
focal_class.identifier: getStringValue
focal_class.modifiers: @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public
focal_class.parameters: (Option option)
focal_class.return: String
focal_class.signature: String getStringValue(Option option)
focal_class.class_method_signature: ArgumentParser.ensureCommandLineNotNull()
focal_class.full_signature: private void ensureCommandLineNotNull()
focal_class.identifier: ensureCommandLineNotNull
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void ensureCommandLineNotNull()
focal_class.class_method_signature: ArgumentParser.getStringValue(Option option, String defaultValue)
focal_class.full_signature: public String getStringValue(Option option, String defaultValue)
focal_class.identifier: getStringValue
focal_class.modifiers: public
focal_class.parameters: (Option option, String defaultValue)
focal_class.return: String
focal_class.signature: String getStringValue(Option option, String defaultValue)
focal_class.class_method_signature: ArgumentParser.getIntegerValue(Option option)
focal_class.full_signature: public Integer getIntegerValue(Option option)
focal_class.identifier: getIntegerValue
focal_class.modifiers: public
focal_class.parameters: (Option option)
focal_class.return: Integer
focal_class.signature: Integer getIntegerValue(Option option)
focal_class.class_method_signature: ArgumentParser.getIntegerValue(Option option, Integer defaultValue)
focal_class.full_signature: public Integer getIntegerValue(Option option, Integer defaultValue)
focal_class.identifier: getIntegerValue
focal_class.modifiers: public
focal_class.parameters: (Option option, Integer defaultValue)
focal_class.return: Integer
focal_class.signature: Integer getIntegerValue(Option option, Integer defaultValue)
focal_class.class_method_signature: ArgumentParser.getIntegerValue(Option option, Integer defaultValue, Integer minValue, Integer maxValue)
focal_class.full_signature: public Integer getIntegerValue(Option option, Integer defaultValue, Integer minValue, Integer maxValue)
focal_class.identifier: getIntegerValue
focal_class.modifiers: public
focal_class.parameters: (Option option, Integer defaultValue, Integer minValue, Integer maxValue)
focal_class.return: Integer
focal_class.signature: Integer getIntegerValue(Option option, Integer defaultValue, Integer minValue, Integer maxValue)
focal_class.class_method_signature: ArgumentParser.getFileValue(Option option)
focal_class.full_signature: public File getFileValue(Option option)
focal_class.identifier: getFileValue
focal_class.modifiers: public
focal_class.parameters: (Option option)
focal_class.return: File
focal_class.signature: File getFileValue(Option option)
focal_class.class_method_signature: ArgumentParser.getFileValue(Option option, File defaultValue)
focal_class.full_signature: public File getFileValue(Option option, File defaultValue)
focal_class.identifier: getFileValue
focal_class.modifiers: public
focal_class.parameters: (Option option, File defaultValue)
focal_class.return: File
focal_class.signature: File getFileValue(Option option, File defaultValue)
focal_method.body: public Option addArgument(Option option, boolean required)
      {
          optionsIgnoreRequired.addOption((Option) option.clone());
  
          option.setRequired(required);
          options.addOption(option);
  
          return option;
      }
focal_method.class_method_signature: ArgumentParser.addArgument(Option option, boolean required)
focal_method.full_signature: public Option addArgument(Option option, boolean required)
focal_method.identifier: addArgument
focal_method.invocations: addOption clone setRequired addOption
focal_method.modifiers: public
focal_method.parameters: (Option option, boolean required)
focal_method.return: Option
focal_method.signature: Option addArgument(Option option, boolean required)