Program: 48422
Project: 48422
Buggy source:
@Test(timeout=1000 * 60) @Category(ProblematicTest.class) public void testTwoNodesWithPartialIndexes() throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(2);
  HazelcastInstance h1=nodeFactory.newHazelcastInstance();
  HazelcastInstance h2=nodeFactory.newHazelcastInstance();
  IMap imap=h1.getMap("String_Node_Str");
  imap.addIndex("String_Node_Str",false);
  imap.addIndex("String_Node_Str",true);
  imap.addIndex("String_Node_Str",false);
  for (int i=0; i < 5000; i++) {
    Employee employee=new Employee(i,"String_Node_Str" + i % 100,"String_Node_Str" + (i % 100),i % 60,((i & 1) == 1),(double)i);
    imap.put(String.valueOf(i),employee);
  }
  assertEquals(2,h1.getCluster().getMembers().size());
  assertEquals(2,h2.getCluster().getMembers().size());
  imap=h2.getMap("String_Node_Str");
  imap.addIndex("String_Node_Str",false);
  imap.addIndex("String_Node_Str",true);
  imap.addIndex("String_Node_Str",false);
  Collection<Employee> entries=imap.values(new SqlPredicate("String_Node_Str"));
  assertEquals(50,entries.size());
  for (  Employee e : entries) {
    assertEquals("String_Node_Str",e.getName());
    assertEquals("String_Node_Str",e.getCity());
  }
  entries=imap.values(new SqlPredicate("String_Node_Str"));
  assertEquals(50,entries.size());
  for (  Employee e : entries) {
    assertEquals("String_Node_Str",e.getName());
    assertEquals("String_Node_Str",e.getCity());
    assertTrue(e.getAge() > 2);
  }
  entries=imap.values(new SqlPredicate("String_Node_Str"));
  assertEquals(50,entries.size());
  for (  Employee e : entries) {
    assertTrue(e.getName().startsWith("String_Node_Str"));
    assertTrue(e.getCity().startsWith("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test(timeout=1000 * 60) public void testTwoNodesWithPartialIndexes() throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(2);
  HazelcastInstance h1=nodeFactory.newHazelcastInstance();
  HazelcastInstance h2=nodeFactory.newHazelcastInstance();
  IMap imap=h1.getMap("String_Node_Str");
  imap.addIndex("String_Node_Str",false);
  imap.addIndex("String_Node_Str",true);
  imap.addIndex("String_Node_Str",false);
  for (int i=0; i < 500; i++) {
    Employee employee=new Employee(i,"String_Node_Str" + i % 100,"String_Node_Str" + (i % 100),i % 60,((i & 1) == 1),(double)i);
    imap.put(String.valueOf(i),employee);
  }
  assertEquals(2,h1.getCluster().getMembers().size());
  assertEquals(2,h2.getCluster().getMembers().size());
  imap=h2.getMap("String_Node_Str");
  imap.addIndex("String_Node_Str",false);
  imap.addIndex("String_Node_Str",true);
  imap.addIndex("String_Node_Str",false);
  Collection<Employee> entries=imap.values(new SqlPredicate("String_Node_Str"));
  assertEquals(5,entries.size());
  for (  Employee e : entries) {
    assertEquals("String_Node_Str",e.getName());
    assertEquals("String_Node_Str",e.getCity());
  }
  entries=imap.values(new SqlPredicate("String_Node_Str"));
  assertEquals(5,entries.size());
  for (  Employee e : entries) {
    assertEquals("String_Node_Str",e.getName());
    assertEquals("String_Node_Str",e.getCity());
    assertTrue(e.getAge() > 2);
  }
  entries=imap.values(new SqlPredicate("String_Node_Str"));
  assertEquals(5,entries.size());
  for (  Employee e : entries) {
    assertTrue(e.getName().startsWith("String_Node_Str"));
    assertTrue(e.getCity().startsWith("String_Node_Str"));
  }
}