Program: 114777
Project: 114777
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testThrottleEventTest() throws Exception {
  thriftTestServer.clearTables();
  SubscriptionRequest subscriptionRequest=new SubscriptionRequest(THROTTLE_API_NAME,user.getUserName());
  subscriptionRequest.setApplicationName(APP_NAME);
  subscriptionRequest.setTier(APIMIntegrationConstants.API_TIER.UNLIMITED);
  HttpResponse serviceResponse=apiStore.subscribe(subscriptionRequest);
  verifyResponse(serviceResponse);
  requestHeaders.put(APIMIntegrationConstants.AUTHORIZATION_HEADER,"String_Node_Str" + accessToken);
  String invokeURL=getAPIInvocationURLHttp(THROTTLE_API_CONTEXT,API_VERSION);
  for (int i=0; i < 5; i++) {
    serviceResponse=HTTPSClientUtils.doGet(invokeURL + "String_Node_Str",requestHeaders);
  }
  Assert.assertNotEquals(HttpStatus.SC_OK,serviceResponse.getResponseCode(),"String_Node_Str");
  String context, apiVersion, userId;
  if (TestUserMode.SUPER_TENANT_ADMIN == userMode) {
    userId=user.getUserName() + "String_Node_Str" + user.getUserDomain();
    context="String_Node_Str" + THROTTLE_API_CONTEXT + "String_Node_Str"+ API_VERSION;
    apiVersion=user.getUserName() + "String_Node_Str" + THROTTLE_API_NAME+ "String_Node_Str"+ API_VERSION;
  }
 else {
    userId=user.getUserName();
    context="String_Node_Str" + "String_Node_Str" + user.getUserDomain() + "String_Node_Str"+ THROTTLE_API_CONTEXT+ "String_Node_Str"+ API_VERSION;
    apiVersion=user.getUserName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str" + THROTTLE_API_NAME+ "String_Node_Str"+ API_VERSION;
  }
  Map<String,Object> map=new HashMap<String,Object>();
  map.put("String_Node_Str",accessToken);
  map.put("String_Node_Str",userId);
  map.put("String_Node_Str",user.getUserDomain());
  map.put("String_Node_Str",THROTTLE_API_NAME);
  map.put("String_Node_Str",apiVersion);
  map.put("String_Node_Str",context);
  map.put("String_Node_Str",user.getUserName());
  map.put("String_Node_Str",APP_NAME);
  map.put("String_Node_Str",user.getUserName());
  map.put("String_Node_Str","String_Node_Str");
  testThrottleEvent(map);
  thriftTestServer.clearTables();
  invokeURL=getAPIInvocationURLHttp(THROTTLE_API_CONTEXT,API_VERSION);
  for (int i=0; i < 5; i++) {
    serviceResponse=HTTPSClientUtils.doGet(invokeURL + "String_Node_Str",null);
  }
  Assert.assertNotEquals(HttpStatus.SC_OK,serviceResponse.getResponseCode(),"String_Node_Str");
  map.put("String_Node_Str",null);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str",null);
  map.put("String_Node_Str",null);
  testThrottleEvent(map);
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testThrottleEventTest() throws Exception {
  thriftTestServer.clearTables();
  SubscriptionRequest subscriptionRequest=new SubscriptionRequest(THROTTLE_API_NAME,user.getUserName());
  subscriptionRequest.setApplicationName(APP_NAME);
  subscriptionRequest.setTier(APIMIntegrationConstants.API_TIER.UNLIMITED);
  HttpResponse serviceResponse=apiStore.subscribe(subscriptionRequest);
  verifyResponse(serviceResponse);
  requestHeaders.put(APIMIntegrationConstants.AUTHORIZATION_HEADER,"String_Node_Str" + accessToken);
  String invokeURL=getAPIInvocationURLHttp(THROTTLE_API_CONTEXT,API_VERSION);
  for (int i=0; i < 3; i++) {
    serviceResponse=HTTPSClientUtils.doGet(invokeURL + "String_Node_Str",requestHeaders);
  }
  Assert.assertNotEquals(HttpStatus.SC_OK,serviceResponse.getResponseCode(),"String_Node_Str");
  String context, apiVersion, userId;
  if (TestUserMode.SUPER_TENANT_ADMIN == userMode) {
    userId=user.getUserName() + "String_Node_Str" + user.getUserDomain();
    context="String_Node_Str" + THROTTLE_API_CONTEXT + "String_Node_Str"+ API_VERSION;
    apiVersion=user.getUserName() + "String_Node_Str" + THROTTLE_API_NAME+ "String_Node_Str"+ API_VERSION;
  }
 else {
    userId=user.getUserName();
    context="String_Node_Str" + "String_Node_Str" + user.getUserDomain() + "String_Node_Str"+ THROTTLE_API_CONTEXT+ "String_Node_Str"+ API_VERSION;
    apiVersion=user.getUserName().replace("String_Node_Str","String_Node_Str") + "String_Node_Str" + THROTTLE_API_NAME+ "String_Node_Str"+ API_VERSION;
  }
  Map<String,Object> map=new HashMap<String,Object>();
  map.put("String_Node_Str",accessToken);
  map.put("String_Node_Str",userId);
  map.put("String_Node_Str",user.getUserDomain());
  map.put("String_Node_Str",THROTTLE_API_NAME);
  map.put("String_Node_Str",apiVersion);
  map.put("String_Node_Str",context);
  map.put("String_Node_Str",user.getUserName());
  map.put("String_Node_Str",APP_NAME);
  map.put("String_Node_Str",user.getUserName());
  map.put("String_Node_Str","String_Node_Str");
  testThrottleEvent(map);
  Thread.sleep(5000);
  thriftTestServer.clearTables();
  invokeURL=getAPIInvocationURLHttp(THROTTLE_API_CONTEXT,API_VERSION);
  for (int i=0; i < 3; i++) {
    serviceResponse=HTTPSClientUtils.doGet(invokeURL + "String_Node_Str",null);
  }
  Assert.assertNotEquals(HttpStatus.SC_OK,serviceResponse.getResponseCode(),"String_Node_Str");
  map.put("String_Node_Str",null);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str",null);
  map.put("String_Node_Str",null);
  testThrottleEvent(map);
}