question: private void drawLifelinePart ( DrawHandler drawHandler , final double centerX , final double startY , boolean activeCountIncStart , final double endY , boolean activeCountIncEnd , int activeCount , ListIterator < Line1D > interruptedAreas ) { double nextStartY = startY ; boolean drawHead = true ; if ( interruptedAreas . hasNext ( ) ) { Line1D area = interruptedAreas . next ( ) ; if ( area . contains ( nextStartY ) ) { drawHead = false ; nextStartY = area . getHigh ( ) ; } else { interruptedAreas . previous ( ) ; } } boolean drawingFinished = false ; boolean drawEnd = false ; double currentEndY ; double currentStartY ; while ( ! drawingFinished ) { currentStartY = nextStartY ; if ( interruptedAreas . hasNext ( ) ) { Line1D area = interruptedAreas . next ( ) ; if ( area . getLow ( ) < endY ) { currentEndY = area . getLow ( ) ; nextStartY = area . getHigh ( ) ; if ( area . getHigh ( ) > endY ) { drawingFinished = true ; interruptedAreas . previous ( ) ; } } else { interruptedAreas . previous ( ) ; drawingFinished = true ; drawEnd = true ; currentEndY = endY ; } } else { drawingFinished = true ; drawEnd = true ; currentEndY = endY ; } if ( activeCount == 0 ) { drawHandler . setLineType ( LineType . DASHED ) ; drawHandler . drawLine ( centerX , currentStartY , centerX , currentEndY ) ; } else { drawHandler . setLineType ( LineType . SOLID ) ; double lineX = centerX - EXECUTIONSPECIFICATION_WIDTH / 2.0 ; drawHandler . drawLine ( lineX , currentStartY , lineX , currentEndY ) ; for ( int i = 0 ; i < activeCount - 1 ; i ++ ) { lineX += EXECUTIONSPECIFICATION_WIDTH - EXECUTIONSPECIFICATION_OVERLAPP ; drawHandler . drawLine ( lineX , currentStartY , lineX , currentEndY ) ; } lineX += EXECUTIONSPECIFICATION_WIDTH ; drawHandler . drawLine ( lineX , currentStartY , lineX , currentEndY ) ; if ( drawHead && activeCountIncStart ) { drawHandler . drawLine ( lineX - EXECUTIONSPECIFICATION_WIDTH , currentStartY , lineX , currentStartY ) ; } if ( drawEnd && ! activeCountIncEnd ) { drawHandler . drawLine ( lineX - EXECUTIONSPECIFICATION_WIDTH , currentEndY , lineX , currentEndY ) ; } } drawHead = false ; } }
target:  draw a part of the Lifeline which has the same active count (same number of active ExecutionSpecifications), which changes at startY ending at endY. Draws head if increment at start, draws end if decrement at end.