NSLog.setAllowedDebugLevel(NSLog.DebugLevelDetailed);
    protected Object fireRuleForKeyPathInContext(String keyPath, D2WContext context) {        String[] significantKeys=(String[])_significantKeysPerKey.get(keyPath);        if (significantKeys==null) return null;        short s=(short)significantKeys.length;        ERXMultiKey k=new ERXMultiKey((short)(s+1));        Object[] lhsKeys=k.keys();        for (short i=0; i<s; i++) {            //lhsKeys[i]=context.valueForKeyPathNoInference(significantKeys[i]);            lhsKeys[i]=ERD2WUtilities.contextValueForKeyNoInferenceNoException(context, significantKeys[i]);        }        lhsKeys[s]=keyPath;        Object result=_cache.get(k);        if (result==null) {            boolean resetTraceRuleFiring = false;            ERXLogger ruleFireLog=null;            if (ruleTraceEnabledLog.isDebugEnabled()) {                ERXLogger ruleCandidatesLog = ERXLogger.getERXLogger("er.directtoweb.rules." + keyPath + ".candidates");                ruleFireLog = ERXLogger.getERXLogger("er.directtoweb.rules." + keyPath + ".fire");                if (ruleFireLog.isDebugEnabled() && !NSLog.debugLoggingAllowedForGroups(NSLog.DebugGroupRules)) {                    NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupRules);                    NSLog.setAllowedDebugLevel(NSLog.DebugLevelDetailed);                    resetTraceRuleFiring = true;                }                if (ruleCandidatesLog.isDebugEnabled()) {                    ruleFireLog.debug("CANDIDATES for keyPath: " + keyPath + "\n" +                                      descriptionForRuleSet(canidateRuleSetForRHSInContext(keyPath, context)));                }            }            result=super.fireRuleForKeyPathInContext(keyPath,context);            _cache.put(k,result==null ? NULL_VALUE : result);            if (ruleTraceEnabledLog.isDebugEnabled()) {                if (ruleFireLog.isDebugEnabled())                ruleFireLog.debug("FIRE: " + keyPath + " for propertyKey: " + context.propertyKey() + " depends on: " + new NSArray(significantKeys)                              + " value: " + (result==null ? "<NULL>" : (result instanceof EOEntity ? ((EOEntity)result).name() : result)));            }            if (resetTraceRuleFiring) {                NSLog.refuseDebugLoggingForGroups(NSLog.DebugGroupRules);            }        } else {            if (ruleTraceEnabledLog.isDebugEnabled()) {                ERXLogger ruleLog = ERXLogger.getERXLogger("er.directtoweb.rules." + keyPath + ".cache");                if (ruleLog.isDebugEnabled())                    ruleLog.debug("CACHE: " + keyPath +  " for propertyKey: " + context.propertyKey() + " depends on: "                                  + new NSArray(significantKeys) + " value: " + (result==NULL_VALUE ? "<NULL>" : (result instanceof EOEntity ? ((EOEntity)result).name() : result)));            }            if (result==NULL_VALUE)                result=null;        }        if (result != null && result instanceof ERDDelayedAssignment) {            result=((ERDDelayedAssignment)result).fireNow(context);        }        return result;    }