[Demonstration 1]

[Buggy Method]
public Observable<TopicMetadata> findRegistered(long offset, long limit, String sortDir) {
    return findAll(offset, limit, sortDir).filter(topicMetadata -> !topicMetadata.isRegistered());
}

[Buggy Hunk]
.filter(topicMetadata -> !topicMetadata.isRegistered());

[Patch]
.filter(TopicMetadata::isRegistered);

[Demonstration 2]

[Buggy Method]
private boolean validateForm(View view) {
    boolean setError = false;
    if (checkEmptySetError(nameField)) {
        setError = true;
    }
    if (checkEmptySetError(emailField) || checkEmailSetError(emailField)) {
        setError = true;
    }
    if (!pickedPublicKeyFile && !pickedPrivateKeyFile) {
        publicKeyButton.setTextColor(red);
        privateKeyButton.setTextColor(red);
        makeSnackbar(view, "No public and private key file selected!");
        setError = true;
    } else if (!pickedPublicKeyFile) {
        publicKeyButton.setTextColor(red);
        makeSnackbar(view, "No public key file selected!");
        setError = true;
    } else if (!pickedPrivateKeyFile) {
        privateKeyButton.setTextColor(red);
        makeSnackbar(view, "No private key file selected!");
        setError = true;
    } else if (pickedPublicKeyFile && pickedPrivateKeyFile) {
        if (!checkKeyBelongsToSameUser()) {
            publicKeyButton.setTextColor(red);
            privateKeyButton.setTextColor(red);
            makeSnackbar(view, "Public and private keys don't belong to same keypair!");
            setError = true;
        }
    }
    if (!checkEmailBelongsToKey()) {
        emailField.setTextColor(red);
        makeSnackbar(view, "Incorrect email address. The selected key does not contain the entered user ID");
        setError = true;
    }
    return setError;
}

[Buggy Hunk]
else if (pickedPublicKeyFile && pickedPrivateKeyFile) {

[Patch]
if (pickedPublicKeyFile && pickedPrivateKeyFile) {

[Demonstration 3]

[Buggy Method]
@Override
public void visitToken(DetailAST ast) {
    DetailAST init = ast.getFirstChild().getNextSibling();
    String var = getVarAssignedWithZero(init);
    if (var == null) {
        return;
    }
    DetailAST condition = init.getNextSibling().getNextSibling();
    String array = getArrayName(condition);
    if (array == null) {
        return;
    }
    DetailAST postExpr = condition.getNextSibling().getNextSibling();
    if (!isSingleIncrement(postExpr)) {
        return;
    }
    DetailAST loopBody = postExpr.getNextSibling().getNextSibling();
    if (loopBody.getType() == TokenTypes.EXPR) {
        loopBody = loopBody.getParent();
    }
    if (!loopBodyContainsDifficultExpr(loopBody, array, var)) {
        log(ast, "You should use 'foreach loop' instead 'for'");
    }
}

[Buggy Hunk]
if (!isSingleIncrement(postExpr)) {

[Patch]
if (!isSingleIncrement(postExpr, var)) {