Program: 175994
Project: 175994
Buggy source:
/** 
 * Test method for  {@link com.impetus.client.cassandra.query.CassQuery#onQueryOverCQL3(com.impetus.kundera.metadata.model.EntityMetadata,com.impetus.kundera.client.Client,com.impetus.kundera.metadata.model.MetamodelImpl,java.util.List)}.
 * @throws InvocationTargetException
 * @throws IllegalAccessException
 * @throws IllegalArgumentException
 */
@Test public void testUpdateDeleteQuerySimpleEntity() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  CassandraCli.createKeySpace("String_Node_Str");
  String pu="String_Node_Str";
  EntityManagerFactory emf=Persistence.createEntityManagerFactory(pu);
  EntityManager em=emf.createEntityManager();
  String queryString="String_Node_Str";
  String cqlQuery=parseAndCreateUpdateQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,200);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateUpdateQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,400);
  Assert.assertNotNull(cqlQuery);
  System.out.println(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  List<String> id=new ArrayList<String>();
  id.add("String_Node_Str");
  id.add("String_Node_Str");
  id.add("String_Node_Str");
  KunderaQuery kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateUpdateQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,Integer.MAX_VALUE);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateUpdateQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,Integer.MAX_VALUE);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateDeleteQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,400);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateDeleteQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,400);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateDeleteQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,Integer.MAX_VALUE);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateDeleteQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,100);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  em.close();
  emf.close();
  CassandraCli.dropKeySpace("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Test method for  {@link com.impetus.client.cassandra.query.CassQuery#onQueryOverCQL3(com.impetus.kundera.metadata.model.EntityMetadata,com.impetus.kundera.client.Client,com.impetus.kundera.metadata.model.MetamodelImpl,java.util.List)}.
 * @throws InvocationTargetException
 * @throws IllegalAccessException
 * @throws IllegalArgumentException
 */
@Test public void testUpdateDeleteQuerySimpleEntity() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  CassandraCli.createKeySpace("String_Node_Str");
  String pu="String_Node_Str";
  EntityManagerFactory emf=Persistence.createEntityManagerFactory(pu);
  EntityManager em=emf.createEntityManager();
  String queryString="String_Node_Str";
  String cqlQuery=parseAndCreateUpdateQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,200);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateUpdateQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,400);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  List<String> id=new ArrayList<String>();
  id.add("String_Node_Str");
  id.add("String_Node_Str");
  id.add("String_Node_Str");
  KunderaQuery kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateUpdateQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,Integer.MAX_VALUE);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateUpdateQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,Integer.MAX_VALUE);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateDeleteQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,400);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateDeleteQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,400);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateDeleteQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,Integer.MAX_VALUE);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",id);
  cqlQuery=parseAndCreateDeleteQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,100);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  em.close();
  emf.close();
  CassandraCli.dropKeySpace("String_Node_Str");
}