Program: 6411
Project: 6411
Buggy source:
@Test public void test() throws Exception {
  ETLStage source=new ETLStage("String_Node_Str",ImmutableMap.of(DataGeneratorSource.PROPERTY_TYPE,DataGeneratorSource.TABLE_TYPE));
  Map<String,String> datasetProps=ImmutableMap.of(CubeDatasetDefinition.PROPERTY_AGGREGATION_PREFIX + "String_Node_Str","String_Node_Str");
  Map<String,String> measurementsProps=ImmutableMap.of(Properties.Cube.MEASUREMENT_PREFIX + "String_Node_Str","String_Node_Str");
  ETLStage sink=new ETLStage("String_Node_Str",ImmutableMap.of(Properties.Cube.DATASET_NAME,"String_Node_Str",Properties.Cube.DATASET_OTHER,new Gson().toJson(datasetProps),Properties.Cube.MEASUREMENTS,new Gson().toJson(measurementsProps)));
  ETLRealtimeConfig etlConfig=new ETLRealtimeConfig(source,sink,Lists.<ETLStage>newArrayList());
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  AppRequest<ETLRealtimeConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  ApplicationManager appManager=deployApplication(appId,appRequest);
  WorkerManager workerManager=appManager.getWorkerManager(ETLWorker.NAME);
  final long startTs=System.currentTimeMillis() / 1000;
  workerManager.start();
  final DataSetManager<Cube> tableManager=getDataset("String_Node_Str");
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      tableManager.flush();
      Cube cube=tableManager.get();
      Collection<TimeSeries> result=cube.query(buildCubeQuery(startTs));
      return !result.isEmpty();
    }
  }
,10,TimeUnit.SECONDS,50,TimeUnit.MILLISECONDS);
  workerManager.stop();
  Cube cube=tableManager.get();
  Collection<TimeSeries> result=cube.query(buildCubeQuery(startTs));
  Iterator<TimeSeries> iterator=result.iterator();
  Assert.assertTrue(iterator.hasNext());
  TimeSeries timeSeries=iterator.next();
  Assert.assertEquals("String_Node_Str",timeSeries.getMeasureName());
  Assert.assertFalse(timeSeries.getTimeValues().isEmpty());
  Assert.assertEquals(3,timeSeries.getTimeValues().get(0).getValue());
  Assert.assertFalse(iterator.hasNext());
}

Fixed version (ground truth):
@Test public void test() throws Exception {
  ETLStage source=new ETLStage("String_Node_Str",ImmutableMap.of(DataGeneratorSource.PROPERTY_TYPE,DataGeneratorSource.TABLE_TYPE));
  Map<String,String> datasetProps=ImmutableMap.of(CubeDatasetDefinition.PROPERTY_AGGREGATION_PREFIX + "String_Node_Str","String_Node_Str");
  Map<String,String> measurementsProps=ImmutableMap.of(Properties.Cube.MEASUREMENT_PREFIX + "String_Node_Str","String_Node_Str");
  ETLStage sink=new ETLStage("String_Node_Str",ImmutableMap.of(Properties.Cube.DATASET_NAME,"String_Node_Str",Properties.Cube.DATASET_OTHER,new Gson().toJson(datasetProps),Properties.Cube.MEASUREMENTS,new Gson().toJson(measurementsProps)));
  ETLRealtimeConfig etlConfig=new ETLRealtimeConfig(source,sink,Lists.<ETLStage>newArrayList());
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  AppRequest<ETLRealtimeConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  ApplicationManager appManager=deployApplication(appId,appRequest);
  WorkerManager workerManager=appManager.getWorkerManager(ETLWorker.NAME);
  final long startTs=System.currentTimeMillis() / 1000;
  workerManager.start();
  final DataSetManager<Cube> tableManager=getDataset("String_Node_Str");
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      tableManager.flush();
      Cube cube=tableManager.get();
      Collection<TimeSeries> result=cube.query(buildCubeQuery(startTs));
      return !result.isEmpty();
    }
  }
,10,TimeUnit.SECONDS);
  workerManager.stop();
  Cube cube=tableManager.get();
  Collection<TimeSeries> result=cube.query(buildCubeQuery(startTs));
  Iterator<TimeSeries> iterator=result.iterator();
  Assert.assertTrue(iterator.hasNext());
  TimeSeries timeSeries=iterator.next();
  Assert.assertEquals("String_Node_Str",timeSeries.getMeasureName());
  Assert.assertFalse(timeSeries.getTimeValues().isEmpty());
  Assert.assertEquals(3,timeSeries.getTimeValues().get(0).getValue());
  Assert.assertFalse(iterator.hasNext());
}