Program: 176758
Project: 176758
Buggy source:
/** 
 * Persists a   {@link Node} to database
 */
@Override protected void onPersist(EntityMetadata entityMetadata,Object entity,Object id,List<RelationHolder> rlHolders){
  IPooledConnection conn=null;
  Cassandra.Client cassandra_client=null;
  try {
    Map<ByteBuffer,Map<String,List<Mutation>>> mutationMap=new HashMap<ByteBuffer,Map<String,List<Mutation>>>();
    MetamodelImpl metaModel=(MetamodelImpl)KunderaMetadata.INSTANCE.getApplicationMetadata().getMetamodel(entityMetadata.getPersistenceUnit());
    conn=PelopsUtils.getCassandraConnection(entityMetadata.getPersistenceUnit());
    cassandra_client=conn.getAPI();
    cassandra_client.set_keyspace(entityMetadata.getSchema());
    if (metaModel.isEmbeddable(entityMetadata.getIdAttribute().getBindableJavaType())) {
      onpersistOverCompositeKey(entityMetadata,entity,cassandra_client);
    }
 else {
      prepareMutation(entityMetadata,entity,id,rlHolders,mutationMap);
      cassandra_client.batch_mutate(mutationMap,getConsistencyLevel());
    }
  }
 catch (  InvalidRequestException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  TException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  UnavailableException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  TimedOutException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  SchemaDisagreementException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  UnsupportedEncodingException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
 finally {
    PelopsUtils.releaseConnection(conn);
    cassandra_client=null;
  }
}

Fixed version (ground truth):
/** 
 * Persists a   {@link Node} to database
 */
@Override protected void onPersist(EntityMetadata entityMetadata,Object entity,Object id,List<RelationHolder> rlHolders){
  IPooledConnection conn=null;
  Cassandra.Client cassandra_client=null;
  try {
    Map<ByteBuffer,Map<String,List<Mutation>>> mutationMap=new HashMap<ByteBuffer,Map<String,List<Mutation>>>();
    MetamodelImpl metaModel=(MetamodelImpl)KunderaMetadata.INSTANCE.getApplicationMetadata().getMetamodel(entityMetadata.getPersistenceUnit());
    conn=PelopsUtils.getCassandraConnection(entityMetadata.getPersistenceUnit());
    cassandra_client=conn.getAPI();
    cassandra_client.set_keyspace(entityMetadata.getSchema());
    if (metaModel.isEmbeddable(entityMetadata.getIdAttribute().getBindableJavaType())) {
      onpersistOverCompositeKey(entityMetadata,entity,cassandra_client);
    }
 else {
      prepareMutation(entityMetadata,entity,id,rlHolders,mutationMap);
      cassandra_client.batch_mutate(mutationMap,getConsistencyLevel());
    }
    mutationMap.clear();
  }
 catch (  InvalidRequestException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  TException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  UnavailableException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  TimedOutException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  SchemaDisagreementException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
catch (  UnsupportedEncodingException e) {
    log.error("String_Node_Str" + e.getMessage());
    throw new KunderaException(e);
  }
 finally {
    PelopsUtils.releaseConnection(conn);
    cassandra_client=null;
  }
}