Program: 7339
Project: 7339
Buggy source:
@Test public void testIdentityTranslations() throws Exception {
  List<String> names=Lists.newArrayList("String_Node_Str");
  ObjectDeserializer deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.stringTypeInfo),Schema.of(Schema.Type.STRING));
  Assert.assertEquals("String_Node_Str",deserializer.deserialize("String_Node_Str"));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.intTypeInfo),Schema.of(Schema.Type.INT));
  Assert.assertEquals(Integer.MIN_VALUE,deserializer.deserialize(Integer.MIN_VALUE));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.longTypeInfo),Schema.of(Schema.Type.LONG));
  Assert.assertEquals(Long.MAX_VALUE,deserializer.deserialize(Long.MAX_VALUE));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.booleanTypeInfo),Schema.of(Schema.Type.BOOLEAN));
  Assert.assertTrue((Boolean)deserializer.deserialize(true));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.floatTypeInfo),Schema.of(Schema.Type.FLOAT));
  Assert.assertEquals(3.14f,deserializer.deserialize(3.14f));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.doubleTypeInfo),Schema.of(Schema.Type.DOUBLE));
  Assert.assertEquals(3.14,deserializer.deserialize(3.14));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.binaryTypeInfo),Schema.of(Schema.Type.BYTES));
  Assert.assertArrayEquals(new byte[]{1,2,3},(byte[])deserializer.deserialize(new byte[]{1,2,3}));
}

Fixed version (ground truth):
@Test public void testIdentityTranslations() throws Exception {
  List<String> names=Lists.newArrayList("String_Node_Str");
  ObjectDeserializer deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.stringTypeInfo),Schema.of(Schema.Type.STRING));
  Assert.assertEquals("String_Node_Str",deserializer.deserialize("String_Node_Str"));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.intTypeInfo),Schema.of(Schema.Type.INT));
  Assert.assertEquals(Integer.MIN_VALUE,deserializer.deserialize(Integer.MIN_VALUE));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.longTypeInfo),Schema.of(Schema.Type.LONG));
  Assert.assertEquals(Long.MAX_VALUE,deserializer.deserialize(Long.MAX_VALUE));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.booleanTypeInfo),Schema.of(Schema.Type.BOOLEAN));
  Assert.assertTrue((Boolean)deserializer.deserialize(true));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.floatTypeInfo),Schema.of(Schema.Type.FLOAT));
  Assert.assertEquals(3.14f,deserializer.deserialize(3.14f));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.doubleTypeInfo),Schema.of(Schema.Type.DOUBLE));
  Assert.assertEquals(3.14,deserializer.deserialize(3.14));
  deserializer=new ObjectDeserializer(names,Lists.<TypeInfo>newArrayList(TypeInfoFactory.binaryTypeInfo),Schema.of(Schema.Type.BYTES));
  Assert.assertArrayEquals(new byte[]{1,2,3},(byte[])deserializer.deserialize(new byte[]{1,2,3}));
  deserializer=new ObjectDeserializer(names,Lists.newArrayList(TypeInfoFactory.getListTypeInfo(TypeInfoFactory.byteTypeInfo)),Schema.of(Schema.Type.BYTES));
  Assert.assertArrayEquals(new Byte[]{1,2,3},(Byte[])deserializer.deserialize(new byte[]{1,2,3}));
  Assert.assertArrayEquals(new Byte[]{1,2,3},(Byte[])deserializer.deserialize(ByteBuffer.wrap(new byte[]{1,2,3})));
}