[Demonstration 1]

[Buggy Method]
public static TransactionalContext createTransactionalContext(String query) {
    InternalTransaction transaction = database.beginTransaction(KernelTransaction.Type.implicit, SecurityContext.AUTH_DISABLED);
    BoltConnectionInfo boltConnection = new BoltConnectionInfo("username", "neo4j-java-bolt-driver", new InetSocketAddress("127.0.0.1", 56789), new InetSocketAddress("127.0.0.1", 7687));
    return contextFactory.newContext(boltConnection, transaction, query, Collections.emptyMap());
}

[Buggy Hunk]
public static TransactionalContext createTransactionalContext( String query )

[Patch]
private static TransactionalContext createTransactionalContext( String query )

[Demonstration 2]

[Buggy Method]
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    switch(id) {
        case R.id.action_settings:
            startActivity(new Intent(this, SettingsActivity.class));
            break;
        case R.id.action_start_notification_listener:
            // Start the listener
            startListening();
            break;
        case R.id.action_stop_notification_listener:
            // Stop the listener
            stopListening();
            break;
        case R.id.action_notify:
            Log.d(LOGTAG, "Sending notification");
            NotificationManager nManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
            NotificationCompat.Builder ncomp = new NotificationCompat.Builder(this);
            ncomp.setContentTitle("My Notification");
            ncomp.setContentText("Notification Listener Service Example");
            ncomp.setTicker("Notification Listener Service Example");
            ncomp.setCategory(Notification.CATEGORY_EVENT);
            ncomp.setSmallIcon(R.drawable.ic_launcher);
            ncomp.setAutoCancel(true);
            nManager.notify((int) System.currentTimeMillis(), ncomp.build());
            break;
        case R.id.action_test:
            runSpeakingTest();
            break;
        case R.id.action_stop_test:
            disableSpeakingTest();
            break;
        case R.id.action_quit:
            stopListening();
            GarruloMainActivity.this.finish();
            android.os.Process.killProcess(android.os.Process.myPid());
            getParent().finish();
            System.exit(0);
    }
    return super.onOptionsItemSelected(item);
}

[Buggy Hunk]
ncomp.setCategory(Notification.CATEGORY_EVENT);

[Patch]
ncomp.setCategory(NotificationCompat.CATEGORY_EVENT);

[Demonstration 3]

[Buggy Method]
public Uri toUri() {
    checkArguments();
    Uri.Builder builder = new Uri.Builder().scheme(Util.isEmpty(scheme) ? DEFAULT_SCHEME : scheme).path((path == null ? null : path.build(false))).fragment(fragment);
    if (!Util.isEmpty(host)) {
        if (port > 0) {
            builder.authority(host + ":" + port);
        } else {
            builder.authority(host);
        }
    }
    if (query != null) {
        for (Part<String, String> item : query.getParams()) {
            builder.appendQueryParameter(item.getKey(), item.getValue());
        }
    }
    return builder.build();
}

[Buggy Hunk]
if (query != null) {

[Patch]
if (query != null && !Util.isEmpty(query.getParams())) {