Program: 18558
Project: 18558
Buggy source:
public void createTestData() throws ServiceException {
  MetricId metricId1=new MetricId(SystemMetricDefs.OP_TIME_TOTAL.getMetricName(),srvcAdminName,opName);
  MetricValue metricValue1=new AverageMetricValue(metricId1);
  MetricValueAggregatorTestImpl aggregator1=new MetricValueAggregatorTestImpl(metricValue1,MetricCategory.Timing,MonitoringLevel.NORMAL);
  MetricClassifier metricClassifier1=new MetricClassifier(consumerName,"String_Node_Str","String_Node_Str");
  MetricClassifier metricClassifier2=new MetricClassifier("String_Node_Str","String_Node_Str","String_Node_Str");
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier2,1L);
  List<MetricValueAggregator> aggregators=deepCopyAggregators(aggregator1);
  metricsStorageProvider.saveMetricSnapshot(sixMinuteAgo,aggregators);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier2,1L);
  aggregators=deepCopyAggregators(aggregator1);
  metricsStorageProvider.saveMetricSnapshot(threeMinutesAgo,aggregators);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier2,1L);
  aggregators=deepCopyAggregators(aggregator1);
  metricsStorageProvider.saveMetricSnapshot(twoMinutesAgo,aggregators);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier2,1L);
  aggregators=deepCopyAggregators(aggregator1);
  metricsStorageProvider.saveMetricSnapshot(oneMinuteAgo,aggregators);
}

Fixed version (ground truth):
public void createTestData() throws ServiceException {
  MetricId metricId1=new MetricId(SystemMetricDefs.OP_TIME_TOTAL.getMetricName(),srvcAdminName,opName);
  MetricValue metricValue1=new AverageMetricValue(metricId1);
  MetricId metricId2=new MetricId(SystemMetricDefs.OP_TIME_TOTAL.getMetricName(),srvcAdminName,"String_Node_Str");
  MetricValue metricValue2=new AverageMetricValue(metricId2);
  MetricValueAggregatorTestImpl aggregator1=new MetricValueAggregatorTestImpl(metricValue1,MetricCategory.Timing,MonitoringLevel.NORMAL);
  MetricValueAggregatorTestImpl aggregator2=new MetricValueAggregatorTestImpl(metricValue2,MetricCategory.Timing,MonitoringLevel.NORMAL);
  MetricClassifier metricClassifier1=new MetricClassifier(consumerName,"String_Node_Str","String_Node_Str");
  MetricClassifier metricClassifier2=new MetricClassifier("String_Node_Str","String_Node_Str","String_Node_Str");
  aggregator1.update(metricClassifier1,1L);
  aggregator2.update(metricClassifier1,1l);
  aggregator2.update(metricClassifier1,1l);
  aggregator1.update(metricClassifier2,1L);
  List<MetricValueAggregator> aggregators=deepCopyAggregators(aggregator1,aggregator2);
  metricsStorageProvider.saveMetricSnapshot(sixMinutesAgo,aggregators);
  aggregator1.update(metricClassifier1,1L);
  aggregator2.update(metricClassifier1,1l);
  aggregator1.update(metricClassifier2,1L);
  aggregators=deepCopyAggregators(aggregator1,aggregator2);
  metricsStorageProvider.saveMetricSnapshot(threeMinutesAgo,aggregators);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier2,1L);
  aggregators=deepCopyAggregators(aggregator1);
  metricsStorageProvider.saveMetricSnapshot(twoMinutesAgo,aggregators);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier1,1L);
  aggregator1.update(metricClassifier2,1L);
  aggregators=deepCopyAggregators(aggregator1);
  metricsStorageProvider.saveMetricSnapshot(oneMinuteAgo,aggregators);
}