ProcessorInstruction i21 = new EndDocumentInstruction();
// Stitch them together
Program program = new Program();
program.addInstruction(i0);
program.addInstruction(i1);
program.addInstruction(i2);
program.addInstruction(i3);
program.addInstruction(i4);
program.addInstruction(i5);
program.addInstruction(i6);
program.addInstruction(i7);
program.addInstruction(i8);
program.addInstruction(i9);
Program whileProgram = new Program();
i9.setBlockProgram(whileProgram);
whileProgram.addInstruction(i10);
Program thenProgram = new Program();
Condition cond = new CriteriaCondition(crit, thenProgram);
i10.addCondition(cond);
thenProgram.addInstruction(i11);
thenProgram.addInstruction(i12);
thenProgram.addInstruction(i13);
thenProgram.addInstruction(i14);
thenProgram.addInstruction(i15);
thenProgram.addInstruction(i16);
whileProgram.addInstruction(i17);
program.addInstruction(i18);
program.addInstruction(i19);