Program: 6738
Project: 6738
Buggy source:
@Test public void testTransforms() throws Exception {
  MockMetrics mockMetrics=new MockMetrics();
  List<Transformation> transforms=Lists.<Transformation>newArrayList(new IntToDouble(),new Filter(100d),new DoubleToString());
  List<StageMetrics> stageMetrics=Lists.newArrayList(new StageMetrics(mockMetrics,StageMetrics.Type.SOURCE,"String_Node_Str"),new StageMetrics(mockMetrics,StageMetrics.Type.TRANSFORM,"String_Node_Str"),new StageMetrics(mockMetrics,StageMetrics.Type.SINK,"String_Node_Str"));
  TransformExecutor<Integer,String> executor=new TransformExecutor<>(transforms,stageMetrics);
  List<String> results=Lists.newArrayList(executor.runOneIteration(1));
  Assert.assertTrue(results.isEmpty());
  Assert.assertEquals(3,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(0,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(0,mockMetrics.getCount("String_Node_Str"));
  results=Lists.newArrayList(executor.runOneIteration(10));
  Assert.assertEquals(1,results.size());
  Assert.assertEquals("String_Node_Str",results.get(0));
  Assert.assertEquals(6,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(1,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(1,mockMetrics.getCount("String_Node_Str"));
  results=Lists.newArrayList(executor.runOneIteration(100));
  Assert.assertEquals(2,results.size());
  Assert.assertEquals("String_Node_Str",results.get(0));
  Assert.assertEquals("String_Node_Str",results.get(1));
  Assert.assertEquals(9,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(3,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(3,mockMetrics.getCount("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testTransforms() throws Exception {
  MockMetrics mockMetrics=new MockMetrics();
  List<Transformation> transforms=Lists.<Transformation>newArrayList(new IntToDouble(),new Filter(100d),new DoubleToString());
  List<StageMetrics> stageMetrics=Lists.newArrayList(new StageMetrics(mockMetrics,PluginID.from(Constants.Source.PLUGINTYPE,"String_Node_Str",1)),new StageMetrics(mockMetrics,PluginID.from(Constants.Transform.PLUGINTYPE,"String_Node_Str",2)),new StageMetrics(mockMetrics,PluginID.from(Constants.Sink.PLUGINTYPE,"String_Node_Str",3)));
  TransformExecutor<Integer,String> executor=new TransformExecutor<>(transforms,stageMetrics);
  List<String> results=Lists.newArrayList(executor.runOneIteration(1));
  Assert.assertTrue(results.isEmpty());
  Assert.assertEquals(3,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(0,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(0,mockMetrics.getCount("String_Node_Str"));
  results=Lists.newArrayList(executor.runOneIteration(10));
  Assert.assertEquals(1,results.size());
  Assert.assertEquals("String_Node_Str",results.get(0));
  Assert.assertEquals(6,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(1,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(1,mockMetrics.getCount("String_Node_Str"));
  results=Lists.newArrayList(executor.runOneIteration(100));
  Assert.assertEquals(2,results.size());
  Assert.assertEquals("String_Node_Str",results.get(0));
  Assert.assertEquals("String_Node_Str",results.get(1));
  Assert.assertEquals(9,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(3,mockMetrics.getCount("String_Node_Str"));
  Assert.assertEquals(3,mockMetrics.getCount("String_Node_Str"));
}