nus-yam/ex-repair huggingface dataset:
Program: 63928
Project: 63928
Buggy source:
private void scaleDown(int scalingAdjustment,int totalNodes){
  String hostGroup=policy.getHostGroup();
  String ambari=cluster.getHost();
  AmbariAddressJson ambariAddressJson=new AmbariAddressJson();
  ambariAddressJson.setAmbariAddress(ambari);
  try {
    LOGGER.info("String_Node_Str",scalingAdjustment,hostGroup);
    Long stackId=cloudbreakService.stackEndpoint().getStackForAmbari(ambariAddressJson).getId();
    UpdateClusterJson updateClusterJson=new UpdateClusterJson();
    HostGroupAdjustmentJson hostGroupAdjustmentJson=new HostGroupAdjustmentJson();
    hostGroupAdjustmentJson.setScalingAdjustment(scalingAdjustment);
    hostGroupAdjustmentJson.setWithStackUpdate(true);
    hostGroupAdjustmentJson.setHostGroup(hostGroup);
    updateClusterJson.setHostGroupAdjustment(hostGroupAdjustmentJson);
    cloudbreakService.clusterEndpoint().put(stackId,updateClusterJson);
    historyService.createEntry(ScalingStatus.SUCCESS,"String_Node_Str",totalNodes,policy);
  }
 catch (  Exception e) {
    historyService.createEntry(ScalingStatus.FAILED,"String_Node_Str" + e.getMessage(),totalNodes,policy);
    LOGGER.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void scaleDown(int scalingAdjustment,int totalNodes){
  String hostGroup=policy.getHostGroup();
  String ambari=cluster.getHost();
  AmbariAddressJson ambariAddressJson=new AmbariAddressJson();
  ambariAddressJson.setAmbariAddress(ambari);
  try {
    LOGGER.info("String_Node_Str",scalingAdjustment,hostGroup);
    Long stackId=cloudbreakClient.stackEndpoint().getStackForAmbari(ambariAddressJson).getId();
    UpdateClusterJson updateClusterJson=new UpdateClusterJson();
    HostGroupAdjustmentJson hostGroupAdjustmentJson=new HostGroupAdjustmentJson();
    hostGroupAdjustmentJson.setScalingAdjustment(scalingAdjustment);
    hostGroupAdjustmentJson.setWithStackUpdate(true);
    hostGroupAdjustmentJson.setHostGroup(hostGroup);
    updateClusterJson.setHostGroupAdjustment(hostGroupAdjustmentJson);
    cloudbreakClient.clusterEndpoint().put(stackId,updateClusterJson);
    historyService.createEntry(ScalingStatus.SUCCESS,"String_Node_Str",totalNodes,policy);
  }
 catch (  Exception e) {
    historyService.createEntry(ScalingStatus.FAILED,"String_Node_Str" + e.getMessage(),totalNodes,policy);
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 63929
Project: 63929
Buggy source:
private Boolean hasAccess(String userId,String account,String ambariAddress) throws Exception {
  AmbariAddressJson ambariAddressJson=new AmbariAddressJson();
  ambariAddressJson.setAmbariAddress(ambariAddress);
  StackResponse stack=cloudbreakService.stackEndpoint().getStackForAmbari(ambariAddressJson);
  if (stack.getOwner().equals(userId)) {
    return true;
  }
 else   if (stack.isPublicInAccount() && stack.getAccount() == account) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private Boolean hasAccess(String userId,String account,String ambariAddress) throws Exception {
  AmbariAddressJson ambariAddressJson=new AmbariAddressJson();
  ambariAddressJson.setAmbariAddress(ambariAddress);
  StackResponse stack=cloudbreakClient.stackEndpoint().getStackForAmbari(ambariAddressJson);
  if (stack.getOwner().equals(userId)) {
    return true;
  }
 else   if (stack.isPublicInAccount() && stack.getAccount() == account) {
    return true;
  }
  return false;
}
Program: 63930
Project: 63930
Buggy source:
public AmbariStack tryResolve(Ambari ambari){
  try {
    String host=ambari.getHost();
    String user=ambari.getUser();
    String pass=ambari.getPass();
    AmbariAddressJson ambariAddressJson=new AmbariAddressJson();
    ambariAddressJson.setAmbariAddress(host);
    StackResponse stack=cloudbreakService.stackEndpoint().getStackForAmbari(ambariAddressJson);
    long id=stack.getId();
    SecurityConfig securityConfig=tlsSecurityService.prepareSecurityConfig(id);
    if (user == null && pass == null) {
      ClusterResponse clusterResponse=cloudbreakService.clusterEndpoint().get(id);
      return new AmbariStack(new Ambari(host,ambari.getPort(),clusterResponse.getUserName(),clusterResponse.getPassword()),id,securityConfig);
    }
 else {
      return new AmbariStack(ambari,id,securityConfig);
    }
  }
 catch (  Exception e) {
    return new AmbariStack(ambari);
  }
}

Fixed version (ground truth):
public AmbariStack tryResolve(Ambari ambari){
  try {
    String host=ambari.getHost();
    String user=ambari.getUser();
    String pass=ambari.getPass();
    AmbariAddressJson ambariAddressJson=new AmbariAddressJson();
    ambariAddressJson.setAmbariAddress(host);
    StackResponse stack=cloudbreakClient.stackEndpoint().getStackForAmbari(ambariAddressJson);
    long id=stack.getId();
    SecurityConfig securityConfig=tlsSecurityService.prepareSecurityConfig(id);
    if (user == null && pass == null) {
      ClusterResponse clusterResponse=cloudbreakClient.clusterEndpoint().get(id);
      return new AmbariStack(new Ambari(host,ambari.getPort(),clusterResponse.getUserName(),clusterResponse.getPassword()),id,securityConfig);
    }
 else {
      return new AmbariStack(ambari,id,securityConfig);
    }
  }
 catch (  Exception e) {
    return new AmbariStack(ambari);
  }
}
Program: 63931
Project: 63931
Buggy source:
public SecurityConfig prepareSecurityConfig(Long stackId){
  Path stackCertDir=getCertDir(stackId);
  if (!Files.exists(stackCertDir)) {
    try {
      LOGGER.info("String_Node_Str",stackCertDir);
      Files.createDirectory(stackCertDir);
    }
 catch (    IOException e) {
      throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
    }
  }
  Path clientKeyDst=stackCertDir.resolve(KEY_FILE);
  Path clientCertDst=stackCertDir.resolve(CERT_FILE);
  try {
    Files.copy(Paths.get(clientPrivateKeyName),clientKeyDst,StandardCopyOption.REPLACE_EXISTING);
    Files.copy(Paths.get(clientCertName),clientCertDst,StandardCopyOption.REPLACE_EXISTING);
  }
 catch (  IOException e) {
    throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
  }
  byte[] serverCert;
  try {
    serverCert=cloudbreakService.stackEndpoint().getCertificate(stackId).getCertificate();
    Files.write(stackCertDir.resolve(SERVER_CERT_FILE),serverCert,StandardOpenOption.CREATE);
  }
 catch (  Exception e) {
    throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
  }
  byte[] clientKey;
  byte[] clientCert;
  try {
    clientKey=Files.readAllBytes(clientKeyDst);
    clientCert=Files.readAllBytes(clientCertDst);
  }
 catch (  IOException e) {
    throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
  }
  return new SecurityConfig(clientKey,clientCert,serverCert);
}

Fixed version (ground truth):
public SecurityConfig prepareSecurityConfig(Long stackId){
  Path stackCertDir=getCertDir(stackId);
  if (!Files.exists(stackCertDir)) {
    try {
      LOGGER.info("String_Node_Str",stackCertDir);
      Files.createDirectory(stackCertDir);
    }
 catch (    IOException e) {
      throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
    }
  }
  Path clientKeyDst=stackCertDir.resolve(KEY_FILE);
  Path clientCertDst=stackCertDir.resolve(CERT_FILE);
  try {
    Files.copy(Paths.get(clientPrivateKeyName),clientKeyDst,StandardCopyOption.REPLACE_EXISTING);
    Files.copy(Paths.get(clientCertName),clientCertDst,StandardCopyOption.REPLACE_EXISTING);
  }
 catch (  IOException e) {
    throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
  }
  byte[] serverCert;
  try {
    serverCert=cloudbreakClient.stackEndpoint().getCertificate(stackId).getCertificate();
    Files.write(stackCertDir.resolve(SERVER_CERT_FILE),serverCert,StandardOpenOption.CREATE);
  }
 catch (  Exception e) {
    throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
  }
  byte[] clientKey;
  byte[] clientCert;
  try {
    clientKey=Files.readAllBytes(clientKeyDst);
    clientCert=Files.readAllBytes(clientCertDst);
  }
 catch (  IOException e) {
    throw new TlsConfigurationException("String_Node_Str" + stackCertDir,e);
  }
  return new SecurityConfig(clientKey,clientCert,serverCert);
}
Program: 63932
Project: 63932
Buggy source:
private CloudbreakEvent createStackEvent(Stack stack,String eventType,String eventMessage,String instanceGroupName){
  CloudbreakEvent stackEvent=new CloudbreakEvent();
  stackEvent.setEventTimestamp(Calendar.getInstance().getTime());
  stackEvent.setEventMessage(eventMessage);
  stackEvent.setEventType(eventType);
  stackEvent.setOwner(stack.getOwner());
  stackEvent.setAccount(stack.getAccount());
  stackEvent.setStackId(stack.getId());
  stackEvent.setStackStatus(stack.getStatus());
  stackEvent.setStackName(stack.getName());
  stackEvent.setNodeCount(stack.getRunningInstanceMetaData().size());
  stackEvent.setRegion(stack.getRegion());
  stackEvent.setCloud(stack.cloudPlatform().name());
  populateClusterData(stackEvent,stack);
  if (instanceGroupName != null) {
    stackEvent.setInstanceGroup(instanceGroupName);
  }
  return stackEvent;
}

Fixed version (ground truth):
private CloudbreakEvent createStackEvent(Stack stack,String eventType,String eventMessage,String instanceGroupName){
  CloudbreakEvent stackEvent=new CloudbreakEvent();
  stackEvent.setEventTimestamp(Calendar.getInstance().getTime());
  stackEvent.setEventMessage(eventMessage);
  stackEvent.setEventType(eventType);
  stackEvent.setOwner(stack.getOwner());
  stackEvent.setAccount(stack.getAccount());
  stackEvent.setStackId(stack.getId());
  stackEvent.setStackStatus(stack.getStatus());
  stackEvent.setStackName(stack.getName());
  stackEvent.setNodeCount(stack.getRunningInstanceMetaData().size());
  stackEvent.setRegion(stack.getRegion());
  stackEvent.setCloud(stack.getCredential() == null ? "String_Node_Str" : stack.cloudPlatform().name());
  populateClusterData(stackEvent,stack);
  if (instanceGroupName != null) {
    stackEvent.setInstanceGroup(instanceGroupName);
  }
  return stackEvent;
}
Program: 63933
Project: 63933
Buggy source:
private void validateSelectors(){
  LOGGER.debug("String_Node_Str");
  Map<Class,CloudPlatformEventHandler> handlerMap=new HashMap<>();
  for (  CloudPlatformEventHandler handler : handlers) {
    CloudPlatformEventHandler entry=handlerMap.put(handler.type(),handler);
    if (null != entry) {
      LOGGER.error("String_Node_Str",handler,entry);
      throw new IllegalStateException("String_Node_Str" + handler + "String_Node_Str"+ entry);
    }
  }
}

Fixed version (ground truth):
private void validateSelectors(){
  LOGGER.debug("String_Node_Str",handlers.size());
  Map<Class,CloudPlatformEventHandler> handlerMap=new HashMap<>();
  for (  CloudPlatformEventHandler handler : handlers) {
    CloudPlatformEventHandler entry=handlerMap.put(handler.type(),handler);
    if (null != entry) {
      LOGGER.error("String_Node_Str",handler,entry);
      throw new IllegalStateException("String_Node_Str" + handler + "String_Node_Str"+ entry);
    }
  }
}
Program: 63934
Project: 63934
Buggy source:
private void handleExceptions(Stack stack,List<ResourceRequestResult> failedResourceRequestResult){
  for (  ResourceRequestResult exception : failedResourceRequestResult) {
    List<Resource> resourceList=new ArrayList<>();
    LOGGER.error("String_Node_Str" + exception.getException().orNull().getMessage(),exception.getException());
    for (    Resource resource : exception.getResources()) {
      Resource newResource=resourceRepository.findByStackIdAndNameAndType(stack.getId(),resource.getResourceName(),resource.getResourceType());
      if (newResource != null) {
        LOGGER.info(String.format("String_Node_Str",newResource.getResourceName(),newResource.getId(),newResource.getResourceType()));
        resourceList.add(newResource);
      }
    }
    for (    Resource resource : exception.getBuiltResources()) {
      Resource newResource=resourceRepository.findByStackIdAndNameAndType(stack.getId(),resource.getResourceName(),resource.getResourceType());
      if (newResource != null) {
        LOGGER.info(String.format("String_Node_Str",newResource.getResourceName(),newResource.getId(),newResource.getResourceType()));
        resourceList.add(newResource);
      }
    }
    if (!resourceList.isEmpty()) {
      LOGGER.info("String_Node_Str" + resourceList.size());
      doRollbackAndDecreaseNodeCount(exception.getInstanceGroup(),stack,resourceList,failedResourceRequestResult);
    }
  }
}

Fixed version (ground truth):
private void handleExceptions(Stack stack,List<ResourceRequestResult> failedResourceRequestResult){
  for (  ResourceRequestResult exception : failedResourceRequestResult) {
    List<Resource> resourceList=new ArrayList<>();
    LOGGER.error("String_Node_Str" + exception.getException().orNull().getMessage(),exception.getException());
    resourceList.addAll(collectFailedResources(stack.getId(),exception.getResources()));
    resourceList.addAll(collectFailedResources(stack.getId(),exception.getBuiltResources()));
    if (!resourceList.isEmpty()) {
      LOGGER.info("String_Node_Str" + resourceList.size());
      doRollbackAndDecreaseNodeCount(exception.getInstanceGroup(),stack,resourceList,failedResourceRequestResult);
    }
  }
}
Program: 63935
Project: 63935
Buggy source:
private void handleExceptions(Stack stack,List<ResourceRequestResult> failedResourceRequestResult){
  for (  ResourceRequestResult exception : failedResourceRequestResult) {
    List<Resource> resourceList=new ArrayList<>();
    LOGGER.error("String_Node_Str",exception.getException().orNull().getMessage());
    for (    Resource resource : exception.getResources()) {
      Resource newResource=resourceRepository.findByStackIdAndNameAndType(stack.getId(),resource.getResourceName(),resource.getResourceType());
      if (newResource != null) {
        LOGGER.info("String_Node_Str",newResource.getResourceName(),newResource.getId(),newResource.getResourceType());
        resourceList.add(newResource);
      }
    }
    if (!resourceList.isEmpty()) {
      LOGGER.info("String_Node_Str",stack.getId(),resourceList.size());
      doRollback(stack,resourceList);
    }
  }
}

Fixed version (ground truth):
private void handleExceptions(Stack stack,List<ResourceRequestResult> failedResourceRequestResult){
  for (  ResourceRequestResult exception : failedResourceRequestResult) {
    List<Resource> resourceList=new ArrayList<>();
    LOGGER.error("String_Node_Str",exception.getException().orNull().getMessage());
    resourceList.addAll(collectFailedResources(stack.getId(),exception.getResources()));
    resourceList.addAll(collectFailedResources(stack.getId(),exception.getBuiltResources()));
    if (!resourceList.isEmpty()) {
      LOGGER.info("String_Node_Str",stack.getId(),resourceList.size());
      doRollback(stack,resourceList);
    }
  }
}
Program: 63936
Project: 63936
Buggy source:
@Override public boolean checkStatus(AmbariOperations t){
  Map<String,Integer> installRequests=t.getRequests();
  boolean allFinished=true;
  for (  Entry<String,Integer> request : installRequests.entrySet()) {
    AmbariClient ambariClient=t.getAmbariClient();
    BigDecimal installProgress=ambariClient.getRequestProgress(request.getValue());
    LOGGER.info("String_Node_Str",request.getKey(),installProgress);
    allFinished=allFinished && COMPLETED.compareTo(installProgress) == 0;
    if (FAILED.compareTo(installProgress) == 0) {
      boolean failed=true;
      for (int i=0; i < MAX_RETRY; i++) {
        if (ambariClient.getRequestProgress(request.getValue()).compareTo(FAILED) != 0) {
          failed=false;
          break;
        }
      }
      if (failed) {
        throw new AmbariOperationFailedException(String.format("String_Node_Str",request.getKey(),request.getValue()));
      }
    }
  }
  return allFinished;
}

Fixed version (ground truth):
@Override public boolean checkStatus(AmbariOperations t){
  Map<String,Integer> installRequests=t.getRequests();
  boolean allFinished=true;
  for (  Entry<String,Integer> request : installRequests.entrySet()) {
    AmbariClient ambariClient=t.getAmbariClient();
    BigDecimal installProgress=ambariClient.getRequestProgress(request.getValue());
    LOGGER.info("String_Node_Str",request.getKey(),installProgress);
    allFinished=allFinished && installProgress != null && COMPLETED.compareTo(installProgress) == 0;
    if (installProgress != null && FAILED.compareTo(installProgress) == 0) {
      boolean failed=true;
      for (int i=0; i < MAX_RETRY; i++) {
        if (ambariClient.getRequestProgress(request.getValue()).compareTo(FAILED) != 0) {
          failed=false;
          break;
        }
      }
      if (failed) {
        throw new AmbariOperationFailedException(String.format("String_Node_Str",request.getKey(),request.getValue()));
      }
    }
  }
  return allFinished;
}
Program: 63938
Project: 63938
Buggy source:
private void validateIamRoleIsAssumable(AwsCredential awsCredential){
  try {
    crossAccountCredentialsProvider.retrieveSessionCredentials(CrossAccountCredentialsProvider.DEFAULT_SESSION_CREDENTIALS_DURATION,crossAccountCredentialsProvider.getExternalId(),awsCredential);
  }
 catch (  Exception e) {
    String errorMessage=String.format("String_Node_Str",awsCredential.getRoleArn(),crossAccountCredentialsProvider.getExternalId());
    LOGGER.error(errorMessage,e);
    throw new BadRequestException(errorMessage,e);
  }
}

Fixed version (ground truth):
private void validateIamRoleIsAssumable(AwsCredential awsCredential){
  try {
    crossAccountCredentialsProvider.retrieveSessionCredentials(CrossAccountCredentialsProvider.DEFAULT_SESSION_CREDENTIALS_DURATION,crossAccountCredentialsProvider.getExternalId(),awsCredential);
  }
 catch (  AmazonClientException ae) {
    if (ae.getMessage().contains("String_Node_Str")) {
      String errorMessage=String.format("String_Node_Str");
      LOGGER.error(errorMessage,ae);
      throw new BadRequestException(errorMessage,ae);
    }
  }
catch (  Exception e) {
    String errorMessage=String.format("String_Node_Str",awsCredential.getRoleArn(),crossAccountCredentialsProvider.getExternalId());
    LOGGER.error(errorMessage,e);
    throw new BadRequestException(errorMessage,e);
  }
}
Program: 63939
Project: 63939
Buggy source:
@Override public FlowContext terminateStack(FlowContext context) throws CloudbreakException {
  DefaultFlowContext actualContext=(DefaultFlowContext)context;
  try {
    stackUpdater.updateStackStatus(actualContext.getStackId(),DELETE_IN_PROGRESS);
    Stack stack=stackService.getById(actualContext.getStackId());
    MDCBuilder.buildMdcContext(stack);
    if (stack != null && stack.getCredential() != null) {
      logBefore(actualContext.getStackId(),context,"String_Node_Str",DELETE_IN_PROGRESS);
      terminationService.terminateStack(stack.getId(),actualContext.getCloudPlatform());
      logAfter(actualContext.getStackId(),context,"String_Node_Str",DELETE_IN_PROGRESS);
    }
    logBefore(actualContext.getStackId(),context,"String_Node_Str",DELETE_IN_PROGRESS);
    terminationService.finalizeTermination(stack.getId());
    logAfter(actualContext.getStackId(),context,"String_Node_Str",DELETE_COMPLETED);
    cloudbreakEventService.fireCloudbreakEvent(stack.getId(),DELETE_COMPLETED.name(),"String_Node_Str");
    cloudbreakEventService.fireCloudbreakEvent(stack.getId(),BillingStatus.BILLING_STOPPED.name(),"String_Node_Str");
    if (stack.getCluster() != null) {
      clusterService.updateClusterStatusByStackId(actualContext.getStackId(),DELETE_COMPLETED);
    }
    stackUpdater.updateStackStatus(actualContext.getStackId(),DELETE_COMPLETED);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e.getMessage());
    throw new CloudbreakException(e);
  }
  return context;
}

Fixed version (ground truth):
@Override public FlowContext terminateStack(FlowContext context) throws CloudbreakException {
  DefaultFlowContext actualContext=(DefaultFlowContext)context;
  try {
    stackUpdater.updateStackStatus(actualContext.getStackId(),DELETE_IN_PROGRESS);
    Stack stack=stackService.getById(actualContext.getStackId());
    MDCBuilder.buildMdcContext(stack);
    if (stack != null && stack.getCredential() != null) {
      logBefore(actualContext.getStackId(),context,"String_Node_Str",DELETE_IN_PROGRESS);
      terminationService.terminateStack(stack.getId(),actualContext.getCloudPlatform());
      logAfter(actualContext.getStackId(),context,"String_Node_Str",DELETE_IN_PROGRESS);
    }
    cloudbreakEventService.fireCloudbreakEvent(stack.getId(),DELETE_COMPLETED.name(),"String_Node_Str");
    cloudbreakEventService.fireCloudbreakEvent(stack.getId(),BillingStatus.BILLING_STOPPED.name(),"String_Node_Str");
    if (stack.getCluster() != null) {
      clusterService.updateClusterStatusByStackId(actualContext.getStackId(),DELETE_COMPLETED);
    }
    stackUpdater.updateStackStatus(actualContext.getStackId(),DELETE_COMPLETED);
    terminationService.finalizeTermination(stack.getId());
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e.getMessage());
    throw new CloudbreakException(e);
  }
  return context;
}
Program: 63941
Project: 63941
Buggy source:
@Override public Boolean call() throws Exception {
  HostConfig hostConfig=new HostConfig();
  hostConfig.setNetworkMode("String_Node_Str");
  hostConfig.setPrivileged(true);
  hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
  Ports ports=new Ports();
  ports.add(new PortBinding(new Ports.Binding(PORT),new ExposedPort(PORT)));
  hostConfig.setPortBindings(ports);
  String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withHostConfig(hostConfig).withExposedPorts(new ExposedPort(PORT)).withEnv(String.format("String_Node_Str",node),String.format("String_Node_Str"),String.format("String_Node_Str",cloudPlatform),String.format("String_Node_Str","String_Node_Str")).withName(AMBARI_SERVER.getName()).withCmd("String_Node_Str"));
  DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withPortBindings(new PortBinding(new Ports.Binding("String_Node_Str",PORT),new ExposedPort(PORT))).withNetworkMode("String_Node_Str").withRestartPolicy(RestartPolicy.alwaysRestart()).withPrivileged(true));
  LOGGER.info("String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public Boolean call() throws Exception {
  HostConfig hostConfig=new HostConfig();
  hostConfig.setNetworkMode("String_Node_Str");
  hostConfig.setPrivileged(true);
  hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
  Ports ports=new Ports();
  ports.add(new PortBinding(new Ports.Binding(PORT),new ExposedPort(PORT)));
  hostConfig.setPortBindings(ports);
  try {
    String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withHostConfig(hostConfig).withExposedPorts(new ExposedPort(PORT)).withEnv(String.format("String_Node_Str",node),String.format("String_Node_Str"),String.format("String_Node_Str",cloudPlatform),String.format("String_Node_Str","String_Node_Str")).withName(AMBARI_SERVER.getName()).withCmd("String_Node_Str"));
    DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withPortBindings(new PortBinding(new Ports.Binding("String_Node_Str",PORT),new ExposedPort(PORT))).withNetworkMode("String_Node_Str").withRestartPolicy(RestartPolicy.alwaysRestart()).withPrivileged(true));
    LOGGER.info("String_Node_Str");
  }
 catch (  ConflictException ex) {
    LOGGER.warn("String_Node_Str",ex.getMessage());
  }
  return true;
}
Program: 63942
Project: 63942
Buggy source:
@Override public Boolean call() throws Exception {
  HostConfig hostConfig=new HostConfig();
  hostConfig.setPrivileged(true);
  hostConfig.setNetworkMode("String_Node_Str");
  hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
  String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withEnv(String.format("String_Node_Str","String_Node_Str"),String.format("String_Node_Str","String_Node_Str"),String.format("String_Node_Str",node)).withHostConfig(hostConfig).withName(AMBARI_DB.getName()));
  DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withRestartPolicy(RestartPolicy.alwaysRestart()).withNetworkMode("String_Node_Str").withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))));
  LOGGER.info("String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public Boolean call() throws Exception {
  try {
    HostConfig hostConfig=new HostConfig();
    hostConfig.setPrivileged(true);
    hostConfig.setNetworkMode("String_Node_Str");
    hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
    String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withEnv(String.format("String_Node_Str","String_Node_Str"),String.format("String_Node_Str","String_Node_Str"),String.format("String_Node_Str",node)).withHostConfig(hostConfig).withName(AMBARI_DB.getName()));
    DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withRestartPolicy(RestartPolicy.alwaysRestart()).withNetworkMode("String_Node_Str").withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))));
    LOGGER.info("String_Node_Str");
  }
 catch (  ConflictException ex) {
    LOGGER.warn("String_Node_Str",ex.getMessage());
  }
  return true;
}
Program: 63943
Project: 63943
Buggy source:
@Override public Boolean call() throws Exception {
  LOGGER.info("String_Node_Str");
  HostConfig hostConfig=new HostConfig();
  hostConfig.setPrivileged(true);
  hostConfig.setNetworkMode("String_Node_Str");
  hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
  Ports ports=new Ports();
  ports.add(new PortBinding(new Ports.Binding(PORT),new ExposedPort(PORT)));
  hostConfig.setPortBindings(ports);
  try {
    String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withHostConfig(hostConfig).withName(String.format("String_Node_Str",CONSUL_WATCH.getName(),id)).withCmd("String_Node_Str"));
    DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withPortBindings(new PortBinding(new Ports.Binding("String_Node_Str",PORT),new ExposedPort(PORT))).withNetworkMode("String_Node_Str").withRestartPolicy(RestartPolicy.alwaysRestart()).withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))));
    LOGGER.info("String_Node_Str");
    return true;
  }
 catch (  Exception ex) {
    LOGGER.info("String_Node_Str");
    throw ex;
  }
}

Fixed version (ground truth):
@Override public Boolean call() throws Exception {
  LOGGER.info("String_Node_Str");
  HostConfig hostConfig=new HostConfig();
  hostConfig.setPrivileged(true);
  hostConfig.setNetworkMode("String_Node_Str");
  hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
  Ports ports=new Ports();
  ports.add(new PortBinding(new Ports.Binding(PORT),new ExposedPort(PORT)));
  hostConfig.setPortBindings(ports);
  try {
    String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withHostConfig(hostConfig).withName(String.format("String_Node_Str",CONSUL_WATCH.getName(),id)).withCmd("String_Node_Str"));
    DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withPortBindings(new PortBinding(new Ports.Binding("String_Node_Str",PORT),new ExposedPort(PORT))).withNetworkMode("String_Node_Str").withRestartPolicy(RestartPolicy.alwaysRestart()).withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))));
    LOGGER.info("String_Node_Str");
  }
 catch (  ConflictException ex) {
    LOGGER.warn("String_Node_Str",ex.getMessage());
  }
catch (  Exception ex) {
    LOGGER.info("String_Node_Str");
    throw ex;
  }
  return true;
}
Program: 63944
Project: 63944
Buggy source:
@Override public Boolean call() throws Exception {
  HostConfig hostConfig=new HostConfig();
  hostConfig.setPrivileged(true);
  String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(containerName).withName(MUNCHAUSEN.getName() + new Date().getTime()).withHostConfig(hostConfig).withCmd(cmd));
  DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))));
  LOGGER.info("String_Node_Str");
  return true;
}

Fixed version (ground truth):
@Override public Boolean call() throws Exception {
  try {
    HostConfig hostConfig=new HostConfig();
    hostConfig.setPrivileged(true);
    String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(containerName).withName(MUNCHAUSEN.getName() + new Date().getTime()).withHostConfig(hostConfig).withCmd(cmd));
    DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))));
    LOGGER.info("String_Node_Str");
  }
 catch (  ConflictException ex) {
    LOGGER.warn("String_Node_Str",ex.getMessage());
  }
  return true;
}
Program: 63945
Project: 63945
Buggy source:
@Override public Boolean call() throws Exception {
  LOGGER.info(String.format("String_Node_Str",nodeName,privateIp));
  HostConfig hostConfig=new HostConfig();
  hostConfig.setPrivileged(true);
  hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
  Ports ports=new Ports();
  ports.add(new PortBinding(new Ports.Binding(PORT),new ExposedPort(PORT)));
  hostConfig.setPortBindings(ports);
  String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withEnv(String.format("String_Node_Str",nodeName)).withHostConfig(hostConfig).withName(REGISTRATOR.getName()).withCmd(String.format("String_Node_Str",privateIp)));
  DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))).withRestartPolicy(RestartPolicy.alwaysRestart()).withPortBindings(new PortBinding(new Ports.Binding("String_Node_Str",PORT),new ExposedPort(PORT))));
  LOGGER.info(String.format("String_Node_Str",nodeName));
  return true;
}

Fixed version (ground truth):
@Override public Boolean call() throws Exception {
  try {
    LOGGER.info(String.format("String_Node_Str",nodeName,privateIp));
    HostConfig hostConfig=new HostConfig();
    hostConfig.setPrivileged(true);
    hostConfig.setRestartPolicy(RestartPolicy.alwaysRestart());
    Ports ports=new Ports();
    ports.add(new PortBinding(new Ports.Binding(PORT),new ExposedPort(PORT)));
    hostConfig.setPortBindings(ports);
    String containerId=DockerClientUtil.createContainer(docker,docker.createContainerCmd(imageName).withEnv(String.format("String_Node_Str",nodeName)).withHostConfig(hostConfig).withName(REGISTRATOR.getName()).withCmd(String.format("String_Node_Str",privateIp)));
    DockerClientUtil.startContainer(docker,docker.startContainerCmd(containerId).withBinds(new Bind("String_Node_Str",new Volume("String_Node_Str"))).withRestartPolicy(RestartPolicy.alwaysRestart()).withPortBindings(new PortBinding(new Ports.Binding("String_Node_Str",PORT),new ExposedPort(PORT))));
    LOGGER.info(String.format("String_Node_Str",nodeName));
  }
 catch (  ConflictException ex) {
    LOGGER.warn("String_Node_Str",ex.getMessage());
  }
  return true;
}
Program: 63946
Project: 63946
Buggy source:
private Operation executeOperations(GccRemoveReadyPollerObject gcpRemoveReadyPollerObject) throws Exception {
  Operation operation=null;
  try {
    if (gcpRemoveReadyPollerObject.getZoneOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getZoneOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getZoneOperations().get().execute();
    }
 else     if (gcpRemoveReadyPollerObject.getRegionOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getRegionOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getRegionOperations().get().execute();
    }
 else {
      LOGGER.error("String_Node_Str");
    }
  }
 catch (  GoogleJsonResponseException e) {
    LOGGER.debug("String_Node_Str",e);
    if (e.getDetails().get("String_Node_Str").equals(NOT_FOUND)) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getGlobalOperations().keySet());
      operation=gcpRemoveReadyPollerObject.getGlobalOperations().execute();
    }
 else {
      LOGGER.debug("String_Node_Str");
      throw e;
    }
  }
  return operation;
}

Fixed version (ground truth):
private Operation executeOperations(GccRemoveReadyPollerObject gcpRemoveReadyPollerObject) throws Exception {
  Operation operation=null;
  try {
    if (gcpRemoveReadyPollerObject.getZoneOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getZoneOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getZoneOperations().get().execute();
    }
 else     if (gcpRemoveReadyPollerObject.getRegionOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getRegionOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getRegionOperations().get().execute();
    }
 else {
      LOGGER.error("String_Node_Str");
    }
  }
 catch (  GoogleJsonResponseException e) {
    LOGGER.debug("String_Node_Str",e.getStatusMessage());
    if (e.getDetails().get("String_Node_Str").equals(NOT_FOUND)) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getGlobalOperations().keySet());
      operation=gcpRemoveReadyPollerObject.getGlobalOperations().execute();
    }
 else {
      LOGGER.debug("String_Node_Str");
      throw e;
    }
  }
  return operation;
}
Program: 63947
Project: 63947
Buggy source:
private Operation executeOperations(GccRemoveReadyPollerObject gcpRemoveReadyPollerObject) throws Exception {
  Operation operation=null;
  try {
    if (gcpRemoveReadyPollerObject.getZoneOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getZoneOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getZoneOperations().get().execute();
    }
 else     if (gcpRemoveReadyPollerObject.getRegionOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getRegionOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getRegionOperations().get().execute();
    }
 else {
      LOGGER.error("String_Node_Str");
    }
  }
 catch (  GoogleJsonResponseException e) {
    LOGGER.debug("String_Node_Str",e);
    if (e.getDetails().get("String_Node_Str").equals(NOT_FOUND)) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getGlobalOperations().keySet());
      operation=gcpRemoveReadyPollerObject.getGlobalOperations().execute();
    }
 else {
      LOGGER.debug("String_Node_Str");
      throw e;
    }
  }
  return operation;
}

Fixed version (ground truth):
private Operation executeOperations(GccRemoveReadyPollerObject gcpRemoveReadyPollerObject) throws Exception {
  Operation operation=null;
  try {
    if (gcpRemoveReadyPollerObject.getZoneOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getZoneOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getZoneOperations().get().execute();
    }
 else     if (gcpRemoveReadyPollerObject.getRegionOperations().isPresent()) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getRegionOperations().asSet());
      operation=gcpRemoveReadyPollerObject.getRegionOperations().get().execute();
    }
 else {
      LOGGER.error("String_Node_Str");
    }
  }
 catch (  GoogleJsonResponseException e) {
    LOGGER.debug("String_Node_Str",e.getStatusMessage());
    if (e.getDetails().get("String_Node_Str").equals(NOT_FOUND)) {
      LOGGER.debug("String_Node_Str",gcpRemoveReadyPollerObject.getGlobalOperations().keySet());
      operation=gcpRemoveReadyPollerObject.getGlobalOperations().execute();
    }
 else {
      LOGGER.debug("String_Node_Str");
      throw e;
    }
  }
  return operation;
}
Program: 63948
Project: 63948
Buggy source:
private Certificate getCertificate(AzureCredential azureCredential,String serviceFilesPathWithoutExtension) throws Exception {
  keyGeneratorService.generateKey("String_Node_Str",azureCredential,"String_Node_Str",serviceFilesPathWithoutExtension + "String_Node_Str");
  KeyStore ks=KeyStore.getInstance(KeyStore.getDefaultType());
  char[] pass=azureCredential.getJks().toCharArray();
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(new File(serviceFilesPathWithoutExtension + "String_Node_Str"));
    ks.load(fis,pass);
  }
  finally {
    if (fis != null) {
      fis.close();
    }
  }
  return ks.getCertificate("String_Node_Str");
}

Fixed version (ground truth):
private Certificate getCertificate(AzureCredential azureCredential,String serviceFilesPathWithoutExtension) throws Exception {
  String email=userDetailsService.getDetails(azureCredential.getOwner(),UserFilterField.USERID).getUsername();
  keyGeneratorService.generateKey(email,azureCredential,"String_Node_Str",serviceFilesPathWithoutExtension + "String_Node_Str");
  KeyStore ks=KeyStore.getInstance(KeyStore.getDefaultType());
  char[] pass=azureCredential.getJks().toCharArray();
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(new File(serviceFilesPathWithoutExtension + "String_Node_Str"));
    ks.load(fis,pass);
  }
  finally {
    if (fis != null) {
      fis.close();
    }
  }
  return ks.getCertificate("String_Node_Str");
}
Program: 63949
Project: 63949
Buggy source:
public void generateKey(String user,AzureCredential azureCredential,String alias,String path) throws Exception {
  String command=StringUtils.join(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str",alias,"String_Node_Str","String_Node_Str","String_Node_Str",path,"String_Node_Str","String_Node_Str","String_Node_Str",AzureStackUtil.DEFAULT_JKS_PASS,"String_Node_Str",AzureStackUtil.DEFAULT_JKS_PASS,"String_Node_Str","String_Node_Str" + user + azureCredential.getPostFix()+ "String_Node_Str"},"String_Node_Str");
  Process p=Runtime.getRuntime().exec(command);
  p.waitFor();
}

Fixed version (ground truth):
public void generateKey(String user,AzureCredential azureCredential,String alias,String path) throws Exception {
  String command=StringUtils.join(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str",alias,"String_Node_Str","String_Node_Str","String_Node_Str",path,"String_Node_Str","String_Node_Str","String_Node_Str",AzureStackUtil.DEFAULT_JKS_PASS,"String_Node_Str",AzureStackUtil.DEFAULT_JKS_PASS,"String_Node_Str","String_Node_Str" + user + "String_Node_Str"},"String_Node_Str");
  Process p=Runtime.getRuntime().exec(command);
  p.waitFor();
}
Program: 63950
Project: 63950
Buggy source:
@Override public boolean checkStatus(AzureResourcePollerObject t){
  List<HttpResponseDecorator> responses=t.getResponses();
  boolean result=true;
  Iterator<HttpResponseDecorator> iterator=responses.iterator();
  while (iterator.hasNext()) {
    HttpResponseDecorator response=iterator.next();
    String requestId=getRequestId(response);
    String requestStatus=String.valueOf(t.getAzureClient().getRequestStatus(requestId));
    JsonNode jsonFromString=jsonHelper.createJsonFromString(requestStatus);
    String status=jsonFromString.get("String_Node_Str").get("String_Node_Str").asText();
    if ("String_Node_Str".equals(status)) {
      result=false;
      break;
    }
 else     if ("String_Node_Str".equals(status)) {
      throw new AzureResourceException(jsonFromString.get("String_Node_Str").get("String_Node_Str").get("String_Node_Str").asText());
    }
 else {
      iterator.remove();
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public boolean checkStatus(AzureResourcePollerObject t){
  List<HttpResponseDecorator> responses=t.getResponses();
  boolean result=true;
  Iterator<HttpResponseDecorator> iterator=responses.iterator();
  while (iterator.hasNext()) {
    HttpResponseDecorator response=iterator.next();
    String requestId=getRequestId(response);
    String requestStatus=String.valueOf(t.getAzureClient().getRequestStatus(requestId));
    JsonNode jsonFromString=jsonHelper.createJsonFromString(requestStatus);
    String status=jsonFromString.get("String_Node_Str").get("String_Node_Str").asText();
    if ("String_Node_Str".equals(status)) {
      result=false;
      break;
    }
 else     if ("String_Node_Str".equals(status)) {
      String error=jsonFromString.get("String_Node_Str").get("String_Node_Str").get("String_Node_Str").asText();
      throw new AzureResourceException(error);
    }
 else {
      iterator.remove();
    }
  }
  return result;
}
Program: 63951
Project: 63951
Buggy source:
@Override public Boolean create(final CreateResourceRequest createResourceRequest,String region) throws Exception {
  AzureCloudServiceCreateRequest aCSCR=(AzureCloudServiceCreateRequest)createResourceRequest;
  HttpResponseDecorator cloudServiceResponse=(HttpResponseDecorator)aCSCR.getAzureClient().createCloudService(aCSCR.getProps());
  AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(aCSCR.getAzureClient(),aCSCR.getStack(),cloudServiceResponse);
  azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  return true;
}

Fixed version (ground truth):
@Override public Boolean create(final CreateResourceRequest createResourceRequest,String region) throws Exception {
  AzureCloudServiceCreateRequest aCSCR=(AzureCloudServiceCreateRequest)createResourceRequest;
  try {
    HttpResponseDecorator cloudServiceResponse=(HttpResponseDecorator)aCSCR.getAzureClient().createCloudService(aCSCR.getProps());
    AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(aCSCR.getAzureClient(),aCSCR.getStack(),cloudServiceResponse);
    azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  }
 catch (  Exception ex) {
    throw checkException(ex);
  }
  return true;
}
Program: 63952
Project: 63952
Buggy source:
@Override public Boolean create(final CreateResourceRequest createResourceRequest,final String region) throws Exception {
  AzureServiceCertificateCreateRequest aCSCR=(AzureServiceCertificateCreateRequest)createResourceRequest;
  HttpResponseDecorator serviceCertificate=(HttpResponseDecorator)aCSCR.getAzureClient().createServiceCertificate(aCSCR.getProps());
  AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(aCSCR.getAzureClient(),aCSCR.getStack(),serviceCertificate);
  azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  return true;
}

Fixed version (ground truth):
@Override public Boolean create(final CreateResourceRequest createResourceRequest,final String region) throws Exception {
  AzureServiceCertificateCreateRequest aCSCR=(AzureServiceCertificateCreateRequest)createResourceRequest;
  try {
    HttpResponseDecorator serviceCertificate=(HttpResponseDecorator)aCSCR.getAzureClient().createServiceCertificate(aCSCR.getProps());
    AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(aCSCR.getAzureClient(),aCSCR.getStack(),serviceCertificate);
    azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  }
 catch (  Exception ex) {
    throw checkException(ex);
  }
  return true;
}
Program: 63953
Project: 63953
Buggy source:
@Override public Boolean create(final CreateResourceRequest createResourceRequest,final String region) throws Exception {
  AzureVirtualMachineCreateRequest aCSCR=(AzureVirtualMachineCreateRequest)createResourceRequest;
  HttpResponseDecorator virtualMachineResponse=(HttpResponseDecorator)aCSCR.getAzureClient().createVirtualMachine(aCSCR.getProps());
  AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(aCSCR.getAzureClient(),aCSCR.getStack(),virtualMachineResponse);
  azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  return true;
}

Fixed version (ground truth):
@Override public Boolean create(final CreateResourceRequest createResourceRequest,final String region) throws Exception {
  AzureVirtualMachineCreateRequest aCSCR=(AzureVirtualMachineCreateRequest)createResourceRequest;
  try {
    HttpResponseDecorator virtualMachineResponse=(HttpResponseDecorator)aCSCR.getAzureClient().createVirtualMachine(aCSCR.getProps());
    AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(aCSCR.getAzureClient(),aCSCR.getStack(),virtualMachineResponse);
    azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  }
 catch (  Exception ex) {
    throw checkException(ex);
  }
  return true;
}
Program: 63954
Project: 63954
Buggy source:
@Override public Boolean create(CreateResourceRequest createResourceRequest,String region) throws Exception {
  AzureNetworkCreateRequest request=(AzureNetworkCreateRequest)createResourceRequest;
  Stack stack=stackRepository.findById(request.getStackId());
  if (!request.getAzureClient().getVirtualNetworkConfiguration().toString().contains(request.getName())) {
    HttpResponseDecorator virtualNetworkResponse=(HttpResponseDecorator)request.getAzureClient().createVirtualNetwork(request.getProps());
    AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(request.getAzureClient(),stack,virtualNetworkResponse);
    azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  }
  return true;
}

Fixed version (ground truth):
@Override public Boolean create(CreateResourceRequest createResourceRequest,String region) throws Exception {
  AzureNetworkCreateRequest request=(AzureNetworkCreateRequest)createResourceRequest;
  try {
    Stack stack=stackRepository.findById(request.getStackId());
    if (!request.getAzureClient().getVirtualNetworkConfiguration().toString().contains(request.getName())) {
      HttpResponseDecorator virtualNetworkResponse=(HttpResponseDecorator)request.getAzureClient().createVirtualNetwork(request.getProps());
      AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(request.getAzureClient(),stack,virtualNetworkResponse);
      azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
    }
  }
 catch (  Exception ex) {
    throw checkException(ex);
  }
  return true;
}
Program: 63955
Project: 63955
Buggy source:
@Override public Boolean create(CreateResourceRequest createResourceRequest,String region) throws Exception {
  AzureReservedIpCreateRequest azureReservedIpCreateRequest=(AzureReservedIpCreateRequest)createResourceRequest;
  HttpResponseDecorator serviceCertificate=(HttpResponseDecorator)azureReservedIpCreateRequest.getAzureClient().createReservedIP(azureReservedIpCreateRequest.getProps());
  AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(azureReservedIpCreateRequest.getAzureClient(),azureReservedIpCreateRequest.getStack(),serviceCertificate);
  azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  return true;
}

Fixed version (ground truth):
@Override public Boolean create(CreateResourceRequest createResourceRequest,String region) throws Exception {
  AzureReservedIpCreateRequest azureReservedIpCreateRequest=(AzureReservedIpCreateRequest)createResourceRequest;
  try {
    HttpResponseDecorator serviceCertificate=(HttpResponseDecorator)azureReservedIpCreateRequest.getAzureClient().createReservedIP(azureReservedIpCreateRequest.getProps());
    AzureResourcePollerObject azureResourcePollerObject=new AzureResourcePollerObject(azureReservedIpCreateRequest.getAzureClient(),azureReservedIpCreateRequest.getStack(),serviceCertificate);
    azureResourcePollerObjectPollingService.pollWithTimeout(azureCreateResourceStatusCheckerTask,azureResourcePollerObject,POLLING_INTERVAL,MAX_POLLING_ATTEMPTS);
  }
 catch (  Exception ex) {
    throw checkException(ex);
  }
  return true;
}