private static boolean areBranchesEquivalent(RegExpBranch branch1, RegExpBranch branch2) {
    return areElementArraysEquivalent(branch1.getAtoms(), branch2.getAtoms(), false);
  }
private static boolean areBranchesEquivalent(RegExpBranch branch1, RegExpBranch branch2)