Buggy code:
public Control [ ] getChildren ( ) { } public TableColumn getColumn ( int index ) { } public int getColumnCount ( ) { } public int [ ] getColumnOrder ( ) { } public TableColumn [ ] getColumns ( ) { } Image getGrayUncheckedImage ( ) { } public int getGridLineWidth ( ) { } public int getHeaderHeight ( ) { } int getHeaderPadding ( ) { } public boolean getHeaderVisible ( ) { } public TableItem getItem ( int index ) { } public TableItem getItem ( Point point ) { } public int getItemCount ( ) { } public int getItemHeight ( ) { } public TableItem [ ] getItems ( ) { } int getItemY ( TableItem item ) { } public boolean getLinesVisible ( ) { } TableColumn [ ] getOrderedColumns ( ) { } public TableItem [ ] getSelection ( ) { } public int getSelectionCount ( ) { } public int getSelectionIndex ( ) { } int getSelectionIndex ( TableItem item ) { } public int [ ] getSelectionIndices ( ) { } public int getTopIndex ( ) { } Image getUncheckedImage ( ) { } void handleEvents ( Event event ) { } void headerOnMouseDoubleClick ( Event event ) { } void headerOnMouseDown ( Event event ) { } void headerOnMouseExit ( ) { } void headerOnMouseMove ( Event event ) { } void headerOnMouseUp ( Event event ) { } void headerOnPaint ( Event event ) { } void headerPaintShadow ( GC gc , int x , int y , int width , int height , boolean paintHLines , boolean paintVLines ) { } public int indexOf ( TableColumn column ) { } public int indexOf ( TableItem item ) { } static void initImages ( final Display display ) { } public boolean isSelected ( int index ) { } void onArrowDown ( int stateMask ) { } void onArrowLeft ( int stateMask ) { } void onArrowRight ( int stateMask ) { } void onArrowUp ( int stateMask ) { } void onCR ( ) { } void onDispose ( ) { } void onEnd ( int stateMask ) { } void onFocusIn ( ) { } void onFocusOut ( ) { } void onHome ( int stateMask ) { } void onKeyDown ( Event event ) { } void onMouseDoubleClick ( Event event ) { } void onMouseDown ( Event event ) { } void onMouseUp ( Event event ) { } void onPageDown ( int stateMask ) { } void onPageUp ( int stateMask ) { } void onPaint ( Event event ) { } void onResize ( Event event ) { } void onScrollHorizontal ( Event event ) { } void onScrollVertical ( Event event ) { } void onSpace ( ) { } void reassignFocus ( ) { } void redrawFromItemDownwards ( int index ) { } void redrawItem ( int itemIndex , boolean focusBoundsOnly ) { } void redrawItems ( int startIndex , int endIndex , boolean focusBoundsOnly ) { } public void remove ( int index ) { } public void remove ( int start , int end ) { } public void remove ( int [ ] indices ) { checkWidget ( ) ; if ( indices == null ) error ( ERROR_NULL_ARGUMENT ) ; if ( ( indices . length ) == 0 ) return ; int [ ] newIndices = new int [ indices . length ] ; System . arraycopy ( indices , 0 , newIndices , 0 , indices . length ) ; sort ( newIndices ) ; int start = newIndices [ ( ( newIndices . length ) - 1 ) ] ; int end = newIndices [ 0 ] ; if ( ! ( ( ( 0 <= start ) && ( start <= end ) ) && ( end < ( itemsCount ) ) ) ) { error ( ERROR_INVALID_RANGE ) ; } int lastRemovedIndex = - 1 ; <START_BUG> for ( int i = ( newIndices . length ) - 1 ; i >= 0 ; i -- ) { <END_BUG> if ( ( newIndices [ i ] ) != lastRemovedIndex ) { items [ newIndices [ i ] ] . dispose ( ) ; lastRemovedIndex = newIndices [ i ] ; } } } public void removeAll ( ) { } void removeSelectedItem ( int index ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void select ( int index ) { } public void select ( int start , int end ) { } public void select ( int [ ] indices ) { } public void selectAll ( ) { } void selectItem ( TableItem item , boolean addToSelection ) { } public void setColumnOrder ( int [ ] order ) { } void setFocusItem ( TableItem item , boolean redrawOldFocus ) { } public void setFont ( Font value ) { } void setHeaderImageHeight ( int value ) { } public void setHeaderVisible ( boolean value ) { } void setImageHeight ( int value ) { } public void setItemCount ( int count ) { } public void setLinesVisible ( boolean value ) { } public void setRedraw ( boolean value ) { } public void setSelection ( TableItem [ ] items ) { } public void setSelection ( int index ) { } public void setSelection ( int start , int end ) { } public void setSelection ( int [ ] indices ) { } public void setTopIndex ( int index ) { } public void showColumn ( TableColumn column ) { } public void showItem ( TableItem item ) { } public void showSelection ( ) { } void sort ( int [ ] items ) { } void updateColumnWidth ( TableColumn column , int width ) { } void updateHorizontalBar ( ) { } void updateHorizontalBar ( int newRightX , int rightXchange ) { } void updateVerticalBar ( ) { } }

Fix:
for ( int i = 0 ; i < ( newIndices . length ) ; i ++ ) {