[Demonstration 1]

[Buggy Method]
public static String getAddress(final BluetoothAdapter adapter) {
    if (adapter == null)
        return null;
    final String address = adapter.getAddress();
    if (!MARSHMELLOW_FAKE_MAC.equals(address))
        return address;
    // Horrible reflection hack needed to get the Bluetooth MAC for Marshmellow and above.
    try {
        final Field mServiceField = BluetoothAdapter.class.getDeclaredField("mService");
        mServiceField.setAccessible(true);
        final Object mService = mServiceField.get(adapter);
        if (mService == null)
            return null;
        return (String) mService.getClass().getMethod("getAddress").invoke(mService);
    } catch (final ReflectiveOperationException x) {
        throw new RuntimeException(x);
    }
}

[Buggy Hunk]
} catch (final ReflectiveOperationException x) {

[Patch]
} catch (final Exception x) {

[Demonstration 2]

[Buggy Method]
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
    boolean addOwner;
    if (opcode == Opcodes.INVOKEINTERFACE || opcode == Opcodes.INVOKEVIRTUAL)
        addOwner = true;
    else if (opcode == Opcodes.INVOKESTATIC)
        addOwner = false;
    else {
        super.visitMethodInsn(opcode, owner, name, desc, itf);
        return;
    }
    if (!callToWrap.getClassSpec().equals(owner) || !callToWrap.getMethodName().equals(name) || !callToWrap.getMethodDescriptor().equals(desc)) {
        super.visitMethodInsn(opcode, owner, name, desc, itf);
        return;
    }
    String fixedDesc;
    if (addOwner) {
        fixedDesc = "(L" + selfTypeName + ";" + desc.substring(1);
    } else {
        fixedDesc = desc;
    }
    WrapperMethodDescriptor wmd = new WrapperMethodDescriptor(descriptors.size(), opcode, owner, name, fixedDesc, desc, itf);
    if (report)
        System.out.println("Changing method " + selfTypeName + "::" + selfMethodName + " wrapping call to " + owner + "::" + name + " to set symbol " + symbol);
    super.visitMethodInsn(Opcodes.INVOKESTATIC, selfTypeName, wmd.getWrapperName(), fixedDesc, false);
    descriptors.add(wmd);
}

[Buggy Hunk]
fixedDesc = "(L" + selfTypeName + ";" + desc.substring(1);

[Patch]
fixedDesc = "(L" + callToWrap.getClassSpec() + ";" + desc.substring(1);

[Demonstration 3]

[Buggy Method]
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc) {
    if (done || opcode != Opcodes.INVOKESPECIAL || !isConstructor(name)) {
        super.visitMethodInsn(opcode, owner, name, desc);
        return;
    }
    done = true;
    super.visitMethodInsn(opcode, superClassName, name, this.desc);
}

[Buggy Hunk]
super.visitMethodInsn(opcode, superClassName, name, this.desc);

[Patch]
super.visitMethodInsn(opcode, this.owner, name, this.desc);