public OScope resolveCompensatableScope(final String scopeToCompensate) throws CompilationException { if (_recoveryContextStack.isEmpty()) throw new CompilationException(__cmsgs.errCompensateNAtoContext()); OScope recoveryContext = _recoveryContextStack.peek(); OScope scopeToComp = CollectionsX.find_if(recoveryContext.compensatable, new MemberOfFunction<OScope>() { public boolean isMember(OScope o) { return o.name != null && o.name.equals(scopeToCompensate); } }); if (scopeToComp == null) throw new CompilationException(__cmsgs.errCompensateOfInvalidScope(scopeToCompensate)); return scopeToComp; }