question: protected void step ( ) { if ( tmpl . serviceTypes . length > 1 ) { while ( services . hasNext ( ) ) { reg = ( SvcReg ) services . next ( ) ; if ( reg . leaseExpiration > now && matchType ( tmpl . serviceTypes , reg . item . serviceType ) && matchAttributes ( tmpl , reg . item ) ) return ; } } else { while ( services . hasNext ( ) ) { reg = ( SvcReg ) services . next ( ) ; if ( reg . leaseExpiration > now && matchAttributes ( tmpl , reg . item ) ) return ; } } reg = null ; }
target:  Set reg to the next matching element, or null if none.