[Demonstration 1]

[Buggy Method]
@Override
public Object evaluate(Context context) {
    Object source = getSource().evaluate(context);
    Integer start = (Integer) getStartIndex().evaluate(context);
    Integer end = (Integer) getEndIndex().evaluate(context);
    return context.logTrace(this.getClass(), slice(source, start, end), source, start, end);
}

[Buggy Hunk]
Integer end = (Integer) getEndIndex().evaluate(context);

[Patch]
Integer end = getEndIndex() == null ? null : (Integer) getEndIndex().evaluate(context);

[Demonstration 2]

[Buggy Method]
public void visit(WtInternalLink link) {
    try {
        if (link.getTarget().isResolved()) {
            PageTitle page = PageTitle.make(config, link.getTarget().getAsString());
            if (page.getNamespace().equals(config.getNamespace("Category"))) {
                parser.category(context, link.getTarget().getAsString(), page.getTitle().replace('_', ' '), sb.length());
                return;
            } else if (page.getNamespace().isFileNs() || page.getNamespace().isMediaNs()) {
                return;
            }
        }
    } catch (LinkTargetException e) {
    }
    int start = sb.length();
    if (!isInsideFilteredSection()) {
        sb.append(link.getPrefix());
    }
    if (!link.hasTitle())
        iterate(link.getTarget());
    else
        iterate(link.getTitle());
    if (!isInsideFilteredSection()) {
        sb.append(link.getPostfix());
    }
    int end = sb.length();
    start = trimStart(start);
    end = trimEnd(end);
    if (start < end) {
        String target = link.getTarget().getAsString();
        if (target.startsWith("#")) {
            parser.anchor(context, title, target.substring(1), true, start, end);
        } else {
            int hashIndex = target.lastIndexOf('#');
            if (hashIndex == -1) {
                parser.anchor(context, link.getTarget().getAsString(), null, true, start, end);
            } else {
                parser.anchor(context, target.substring(0, hashIndex), target.substring(hashIndex + 1), true, start, end);
            }
        }
    }
}

[Buggy Hunk]
parser.anchor(context, title, target.substring(1), true, start, end);

[Patch]
parser.anchor(context, page.getTitle(), target.substring(1), true, start, end);

[Demonstration 3]

[Buggy Method]
@Override
protected String doInBackground(String... strings) {
    try {
        sendCommand("http://" + configs.getIPAddress() + configs.getPortNo() + "/?" + this.control + "=True");
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}

[Buggy Hunk]
configs.getPortNo() +"/?" + this.control + "=True");

[Patch]
"/?" + this.control + "=True");