test_class.file: runelite-client/src/test/java/net/runelite/client/util/WildcardMatcherTest.java
test_class.identifier: WildcardMatcherTest
test_case.body: @Test
  	public void testMatches()
  	{
  		assertTrue(matches("rune*", "rune pouch"));
  		assertTrue(matches("rune*", "Rune pouch"));
  		assertFalse(matches("Abyssal whip", "Adamant dagger"));
  		assertTrue(matches("rune*", "Runeite Ore"));
  		assertTrue(matches("Abyssal whip", "Abyssal whip"));
  	}
test_case.class_method_signature: WildcardMatcherTest.testMatches()
test_case.full_signature: @Test public void testMatches()
test_case.identifier: testMatches
test_case.invocations: assertTrue matches assertTrue matches assertFalse matches assertTrue matches assertTrue matches
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMatches()
focal_class.declarator: WILDCARD_PATTERN = Pattern.compile("(?i)[^*]+|(\\*)")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern WILDCARD_PATTERN = Pattern.compile("(?i)[^*]+|(\\*)");
focal_class.type: Pattern
focal_class.var_name: WILDCARD_PATTERN
focal_class.file: runelite-client/src/main/java/net/runelite/client/util/WildcardMatcher.java
focal_class.identifier: WildcardMatcher
focal_class.class_method_signature: WildcardMatcher.matches(String pattern, String text)
focal_class.full_signature: public static boolean matches(String pattern, String text)
focal_class.identifier: matches
focal_class.modifiers: public static
focal_class.parameters: (String pattern, String text)
focal_class.return: boolean
focal_class.signature: boolean matches(String pattern, String text)
focal_method.body: public static boolean matches(String pattern, String text)
  	{
  		final Matcher matcher = WILDCARD_PATTERN.matcher(pattern);
  		final StringBuffer buffer = new StringBuffer();
  
  		buffer.append("(?i)");
  		while (matcher.find())
  		{
  			if (matcher.group(1) != null)
  			{
  				matcher.appendReplacement(buffer, ".*");
  			}
  			else
  			{
  				matcher.appendReplacement(buffer, "\\\\Q" + matcher.group(0) + "\\\\E");
  			}
  		}
  
  		matcher.appendTail(buffer);
  		final String replaced = buffer.toString();
  
  		return text.matches(replaced);
  	}
focal_method.class_method_signature: WildcardMatcher.matches(String pattern, String text)
focal_method.full_signature: public static boolean matches(String pattern, String text)
focal_method.identifier: matches
focal_method.invocations: matcher append find group appendReplacement appendReplacement group appendTail toString matches
focal_method.modifiers: public static
focal_method.parameters: (String pattern, String text)
focal_method.return: boolean
focal_method.signature: boolean matches(String pattern, String text)