Program: 114802
Project: 114802
Buggy source:
@BeforeTest(alwaysRun=true) public void startDeployingWebAPPs() throws Exception {
  super.init();
  String testArtifactPath=TestConfigurationProvider.getResourceLocation() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator;
  String testArtifactWarFilePath=testArtifactPath + "String_Node_Str" + File.separator;
  String APIStatusMonitorWebAppSourcePath=testArtifactPath + "String_Node_Str" + File.separator+ APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME+ "String_Node_Str";
  String APIImportExportWebAppSourcePath=testArtifactPath + "String_Node_Str" + File.separator+ APIMIntegrationConstants.AM_IMPORT_EXPORT_WEB_APP_NAME+ "String_Node_Str";
  String gatewayMgtSessionId=createSession(gatewayContextMgt);
  String publisherSessionId=createSession(publisherContext);
  WebAppAdminClient webAppAdminClient=new WebAppAdminClient(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId);
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.PRODEP1_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.PRODEP2_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.PRODEP3_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.SANDBOXEP1_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.SANDBOXEP2_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.SANDBOXEP3_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(APIStatusMonitorWebAppSourcePath);
  WebAppAdminClient webAppAdminClientForPublisher=new WebAppAdminClient(getPublisherURLHttps(),publisherSessionId);
  webAppAdminClientForPublisher.uploadWarFile(APIImportExportWebAppSourcePath);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.PRODEP1_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.PRODEP2_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.PRODEP3_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.SANDBOXEP1_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.SANDBOXEP2_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.SANDBOXEP3_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(publisherContext.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.AM_IMPORT_EXPORT_WEB_APP_NAME);
  WebAppDeploymentUtil.isMonitoringAppDeployed(gatewayContextWrk.getContextUrls().getWebAppURL());
}

Fixed version (ground truth):
@BeforeTest(alwaysRun=true) public void startDeployingWebAPPs() throws Exception {
  super.init();
  String testArtifactPath=TestConfigurationProvider.getResourceLocation() + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"+ File.separator;
  String testArtifactWarFilePath=testArtifactPath + "String_Node_Str" + File.separator;
  String APIStatusMonitorWebAppSourcePath=testArtifactPath + "String_Node_Str" + File.separator+ APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME+ "String_Node_Str";
  String APIImportExportWebAppSourcePath=testArtifactPath + "String_Node_Str" + File.separator+ APIMIntegrationConstants.AM_IMPORT_EXPORT_WEB_APP_NAME+ "String_Node_Str";
  String gatewayMgtSessionId=createSession(gatewayContextMgt);
  String publisherSessionId=createSession(publisherContext);
  WebAppAdminClient webAppAdminClient=new WebAppAdminClient(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId);
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.PRODEP1_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.PRODEP2_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.PRODEP3_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.SANDBOXEP1_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.SANDBOXEP2_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(testArtifactWarFilePath + APIMIntegrationConstants.SANDBOXEP3_WEB_APP_NAME + "String_Node_Str");
  webAppAdminClient.uploadWarFile(APIStatusMonitorWebAppSourcePath);
  WebAppAdminClient webAppAdminClientForPublisher=new WebAppAdminClient(publisherContext.getContextUrls().getBackEndUrl(),publisherSessionId);
  webAppAdminClientForPublisher.uploadWarFile(APIImportExportWebAppSourcePath);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.JAXRS_BASIC_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.PRODEP1_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.PRODEP2_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.PRODEP3_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.SANDBOXEP1_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.SANDBOXEP2_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.SANDBOXEP3_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(gatewayContextMgt.getContextUrls().getBackEndUrl(),gatewayMgtSessionId,APIMIntegrationConstants.AM_MONITORING_WEB_APP_NAME);
  WebAppDeploymentUtil.isWebApplicationDeployed(publisherContext.getContextUrls().getBackEndUrl(),publisherSessionId,APIMIntegrationConstants.AM_IMPORT_EXPORT_WEB_APP_NAME);
  WebAppDeploymentUtil.isMonitoringAppDeployed(gatewayContextWrk.getContextUrls().getWebAppURL());
}