Program: 176166
Project: 176166
Buggy source:
@Override protected void setConfig(Host host,Properties props,Map puProperties){
  CassandraHost cassandraHost=(CassandraHost)host;
  String maxActivePerNode=null;
  String maxIdlePerNode=null;
  String minIdlePerNode=null;
  String maxTotal=null;
  String testOnBorrow=null;
  String testWhileIdle=null;
  String testOnConnect=null;
  String testOnReturn=null;
  String socketTimeOut=null;
  String userName=null;
  String password=null;
  String maxWaitInMilli=null;
  String failOverPolicy=null;
  boolean hostRetry=false;
  if (puProperties != null) {
    maxActivePerNode=(String)puProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_ACTIVE);
    maxIdlePerNode=(String)puProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_IDLE);
    minIdlePerNode=(String)puProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MIN_IDLE);
    maxTotal=(String)puProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_TOTAL);
    testOnBorrow=(String)puProperties.get(CassandraConstants.TEST_ON_BORROW);
    testOnConnect=(String)puProperties.get(CassandraConstants.TEST_ON_CONNECT);
    testOnReturn=(String)puProperties.get(CassandraConstants.TEST_ON_RETURN);
    testWhileIdle=(String)puProperties.get(CassandraConstants.TEST_WHILE_IDLE);
    socketTimeOut=(String)puProperties.get(CassandraConstants.SOCKET_TIMEOUT);
    userName=(String)puProperties.get(PersistenceProperties.KUNDERA_USERNAME);
    password=(String)puProperties.get(PersistenceProperties.KUNDERA_PASSWORD);
    maxWaitInMilli=(String)puProperties.get(CassandraConstants.MAX_WAIT);
  }
  if (props != null) {
    if (maxActivePerNode == null) {
      maxActivePerNode=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_ACTIVE) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_ACTIVE).trim() : null;
    }
    if (maxIdlePerNode == null) {
      maxIdlePerNode=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_IDLE) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_IDLE).trim() : null;
    }
    if (minIdlePerNode == null) {
      minIdlePerNode=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MIN_IDLE) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MIN_IDLE).trim() : null;
    }
    if (maxTotal == null) {
      maxTotal=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_TOTAL) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_TOTAL).trim() : null;
    }
    if (maxWaitInMilli == null) {
      maxWaitInMilli=props.getProperty(CassandraConstants.MAX_WAIT) != null ? props.getProperty(CassandraConstants.MAX_WAIT).trim() : null;
    }
    if (userName == null) {
      userName=props.getProperty(PersistenceProperties.KUNDERA_USERNAME);
      password=props.getProperty(PersistenceProperties.KUNDERA_PASSWORD);
    }
    if (testOnBorrow == null) {
      testOnBorrow=props.getProperty(CassandraConstants.TEST_ON_BORROW) != null ? props.getProperty(CassandraConstants.TEST_ON_BORROW).trim() : null;
    }
    if (testOnConnect == null) {
      testOnConnect=props.getProperty(CassandraConstants.TEST_ON_CONNECT) != null ? props.getProperty(CassandraConstants.TEST_ON_CONNECT).trim() : null;
    }
    if (testOnReturn == null) {
      testOnReturn=props.getProperty(CassandraConstants.TEST_ON_RETURN) != null ? props.getProperty(CassandraConstants.TEST_ON_RETURN).trim() : null;
    }
    if (testWhileIdle == null) {
      testWhileIdle=props.getProperty(CassandraConstants.TEST_WHILE_IDLE) != null ? props.getProperty(CassandraConstants.TEST_WHILE_IDLE).trim() : null;
    }
    if (socketTimeOut == null) {
      socketTimeOut=props.getProperty(CassandraConstants.SOCKET_TIMEOUT) != null ? props.getProperty(CassandraConstants.SOCKET_TIMEOUT).trim() : null;
    }
    failOverPolicy=props.getProperty(Constants.FAILOVER_POLICY) != null ? props.getProperty(Constants.FAILOVER_POLICY).trim() : null;
    hostRetry=Boolean.parseBoolean(props.getProperty(Constants.RETRY) != null ? props.getProperty(Constants.RETRY).trim() : null);
  }
  try {
    if (!StringUtils.isEmpty(maxActivePerNode)) {
      cassandraHost.setInitialSize(Integer.parseInt(maxActivePerNode));
      cassandraHost.setMaxActive(Integer.parseInt(maxActivePerNode));
    }
    if (!StringUtils.isEmpty(maxIdlePerNode)) {
      cassandraHost.setMaxIdle(Integer.parseInt(maxIdlePerNode));
    }
    if (!StringUtils.isEmpty(minIdlePerNode)) {
      cassandraHost.setMinIdle(Integer.parseInt(minIdlePerNode));
    }
    if (!StringUtils.isEmpty(maxTotal)) {
      cassandraHost.setMaxActive(Integer.parseInt(maxTotal));
    }
    if (!StringUtils.isEmpty(maxWaitInMilli)) {
      cassandraHost.setMaxWait(Integer.parseInt(maxWaitInMilli));
    }
    cassandraHost.setTestOnBorrow(Boolean.parseBoolean(testOnBorrow));
    cassandraHost.setTestOnConnect(Boolean.parseBoolean(testOnConnect));
    cassandraHost.setTestOnReturn(Boolean.parseBoolean(testOnReturn));
    cassandraHost.setTestWhileIdle(Boolean.parseBoolean(testWhileIdle));
    cassandraHost.setHostFailoverPolicy(getFailoverPolicy(failOverPolicy));
    cassandraHost.setRetryHost(hostRetry);
    cassandraHost.setUserName(userName);
    cassandraHost.setPassword(password);
    if (!StringUtils.isEmpty(socketTimeOut)) {
      cassandraHost.setSocketTimeout(Integer.parseInt(socketTimeOut));
    }
 else {
      cassandraHost.setSocketTimeout(CassandraHost.DEFAULT_SHOCKET_TIMEOUT);
    }
  }
 catch (  NumberFormatException e) {
    logger.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override protected void setConfig(Host host,Properties props,Map externalProperties){
  CassandraHost cassandraHost=(CassandraHost)host;
  String maxActivePerNode=null;
  String maxIdlePerNode=null;
  String minIdlePerNode=null;
  String maxTotal=null;
  String testOnBorrow=null;
  String testWhileIdle=null;
  String testOnConnect=null;
  String testOnReturn=null;
  String socketTimeOut=null;
  String userName=null;
  String password=null;
  String maxWaitInMilli=null;
  String failOverPolicy=null;
  boolean hostRetry=false;
  if (externalProperties != null) {
    maxActivePerNode=(String)externalProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_ACTIVE);
    maxIdlePerNode=(String)externalProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_IDLE);
    minIdlePerNode=(String)externalProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MIN_IDLE);
    maxTotal=(String)externalProperties.get(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_TOTAL);
    testOnBorrow=(String)externalProperties.get(CassandraConstants.TEST_ON_BORROW);
    testOnConnect=(String)externalProperties.get(CassandraConstants.TEST_ON_CONNECT);
    testOnReturn=(String)externalProperties.get(CassandraConstants.TEST_ON_RETURN);
    testWhileIdle=(String)externalProperties.get(CassandraConstants.TEST_WHILE_IDLE);
    socketTimeOut=(String)externalProperties.get(CassandraConstants.SOCKET_TIMEOUT);
    userName=(String)externalProperties.get(PersistenceProperties.KUNDERA_USERNAME);
    password=(String)externalProperties.get(PersistenceProperties.KUNDERA_PASSWORD);
    maxWaitInMilli=(String)externalProperties.get(CassandraConstants.MAX_WAIT);
  }
  if (props != null) {
    if (maxActivePerNode == null) {
      maxActivePerNode=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_ACTIVE) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_ACTIVE).trim() : null;
    }
    if (maxIdlePerNode == null) {
      maxIdlePerNode=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_IDLE) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_IDLE).trim() : null;
    }
    if (minIdlePerNode == null) {
      minIdlePerNode=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MIN_IDLE) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MIN_IDLE).trim() : null;
    }
    if (maxTotal == null) {
      maxTotal=props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_TOTAL) != null ? props.getProperty(PersistenceProperties.KUNDERA_POOL_SIZE_MAX_TOTAL).trim() : null;
    }
    if (maxWaitInMilli == null) {
      maxWaitInMilli=props.getProperty(CassandraConstants.MAX_WAIT) != null ? props.getProperty(CassandraConstants.MAX_WAIT).trim() : null;
    }
    if (userName == null) {
      userName=props.getProperty(PersistenceProperties.KUNDERA_USERNAME);
      password=props.getProperty(PersistenceProperties.KUNDERA_PASSWORD);
    }
  }
  try {
    if (!StringUtils.isEmpty(maxActivePerNode)) {
      cassandraHost.setInitialSize(Integer.parseInt(maxActivePerNode));
      cassandraHost.setMaxActive(Integer.parseInt(maxActivePerNode));
    }
    if (!StringUtils.isEmpty(maxIdlePerNode)) {
      cassandraHost.setMaxIdle(Integer.parseInt(maxIdlePerNode));
    }
    if (!StringUtils.isEmpty(minIdlePerNode)) {
      cassandraHost.setMinIdle(Integer.parseInt(minIdlePerNode));
    }
    if (!StringUtils.isEmpty(maxTotal)) {
      cassandraHost.setMaxActive(Integer.parseInt(maxTotal));
    }
    if (!StringUtils.isEmpty(maxWaitInMilli)) {
      cassandraHost.setMaxWait(Integer.parseInt(maxWaitInMilli));
    }
    cassandraHost.setTestOnBorrow(Boolean.parseBoolean(testOnBorrow));
    cassandraHost.setTestOnConnect(Boolean.parseBoolean(testOnConnect));
    cassandraHost.setTestOnReturn(Boolean.parseBoolean(testOnReturn));
    cassandraHost.setTestWhileIdle(Boolean.parseBoolean(testWhileIdle));
    cassandraHost.setHostFailoverPolicy(getFailoverPolicy(failOverPolicy));
    cassandraHost.setRetryHost(hostRetry);
    cassandraHost.setUserName(userName);
    cassandraHost.setPassword(password);
    if (!StringUtils.isEmpty(socketTimeOut)) {
      cassandraHost.setSocketTimeout(Integer.parseInt(socketTimeOut));
    }
 else {
      cassandraHost.setSocketTimeout(CassandraHost.DEFAULT_SHOCKET_TIMEOUT);
    }
  }
 catch (  NumberFormatException e) {
    logger.warn("String_Node_Str");
  }
}