private static boolean hasCovariantOverridingOrNotPublic(PsiClass baseClass, PsiMethod[] refMethods) {
    for (PsiMethod method : refMethods) {
      final PsiType methodReturnType = method.getReturnType();
      for (PsiMethod superMethod : method.findSuperMethods(baseClass)) {
        if (!Comparing.equal(methodReturnType, superMethod.getReturnType())) {
          return true;
        }

        if (!superMethod.hasModifierProperty(PsiModifier.PUBLIC)) {
          return true;
        }
      }
    }
    return false;
  }
private static boolean hasCovariantOverridingOrNotPublic(PsiClass baseClass, PsiMethod[] refMethods)