Block body = declareAddIntermediate(definition, grouped, context);
Variable scratchStateVariable = context.declareVariable(singleStateClass, "scratchState");
Variable positionVariable = context.declareVariable(int.class, "position");
body.comment("scratchState = stateFactory.createSingleState();")
.pushThis()
.getField(stateFactoryField)
.invokeInterface(AccumulatorStateFactory.class, "createSingleState", Object.class)
.checkCast(scratchStateVariable.getType())
.putVariable(scratchStateVariable);