Program: 106508
Project: 106508
Buggy source:
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str" + name);
  }
  _name=name;
  ComponentLocator locator=ComponentLocator.getCurrentLocator();
  _agentMgr=locator.getManager(AgentManager.class);
  if (_agentMgr == null) {
    throw new ConfigurationException("String_Node_Str" + AgentManager.class.getName());
  }
  _mshostDao=locator.getDao(ManagementServerHostDao.class);
  if (_mshostDao == null) {
    throw new ConfigurationException("String_Node_Str" + ManagementServerHostDao.class.getName());
  }
  _mshostPeerDao=locator.getDao(ManagementServerHostPeerDao.class);
  if (_mshostPeerDao == null) {
    throw new ConfigurationException("String_Node_Str" + ManagementServerHostPeerDao.class.getName());
  }
  _hostDao=locator.getDao(HostDao.class);
  if (_hostDao == null) {
    throw new ConfigurationException("String_Node_Str" + HostDao.class.getName());
  }
  _hostTransferDao=locator.getDao(HostTransferMapDao.class);
  if (_hostTransferDao == null) {
    throw new ConfigurationException("String_Node_Str");
  }
  ConfigurationDao configDao=locator.getDao(ConfigurationDao.class);
  if (configDao == null) {
    throw new ConfigurationException("String_Node_Str");
  }
  Map<String,String> configs=configDao.getConfiguration("String_Node_Str",params);
  String value=configs.get("String_Node_Str");
  if (value != null) {
    _heartbeatInterval=NumbersUtil.parseInt(value,ClusterManager.DEFAULT_HEARTBEAT_INTERVAL);
  }
  value=configs.get("String_Node_Str");
  if (value != null) {
    _heartbeatThreshold=NumbersUtil.parseInt(value,ClusterManager.DEFAULT_HEARTBEAT_THRESHOLD);
  }
  File dbPropsFile=PropertiesUtil.findConfigFile("String_Node_Str");
  Properties dbProps=new Properties();
  try {
    dbProps.load(new FileInputStream(dbPropsFile));
  }
 catch (  FileNotFoundException e) {
    throw new ConfigurationException("String_Node_Str");
  }
catch (  IOException e) {
    throw new ConfigurationException("String_Node_Str");
  }
  _clusterNodeIP=dbProps.getProperty("String_Node_Str");
  if (_clusterNodeIP == null) {
    _clusterNodeIP="String_Node_Str";
  }
  _clusterNodeIP=_clusterNodeIP.trim();
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str" + _clusterNodeIP);
  }
  if (!NetUtils.isLocalAddress(_clusterNodeIP)) {
    throw new ConfigurationException("String_Node_Str");
  }
  Adapters<ClusterServiceAdapter> adapters=locator.getAdapters(ClusterServiceAdapter.class);
  if (adapters == null || !adapters.isSet()) {
    throw new ConfigurationException("String_Node_Str");
  }
  Enumeration<ClusterServiceAdapter> it=adapters.enumeration();
  if (it.hasMoreElements()) {
    _currentServiceAdapter=it.nextElement();
  }
  if (_currentServiceAdapter == null) {
    throw new ConfigurationException("String_Node_Str");
  }
  _agentLBEnabled=Boolean.valueOf(configDao.getValue(Config.AgentLbEnable.key()));
  String connectedAgentsThreshold=configs.get("String_Node_Str");
  if (connectedAgentsThreshold != null) {
    _connectedAgentsThreshold=Double.parseDouble(connectedAgentsThreshold);
  }
  this.registerListener(new LockMasterListener(_msId));
  checkConflicts();
  _executor.execute(getClusterPduSendingTask());
  for (int i=0; i < 5; i++)   _executor.execute(getClusterPduNotificationTask());
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str" + name);
  }
  _name=name;
  ComponentLocator locator=ComponentLocator.getCurrentLocator();
  _agentMgr=locator.getManager(AgentManager.class);
  if (_agentMgr == null) {
    throw new ConfigurationException("String_Node_Str" + AgentManager.class.getName());
  }
  _mshostDao=locator.getDao(ManagementServerHostDao.class);
  if (_mshostDao == null) {
    throw new ConfigurationException("String_Node_Str" + ManagementServerHostDao.class.getName());
  }
  _mshostPeerDao=locator.getDao(ManagementServerHostPeerDao.class);
  if (_mshostPeerDao == null) {
    throw new ConfigurationException("String_Node_Str" + ManagementServerHostPeerDao.class.getName());
  }
  _hostDao=locator.getDao(HostDao.class);
  if (_hostDao == null) {
    throw new ConfigurationException("String_Node_Str" + HostDao.class.getName());
  }
  _hostTransferDao=locator.getDao(HostTransferMapDao.class);
  if (_hostTransferDao == null) {
    throw new ConfigurationException("String_Node_Str");
  }
  ConfigurationDao configDao=locator.getDao(ConfigurationDao.class);
  if (configDao == null) {
    throw new ConfigurationException("String_Node_Str");
  }
  Map<String,String> configs=configDao.getConfiguration("String_Node_Str",params);
  String value=configs.get("String_Node_Str");
  if (value != null) {
    _heartbeatInterval=NumbersUtil.parseInt(value,ClusterManager.DEFAULT_HEARTBEAT_INTERVAL);
  }
  value=configs.get("String_Node_Str");
  if (value != null) {
    _heartbeatThreshold=NumbersUtil.parseInt(value,ClusterManager.DEFAULT_HEARTBEAT_THRESHOLD);
  }
  File dbPropsFile=PropertiesUtil.findConfigFile("String_Node_Str");
  Properties dbProps=new Properties();
  try {
    dbProps.load(new FileInputStream(dbPropsFile));
  }
 catch (  FileNotFoundException e) {
    throw new ConfigurationException("String_Node_Str");
  }
catch (  IOException e) {
    throw new ConfigurationException("String_Node_Str");
  }
  _clusterNodeIP=dbProps.getProperty("String_Node_Str");
  if (_clusterNodeIP == null) {
    _clusterNodeIP="String_Node_Str";
  }
  _clusterNodeIP=_clusterNodeIP.trim();
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str" + _clusterNodeIP);
  }
  if (!NetUtils.isLocalAddress(_clusterNodeIP)) {
    throw new ConfigurationException("String_Node_Str");
  }
  _executor.execute(getClusterPduSendingTask());
  for (int i=0; i < 5; i++)   _executor.execute(getClusterPduNotificationTask());
  Adapters<ClusterServiceAdapter> adapters=locator.getAdapters(ClusterServiceAdapter.class);
  if (adapters == null || !adapters.isSet()) {
    throw new ConfigurationException("String_Node_Str");
  }
  Enumeration<ClusterServiceAdapter> it=adapters.enumeration();
  if (it.hasMoreElements()) {
    _currentServiceAdapter=it.nextElement();
  }
  if (_currentServiceAdapter == null) {
    throw new ConfigurationException("String_Node_Str");
  }
  _agentLBEnabled=Boolean.valueOf(configDao.getValue(Config.AgentLbEnable.key()));
  String connectedAgentsThreshold=configs.get("String_Node_Str");
  if (connectedAgentsThreshold != null) {
    _connectedAgentsThreshold=Double.parseDouble(connectedAgentsThreshold);
  }
  this.registerListener(new LockMasterListener(_msId));
  checkConflicts();
  if (s_logger.isInfoEnabled()) {
    s_logger.info("String_Node_Str");
  }
  return true;
}