Program: 175993
Project: 175993
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 testOnQueryOverCQL3ForSimpleEntity() 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=parseAndCreateCqlQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,200);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateCqlQuery(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> nameList=new ArrayList<String>();
  nameList.add("String_Node_Str");
  nameList.add("String_Node_Str");
  nameList.add("String_Node_Str");
  KunderaQuery kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",nameList);
  cqlQuery=parseAndCreateCqlQuery(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",nameList);
  cqlQuery=parseAndCreateCqlQuery(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",nameList);
  cqlQuery=parseAndCreateCqlQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,5);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  List<Integer> ageList=new ArrayList<Integer>();
  ageList.add(10);
  ageList.add(20);
  ageList.add(30);
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",ageList);
  cqlQuery=parseAndCreateCqlQuery(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 testOnQueryOverCQL3ForSimpleEntity() 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=parseAndCreateCqlQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,200);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  cqlQuery=parseAndCreateCqlQuery(getQueryObject(queryString,emf),emf,em,pu,PersonCassandra.class,400);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  List<String> nameList=new ArrayList<String>();
  nameList.add("String_Node_Str");
  nameList.add("String_Node_Str");
  nameList.add("String_Node_Str");
  KunderaQuery kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",nameList);
  cqlQuery=parseAndCreateCqlQuery(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",nameList);
  cqlQuery=parseAndCreateCqlQuery(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",nameList);
  cqlQuery=parseAndCreateCqlQuery(kunderaQuery,emf,em,pu,PersonCassandra.class,5);
  Assert.assertNotNull(cqlQuery);
  Assert.assertEquals("String_Node_Str",cqlQuery);
  queryString="String_Node_Str";
  List<Integer> ageList=new ArrayList<Integer>();
  ageList.add(10);
  ageList.add(20);
  ageList.add(30);
  kunderaQuery=getQueryObject(queryString,emf);
  kunderaQuery.setParameter("String_Node_Str",ageList);
  cqlQuery=parseAndCreateCqlQuery(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");
}