Program: 115519
Project: 115519
Buggy source:
@Test public void testAutoscalingPolicy(){
  log.info("String_Node_Str");
  String policyId="String_Node_Str";
  try {
    boolean added=restClient.addEntity(RestConstants.AUTOSCALING_POLICIES_PATH + "String_Node_Str" + policyId+ "String_Node_Str",RestConstants.AUTOSCALING_POLICIES,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),added,true);
    AutoscalePolicyBean bean=(AutoscalePolicyBean)restClient.getEntity(RestConstants.AUTOSCALING_POLICIES,policyId,AutoscalePolicyBean.class,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",bean.getId()),bean.getId(),policyId);
    assertEquals(String.format("String_Node_Str",policyId),bean.getLoadThresholds().getRequestsInFlight().getThreshold(),35.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),bean.getLoadThresholds().getMemoryConsumption().getThreshold(),45.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),bean.getLoadThresholds().getLoadAverage().getThreshold(),25.0,0.0);
    boolean updated=restClient.updateEntity(RestConstants.AUTOSCALING_POLICIES_PATH + "String_Node_Str" + policyId+ "String_Node_Str",RestConstants.AUTOSCALING_POLICIES,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),updated,true);
    AutoscalePolicyBean updatedBean=(AutoscalePolicyBean)restClient.getEntity(RestConstants.AUTOSCALING_POLICIES,policyId,AutoscalePolicyBean.class,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),updatedBean.getLoadThresholds().getRequestsInFlight().getThreshold(),30.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),updatedBean.getLoadThresholds().getMemoryConsumption().getThreshold(),40.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),updatedBean.getLoadThresholds().getLoadAverage().getThreshold(),20.0,0.0);
    boolean removed=restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,policyId,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),removed,true);
    AutoscalePolicyBean beanRemoved=(AutoscalePolicyBean)restClient.getEntity(RestConstants.AUTOSCALING_POLICIES,policyId,AutoscalePolicyBean.class,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),beanRemoved,null);
    log.info("String_Node_Str");
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + policyId,e);
    assertTrue("String_Node_Str" + policyId,false);
  }
}

Fixed version (ground truth):
@Test public void testAutoscalingPolicy(){
  log.info("String_Node_Str");
  String policyId="String_Node_Str";
  try {
    boolean added=restClient.addEntity(TEST_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "String_Node_Str"+ policyId+ "String_Node_Str",RestConstants.AUTOSCALING_POLICIES,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),added,true);
    AutoscalePolicyBean bean=(AutoscalePolicyBean)restClient.getEntity(RestConstants.AUTOSCALING_POLICIES,policyId,AutoscalePolicyBean.class,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",bean.getId()),bean.getId(),policyId);
    assertEquals(String.format("String_Node_Str",policyId),bean.getLoadThresholds().getRequestsInFlight().getThreshold(),35.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),bean.getLoadThresholds().getMemoryConsumption().getThreshold(),45.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),bean.getLoadThresholds().getLoadAverage().getThreshold(),25.0,0.0);
    boolean updated=restClient.updateEntity(TEST_PATH + RestConstants.AUTOSCALING_POLICIES_PATH + "String_Node_Str"+ policyId+ "String_Node_Str",RestConstants.AUTOSCALING_POLICIES,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),updated,true);
    AutoscalePolicyBean updatedBean=(AutoscalePolicyBean)restClient.getEntity(RestConstants.AUTOSCALING_POLICIES,policyId,AutoscalePolicyBean.class,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),updatedBean.getLoadThresholds().getRequestsInFlight().getThreshold(),30.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),updatedBean.getLoadThresholds().getMemoryConsumption().getThreshold(),40.0,0.0);
    assertEquals(String.format("String_Node_Str",policyId),updatedBean.getLoadThresholds().getLoadAverage().getThreshold(),20.0,0.0);
    boolean removed=restClient.removeEntity(RestConstants.AUTOSCALING_POLICIES,policyId,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),removed,true);
    AutoscalePolicyBean beanRemoved=(AutoscalePolicyBean)restClient.getEntity(RestConstants.AUTOSCALING_POLICIES,policyId,AutoscalePolicyBean.class,RestConstants.AUTOSCALING_POLICIES_NAME);
    assertEquals(String.format("String_Node_Str",policyId),beanRemoved,null);
    log.info("String_Node_Str");
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + policyId,e);
    assertTrue("String_Node_Str" + policyId,false);
  }
}