[Demonstration 1]

[Buggy Method]
@Override
public BValue[] execute(Context context) {
    CarbonMessage carbonMessage = context.getCarbonMessage();
    String connectionGroupName = getArgument(context, 0).toString();
    Session session = (Session) carbonMessage.getProperty(Constants.WEBSOCKET_SESSION);
    WebSocketConnectionManager.getInstance().removeConnectionFromGroup(connectionGroupName, session);
    return VOID_RETURN;
}

[Buggy Hunk]
String connectionGroupName = getArgument(context, 0).toString();

[Patch]
String connectionGroupName = getArgument(context, 0).stringValue();

[Demonstration 2]

[Buggy Method]
@Override
public byte[] getImage(String imageId, String imageType, String imageScale) {
    String downloadUrl = "";
    if (StringUtils.isEmpty(imageScale)) {
        downloadUrl = imageUrl + "/image/" + imageId + imageType;
    } else {
        downloadUrl = imageUrl + "/image/" + imageId + "_" + imageScale + imageType;
    }
    return HttpUtil.getImage(downloadUrl);
}

[Buggy Hunk]
return HttpUtil.getImage(downloadUrl);

[Patch]
return ImageUtil.getImage(downloadUrl);

[Demonstration 3]

[Buggy Method]
public static PluginCollection Instance() {
    if (ourInstance == null) {
        ourInstance = new PluginCollection();
        // This code can not be moved to constructor because nativePlugins() is a native method
        for (FormatPlugin p : ourInstance.nativePlugins()) {
            ourInstance.addPlugin(p);
        }
    }
    return ourInstance;
}

[Buggy Hunk]
for (FormatPlugin p : ourInstance.nativePlugins()) {

[Patch]
for (NativeFormatPlugin p : ourInstance.nativePlugins()) {