private static boolean isAlreadyPresent(PsiMethod psiMethod, PsiSubstitutor psiSubstitutor,
                                          Collection<Pair<PsiMethod, PsiSubstitutor>> searchedPairs) {
    boolean acceptMethod = true;
    for (Pair<PsiMethod, PsiSubstitutor> someMethodPair : searchedPairs) {
      if (methodMatches(psiMethod, psiSubstitutor, someMethodPair.getFirst(), someMethodPair.getSecond())) {
        acceptMethod = false;
        break;
      }
    }
    return !acceptMethod;
  }
private static boolean isAlreadyPresent(PsiMethod psiMethod, PsiSubstitutor psiSubstitutor,
                                          Collection<Pair<PsiMethod, PsiSubstitutor>> searchedPairs)