[Demonstration 1]

[Buggy Method]
public void assertNoTerminalEvent() {
    if (onCompleteEvents.size() != 0 && onErrorEvents.size() != 0) {
        throw new AssertionError("Terminal events received.");
    }
}

[Buggy Hunk]
if (onCompleteEvents.size() != 0 && onErrorEvents.size() != 0) {

[Patch]
if (onCompleteEvents.size() > 0 || onErrorEvents.size() > 0) {

[Demonstration 2]

[Buggy Method]
@SuppressWarnings("ParameterNameDiffersFromOverriddenParameter")
@Override
public void valueChanged(@Nullable final TreeSelectionEvent evt) {
    if (evt != null) {
        final TreePath selPath = evt.getNewLeadSelectionPath();
        if (selPath == null) {
            return;
        }
        sel = selPath.getLastPathComponent();
        if (sel instanceof DefaultMutableTreeNode) {
            sel = ((DefaultMutableTreeNode) sel).getUserObject();
        }
        if (sel instanceof String) {
            final String kind = (String) sel;
            final ProxyUnit proxyUnit = new ProxyUnit(kind);
            model.getUnits(player, kind).forEach(proxyUnit::addProxied);
            sel = proxyUnit;
        }
        revert();
    }
}

[Buggy Hunk]
model.getUnits(player, kind).forEach(proxyUnit::addProxied);

[Patch]
proxiedFunction.apply(player, kind).forEach(proxyUnit::addProxied);

[Demonstration 3]

[Buggy Method]
public void changePassword(String password) throws AppException {
    this.passwordHash = Hash.createPassword(password);
    this.save();
}

[Buggy Hunk]
this.passwordHash = Hash.createPassword(password);

[Patch]
this.passwordhash = Hash.createPassword(password);