[Demonstration 1]

[Buggy Method]
public boolean remove(int val) {
    if (!valueMap.containsKey(val)) {
        return false;
    }
    Integer index = valueMap.get(val);
    if (index == count) {
        randomMap.remove(index);
        valueMap.remove(val);
    } else {
        valueMap.remove(val);
        Integer value = valueMap.get(count);
        randomMap.put(index, value);
        randomMap.remove(count);
        valueMap.put(value, index);
    }
    count--;
    return true;
}

[Buggy Hunk]
Integer value = valueMap.get(count);

[Patch]
Integer value = randomMap.get(count);

[Demonstration 2]

[Buggy Method]
private void initializeVariables() {
    this.myToolbar = (Toolbar) findViewById(R.id.toolbar);
    this.myViewPager = (ViewPager) findViewById(R.id.viewpager);
    this.myTabLayout = (TabLayout) findViewById(R.id.tabs);
    this.cuentaTab = new miCuentaSupervisorTab();
    this.rutasTab = new rutasSupervisorTab();
}

[Buggy Hunk]
this.rutasTab                       = new rutasSupervisorTab();

[Patch]
this.rutasTab                       = new rutasFragmentSupervisor();

[Demonstration 3]

[Buggy Method]
@Override
public boolean remove(Event event) {
    int result = jdbcOperations.update("DELETE FROM events WHERE name =?", event.getName());
    return result == 0 ? false : true;
}

[Buggy Hunk]
return result==0 ? false : true;

[Patch]
return result!=0;