Program: 115513
Project: 115513
Buggy source:
@Test public void testDeployApplication(){
  try {
    initializeApplicationEventReceiver();
    initializeTopologyEventReceiver();
    boolean addedScalingPolicy=autoscalingPolicyTest.addAutoscalingPolicy("String_Node_Str",endpoint,restClient,"String_Node_Str","String_Node_Str");
    assertEquals(addedScalingPolicy,true);
    boolean addedC1=cartridgeTest.addCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(addedC1,true);
    boolean addedC2=cartridgeTest.addCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(addedC2,true);
    boolean addedC3=cartridgeTest.addCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(addedC3,true);
    boolean addedG1=cartridgeGroupTest.addCartridgeGroup("String_Node_Str",endpoint,restClient);
    assertEquals(addedG1,true);
    CartridgeGroupBean beanG1=cartridgeGroupTest.getCartridgeGroup("String_Node_Str",endpoint,restClient);
    assertEquals(beanG1.getName(),"String_Node_Str");
    boolean addedN1=networkPartitionTest.addNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(addedN1,true);
    boolean addedN2=networkPartitionTest.addNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(addedN2,true);
    boolean addedDep=deploymentPolicyTest.addDeploymentPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(addedDep,true);
    boolean added=applicationTest.addApplication("String_Node_Str",endpoint,restClient);
    assertEquals(added,true);
    ApplicationBean bean=applicationTest.getApplication("String_Node_Str",endpoint,restClient);
    assertEquals(bean.getApplicationId(),"String_Node_Str");
    boolean addAppPolicy=applicationPolicyTest.addApplicationPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(addAppPolicy,true);
    ApplicationPolicyBean policyBean=applicationPolicyTest.getApplicationPolicy("String_Node_Str",endpoint,restClient);
    boolean deployed=applicationTest.deployApplication(bean.getApplicationId(),policyBean.getId(),endpoint,restClient);
    assertEquals(deployed,true);
    assertApplicationActivation(bean.getApplicationUuid());
    assertGroupActivation(bean.getApplicationUuid());
    assertClusterActivation(bean.getApplicationUuid());
    boolean unDeployed=applicationTest.undeployApplication("String_Node_Str",endpoint,restClient);
    assertEquals(unDeployed,true);
    assertApplicationUndeploy(bean.getApplicationUuid());
    boolean removed=applicationTest.removeApplication("String_Node_Str",endpoint,restClient);
    assertEquals(removed,true);
    ApplicationBean beanRemoved=applicationTest.getApplication("String_Node_Str",endpoint,restClient);
    assertEquals(beanRemoved,null);
    boolean removedGroup=cartridgeGroupTest.removeCartridgeGroup("String_Node_Str",endpoint,restClient);
    assertEquals(removedGroup,true);
    boolean removedC1=cartridgeTest.removeCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(removedC1,true);
    boolean removedC2=cartridgeTest.removeCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(removedC2,true);
    boolean removedC3=cartridgeTest.removeCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(removedC3,true);
    boolean removedAuto=autoscalingPolicyTest.removeAutoscalingPolicy("String_Node_Str",endpoint,restClient,"String_Node_Str","String_Node_Str");
    assertEquals(removedAuto,true);
    boolean removedDep=deploymentPolicyTest.removeDeploymentPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(removedDep,true);
    boolean removedNet=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedNet,false);
    boolean removedN2=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedN2,false);
    boolean removeAppPolicy=applicationPolicyTest.removeApplicationPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(removeAppPolicy,true);
    removedNet=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedNet,true);
    removedN2=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedN2,true);
  }
 catch (  Exception e) {
    log.error(e);
    assertTrue("String_Node_Str",false);
  }
}

Fixed version (ground truth):
@Test public void testDeployApplication(){
  try {
    initializeApplicationEventReceiver();
    initializeTopologyEventReceiver();
    boolean addedScalingPolicy=autoscalingPolicyTest.addAutoscalingPolicy("String_Node_Str",endpoint,restClient,"String_Node_Str","String_Node_Str");
    assertEquals(addedScalingPolicy,true);
    boolean addedC1=cartridgeTest.addCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(addedC1,true);
    boolean addedC2=cartridgeTest.addCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(addedC2,true);
    boolean addedC3=cartridgeTest.addCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(addedC3,true);
    boolean addedG1=cartridgeGroupTest.addCartridgeGroup("String_Node_Str",endpoint,restClient);
    assertEquals(addedG1,true);
    CartridgeGroupBean beanG1=cartridgeGroupTest.getCartridgeGroup("String_Node_Str",endpoint,restClient);
    assertEquals(beanG1.getName(),"String_Node_Str");
    boolean addedN1=networkPartitionTest.addNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(addedN1,true);
    boolean addedN2=networkPartitionTest.addNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(addedN2,true);
    boolean addedDep=deploymentPolicyTest.addDeploymentPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(addedDep,true);
    boolean added=applicationTest.addApplication("String_Node_Str",endpoint,restClient);
    assertEquals(added,true);
    ApplicationBean bean=applicationTest.getApplication("String_Node_Str",endpoint,restClient);
    assertEquals(bean.getApplicationId(),"String_Node_Str");
    boolean addAppPolicy=applicationPolicyTest.addApplicationPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(addAppPolicy,true);
    ApplicationPolicyBean policyBean=applicationPolicyTest.getApplicationPolicy("String_Node_Str",endpoint,restClient);
    boolean deployed=applicationTest.deployApplication(bean.getApplicationId(),policyBean.getId(),endpoint,restClient);
    assertEquals(deployed,true);
    assertApplicationActivation("String_Node_Str",-1234);
    assertGroupActivation("String_Node_Str",-1234);
    assertClusterActivation("String_Node_Str",-1234);
    boolean unDeployed=applicationTest.undeployApplication("String_Node_Str",endpoint,restClient);
    assertEquals(unDeployed,true);
    assertApplicationUndeploy("String_Node_Str",-1234);
    boolean removed=applicationTest.removeApplication("String_Node_Str",endpoint,restClient);
    assertEquals(removed,true);
    ApplicationBean beanRemoved=applicationTest.getApplication("String_Node_Str",endpoint,restClient);
    assertEquals(beanRemoved,null);
    boolean removedGroup=cartridgeGroupTest.removeCartridgeGroup("String_Node_Str",endpoint,restClient);
    assertEquals(removedGroup,true);
    boolean removedC1=cartridgeTest.removeCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(removedC1,true);
    boolean removedC2=cartridgeTest.removeCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(removedC2,true);
    boolean removedC3=cartridgeTest.removeCartridge("String_Node_Str",endpoint,restClient);
    assertEquals(removedC3,true);
    boolean removedAuto=autoscalingPolicyTest.removeAutoscalingPolicy("String_Node_Str",endpoint,restClient,"String_Node_Str","String_Node_Str");
    assertEquals(removedAuto,true);
    boolean removedDep=deploymentPolicyTest.removeDeploymentPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(removedDep,true);
    boolean removedNet=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedNet,false);
    boolean removedN2=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedN2,false);
    boolean removeAppPolicy=applicationPolicyTest.removeApplicationPolicy("String_Node_Str",endpoint,restClient);
    assertEquals(removeAppPolicy,true);
    removedNet=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedNet,true);
    removedN2=networkPartitionTest.removeNetworkPartition("String_Node_Str",endpoint,restClient);
    assertEquals(removedN2,true);
  }
 catch (  Exception e) {
    log.error(e);
    assertTrue("String_Node_Str",false);
  }
}