Program: 113775
Project: 113775
Buggy source:
public OSDRequestDispatcher(OSDConfig config) throws IOException {
  this.config=config;
  assert(config.getUUID() != null);
  ChecksumFactory.getInstance().addProvider(new JavaChecksumProvider());
  operations=new HashMap();
  internalEvents=new HashMap<Class,OSDOperation>();
  initializeOperations();
  SSLOptions serverSSLopts=config.isUsingSSL() ? new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false) : null;
  rpcServer=new RPCNIOSocketServer(config.getPort(),config.getAddress(),this,serverSSLopts);
  rpcServer.setLifeCycleListener(this);
  final SSLOptions clientSSLopts=config.isUsingSSL() ? new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false) : null;
  rpcClient=new RPCNIOSocketClient(clientSSLopts,5000,5 * 60 * 1000);
  rpcClient.setLifeCycleListener(this);
  MetadataCache metadataCache=new MetadataCache();
  StorageLayout storageLayout=new HashStorageLayout(config,metadataCache);
  Striping striping=new Striping(config.getUUID(),metadataCache);
  preprocStage=new PreprocStage(this);
  preprocStage.setLifeCycleListener(this);
  stStage=new StorageStage(this,striping,metadataCache,storageLayout,1);
  stStage.setLifeCycleListener(this);
  delStage=new DeletionStage(this,metadataCache,storageLayout);
  delStage.setLifeCycleListener(this);
  dirClient=new DIRClient(rpcClient,config.getDirectoryService());
  osdClient=new OSDClient(rpcClient);
  TimeSync.initialize(dirClient,config.getRemoteTimeSync(),config.getLocalClockRenew());
  UUIDResolver.start(dirClient,10 * 1000,600 * 1000);
  UUIDResolver.addLocalMapping(config.getUUID(),config.getPort(),config.isUsingSSL());
  ServiceDataGenerator gen=new ServiceDataGenerator(){
    public ServiceRegistrySet getServiceData(){
      OSDConfig config=OSDRequestDispatcher.this.config;
      String freeSpace="String_Node_Str";
      if (config.isReportFreeSpace()) {
        freeSpace=String.valueOf(FSUtils.getFreeSpace(config.getObjDir()));
      }
      String totalSpace="String_Node_Str";
      try {
        File f=new File(config.getObjDir());
        totalSpace=String.valueOf(f.getTotalSpace());
      }
 catch (      Exception ex) {
      }
      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 data=new ServiceRegistrySet();
      KeyValuePairSet kvset=new KeyValuePairSet();
      kvset.add(new KeyValuePair("String_Node_Str",totalSpace));
      kvset.add(new KeyValuePair("String_Node_Str",freeSpace));
      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()));
      kvset.add(new KeyValuePair("String_Node_Str",Integer.toString(OSDInterface.getVersion())));
      ServiceRegistry me=new ServiceRegistry(config.getUUID().toString(),0,Constants.SERVICE_TYPE_OSD,"String_Node_Str" + config.getUUID(),kvset);
      data.add(me);
      return data;
    }
  }
;
  heartbeatThread=new HeartbeatThread("String_Node_Str",dirClient,config.getUUID(),gen,config);
  if (Logging.isDebug())   Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + this.config.getUUID() + "String_Node_Str");
}

Fixed version (ground truth):
public OSDRequestDispatcher(OSDConfig config) throws IOException {
  this.config=config;
  assert(config.getUUID() != null);
  ChecksumFactory.getInstance().addProvider(new JavaChecksumProvider());
  operations=new HashMap();
  internalEvents=new HashMap<Class,OSDOperation>();
  initializeOperations();
  SSLOptions serverSSLopts=config.isUsingSSL() ? new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false) : null;
  rpcServer=new RPCNIOSocketServer(config.getPort(),config.getAddress(),this,serverSSLopts);
  rpcServer.setLifeCycleListener(this);
  final SSLOptions clientSSLopts=config.isUsingSSL() ? new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false) : null;
  rpcClient=new RPCNIOSocketClient(clientSSLopts,5000,5 * 60 * 1000);
  rpcClient.setLifeCycleListener(this);
  MetadataCache metadataCache=new MetadataCache();
  StorageLayout storageLayout=new HashStorageLayout(config,metadataCache);
  udpCom=new UDPCommunicator(config.getPort(),this);
  udpCom.setLifeCycleListener(this);
  preprocStage=new PreprocStage(this);
  preprocStage.setLifeCycleListener(this);
  stStage=new StorageStage(this,metadataCache,storageLayout,1);
  stStage.setLifeCycleListener(this);
  delStage=new DeletionStage(this,metadataCache,storageLayout);
  delStage.setLifeCycleListener(this);
  dirClient=new DIRClient(rpcClient,config.getDirectoryService());
  osdClient=new OSDClient(rpcClient);
  TimeSync.initialize(dirClient,config.getRemoteTimeSync(),config.getLocalClockRenew());
  UUIDResolver.start(dirClient,10 * 1000,600 * 1000);
  UUIDResolver.addLocalMapping(config.getUUID(),config.getPort(),config.isUsingSSL());
  ServiceDataGenerator gen=new ServiceDataGenerator(){
    public ServiceRegistrySet getServiceData(){
      OSDConfig config=OSDRequestDispatcher.this.config;
      String freeSpace="String_Node_Str";
      if (config.isReportFreeSpace()) {
        freeSpace=String.valueOf(FSUtils.getFreeSpace(config.getObjDir()));
      }
      String totalSpace="String_Node_Str";
      try {
        File f=new File(config.getObjDir());
        totalSpace=String.valueOf(f.getTotalSpace());
      }
 catch (      Exception ex) {
      }
      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 data=new ServiceRegistrySet();
      KeyValuePairSet kvset=new KeyValuePairSet();
      kvset.add(new KeyValuePair("String_Node_Str",totalSpace));
      kvset.add(new KeyValuePair("String_Node_Str",freeSpace));
      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()));
      kvset.add(new KeyValuePair("String_Node_Str",Integer.toString(OSDInterface.getVersion())));
      ServiceRegistry me=new ServiceRegistry(config.getUUID().toString(),0,Constants.SERVICE_TYPE_OSD,"String_Node_Str" + config.getUUID(),kvset);
      data.add(me);
      return data;
    }
  }
;
  heartbeatThread=new HeartbeatThread("String_Node_Str",dirClient,config.getUUID(),gen,config);
  if (Logging.isDebug())   Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + this.config.getUUID() + "String_Node_Str");
}