boolean (PsiMethod method, PsiClass ancestorClass) { final String methodName = method.getName(); final PsiParameterList parameterList = method.getParameterList(); final PsiParameter[] parameters = parameterList.getParameters(); final PsiMethod[] methods = ancestorClass.findMethodsByName(methodName, false); for (final PsiMethod testMethod : methods) { if (!testMethod.hasModifierProperty(PsiModifier.PRIVATE) && !testMethod.hasModifierProperty(PsiModifier.STATIC) && !testMethod.hasModifierProperty(PsiModifier.ABSTRACT) && !isOverriddenInClass(testMethod, method.getContainingClass())) { final PsiParameterList testParameterList = testMethod.getParameterList(); final PsiParameter[] testParameters = testParameterList.getParameters(); if (testParameters.length == parameters.length) { if (reportIncompatibleParameters || parametersAreCompatible(parameters, testParameters)) { return true; } } } } return false; }