[Demonstration 1]

[Buggy Method]
public boolean executeAction(Player player, boolean action, Param params) {
    this.actionExecuting = action;
    //this.activator = a;
    if (!params.hasAnyParam("param-line"))
        params.set("param-line", "");
    setMessageParam(params.getParam("param-line"));
    boolean actionFailed = (!execute(player, params));
    if ((player != null) && (printAction())) {
        M msg = M.getByName(("ACT_" + type.name() + (actionFailed ? "FAIL" : "")).toUpperCase());
        if (msg == null) {
            M.LNG_FAIL_ACTION_MSG.print(type.name());
        } else {
            msg.print(params, messageParam);
        }
    }
    //Залипухи, но похоже по другому - никак...
    //if (a==null) return true;
    //if ((a.getType() == ActivatorType.COMMAND)&&(!((CommandActivator) a).isCommandRegistered())) return true;
    return (this.type == Actions.CANCEL_EVENT) && (!actionFailed);
}

[Buggy Hunk]
msg.print(params, messageParam);

[Patch]
msg.print(player, messageParam);

[Demonstration 2]

[Buggy Method]
private static String processFileRequest(URL fileUrl, boolean authn, String userpassword, String authnOther, String method, String locale, String accept, String content, String contentType, boolean compress, String customHeaderName, String customHeaderValue) throws IOException {
    InputStream is = null;
    String file = null;
    long start = System.currentTimeMillis();
    try {
        HttpURLConnection conn = (HttpURLConnection) fileUrl.openConnection();
        conn.setRequestMethod(method);
        conn.setConnectTimeout(timeoutMs);
        conn.setReadTimeout(timeoutMs);
        conn.setRequestProperty("User-Agent", "http://www.gms-world.net HTTP client");
        if (authn && userpassword != null) {
            //username : password
            String encodedAuthorization = Base64.encode(userpassword.getBytes());
            conn.setRequestProperty("Authorization", "Basic " + encodedAuthorization);
        } else if (authn && authnOther != null) {
            conn.setRequestProperty("Authorization", authnOther);
        }
        if (StringUtils.isNotEmpty(locale)) {
            conn.setRequestProperty("Accept-Language", locale);
        }
        conn.setRequestProperty("Accept-Charset", "utf-8");
        if (StringUtils.isNotEmpty(accept)) {
            conn.setRequestProperty("Accept", accept);
        }
        if (StringUtils.isNotEmpty(customHeaderName) && StringUtils.isNotEmpty(customHeaderValue)) {
            conn.setRequestProperty(customHeaderName, customHeaderValue);
        }
        if (content != null) {
            conn.setRequestProperty("Content-Length", Integer.toString(content.getBytes().length));
            //conn.setRequestProperty("Content-Language", "en-US");
            if (contentType != null) {
                conn.setRequestProperty("Content-Type", contentType);
            } else {
                conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
            }
            if (compress) {
                conn.setRequestProperty("Accept-Encoding", "gzip, deflate");
            }
            conn.setDoInput(true);
            conn.setDoOutput(true);
            //Send request
            IOUtils.write(content, conn.getOutputStream());
        } else {
            conn.connect();
        }
        int responseCode = conn.getResponseCode();
        httpResponseStatuses.put(fileUrl.toExternalForm(), responseCode);
        if (responseCode == HttpServletResponse.SC_OK) {
            is = conn.getInputStream();
            logger.log(Level.INFO, "Received http status code {0} for url {1}", new Object[] { responseCode, fileUrl.toString() });
        } else if (responseCode >= 400) {
            is = conn.getErrorStream();
            logger.log(Level.SEVERE, "Received http status code {0} for url {1}", new Object[] { responseCode, fileUrl.toString() });
        } else if (responseCode >= 300 && responseCode < 400) {
            logger.log(Level.WARNING, "Received http status code {0} for url {1}", new Object[] { responseCode, fileUrl.toString() });
        } else if (responseCode > 200) {
            logger.log(Level.INFO, "Received http status code {0} for url {1}", new Object[] { responseCode, fileUrl.toString() });
        }
        if (responseCode != HttpServletResponse.SC_NO_CONTENT && is != null) {
            file = IOUtils.toString(is, "UTF-8");
            int length = file.length();
            if (length > 0) {
                logger.log(Level.INFO, "Received " + conn.getContentType() + " document having " + length + " characters");
            }
        }
        logger.log(Level.INFO, "Request with status " + responseCode + " processed in " + (System.currentTimeMillis() - start) + " millis.");
    } catch (Exception e) {
        logger.log(Level.SEVERE, e.getMessage(), e);
        //httpResponseStatuses.remove(fileUrl.toExternalForm());
    } finally {
        if (is != null) {
            is.close();
        }
    }
    return file;
}

[Buggy Hunk]
IOUtils.write(content, conn.getOutputStream());

[Patch]
IOUtils.write(content, conn.getOutputStream(), Charset.forName("UTF-8"));

[Demonstration 3]

[Buggy Method]
private static void msg(Class<?> clazz, int level, String msg, Throwable t) {
    LocationAwareLogger locationAwareLogger = log0Map.get(clazz);
    if (locationAwareLogger != null) {
        locationAwareLogger.log(null, FQCN, level, msg, null, t);
    } else {
        LoggerFactory.getLogger(clazz).error(msg, t);
    }
}

[Buggy Hunk]
LocationAwareLogger locationAwareLogger = log0Map.get(clazz);

[Patch]
LocationAwareLogger locationAwareLogger = getLog0(clazz);