question: protected Tuple loadEqualTupleGroup ( PushBackStream stream , LinkedList < Tuple > group , StreamComparator groupComparator ) throws IOException { Tuple firstMember = stream . read ( ) ; if ( ! firstMember . EOF ) { group . add ( firstMember ) ; BREAKPOINT : while ( true ) { Tuple nMember = stream . read ( ) ; if ( ! nMember . EOF && 0 == groupComparator . compare ( firstMember , nMember ) ) { group . add ( nMember ) ; } else { stream . pushBack ( nMember ) ; break BREAKPOINT ; } } } return firstMember ; }
target:  Given the stream, start from beginning and load group with all tuples that are equal to the first in stream (including the first one in the stream). All matched tuples are removed from the stream. Result is at least one tuple will be read from the stream and 0 or more tuples will exist in the group. If the first tuple is EOF then the group will have 0 items. Else it will have at least one item. The first group member is returned.