Eeek.
Looks like the JRE's regex code got into trouble with this pattern.
Really that pattern is a cop-out. I should add specialized footer processing to RevCommit in JGit because scanning things like Signed-off-by lines is really useful for any client that wants to parse a commit message. I just was too lazy to code it at the time in JGit, so Gerrit wound up with this regex. Doing it "right" in JGit would mean scanning a byte[] by hand, which means writing the pattern matcher such that it doesn't have this sort of infinite recursion. :-)
Maybe there is another way to write the pattern that isn't so horribly recursive. Perhaps changing [A-Za-z0-9-]{1,} to [A-Za-z0-9-][A-Za-z0-9-]* for example?