Program: 7071
Project: 7071
Buggy source:
private static void setupMetrics() throws Exception {
  MetricsCollector collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  emitTs=System.currentTimeMillis();
  TimeUnit.SECONDS.sleep(1);
  collector.increment("String_Node_Str",1);
  TimeUnit.MILLISECONDS.sleep(2000);
  collector.increment("String_Node_Str",2);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getMapReduceTaskContext("String_Node_Str","String_Node_Str","String_Node_Str",MapReduceMetrics.TaskType.Mapper,"String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getMapReduceTaskContext("String_Node_Str","String_Node_Str","String_Node_Str",MapReduceMetrics.TaskType.Reducer,"String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getAdapterContext("String_Node_Str","String_Node_Str","String_Node_Str",MapReduceMetrics.TaskType.Mapper,"String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",3);
  collector.increment("String_Node_Str",4);
  collector=collectionService.getCollector(getWorkerAdapterContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",5);
  collector.increment("String_Node_Str",6);
  Metrics userMetrics=new ProgramUserMetrics(collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")));
  userMetrics.count("String_Node_Str",1);
  userMetrics.count("String_Node_Str",2);
  collector=collectionService.getCollector(new HashMap<String,String>());
  collector.increment("String_Node_Str",10);
  collector=collectionService.getCollector(getFlowletContext(DOT_NAMESPACE,DOT_APP,DOT_FLOW,DOT_RUN,DOT_FLOWLET));
  collector.increment("String_Node_Str",55);
  TimeUnit.SECONDS.sleep(2);
}

Fixed version (ground truth):
private static void setupMetrics() throws Exception {
  MetricsCollector collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  emitTs=System.currentTimeMillis();
  TimeUnit.SECONDS.sleep(1);
  collector.increment("String_Node_Str",1);
  TimeUnit.MILLISECONDS.sleep(2000);
  collector.increment("String_Node_Str",2);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getMapReduceTaskContext("String_Node_Str","String_Node_Str","String_Node_Str",MapReduceMetrics.TaskType.Mapper,"String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getMapReduceTaskContext("String_Node_Str","String_Node_Str","String_Node_Str",MapReduceMetrics.TaskType.Reducer,"String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector.increment("String_Node_Str",1);
  collector=collectionService.getCollector(getAdapterContext("String_Node_Str","String_Node_Str","String_Node_Str",MapReduceMetrics.TaskType.Mapper,"String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",3);
  collector.increment("String_Node_Str",4);
  collector=collectionService.getCollector(getAdapterContext("String_Node_Str","String_Node_Str","String_Node_Str",MapReduceMetrics.TaskType.Mapper,"String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",3);
  collector.increment("String_Node_Str",4);
  collector=collectionService.getCollector(getWorkerAdapterContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",5);
  collector.increment("String_Node_Str",6);
  collector=collectionService.getCollector(getWorkerAdapterContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  collector.increment("String_Node_Str",5);
  collector.increment("String_Node_Str",6);
  Metrics userMetrics=new ProgramUserMetrics(collectionService.getCollector(getFlowletContext("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str")));
  userMetrics.count("String_Node_Str",1);
  userMetrics.count("String_Node_Str",2);
  collector=collectionService.getCollector(new HashMap<String,String>());
  collector.increment("String_Node_Str",10);
  collector=collectionService.getCollector(getFlowletContext(DOT_NAMESPACE,DOT_APP,DOT_FLOW,DOT_RUN,DOT_FLOWLET));
  collector.increment("String_Node_Str",55);
  TimeUnit.SECONDS.sleep(2);
}