Judge chases inmates during attempted escape