Program: 17399
Project: 17399
Buggy source:
/** 
 * Build the tables contained in the keyspace definition. This method assumes that its keyspace exists and does not contain any tables.
 */
public void buildKeyspace(Boolean forceRebuild){
  cqlExecutor.clearStatementCache();
  CQLStatement cql=CObjectCQLGenerator.makeCQLforShardIndexTableCreate();
  try {
    cqlExecutor.executeSync(cql);
  }
 catch (  Exception e) {
    if (forceRebuild) {
      CQLStatement dropCql=CObjectCQLGenerator.makeCQLforShardIndexTableDrop();
      logger.debug("String_Node_Str",dropCql);
      cqlExecutor.executeSync(dropCql);
      cqlExecutor.executeSync(cql);
    }
 else {
      logger.debug("String_Node_Str");
    }
  }
  cql=CObjectCQLGenerator.makeCQLforIndexUpdateTableCreate();
  try {
    cqlExecutor.executeSync(cql);
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str");
  }
  cql=cqlGenerator.makeCQLforCreateKeyspaceDefinitionsTable();
  try {
    cqlExecutor.executeSync(cql);
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str");
  }
  if (keyspaceDefinition.getDefinitions() != null) {
    for (    CDefinition definition : keyspaceDefinition.getDefinitions().values()) {
      CQLStatementIterator statementIterator=cqlGenerator.makeCQLforCreate(definition.getName());
      CQLStatementIterator dropStatementIterator=cqlGenerator.makeCQLforDrop(definition.getName());
      while (statementIterator.hasNext()) {
        cql=statementIterator.next();
        CQLStatement dropCql=dropStatementIterator.next();
        try {
          cqlExecutor.executeSync(cql);
        }
 catch (        AlreadyExistsException e) {
          if (forceRebuild) {
            logger.debug("String_Node_Str");
            cqlExecutor.executeSync(dropCql);
            cqlExecutor.executeSync(cql);
          }
 else {
            logger.warn("String_Node_Str");
          }
        }
      }
    }
  }
  try {
    com.fasterxml.jackson.databind.ObjectMapper om=new com.fasterxml.jackson.databind.ObjectMapper();
    String keyspaceDefinitionAsJson=om.writeValueAsString(keyspaceDefinition);
    CQLStatementIterator it=cqlGenerator.makeCQLforInsertKeyspaceDefinition(keyspaceDefinitionAsJson);
    executeStatements(it);
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Build the tables contained in the keyspace definition. This method assumes that its keyspace exists and does not contain any tables.
 */
public void buildKeyspace(Boolean forceRebuild){
  cqlExecutor.clearStatementCache();
  CQLStatement cql=CObjectCQLGenerator.makeCQLforShardIndexTableCreate();
  try {
    cqlExecutor.executeSync(cql);
  }
 catch (  Exception e) {
    if (forceRebuild) {
      CQLStatement dropCql=cqlGenerator.makeCQLforShardIndexTableDrop();
      logger.debug("String_Node_Str",dropCql);
      cqlExecutor.executeSync(dropCql);
      cqlExecutor.executeSync(cql);
    }
 else {
      logger.debug("String_Node_Str");
    }
  }
  cql=CObjectCQLGenerator.makeCQLforIndexUpdateTableCreate();
  try {
    cqlExecutor.executeSync(cql);
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str");
  }
  cql=cqlGenerator.makeCQLforCreateKeyspaceDefinitionsTable();
  try {
    cqlExecutor.executeSync(cql);
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str");
  }
  if (keyspaceDefinition.getDefinitions() != null) {
    for (    CDefinition definition : keyspaceDefinition.getDefinitions().values()) {
      CQLStatementIterator statementIterator=cqlGenerator.makeCQLforCreate(definition.getName());
      CQLStatementIterator dropStatementIterator=cqlGenerator.makeCQLforDrop(definition.getName());
      while (statementIterator.hasNext()) {
        cql=statementIterator.next();
        CQLStatement dropCql=dropStatementIterator.next();
        try {
          cqlExecutor.executeSync(cql);
        }
 catch (        AlreadyExistsException e) {
          if (forceRebuild) {
            logger.debug("String_Node_Str");
            cqlExecutor.executeSync(dropCql);
            cqlExecutor.executeSync(cql);
          }
 else {
            logger.warn("String_Node_Str");
          }
        }
      }
    }
  }
  try {
    com.fasterxml.jackson.databind.ObjectMapper om=new com.fasterxml.jackson.databind.ObjectMapper();
    String keyspaceDefinitionAsJson=om.writeValueAsString(keyspaceDefinition);
    CQLStatementIterator it=cqlGenerator.makeCQLforInsertKeyspaceDefinition(keyspaceDefinitionAsJson);
    executeStatements(it);
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str");
  }
}