Integer (@NotNull LookupElement element) { final PsiElement psi = ObjectUtils.tryCast(element.getObject(), PsiElement.class); if (!(psi instanceof PsiMember)) { return null; } if (element.getUserData(JavaGenerateMemberCompletionContributor.GENERATE_ELEMENT) != null) { return null; } if (OBJECT_METHOD_PATTERN.accepts(psi)) { return null; } if (looksLikeHelperMethodOrConst(psi)) { return null; } final Integer occurrenceCount = myCompilerReferenceService.getCompileTimeOccurrenceCount(psi, myConstructorSuggestion); return occurrenceCount == null ? null : -occurrenceCount; }