test_class.file: netflix-infix/src/test/java/com/netflix/infix/RegexValuePredicateTest.java
test_class.identifier: RegexValuePredicateTest
test_case.body: @Test
  	public void testNormalMatch() throws Exception {
  		Object[][] inputs = {
  			{"a123cd", "a[0-9]+cd", MatchPolicy.FULL, true},
  			{"", "",  MatchPolicy.FULL, true}, 
  			{"", "^$",  MatchPolicy.FULL, true},
  			{"32abde23", "[a-z]+",  MatchPolicy.FULL, false},
  			{"32abde23", "[a-z]+", MatchPolicy.PARTIAL, true},
  			{null, ".*", MatchPolicy.PARTIAL, false},
  			{null, ".*",  MatchPolicy.FULL, false},
  			{null, "", MatchPolicy.PARTIAL, false}
  		};
  		
  		for(Object[] input : inputs){
  			String value = (String)input[0];
  			String regex = (String)input[1];
  			MatchPolicy policy = (MatchPolicy)input[2];
  			boolean expected = (Boolean) input[3];
  			
  			RegexValuePredicate pred = new RegexValuePredicate(regex, policy);
  		
  			assertEquals(
  				String.format("Given regex = %s, isPartial = %s, and input = %s", regex, policy, value), 
  				expected, 
  				pred.apply(value));
  		}
  		
  	}
test_case.class_method_signature: RegexValuePredicateTest.testNormalMatch()
test_case.full_signature: @Test public void testNormalMatch()
test_case.identifier: testNormalMatch
test_case.invocations: assertEquals format apply
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNormalMatch()
focal_class.declarator: regex
focal_class.modifier: private
focal_class.original_string: private String regex;
focal_class.type: String
focal_class.var_name: regex
focal_class.declarator: pattern
focal_class.modifier: private
focal_class.original_string: private Pattern pattern;
focal_class.type: Pattern
focal_class.var_name: pattern
focal_class.declarator: policy
focal_class.modifier: private
focal_class.original_string: private MatchPolicy policy;
focal_class.type: MatchPolicy
focal_class.var_name: policy
focal_class.file: netflix-infix/src/main/java/com/netflix/infix/RegexValuePredicate.java
focal_class.identifier: RegexValuePredicate
focal_class.interfaces: implements ValuePredicate<String>
focal_class.class_method_signature: RegexValuePredicate.RegexValuePredicate(String regex, MatchPolicy policy)
focal_class.full_signature: public  RegexValuePredicate(String regex, MatchPolicy policy)
focal_class.identifier: RegexValuePredicate
focal_class.modifiers: public
focal_class.parameters: (String regex, MatchPolicy policy)
focal_class.signature:  RegexValuePredicate(String regex, MatchPolicy policy)
focal_class.class_method_signature: RegexValuePredicate.apply(@Nullable String input)
focal_class.full_signature: @Override public boolean apply(@Nullable String input)
focal_class.identifier: apply
focal_class.modifiers: @Override public
focal_class.parameters: (@Nullable String input)
focal_class.return: boolean
focal_class.signature: boolean apply(@Nullable String input)
focal_class.class_method_signature: RegexValuePredicate.getPattern()
focal_class.full_signature: public String getPattern()
focal_class.identifier: getPattern
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPattern()
focal_class.class_method_signature: RegexValuePredicate.getMatchPolicy()
focal_class.full_signature: public MatchPolicy getMatchPolicy()
focal_class.identifier: getMatchPolicy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: MatchPolicy
focal_class.signature: MatchPolicy getMatchPolicy()
focal_class.class_method_signature: RegexValuePredicate.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: RegexValuePredicate.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: RegexValuePredicate.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_method.body: @Override
      public boolean apply(@Nullable String input) {
  		if(input == null){
  			return false;
  		}
  		
  	    if(policy == MatchPolicy.PARTIAL){
  	    	return pattern.matcher(input).find();
  	    }
  	    
  	    if(policy == MatchPolicy.FULL){
  	    	return pattern.matcher(input).matches();
  	    }
  	    
  	    throw new UnsupportedOperationException(String.format("the match policy %s is not supported", policy));
      }
focal_method.class_method_signature: RegexValuePredicate.apply(@Nullable String input)
focal_method.full_signature: @Override public boolean apply(@Nullable String input)
focal_method.identifier: apply
focal_method.invocations: find matcher matches matcher format
focal_method.modifiers: @Override public
focal_method.parameters: (@Nullable String input)
focal_method.return: boolean
focal_method.signature: boolean apply(@Nullable String input)