Program: 107478
Project: 107478
Buggy source:
protected ManagementServerImpl(){
  ComponentLocator locator=ComponentLocator.getLocator(Name);
  _lunDao=locator.getDao(PreallocatedLunDao.class);
  _configDao=locator.getDao(ConfigurationDao.class);
  _routerDao=locator.getDao(DomainRouterDao.class);
  _eventDao=locator.getDao(EventDao.class);
  _dcDao=locator.getDao(DataCenterDao.class);
  _vlanDao=locator.getDao(VlanDao.class);
  _accountVlanMapDao=locator.getDao(AccountVlanMapDao.class);
  _podVlanMapDao=locator.getDao(PodVlanMapDao.class);
  _hostDao=locator.getDao(HostDao.class);
  _hostPodDao=locator.getDao(HostPodDao.class);
  _jobDao=locator.getDao(AsyncJobDao.class);
  _clusterDao=locator.getDao(ClusterDao.class);
  _accountMgr=locator.getManager(AccountManager.class);
  _agentMgr=locator.getManager(AgentManager.class);
  _configMgr=locator.getManager(ConfigurationManager.class);
  _networkMgr=locator.getManager(NetworkManager.class);
  _vmMgr=locator.getManager(UserVmManager.class);
  _consoleProxyMgr=locator.getManager(ConsoleProxyManager.class);
  _secStorageVmMgr=locator.getManager(SecondaryStorageVmManager.class);
  _storageMgr=locator.getManager(StorageManager.class);
  _firewallRulesDao=locator.getDao(FirewallRulesDao.class);
  _securityGroupDao=locator.getDao(SecurityGroupDao.class);
  _networkSecurityGroupDao=locator.getDao(NetworkGroupDao.class);
  _loadBalancerDao=locator.getDao(LoadBalancerDao.class);
  _networkRuleConfigDao=locator.getDao(NetworkRuleConfigDao.class);
  _securityGroupVMMapDao=locator.getDao(SecurityGroupVMMapDao.class);
  _publicIpAddressDao=locator.getDao(IPAddressDao.class);
  _privateIpAddressDao=locator.getDao(DataCenterIpAddressDaoImpl.class);
  _loadBalancerVMMapDao=locator.getDao(LoadBalancerVMMapDao.class);
  _consoleProxyDao=locator.getDao(ConsoleProxyDao.class);
  _secStorageVmDao=locator.getDao(SecondaryStorageVmDao.class);
  _userDao=locator.getDao(UserDao.class);
  _userVmDao=locator.getDao(UserVmDao.class);
  _offeringsDao=locator.getDao(ServiceOfferingDao.class);
  _diskOfferingDao=locator.getDao(DiskOfferingDao.class);
  _templateDao=locator.getDao(VMTemplateDao.class);
  _templateHostDao=locator.getDao(VMTemplateHostDao.class);
  _launchPermissionDao=locator.getDao(LaunchPermissionDao.class);
  _domainDao=locator.getDao(DomainDao.class);
  _accountDao=locator.getDao(AccountDao.class);
  _resourceLimitDao=locator.getDao(ResourceLimitDao.class);
  _userAccountDao=locator.getDao(UserAccountDao.class);
  _alertDao=locator.getDao(AlertDao.class);
  _capacityDao=locator.getDao(CapacityDao.class);
  _snapshotDao=locator.getDao(SnapshotDao.class);
  _snapshotPolicyDao=locator.getDao(SnapshotPolicyDao.class);
  _guestOSDao=locator.getDao(GuestOSDao.class);
  _guestOSCategoryDao=locator.getDao(GuestOSCategoryDao.class);
  _poolDao=locator.getDao(StoragePoolDao.class);
  _poolHostDao=locator.getDao(StoragePoolHostDao.class);
  _vmDao=locator.getDao(UserVmDao.class);
  _vmGroupDao=locator.getDao(InstanceGroupDao.class);
  _groupVMMapDao=locator.getDao(InstanceGroupVMMapDao.class);
  _configs=_configDao.getConfiguration();
  _userStatsDao=locator.getDao(UserStatisticsDao.class);
  _vmInstanceDao=locator.getDao(VMInstanceDao.class);
  _volumeDao=locator.getDao(VolumeDao.class);
  _diskTemplateDao=locator.getDao(DiskTemplateDao.class);
  _alertMgr=locator.getManager(AlertManager.class);
  _asyncMgr=locator.getManager(AsyncJobManager.class);
  _tmpltMgr=locator.getManager(TemplateManager.class);
  _snapMgr=locator.getManager(SnapshotManager.class);
  _snapshotScheduler=locator.getManager(SnapshotScheduler.class);
  _networkGroupMgr=locator.getManager(NetworkGroupManager.class);
  _userAuthenticators=locator.getAdapters(UserAuthenticator.class);
  if (_userAuthenticators == null || !_userAuthenticators.isSet()) {
    s_logger.error("String_Node_Str");
  }
  _domain=_configs.get("String_Node_Str");
  if (_domain == null) {
    _domain="String_Node_Str";
  }
  if (!_domain.startsWith("String_Node_Str")) {
    _domain="String_Node_Str" + _domain;
  }
  String value=_configs.get("String_Node_Str");
  int cleanup=NumbersUtil.parseInt(value,60 * 60 * 24);
  String maxVolumeSizeInTbString=_configs.get("String_Node_Str");
  long maxVolumeSizeTb=NumbersUtil.parseLong(maxVolumeSizeInTbString,new Long("String_Node_Str"));
  _maxVolumeSizeInTb=maxVolumeSizeTb;
  _routerRamSize=NumbersUtil.parseInt(_configs.get("String_Node_Str"),NetworkManager.DEFAULT_ROUTER_VM_RAMSIZE);
  _proxyRamSize=NumbersUtil.parseInt(_configs.get("String_Node_Str"),ConsoleProxyManager.DEFAULT_PROXY_VM_RAMSIZE);
  _ssRamSize=NumbersUtil.parseInt(_configs.get("String_Node_Str"),SecondaryStorageVmManager.DEFAULT_SS_VM_RAMSIZE);
  _directAttachNetworkExternalIpAllocator=Boolean.parseBoolean(_configs.get("String_Node_Str"));
  _statsCollector=StatsCollector.getInstance(_configs);
  _executor.scheduleAtFixedRate(new AccountCleanupTask(),cleanup,cleanup,TimeUnit.SECONDS);
  _purgeDelay=NumbersUtil.parseInt(_configs.get("String_Node_Str"),0);
  if (_purgeDelay != 0) {
    _eventExecutor.scheduleAtFixedRate(new EventPurgeTask(),cleanup,cleanup,TimeUnit.SECONDS);
  }
  String[] availableIds=TimeZone.getAvailableIDs();
  _availableIdsMap=new HashMap<String,Boolean>(availableIds.length);
  for (  String id : availableIds) {
    _availableIdsMap.put(id,true);
  }
  String enabled=_configDao.getValue("String_Node_Str");
  if ("String_Node_Str".equalsIgnoreCase(enabled)) {
    _networkGroupsEnabled=true;
  }
  String hypervisorType=_configDao.getValue("String_Node_Str");
  _isHypervisorSnapshotCapable=hypervisorType.equals(Hypervisor.Type.XenServer.name());
}

Fixed version (ground truth):
protected ManagementServerImpl(){
  ComponentLocator locator=ComponentLocator.getLocator(Name);
  _lunDao=locator.getDao(PreallocatedLunDao.class);
  _configDao=locator.getDao(ConfigurationDao.class);
  _routerDao=locator.getDao(DomainRouterDao.class);
  _eventDao=locator.getDao(EventDao.class);
  _dcDao=locator.getDao(DataCenterDao.class);
  _vlanDao=locator.getDao(VlanDao.class);
  _accountVlanMapDao=locator.getDao(AccountVlanMapDao.class);
  _podVlanMapDao=locator.getDao(PodVlanMapDao.class);
  _hostDao=locator.getDao(HostDao.class);
  _hostPodDao=locator.getDao(HostPodDao.class);
  _jobDao=locator.getDao(AsyncJobDao.class);
  _clusterDao=locator.getDao(ClusterDao.class);
  _accountMgr=locator.getManager(AccountManager.class);
  _agentMgr=locator.getManager(AgentManager.class);
  _configMgr=locator.getManager(ConfigurationManager.class);
  _networkMgr=locator.getManager(NetworkManager.class);
  _vmMgr=locator.getManager(UserVmManager.class);
  _consoleProxyMgr=locator.getManager(ConsoleProxyManager.class);
  _secStorageVmMgr=locator.getManager(SecondaryStorageVmManager.class);
  _storageMgr=locator.getManager(StorageManager.class);
  _firewallRulesDao=locator.getDao(FirewallRulesDao.class);
  _securityGroupDao=locator.getDao(SecurityGroupDao.class);
  _networkSecurityGroupDao=locator.getDao(NetworkGroupDao.class);
  _loadBalancerDao=locator.getDao(LoadBalancerDao.class);
  _networkRuleConfigDao=locator.getDao(NetworkRuleConfigDao.class);
  _securityGroupVMMapDao=locator.getDao(SecurityGroupVMMapDao.class);
  _publicIpAddressDao=locator.getDao(IPAddressDao.class);
  _privateIpAddressDao=locator.getDao(DataCenterIpAddressDaoImpl.class);
  _loadBalancerVMMapDao=locator.getDao(LoadBalancerVMMapDao.class);
  _consoleProxyDao=locator.getDao(ConsoleProxyDao.class);
  _secStorageVmDao=locator.getDao(SecondaryStorageVmDao.class);
  _userDao=locator.getDao(UserDao.class);
  _userVmDao=locator.getDao(UserVmDao.class);
  _offeringsDao=locator.getDao(ServiceOfferingDao.class);
  _diskOfferingDao=locator.getDao(DiskOfferingDao.class);
  _templateDao=locator.getDao(VMTemplateDao.class);
  _templateHostDao=locator.getDao(VMTemplateHostDao.class);
  _launchPermissionDao=locator.getDao(LaunchPermissionDao.class);
  _domainDao=locator.getDao(DomainDao.class);
  _accountDao=locator.getDao(AccountDao.class);
  _resourceLimitDao=locator.getDao(ResourceLimitDao.class);
  _userAccountDao=locator.getDao(UserAccountDao.class);
  _alertDao=locator.getDao(AlertDao.class);
  _capacityDao=locator.getDao(CapacityDao.class);
  _snapshotDao=locator.getDao(SnapshotDao.class);
  _snapshotPolicyDao=locator.getDao(SnapshotPolicyDao.class);
  _guestOSDao=locator.getDao(GuestOSDao.class);
  _guestOSCategoryDao=locator.getDao(GuestOSCategoryDao.class);
  _poolDao=locator.getDao(StoragePoolDao.class);
  _poolHostDao=locator.getDao(StoragePoolHostDao.class);
  _vmDao=locator.getDao(UserVmDao.class);
  _vmGroupDao=locator.getDao(InstanceGroupDao.class);
  _groupVMMapDao=locator.getDao(InstanceGroupVMMapDao.class);
  _configs=_configDao.getConfiguration();
  _userStatsDao=locator.getDao(UserStatisticsDao.class);
  _vmInstanceDao=locator.getDao(VMInstanceDao.class);
  _volumeDao=locator.getDao(VolumeDao.class);
  _diskTemplateDao=locator.getDao(DiskTemplateDao.class);
  _alertMgr=locator.getManager(AlertManager.class);
  _asyncMgr=locator.getManager(AsyncJobManager.class);
  _tmpltMgr=locator.getManager(TemplateManager.class);
  _snapMgr=locator.getManager(SnapshotManager.class);
  _snapshotScheduler=locator.getManager(SnapshotScheduler.class);
  _networkGroupMgr=locator.getManager(NetworkGroupManager.class);
  _userAuthenticators=locator.getAdapters(UserAuthenticator.class);
  if (_userAuthenticators == null || !_userAuthenticators.isSet()) {
    s_logger.error("String_Node_Str");
  }
  _domain=_configs.get("String_Node_Str");
  if (_domain == null) {
    _domain="String_Node_Str";
  }
  if (!_domain.startsWith("String_Node_Str")) {
    _domain="String_Node_Str" + _domain;
  }
  String value=_configs.get("String_Node_Str");
  int cleanup=NumbersUtil.parseInt(value,60 * 60 * 24);
  String maxVolumeSizeInTbString=_configs.get("String_Node_Str");
  long maxVolumeSizeBytes=NumbersUtil.parseLong(maxVolumeSizeInTbString,new Long("String_Node_Str"));
  _maxVolumeSizeInGb=maxVolumeSizeBytes / 1000000000;
  _routerRamSize=NumbersUtil.parseInt(_configs.get("String_Node_Str"),NetworkManager.DEFAULT_ROUTER_VM_RAMSIZE);
  _proxyRamSize=NumbersUtil.parseInt(_configs.get("String_Node_Str"),ConsoleProxyManager.DEFAULT_PROXY_VM_RAMSIZE);
  _ssRamSize=NumbersUtil.parseInt(_configs.get("String_Node_Str"),SecondaryStorageVmManager.DEFAULT_SS_VM_RAMSIZE);
  _directAttachNetworkExternalIpAllocator=Boolean.parseBoolean(_configs.get("String_Node_Str"));
  _statsCollector=StatsCollector.getInstance(_configs);
  _executor.scheduleAtFixedRate(new AccountCleanupTask(),cleanup,cleanup,TimeUnit.SECONDS);
  _purgeDelay=NumbersUtil.parseInt(_configs.get("String_Node_Str"),0);
  if (_purgeDelay != 0) {
    _eventExecutor.scheduleAtFixedRate(new EventPurgeTask(),cleanup,cleanup,TimeUnit.SECONDS);
  }
  String[] availableIds=TimeZone.getAvailableIDs();
  _availableIdsMap=new HashMap<String,Boolean>(availableIds.length);
  for (  String id : availableIds) {
    _availableIdsMap.put(id,true);
  }
  String enabled=_configDao.getValue("String_Node_Str");
  if ("String_Node_Str".equalsIgnoreCase(enabled)) {
    _networkGroupsEnabled=true;
  }
  String hypervisorType=_configDao.getValue("String_Node_Str");
  _isHypervisorSnapshotCapable=hypervisorType.equals(Hypervisor.Type.XenServer.name());
}