Source:
public void perform(GraphRewrite event, EvaluationContext context) { Variables variables = Variables.instance(event); Iterable<? extends WindupVertexFrame> frames = getSelectionManager().getFrames(event, context); boolean hasCommitOperation = hasCommitOperation(operationPerform) || hasCommitOperation(operationOtherwise); boolean hasIterationOperation = hasIterationProgress(operationPerform) || hasIterationProgress(operationOtherwise); DefaultOperationBuilder commit = new NoOp(); DefaultOperationBuilder iterationProgressOperation = new NoOp(); if (!hasCommitOperation || !hasIterationOperation) { int frameCount = Iterables.size(frames); if (frameCount > 100) { if (!hasCommitOperation) commit = Commit.every(100); if (!hasIterationOperation) { iterationProgressOperation = IterationProgress.monitoring("Rule Progress", 500); } } } Operation commitAndProgress = commit.and(iterationProgressOperation); event.getRewriteContext().put(DEFAULT_VARIABLE_LIST_STRING, frames); for (WindupVertexFrame frame : frames) { variables.push(); getPayloadManager().setCurrentPayload(variables, frame); boolean conditionResult = true; if (condition != null) { if (condition instanceof GraphCondition) { ((GraphCondition) condition).setInputVariablesName(getPayloadVariableName(event, context)); } conditionResult = condition.evaluate(event, context); variables.push(); getPayloadManager().setCurrentPayload(variables, frame); } if (conditionResult) { if (operationPerform != null) { operationPerform.perform(event, context); } } else if (condition != null) { if (operationOtherwise != null) { operationOtherwise.perform(event, context); } } commitAndProgress.perform(event, context); getPayloadManager().removeCurrentPayload(variables); variables.pop(); if (condition != null) { variables.pop(); } } }

Target:
public void perform(GraphRewrite event, EvaluationContext context) { Variables variables = Variables.instance(event); Iterable<? extends WindupVertexFrame> frames = getSelectionManager().getFrames(event, context); boolean hasCommitOperation = OperationUtil.hasCommitOperation(operationPerform) || OperationUtil.hasCommitOperation(operationOtherwise); boolean hasIterationOperation = OperationUtil.hasIterationProgress(operationPerform) || OperationUtil.hasIterationProgress(operationOtherwise); DefaultOperationBuilder commit = new NoOp(); DefaultOperationBuilder iterationProgressOperation = new NoOp(); if (!hasCommitOperation || !hasIterationOperation) { int frameCount = Iterables.size(frames); if (frameCount > 100) { if (!hasCommitOperation) commit = Commit.every(100); if (!hasIterationOperation) { iterationProgressOperation = IterationProgress.monitoring("Rule Progress", 500); } } } Operation commitAndProgress = commit.and(iterationProgressOperation); event.getRewriteContext().put(DEFAULT_VARIABLE_LIST_STRING, frames); for (WindupVertexFrame frame : frames) { variables.push(); getPayloadManager().setCurrentPayload(variables, frame); boolean conditionResult = true; if (condition != null) { if (condition instanceof GraphCondition) { ((GraphCondition) condition).setInputVariablesName(getPayloadVariableName(event, context)); } conditionResult = condition.evaluate(event, context); variables.push(); getPayloadManager().setCurrentPayload(variables, frame); } if (conditionResult) { if (operationPerform != null) { operationPerform.perform(event, context); } } else if (condition != null) { if (operationOtherwise != null) { operationOtherwise.perform(event, context); } } commitAndProgress.perform(event, context); getPayloadManager().removeCurrentPayload(variables); variables.pop(); if (condition != null) { variables.pop(); } } }