PsiMethod (@NotNull PsiMethod method, @NotNull PsiMethodCallExpression call) { if (method instanceof PsiConstructorCall) return null; if (method instanceof ClsMethodImpl) { PsiMethod sourceMethod = ((ClsMethodImpl)method).getSourceMirrorMethod(); return sourceMethod == null ? null : findReplacementInJavaDoc(sourceMethod, call); } return getReplacementCandidatesFromJavadoc(method, PsiMethod.class, call, RefactoringChangeUtil.getQualifierClass(call.getMethodExpression())) .filter(tagMethod -> areReplaceable(method, tagMethod, call)) .collect(MoreCollectors.onlyOne()) .orElse(null); }