Program: 112610
Project: 112610
Buggy source:
@Override public void process(Iterable<StratioStreamingMessage> messages) throws Exception {
  Integer partitionSize=maxBatchSize;
  if (partitionSize <= 0) {
    partitionSize=Iterables.size(messages);
  }
  Iterable<List<StratioStreamingMessage>> partitionIterables=Iterables.partition(messages,partitionSize);
  try {
    for (    List<StratioStreamingMessage> messageList : partitionIterables) {
      BatchStatement batch=new BatchStatement(batchType);
      for (      StratioStreamingMessage stratioStreamingMessage : messageList) {
        Set<String> columns=getColumnSet(stratioStreamingMessage.getColumns());
        if (getCassandraTableOperationsService().getTableNames().get(stratioStreamingMessage.getStreamName()) == null) {
          getCassandraTableOperationsService().createTable(stratioStreamingMessage.getStreamName(),stratioStreamingMessage.getColumns(),TIMESTAMP_FIELD);
          getCassandraTableOperationsService().refreshTablenames();
        }
        if (getCassandraTableOperationsService().getTableNames().get(stratioStreamingMessage.getStreamName()) != columns.hashCode()) {
          getCassandraTableOperationsService().alterTable(stratioStreamingMessage.getStreamName(),columns,stratioStreamingMessage.getColumns());
          getCassandraTableOperationsService().refreshTablenames();
        }
        batch.add(getCassandraTableOperationsService().createInsertStatement(stratioStreamingMessage.getStreamName(),stratioStreamingMessage.getColumns(),TIMESTAMP_FIELD));
      }
      getCassandraTableOperationsService().getSession().execute(batch);
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",Iterables.size(partitionIterables),e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void process(Iterable<StratioStreamingMessage> messages) throws Exception {
  Integer partitionSize=maxBatchSize;
  if (partitionSize <= 0) {
    partitionSize=Iterables.size(messages);
  }
  Iterable<List<StratioStreamingMessage>> partitionIterables=Iterables.partition(messages,partitionSize);
  try {
    getCassandraTableOperationsService().checkKeyspace();
    for (    List<StratioStreamingMessage> messageList : partitionIterables) {
      BatchStatement batch=new BatchStatement(batchType);
      for (      StratioStreamingMessage stratioStreamingMessage : messageList) {
        Set<String> columns=getColumnSet(stratioStreamingMessage.getColumns());
        if (getCassandraTableOperationsService().getTableNames().get(stratioStreamingMessage.getStreamName()) == null) {
          getCassandraTableOperationsService().createTable(stratioStreamingMessage.getStreamName(),stratioStreamingMessage.getColumns(),TIMESTAMP_FIELD);
          getCassandraTableOperationsService().refreshTablenames();
        }
        if (getCassandraTableOperationsService().getTableNames().get(stratioStreamingMessage.getStreamName()) != columns.hashCode()) {
          getCassandraTableOperationsService().alterTable(stratioStreamingMessage.getStreamName(),columns,stratioStreamingMessage.getColumns());
          getCassandraTableOperationsService().refreshTablenames();
        }
        batch.add(getCassandraTableOperationsService().createInsertStatement(stratioStreamingMessage.getStreamName(),stratioStreamingMessage.getColumns(),TIMESTAMP_FIELD));
      }
      getCassandraTableOperationsService().getSession().execute(batch);
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",Iterables.size(partitionIterables),e.getMessage());
  }
}