String str = state.toString();
int remainingLength = str.length();
while (numComponents > 0 && remainingLength >= 0) {
if (remainingLength == 0) {
components.add(new Insert((char) (random.nextInt(26) + 'A')));
} else {
switch (random.nextInt(3)) {
case 0:
components.add(new Insert((char) (random.nextInt(26) + 'A')));
break;
case 1:
components.add(new Delete(str.charAt(str.length() - remainingLength)));
remainingLength--;
break;