Program: 116029
Project: 116029
Buggy source:
public static org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy convertToCCAutoscalerPojo(AutoscalePolicy autoscalePolicyBean){
  org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy=new org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy();
  autoscalePolicy.setId(autoscalePolicyBean.getId());
  autoscalePolicy.setDescription(autoscalePolicyBean.getDescription());
  autoscalePolicy.setIsPublic(autoscalePolicyBean.getIsPublic());
  autoscalePolicy.setDisplayName(autoscalePolicyBean.getDisplayName());
  autoscalePolicy.setInstanceRoundingFactor(autoscalePolicyBean.getInstanceRoundingFactor());
  if (autoscalePolicyBean.getLoadThresholds() != null) {
    org.apache.stratos.autoscaler.stub.autoscale.policy.LoadThresholds loadThresholds=new org.apache.stratos.autoscaler.stub.autoscale.policy.LoadThresholds();
    if (autoscalePolicyBean.getLoadThresholds().getLoadAverage() != null) {
      loadThresholds.setMemoryConsumptionThreshold(autoscalePolicyBean.getLoadThresholds().getLoadAverage().getThreshold());
    }
    if (autoscalePolicyBean.getLoadThresholds().getRequestsInFlight() != null) {
      loadThresholds.setRequestsInFlightThreshold(autoscalePolicyBean.getLoadThresholds().getRequestsInFlight().getThreshold());
    }
    if (autoscalePolicyBean.getLoadThresholds().getMemoryConsumption() != null) {
      loadThresholds.setMemoryConsumptionThreshold(autoscalePolicyBean.getLoadThresholds().getMemoryConsumption().getThreshold());
    }
    autoscalePolicy.setLoadThresholds(loadThresholds);
  }
  return autoscalePolicy;
}

Fixed version (ground truth):
public static org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy convertToCCAutoscalerPojo(AutoscalePolicy autoscalePolicyBean){
  org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy autoscalePolicy=new org.apache.stratos.autoscaler.stub.autoscale.policy.AutoscalePolicy();
  autoscalePolicy.setId(autoscalePolicyBean.getId());
  autoscalePolicy.setDescription(autoscalePolicyBean.getDescription());
  autoscalePolicy.setIsPublic(autoscalePolicyBean.getIsPublic());
  autoscalePolicy.setDisplayName(autoscalePolicyBean.getDisplayName());
  autoscalePolicy.setInstanceRoundingFactor(autoscalePolicyBean.getInstanceRoundingFactor());
  if (autoscalePolicyBean.getLoadThresholds() != null) {
    org.apache.stratos.autoscaler.stub.autoscale.policy.LoadThresholds loadThresholds=new org.apache.stratos.autoscaler.stub.autoscale.policy.LoadThresholds();
    if (autoscalePolicyBean.getLoadThresholds().getLoadAverage() != null) {
      loadThresholds.setLoadAverageThreshold(autoscalePolicyBean.getLoadThresholds().getLoadAverage().getThreshold());
    }
    if (autoscalePolicyBean.getLoadThresholds().getRequestsInFlight() != null) {
      loadThresholds.setRequestsInFlightThreshold(autoscalePolicyBean.getLoadThresholds().getRequestsInFlight().getThreshold());
    }
    if (autoscalePolicyBean.getLoadThresholds().getMemoryConsumption() != null) {
      loadThresholds.setMemoryConsumptionThreshold(autoscalePolicyBean.getLoadThresholds().getMemoryConsumption().getThreshold());
    }
    autoscalePolicy.setLoadThresholds(loadThresholds);
  }
  return autoscalePolicy;
}