Buggy code:
public abstract class AbstractTestCollection extends AbstractTestObject { public Collection collection ; public Collection confirmed ; public AbstractTestCollection ( String testName ) { } public boolean areEqualElementsDistinguishable ( ) { } public boolean isAddSupported ( ) { } public boolean isRemoveSupported ( ) { } public boolean isNullSupported ( ) { } public boolean isFailFastSupported ( ) { } public boolean isEqualsCheckable ( ) { } public void verify ( ) { } public void resetEmpty ( ) { } public void resetFull ( ) { } public abstract Collection makeConfirmedCollection ( ) { } public abstract Collection makeConfirmedFullCollection ( ) { } public abstract Collection makeCollection ( ) { } public Collection makeFullCollection ( ) { } public Object makeObject ( ) { } public Map . Entry cloneMapEntry ( Map . Entry entry ) { } public Object [ ] getFullElements ( ) { } public Object [ ] getOtherElements ( ) { } public Object [ ] getFullNonNullElements ( ) { } public Object [ ] getOtherNonNullElements ( ) { } public Object [ ] getFullNonNullStringElements ( ) { } public Object [ ] getOtherNonNullStringElements ( ) { } public void testCollectionAdd ( ) { } public void testCollectionAddAll ( ) { } public void testUnsupportedAdd ( ) { } public void testCollectionClear ( ) { } public void testCollectionContains ( ) { } public void testCollectionContainsAll ( ) { } public void testCollectionIsEmpty ( ) { } public void testCollectionIterator ( ) { } public void testCollectionIteratorRemove ( ) { } public void testCollectionRemove ( ) { } public void testCollectionRemoveAll ( ) { } public void testCollectionRetainAll ( ) { } public void testCollectionSize ( ) { } public void testCollectionToArray ( ) { } public void testCollectionToArray2 ( ) { resetEmpty ( ) ; Object [ ] a = new Object [ ] { new Object ( ) , null , null } ; Object [ ] array = collection . toArray ( a ) ; assertEquals ( "Given<seq2seq4repair_space>array<seq2seq4repair_space>shouldn't<seq2seq4repair_space>shrink" , array , a ) ; <START_BUG> assertEquals ( "Last<seq2seq4repair_space>element<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>null" , a [ 0 ] , null ) ; <END_BUG> verify ( ) ; resetFull ( ) ; try { array = collection . toArray ( new Void [ 0 ] ) ; fail ( "toArray(new<seq2seq4repair_space>Void[0])<seq2seq4repair_space>should<seq2seq4repair_space>raise<seq2seq4repair_space>ArrayStore" ) ; } catch ( ArrayStoreException e ) { } verify ( ) ; try { array = collection . toArray ( null ) ; fail ( "toArray(null)<seq2seq4repair_space>should<seq2seq4repair_space>raise<seq2seq4repair_space>NPE" ) ; } catch ( NullPointerException e ) { } verify ( ) ; array = collection . toArray ( new Object [ 0 ] ) ; a = collection . toArray ( ) ; assertEquals ( "toArrays<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>equal" , Arrays . asList ( array ) , Arrays . asList ( a ) ) ; HashSet classes = new HashSet ( ) ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { classes . add ( ( ( array [ i ] ) == null ? null : array [ i ] . getClass ( ) ) ) ; } if ( ( classes . size ( ) ) > 1 ) return ; Class cl = ( ( Class ) ( classes . iterator ( ) . next ( ) ) ) ; if ( Map . Entry . class . isAssignableFrom ( cl ) ) { cl = Map . Entry . class ; } a = ( ( Object [ ] ) ( Array . newInstance ( cl , 0 ) ) ) ; array = collection . toArray ( a ) ; assertEquals ( "toArray(Object[])<seq2seq4repair_space>should<seq2seq4repair_space>return<seq2seq4repair_space>correct<seq2seq4repair_space>array<seq2seq4repair_space>type" , a . getClass ( ) , array . getClass ( ) ) ; assertEquals ( "type-specific<seq2seq4repair_space>toArrays<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>equal" , Arrays . asList ( array ) , Arrays . asList ( collection . toArray ( ) ) ) ; verify ( ) ; } public void testCollectionToString ( ) { } public void testUnsupportedRemove ( ) { } public void testCollectionIteratorFailFast ( ) { } public void testSerializeDeserializeThenCompare ( ) throws Exception { } }

Fix:
assertNull ( "Last<seq2seq4repair_space>element<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>null" , a [ 0 ] ) ;