Program: 116204
Project: 116204
Buggy source:
public void createInstanceOnBurstingForApplication() throws TopologyInConsistentException, PolicyValidationException, ParentMonitorNotFoundException {
  Application application=ApplicationHolder.getApplications().getApplication(appId);
  if (application == null) {
    String msg="String_Node_Str";
    throw new TopologyInConsistentException(msg);
  }
  boolean burstNPFound=false;
  DeploymentPolicy deploymentPolicy=getDeploymentPolicy(application);
  String instanceId=null;
  if (deploymentPolicy == null) {
    instanceId=createApplicationInstance(application,null);
  }
 else {
    for (    ApplicationLevelNetworkPartition networkPartition : deploymentPolicy.getApplicationLevelNetworkPartitions()) {
      if (!networkPartition.isActiveByDefault()) {
        if (!this.networkPartitionCtxts.containsKey(networkPartition.getId())) {
          ApplicationLevelNetworkPartitionContext context=new ApplicationLevelNetworkPartitionContext(networkPartition.getId());
          context.setCreatedOnBurst(true);
          instanceId=createApplicationInstance(application,networkPartition.getId());
          ApplicationInstanceContext instanceContext=new ApplicationInstanceContext(instanceId);
          context.addInstanceContext(instanceContext);
          this.networkPartitionCtxts.put(context.getId(),context);
          ApplicationInstance instance=new ApplicationInstance(appId,instanceId);
          instance.setStatus(ApplicationStatus.Created);
          this.applicationInstanceIdMap.put(instanceId,instance);
          burstNPFound=true;
        }
      }
    }
  }
  if (!burstNPFound) {
    log.warn("String_Node_Str" + appId + "String_Node_Str");
  }
 else {
    startDependency(application,instanceId);
  }
}

Fixed version (ground truth):
public void createInstanceOnBurstingForApplication() throws TopologyInConsistentException, PolicyValidationException, MonitorNotFoundException {
  Application application=ApplicationHolder.getApplications().getApplication(appId);
  if (application == null) {
    String msg="String_Node_Str";
    throw new TopologyInConsistentException(msg);
  }
  boolean burstNPFound=false;
  DeploymentPolicy deploymentPolicy=getDeploymentPolicy(application);
  String instanceId=null;
  if (deploymentPolicy == null) {
    instanceId=createApplicationInstance(application,null);
  }
 else {
    for (    ApplicationLevelNetworkPartition networkPartition : deploymentPolicy.getApplicationLevelNetworkPartitions()) {
      if (!networkPartition.isActiveByDefault()) {
        if (!this.networkPartitionCtxts.containsKey(networkPartition.getId())) {
          ApplicationLevelNetworkPartitionContext context=new ApplicationLevelNetworkPartitionContext(networkPartition.getId());
          context.setCreatedOnBurst(true);
          instanceId=createApplicationInstance(application,networkPartition.getId());
          ApplicationInstanceContext instanceContext=new ApplicationInstanceContext(instanceId);
          context.addInstanceContext(instanceContext);
          this.networkPartitionCtxts.put(context.getId(),context);
          ApplicationInstance instance=new ApplicationInstance(appId,instanceId);
          instance.setStatus(ApplicationStatus.Created);
          this.applicationInstanceIdMap.put(instanceId,instance);
          burstNPFound=true;
        }
      }
    }
  }
  if (!burstNPFound) {
    log.warn("String_Node_Str" + appId + "String_Node_Str");
  }
 else {
    startDependency(application,instanceId);
  }
}