private ScopeBlock findSynchronizedScopeBlock ( ScopeBlock sb , int monitorEnterPC ) { ScopeBlock monitorBlock = sb ; if ( sb . hasChildren ( ) ) { for ( ScopeBlock child : sb . getChildren ( ) ) { if ( child . isSync ( ) && ( child . getStart ( ) > monitorBlock . getStart ( ) ) ) { monitorBlock = child ; monitorBlock = findSynchronizedScopeBlock ( monitorBlock , monitorEnterPC ) ; } } } return monitorBlock ; }
finds the scope block that is the active synchronized block