Program: 38648
Project: 38648
Buggy source:
@Test public void testQueryOperators() throws IOException, SQLException {
  IUserPersistence users=dbs.getDatabase1().users();
  users.deleteAll();
  User brad=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(1).setCreatedAtMillis(1l);
  User brandon=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(2).setCreatedAtMillis(1l).setSomeDatetime(0l);
  User casey=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(2).setCreatedAtMillis(2l);
  User john=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(3).setCreatedAtMillis(2l);
  User james=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(5).setCreatedAtMillis(3l).setSomeDatetime(1000000l);
  brad.save();
  brandon.save();
  casey.save();
  john.save();
  james.save();
  List<User> result;
  result=users.query().whereHandle(equalTo("String_Node_Str")).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(brad));
  result=users.query().whereNumPosts(between(4,8)).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(james));
  result=users.query().whereNumPosts(notBetween(4,8)).find();
  assertEquals(4,result.size());
  assertTrue(result.containsAll(Sets.newHashSet(brad,brandon,casey,john)));
  result=users.query().whereCreatedAtMillis(lessThan(2l)).find();
  assertEquals(2,result.size());
  assertTrue(result.contains(brad));
  assertTrue(result.contains(brandon));
  result=users.query().whereCreatedAtMillis(greaterThan(1l)).find();
  assertEquals(3,result.size());
  result=users.query().whereCreatedAtMillis(lessThanOrEqualTo(2l)).find();
  assertEquals(4,result.size());
  result=users.query().whereCreatedAtMillis(greaterThanOrEqualTo(1l)).find();
  assertEquals(5,result.size());
  result=users.query().whereBio(endsWith("String_Node_Str")).find();
  assertEquals(5,result.size());
  result=users.query().whereBio(startsWith("String_Node_Str")).find();
  assertTrue(result.isEmpty());
  result=users.query().whereSomeDatetime(in(Collections.<Long>emptySet())).find();
  assertTrue(result.isEmpty());
  result=users.query().whereSomeDatetime(notIn(Collections.<Long>emptySet())).find();
  assertEquals(5,result.size());
  result=users.query().whereBio(contains("String_Node_Str")).whereNumPosts(in(1,3,5)).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(james));
  result=users.query().whereHandle(notIn("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")).whereNumPosts(notEqualTo(5)).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(casey));
  result=users.query().whereSomeDatetime(JackMatchers.<Long>isNull()).find();
  assertEquals(3,result.size());
  result=users.query().whereSomeDatetime(JackMatchers.<Long>isNotNull()).find();
  assertEquals(2,result.size());
  assertTrue(result.contains(brandon));
  assertTrue(result.contains(james));
  try {
    users.query().whereHandle(in(null,"String_Node_Str")).find();
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
}

Fixed version (ground truth):
@Test public void testQueryOperators() throws IOException, SQLException {
  IUserPersistence users=dbs.getDatabase1().users();
  users.deleteAll();
  User brad=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(1).setCreatedAtMillis(1l);
  User brandon=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(2).setCreatedAtMillis(1l).setSomeDatetime(0l);
  User casey=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(2).setCreatedAtMillis(2l);
  User john=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(3).setCreatedAtMillis(2l);
  User james=users.createDefaultInstance().setHandle("String_Node_Str").setBio("String_Node_Str").setNumPosts(5).setCreatedAtMillis(3l).setSomeDatetime(1000000l);
  brad.save();
  brandon.save();
  casey.save();
  john.save();
  james.save();
  List<User> result;
  result=users.query().whereHandle(equalTo("String_Node_Str")).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(brad));
  result=users.query().whereNumPosts(between(4,8)).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(james));
  result=users.query().whereNumPosts(notBetween(4,8)).find();
  assertEquals(4,result.size());
  assertTrue(result.containsAll(Sets.newHashSet(brad,brandon,casey,john)));
  result=users.query().whereCreatedAtMillis(lessThan(2l)).find();
  assertEquals(2,result.size());
  assertTrue(result.contains(brad));
  assertTrue(result.contains(brandon));
  result=users.query().whereCreatedAtMillis(greaterThan(1l)).find();
  assertEquals(3,result.size());
  result=users.query().whereCreatedAtMillis(lessThanOrEqualTo(2l)).find();
  assertEquals(4,result.size());
  result=users.query().whereCreatedAtMillis(greaterThanOrEqualTo(1l)).find();
  assertEquals(5,result.size());
  result=users.query().whereBio(endsWith("String_Node_Str")).find();
  assertEquals(5,result.size());
  result=users.query().whereBio(startsWith("String_Node_Str")).find();
  assertTrue(result.isEmpty());
  result=users.query().whereSomeDatetime(in(Collections.<Long>emptySet())).find();
  assertTrue(result.isEmpty());
  result=users.query().whereSomeDatetime(notIn(Collections.<Long>emptySet())).find();
  assertEquals(5,result.size());
  result=users.query().whereBio(contains("String_Node_Str")).whereNumPosts(in(1,3,5)).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(james));
  result=users.query().whereHandle(notIn("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")).whereNumPosts(notEqualTo(5)).find();
  assertEquals(1,result.size());
  assertTrue(result.contains(casey));
  result=users.query().whereSomeDatetime(JackMatchers.<Long>isNull()).find();
  assertEquals(3,result.size());
  result=users.query().whereSomeDatetime(JackMatchers.<Long>isNotNull()).find();
  assertEquals(2,result.size());
  assertTrue(result.contains(brandon));
  assertTrue(result.contains(james));
  result=users.query().whereSomeDatetime(JackMatchers.isNotNull()).whereBio(JackMatchers.noop()).find();
  assertEquals(2,result.size());
  try {
    users.query().whereHandle(in(null,"String_Node_Str")).find();
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
}