test_class.file: core/src/test/java/com/qihoo/qsql/launcher/OptionsParserTest.java
test_class.identifier: OptionsParserTest
test_case.body: @Test
      public void testBasicFunction() throws ParseException {
          String[] args = {
              "--runner", "SPARK",
              "--master", "yarn-client",
              "--jar_name", "qsql-0.1.jar",
              "--jar", "tools.jar;sun.jar",
              "--sql", Base64.encode(("select * from department dep inner join "
              + "homework_content cont on dep.dep_id = cont.stu_id").getBytes()),
          };
  
          OptionsParser parser = new OptionsParser(args);
          Assert.assertEquals(parser.getOptionValue(SubmitOption.JAR_NAME), "qsql-0.1.jar");
          Assert.assertEquals(parser.getOptionValue(SubmitOption.MASTER_MODE), "yarn-client");
          Assert.assertEquals(parser.getOptionValue(SubmitOption.RUNNER), "SPARK");
          Assert.assertEquals(parser.getOptionValue(SubmitOption.JAR), "tools.jar;sun.jar");
      }
test_case.class_method_signature: OptionsParserTest.testBasicFunction()
test_case.full_signature: @Test public void testBasicFunction()
test_case.identifier: testBasicFunction
test_case.invocations: encode getBytes assertEquals getOptionValue assertEquals getOptionValue assertEquals getOptionValue assertEquals getOptionValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBasicFunction()
focal_class.declarator: commandLine
focal_class.modifier: private
focal_class.original_string: private CommandLine commandLine;
focal_class.type: CommandLine
focal_class.var_name: commandLine
focal_class.file: core/src/main/java/com/qihoo/qsql/launcher/OptionsParser.java
focal_class.identifier: OptionsParser
focal_class.class_method_signature: OptionsParser.OptionsParser(String[] args)
focal_class.full_signature: public  OptionsParser(String[] args)
focal_class.identifier: OptionsParser
focal_class.modifiers: public
focal_class.parameters: (String[] args)
focal_class.signature:  OptionsParser(String[] args)
focal_class.class_method_signature: OptionsParser.parseOptions(String[] args)
focal_class.full_signature: private void parseOptions(String[] args)
focal_class.identifier: parseOptions
focal_class.modifiers: private
focal_class.parameters: (String[] args)
focal_class.return: void
focal_class.signature: void parseOptions(String[] args)
focal_class.class_method_signature: OptionsParser.getOptionValue(SubmitOption option)
focal_class.full_signature: public String getOptionValue(SubmitOption option)
focal_class.identifier: getOptionValue
focal_class.modifiers: public
focal_class.parameters: (SubmitOption option)
focal_class.return: String
focal_class.signature: String getOptionValue(SubmitOption option)
focal_method.body: public String getOptionValue(SubmitOption option) {
          String value;
          if (commandLine.hasOption(option.key)
              && ! (value = commandLine.getOptionValue(option.key)).isEmpty()) {
              return value;
          } else {
              if (option.value == null || option.value.isEmpty()) {
                  throw new RuntimeException("Option " + option.key + " is indispensable."
                      + " Please complete options then retry to run.");
              }
              return option.value;
          }
      }
focal_method.class_method_signature: OptionsParser.getOptionValue(SubmitOption option)
focal_method.full_signature: public String getOptionValue(SubmitOption option)
focal_method.identifier: getOptionValue
focal_method.invocations: hasOption isEmpty getOptionValue isEmpty
focal_method.modifiers: public
focal_method.parameters: (SubmitOption option)
focal_method.return: String
focal_method.signature: String getOptionValue(SubmitOption option)