Program: 90495
Project: 90495
Buggy source:
@Override public void startup(String xmlFilePath) throws DBClusterException {
  LOG.info("String_Node_Str");
  try {
    config=_getConfig(xmlFilePath);
    LOG.info("String_Node_Str" + xmlFilePath + "String_Node_Str");
  }
 catch (  LoadConfigException e) {
    throw new RuntimeException(e);
  }
  this.curatorClient=CuratorFrameworkFactory.newClient(config.getZookeeperUrl(),new RetryNTimes(5,1000));
  this.curatorClient.start();
  try {
    ZooKeeper zkClient=this.curatorClient.getZookeeperClient().getZooKeeper();
    Stat stat=zkClient.exists(Const.ZK_ROOT,false);
    if (stat == null) {
      zkClient.create(Const.ZK_ROOT,new byte[0],ZooDefs.Ids.OPEN_ACL_UNSAFE,CreateMode.PERSISTENT);
    }
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.idGenerator=new DistributedSequenceIdGeneratorImpl(config,this.curatorClient);
  LOG.info("String_Node_Str");
  ICacheBuilder cacheBuilder=MemCachedCacheBuilder.valueOf(config);
  this.primaryCache=cacheBuilder.buildPrimaryCache();
  this.secondCache=cacheBuilder.buildSecondCache();
switch (enumDBRouteAlg) {
case SIMPLE_HASH:
    dbRouter=new SimpleHashClusterRouterImpl();
  break;
default :
dbRouter=new SimpleHashClusterRouterImpl();
break;
}
if (this.dbRouter == null) {
throw new DBClusterException("String_Node_Str");
}
this.dbRouter.setDbClusterInfo(dbClusterInfo);
this.dbRouter.setHashAlgo(config.getHashAlgo());
IDBGeneratorBuilder dbGeneratorBuilder=DefaultDBGeneratorBuilder.valueOf(this.syncAction,this.enumDb);
this.dbGenerator=dbGeneratorBuilder.build();
dbClusterInfo=config.getDBClusterInfo();
try {
_initDBCluster(this.dbClusterInfo);
List<DBTable> tables=null;
if (isShardInfoFromZk) {
tables=getDBTableFromZk();
}
 else {
if (StringUtils.isBlank(scanPackage)) {
throw new DBClusterException("String_Node_Str");
}
tables=getDBTableFromJvm();
_syncToZookeeper(tables);
}
if (tables.isEmpty()) {
throw new DBClusterException("String_Node_Str" + scanPackage);
}
_initTableCluster(dbClusterInfo,tables);
if (this.syncAction != EnumSyncAction.NONE) {
LOG.info("String_Node_Str");
long start=System.currentTimeMillis();
_createTable(tables);
LOG.info("String_Node_Str" + (System.currentTimeMillis() - start) + "String_Node_Str");
}
}
 catch (Exception e) {
throw new DBClusterException("String_Node_Str",e);
}
LOG.info("String_Node_Str");
}

Fixed version (ground truth):
@Override public void startup(String xmlFilePath) throws DBClusterException {
  LOG.info("String_Node_Str");
  try {
    config=_getConfig(xmlFilePath);
  }
 catch (  LoadConfigException e) {
    throw new RuntimeException(e);
  }
  this.curatorClient=CuratorFrameworkFactory.newClient(config.getZookeeperUrl(),new RetryNTimes(5,1000));
  this.curatorClient.start();
  try {
    ZooKeeper zkClient=this.curatorClient.getZookeeperClient().getZooKeeper();
    Stat stat=zkClient.exists(Const.ZK_ROOT,false);
    if (stat == null) {
      zkClient.create(Const.ZK_ROOT,new byte[0],ZooDefs.Ids.OPEN_ACL_UNSAFE,CreateMode.PERSISTENT);
    }
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.idGenerator=new DistributedSequenceIdGeneratorImpl(config,this.curatorClient);
  LOG.info("String_Node_Str");
  ICacheBuilder cacheBuilder=MemCachedCacheBuilder.valueOf(config);
  this.primaryCache=cacheBuilder.buildPrimaryCache();
  this.secondCache=cacheBuilder.buildSecondCache();
  IDBGeneratorBuilder dbGeneratorBuilder=DefaultDBGeneratorBuilder.valueOf(this.syncAction,this.enumDb);
  this.dbGenerator=dbGeneratorBuilder.build();
  dbClusterInfo=config.getDBClusterInfo();
  try {
    _initDBCluster(this.dbClusterInfo);
    List<DBTable> tables=null;
    if (isShardInfoFromZk) {
      tables=getDBTableFromZk();
    }
 else {
      if (StringUtils.isBlank(scanPackage)) {
        throw new DBClusterException("String_Node_Str");
      }
      tables=getDBTableFromJvm();
      _syncToZookeeper(tables);
    }
    if (tables.isEmpty()) {
      throw new DBClusterException("String_Node_Str" + scanPackage);
    }
    _initTableCluster(dbClusterInfo,tables);
    if (this.syncAction != EnumSyncAction.NONE) {
      LOG.info("String_Node_Str");
      long start=System.currentTimeMillis();
      _createTable(tables);
      LOG.info("String_Node_Str" + (System.currentTimeMillis() - start) + "String_Node_Str");
    }
  }
 catch (  Exception e) {
    throw new DBClusterException("String_Node_Str",e);
  }
switch (enumDBRouteAlg) {
case SIMPLE_HASH:
    dbRouter=new SimpleHashClusterRouterImpl();
  break;
default :
dbRouter=new SimpleHashClusterRouterImpl();
break;
}
this.dbRouter.setDbClusterInfo(dbClusterInfo);
this.dbRouter.setTableCluster(tableCluster);
this.dbRouter.setHashAlgo(config.getHashAlgo());
LOG.info("String_Node_Str");
}