Program: 114775
Project: 114775
Buggy source:
/** 
 * used to test Throttle event stream data
 * @throws Exception if any exception throws
 */
private void testThrottleEvent(Map<String,Object> expected) throws Exception {
  List<Event> faultTable=null;
  long currentTime=System.currentTimeMillis();
  long waitTime=currentTime + WAIT_TIME;
  while (waitTime > System.currentTimeMillis()) {
    faultTable=thriftTestServer.getDataTables().get(StreamDefinitions.APIMGT_STATISTICS_THROTTLE_STREAM_ID);
    if (faultTable == null || faultTable.isEmpty()) {
      Thread.sleep(1000);
      continue;
    }
 else {
      break;
    }
  }
  Assert.assertTrue(faultTable.size() > 0,"String_Node_Str");
  Map<String,Object> map=convertToMap(faultTable.get(0).getPayloadData(),StreamDefinitions.getStreamDefinitionThrottle());
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str"),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str"),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str"),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * used to test Throttle event stream data
 * @throws Exception if any exception throws
 */
private void testThrottleEvent(Map<String,Object> expected) throws Exception {
  List<Event> throttleTable=null;
  long currentTime=System.currentTimeMillis();
  long waitTime=currentTime + WAIT_TIME;
  while (waitTime > System.currentTimeMillis()) {
    throttleTable=thriftTestServer.getDataTables().get(StreamDefinitions.APIMGT_STATISTICS_THROTTLE_STREAM_ID);
    if (throttleTable == null || throttleTable.isEmpty()) {
      Thread.sleep(1000);
      continue;
    }
 else {
      break;
    }
  }
  Assert.assertEquals(1,throttleTable.size(),"String_Node_Str");
  Map<String,Object> map=convertToMap(throttleTable.get(0).getPayloadData(),StreamDefinitions.getStreamDefinitionThrottle());
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str"),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str"),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str"),"String_Node_Str");
  Assert.assertEquals(expected.get("String_Node_Str"),map.get("String_Node_Str").toString(),"String_Node_Str");
}