private boolean variableSignatureMatch(@NotNull PsiVariable variable1, @NotNull PsiVariable variable2) {
    PsiType type1 = variable1.getType();
    PsiType type2 = variable2.getType();
    if (!typesAreEquivalent(type1, type2)) {
      return false;
    }
    PsiModifierList modifierList1 = variable1.getModifierList();
    PsiModifierList modifierList2 = variable2.getModifierList();
    if (modifierList1 == null || modifierList2 == null) {
      return modifierList1 == modifierList2;
    }
    if (!modifierListsAreEquivalent(modifierList1, modifierList2)) {
      return false;
    }
    markDeclarationsAsEquivalent(variable1, variable2);
    return true;
  }
private boolean variableSignatureMatch(@NotNull PsiVariable variable1, @NotNull PsiVariable variable2)