[Demonstration 1]

[Buggy Method]
@Override
public int getKeyIndexAndNearbyCodes(int x, int y, int[] allKeys) {
    final Key[] keys = getKeys();
    final int touchX = getTouchX(x);
    final int touchY = getTouchY(y);
    int primaryIndex = BaseKeyboardView.NOT_A_KEY;
    int closestKey = BaseKeyboardView.NOT_A_KEY;
    int closestKeyDist = mProximityThresholdSquare + 1;
    int[] distances = mDistances;
    Arrays.fill(distances, Integer.MAX_VALUE);
    int[] nearestKeyIndices = mKeyboard.getNearestKeys(touchX, touchY);
    final int keyCount = nearestKeyIndices.length;
    for (int i = 0; i < keyCount; i++) {
        final Key key = keys[nearestKeyIndices[i]];
        int dist = 0;
        boolean isInside = key.isInside(touchX, touchY);
        if (isInside) {
            primaryIndex = nearestKeyIndices[i];
        }
        if (((mProximityCorrectOn && (dist = key.squaredDistanceFrom(touchX, touchY)) < mProximityThresholdSquare) || isInside) && key.codes[0] > 32) {
            // Find insertion point
            final int nCodes = key.codes.length;
            if (dist < closestKeyDist) {
                closestKeyDist = dist;
                closestKey = nearestKeyIndices[i];
            }
            if (allKeys == null)
                continue;
            for (int j = 0; j < distances.length; j++) {
                if (distances[j] > dist) {
                    // Make space for nCodes codes
                    System.arraycopy(distances, j, distances, j + nCodes, distances.length - j - nCodes);
                    System.arraycopy(allKeys, j, allKeys, j + nCodes, allKeys.length - j - nCodes);
                    System.arraycopy(key.codes, 0, allKeys, j, nCodes);
                    Arrays.fill(distances, j, j + nCodes, dist);
                    break;
                }
            }
        }
    }
    if (primaryIndex == BaseKeyboardView.NOT_A_KEY) {
        primaryIndex = closestKey;
    }
    return primaryIndex;
}

[Buggy Hunk]
if (((mProximityCorrectOn

[Patch]
if (key.codes.length > 0 && ((mProximityCorrectOn

[Demonstration 2]

[Buggy Method]
@Override
public void fire() {
    System.out.println("now we fire!");
    hbp.ammo -= 1;
    hbp.setWeaponState(hbp.getPullTriggerState());
}

[Buggy Hunk]
hbp.ammo -= 1;

[Patch]
h.getWorld().addObject(new Default(), h.getX(), h.getY());

[Demonstration 3]

[Buggy Method]
public void AddFlag(String gameName, String teamName, String flagName, String tagSerial) {
    SetFlagCapturedStatus(gameName, teamName, tagSerial, Global.FlagStatus.Not_Captured);
    SetFlagName(gameName, teamName, tagSerial, flagName);
}

[Buggy Hunk]
public void AddFlag(String gameName, String teamName, String flagName, String tagSerial)

[Patch]
public void AddFlag(String gameName, String teamName, String tagSerial, String flagName)