PsiJavaModuleReference () { PsiRequiresStatementStub stub = getStub(); if (stub != null) { String refText = nullize(stub.getModuleName()); if (refText == null) return null; PsiJavaModuleReference ref = dereference(myReference); if (ref == null) { ref = JavaPsiFacade.getInstance(getProject()).getParserFacade().createModuleReferenceFromText(refText, this).getReference(); myReference = new SoftReference<>(ref); } return ref; } else { myReference = null; PsiJavaModuleReferenceElement refElement = getReferenceElement(); return refElement != null ? refElement.getReference() : null; } }