question: public String checkStartBlock ( int mode ) { if ( log . isDebugEnabled ( ) ) log . debug ( "checkStartBlock for warrant \"" + getDisplayName ( ) + "\"." ) ; BlockOrder bo = _orders . get ( 0 ) ; OBlock block = bo . getBlock ( ) ; String msg = block . allocate ( this ) ; if ( msg != null ) { return msg ; } msg = bo . setPath ( this ) ; if ( msg != null ) { return msg ; } int state = block . getState ( ) ; if ( ( state & OBlock . DARK ) != 0 || _tempRunBlind ) { msg = Bundle . getMessage ( "BlockDark" , block . getDisplayName ( ) ) ; } else if ( ( state & OBlock . OCCUPIED ) == 0 ) { if ( mode == MODE_LEARN ) { msg = "learnStart" ; } else { msg = "warnStart" ; } msg = Bundle . getMessage ( msg , getTrainName ( ) , block . getDisplayName ( ) ) ; } else { TrackerTableAction . stopTrackerIn ( block ) ; } return msg ; }
target:  Check start block for occupied for start of run