GroovyControlFlow () { PsiUtilCore.ensureValid(this); CachedValue<GroovyControlFlow> controlFlow = getUserData(CONTROL_FLOW); if (controlFlow == null) { controlFlow = CachedValuesManager.getManager(getProject()).createCachedValue(() -> { try { ResolveProfiler.start(); final GroovyControlFlow flow = ControlFlowBuilder.buildControlFlow(this); return CachedValueProvider.Result.create(flow, getContainingFile(), PsiModificationTracker.MODIFICATION_COUNT); } finally { final long time = ResolveProfiler.finish(); ResolveProfiler.write("flow", this, time); } }, false); controlFlow = putUserDataIfAbsent(CONTROL_FLOW, controlFlow); } return controlFlow.getValue(); }