Buggy code:
public class FilteredList extends Composite { public interface FilterMatcher { void setFilter ( String pattern , boolean ignoreCase , boolean ignoreWildCards ) { } boolean match ( Object element ) { } } private class DefaultFilterMatcher implements FilteredList . FilterMatcher { private StringMatcher fMatcher ; public void setFilter ( String pattern , boolean ignoreCase , boolean ignoreWildCards ) { } public boolean match ( Object element ) { } } private Table fList ; ILabelProvider fLabelProvider ; private boolean fMatchEmptyString = true ; private boolean fIgnoreCase ; private boolean fAllowDuplicates ; private String fFilter = "" ; private TwoArrayQuickSorter fSorter ; Object [ ] fElements = new Object [ 0 ] ; FilteredList . Label [ ] fLabels ; Vector fImages = new Vector ( ) ; int [ ] fFoldedIndices ; int fFoldedCount ; int [ ] fFilteredIndices ; int fFilteredCount ; private FilteredList . FilterMatcher fFilterMatcher = new FilteredList . DefaultFilterMatcher ( ) ; Comparator fComparator ; FilteredList . TableUpdateJob fUpdateJob ; private static class Label { public final String string ; public final Image image ; public Label ( String string , Image image ) { } public boolean equals ( FilteredList . Label label ) { } } private final class LabelComparator implements Comparator { private boolean labelIgnoreCase ; LabelComparator ( boolean ignoreCase ) { } public int compare ( Object left , Object right ) { } } public FilteredList ( Composite parent , int style , ILabelProvider labelProvider , boolean ignoreCase , boolean allowDuplicates , boolean matchEmptyString ) { } public void setElements ( Object [ ] elements ) { } public boolean isEmpty ( ) { } public void setFilterMatcher ( FilteredList . FilterMatcher filterMatcher ) { } public void setComparator ( Comparator comparator ) { } public void addSelectionListener ( SelectionListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setSelection ( int [ ] selection ) { } public int [ ] getSelectionIndices ( ) { } public int getSelectionIndex ( ) { } public void setSelection ( Object [ ] elements ) { } public Object [ ] getSelection ( ) { } public void setFilter ( String filter ) { } private void updateList ( ) { } public String getFilter ( ) { } public Object [ ] getFoldedElements ( int index ) { } private int fold ( ) { } private int filter ( ) { } private class TableUpdateJob extends WorkbenchJob { final Table fTable ; final int fCount ; private int currentIndex = 0 ; int [ ] indicesToSelect ; public TableUpdateJob ( Table table , int count ) { } public IStatus runInUIThread ( IProgressMonitor monitor ) { if ( fTable . isDisposed ( ) ) return Status . CANCEL_STATUS ; int itemCount = fTable . getItemCount ( ) ; if ( ( fCount ) < itemCount ) { fTable . setRedraw ( false ) ; fTable . remove ( fCount , ( itemCount - 1 ) ) ; fTable . setRedraw ( true ) ; itemCount = fTable . getItemCount ( ) ; } if ( ( fCount ) == 0 ) { fTable . notifyListeners ( Selection , new Event ( ) ) ; return Status . OK_STATUS ; } <START_BUG> int iterations = Math . min ( 50 , ( ( fCount ) - ( currentIndex ) ) ) ; <END_BUG> for ( int i = 0 ; i < iterations ; i ++ ) { final TableItem item = ( ( currentIndex ) < itemCount ) ? fTable . getItem ( currentIndex ) : new TableItem ( fTable , SWT . NONE ) ; final FilteredList . Label label = fLabels [ fFilteredIndices [ fFoldedIndices [ currentIndex ] ] ] ; item . setText ( label . string ) ; item . setImage ( label . image ) ; ( currentIndex ) ++ ; } if ( ( currentIndex ) < ( fCount ) ) schedule ( 100 ) ; else { if ( ( indicesToSelect ) == null ) { if ( ( fCount ) > 0 ) defaultSelect ( ) ; } else updateSelection ( indicesToSelect ) ; } return Status . OK_STATUS ; } void updateSelection ( final int [ ] indices ) { } private void defaultSelect ( ) { } private void selectAndNotify ( final int [ ] indices ) { } } public boolean getAllowDuplicates ( ) { } public void setAllowDuplicates ( boolean allowDuplicates ) { } public boolean getIgnoreCase ( ) { } public void setIgnoreCase ( boolean ignoreCase ) { } public boolean getMatchEmptyString ( ) { } public void setMatchEmptyString ( boolean matchEmptyString ) { } public ILabelProvider getLabelProvider ( ) { } public void setLabelProvider ( ILabelProvider labelProvider ) { } }

Fix:
int iterations = Math . min ( 10 , ( ( fCount ) - ( currentIndex ) ) ) ;