Program: 116842
Project: 116842
Buggy source:
@Override public void configure(Context context){
  String table=context.getString(CONF_TABLE,DEFAULT_TABLE);
  String host=context.getString(CONF_HOST,DEFAULT_HOST);
  String keyspace=context.getString(CONF_KEYSPACE,DEFAULT_KEYSPACE);
  int port=context.getInteger(CONF_PORT,DEFAULT_PORT);
  String username=context.getString(CONF_USERNAME);
  String password=context.getString(CONF_PASSWORD);
  String clusterName=context.getString(CONF_CLUSTER,DEFAULT_CLUSTER);
  String consistency=context.getString(CONF_CONSISTENCY_LEVEL,DEFAULT_CONSISTENCY_LEVEL);
  String columnDefinitionFile=context.getString(CONF_COLUMN_DEFINITION_FILE);
  if (!Strings.isNullOrEmpty(columnDefinitionFile)) {
    this.parser=new EventParser(readJsonFromFile(new File(columnDefinitionFile)));
  }
  ColumnDefinition definition=this.parser == null ? null : this.parser.getDefinition();
  if (Strings.isNullOrEmpty(username) && Strings.isNullOrEmpty(password)) {
    this.repository=new CassandraRepository(host,table,keyspace,port,clusterName,consistency,definition);
  }
 else {
    this.repository=new CassandraRepository(username,password,host,table,keyspace,port,clusterName,consistency,definition);
  }
  setOptionalRepoConfiguration(context);
  this.batchsize=context.getInteger(CONF_BATCH_SIZE,DEFAULT_BATCH_SIZE);
  this.sinkCounter=new SinkCounter(this.getName());
  this.dateFormat=context.getString(CONF_DATE_FORMAT,DEFAULT_DATE_FORMAT);
  this.itemSeparator=context.getString(CONF_ITEM_SEPARATOR,DEFAULT_ITEM_SEPARATOR);
  this.mapValueSeparator=context.getString(CONF_MAP_VALUE_SEPARATOR,DEFAULT_MAP_VALUE_SEPARATOR);
  this.mapKeyType=context.getString(CONF_MAP_KEY_TYPE,DEFAULT_MAP_KEY_TYPE);
  this.mapValueType=context.getString(CONF_MAP_VALUE_TYPE,DEFAULT_MAP_VALUE_TYPE);
  this.listValueType=context.getString(CONF_LIST_VALUE_TYPE,DEFAULT_LIST_VALUE_TYPE);
}

Fixed version (ground truth):
@Override public void configure(Context context){
  String table=context.getString(CONF_TABLE,DEFAULT_TABLE);
  String host=context.getString(CONF_HOST,DEFAULT_HOST);
  String keyspace=context.getString(CONF_KEYSPACE,DEFAULT_KEYSPACE);
  int port=context.getInteger(CONF_PORT,DEFAULT_PORT);
  String username=context.getString(CONF_USERNAME);
  String password=context.getString(CONF_PASSWORD);
  String clusterName=context.getString(CONF_CLUSTER,DEFAULT_CLUSTER);
  String consistency=context.getString(CONF_CONSISTENCY_LEVEL,DEFAULT_CONSISTENCY_LEVEL);
  String columnDefinitionFile=context.getString(CONF_COLUMN_DEFINITION_FILE);
  if (!Strings.isNullOrEmpty(columnDefinitionFile)) {
    this.parser=new EventParser(readJsonFromFile(new File(columnDefinitionFile)));
  }
  ColumnDefinition definition=this.parser == null ? null : this.parser.getDefinition();
  if (Strings.isNullOrEmpty(username) || Strings.isNullOrEmpty(password)) {
    this.repository=new CassandraRepository(host,table,keyspace,port,clusterName,consistency,definition);
  }
 else {
    this.repository=new CassandraRepository(username,password,host,table,keyspace,port,clusterName,consistency,definition);
  }
  setOptionalRepoConfiguration(context);
  this.batchsize=context.getInteger(CONF_BATCH_SIZE,DEFAULT_BATCH_SIZE);
  this.sinkCounter=new SinkCounter(this.getName());
  this.dateFormat=context.getString(CONF_DATE_FORMAT,DEFAULT_DATE_FORMAT);
  this.itemSeparator=context.getString(CONF_ITEM_SEPARATOR,DEFAULT_ITEM_SEPARATOR);
  this.mapValueSeparator=context.getString(CONF_MAP_VALUE_SEPARATOR,DEFAULT_MAP_VALUE_SEPARATOR);
  this.mapKeyType=context.getString(CONF_MAP_KEY_TYPE,DEFAULT_MAP_KEY_TYPE);
  this.mapValueType=context.getString(CONF_MAP_VALUE_TYPE,DEFAULT_MAP_VALUE_TYPE);
  this.listValueType=context.getString(CONF_LIST_VALUE_TYPE,DEFAULT_LIST_VALUE_TYPE);
}