The judge acknowledged his remarks were ‘ill-considered,’ court documents state