question: private void merge ( final WordAlignmentState state ) { if ( ! stack . isEmpty ( ) && state . isComplete ( ) ) { final WordAlignmentState parentState = stack . pop ( ) ; if ( parentState . isComplete ( ) ) { throw new IllegalStateException ( "Parent state already complete" ) ; } parentState . substituteIn ( state ) ; merge ( parentState ) ; } else { stack . add ( state ) ; } }
target:  Merges a state with the top of the stack if applicable or places it on top of the stack.