test_class.file: dbfit-java/teradata/src/test/java/dbfit/environment/TeradataDatePeriodParseDelegateTest.java
test_class.identifier: TeradataDatePeriodParseDelegateTest
test_case.body: @Test
      public void parseTest() {
  
          String fromStr = "2012-11-11";
          String toStr = "2014-06-02";
  
          DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
          Date fromDate = null;
          Date toDate = null;
  
          try {
              fromDate = dateFormat.parse(fromStr);
              toDate = dateFormat.parse(toStr);
          }
          catch (ParseException e) {
              throw new Error("TeradataDatePeriodTest: toStringTest: error parsing test input");
          }
  
          Date[] range = {fromDate, toDate};
          TeradataDatePeriod tp = new TeradataDatePeriod(range);
  
          TeradataDatePeriod tp2 = null;
          try {
              tp2 = (TeradataDatePeriod) TeradataDatePeriodParseDelegate.parse(fromStr + "," + toStr);
          }
          catch (Exception e) {
              throw new Error("During TeradataDatePeriodParseDelegate.parse(" + fromStr + "," + toStr + ")");
          }
  
          assertTrue("Date period parse does not produce expected object", tp.equals(tp2));
      }
test_case.class_method_signature: TeradataDatePeriodParseDelegateTest.parseTest()
test_case.full_signature: @Test public void parseTest()
test_case.identifier: parseTest
test_case.invocations: parse parse parse assertTrue equals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parseTest()
focal_class.declarator: df = DateFormat.getDateInstance()
focal_class.modifier: private static
focal_class.original_string: private static DateFormat df = DateFormat.getDateInstance();
focal_class.type: DateFormat
focal_class.var_name: df
focal_class.file: dbfit-java/teradata/src/main/java/dbfit/environment/TeradataDatePeriodParseDelegate.java
focal_class.identifier: TeradataDatePeriodParseDelegate
focal_class.class_method_signature: TeradataDatePeriodParseDelegate.parse(String s)
focal_class.full_signature: public static Object parse(String s)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (String s)
focal_class.return: Object
focal_class.signature: Object parse(String s)
focal_method.body: public static Object parse(String s) throws Exception {
          System.out.println("TeradataDatePeriodParseDelegate: parse: s: " + s);
          String[] periodParts = s.split(",");
          java.sql.Date F;
          java.sql.Date T;
          java.util.Date ParsedFrom;
          java.util.Date ParsedTo;
  
          try {
              //ParsedFrom = java.sql.Date.valueOf(periodParts[0]);
              F = java.sql.Date.valueOf(periodParts[0]);
          } catch (IllegalArgumentException iex) {
              java.util.Date ud = df.parse(periodParts[0]);
              //ParsedFrom = new java.sql.Date(ud.getTime());
              F = new java.sql.Date(ud.getTime());
          }
  
          try {
              //ParsedTo = java.sql.Date.valueOf(periodParts[1]);
              T = java.sql.Date.valueOf(periodParts[1]);
          } catch (IllegalArgumentException iex) {
              java.util.Date ud = df.parse(periodParts[1]);
              //ParsedTo = new java.sql.Date(ud.getTime());
              T = new java.sql.Date(ud.getTime());
          }
  
          Object[] data = { F, T };
  
          //return new TeradataDatePeriod(ParsedFrom, ParsedTo);
          return new TeradataDatePeriod(data);
      }
focal_method.class_method_signature: TeradataDatePeriodParseDelegate.parse(String s)
focal_method.full_signature: public static Object parse(String s)
focal_method.identifier: parse
focal_method.invocations: println split valueOf parse getTime valueOf parse getTime
focal_method.modifiers: public static
focal_method.parameters: (String s)
focal_method.return: Object
focal_method.signature: Object parse(String s)