static List<LookupElement> smartCompleteReference(List<LookupElement> allRefSuggestions, Set<ExpectedTypeInfo> infos) {
    List<LookupElement> result = new ArrayList<>();
    for (LookupElement item : allRefSuggestions) {
      if (matchesExpectedType(item, infos)) {
        if (item instanceof JavaMethodCallElement) {
          checkTooGeneric((JavaMethodCallElement)item);
        }
        result.add(JavaSmartCompletionContributor.decorate(item, infos));
      }
    }
    return result;
  }
static List<LookupElement> smartCompleteReference(List<LookupElement> allRefSuggestions, Set<ExpectedTypeInfo> infos)