Program: 114910
Project: 114910
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void testInvokingWithGoldTier() throws Exception {
  applicationNameGold=APPLICATION_NAME + TIER_GOLD;
  apiStoreClientUser1.addApplication(applicationNameGold,APIMIntegrationConstants.APPLICATION_TIER.LARGE,"String_Node_Str","String_Node_Str");
  apiCreationRequestBean=new APICreationRequestBean(API_NAME,API_CONTEXT,API_VERSION_1_0_0,providerName,new URL(apiEndPointUrl));
  apiCreationRequestBean.setTags(API_TAGS);
  apiCreationRequestBean.setDescription(API_DESCRIPTION);
  apiCreationRequestBean.setTier(TIER_GOLD);
  createPublishAndSubscribeToAPI(apiIdentifier,apiCreationRequestBean,apiPublisherClientUser1,apiStoreClientUser1,applicationNameGold);
  waitForAPIDeploymentSync(user.getUserName(),API_NAME,API_VERSION_1_0_0,APIMIntegrationConstants.IS_API_EXISTS);
  String accessToken=generateApplicationKeys(apiStoreClientUser1,applicationNameGold).getAccessToken();
  requestHeadersGoldTier=new HashMap<String,String>();
  requestHeadersGoldTier.put("String_Node_Str","String_Node_Str" + accessToken);
  requestHeadersGoldTier.put("String_Node_Str","String_Node_Str");
  long startTime=System.currentTimeMillis();
  long currentTime;
  for (int invocationCount=1; invocationCount <= GOLD_INVOCATION_LIMIT_PER_MIN; invocationCount++) {
    currentTime=System.currentTimeMillis();
    HttpResponse invokeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION_1_0_0) + "String_Node_Str" + API_END_POINT_METHOD,requestHeadersGoldTier);
    assertEquals(invokeResponse.getResponseCode(),HTTP_RESPONSE_CODE_OK,"String_Node_Str" + invocationCount + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
    assertTrue(invokeResponse.getData().contains(API_RESPONSE_DATA),"String_Node_Str" + invocationCount + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
  }
  currentTime=System.currentTimeMillis();
  HttpResponse invokeResponse;
  invokeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION_1_0_0) + "String_Node_Str" + API_END_POINT_METHOD,requestHeadersGoldTier);
  if (executionMode.equalsIgnoreCase(String.valueOf(ExecutionEnvironment.PLATFORM))) {
    invokeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION_1_0_0) + "String_Node_Str" + API_END_POINT_METHOD,requestHeadersGoldTier);
  }
  assertEquals(invokeResponse.getResponseCode(),HTTP_RESPONSE_CODE_TOO_MANY_REQUESTS,"String_Node_Str" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
  assertTrue(invokeResponse.getData().contains(MESSAGE_THROTTLED_OUT),"String_Node_Str" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str") public void testInvokingWithGoldTier() throws Exception {
  applicationNameGold=APPLICATION_NAME + TIER_GOLD;
  apiStoreClientUser1.addApplication(applicationNameGold,APIMIntegrationConstants.APPLICATION_TIER.UNLIMITED,"String_Node_Str","String_Node_Str");
  apiCreationRequestBean=new APICreationRequestBean(API_NAME,API_CONTEXT,API_VERSION_1_0_0,providerName,new URL(apiEndPointUrl));
  apiCreationRequestBean.setTags(API_TAGS);
  apiCreationRequestBean.setDescription(API_DESCRIPTION);
  apiCreationRequestBean.setTier(TIER_GOLD);
  createPublishAndSubscribeToAPI(apiIdentifier,apiCreationRequestBean,apiPublisherClientUser1,apiStoreClientUser1,applicationNameGold);
  waitForAPIDeploymentSync(user.getUserName(),API_NAME,API_VERSION_1_0_0,APIMIntegrationConstants.IS_API_EXISTS);
  String accessToken=generateApplicationKeys(apiStoreClientUser1,applicationNameGold).getAccessToken();
  requestHeadersGoldTier=new HashMap<String,String>();
  requestHeadersGoldTier.put("String_Node_Str","String_Node_Str" + accessToken);
  requestHeadersGoldTier.put("String_Node_Str","String_Node_Str");
  long startTime=System.currentTimeMillis();
  long currentTime;
  for (int invocationCount=1; invocationCount <= GOLD_INVOCATION_LIMIT_PER_MIN; invocationCount++) {
    currentTime=System.currentTimeMillis();
    HttpResponse invokeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION_1_0_0) + "String_Node_Str" + API_END_POINT_METHOD,requestHeadersGoldTier);
    assertEquals(invokeResponse.getResponseCode(),HTTP_RESPONSE_CODE_OK,"String_Node_Str" + invocationCount + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
    assertTrue(invokeResponse.getData().contains(API_RESPONSE_DATA),"String_Node_Str" + invocationCount + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
  }
  currentTime=System.currentTimeMillis();
  HttpResponse invokeResponse;
  invokeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION_1_0_0) + "String_Node_Str" + API_END_POINT_METHOD,requestHeadersGoldTier);
  if (executionMode.equalsIgnoreCase(String.valueOf(ExecutionEnvironment.PLATFORM))) {
    invokeResponse=HttpRequestUtil.doGet(getAPIInvocationURLHttp(API_CONTEXT,API_VERSION_1_0_0) + "String_Node_Str" + API_END_POINT_METHOD,requestHeadersGoldTier);
  }
  assertEquals(invokeResponse.getResponseCode(),HTTP_RESPONSE_CODE_TOO_MANY_REQUESTS,"String_Node_Str" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
  assertTrue(invokeResponse.getData().contains(MESSAGE_THROTTLED_OUT),"String_Node_Str" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + "String_Node_Str"+ (currentTime - startTime)+ "String_Node_Str");
}