test_class.file: client/src/test/java/org/apache/ivory/entity/v0/DateValidatorTest.java
test_class.identifier: DateValidatorTest
test_case.body: @Test(dataProvider = "InvalidDateProvider", 
                   dependsOnMethods="ValidDateTest")
  	public void InValidDateTest(String date) {
  		boolean valid = DateValidator.validate(date);
  		System.out.println("Date is valid : " + date + " , " + valid);
  		Assert.assertEquals(valid, false); 
  	}
test_case.class_method_signature: DateValidatorTest.InValidDateTest(String date)
test_case.full_signature: @Test(dataProvider = "InvalidDateProvider", dependsOnMethods="ValidDateTest") public void InValidDateTest(String date)
test_case.identifier: InValidDateTest
test_case.invocations: validate println assertEquals
test_case.modifiers: @Test(dataProvider = "InvalidDateProvider", dependsOnMethods="ValidDateTest") public
test_case.parameters: (String date)
test_case.return: void
test_case.signature: void InValidDateTest(String date)
focal_class.declarator: DATE_PATTERN = "(2\\d\\d\\d|19\\d\\d)-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5][0-9])Z"
focal_class.modifier: private static final
focal_class.original_string: private static final String DATE_PATTERN = "(2\\d\\d\\d|19\\d\\d)-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])T([0-1][0-9]|2[0-3]):([0-5][0-9])Z";
focal_class.type: String
focal_class.var_name: DATE_PATTERN
focal_class.declarator: pattern = Pattern.compile(DATE_PATTERN)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern pattern = Pattern.compile(DATE_PATTERN);
focal_class.type: Pattern
focal_class.var_name: pattern
focal_class.file: client/src/main/java/org/apache/ivory/entity/v0/DateValidator.java
focal_class.identifier: DateValidator
focal_class.class_method_signature: DateValidator.validate(final String date)
focal_class.full_signature: public static boolean validate(final String date)
focal_class.identifier: validate
focal_class.modifiers: public static
focal_class.parameters: (final String date)
focal_class.return: boolean
focal_class.signature: boolean validate(final String date)
focal_method.body: public static boolean validate(final String date) {
  
  		Matcher matcher = pattern.matcher(date);
  
  		if (matcher.matches()) {
  
  			matcher.reset();
  
  			if (matcher.find()) {
  
  				int year = Integer.parseInt(matcher.group(1));
  				String month = matcher.group(2);
  				String day = matcher.group(3);
  
  				if (day.equals("31")
  						&& (month.equals("4") || month.equals("6")
  								|| month.equals("9") || month.equals("11")
  								|| month.equals("04") || month.equals("06") || month
  									.equals("09"))) {
  					return false; // only 1,3,5,7,8,10,12 has 31 days
  				} else if (month.equals("2") || month.equals("02")) {
  					// leap year
  					if (year % 4 == 0) {
  						if (day.equals("30") || day.equals("31")) {
  							return false;
  						} else {
  							return true;
  						}
  					} else {
  						if (day.equals("29") || day.equals("30")
  								|| day.equals("31")) {
  							return false;
  						} else {
  							return true;
  						}
  					}
  				} else {
  					return true;
  				}
  			} else {
  				return false;
  			}
  		} else {
  			return false;
  		}
  	}
focal_method.class_method_signature: DateValidator.validate(final String date)
focal_method.full_signature: public static boolean validate(final String date)
focal_method.identifier: validate
focal_method.invocations: matcher matches reset find parseInt group group group equals equals equals equals equals equals equals equals equals equals equals equals equals equals equals
focal_method.modifiers: public static
focal_method.parameters: (final String date)
focal_method.return: boolean
focal_method.signature: boolean validate(final String date)