Program: 113821
Project: 113821
Buggy source:
public MRCRequestDispatcher(final MRCConfig config) throws IOException, JSONException, ClassNotFoundException, IllegalAccessException, InstantiationException, DatabaseException {
  this.config=config;
  authString=NullAuthProvider.createAuthString(config.getUUID().toString(),config.getUUID().toString());
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + config.isUsingSSL());
  SSLOptions sslOptions=new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false);
  speedyStage=config.isUsingSSL() ? new MultiSpeedy(sslOptions) : new MultiSpeedy();
  speedyStage.setLifeCycleListener(this);
  pinkyStage=config.isUsingSSL() ? new PipelinedPinky(config.getPort(),config.getAddress(),this,new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false)) : new PipelinedPinky(config.getPort(),config.getAddress(),this);
  pinkyStage.setLifeCycleListener(this);
  rpcClient=new RPCNIOSocketClient(sslOptions,RPC_TIMEOUT,CONNECTION_TIMEOUT);
  dirClient=new DIRClient(rpcClient,config.getDirectoryService());
  policyContainer=new PolicyContainer(config);
  authProvider=policyContainer.getAuthenticationProvider();
  authProvider.initialize(config.isUsingSSL());
  if (Logging.isInfo())   Logging.logMessage(Logging.LEVEL_INFO,this,"String_Node_Str" + authProvider.getClass().getName() + "String_Node_Str");
  osdMonitor=new OSDStatusManager(config,dirClient,policyContainer,authString);
  osdMonitor.setLifeCycleListener(this);
  procStage=new ProcessingStage(this);
  volumeManager=new BabuDBVolumeManager(this);
  fileAccessManager=new FileAccessManager(volumeManager,policyContainer);
  ServiceDataGenerator gen=new ServiceDataGenerator(){
    public ServiceRegistrySet getServiceData(){
      String uuid=config.getUUID().toString();
      OperatingSystemMXBean osb=ManagementFactory.getOperatingSystemMXBean();
      String load=String.valueOf((int)(osb.getSystemLoadAverage() * 100 / osb.getAvailableProcessors()));
      long totalRAM=Runtime.getRuntime().maxMemory();
      long usedRAM=Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
      ServiceRegistrySet sregs=new ServiceRegistrySet();
      KeyValuePairSet kvset=new KeyValuePairSet();
      kvset.add(new KeyValuePair("String_Node_Str",Integer.toString(MRCInterface.getVersion())));
      kvset.add(new KeyValuePair("String_Node_Str",Long.toString(totalRAM)));
      kvset.add(new KeyValuePair("String_Node_Str",Long.toString(usedRAM)));
      kvset.add(new KeyValuePair("String_Node_Str",config.getGeoCoordinates()));
      ServiceRegistry mrcReg=new ServiceRegistry(uuid,0,Constants.SERVICE_TYPE_MRC,"String_Node_Str" + uuid,kvset);
      sregs.add(mrcReg);
      try {
        for (        VolumeInfo vol : volumeManager.getVolumes()) {
          ServiceRegistry dsVolumeInfo=MRCHelper.createDSVolumeInfo(vol,osdMonitor,uuid);
          sregs.add(dsVolumeInfo);
        }
      }
 catch (      DatabaseException exc) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,exc);
      }
      return sregs;
    }
  }
;
  heartbeatThread=new HeartbeatThread("String_Node_Str",dirClient,config.getUUID(),gen,authString,config);
}

Fixed version (ground truth):
public MRCRequestDispatcher(final MRCConfig config) throws IOException, JSONException, ClassNotFoundException, IllegalAccessException, InstantiationException, DatabaseException {
  this.config=config;
  authString=NullAuthProvider.createAuthString(config.getUUID().toString(),config.getUUID().toString());
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + config.isUsingSSL());
  SSLOptions sslOptions=config.isUsingSSL() ? new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false) : null;
  speedyStage=config.isUsingSSL() ? new MultiSpeedy(sslOptions) : new MultiSpeedy();
  speedyStage.setLifeCycleListener(this);
  pinkyStage=config.isUsingSSL() ? new PipelinedPinky(config.getPort(),config.getAddress(),this,new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false)) : new PipelinedPinky(config.getPort(),config.getAddress(),this);
  pinkyStage.setLifeCycleListener(this);
  rpcClient=new RPCNIOSocketClient(sslOptions,RPC_TIMEOUT,CONNECTION_TIMEOUT);
  dirClient=new DIRClient(rpcClient,config.getDirectoryService());
  policyContainer=new PolicyContainer(config);
  authProvider=policyContainer.getAuthenticationProvider();
  authProvider.initialize(config.isUsingSSL());
  if (Logging.isInfo())   Logging.logMessage(Logging.LEVEL_INFO,this,"String_Node_Str" + authProvider.getClass().getName() + "String_Node_Str");
  osdMonitor=new OSDStatusManager(config,dirClient,policyContainer,authString);
  osdMonitor.setLifeCycleListener(this);
  procStage=new ProcessingStage(this);
  volumeManager=new BabuDBVolumeManager(this);
  fileAccessManager=new FileAccessManager(volumeManager,policyContainer);
  ServiceDataGenerator gen=new ServiceDataGenerator(){
    public ServiceRegistrySet getServiceData(){
      String uuid=config.getUUID().toString();
      OperatingSystemMXBean osb=ManagementFactory.getOperatingSystemMXBean();
      String load=String.valueOf((int)(osb.getSystemLoadAverage() * 100 / osb.getAvailableProcessors()));
      long totalRAM=Runtime.getRuntime().maxMemory();
      long usedRAM=Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
      ServiceRegistrySet sregs=new ServiceRegistrySet();
      KeyValuePairSet kvset=new KeyValuePairSet();
      kvset.add(new KeyValuePair("String_Node_Str",Integer.toString(MRCInterface.getVersion())));
      kvset.add(new KeyValuePair("String_Node_Str",Long.toString(totalRAM)));
      kvset.add(new KeyValuePair("String_Node_Str",Long.toString(usedRAM)));
      kvset.add(new KeyValuePair("String_Node_Str",config.getGeoCoordinates()));
      ServiceRegistry mrcReg=new ServiceRegistry(uuid,0,Constants.SERVICE_TYPE_MRC,"String_Node_Str" + uuid,kvset);
      sregs.add(mrcReg);
      try {
        for (        VolumeInfo vol : volumeManager.getVolumes()) {
          ServiceRegistry dsVolumeInfo=MRCHelper.createDSVolumeInfo(vol,osdMonitor,uuid);
          sregs.add(dsVolumeInfo);
        }
      }
 catch (      DatabaseException exc) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,exc);
      }
      return sregs;
    }
  }
;
  heartbeatThread=new HeartbeatThread("String_Node_Str",dirClient,config.getUUID(),gen,authString,config);
}