Program: 115786
Project: 115786
Buggy source:
@Override public void onParentScalingEvent(ScalingEvent scalingEvent){
  log.info("String_Node_Str" + this.getClusterId() + "String_Node_Str"+ scalingEvent.getNetworkPartitionId()+ "String_Node_Str"+ scalingEvent.getId()+ "String_Node_Str"+ scalingEvent.getInstanceId()+ "String_Node_Str"+ scalingEvent.getFactor());
  this.scalingFactorBasedOnDependencies=scalingEvent.getFactor();
  ClusterContext vmClusterContext=(ClusterContext)clusterContext;
  String instanceId=scalingEvent.getInstanceId();
  ClusterInstanceContext clusterInstanceContext=getClusterInstanceContext(scalingEvent.getNetworkPartitionId(),instanceId);
  List<String> primaryMemberListInClusterInstance=new ArrayList<String>();
  for (  ClusterLevelPartitionContext partitionContext : clusterInstanceContext.getPartitionCtxts()) {
    for (    MemberContext memberContext : partitionContext.getActiveMembers()) {
      if (isPrimaryMember(memberContext)) {
        primaryMemberListInClusterInstance.add(memberContext.getMemberId());
      }
    }
    for (    MemberContext memberContext : partitionContext.getPendingMembers()) {
      if (isPrimaryMember(memberContext)) {
        primaryMemberListInClusterInstance.add(memberContext.getMemberId());
      }
    }
  }
  float requiredInstanceCount=clusterInstanceContext.getMinInstanceCount() * scalingFactorBasedOnDependencies;
  int roundedRequiredInstanceCount=getRoundedInstanceCount(requiredInstanceCount,vmClusterContext.getAutoscalePolicy().getInstanceRoundingFactor());
  clusterInstanceContext.setRequiredInstanceCountBasedOnDependencies(roundedRequiredInstanceCount);
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",getClusterId());
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",roundedRequiredInstanceCount);
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",clusterInstanceContext.getPartitionAlgorithm());
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",hasPrimary);
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",primaryMemberListInClusterInstance);
  dependentScaleCheckFactHandle=AutoscalerRuleEvaluator.evaluate(getDependentScaleCheckKnowledgeSession(),dependentScaleCheckFactHandle,clusterInstanceContext);
}

Fixed version (ground truth):
@Override public void onParentScalingEvent(ScalingEvent scalingEvent){
  log.info("String_Node_Str" + this.getClusterId() + "String_Node_Str"+ scalingEvent.getNetworkPartitionId()+ "String_Node_Str"+ scalingEvent.getId()+ "String_Node_Str"+ scalingEvent.getInstanceId()+ "String_Node_Str"+ scalingEvent.getFactor());
  float scalingFactorBasedOnDependencies=scalingFactorBasedOnDependencies=scalingEvent.getFactor();
  ClusterContext vmClusterContext=(ClusterContext)clusterContext;
  String instanceId=scalingEvent.getInstanceId();
  ClusterInstanceContext clusterInstanceContext=getClusterInstanceContext(scalingEvent.getNetworkPartitionId(),instanceId);
  List<String> primaryMemberListInClusterInstance=new ArrayList<String>();
  for (  ClusterLevelPartitionContext partitionContext : clusterInstanceContext.getPartitionCtxts()) {
    for (    MemberContext memberContext : partitionContext.getActiveMembers()) {
      if (isPrimaryMember(memberContext)) {
        primaryMemberListInClusterInstance.add(memberContext.getMemberId());
      }
    }
    for (    MemberContext memberContext : partitionContext.getPendingMembers()) {
      if (isPrimaryMember(memberContext)) {
        primaryMemberListInClusterInstance.add(memberContext.getMemberId());
      }
    }
  }
  float requiredInstanceCount=clusterInstanceContext.getMinInstanceCount() * scalingFactorBasedOnDependencies;
  int roundedRequiredInstanceCount=getRoundedInstanceCount(requiredInstanceCount,vmClusterContext.getAutoscalePolicy().getInstanceRoundingFactor());
  clusterInstanceContext.setRequiredInstanceCountBasedOnDependencies(roundedRequiredInstanceCount);
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",getClusterId());
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",roundedRequiredInstanceCount);
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",clusterInstanceContext.getPartitionAlgorithm());
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",hasPrimary);
  getDependentScaleCheckKnowledgeSession().setGlobal("String_Node_Str",primaryMemberListInClusterInstance);
  dependentScaleCheckFactHandle=AutoscalerRuleEvaluator.evaluate(getDependentScaleCheckKnowledgeSession(),dependentScaleCheckFactHandle,clusterInstanceContext);
}