Buggy code:
public class TestSequencedHashMap extends TestMap { protected SequencedHashMap labRat ; public TestSequencedHashMap ( String name ) { } public static Test suite ( ) { } public String getCompatibilityVersion ( ) { } public static void main ( String [ ] args ) { } public void setUp ( ) throws Exception { } public Map makeEmptyMap ( ) { } protected Object [ ] getKeys ( ) { } protected Object [ ] getValues ( ) { } public void testSequenceMap ( ) throws Throwable { Object [ ] keys = getKeys ( ) ; int expectedSize = keys . length ; Object [ ] values = getValues ( ) ; for ( int i = 0 ; i < expectedSize ; i ++ ) { labRat . put ( keys [ i ] , values [ i ] ) ; } assertEquals ( "size()<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>expected<seq2seq4repair_space>size" , expectedSize , labRat . size ( ) ) ; SequencedHashMap clone = ( ( SequencedHashMap ) ( labRat . clone ( ) ) ) ; assertEquals ( "Size<seq2seq4repair_space>of<seq2seq4repair_space>clone<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>original" , labRat . size ( ) , clone . size ( ) ) ; Iterator origEntries = labRat . entrySet ( ) . iterator ( ) ; Iterator copiedEntries = clone . entrySet ( ) . iterator ( ) ; while ( origEntries . hasNext ( ) ) { Map . Entry origEntry = ( ( Map . Entry ) ( origEntries . next ( ) ) ) ; Map . Entry copiedEntry = ( ( Map . Entry ) ( copiedEntries . next ( ) ) ) ; assertEquals ( "Cloned<seq2seq4repair_space>key<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>original" , origEntry . getKey ( ) , copiedEntry . getKey ( ) ) ; assertEquals ( "Cloned<seq2seq4repair_space>value<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>original" , origEntry . getValue ( ) , copiedEntry . getValue ( ) ) ; <START_BUG> assertEquals ( "Cloned<seq2seq4repair_space>entry<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>orginal" , origEntry , copiedEntry ) ; <END_BUG> } assertTrue ( "iterator()<seq2seq4repair_space>returned<seq2seq4repair_space>different<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>elements<seq2seq4repair_space>than<seq2seq4repair_space>keys()" , ( ! ( copiedEntries . hasNext ( ) ) ) ) ; List seq = labRat . sequence ( ) ; assertEquals ( "sequence()<seq2seq4repair_space>returns<seq2seq4repair_space>more<seq2seq4repair_space>keys<seq2seq4repair_space>than<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>Map" , expectedSize , seq . size ( ) ) ; for ( int i = 0 ; i < ( seq . size ( ) ) ; i ++ ) { assertEquals ( ( ( "Key<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>key<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>Map" ) , keys [ i ] , seq . get ( i ) ) ; } } public void testYoungest ( ) { } public void testYoungestReplaceNullWithValue ( ) { } public void testYoungestReplaceValueWithNull ( ) { } public void testFullMapSerialization ( ) throws IOException , ClassNotFoundException { } public void testIndexOf ( ) throws Exception { } protected void tearDown ( ) throws Exception { } }

Fix:
assertEquals ( "Cloned<seq2seq4repair_space>entry<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>original" , origEntry , copiedEntry ) ;