Program: 114859
Project: 114859
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void testAPICreation() throws Exception {
  resList=new ArrayList<APIResourceBean>();
  APIResourceBean addResource=new APIResourceBean(APIMIntegrationConstants.HTTP_VERB_GET,APIMIntegrationConstants.ResourceAuthTypes.APPLICATION.getAuthType(),APIMIntegrationConstants.RESOURCE_TIER.BASIC,"String_Node_Str");
  apiCreationRequestBean=new APICreationRequestBean(API_NAME_1,API_CONTEXT_1,API_VERSION,user.getUserName(),new URL(endpointUrl));
  tags=TAG_API + "String_Node_Str" + TAG_API_1;
  apiCreationRequestBean.setTags(tags);
  apiCreationRequestBean.setDescription(DESCRIPTION);
  apiCreationRequestBean.setTiersCollection(tierCollection);
  resList.add(addResource);
  apiCreationRequestBean.setResourceBeanList(resList);
  HttpResponse serviceResponse=apiPublisher.addAPI(apiCreationRequestBean);
  verifyResponse(serviceResponse);
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(API_NAME_1,user.getUserName(),APILifeCycleState.PUBLISHED);
  serviceResponse=apiPublisher.changeAPILifeCycleStatus(updateRequest);
  verifyResponse(serviceResponse);
  apiCreationRequestBean=new APICreationRequestBean(API_NAME_2,API_CONTEXT_2,API_VERSION,user.getUserName(),new URL(endpointUrl));
  tags=TAG_API + "String_Node_Str" + TAG_API_2;
  apiCreationRequestBean.setTags(tags);
  apiCreationRequestBean.setDescription(DESCRIPTION);
  apiCreationRequestBean.setTiersCollection(tierCollection);
  resList.add(addResource);
  apiCreationRequestBean.setResourceBeanList(resList);
  serviceResponse=apiPublisher.addAPI(apiCreationRequestBean);
  verifyResponse(serviceResponse);
  updateRequest=new APILifeCycleStateRequest(API_NAME_2,user.getUserName(),APILifeCycleState.PUBLISHED);
  serviceResponse=apiPublisher.changeAPILifeCycleStatus(updateRequest);
  verifyResponse(serviceResponse);
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void testAPICreation() throws Exception {
  resList=new ArrayList<APIResourceBean>();
  APIResourceBean addResource=new APIResourceBean(APIMIntegrationConstants.HTTP_VERB_GET,APIMIntegrationConstants.ResourceAuthTypes.APPLICATION.getAuthType(),APIMIntegrationConstants.RESOURCE_TIER.BASIC,"String_Node_Str");
  apiCreationRequestBean=new APICreationRequestBean(API_NAME_1,API_CONTEXT_1,API_VERSION,user.getUserName(),new URL(endpointUrl));
  tags=TAG_API + "String_Node_Str" + TAG_API_1;
  apiCreationRequestBean.setTags(tags);
  apiCreationRequestBean.setDescription(DESCRIPTION);
  apiCreationRequestBean.setTiersCollection(tierCollection);
  resList.add(addResource);
  apiCreationRequestBean.setResourceBeanList(resList);
  HttpResponse serviceResponse=apiPublisher.addAPI(apiCreationRequestBean);
  verifyResponse(serviceResponse);
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(API_NAME_1,user.getUserName(),APILifeCycleState.PUBLISHED);
  serviceResponse=apiPublisher.changeAPILifeCycleStatus(updateRequest);
  verifyResponse(serviceResponse);
  waitForAPIDeploymentSync(user.getUserName(),API_NAME_1,API_VERSION,APIMIntegrationConstants.IS_API_EXISTS);
  apiCreationRequestBean=new APICreationRequestBean(API_NAME_2,API_CONTEXT_2,API_VERSION,user.getUserName(),new URL(endpointUrl));
  tags=TAG_API + "String_Node_Str" + TAG_API_2;
  apiCreationRequestBean.setTags(tags);
  apiCreationRequestBean.setDescription(DESCRIPTION);
  apiCreationRequestBean.setTiersCollection(tierCollection);
  resList.add(addResource);
  apiCreationRequestBean.setResourceBeanList(resList);
  serviceResponse=apiPublisher.addAPI(apiCreationRequestBean);
  verifyResponse(serviceResponse);
  updateRequest=new APILifeCycleStateRequest(API_NAME_2,user.getUserName(),APILifeCycleState.PUBLISHED);
  serviceResponse=apiPublisher.changeAPILifeCycleStatus(updateRequest);
  verifyResponse(serviceResponse);
  waitForAPIDeploymentSync(user.getUserName(),API_NAME_2,API_VERSION,APIMIntegrationConstants.IS_API_EXISTS);
}