Program: 176883
Project: 176883
Buggy source:
@Override void createSchema() throws InvalidRequestException, SchemaDisagreementException, TException {
  KsDef ksDef=null;
  CfDef userCfDef=new CfDef();
  userCfDef.name="String_Node_Str";
  userCfDef.keyspace="String_Node_Str";
  userCfDef.column_type="String_Node_Str";
  userCfDef.setComparator_type("String_Node_Str");
  userCfDef.setDefault_validation_class("String_Node_Str");
  CfDef prefrenceCfDef=new CfDef();
  prefrenceCfDef.name="String_Node_Str";
  prefrenceCfDef.keyspace="String_Node_Str";
  prefrenceCfDef.setComparator_type("String_Node_Str");
  prefrenceCfDef.setDefault_validation_class("String_Node_Str");
  ColumnDef columnDef=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef.index_type=IndexType.KEYS;
  ColumnDef columnDef3=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef3.index_type=IndexType.KEYS;
  prefrenceCfDef.addToColumn_metadata(columnDef);
  prefrenceCfDef.addToColumn_metadata(columnDef3);
  CfDef externalLinkCfDef=new CfDef();
  externalLinkCfDef.name="String_Node_Str";
  externalLinkCfDef.keyspace="String_Node_Str";
  externalLinkCfDef.setComparator_type("String_Node_Str");
  externalLinkCfDef.setDefault_validation_class("String_Node_Str");
  ColumnDef columnDef1=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef1.index_type=IndexType.KEYS;
  ColumnDef columnDef2=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef2.index_type=IndexType.KEYS;
  externalLinkCfDef.addToColumn_metadata(columnDef1);
  externalLinkCfDef.addToColumn_metadata(columnDef2);
  List<CfDef> cfDefs=new ArrayList<CfDef>();
  cfDefs.add(userCfDef);
  cfDefs.add(prefrenceCfDef);
  cfDefs.add(externalLinkCfDef);
  try {
    ksDef=CassandraCli.client.describe_keyspace("String_Node_Str");
    CassandraCli.client.set_keyspace("String_Node_Str");
    List<CfDef> cfDefn=ksDef.getCf_defs();
    for (    CfDef cfDef1 : cfDefn) {
      if (cfDef1.getName().equalsIgnoreCase("String_Node_Str")) {
        CassandraCli.client.system_drop_column_family("String_Node_Str");
      }
      if (cfDef1.getName().equalsIgnoreCase("String_Node_Str")) {
        CassandraCli.client.system_drop_column_family("String_Node_Str");
      }
      if (cfDef1.getName().equalsIgnoreCase("String_Node_Str")) {
        CassandraCli.client.system_drop_column_family("String_Node_Str");
      }
    }
    CassandraCli.client.system_add_column_family(userCfDef);
    CassandraCli.client.system_add_column_family(externalLinkCfDef);
    CassandraCli.client.system_add_column_family(prefrenceCfDef);
  }
 catch (  NotFoundException e) {
    ksDef=new KsDef("String_Node_Str","String_Node_Str",cfDefs);
    ksDef.setReplication_factor(1);
    CassandraCli.client.system_add_keyspace(ksDef);
  }
catch (  InvalidRequestException e) {
    log.error(e.getMessage());
  }
catch (  TException e) {
    log.error(e.getMessage());
  }
}

Fixed version (ground truth):
@Override void createSchema() throws InvalidRequestException, SchemaDisagreementException, TException {
  KsDef ksDef=null;
  CfDef userCfDef=new CfDef();
  userCfDef.name="String_Node_Str";
  userCfDef.keyspace=keyspace;
  userCfDef.column_type="String_Node_Str";
  userCfDef.setComparator_type("String_Node_Str");
  userCfDef.setDefault_validation_class("String_Node_Str");
  CfDef prefrenceCfDef=new CfDef();
  prefrenceCfDef.name="String_Node_Str";
  prefrenceCfDef.keyspace=keyspace;
  prefrenceCfDef.setComparator_type("String_Node_Str");
  prefrenceCfDef.setDefault_validation_class("String_Node_Str");
  ColumnDef columnDef=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef.index_type=IndexType.KEYS;
  ColumnDef columnDef3=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef3.index_type=IndexType.KEYS;
  prefrenceCfDef.addToColumn_metadata(columnDef);
  prefrenceCfDef.addToColumn_metadata(columnDef3);
  CfDef externalLinkCfDef=new CfDef();
  externalLinkCfDef.name="String_Node_Str";
  externalLinkCfDef.keyspace=keyspace;
  externalLinkCfDef.setComparator_type("String_Node_Str");
  externalLinkCfDef.setDefault_validation_class("String_Node_Str");
  ColumnDef columnDef1=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef1.index_type=IndexType.KEYS;
  ColumnDef columnDef2=new ColumnDef(ByteBuffer.wrap("String_Node_Str".getBytes()),"String_Node_Str");
  columnDef2.index_type=IndexType.KEYS;
  externalLinkCfDef.addToColumn_metadata(columnDef1);
  externalLinkCfDef.addToColumn_metadata(columnDef2);
  List<CfDef> cfDefs=new ArrayList<CfDef>();
  cfDefs.add(userCfDef);
  cfDefs.add(prefrenceCfDef);
  cfDefs.add(externalLinkCfDef);
  try {
    ksDef=CassandraCli.client.describe_keyspace(keyspace);
    CassandraCli.client.set_keyspace(keyspace);
    List<CfDef> cfDefn=ksDef.getCf_defs();
    for (    CfDef cfDef1 : cfDefn) {
      if (cfDef1.getName().equalsIgnoreCase("String_Node_Str")) {
        CassandraCli.client.system_drop_column_family("String_Node_Str");
      }
      if (cfDef1.getName().equalsIgnoreCase("String_Node_Str")) {
        CassandraCli.client.system_drop_column_family("String_Node_Str");
      }
      if (cfDef1.getName().equalsIgnoreCase("String_Node_Str")) {
        CassandraCli.client.system_drop_column_family("String_Node_Str");
      }
    }
    CassandraCli.client.system_add_column_family(userCfDef);
    CassandraCli.client.system_add_column_family(externalLinkCfDef);
    CassandraCli.client.system_add_column_family(prefrenceCfDef);
  }
 catch (  NotFoundException e) {
    ksDef=new KsDef(keyspace,"String_Node_Str",cfDefs);
    ksDef.setReplication_factor(1);
    CassandraCli.client.system_add_keyspace(ksDef);
  }
catch (  InvalidRequestException e) {
    log.error(e.getMessage());
  }
catch (  TException e) {
    log.error(e.getMessage());
  }
}