Source:
<code>private void validateThreadLocal(OperatorMeta om) { Integer oioRoot = null; if (om.oioRoot != null) { return; } for (StreamMeta sm: om.inputStreams.values()){ if (sm.locality != Locality.THREAD_LOCAL){ String msg = String.format("Locality %s invalid for operator %s with multiple input streams as at least one of the input streams is not %s", Locality.THREAD_LOCAL, om, Locality.THREAD_LOCAL); throw new ValidationException(msg); } if (sm.source.operatorMeta.getOperator() instanceof Operator.DelayOperator) { String msg = String.format("Locality %s invalid for delay operator %s", Locality.THREAD_LOCAL, sm.source.operatorMeta); throw new ValidationException(msg); } <START> if (om.getOperator() instanceof Operator.DelayOperator) { <END> String msg = String.format("Locality %s invalid for delay operator %s", Locality.THREAD_LOCAL, om); throw new ValidationException(msg); } Integer oioStreamRoot = getOioRoot(sm.source.operatorMeta); if (om.oioRoot != null && oioStreamRoot != om.oioRoot){ String msg = String.format("Locality %s invalid for operator %s with multiple input streams as at least one of the input streams is not originating from common OIO owner node", Locality.THREAD_LOCAL, om, Locality.THREAD_LOCAL); throw new ValidationException(msg); } if (oioRoot == null) { oioRoot = oioStreamRoot; } else if (oioRoot.intValue() != oioStreamRoot.intValue()) { String msg = String.format("Locality %s invalid for operator %s with multiple input streams as they origin from different owner OIO operators", sm.locality, om); throw new ValidationException(msg); } } om.oioRoot = oioRoot; }</code><technical_language>this for loop</technical_language>

Target:
private void validateThreadLocal(OperatorMeta om) { Integer oioRoot = null; if (om.oioRoot != null) { return; } if (om.getOperator() instanceof Operator.DelayOperator) { String msg = String.format("Locality %s invalid for delay operator %s", Locality.THREAD_LOCAL, om); throw new ValidationException(msg); } for (StreamMeta sm: om.inputStreams.values()){ if (sm.locality != Locality.THREAD_LOCAL){ String msg = String.format("Locality %s invalid for operator %s with multiple input streams as at least one of the input streams is not %s", Locality.THREAD_LOCAL, om, Locality.THREAD_LOCAL); throw new ValidationException(msg); } if (sm.source.operatorMeta.getOperator() instanceof Operator.DelayOperator) { String msg = String.format("Locality %s invalid for delay operator %s", Locality.THREAD_LOCAL, sm.source.operatorMeta); throw new ValidationException(msg); } Integer oioStreamRoot = getOioRoot(sm.source.operatorMeta); if (om.oioRoot != null && oioStreamRoot != om.oioRoot){ String msg = String.format("Locality %s invalid for operator %s with multiple input streams as at least one of the input streams is not originating from common OIO owner node", Locality.THREAD_LOCAL, om, Locality.THREAD_LOCAL); throw new ValidationException(msg); } if (oioRoot == null) { oioRoot = oioStreamRoot; } else if (oioRoot.intValue() != oioStreamRoot.intValue()) { String msg = String.format("Locality %s invalid for operator %s with multiple input streams as they origin from different owner OIO operators", sm.locality, om); throw new ValidationException(msg); } } om.oioRoot = oioRoot; }