[Demonstration 1]

[Buggy Method]
@Override
public AioConnection aioConnect(Action action, Gateway gateway, AioClient client) throws IOException {
    AioConnection connection = (AioConnection) action.getExtra().get(AioConnection.class);
    if (connection != null) {
        return connection;
    }
    for (Connector connector : connectors.values()) {
        if (connector.supports(action) && connector instanceof AioConnection) {
            AioConnector aioConnector = (AioConnector) connector;
            connection = aioConnector.aioConnect(action, gateway, this);
            action.getExtra().put(AioConnection.class, connection);
            return connection;
        }
    }
    throw new IOException("unsupported protocol " + action.getProtocol());
}

[Buggy Hunk]
if (connector.supports(action) && connector instanceof AioConnection) {

[Patch]
if (connector.supports(action) && connector instanceof AioConnector) {

[Demonstration 2]

[Buggy Method]
@OnClick(R.id.btn_review_transfer)
void reviewTransfer() {
    if (etAmount.getText().toString().equals(".") | etAmount.getText().toString().equals("0")) {
        showToaster(getString(R.string.enter_amount));
        return;
    }
    if (spPayTo.getSelectedItem().toString().equals(spPayFrom.getSelectedItem().toString())) {
        showToaster(getString(R.string.error_same_account_transfer));
        return;
    }
    validator.validate(true);
}

[Buggy Hunk]
| etAmount.getText().toString().equals("0") ) {

[Patch]
|| etAmount.getText().toString().equals("0") ) {

[Demonstration 3]

[Buggy Method]
@Before
public void startZooKeeper() throws Exception {
    FileSupport.toRichFile(data_dir()).recursiveDelete();
    System.out.println("Starting ZooKeeper");
    ZooKeeperServer zk_server = new ZooKeeperServer();
    zk_server.setTickTime(500);
    zk_server.setTxnLogFactory(new FileTxnSnapLog(new File(data_dir(), "zk-log"), new File(data_dir(), "zk-data")));
    connector = new NIOServerCnxnFactory();
    connector.configure(new InetSocketAddress(0), 100);
    connector.startup(zk_server);
    System.out.println("ZooKeeper started");
}

[Buggy Hunk]
connector = new NIOServerCnxnFactory();

[Patch]
connector = new TestServerCnxnFactory();