Program: 7384
Project: 7384
Buggy source:
@Test public void testAvroFormattedStream() throws Exception {
  createStream("String_Node_Str");
  Schema schema=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.INT)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.DOUBLE)));
  FormatSpecification formatSpecification=new FormatSpecification(RecordFormats.AVRO,schema,Collections.<String,String>emptyMap());
  StreamProperties properties=new StreamProperties("String_Node_Str",Long.MAX_VALUE,formatSpecification);
  setStreamProperties("String_Node_Str",properties);
  org.apache.avro.Schema avroSchema=new org.apache.avro.Schema.Parser().parse(schema.toString());
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",5,3.14));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",10,2.34));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",1,1.23));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",50,45.67));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",100,98.76));
  Double xPrice=5 * 3.14 + 10 * 2.34;
  Double yPrice=1.23;
  Double zPrice=50 * 45.67 + 100 * 98.76;
  ExploreExecutionResult result=exploreClient.submit("String_Node_Str" + "String_Node_Str").get();
  Assert.assertTrue(result.hasNext());
  Assert.assertEquals(Lists.newArrayList(new ColumnDesc("String_Node_Str","String_Node_Str",1,null),new ColumnDesc("String_Node_Str","String_Node_Str",2,null),new ColumnDesc("String_Node_Str","String_Node_Str",3,null)),result.getResultSchema());
  List<Object> rowColumns=result.next().getColumns();
  Assert.assertEquals("String_Node_Str",rowColumns.get(0).toString());
  Assert.assertEquals(150L,rowColumns.get(1));
  Assert.assertTrue(Math.abs(zPrice - (Double)rowColumns.get(2)) < 0.0000001);
  rowColumns=result.next().getColumns();
  Assert.assertEquals("String_Node_Str",rowColumns.get(0).toString());
  Assert.assertEquals(15L,rowColumns.get(1));
  Assert.assertTrue(Math.abs(xPrice - (Double)rowColumns.get(2)) < 0.0000001);
  rowColumns=result.next().getColumns();
  Assert.assertEquals("String_Node_Str",rowColumns.get(0).toString());
  Assert.assertEquals(1L,rowColumns.get(1));
  Assert.assertTrue(Math.abs(yPrice - (Double)rowColumns.get(2)) < 0.0000001);
  Assert.assertFalse(result.hasNext());
}

Fixed version (ground truth):
@Test public void testAvroFormattedStream() throws Exception {
  createStream("String_Node_Str");
  Schema schema=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.INT)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.DOUBLE)));
  FormatSpecification formatSpecification=new FormatSpecification(Formats.AVRO,schema,Collections.<String,String>emptyMap());
  StreamProperties properties=new StreamProperties("String_Node_Str",Long.MAX_VALUE,formatSpecification);
  setStreamProperties("String_Node_Str",properties);
  org.apache.avro.Schema avroSchema=new org.apache.avro.Schema.Parser().parse(schema.toString());
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",5,3.14));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",10,2.34));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",1,1.23));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",50,45.67));
  sendStreamEvent("String_Node_Str",createAvroEvent(avroSchema,"String_Node_Str",100,98.76));
  Double xPrice=5 * 3.14 + 10 * 2.34;
  Double yPrice=1.23;
  Double zPrice=50 * 45.67 + 100 * 98.76;
  ExploreExecutionResult result=exploreClient.submit("String_Node_Str" + "String_Node_Str").get();
  Assert.assertTrue(result.hasNext());
  Assert.assertEquals(Lists.newArrayList(new ColumnDesc("String_Node_Str","String_Node_Str",1,null),new ColumnDesc("String_Node_Str","String_Node_Str",2,null),new ColumnDesc("String_Node_Str","String_Node_Str",3,null)),result.getResultSchema());
  List<Object> rowColumns=result.next().getColumns();
  Assert.assertEquals("String_Node_Str",rowColumns.get(0).toString());
  Assert.assertEquals(150L,rowColumns.get(1));
  Assert.assertTrue(Math.abs(zPrice - (Double)rowColumns.get(2)) < 0.0000001);
  rowColumns=result.next().getColumns();
  Assert.assertEquals("String_Node_Str",rowColumns.get(0).toString());
  Assert.assertEquals(15L,rowColumns.get(1));
  Assert.assertTrue(Math.abs(xPrice - (Double)rowColumns.get(2)) < 0.0000001);
  rowColumns=result.next().getColumns();
  Assert.assertEquals("String_Node_Str",rowColumns.get(0).toString());
  Assert.assertEquals(1L,rowColumns.get(1));
  Assert.assertTrue(Math.abs(yPrice - (Double)rowColumns.get(2)) < 0.0000001);
  Assert.assertFalse(result.hasNext());
}