Program: 114813
Project: 114813
Buggy source:
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testApiInvocationAndStatLoadingTest() throws Exception {
  HttpResponse serviceResponse=apiStore.addApplication(APP_NAME,APIThrottlingTier.UNLIMITED.getState(),"String_Node_Str","String_Node_Str");
  verifyResponse(serviceResponse);
  SubscriptionRequest subscriptionRequest=new SubscriptionRequest(API_NAME,user.getUserName());
  subscriptionRequest.setApplicationName(APP_NAME);
  subscriptionRequest.setTier(APIMIntegrationConstants.API_TIER.UNLIMITED);
  serviceResponse=apiStore.subscribe(subscriptionRequest);
  verifyResponse(serviceResponse);
  APPKeyRequestGenerator generateAppKeyRequest=new APPKeyRequestGenerator(APP_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.put(APIMIntegrationConstants.AUTHORIZATION_HEADER,"String_Node_Str" + accessToken);
  String invokeURL=getAPIInvocationURLHttp(API_CONTEXT,API_VERSION);
  serviceResponse=HttpRequestUtil.doGet(invokeURL + "String_Node_Str",requestHeaders);
  Assert.assertEquals(HttpStatus.SC_OK,serviceResponse.getResponseCode(),"String_Node_Str");
  Map<String,String> headers=new HashMap<String,String>();
  headers.put("String_Node_Str",apiStore.getSession());
  executeScript();
  SimpleDateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  Calendar calender=Calendar.getInstance();
  calender.set(Calendar.DATE,calender.get(Calendar.DATE) - 1);
  String fromDate=dateFormat.format(calender.getTime());
  calender.set(Calendar.DATE,calender.get(Calendar.DATE) + 2);
  String toDate=dateFormat.format(calender.getTime());
  List<NameValuePair> urlParameters=new ArrayList<NameValuePair>();
  urlParameters.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  urlParameters.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  urlParameters.add(new BasicNameValuePair("String_Node_Str",fromDate));
  urlParameters.add(new BasicNameValuePair("String_Node_Str",toDate));
  String url=backEndServerUrl.getWebAppURLHttp() + API_STORE_STAT_URL;
  HttpResponse res=HTTPSClientUtils.doPost(url,headers,urlParameters);
  verifyResponse(res);
  Assert.assertTrue(res.getData().contains(API_NAME),"String_Node_Str");
}

Fixed version (ground truth):
@Test(groups={"String_Node_Str"},description="String_Node_Str",dependsOnMethods="String_Node_Str") public void testApiInvocationAndStatLoadingTest() throws Exception {
  HttpResponse serviceResponse=apiStore.addApplication(APP_NAME,APIThrottlingTier.UNLIMITED.getState(),"String_Node_Str","String_Node_Str");
  verifyResponse(serviceResponse);
  SubscriptionRequest subscriptionRequest=new SubscriptionRequest(API_NAME,user.getUserName());
  subscriptionRequest.setApplicationName(APP_NAME);
  subscriptionRequest.setTier(APIMIntegrationConstants.API_TIER.UNLIMITED);
  serviceResponse=apiStore.subscribe(subscriptionRequest);
  verifyResponse(serviceResponse);
  APPKeyRequestGenerator generateAppKeyRequest=new APPKeyRequestGenerator(APP_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.put(APIMIntegrationConstants.AUTHORIZATION_HEADER,"String_Node_Str" + accessToken);
  String invokeURL=getAPIInvocationURLHttp(API_CONTEXT,API_VERSION);
  serviceResponse=HTTPSClientUtils.doGet(invokeURL + "String_Node_Str",requestHeaders);
  Assert.assertEquals(HttpStatus.SC_OK,serviceResponse.getResponseCode(),"String_Node_Str");
  Map<String,String> headers=new HashMap<String,String>();
  headers.put("String_Node_Str",apiStore.getSession());
  executeScript();
  SimpleDateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  Calendar calender=Calendar.getInstance();
  calender.set(Calendar.DATE,calender.get(Calendar.DATE) - 1);
  String fromDate=dateFormat.format(calender.getTime());
  calender.set(Calendar.DATE,calender.get(Calendar.DATE) + 2);
  String toDate=dateFormat.format(calender.getTime());
  List<NameValuePair> urlParameters=new ArrayList<NameValuePair>();
  urlParameters.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  urlParameters.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  urlParameters.add(new BasicNameValuePair("String_Node_Str",fromDate));
  urlParameters.add(new BasicNameValuePair("String_Node_Str",toDate));
  String url=backEndServerUrl.getWebAppURLHttp() + API_STORE_STAT_URL;
  HttpResponse res=HTTPSClientUtils.doPost(url,headers,urlParameters);
  verifyResponse(res);
  Assert.assertTrue(res.getData().contains(API_NAME),"String_Node_Str");
}