Program: 116715
Project: 116715
Buggy source:
private void monitor(){
  for (  NetworkPartitionContext networkPartitionContext : networkPartitionCtxts.values()) {
    for (    PartitionContext partitionContext : networkPartitionContext.getPartitionCtxts().values()) {
      minCheckKnowledgeSession.setGlobal("String_Node_Str",clusterId);
      minCheckKnowledgeSession.setGlobal("String_Node_Str",lbReferenceType);
      if (log.isDebugEnabled()) {
        log.debug(String.format("String_Node_Str",partitionContext.getPartitionId()));
      }
      minCheckFactHandle=AutoscalerRuleEvaluator.evaluateMinCheck(minCheckKnowledgeSession,minCheckFactHandle,partitionContext);
    }
    boolean rifReset=networkPartitionContext.isRifReset();
    boolean memoryConsumptionReset=networkPartitionContext.isMemoryConsumptionReset();
    boolean loadAverageReset=networkPartitionContext.isLoadAverageReset();
    if (rifReset || memoryConsumptionReset || loadAverageReset) {
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",clusterId);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",autoscalePolicy);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",rifReset);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",memoryConsumptionReset);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",loadAverageReset);
      if (log.isDebugEnabled()) {
        log.debug(String.format("String_Node_Str",networkPartitionContext.getId()));
      }
      scaleCheckFactHandle=AutoscalerRuleEvaluator.evaluateScaleCheck(scaleCheckKnowledgeSession,scaleCheckFactHandle,networkPartitionContext);
      networkPartitionContext.setRifReset(false);
      networkPartitionContext.setMemoryConsumptionReset(false);
      networkPartitionContext.setLoadAverageReset(false);
    }
 else     if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str" + "String_Node_Str",networkPartitionContext.getId()));
    }
  }
}

Fixed version (ground truth):
private void monitor(){
  for (  NetworkPartitionContext networkPartitionContext : networkPartitionCtxts.values()) {
    for (    PartitionContext partitionContext : networkPartitionContext.getPartitionCtxts().values()) {
      minCheckKnowledgeSession.setGlobal("String_Node_Str",clusterId);
      minCheckKnowledgeSession.setGlobal("String_Node_Str",lbReferenceType);
      if (log.isDebugEnabled()) {
        log.debug(String.format("String_Node_Str",partitionContext.getPartitionId()));
      }
      minCheckFactHandle=AutoscalerRuleEvaluator.evaluateMinCheck(minCheckKnowledgeSession,minCheckFactHandle,partitionContext);
    }
    boolean rifReset=networkPartitionContext.isRifReset();
    boolean memoryConsumptionReset=networkPartitionContext.isMemoryConsumptionReset();
    boolean loadAverageReset=networkPartitionContext.isLoadAverageReset();
    if (rifReset || memoryConsumptionReset || loadAverageReset) {
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",clusterId);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",autoscalePolicy);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",rifReset);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",memoryConsumptionReset);
      scaleCheckKnowledgeSession.setGlobal("String_Node_Str",loadAverageReset);
      minCheckKnowledgeSession.setGlobal("String_Node_Str",lbReferenceType);
      if (log.isDebugEnabled()) {
        log.debug(String.format("String_Node_Str",networkPartitionContext.getId()));
      }
      scaleCheckFactHandle=AutoscalerRuleEvaluator.evaluateScaleCheck(scaleCheckKnowledgeSession,scaleCheckFactHandle,networkPartitionContext);
      networkPartitionContext.setRifReset(false);
      networkPartitionContext.setMemoryConsumptionReset(false);
      networkPartitionContext.setLoadAverageReset(false);
    }
 else     if (log.isDebugEnabled()) {
      log.debug(String.format("String_Node_Str" + "String_Node_Str",networkPartitionContext.getId()));
    }
  }
}