question: private int numPropagatedImageReferences ( ImageToProcess img , Set < TaskImageContainer > tasks ) throws RuntimeException { int countImageRefs = 0 ; for ( TaskImageContainer task : tasks ) { if ( task . mImage != null && task . mImage != img ) { throw new RuntimeException ( "ERROR:  Spawned tasks cannot reference new images!" ) ; } if ( task . mImage != null ) { countImageRefs ++ ; } } return countImageRefs ; }
target:  Calculates the number of new Image references in a set of dependent tasks. Checks to make sure no new image references are being introduced.