Program: 113825
Project: 113825
Buggy source:
public OSDRequestDispatcher(OSDConfig config) throws IOException, JSONException {
  this.config=config;
  assert(config.getUUID() != null);
  if (Tracer.COLLECT_TRACES) {
    Tracer.initialize("String_Node_Str" + config.getUUID() + "String_Node_Str");
  }
  authString=NullAuthProvider.createAuthString(config.getUUID().toString(),config.getUUID().toString());
  ChecksumFactory.getInstance().addProvider(new JavaChecksumProvider());
  operations=new Operation[]{new ReadOperation(this),new WriteOperation(this),new StatusPageOperation(this),new FetchGmaxRPC(this),new TruncateRPC(this),new TruncateLocalRPC(this),new DeleteOperation(this),new DeleteOFTRPC(this),new DeleteLocalRPC(this),new GetProtocolVersionOperation(this),new ShutdownOperation(this),new CheckObjectRPC(this),new GmaxEvent(this),new CloseFileEvent(this),new GetStatistics(this),new StatisticsConfig(this),new AcquireLease(this),new ReturnLease(this),new CleanUpOperation(this),new FetchAndWriteReplica(this),new ReadLocalRPC(this)};
  pinky=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);
  pinky.setLifeCycleListener(this);
  final SSLOptions clientSSLopts=new SSLOptions(new FileInputStream(config.getServiceCredsFile()),config.getServiceCredsPassphrase(),config.getServiceCredsContainer(),new FileInputStream(config.getTrustedCertsFile()),config.getTrustedCertsPassphrase(),config.getTrustedCertsContainer(),false);
  speedy=config.isUsingSSL() ? new MultiSpeedy(clientSSLopts) : new MultiSpeedy();
  speedy.setLifeCycleListener(this);
  rpcClient=new RPCNIOSocketClient(clientSSLopts,5000,5 * 60 * 1000);
  rpcClient.setLifeCycleListener(this);
  udpCom=new UDPCommunicator(config.getPort(),this);
  udpCom.setLifeCycleListener(this);
  MetadataCache metadataCache=new MetadataCache();
  StorageLayout storageLayout=new HashStorageLayout(config,metadataCache);
  Striping striping=new Striping(config.getUUID(),metadataCache);
  statistics=new StageStatistics();
  stages=new Stage[]{new ParserStage(this),new AuthenticationStage(this),new StorageStage(this,striping,metadataCache,storageLayout,1),new DeletionStage(this,striping,metadataCache,storageLayout),new StatisticsStage(this,statistics,60 * 10),new ReplicationStage(this)};
  for (  Stage stage : stages)   stage.setLifeCycleListener(this);
  dirClient=new DIRClient(rpcClient,config.getDirectoryService());
  osdClient=new OSDClient(speedy);
  TimeSync.initialize(dirClient,config.getRemoteTimeSync(),config.getLocalClockRenew(),authString);
  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,authString,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, JSONException {
  this.config=config;
  assert(config.getUUID() != null);
  if (Tracer.COLLECT_TRACES) {
    Tracer.initialize("String_Node_Str" + config.getUUID() + "String_Node_Str");
  }
  authString=NullAuthProvider.createAuthString(config.getUUID().toString(),config.getUUID().toString());
  ChecksumFactory.getInstance().addProvider(new JavaChecksumProvider());
  operations=new Operation[]{new ReadOperation(this),new WriteOperation(this),new StatusPageOperation(this),new FetchGmaxRPC(this),new TruncateRPC(this),new TruncateLocalRPC(this),new DeleteOperation(this),new DeleteOFTRPC(this),new DeleteLocalRPC(this),new GetProtocolVersionOperation(this),new ShutdownOperation(this),new CheckObjectRPC(this),new GmaxEvent(this),new CloseFileEvent(this),new GetStatistics(this),new StatisticsConfig(this),new AcquireLease(this),new ReturnLease(this),new CleanUpOperation(this),new FetchAndWriteReplica(this),new ReadLocalRPC(this)};
  pinky=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);
  pinky.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;
  speedy=config.isUsingSSL() ? new MultiSpeedy(clientSSLopts) : new MultiSpeedy();
  speedy.setLifeCycleListener(this);
  rpcClient=new RPCNIOSocketClient(clientSSLopts,5000,5 * 60 * 1000);
  rpcClient.setLifeCycleListener(this);
  udpCom=new UDPCommunicator(config.getPort(),this);
  udpCom.setLifeCycleListener(this);
  MetadataCache metadataCache=new MetadataCache();
  StorageLayout storageLayout=new HashStorageLayout(config,metadataCache);
  Striping striping=new Striping(config.getUUID(),metadataCache);
  statistics=new StageStatistics();
  stages=new Stage[]{new ParserStage(this),new AuthenticationStage(this),new StorageStage(this,striping,metadataCache,storageLayout,1),new DeletionStage(this,striping,metadataCache,storageLayout),new StatisticsStage(this,statistics,60 * 10),new ReplicationStage(this)};
  for (  Stage stage : stages)   stage.setLifeCycleListener(this);
  dirClient=new DIRClient(rpcClient,config.getDirectoryService());
  osdClient=new OSDClient(speedy);
  TimeSync.initialize(dirClient,config.getRemoteTimeSync(),config.getLocalClockRenew(),authString);
  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,authString,config);
  if (Logging.isDebug())   Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + this.config.getUUID() + "String_Node_Str");
}