[Demonstration 1]

[Buggy Method]
private static Iterable<Integer> actions(State state) {
    int columns = state.getColumns();
    int rows = state.getRows();
    int[][] gameBoard = state.getGameBoard();
    ArrayList<Integer> actions = new ArrayList<>(columns);
    for (int column = 0; column < column; column++) {
        if (gameBoard[column][rows - 1] == 0) {
            actions.add(column);
        }
    }
    return actions;
}

[Buggy Hunk]
for (int column = 0; column < column; column++) {

[Patch]
for (int column = 0; column < columns; column++) {

[Demonstration 2]

[Buggy Method]
@SuppressWarnings("deprecation")
private void registerBroadcastReceivers() {
    if (networkConnectionMonitor == null) {
        networkConnectionMonitor = new NetworkConnectionIntentReceiver();
        registerReceiver(networkConnectionMonitor, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
    }
    if (Build.VERSION.SDK_INT < 14) /**
     * Build.VERSION_CODES.ICE_CREAM_SANDWICH*
     */
    {
        // Support the old system for background data preferences
        ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
        backgroundDataEnabled = cm.getBackgroundDataSetting();
        if (backgroundDataPreferenceMonitor == null) {
            backgroundDataPreferenceMonitor = new BackgroundDataPreferenceReceiver();
            registerReceiver(backgroundDataPreferenceMonitor, new IntentFilter(ConnectivityManager.ACTION_BACKGROUND_DATA_SETTING_CHANGED));
        }
    }
}

[Buggy Hunk]
backgroundDataEnabled = cm.getBackgroundDataSetting();

[Patch]
backgroundDataEnabled = cm != null ? cm.getBackgroundDataSetting() : true;

[Demonstration 3]

[Buggy Method]
public Rectangle getCellBounds(final Column column, final T element) {
    checkWidget();
    //
    // Ensure the viewport isn't invalidated before getting coordinates.
    //
    viewport.calculateVisibleCellRange(gc);
    final Row<T> row = gridModel.getRow(element);
    final boolean isGroupColumn = getGroupByColumns().contains(column);
    if ((row != null) && (column != null)) {
        final int columnX = isGroupColumn ? gridRenderer.getGroupColumnX(gc, column, row) : viewport.getColumnViewportX(gc, column);
        final int rowY = viewport.getRowViewportY(gc, row);
        final int rowHeight = getRowHeight(row);
        if (columnX != -1 && rowY != -1) {
            return new Rectangle(columnX, rowY, column.getWidth(), rowHeight);
        }
    }
    return null;
}

[Buggy Hunk]
return new Rectangle(columnX, rowY, column.getWidth(), rowHeight);

[Patch]
return new Rectangle(columnX, rowY, viewport.getColumnWidth(columnX, column), rowHeight);