int () { Pair<GrExpression, PsiType> instanceOf = getInstanceof(); if (instanceOf == null || !(instanceOf.first instanceof GrReferenceExpression)) return 0; VariableDescriptor descriptor = VariableDescriptorFactory.createDescriptor((GrReferenceExpression)instanceOf.first); if (descriptor == null) { return 0; } Integer descr = myVariableIndex.get(descriptor); return descr == null ? 0 : descr; }