Program: 114968
Project: 114968
Buggy source:
/** 
 * update synapse config to server
 * @param synapseConfig     - config to upload
 * @param automationContext - automation context of the server instance
 * @param sessionCookie     -  logged in session cookie
 * @throws APIManagerIntegrationTestException - If synapse config update fails
 */
protected void updateSynapseConfiguration(OMElement synapseConfig,AutomationContext automationContext,String sessionCookie) throws APIManagerIntegrationTestException {
  if (synapseConfiguration == null) {
    synapseConfiguration=synapseConfig;
  }
 else {
    Iterator<OMElement> itr=synapseConfig.cloneOMElement().getChildElements();
    while (itr.hasNext()) {
      synapseConfiguration.addChild(itr.next());
    }
  }
  try {
    apimTestCaseUtils.updateAPIMConfiguration(synapseConfig,automationContext.getContextUrls().getBackEndUrl(),sessionCookie);
    if (automationContext.getProductGroup().isClusterEnabled()) {
      long deploymentDelay=Long.parseLong(automationContext.getConfigurationValue("String_Node_Str"));
      Thread.sleep(deploymentDelay);
      Iterator<OMElement> proxies=synapseConfig.getChildrenWithLocalName("String_Node_Str");
      while (proxies.hasNext()) {
        String proxy=proxies.next().getAttributeValue(new QName("String_Node_Str"));
        assertTrue(isProxyWSDlExist(getProxyServiceURLHttp(proxy),deploymentDelay),"String_Node_Str");
        assertTrue(isProxyWSDlExist(getProxyServiceURLHttp(proxy),deploymentDelay),"String_Node_Str");
        assertTrue(isProxyWSDlExist(getProxyServiceURLHttp(proxy),deploymentDelay),"String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    throw new APIManagerIntegrationTestException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * update synapse config to server
 * @param synapseConfig     - config to upload
 * @param automationContext - automation context of the server instance
 * @param sessionCookie     -  logged in session cookie
 * @throws APIManagerIntegrationTestException - If synapse config update fails
 */
protected void updateSynapseConfiguration(OMElement synapseConfig,AutomationContext automationContext,String sessionCookie) throws APIManagerIntegrationTestException {
  if (synapseConfiguration == null) {
    synapseConfiguration=synapseConfig;
  }
 else {
    Iterator<OMElement> itr=synapseConfig.cloneOMElement().getChildElements();
    while (itr.hasNext()) {
      synapseConfiguration.addChild(itr.next());
    }
  }
  try {
    apimTestCaseUtils.updateSynapseConfiguration(synapseConfig,automationContext.getContextUrls().getBackEndUrl(),sessionCookie);
    if (automationContext.getProductGroup().isClusterEnabled()) {
      long deploymentDelay=Long.parseLong(automationContext.getConfigurationValue("String_Node_Str"));
      Thread.sleep(deploymentDelay);
      Iterator<OMElement> proxies=synapseConfig.getChildrenWithLocalName("String_Node_Str");
      while (proxies.hasNext()) {
        String proxy=proxies.next().getAttributeValue(new QName("String_Node_Str"));
        assertTrue(isProxyWSDlExist(getProxyServiceURLHttp(proxy),deploymentDelay),"String_Node_Str");
        assertTrue(isProxyWSDlExist(getProxyServiceURLHttp(proxy),deploymentDelay),"String_Node_Str");
        assertTrue(isProxyWSDlExist(getProxyServiceURLHttp(proxy),deploymentDelay),"String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    throw new APIManagerIntegrationTestException("String_Node_Str",e);
  }
}