Program: 32429
Project: 32429
Buggy source:
/** 
 * Test that the   {@link CompositeMatcherEditor} matches only if eithermatchers match in OR mode.
 */
@Test public void testCompositeMatcherEditorMatchesOr(){
  compositeMatcherEditor.setMode(CompositeMatcherEditor.OR);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches(null));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().add(textMatcherEditor);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str","String_Node_Str"});
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().add(anotherTextMatcherEditor);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().remove(0);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().remove(0);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Test that the   {@link CompositeMatcherEditor} matches only if eithermatcher matches in OR mode.
 */
@Test public void testCompositeMatcherEditorMatchesOr(){
  compositeMatcherEditor.setMode(CompositeMatcherEditor.OR);
  assertEquals(false,compositeMatcherEditor.getMatcher().matches(null));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().add(textMatcherEditor);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  textMatcherEditor.setFilterText(new String[]{"String_Node_Str","String_Node_Str"});
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().add(anotherTextMatcherEditor);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().remove(0);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  anotherTextMatcherEditor.setFilterText(new String[]{"String_Node_Str"});
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(false,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  compositeMatcherEditor.getMatcherEditors().remove(0);
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
  assertEquals(true,compositeMatcherEditor.getMatcher().matches("String_Node_Str"));
}