[Demonstration 1]

[Buggy Method]
@Override
public void goTo(Place place) {
    placeControler.goTo(place);
}

[Buggy Hunk]
placeControler.goTo(place);

[Patch]
placeController.goTo(place);

[Demonstration 2]

[Buggy Method]
private String waitFor() throws InterruptedException {
    final CountDownLatch done = new CountDownLatch(N_MONITORS);
    final ByteArrayOutputStream stdout = new ByteArrayOutputStream();
    this.monitors[0] = this.monitor(this.process.getInputStream(), done, stdout, this.olevel);
    Logger.debug(this, "#waitFor(): waiting for stdout of %s in %s...", this.process, this.monitors[0]);
    this.monitors[1] = this.monitor(this.process.getErrorStream(), done, new ByteArrayOutputStream(), this.elevel);
    Logger.debug(this, "#waitFor(): waiting for stderr of %s in %s...", this.process, this.monitors[1]);
    try {
        this.process.waitFor();
    } finally {
        Logger.debug(this, "#waitFor(): process finished: %s", this.process);
        if (!done.await(N_MONITORS, TimeUnit.SECONDS)) {
            Logger.error(this, "#wait() failed");
        }
    }
    try {
        return stdout.toString(VerboseProcess.UTF_8);
    } catch (final UnsupportedEncodingException ex) {
        throw new IllegalStateException(ex);
    }
}

[Buggy Hunk]
if (!done.await(N_MONITORS, TimeUnit.SECONDS)) {

[Patch]
if (!done.await(2L, TimeUnit.SECONDS)) {

[Demonstration 3]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    Context context = getBaseContext();
    LinearLayout layout = new LinearLayout(context);
    layout.setOrientation(LinearLayout.VERTICAL);
    final EditText emailEditText = new EditText(context);
    emailEditText.setHint("email");
    emailEditText.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
    layout.addView(emailEditText);
    final EditText passwordEditText = new EditText(context);
    passwordEditText.setHint("password");
    passwordEditText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
    layout.addView(passwordEditText);
    final AlertDialog.Builder builder = new AlertDialog.Builder(Login.this);
    signupButton = (Button) findViewById(R.id.signupButton);
    loginButton = (Button) findViewById(R.id.loginButton);
    signupButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            builder.setTitle("Sign Up");
            builder.setPositiveButton("Create Account", new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int which) {
                    email = emailEditText.getText().toString();
                    password = passwordEditText.getText().toString();
                    Toast.makeText(getBaseContext(), "Email: " + email + "; Password: " + password, Toast.LENGTH_SHORT).show();
                }
            }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int which) {
                    // do nothing
                }
            }).setIcon(android.R.drawable.ic_dialog_alert).show();
        }
    });
    loginButton.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            builder.setTitle("Log In");
            builder.setPositiveButton("Login", new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int which) {
                    email = emailEditText.getText().toString();
                    password = passwordEditText.getText().toString();
                    Toast.makeText(getBaseContext(), "Email: " + email + "; Password: " + password, Toast.LENGTH_SHORT).show();
                }
            }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() {

                public void onClick(DialogInterface dialog, int which) {
                    // do nothing
                }
            }).setIcon(android.R.drawable.ic_dialog_alert).show();
        }
    });
}

[Buggy Hunk]
final AlertDialog.Builder builder = new AlertDialog.Builder(Login.this);

[Patch]
final AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);