Buggy code:
@ RunWith ( Parameterized . class ) public class MissingEntityCompletionTest { private static final String [ ] TEXTS = new String [ ] { "Florence<seq2seq4repair_space>May<seq2seq4repair_space>Harding<seq2seq4repair_space>studied<seq2seq4repair_space>at<seq2seq4repair_space>a<seq2seq4repair_space>school<seq2seq4repair_space>in<seq2seq4repair_space>Sydney<seq2seq4repair_space>that<seq2seq4repair_space>is<seq2seq4repair_space>in<seq2seq4repair_space>Australia,<seq2seq4repair_space>and<seq2seq4repair_space>with<seq2seq4repair_space>Douglas<seq2seq4repair_space>Robert<seq2seq4repair_space>Dundas,<seq2seq4repair_space>but<seq2seq4repair_space>in<seq2seq4repair_space>effect<seq2seq4repair_space>had<seq2seq4repair_space>no<seq2seq4repair_space>formal<seq2seq4repair_space>training<seq2seq4repair_space>in<seq2seq4repair_space>either<seq2seq4repair_space>botany<seq2seq4repair_space>or<seq2seq4repair_space>art." , "Such<seq2seq4repair_space>notables<seq2seq4repair_space>include<seq2seq4repair_space>James<seq2seq4repair_space>Carville,<seq2seq4repair_space>who<seq2seq4repair_space>was<seq2seq4repair_space>the<seq2seq4repair_space>senior<seq2seq4repair_space>political<seq2seq4repair_space>adviser<seq2seq4repair_space>to<seq2seq4repair_space>Bill<seq2seq4repair_space>Clinton,<seq2seq4repair_space>and<seq2seq4repair_space>Donna<seq2seq4repair_space>Brazile,<seq2seq4repair_space>the<seq2seq4repair_space>campaign<seq2seq4repair_space>manager<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>2000<seq2seq4repair_space>presidential<seq2seq4repair_space>campaign<seq2seq4repair_space>of<seq2seq4repair_space>Vice-President<seq2seq4repair_space>Al<seq2seq4repair_space>Gore." , "The<seq2seq4repair_space>senator<seq2seq4repair_space>received<seq2seq4repair_space>a<seq2seq4repair_space>Bachelor<seq2seq4repair_space>of<seq2seq4repair_space>Laws<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>Columbia<seq2seq4repair_space>University." } ; private static final DocumentProcessor PREPROCESSOR = new DocumentProcessor ( ) ; @ Parameters public static Collection < Object [ ] > data ( ) { } private List < Document > documents ; private List < Document [ ] > annotationResults ; private List < Document > expectedDocuments ; public MissingEntityCompletionTest ( List < Document > documents , List < Document [ ] > annotationResults , List < Document > expectedDocuments , List < NamedEntityCorrections [ ] > expectedPartners ) { } @ Test public void test ( ) throws GerbilException { MissingEntityCompletionTest . PREPROCESSOR . process ( documents ) ; List < A2KBAnnotator > annotators = generateAnnotators ( ) ; GoldStandardCompletion test_var = new org . aksw . simba . eaglet . completion . MissingEntityCompletion ( annotators ) ; test_var . check ( documents ) ; List < NamedEntityCorrections > markings ; List < NamedEntityCorrections > expectedMarkings ; for ( int i = 0 ; i < ( documents . size ( ) ) ; i ++ ) { markings = documents . get ( i ) . getMarkings ( NamedEntityCorrections . class ) ; expectedMarkings = expectedDocuments . get ( i ) . getMarkings ( NamedEntityCorrections . class ) ; <START_BUG> Assert . assertEquals ( ( ( ( ( "The<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>markings<seq2seq4repair_space>(" + ( markings . toString ( ) ) ) + ")<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>expected<seq2seq4repair_space>markings<seq2seq4repair_space>(" ) + ( expectedMarkings . toString ( ) ) ) + ")" ) , expectedMarkings . size ( ) , markings . size ( ) ) ; <END_BUG> Set < NamedEntityCorrections > result = new HashSet < NamedEntityCorrections > ( markings ) ; for ( int j = 0 ; j < ( expectedMarkings . size ( ) ) ; j ++ ) { Assert . assertTrue ( ( ( ( ( "Couldn't<seq2seq4repair_space>find<seq2seq4repair_space>the<seq2seq4repair_space>expected<seq2seq4repair_space>" + ( expectedMarkings . get ( j ) ) ) + "<seq2seq4repair_space>inside<seq2seq4repair_space>the<seq2seq4repair_space>set<seq2seq4repair_space>" ) + ( result . toString ( ) ) ) + "." ) , result . contains ( expectedMarkings . get ( j ) ) ) ; } } } private List < A2KBAnnotator > generateAnnotators ( ) { } }

Fix:
Assert . assertEquals ( ( ( ( ( ( ( "The<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>markings<seq2seq4repair_space>in<seq2seq4repair_space>document<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>(" ) + ( markings . toString ( ) ) ) + ")<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>expected<seq2seq4repair_space>markings<seq2seq4repair_space>(" ) + ( expectedMarkings . toString ( ) ) ) + ")" ) , expectedMarkings . size ( ) , markings . size ( ) ) ;