Program: 176798
Project: 176798
Buggy source:
@Test public void onQuery() throws InstantiationException, IllegalAccessException {
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  Date currentDate=new Date();
  CompoundKeyDataType key=prepareData(new Long(12345677),78575785897L,"String_Node_Str",false,10,'A',(byte)5,(short)8,(float)69.3,163.76765654,enrolmentDate,enrolmentTime,joiningDateAndTime,new Integer(3),new Long(978423946455l),135434.89,newSqlDate,sqlTime,sqlTimestamp,bigDecimal,bigInteger,calendar,CompoundKeyDataType.class.newInstance());
  Map<String,Client> clients=(Map<String,Client>)em.getDelegate();
  Client client=clients.get(PERSISTENCE_UNIT);
  ((CassandraClientBase)client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);
  PrimeUserDataType user=new PrimeUserDataType(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(new Date());
  em.persist(user);
  em.clear();
  final String noClause="String_Node_Str";
  final String withFirstCompositeColClause="String_Node_Str";
  final String withSecondCompositeColClause="String_Node_Str";
  final String withBothCompositeColClause="String_Node_Str";
  final String withSelectiveCompositeColClause="String_Node_Str";
  Query q=em.createQuery(noClause);
  List<PrimeUserDataType> results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withFirstCompositeColClause);
  q.setParameter("String_Node_Str",new Long(12345677));
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withSecondCompositeColClause);
  q.setParameter("String_Node_Str",78575785897L);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withBothCompositeColClause);
  q.setParameter("String_Node_Str",new Long(12345677));
  q.setParameter("String_Node_Str",78575785897L);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withSelectiveCompositeColClause);
  q.setParameter("String_Node_Str",key);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  Assert.assertNull(results.get(0).getTweetBody());
  final String selectiveColumnTweetDateWithAllCompositeColClause="String_Node_Str";
  q=em.createQuery(selectiveColumnTweetDateWithAllCompositeColClause);
  q.setParameter("String_Node_Str",key);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  Assert.assertEquals(currentDate.getTime(),results.get(0).getTweetDate().getTime());
  Assert.assertNull(results.get(0).getTweetBody());
  final String withCompositeKeyClause="String_Node_Str";
  q=em.createQuery(withCompositeKeyClause);
  q.setParameter("String_Node_Str",key);
  results=q.getResultList();
  Assert.assertNotNull(results);
  Assert.assertEquals(1,results.size());
  em.remove(user);
  em.clear();
}

Fixed version (ground truth):
@Test public void onQuery() throws InstantiationException, IllegalAccessException {
  EntityManager em=emf.createEntityManager();
  UUID timeLineId=UUID.randomUUID();
  Date currentDate=new Date();
  CompoundKeyDataType key=prepareData(new Long(12345677),78575785897L,"String_Node_Str",false,10,'A',(byte)5,(short)8,(float)69.3,163.76765654,enrolmentDate,enrolmentTime,joiningDateAndTime,new Integer(3),new Long(978423946455l),135434.89,newSqlDate,sqlTime,sqlTimestamp,bigDecimal,bigInteger,calendar,CompoundKeyDataType.class.newInstance());
  Map<String,Client> clients=(Map<String,Client>)em.getDelegate();
  Client client=clients.get(PERSISTENCE_UNIT);
  ((CassandraClientBase)client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);
  PrimeUserDataType user=new PrimeUserDataType(key);
  user.setTweetBody("String_Node_Str");
  user.setTweetDate(new Date());
  em.persist(user);
  em.clear();
  final String noClause="String_Node_Str";
  final String withFirstCompositeColClause="String_Node_Str";
  final String withSecondCompositeColClause="String_Node_Str";
  final String withBothCompositeColClause="String_Node_Str";
  final String withSelectiveCompositeColClause="String_Node_Str";
  final String withAllCompositeColClause="String_Node_Str";
  final String selectiveColumnTweetBodyWithAllCompositeColClause="String_Node_Str";
  Query q=em.createQuery(noClause);
  List<PrimeUserDataType> results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withFirstCompositeColClause);
  q.setParameter("String_Node_Str",new Long(12345677));
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withSecondCompositeColClause);
  q.setParameter("String_Node_Str",78575785897L);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withBothCompositeColClause);
  q.setParameter("String_Node_Str",new Long(12345677));
  q.setParameter("String_Node_Str",78575785897L);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withAllCompositeColClause);
  q.setParameter("String_Node_Str",new Long(12345677));
  q.setParameter("String_Node_Str",78575785897L);
  q.setParameter("String_Node_Str","String_Node_Str");
  q.setParameter("String_Node_Str",false);
  q.setParameter("String_Node_Str",10);
  q.setParameter("String_Node_Str",'A');
  q.setParameter("String_Node_Str",new Byte((byte)5));
  q.setParameter("String_Node_Str",(short)8);
  q.setParameter("String_Node_Str",(float)69.3);
  q.setParameter("String_Node_Str",163.76765654);
  q.setParameter("String_Node_Str",enrolmentDate);
  q.setParameter("String_Node_Str",enrolmentTime);
  q.setParameter("String_Node_Str",joiningDateAndTime);
  q.setParameter("String_Node_Str",new Integer(3));
  q.setParameter("String_Node_Str",new Long(978423946455l));
  q.setParameter("String_Node_Str",135434.89);
  q.setParameter("String_Node_Str",newSqlDate);
  q.setParameter("String_Node_Str",sqlTimestamp);
  q.setParameter("String_Node_Str",sqlTime);
  q.setParameter("String_Node_Str",bigInteger);
  q.setParameter("String_Node_Str",calendar.getTime());
  results=q.getResultList();
  Assert.assertNotNull(results);
  Assert.assertEquals(1,results.size());
  q=em.createQuery(withSelectiveCompositeColClause);
  q.setParameter("String_Node_Str",key);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  Assert.assertNull(results.get(0).getTweetBody());
  q=em.createQuery(selectiveColumnTweetBodyWithAllCompositeColClause);
  q.setParameter("String_Node_Str",new Long(12345677));
  q.setParameter("String_Node_Str",78575785897L);
  q.setParameter("String_Node_Str","String_Node_Str");
  q.setParameter("String_Node_Str",false);
  q.setParameter("String_Node_Str",10);
  q.setParameter("String_Node_Str",'A');
  q.setParameter("String_Node_Str",(byte)5);
  q.setParameter("String_Node_Str",(short)8);
  q.setParameter("String_Node_Str",(float)69.3);
  q.setParameter("String_Node_Str",163.76765654);
  q.setParameter("String_Node_Str",enrolmentDate);
  q.setParameter("String_Node_Str",enrolmentTime);
  q.setParameter("String_Node_Str",joiningDateAndTime);
  q.setParameter("String_Node_Str",new Integer(3));
  q.setParameter("String_Node_Str",new Long(978423946455l));
  q.setParameter("String_Node_Str",135434.89);
  q.setParameter("String_Node_Str",newSqlDate);
  q.setParameter("String_Node_Str",sqlTimestamp);
  q.setParameter("String_Node_Str",sqlTime);
  q.setParameter("String_Node_Str",bigInteger);
  q.setParameter("String_Node_Str",calendar.getTime());
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  Assert.assertEquals("String_Node_Str",results.get(0).getTweetBody());
  Assert.assertNull(results.get(0).getTweetDate());
  final String selectiveColumnTweetDateWithAllCompositeColClause="String_Node_Str";
  q=em.createQuery(selectiveColumnTweetDateWithAllCompositeColClause);
  q.setParameter("String_Node_Str",key);
  results=q.getResultList();
  Assert.assertEquals(1,results.size());
  Assert.assertEquals(currentDate.getTime(),results.get(0).getTweetDate().getTime());
  Assert.assertNull(results.get(0).getTweetBody());
  final String withCompositeKeyClause="String_Node_Str";
  q=em.createQuery(withCompositeKeyClause);
  q.setParameter("String_Node_Str",key);
  results=q.getResultList();
  Assert.assertNotNull(results);
  Assert.assertEquals(1,results.size());
  em.remove(user);
  em.clear();
}