private static PsiJavaCodeReferenceElement @NotNull [] getReferences(PsiReferenceList list) {
    return list == null ? PsiJavaCodeReferenceElement.EMPTY_ARRAY : list.getReferenceElements();
  }
private static PsiJavaCodeReferenceElement @NotNull [] getReferences(PsiReferenceList list)