Program: 114920
Project: 114920
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void APIInvocationFailureForSuperTenant() throws Exception {
  String APIName="String_Node_Str";
  String APIContext="String_Node_Str";
  String tags="String_Node_Str";
  String url="String_Node_Str";
  String description="String_Node_Str";
  String providerName=publisherContext.getContextTenant().getTenantAdmin().getUserName();
  String APIVersion="String_Node_Str";
  APIPublisherRestClient apiPublisher=new APIPublisherRestClient(publisherURLHttp);
  apiPublisher.login(publisherContext.getContextTenant().getTenantAdmin().getUserName(),publisherContext.getContextTenant().getTenantAdmin().getPassword());
  APIRequest apiRequest=new APIRequest(APIName,APIContext,new URL(url));
  apiRequest.setTags(tags);
  apiRequest.setDescription(description);
  apiRequest.setVersion(APIVersion);
  apiRequest.setSandbox(url);
  apiRequest.setResourceMethod("String_Node_Str");
  apiPublisher.addAPI(apiRequest);
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(APIName,providerName,APILifeCycleState.PUBLISHED);
  apiPublisher.changeAPILifeCycleStatus(updateRequest);
  Map<String,String> requestHeaders=new HashMap<String,String>();
  requestHeaders.put("String_Node_Str","String_Node_Str");
  waitForAPIDeploymentSync(apiRequest.getProvider(),apiRequest.getName(),apiRequest.getVersion(),APIMIntegrationConstants.IS_API_EXISTS);
  HttpResponse youTubeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(APIContext,APIVersion) + "String_Node_Str",requestHeaders);
  assertEquals(youTubeResponse.getResponseCode(),Response.Status.UNAUTHORIZED.getStatusCode(),"String_Node_Str");
  assertTrue(youTubeResponse.getData().contains("String_Node_Str"),"String_Node_Str");
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void APIInvocationFailureForSuperTenant() throws Exception {
  String APIName="String_Node_Str";
  String APIContext="String_Node_Str";
  String tags="String_Node_Str";
  String url="String_Node_Str";
  String description="String_Node_Str";
  String providerName=publisherContext.getSuperTenant().getTenantAdmin().getUserName();
  String APIVersion="String_Node_Str";
  APIPublisherRestClient apiPublisher=new APIPublisherRestClient(publisherURLHttp);
  apiPublisher.login(publisherContext.getSuperTenant().getTenantAdmin().getUserName(),publisherContext.getSuperTenant().getTenantAdmin().getPassword());
  APIRequest apiRequest=new APIRequest(APIName,APIContext,new URL(url));
  apiRequest.setTags(tags);
  apiRequest.setDescription(description);
  apiRequest.setVersion(APIVersion);
  apiRequest.setSandbox(url);
  apiRequest.setResourceMethod("String_Node_Str");
  apiPublisher.addAPI(apiRequest);
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(APIName,providerName,APILifeCycleState.PUBLISHED);
  apiPublisher.changeAPILifeCycleStatus(updateRequest);
  Map<String,String> requestHeaders=new HashMap<String,String>();
  requestHeaders.put("String_Node_Str","String_Node_Str");
  waitForAPIDeploymentSync(apiRequest.getProvider(),apiRequest.getName(),apiRequest.getVersion(),APIMIntegrationConstants.IS_API_EXISTS);
  HttpResponse youTubeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(APIContext,APIVersion) + "String_Node_Str",requestHeaders);
  assertEquals(youTubeResponse.getResponseCode(),Response.Status.UNAUTHORIZED.getStatusCode(),"String_Node_Str");
  assertTrue(youTubeResponse.getData().contains("String_Node_Str"),"String_Node_Str");
}