Local thisLocal = body.getThisLocal();
// Set the initial state.
String initialStateName = ((StringAttribute) entity
.getAttribute("initialStateName")).getExpression();
int initialStateIndex = entity.entityList().indexOf(
entity.getEntity(initialStateName));
units.add(Jimple.v().newAssignStmt(
Jimple.v().newInstanceFieldRef(thisLocal,
currentStateField.makeRef()),
IntConstant.v(initialStateIndex)));