} else {
int from = pos;
pos++; // Already checked pos < len and isKatakana(reading.charAt(pos))
while (pos < len && !isKatakana(reading.charAt(pos))) {
pos++;
<BUG>}
keyStrokeFragments = Lists.newArrayList(new Keystroke(reading.substring(from, pos), 1));
</BUG>
}
builder.append(keyStrokeFragments);

} else {
int from = pos;
pos++; // Already checked pos < len and isKatakana(reading.charAt(pos))
while (pos < len && !isKatakana(reading.charAt(pos))) {
pos++;
}
keyStrokeFragments = new ArrayList<>();
keyStrokeFragments.add(new Keystroke(reading.substring(from, pos), 1));
}
builder.append(keyStrokeFragments);
