Buggy code:
public static float [ ] add ( float [ ] array , int index , float element ) { } public static double [ ] add ( double [ ] array , int index , double element ) { } private static Object add ( Object array , int index , Object element , Class < ? > clss ) { } @ SuppressWarnings ( "unchecked" ) public static < T > T [ ] remove ( T [ ] array , int index ) { } public static < T > T [ ] removeElement ( T [ ] array , Object element ) { } public static boolean [ ] remove ( boolean [ ] array , int index ) { } public static boolean [ ] removeElement ( boolean [ ] array , boolean element ) { } public static byte [ ] remove ( byte [ ] array , int index ) { } public static byte [ ] removeElement ( byte [ ] array , byte element ) { } public static char [ ] remove ( char [ ] array , int index ) { } public static char [ ] removeElement ( char [ ] array , char element ) { } public static double [ ] remove ( double [ ] array , int index ) { } public static double [ ] removeElement ( double [ ] array , double element ) { } public static float [ ] remove ( float [ ] array , int index ) { } public static float [ ] removeElement ( float [ ] array , float element ) { } public static int [ ] remove ( int [ ] array , int index ) { } public static int [ ] removeElement ( int [ ] array , int element ) { } public static long [ ] remove ( long [ ] array , int index ) { } public static long [ ] removeElement ( long [ ] array , long element ) { } public static short [ ] remove ( short [ ] array , int index ) { } public static short [ ] removeElement ( short [ ] array , short element ) { } private static Object remove ( Object array , int index ) { } @ SuppressWarnings ( "unchecked" ) public static < T > T [ ] removeAll ( T [ ] array , int ... indices ) { } public static < T > T [ ] removeElements ( T [ ] array , T ... values ) { } public static byte [ ] removeAll ( byte [ ] array , int ... indices ) { } public static byte [ ] removeElements ( byte [ ] array , byte ... values ) { } public static short [ ] removeAll ( short [ ] array , int ... indices ) { } public static short [ ] removeElements ( short [ ] array , short ... values ) { } public static int [ ] removeAll ( int [ ] array , int ... indices ) { } public static int [ ] removeElements ( int [ ] array , int ... values ) { } public static char [ ] removeAll ( char [ ] array , int ... indices ) { } public static char [ ] removeElements ( char [ ] array , char ... values ) { } public static long [ ] removeAll ( long [ ] array , int ... indices ) { } public static long [ ] removeElements ( long [ ] array , long ... values ) { } public static float [ ] removeAll ( float [ ] array , int ... indices ) { } public static float [ ] removeElements ( float [ ] array , float ... values ) { } public static double [ ] removeAll ( double [ ] array , int ... indices ) { } public static double [ ] removeElements ( double [ ] array , double ... values ) { } public static boolean [ ] removeAll ( boolean [ ] array , int ... indices ) { } public static boolean [ ] removeElements ( boolean [ ] array , boolean ... values ) { if ( ( ArrayUtils . isEmpty ( array ) ) || ( ArrayUtils . isEmpty ( values ) ) ) { return ArrayUtils . clone ( array ) ; } <START_BUG> HashMap < Boolean , MutableInt > occurrences = new HashMap < Boolean , MutableInt > ( values . length ) ; <END_BUG> for ( boolean v : values ) { Boolean boxed = Boolean . valueOf ( v ) ; MutableInt count = occurrences . get ( boxed ) ; if ( count == null ) { occurrences . put ( boxed , new MutableInt ( 1 ) ) ; } else { count . increment ( ) ; } } HashSet < Integer > toRemove = new HashSet < Integer > ( ) ; for ( Map . Entry < Boolean , MutableInt > e : occurrences . entrySet ( ) ) { Boolean v = e . getKey ( ) ; int found = 0 ; for ( int i = 0 , ct = e . getValue ( ) . intValue ( ) ; i < ct ; i ++ ) { found = ArrayUtils . indexOf ( array , v . booleanValue ( ) , found ) ; if ( found < 0 ) { break ; } toRemove . add ( ( found ++ ) ) ; } } return ( ( boolean [ ] ) ( ArrayUtils . removeAll ( ( ( Object ) ( array ) ) , ArrayUtils . extractIndices ( toRemove ) ) ) ) ; } private static Object removeAll ( Object array , int ... indices ) { }

Fix:
HashMap < Boolean , MutableInt > occurrences = new HashMap < Boolean , MutableInt > ( 2 ) ;