test_class.declarator: accessValidatorApp = new AccessValidatorApp()
      {
          ApplicationContext createApplicationContext()
          {
              return applicationContext;
          }
      }
test_class.modifier: private
test_class.original_string: private AccessValidatorApp accessValidatorApp = new AccessValidatorApp()
      {
          ApplicationContext createApplicationContext()
          {
              return applicationContext;
          }
      };
test_class.type: AccessValidatorApp
test_class.var_name: accessValidatorApp
test_class.file: herd-code/herd-tools/herd-access-validator/src/test/java/org/finra/herd/tools/access/validator/AccessValidatorAppTest.java
test_class.identifier: AccessValidatorAppTest
test_class.superclass: extends AbstractAccessValidatorTest
test_case.body: @Test
      public void testParseCommandLineArgumentsVersionOpt()
      {
          String output = runTestGetSystemOut(() -> {
              String[] arguments = {"--version"};
              assertEquals(ToolsCommonConstants.ReturnValue.SUCCESS, accessValidatorApp.parseCommandLineArguments(arguments, applicationContext));
          });
  
          BuildInformation buildInformation = applicationContext.getBean(BuildInformation.class);
  
          assertEquals("output", String
              .format(DataBridgeApp.BUILD_INFO_STRING_FORMAT, buildInformation.getBuildDate(), buildInformation.getBuildNumber(), buildInformation.getBuildOs(),
                  buildInformation.getBuildUser()), output);
      }
test_case.class_method_signature: AccessValidatorAppTest.testParseCommandLineArgumentsVersionOpt()
test_case.full_signature: @Test public void testParseCommandLineArgumentsVersionOpt()
test_case.identifier: testParseCommandLineArgumentsVersionOpt
test_case.invocations: runTestGetSystemOut assertEquals parseCommandLineArguments getBean assertEquals format getBuildDate getBuildNumber getBuildOs getBuildUser
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseCommandLineArgumentsVersionOpt()
focal_class.declarator: APPLICATION_NAME = "herd-access-validator-app"
focal_class.modifier: static final
focal_class.original_string: static final String APPLICATION_NAME = "herd-access-validator-app";
focal_class.type: String
focal_class.var_name: APPLICATION_NAME
focal_class.declarator: DEFAULT_PROPERTIES_FILE_PATH = ".properties"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_PROPERTIES_FILE_PATH = ".properties";
focal_class.type: String
focal_class.var_name: DEFAULT_PROPERTIES_FILE_PATH
focal_class.declarator: LOGGER = LoggerFactory.getLogger(AccessValidatorApp.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(AccessValidatorApp.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: argParser
focal_class.modifier: private
focal_class.original_string: private ArgumentParser argParser;
focal_class.type: ArgumentParser
focal_class.var_name: argParser
focal_class.declarator: propertiesFilePathOpt
focal_class.modifier: private
focal_class.original_string: private Option propertiesFilePathOpt;
focal_class.type: Option
focal_class.var_name: propertiesFilePathOpt
focal_class.declarator: messageOpt
focal_class.modifier: private
focal_class.original_string: private Option messageOpt;
focal_class.type: Option
focal_class.var_name: messageOpt
focal_class.file: herd-code/herd-tools/herd-access-validator/src/main/java/org/finra/herd/tools/access/validator/AccessValidatorApp.java
focal_class.identifier: AccessValidatorApp
focal_class.class_method_signature: AccessValidatorApp.AccessValidatorApp()
focal_class.full_signature:   AccessValidatorApp()
focal_class.identifier: AccessValidatorApp
focal_class.parameters: ()
focal_class.signature:  AccessValidatorApp()
focal_class.class_method_signature: AccessValidatorApp.main(String[] args)
focal_class.full_signature: @SuppressWarnings("PMD.DoNotCallSystemExit") // Using System.exit is allowed for an actual application to exit. public static void main(String[] args)
focal_class.identifier: main
focal_class.modifiers: @SuppressWarnings("PMD.DoNotCallSystemExit") // Using System.exit is allowed for an actual application to exit. public static
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void main(String[] args)
focal_class.class_method_signature: AccessValidatorApp.createApplicationContext()
focal_class.full_signature:  ApplicationContext createApplicationContext()
focal_class.identifier: createApplicationContext
focal_class.parameters: ()
focal_class.return: ApplicationContext
focal_class.signature: ApplicationContext createApplicationContext()
focal_class.class_method_signature: AccessValidatorApp.go(String[] args)
focal_class.full_signature:  ToolsCommonConstants.ReturnValue go(String[] args)
focal_class.identifier: go
focal_class.parameters: (String[] args)
focal_class.return: ToolsCommonConstants.ReturnValue
focal_class.signature: ToolsCommonConstants.ReturnValue go(String[] args)
focal_class.class_method_signature: AccessValidatorApp.parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_class.full_signature: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.") ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_class.identifier: parseCommandLineArguments
focal_class.modifiers: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.")
focal_class.parameters: (String[] args, ApplicationContext applicationContext)
focal_class.return: ToolsCommonConstants.ReturnValue
focal_class.signature: ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_method.body: @SuppressWarnings("PMD.SystemPrintln")
      @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.")
      ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
      {
          try
          {
              propertiesFilePathOpt = argParser.addArgument("p", "properties", true, "Path to the properties file. Defaults to '.properties'.", false);
              Option helpOpt = argParser.addArgument("h", "help", false, "Display usage information and exit.", false);
              Option versionOpt = argParser.addArgument("v", "version", false, "Display version information and exit.", false);
              messageOpt = argParser.addArgument("m", "message", false, "Use an AWS SQS message", false);
  
  
              // Parse command line arguments without failing on any missing required arguments by passing "false" as the second argument.
              argParser.parseArguments(args, false);
  
              // If help option was specified, then display usage information and return success.
              if (argParser.getBooleanValue(helpOpt))
              {
                  System.out.println(argParser.getUsageInformation());
                  return ToolsCommonConstants.ReturnValue.SUCCESS;
              }
  
              // If version option was specified, then display version information and return success.
              if (argParser.getBooleanValue(versionOpt))
              {
                  BuildInformation buildInformation = applicationContext.getBean(BuildInformation.class);
                  System.out.println(String
                      .format(ToolsCommonConstants.BUILD_INFO_STRING_FORMAT, buildInformation.getBuildDate(), buildInformation.getBuildNumber(),
                          buildInformation.getBuildOs(), buildInformation.getBuildUser()));
                  return ToolsCommonConstants.ReturnValue.SUCCESS;
              }
  
              // Parse command line arguments for the second time, enforcing the required arguments by passing "true" as the second argument.
              argParser.parseArguments(args, true);
          }
          catch (ParseException e)
          {
              // Log a friendly error and return a failure which will cause the application to exit.
              LOGGER.error("Error parsing command line arguments: {}%n{}", e.getMessage(), argParser.getUsageInformation());
              return ToolsCommonConstants.ReturnValue.FAILURE;
          }
  
          // The command line arguments were all parsed successfully so return null to continue processing.
          return null;
      }
focal_method.class_method_signature: AccessValidatorApp.parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_method.full_signature: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.") ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)
focal_method.identifier: parseCommandLineArguments
focal_method.invocations: addArgument addArgument addArgument addArgument parseArguments getBooleanValue println getUsageInformation getBooleanValue getBean println format getBuildDate getBuildNumber getBuildOs getBuildUser parseArguments error getMessage getUsageInformation
focal_method.modifiers: @SuppressWarnings("PMD.SystemPrintln") @SuppressFBWarnings(value = "VA_FORMAT_STRING_USES_NEWLINE", justification = "We will use the standard carriage return character.")
focal_method.parameters: (String[] args, ApplicationContext applicationContext)
focal_method.return: ToolsCommonConstants.ReturnValue
focal_method.signature: ToolsCommonConstants.ReturnValue parseCommandLineArguments(String[] args, ApplicationContext applicationContext)