[Demonstration 1]

[Buggy Method]
public int max(int first, int second, int third) {
    return max(first, second) > third ? max(first, second) : third;
}

[Buggy Hunk]
return max(first, second) > third ? max(first,second) : third;

[Patch]
return max(max(first, second), third);

[Demonstration 2]

[Buggy Method]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    username = (EditText) findViewById(R.id.editText1);
    password = (EditText) findViewById(R.id.editText2);
    attempts = (TextView) findViewById(R.id.textView5);
    attempts.setText(Integer.toString(counter));
    login = (Button) findViewById(R.id.button1);
}

[Buggy Hunk]
setContentView(R.layout.activity_main);

[Patch]
setContentView(R.layout.LoginActivity);