Program: 6016
Project: 6016
Buggy source:
@Test public void testWindower() throws Exception {
  Schema schema=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  List<StructuredRecord> input=ImmutableList.of(StructuredRecord.builder(schema).set("String_Node_Str","String_Node_Str").build(),StructuredRecord.builder(schema).set("String_Node_Str","String_Node_Str").build(),StructuredRecord.builder(schema).set("String_Node_Str","String_Node_Str").build(),StructuredRecord.builder(schema).set("String_Node_Str","String_Node_Str").build());
  String sink1Name="String_Node_Str";
  String sink2Name="String_Node_Str";
  String sink3Name="String_Node_Str";
  DataStreamsConfig etlConfig=DataStreamsConfig.builder().addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(schema,input,1000L))).addStage(new ETLStage("String_Node_Str",Window.getPlugin(1,1))).addStage(new ETLStage("String_Node_Str",Window.getPlugin(2,1))).addStage(new ETLStage("String_Node_Str",Window.getPlugin(2,2))).addStage(new ETLStage("String_Node_Str",FieldCountAggregator.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",FieldCountAggregator.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",FieldCountAggregator.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",StringValueFilterTransform.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",StringValueFilterTransform.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",StringValueFilterTransform.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sink1Name))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sink2Name))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sink3Name))).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").setBatchInterval("String_Node_Str").build();
  AppRequest<DataStreamsConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  SparkManager sparkManager=appManager.getSparkManager(DataStreamsSparkLauncher.NAME);
  sparkManager.start();
  sparkManager.waitForStatus(true,10,1);
  Schema outputSchema=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.LONG)));
  final List<StructuredRecord> expected1=ImmutableList.of(StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  final DataSetManager<Table> outputManager1=getDataset(sink1Name);
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      outputManager1.flush();
      return expected1.equals(MockSink.readOutput(outputManager1));
    }
  }
,4,TimeUnit.MINUTES);
  final List<StructuredRecord> expected2=ImmutableList.of(StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  final DataSetManager<Table> outputManager2=getDataset(sink2Name);
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      outputManager2.flush();
      return expected2.equals(MockSink.readOutput(outputManager2));
    }
  }
,4,TimeUnit.MINUTES);
  final List<StructuredRecord> possible1=ImmutableList.of(StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  final List<StructuredRecord> possible2=ImmutableList.of(StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build(),StructuredRecord.builder(outputSchema).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build());
  final DataSetManager<Table> outputManager3=getDataset(sink3Name);
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      outputManager3.flush();
      List<StructuredRecord> actual=MockSink.readOutput(outputManager3);
      return possible1.equals(actual) || possible2.equals(actual);
    }
  }
,4,TimeUnit.MINUTES);
  sparkManager.stop();
  sparkManager.waitForStatus(false,10,1);
}

Fixed version (ground truth):
@Test public void testWindower() throws Exception {
  Schema schema=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  List<StructuredRecord> input=ImmutableList.of(StructuredRecord.builder(schema).set("String_Node_Str","String_Node_Str").build(),StructuredRecord.builder(schema).set("String_Node_Str","String_Node_Str").build(),StructuredRecord.builder(schema).set("String_Node_Str","String_Node_Str").build());
  String sinkName="String_Node_Str";
  DataStreamsConfig etlConfig=DataStreamsConfig.builder().addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(schema,input,1000L))).addStage(new ETLStage("String_Node_Str",Window.getPlugin(30,1))).addStage(new ETLStage("String_Node_Str",FieldCountAggregator.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",StringValueFilterTransform.getPlugin("String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sinkName))).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").setBatchInterval("String_Node_Str").build();
  AppRequest<DataStreamsConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  SparkManager sparkManager=appManager.getSparkManager(DataStreamsSparkLauncher.NAME);
  sparkManager.start();
  sparkManager.waitForStatus(true,10,1);
  final DataSetManager<Table> outputManager=getDataset(sinkName);
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      outputManager.flush();
      boolean sawThree=false;
      for (      StructuredRecord record : MockSink.readOutput(outputManager)) {
        long count=record.get("String_Node_Str");
        if (count == 3L) {
          sawThree=true;
        }
        Assert.assertTrue(count <= 3L);
      }
      return sawThree;
    }
  }
,2,TimeUnit.MINUTES);
  sparkManager.stop();
  sparkManager.waitForStatus(false,10,1);
}