[Demonstration 1]

[Buggy Method]
public Byte getByte(String name, Byte defaultValue) throws NumberFormatException {
    if (hasContent(name)) {
        return Byte.parseByte(get(name));
    } else {
        return defaultValue;
    }
}

[Buggy Hunk]
if (hasContent(name))

[Patch]
if (containsContent(name))

[Demonstration 2]

[Buggy Method]
@Test
public void testGetProjectedSchema1() throws Exception {
    MessageType originalMsg = MessageTypeParser.parseMessageType("message hive_schema {\n" + "  optional group structCol {\n" + "    optional int32 a;\n" + "    optional double b;\n" + "    optional boolean c;\n" + "    optional fixed_len_byte_array(3) d (DECIMAL(5,2));\n" + "  }\n" + "}\n");
    testConversion("structCol", "struct<a:int>", DataWritableReadSupport.getProjectedSchema(originalMsg, Arrays.asList("structCol"), Arrays.asList(0), Arrays.asList("structCol.a")).toString());
}

[Buggy Hunk]
Arrays.asList("structCol.a")).toString());

[Patch]
new HashSet<>(Arrays.asList("structCol.a"))).toString());

[Demonstration 3]

[Buggy Method]
@Test
public void testGetProjectedSchema2() throws Exception {
    MessageType originalMsg = MessageTypeParser.parseMessageType("message hive_schema {\n" + "  optional group structCol {\n" + "    optional int32 a;\n" + "    optional double b;\n" + "  }\n" + "}\n");
    testConversion("structCol", "struct<a:int,b:double>", DataWritableReadSupport.getProjectedSchema(originalMsg, Arrays.asList("structCol"), Arrays.asList(0), Arrays.asList("structCol.a", "structCol.b")).toString());
}

[Buggy Hunk]
Arrays.asList("structCol.a", "structCol.b")).toString());

[Patch]
new HashSet<>(Arrays.asList("structCol.a", "structCol.b"))).toString());