boolean (PsiMethod method) { PsiClass containingClass = method.getContainingClass(); if (containingClass == null) return false; List<PsiType> methodParams = ContainerUtil.map(method.getParameterList().getParameters(), param -> param.getType()); assert !methodParams.isEmpty(); for (final PsiMethod candidate : containingClass.getMethods()) { if (!candidate.isConstructor() || candidate.equals(method)) continue; List<PsiType> candidateParams = ContainerUtil.map(candidate.getParameterList().getParameters(), param -> param.getType()); if (candidateParams.size() != methodParams.size()) continue; if (TypeUtils.isJavaLangString(candidateParams.get(0)) && methodParams.subList(1, methodParams.size()).equals(candidateParams.subList(1, candidateParams.size()))) { return true; } } return false; }