There is one non-deterministic use case of using type coercion from java.util.regex.Matcher to a boolean. It was initially reported on Stack Overflow - https://stackoverflow.com/q/52930876/2194470
And here is an example that shows the problem:
This problem can be solved by replacing matcher.find() with matcher.find(0), so casting matcher to a boolean does not modify search index and always starts from the beginning.
I will create a pull request in couple of minutes.