while(resIter.hasNext()){ Annotation annot = tokIter.next(); addFeatures(annot, TOKEN_CATEGORY_FEATURE_NAME, resIter.next()[1]); while(resIter.hasNext()){ Annotation annot = tokIter.next(); addFeatures(annot, TOKEN_CATEGORY_FEATURE_NAME, resIter.next()[1]);