Program: 116041
Project: 116041
Buggy source:
public synchronized void monitor(){
  final Collection<NetworkPartitionContext> networkPartitionContexts=this.networkPartitionCtxts.values();
  Runnable monitoringRunnable=new Runnable(){
    @Override public void run(){
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + this.toString());
      }
      for (      NetworkPartitionContext networkPartitionContext : networkPartitionContexts) {
        for (        InstanceContext instanceContext : networkPartitionContext.getInstanceIdToInstanceContextMap().values()) {
          ApplicationInstance instance=(ApplicationInstance)instanceIdToInstanceMap.get(instanceContext.getId());
          if (instance.getStatus().getCode() <= GroupStatus.Active.getCode()) {
            if (!instanceContext.getIdToScalingOverMaxEvent().isEmpty() && networkPartitionContext.getPendingInstancesCount() > 0) {
              try {
                if (log.isInfoEnabled()) {
                  log.info("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
                }
                createInstanceOnBurstingForApplication();
              }
 catch (              TopologyInConsistentException e) {
                log.error("String_Node_Str",e);
              }
catch (              PolicyValidationException e) {
                log.error("String_Node_Str",e);
              }
catch (              MonitorNotFoundException e) {
                log.error("String_Node_Str",e);
              }
            }
 else {
              handleDependentScaling(instanceContext,networkPartitionContext);
            }
          }
        }
      }
    }
  }
;
  monitoringRunnable.run();
}

Fixed version (ground truth):
public synchronized void monitor(){
  final Collection<NetworkPartitionContext> networkPartitionContexts=this.networkPartitionCtxts.values();
  Runnable monitoringRunnable=new Runnable(){
    @Override public void run(){
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + this.toString());
      }
      for (      NetworkPartitionContext networkPartitionContext : networkPartitionContexts) {
        for (        InstanceContext instanceContext : networkPartitionContext.getInstanceIdToInstanceContextMap().values()) {
          ApplicationInstance instance=(ApplicationInstance)instanceIdToInstanceMap.get(instanceContext.getId());
          if (instance.getStatus().getCode() <= GroupStatus.Active.getCode()) {
            if (!instanceContext.getIdToScalingOverMaxEvent().isEmpty()) {
              if (networkPartitionContext.getPendingInstancesCount() == 0) {
                try {
                  if (log.isInfoEnabled()) {
                    log.info("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
                  }
                  createInstanceOnBurstingForApplication();
                }
 catch (                TopologyInConsistentException e) {
                  log.error("String_Node_Str",e);
                }
catch (                PolicyValidationException e) {
                  log.error("String_Node_Str",e);
                }
catch (                MonitorNotFoundException e) {
                  log.error("String_Node_Str",e);
                }
              }
 else {
                if (log.isDebugEnabled()) {
                  log.debug("String_Node_Str" + "String_Node_Str");
                }
              }
            }
 else {
              handleDependentScaling(instanceContext,networkPartitionContext);
            }
          }
        }
      }
    }
  }
;
  monitoringRunnable.run();
}