question: private void cleanUpLabels ( ) { int id = 0 ; for ( Iterator < Label > i = labels . iterator ( ) ; i . hasNext ( ) ; ) { Label label = i . next ( ) ; if ( label . isEmpty ( ) ) { i . remove ( ) ; } else { label . compact ( ) ; label . id = id ++ ; } } }
target:  Removes empty labels and assigns IDs to non-empty labels.