Program: 102522
Project: 102522
Buggy source:
@MaxQueryNumber(210) public void testFindIdentityWithFilter() throws Exception {
  addIdentity("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  Identity itotota=addIdentity("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addIdentity("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  Profile profile=storage.loadProfile(new Profile(itotota));
  Map<String,String> xp=new HashMap<String,String>();
  List<Map<String,String>> xps=new ArrayList<Map<String,String>>();
  xp.put(Profile.EXPERIENCES_SKILLS,"String_Node_Str");
  xps.add(xp);
  profile.setProperty(Profile.EXPERIENCES,xps);
  storage.saveProfile(profile);
  ProfileFilter t=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter to=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter toto=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter totota=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter unknown=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter cadre=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter dev=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter t2=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",itotota);
  ProfileFilter filterB2Skills=new ProfileFilter();
  filterB2Skills.setSkills("String_Node_Str");
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,10,false).size());
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,3,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,1,false).size());
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,0,false).size());
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,-1,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",to,0,10,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",toto,0,10,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",totota,0,10,false).size());
  assertEquals(0,storage.getIdentitiesByProfileFilter("String_Node_Str",unknown,0,10,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",cadre,0,10,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",dev,0,10,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",t2,0,10,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",filterB2Skills,0,10,false).size());
  assertEquals("String_Node_Str",storage.getIdentitiesByProfileFilter("String_Node_Str",filterB2Skills,0,10,false).get(0).getRemoteId());
}

Fixed version (ground truth):
@MaxQueryNumber(220) public void testFindIdentityWithFilter() throws Exception {
  addIdentity("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  Identity itotota=addIdentity("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  addIdentity("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  Profile profile=storage.loadProfile(new Profile(itotota));
  Map<String,String> xp=new HashMap<String,String>();
  List<Map<String,String>> xps=new ArrayList<Map<String,String>>();
  xp.put(Profile.EXPERIENCES_SKILLS,"String_Node_Str");
  xps.add(xp);
  profile.setProperty(Profile.EXPERIENCES,xps);
  storage.saveProfile(profile);
  ProfileFilter t=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter to=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter toto=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter totota=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter unknown=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter cadre=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter dev=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",null);
  ProfileFilter t2=createFilter('\u0000',"String_Node_Str","String_Node_Str","String_Node_Str",itotota);
  ProfileFilter filterB2Skills=new ProfileFilter();
  filterB2Skills.setSkills("String_Node_Str");
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,10,false).size());
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,3,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,1,false).size());
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,0,false).size());
  assertEquals(3,storage.getIdentitiesByProfileFilter("String_Node_Str",t,0,-1,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",to,0,10,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",toto,0,10,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",totota,0,10,false).size());
  assertEquals(0,storage.getIdentitiesByProfileFilter("String_Node_Str",unknown,0,10,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",cadre,0,10,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",dev,0,10,false).size());
  assertEquals(2,storage.getIdentitiesByProfileFilter("String_Node_Str",t2,0,10,false).size());
  assertEquals(1,storage.getIdentitiesByProfileFilter("String_Node_Str",filterB2Skills,0,10,false).size());
  assertEquals("String_Node_Str",storage.getIdentitiesByProfileFilter("String_Node_Str",filterB2Skills,0,10,false).get(0).getRemoteId());
}