[Demonstration 1]

[Buggy Method]
public void reset(URL url) {
    if (isClosed()) {
        throw new IllegalStateException("Failed to reset parameters " + url + ", cause: Channel closed. channel: " + getLocalAddress());
    }
    try {
        if (url.hasParameter(Constants.HEARTBEAT_KEY)) {
            int t = url.getParameter(Constants.TIMEOUT_KEY, 0);
            if (t > 0) {
                this.timeout = t;
            }
        }
    } catch (Throwable t) {
        logger.error(t.getMessage(), t);
    }
    try {
        if (url.hasParameter(Constants.CONNECT_TIMEOUT_KEY)) {
            int t = url.getParameter(Constants.CONNECT_TIMEOUT_KEY, 0);
            if (t > 0) {
                this.connectTimeout = t;
            }
        }
    } catch (Throwable t) {
        logger.error(t.getMessage(), t);
    }
    try {
        if (url.hasParameter(Constants.CODEC_KEY)) {
            this.codec = getChannelCodec(url);
        }
    } catch (Throwable t) {
        logger.error(t.getMessage(), t);
    }
}

[Buggy Hunk]
if (url.hasParameter(Constants.HEARTBEAT_KEY)) {

[Patch]
if (url.hasParameter(Constants.TIMEOUT_KEY)) {

[Demonstration 2]

[Buggy Method]
@Override
public void initialize(Step step, StepResult result, TaskResult taskResult) {
    validateStepAndResult(step);
    this.taskResult = taskResult;
    this.stepResult = result;
    this.taskResult = taskResult;
    // Setup submit bar actions and titles
    SubmitBar submitBar = (SubmitBar) findViewById(R.id.rsb_submit_bar);
    submitBar.setPositiveTitle(getContext().getString(R.string.rsb_continue));
    submitBar.setPositiveAction(v -> attemptSignIn());
    submitBar.setNegativeAction(v -> resendVerificationEmail());
    submitBar.setNegativeTitle(getContext().getString(R.string.rsb_resend_email));
    updateEmailText();
    RxView.clicks(findViewById(R.id.rsb_email_verification_wrong_email)).subscribe(v -> changeEmail());
    // If the the password isn't in the TaskResult, we have to make the user re-enter their's
    if (getPassword(taskResult) == null) {
        RelativeLayout container = (RelativeLayout) findViewById(R.id.rsb_email_verification_container);
        createValidatePasswordStepBody(container);
    }
}

[Buggy Hunk]
submitBar.setPositiveAction(v -> attemptSignIn());

[Patch]
submitBar.setPositiveAction(v -> signIn());

[Demonstration 3]

[Buggy Method]
public void rewind() {
    mySource.reset();
    ;
}

[Buggy Hunk]
mySource.reset();;

[Patch]
mySource.seekTo(0);;