Buggy code:
void init ( JobTreeElement info ) { } protected void dump ( String message ) { } void setKept ( ) { } public void handleEvent ( Event e ) { } Job getJob ( ) { } public boolean kill ( boolean refresh , boolean broadcast ) { } boolean checkKeep ( ) { } void setKeep ( ) { } abstract boolean refresh ( ) { } public boolean remove ( ) { } } class Hyperlink extends NewProgressViewer . JobTreeItem implements IPropertyChangeListener , Listener { static final int MARGINWIDTH = 1 ; static final int MARGINHEIGHT = 1 ; boolean hasFocus ; boolean mouseOver ; boolean isError ; boolean linkEnabled ; boolean foundImage ; String text = "" ; IAction gotoAction ; IStatus result ; NewProgressViewer . JobItem jobitem ; Hyperlink ( NewProgressViewer . JobItem parent , JobTreeElement info ) { } boolean isLinkEnabled ( ) { } public void handleEvent ( Event e ) { } private void setText ( String t ) { } private void setAction ( IAction action ) { } private void setLinkEnable ( boolean enable ) { } private void updateToolTip ( ) { } public void propertyChange ( PropertyChangeEvent event ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } private Color getFGColor ( ) { } protected void paint ( GC gc ) { } protected boolean handleActivate ( ) { } public boolean refresh ( ) { } } class JobItem extends NewProgressViewer . JobTreeItem { static final int MARGIN = 2 ; static final int HGAP = 7 ; static final int VGAP = 1 ; static final int MAX_PROGRESS_HEIGHT = 12 ; static final int MIN_ICON_SIZE = 16 ; int cachedWidth = - 1 ; int cachedHeight = - 1 ; private Image image ; private boolean disposeImage ; private boolean locked ; Label nameItem ; Label iconItem ; ProgressBar progressBar ; ToolBar actionBar ; ToolItem actionButton ; ToolItem gotoButton ; boolean selected ; JobItem ( Composite parent , JobTreeElement info ) { } void createChild ( JobTreeElement jte ) { } void updateIcon ( Job job ) { } boolean cancelOrRemove ( ) { } public void handleEvent ( Event event ) { } public boolean remove ( ) { } private boolean aboutToKeep ( ) { } public boolean kill ( boolean refresh , boolean broadcast ) { } void handleResize ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void updateBackground ( boolean dark ) { } boolean setPercentDone ( int percentDone ) { } boolean isCanceled ( ) { } IStatus getResult ( ) { } public boolean refresh ( ) { } private String getGroupHeader ( GroupInfo gi ) { } } private String getJobNameAndStatus ( JobInfo ji , Job job , boolean terminated , boolean withTime ) { } private String getFinishedString ( JobTreeElement jte , String name , boolean withTime ) { } private String getTimeString ( JobTreeElement jte ) { } private String stripPercent ( String s ) { } public NewProgressViewer ( Composite parent , int flags ) { } public void setFocus ( ) { } public Control getControl ( ) { } private boolean filtered ( Object element ) { } private boolean jobFiltered ( JobInfo ji ) { } public void add ( Object parentElement , Object [ ] elements ) { } public void remove ( Object [ ] elements ) { if ( list . isDisposed ( ) ) return ; <START_BUG> if ( ( NewProgressViewer . DEBUG ) || true ) <END_BUG> System . err . println ( "remove" ) ; boolean changed = false ; for ( int i = 0 ; i < ( elements . length ) ; i ++ ) { NewProgressViewer . JobTreeItem ji = findJobItem ( elements [ i ] , false ) ; if ( ji != null ) changed |= ji . remove ( ) ; } relayout ( changed , changed ) ; } public void refresh ( Object element , boolean updateLabels ) { } public void refresh ( boolean updateLabels ) { } private NewProgressViewer . JobItem createItem ( Object element ) { } private NewProgressViewer . JobTreeItem findJobItem ( Object element , boolean create ) { } public void reveal ( NewProgressViewer . JobTreeItem jti ) { } private void relayout ( boolean layout , boolean refreshBackgrounds ) { } void clearAll ( ) { } private Control [ ] getSortedChildren ( ) { } private void select ( NewProgressViewer . JobItem newSelection , Event e ) { } static String shortenText ( GC gc , int maxWidth , String textValue ) { } static String shortenText ( Control control , String textValue ) { } Object [ ] contentProviderGetChildren ( Object parent ) { } Object [ ] contentProviderGetRoots ( Object parent ) { } private void forcedRemove ( final JobTreeElement jte ) { } public void finished ( JobTreeElement jte ) { } public void removed ( JobTreeElement info ) { } public ISelection getSelection ( ) { } public void setSelection ( ISelection selection ) { } public void setUseHashlookup ( boolean b ) { } public void setInput ( IContentProvider provider ) { } public void cancelSelection ( ) { } void doSelection ( ) { } protected void addTreeListener ( Control c , TreeListener listener ) { } protected void doUpdateItem ( final Item item , Object element ) { } protected Item [ ] getChildren ( Widget o ) { } protected boolean getExpanded ( Item item ) { } protected Item getItem ( int x , int y ) { } protected int getItemCount ( Control widget ) { } protected int getItemCount ( Item item ) { } protected Item [ ] getItems ( Item item ) { } protected Item getParentItem ( Item item ) { }

Fix:
if ( NewProgressViewer . DEBUG )