Program: 114811
Project: 114811
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testNewAPIInvokeAfterImport() throws Exception {
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(NEW_API_NAME,user.getUserName(),APILifeCycleState.PUBLISHED);
  HttpResponse serviceResponse=apiPublisher.changeAPILifeCycleStatus(updateRequest);
  verifyResponse(serviceResponse);
  apiStore=new APIStoreRestClient(storeURLHttp);
  apiStore.login(deniedUser,String.valueOf(DENIED_USER_PASS));
  serviceResponse=apiStore.addApplication(NEW_APP_NAME,APIThrottlingTier.UNLIMITED.getState(),"String_Node_Str","String_Node_Str");
  verifyResponse(serviceResponse);
  String provider=user.getUserName();
  SubscriptionRequest subscriptionRequest=new SubscriptionRequest(NEW_API_NAME,provider);
  subscriptionRequest.setApplicationName(NEW_APP_NAME);
  subscriptionRequest.setTier(APIMIntegrationConstants.API_TIER.GOLD);
  serviceResponse=apiStore.subscribe(subscriptionRequest);
  verifyResponse(serviceResponse);
  APPKeyRequestGenerator generateAppKeyRequest=new APPKeyRequestGenerator(NEW_APP_NAME);
  generateAppKeyRequest.setTokenScope(SCOPE_NAME);
  String responseString=apiStore.generateApplicationKey(generateAppKeyRequest).getData();
  JSONObject response=new JSONObject(responseString);
  String accessToken=response.getJSONObject("String_Node_Str").getJSONObject("String_Node_Str").get("String_Node_Str").toString();
  Assert.assertNotNull("String_Node_Str" + responseString,accessToken);
  requestHeaders.clear();
  requestHeaders.put(APIMIntegrationConstants.AUTHORIZATION_HEADER,"String_Node_Str" + accessToken);
  String invokeURL=getAPIInvocationURLHttp(NEW_API_CONTEXT,API_VERSION);
  serviceResponse=HttpRequestUtil.doGet(invokeURL + "String_Node_Str",requestHeaders);
  Assert.assertEquals(HttpStatus.SC_FORBIDDEN,serviceResponse.getResponseCode(),"String_Node_Str");
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testNewAPIInvokeAfterImport() throws Exception {
  APILifeCycleStateRequest updateRequest=new APILifeCycleStateRequest(NEW_API_NAME,user.getUserName(),APILifeCycleState.PUBLISHED);
  HttpResponse serviceResponse=apiPublisher.changeAPILifeCycleStatus(updateRequest);
  verifyResponse(serviceResponse);
  apiStore=new APIStoreRestClient(storeURLHttp);
  apiStore.login(deniedUser,String.valueOf(DENIED_USER_PASS));
  serviceResponse=apiStore.addApplication(NEW_APP_NAME,APIThrottlingTier.UNLIMITED.getState(),"String_Node_Str","String_Node_Str");
  verifyResponse(serviceResponse);
  String provider=user.getUserName();
  SubscriptionRequest subscriptionRequest=new SubscriptionRequest(NEW_API_NAME,provider);
  subscriptionRequest.setApplicationName(NEW_APP_NAME);
  subscriptionRequest.setTier(APIMIntegrationConstants.API_TIER.GOLD);
  serviceResponse=apiStore.subscribe(subscriptionRequest);
  verifyResponse(serviceResponse);
  APPKeyRequestGenerator generateAppKeyRequest=new APPKeyRequestGenerator(NEW_APP_NAME);
  generateAppKeyRequest.setTokenScope(SCOPE_NAME);
  String responseString=apiStore.generateApplicationKey(generateAppKeyRequest).getData();
  JSONObject response=new JSONObject(responseString);
  String accessToken=response.getJSONObject("String_Node_Str").getJSONObject("String_Node_Str").get("String_Node_Str").toString();
  Assert.assertNotNull("String_Node_Str" + responseString,accessToken);
  requestHeaders.clear();
  requestHeaders.put(APIMIntegrationConstants.AUTHORIZATION_HEADER,"String_Node_Str" + accessToken);
  String invokeURL=getAPIInvocationURLHttp(NEW_API_CONTEXT,API_VERSION);
  serviceResponse=HTTPSClientUtils.doGet(invokeURL + "String_Node_Str",requestHeaders);
  Assert.assertEquals(HttpStatus.SC_FORBIDDEN,serviceResponse.getResponseCode(),"String_Node_Str");
}