static @Nullable PreferMostUsedWeigher create(@NotNull PsiElement position) {
    CompilerReferenceService service = CompilerReferenceService.getInstanceIfEnabled(position.getProject());
    if (service == null) {
      return null;
    }
    return service.isActive() || UNIT_TEST_MODE ? new PreferMostUsedWeigher(service, JavaSmartCompletionContributor.AFTER_NEW.accepts(position)) : null;
  }
static @Nullable PreferMostUsedWeigher create(@NotNull PsiElement position)