  We numerically construct the stationary solutions of $SU(2)$
Einstein-Yang-Mills theory in four dimensional anti-de Sitter spacetime. When
the $t$ component of $SU(2)$ gauge field is taken to the only nonzero
component, we construct a class of counterexamples to the weak cosmic
censorship conjecture in Einstein-Maxwell theory. However, including a nonzero
$\phi$ component of $SU(2)$ gauge field, we can argue that there is a minimum
value $q_W$, when the charge carried by the $\phi$ component is larger than
this minimum value, for sufficiently large boundary electric amplitude $a$, the
original counterexamples can be removed and cosmic censorship is preserved.
