I will try to explain the bug,
public void setPattern(String pattern, String wildcardMulti,
String wildcardSingle, String escape)
This method appears to mangle the inputs and store some form and cached the mangled versions.
Since this appears to be used for the accept method, perhaps we should do the mangle when required, and cache it then ... wiping the cache when set is called again.