Program: 107060
Project: 107060
Buggy source:
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  _name=name;
  ComponentLocator locator=ComponentLocator.getCurrentLocator();
  ConfigurationDao configDao=locator.getDao(ConfigurationDao.class);
  if (configDao == null) {
    s_logger.error("String_Node_Str");
    return false;
  }
  Map<String,String> configs=configDao.getConfiguration("String_Node_Str",params);
  String overProvisioningFactorStr=configs.get("String_Node_Str");
  if (overProvisioningFactorStr != null) {
    _overProvisioningFactor=Float.parseFloat(overProvisioningFactorStr);
  }
  _retry=NumbersUtil.parseInt(configs.get(Config.StartRetry.key()),10);
  _pingInterval=NumbersUtil.parseInt(configs.get("String_Node_Str"),60);
  _hostRetry=NumbersUtil.parseInt(configs.get("String_Node_Str"),2);
  _snapshotTimeout=NumbersUtil.parseInt(Config.CmdsWait.key(),2 * 60 * 60* 1000);
  _storagePoolAcquisitionWaitSeconds=NumbersUtil.parseInt(configs.get("String_Node_Str"),1800);
  s_logger.info("String_Node_Str" + _storagePoolAcquisitionWaitSeconds + "String_Node_Str");
  _agentMgr.registerForHostEvents(new StoragePoolMonitor(this,_hostDao,_storagePoolDao),true,false,true);
  String storageCleanupEnabled=configs.get("String_Node_Str");
  _storageCleanupEnabled=(storageCleanupEnabled == null) ? true : Boolean.parseBoolean(storageCleanupEnabled);
  String time=configs.get("String_Node_Str");
  _storageCleanupInterval=NumbersUtil.parseInt(time,86400);
  String workers=configs.get("String_Node_Str");
  int wrks=NumbersUtil.parseInt(workers,10);
  _executor=Executors.newScheduledThreadPool(wrks,new NamedThreadFactory("String_Node_Str"));
  boolean localStorage=Boolean.parseBoolean(configs.get(Config.UseLocalStorage.key()));
  if (localStorage) {
    _agentMgr.registerForHostEvents(ComponentLocator.inject(LocalStoragePoolListener.class),true,false,false);
  }
  String maxVolumeSizeInGbString=configDao.getValue("String_Node_Str");
  _maxVolumeSizeInGb=NumbersUtil.parseInt(maxVolumeSizeInGbString,2000);
  HostTemplateStatesSearch=_vmTemplateHostDao.createSearchBuilder();
  HostTemplateStatesSearch.and("String_Node_Str",HostTemplateStatesSearch.entity().getTemplateId(),SearchCriteria.Op.EQ);
  HostTemplateStatesSearch.and("String_Node_Str",HostTemplateStatesSearch.entity().getDownloadState(),SearchCriteria.Op.EQ);
  SearchBuilder<HostVO> HostSearch=_hostDao.createSearchBuilder();
  HostSearch.and("String_Node_Str",HostSearch.entity().getDataCenterId(),SearchCriteria.Op.EQ);
  HostTemplateStatesSearch.join("String_Node_Str",HostSearch,HostSearch.entity().getId(),HostTemplateStatesSearch.entity().getHostId(),JoinBuilder.JoinType.INNER);
  HostSearch.done();
  HostTemplateStatesSearch.done();
  _serverId=((ManagementServer)ComponentLocator.getComponent(ManagementServer.Name)).getId();
  UpHostsInPoolSearch=_storagePoolHostDao.createSearchBuilder(Long.class);
  UpHostsInPoolSearch.selectField(UpHostsInPoolSearch.entity().getHostId());
  SearchBuilder<HostVO> hostSearch=_hostDao.createSearchBuilder();
  hostSearch.and("String_Node_Str",hostSearch.entity().getStatus(),Op.EQ);
  UpHostsInPoolSearch.join("String_Node_Str",hostSearch,hostSearch.entity().getId(),UpHostsInPoolSearch.entity().getHostId(),JoinType.INNER);
  UpHostsInPoolSearch.and("String_Node_Str",UpHostsInPoolSearch.entity().getPoolId(),Op.EQ);
  UpHostsInPoolSearch.done();
  return true;
}

Fixed version (ground truth):
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  _name=name;
  ComponentLocator locator=ComponentLocator.getCurrentLocator();
  ConfigurationDao configDao=locator.getDao(ConfigurationDao.class);
  if (configDao == null) {
    s_logger.error("String_Node_Str");
    return false;
  }
  Map<String,String> configs=configDao.getConfiguration("String_Node_Str",params);
  String overProvisioningFactorStr=configs.get("String_Node_Str");
  if (overProvisioningFactorStr != null) {
    _overProvisioningFactor=Float.parseFloat(overProvisioningFactorStr);
  }
  _retry=NumbersUtil.parseInt(configs.get(Config.StartRetry.key()),10);
  _pingInterval=NumbersUtil.parseInt(configs.get("String_Node_Str"),60);
  _hostRetry=NumbersUtil.parseInt(configs.get("String_Node_Str"),2);
  _snapshotTimeout=NumbersUtil.parseInt(Config.CmdsWait.key(),2 * 60 * 60* 1000);
  _storagePoolAcquisitionWaitSeconds=NumbersUtil.parseInt(configs.get("String_Node_Str"),1800);
  s_logger.info("String_Node_Str" + _storagePoolAcquisitionWaitSeconds + "String_Node_Str");
  _agentMgr.registerForHostEvents(new StoragePoolMonitor(this,_storagePoolDao),true,false,true);
  String storageCleanupEnabled=configs.get("String_Node_Str");
  _storageCleanupEnabled=(storageCleanupEnabled == null) ? true : Boolean.parseBoolean(storageCleanupEnabled);
  String time=configs.get("String_Node_Str");
  _storageCleanupInterval=NumbersUtil.parseInt(time,86400);
  String workers=configs.get("String_Node_Str");
  int wrks=NumbersUtil.parseInt(workers,10);
  _executor=Executors.newScheduledThreadPool(wrks,new NamedThreadFactory("String_Node_Str"));
  boolean localStorage=Boolean.parseBoolean(configs.get(Config.UseLocalStorage.key()));
  if (localStorage) {
    _agentMgr.registerForHostEvents(ComponentLocator.inject(LocalStoragePoolListener.class),true,false,false);
  }
  String maxVolumeSizeInGbString=configDao.getValue("String_Node_Str");
  _maxVolumeSizeInGb=NumbersUtil.parseInt(maxVolumeSizeInGbString,2000);
  HostTemplateStatesSearch=_vmTemplateHostDao.createSearchBuilder();
  HostTemplateStatesSearch.and("String_Node_Str",HostTemplateStatesSearch.entity().getTemplateId(),SearchCriteria.Op.EQ);
  HostTemplateStatesSearch.and("String_Node_Str",HostTemplateStatesSearch.entity().getDownloadState(),SearchCriteria.Op.EQ);
  SearchBuilder<HostVO> HostSearch=_hostDao.createSearchBuilder();
  HostSearch.and("String_Node_Str",HostSearch.entity().getDataCenterId(),SearchCriteria.Op.EQ);
  HostTemplateStatesSearch.join("String_Node_Str",HostSearch,HostSearch.entity().getId(),HostTemplateStatesSearch.entity().getHostId(),JoinBuilder.JoinType.INNER);
  HostSearch.done();
  HostTemplateStatesSearch.done();
  _serverId=((ManagementServer)ComponentLocator.getComponent(ManagementServer.Name)).getId();
  UpHostsInPoolSearch=_storagePoolHostDao.createSearchBuilder(Long.class);
  UpHostsInPoolSearch.selectField(UpHostsInPoolSearch.entity().getHostId());
  SearchBuilder<HostVO> hostSearch=_hostDao.createSearchBuilder();
  hostSearch.and("String_Node_Str",hostSearch.entity().getStatus(),Op.EQ);
  UpHostsInPoolSearch.join("String_Node_Str",hostSearch,hostSearch.entity().getId(),UpHostsInPoolSearch.entity().getHostId(),JoinType.INNER);
  UpHostsInPoolSearch.and("String_Node_Str",UpHostsInPoolSearch.entity().getPoolId(),Op.EQ);
  UpHostsInPoolSearch.done();
  return true;
}