test_class.file: server-core/src/test/java/io/onedev/server/util/match/WildcardUtilsTest.java
test_class.identifier: WildcardUtilsTest
test_case.body: @Test
  	public void testRangeOfMatch() {
  		assertEquals("1-3", rangeOfMatch("el", "hello").toString());
  		assertEquals(null, rangeOfMatch("tu", "hello"));
  		assertEquals("3-8", rangeOfMatch("lo*wo", "hello world").toString());
  		assertEquals("3-9", rangeOfMatch("lo*w?r", "hello world").toString());
  		assertEquals("12-37", rangeOfMatch("this*my*program", "hello world this is  my first program").toString());
  	}
test_case.class_method_signature: WildcardUtilsTest.testRangeOfMatch()
test_case.full_signature: @Test public void testRangeOfMatch()
test_case.identifier: testRangeOfMatch
test_case.invocations: assertEquals toString rangeOfMatch assertEquals rangeOfMatch assertEquals toString rangeOfMatch assertEquals toString rangeOfMatch assertEquals toString rangeOfMatch
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRangeOfMatch()
focal_class.declarator: PATH_MATCHER = new PathMatcher()
focal_class.modifier: private static final
focal_class.original_string: private static final Matcher PATH_MATCHER = new PathMatcher();
focal_class.type: Matcher
focal_class.var_name: PATH_MATCHER
focal_class.declarator: STRING_MATCHER = new StringMatcher()
focal_class.modifier: private static final
focal_class.original_string: private static final Matcher STRING_MATCHER = new StringMatcher();
focal_class.type: Matcher
focal_class.var_name: STRING_MATCHER
focal_class.file: server-core/src/main/java/io/onedev/server/util/match/WildcardUtils.java
focal_class.identifier: WildcardUtils
focal_class.class_method_signature: WildcardUtils.matchPath(String pattern, String path)
focal_class.full_signature: public static boolean matchPath(String pattern, String path)
focal_class.identifier: matchPath
focal_class.modifiers: public static
focal_class.parameters: (String pattern, String path)
focal_class.return: boolean
focal_class.signature: boolean matchPath(String pattern, String path)
focal_class.class_method_signature: WildcardUtils.matchString(String pattern, String str)
focal_class.full_signature: public static boolean matchString(String pattern, String str)
focal_class.identifier: matchString
focal_class.modifiers: public static
focal_class.parameters: (String pattern, String str)
focal_class.return: boolean
focal_class.signature: boolean matchString(String pattern, String str)
focal_class.class_method_signature: WildcardUtils.indexOf(String str, String substr, int index)
focal_class.full_signature: private static int indexOf(String str, String substr, int index)
focal_class.identifier: indexOf
focal_class.modifiers: private static
focal_class.parameters: (String str, String substr, int index)
focal_class.return: int
focal_class.signature: int indexOf(String str, String substr, int index)
focal_class.class_method_signature: WildcardUtils.getLiteralRanges(String pattern)
focal_class.full_signature: public static List<LinearRange> getLiteralRanges(String pattern)
focal_class.identifier: getLiteralRanges
focal_class.modifiers: public static
focal_class.parameters: (String pattern)
focal_class.return: List<LinearRange>
focal_class.signature: List<LinearRange> getLiteralRanges(String pattern)
focal_class.class_method_signature: WildcardUtils.applyPattern(String pattern, String str, boolean caseSensitive)
focal_class.full_signature: @Nullable public static PatternApplied applyPattern(String pattern, String str, boolean caseSensitive)
focal_class.identifier: applyPattern
focal_class.modifiers: @Nullable public static
focal_class.parameters: (String pattern, String str, boolean caseSensitive)
focal_class.return: PatternApplied
focal_class.signature: PatternApplied applyPattern(String pattern, String str, boolean caseSensitive)
focal_class.class_method_signature: WildcardUtils.rangeOfMatch(String pattern, String str)
focal_class.full_signature: @Nullable public static LinearRange rangeOfMatch(String pattern, String str)
focal_class.identifier: rangeOfMatch
focal_class.modifiers: @Nullable public static
focal_class.parameters: (String pattern, String str)
focal_class.return: LinearRange
focal_class.signature: LinearRange rangeOfMatch(String pattern, String str)
focal_method.body: @Nullable
      public static LinearRange rangeOfMatch(String pattern, String str) {
  		List<LinearRange> literalRanges = getLiteralRanges(pattern);
  
  		int first = -1;
  		int pos = 0;
  		for (LinearRange literalRange: literalRanges) {
  			String literal = pattern.substring(literalRange.getFrom(), literalRange.getTo());
  			int index = indexOf(str, literal, pos);
  			if (index != -1) {
  				if (first == -1)
  					first = index;
  				pos = index+literal.length();
  			} else {
  				return null;
  			}
  		}
  		return new LinearRange(first, pos);
      }
focal_method.class_method_signature: WildcardUtils.rangeOfMatch(String pattern, String str)
focal_method.full_signature: @Nullable public static LinearRange rangeOfMatch(String pattern, String str)
focal_method.identifier: rangeOfMatch
focal_method.invocations: getLiteralRanges substring getFrom getTo indexOf length
focal_method.modifiers: @Nullable public static
focal_method.parameters: (String pattern, String str)
focal_method.return: LinearRange
focal_method.signature: LinearRange rangeOfMatch(String pattern, String str)