These are patches for two implementations
One (poregex.patch) is an implementation applying optimization mentioned above in the JIRA.
Second (poregex2.patch) implementation applies optimization 1 and uses dk.brics.automaton for running simple regular expressions. Otherwise it reverts back to java.util.regex.
In 1 the decision to use optimization two or use java.util.regex is decided by getSimpleString method
In 2 the decision to use dk.brics.automaton is done by determineBestRegexMethod. ( changes to build.xml is this patch are temporary )
Both patches use RegexInit as an implementation which makes a decision ( calling the above mentioned decision functions ) and then sets the implementation to one decided by the decision function.
In second patch, the decision function was created looking at the support of operators in dk.brics.automaton and its grammar. I tried out the classes supported and not supported in dk.brics.automaton and decided upon it.
I could not find any specific page mentioning the difference between regex language java.util.regex and dk.brics.automaton.