private static boolean isDuplicate(PsiJavaCodeReferenceElement element,
                                     PsiJavaCodeReferenceElement otherElement,
                                     @NotNull PsiClass aClass) {
    final PsiManager manager = aClass.getManager();
    return !manager.areElementsEquivalent(otherElement, element) && manager.areElementsEquivalent(otherElement.resolve(), aClass);
  }
private static boolean isDuplicate(PsiJavaCodeReferenceElement element,
                                     PsiJavaCodeReferenceElement otherElement,
                                     @NotNull PsiClass aClass)