Program: 70468
Project: 70468
Buggy source:
public void run(){
  boolean check=operations.getCheck();
  runtimeLogger.debug("String_Node_Str" + check);
  CloudMethodResourceDescription requested=rcr.getRequested();
  VM granted;
  if (reused == null) {
    this.setName("String_Node_Str" + name);
    try {
      granted=createResourceOnProvider(requested);
    }
 catch (    Exception e) {
      notifyFailure();
      return;
    }
    if (debug) {
      runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
    }
    resourceLogger.info("String_Node_Str" + granted.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
  }
 else {
    granted=reused;
    if (debug) {
      runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
    }
    resourceLogger.info("String_Node_Str" + reused.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
  }
  this.setName("String_Node_Str" + granted.getName());
  CloudMethodWorker r=ResourceManager.getDynamicResource(granted.getName());
  if (r == null) {
    if (reused == null) {
      try {
        if (debug) {
          runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str");
        }
        r=prepareNewResource(granted);
        operations.vmReady(granted);
      }
 catch (      Exception e) {
        runtimeLogger.error("String_Node_Str",e);
        powerOff(granted);
        notifyFailure();
        return;
      }
    }
 else {
      int limitOfTasks=granted.getDescription().getTotalComputingUnits();
      r=new CloudMethodWorker(granted.getDescription(),granted.getNode(),limitOfTasks);
      if (debug) {
        runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str");
      }
    }
    granted.setWorker(r);
    ResourceManager.addCloudWorker(rcr,r);
  }
 else {
    ResourceManager.increasedCloudWorker(rcr,r,granted.getDescription());
  }
synchronized (count) {
    count--;
  }
}

Fixed version (ground truth):
public void run(){
  boolean check=operations.getCheck();
  runtimeLogger.debug("String_Node_Str" + check);
  CloudMethodResourceDescription requested=rcr.getRequested();
  VM granted;
  if (reused == null) {
    this.setName("String_Node_Str" + name);
    try {
      granted=createResourceOnProvider(requested);
    }
 catch (    Exception e) {
      runtimeLogger.error("String_Node_Str",e);
      notifyFailure();
      return;
    }
    if (debug) {
      runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
    }
    resourceLogger.info("String_Node_Str" + granted.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
  }
 else {
    granted=reused;
    if (debug) {
      runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
    }
    resourceLogger.info("String_Node_Str" + reused.getName() + "String_Node_Str"+ granted.getEnvId()+ "String_Node_Str");
  }
  this.setName("String_Node_Str" + granted.getName());
  CloudMethodWorker r=ResourceManager.getDynamicResource(granted.getName());
  if (r == null) {
    if (reused == null) {
      try {
        if (debug) {
          runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str");
        }
        r=prepareNewResource(granted);
        operations.vmReady(granted);
      }
 catch (      Exception e) {
        runtimeLogger.error("String_Node_Str",e);
        powerOff(granted);
        notifyFailure();
        return;
      }
    }
 else {
      int limitOfTasks=granted.getDescription().getTotalComputingUnits();
      r=new CloudMethodWorker(granted.getDescription(),granted.getNode(),limitOfTasks,rcr.getRequested().getImage().getSharedDisks());
      try {
        r.start();
      }
 catch (      Exception e) {
        runtimeLogger.error("String_Node_Str",e);
        powerOff(granted);
        notifyFailure();
        return;
      }
      if (debug) {
        runtimeLogger.debug("String_Node_Str" + granted.getName() + "String_Node_Str");
      }
    }
    granted.setWorker(r);
    ResourceManager.addCloudWorker(rcr,r);
  }
 else {
    ResourceManager.increasedCloudWorker(rcr,r,granted.getDescription());
  }
synchronized (count) {
    count--;
  }
}