@Override
    public void visitRegExpBackref(RegExpBackref backref) {
      super.visitRegExpBackref(backref);
      final RegExpGroup target = backref.resolve();
      if (target == null) {
        return;
      }
      final RegExpBranch branch = PsiTreeUtil.getParentOfType(target, RegExpBranch.class);
      if (!PsiTreeUtil.isAncestor(branch, backref, true)) {
        final String message =
          RegExpBundle.message("inspection.warning.group.back.reference.are.in.different.branches", backref.getIndex());
        myHolder.registerProblem(backref, message);
      }
      else if (target.getTextOffset() > backref.getTextOffset()) {
        final String message = RegExpBundle.message("inspection.warning.group.defined.after.back.reference", backref.getIndex());
        myHolder.registerProblem(backref, message);
      }
    }
@Override
    public void visitRegExpBackref(RegExpBackref backref)