while (true) {
if (stopWords.contains(termAtt.buffer(), 0, termAtt.length())) {
int posInc = posIncAtt.getPositionIncrement();
int endOffset = offsetAtt.endOffset();
// This token may be a stopword, if it's not end:
State sav = captureState();
if (input.incrementToken()) {
// It was a stopword; skip it
skippedPositions += posInc;
} else {
clearAttributes();