Program: 55302
Project: 55302
Buggy source:
/** 
 * Constructs a new job manager, starts its discovery service and its IPC service.
 */
public JobManager(final String configDir,final String executionMode){
  GlobalConfiguration.loadConfiguration(configDir);
  final String ipcAddressString=GlobalConfiguration.getString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY,null);
  InetAddress ipcAddress=null;
  if (ipcAddressString != null) {
    try {
      ipcAddress=InetAddress.getByName(ipcAddressString);
    }
 catch (    UnknownHostException e) {
      LOG.fatal("String_Node_Str" + ipcAddressString + "String_Node_Str"+ StringUtils.stringifyException(e));
      System.exit(FAILURERETURNCODE);
    }
  }
  final int ipcPort=GlobalConfiguration.getInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY,ConfigConstants.DEFAULT_JOB_MANAGER_IPC_PORT);
  try {
    DiscoveryService.startDiscoveryService(ipcAddress,ipcPort);
  }
 catch (  DiscoveryException e) {
    LOG.fatal("String_Node_Str" + StringUtils.stringifyException(e));
    System.exit(FAILURERETURNCODE);
  }
  this.recommendedClientPollingInterval=GlobalConfiguration.getInteger("String_Node_Str",5);
  this.eventCollector=new EventCollector(this.recommendedClientPollingInterval);
  this.inputSplitManager=new InputSplitManager();
  final InetSocketAddress rpcServerAddress=new InetSocketAddress(ipcAddress,ipcPort);
  RPCService rpcService=null;
  try {
    final int handlerCount=GlobalConfiguration.getInteger("String_Node_Str",3);
    rpcService=new RPCService(rpcServerAddress.getPort(),handlerCount,ServerTypeUtils.getRPCTypesToRegister());
  }
 catch (  IOException ioe) {
    LOG.fatal("String_Node_Str" + StringUtils.stringifyException(ioe));
    System.exit(FAILURERETURNCODE);
  }
  this.rpcService=rpcService;
  this.rpcService.setProtocolCallbackHandler(ChannelLookupProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(ExtendedManagementProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(InputSplitProviderProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(JobManagementProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(JobManagerProtocol.class,this);
  LOG.info("String_Node_Str" + executionMode + "String_Node_Str");
  this.jobManagerPlugins=PluginManager.getJobManagerPlugins(this,configDir);
  if ("String_Node_Str".equals(executionMode)) {
    try {
      this.instanceManager=new LocalInstanceManager(configDir,this.rpcService);
    }
 catch (    RuntimeException rte) {
      LOG.fatal("String_Node_Str" + StringUtils.stringifyException(rte));
      System.exit(FAILURERETURNCODE);
    }
  }
 else {
    final String instanceManagerClassName=JobManagerUtils.getInstanceManagerClassName(executionMode);
    LOG.info("String_Node_Str" + instanceManagerClassName + "String_Node_Str");
    this.instanceManager=JobManagerUtils.loadInstanceManager(instanceManagerClassName);
    if (this.instanceManager == null) {
      LOG.fatal("String_Node_Str" + instanceManagerClassName);
      System.exit(FAILURERETURNCODE);
    }
  }
  final String schedulerClassName=JobManagerUtils.getSchedulerClassName(executionMode);
  LOG.info("String_Node_Str" + schedulerClassName + "String_Node_Str");
  this.scheduler=JobManagerUtils.loadScheduler(schedulerClassName,this,this.instanceManager);
  if (this.scheduler == null) {
    LOG.fatal("String_Node_Str" + schedulerClassName);
    System.exit(FAILURERETURNCODE);
  }
  this.multicastManager=new MulticastManager(this.scheduler);
  if (GlobalConfiguration.getBoolean(ProfilingUtils.ENABLE_PROFILING_KEY,false)) {
    final String profilerClassName=GlobalConfiguration.getString(ProfilingUtils.JOBMANAGER_CLASSNAME_KEY,null);
    if (profilerClassName == null) {
      LOG.fatal("String_Node_Str");
      System.exit(FAILURERETURNCODE);
    }
    this.profiler=ProfilingUtils.loadJobManagerProfiler(profilerClassName,ipcAddress);
    if (this.profiler == null) {
      LOG.fatal("String_Node_Str");
      System.exit(FAILURERETURNCODE);
    }
  }
 else {
    this.profiler=null;
    LOG.debug("String_Node_Str");
  }
  Runtime.getRuntime().addShutdownHook(new JobManagerCleanUp(this));
}

Fixed version (ground truth):
/** 
 * Constructs a new job manager, starts its discovery service and its IPC service.
 */
public JobManager(final String configDir,final String executionMode){
  GlobalConfiguration.loadConfiguration(configDir);
  final String ipcAddressString=GlobalConfiguration.getString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY,null);
  InetAddress ipcAddress=null;
  if (ipcAddressString != null) {
    try {
      ipcAddress=InetAddress.getByName(ipcAddressString);
    }
 catch (    UnknownHostException e) {
      LOG.fatal("String_Node_Str" + ipcAddressString + "String_Node_Str"+ StringUtils.stringifyException(e));
      System.exit(FAILURERETURNCODE);
    }
  }
  final int ipcPort=GlobalConfiguration.getInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY,ConfigConstants.DEFAULT_JOB_MANAGER_IPC_PORT);
  try {
    DiscoveryService.startDiscoveryService(ipcAddress,ipcPort);
  }
 catch (  DiscoveryException e) {
    LOG.fatal("String_Node_Str" + StringUtils.stringifyException(e));
    System.exit(FAILURERETURNCODE);
  }
  this.recommendedClientPollingInterval=GlobalConfiguration.getInteger("String_Node_Str",5);
  this.eventCollector=new EventCollector(this.recommendedClientPollingInterval);
  this.inputSplitManager=new InputSplitManager();
  final InetSocketAddress rpcServerAddress=new InetSocketAddress(ipcAddress,ipcPort);
  RPCService rpcService=null;
  try {
    final int handlerCount=GlobalConfiguration.getInteger("String_Node_Str",3);
    rpcService=new RPCService(rpcServerAddress.getPort(),handlerCount,ServerTypeUtils.getRPCTypesToRegister());
  }
 catch (  IOException ioe) {
    LOG.fatal("String_Node_Str" + StringUtils.stringifyException(ioe));
    System.exit(FAILURERETURNCODE);
  }
  this.rpcService=rpcService;
  this.rpcService.setProtocolCallbackHandler(ChannelLookupProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(ExtendedManagementProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(InputSplitProviderProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(JobManagementProtocol.class,this);
  this.rpcService.setProtocolCallbackHandler(JobManagerProtocol.class,this);
  LOG.info("String_Node_Str" + executionMode + "String_Node_Str");
  this.jobManagerPlugins=PluginManager.getJobManagerPlugins(this,configDir);
  if ("String_Node_Str".equals(executionMode)) {
    try {
      this.instanceManager=new LocalInstanceManager(configDir,this.rpcService);
    }
 catch (    RuntimeException rte) {
      LOG.fatal("String_Node_Str" + StringUtils.stringifyException(rte));
      System.exit(FAILURERETURNCODE);
    }
  }
 else {
    final String instanceManagerClassName=JobManagerUtils.getInstanceManagerClassName(executionMode);
    LOG.info("String_Node_Str" + instanceManagerClassName + "String_Node_Str");
    this.instanceManager=JobManagerUtils.loadInstanceManager(instanceManagerClassName,this.rpcService);
    if (this.instanceManager == null) {
      LOG.fatal("String_Node_Str" + instanceManagerClassName);
      System.exit(FAILURERETURNCODE);
    }
  }
  final String schedulerClassName=JobManagerUtils.getSchedulerClassName(executionMode);
  LOG.info("String_Node_Str" + schedulerClassName + "String_Node_Str");
  this.scheduler=JobManagerUtils.loadScheduler(schedulerClassName,this,this.instanceManager);
  if (this.scheduler == null) {
    LOG.fatal("String_Node_Str" + schedulerClassName);
    System.exit(FAILURERETURNCODE);
  }
  this.multicastManager=new MulticastManager(this.scheduler);
  if (GlobalConfiguration.getBoolean(ProfilingUtils.ENABLE_PROFILING_KEY,false)) {
    final String profilerClassName=GlobalConfiguration.getString(ProfilingUtils.JOBMANAGER_CLASSNAME_KEY,null);
    if (profilerClassName == null) {
      LOG.fatal("String_Node_Str");
      System.exit(FAILURERETURNCODE);
    }
    this.profiler=ProfilingUtils.loadJobManagerProfiler(profilerClassName,ipcAddress);
    if (this.profiler == null) {
      LOG.fatal("String_Node_Str");
      System.exit(FAILURERETURNCODE);
    }
  }
 else {
    this.profiler=null;
    LOG.debug("String_Node_Str");
  }
  Runtime.getRuntime().addShutdownHook(new JobManagerCleanUp(this));
}