question: private AgendaItem labelDependencies ( AgendaItem result , final SyntaxTreeNode node ) { final List < UnlabelledDependency > resolvedUnlabelledDependencies = node . getResolvedUnlabelledDependencies ( ) ; int i = 0 ; for ( final UnlabelledDependency dep : resolvedUnlabelledDependencies ) { final ExtendedLexicalEntry forest = forests . get ( dep . getHead ( ) ) ; final Scored < SRLLabel > scoredLabel = forest . getBestLabels ( dep ) ; final double newInsideScore = result . getInsideScore ( ) + scoredLabel . getScore ( ) ; final SyntaxTreeNode labelling = new SyntaxTreeNodeLabelling ( result . getParse ( ) , dep . setLabel ( scoredLabel . getObject ( ) ) , resolvedUnlabelledDependencies . subList ( i + 1 , resolvedUnlabelledDependencies . size ( ) ) ) ; result = new AgendaItem ( labelling , newInsideScore , result . outsideScoreUpperbound - forest . getLogUnnormalizedViterbiScore ( dep . getCategory ( ) , dep . getArgNumber ( ) ) , result . getStartOfSpan ( ) , result . getSpanLength ( ) , true ) ; i ++ ; } return result ; }
target:  Creates a new AgendaItem by labelling the dependencies in the old one