Buggy code:
static final String PROGRESS_FOLDER = "icons//full//progress//" ; private static final String PROGRESS_20 = "progress20.gif" ; private static final String PROGRESS_40 = "progress40.gif" ; private static final String PROGRESS_60 = "progress60.gif" ; private static final String PROGRESS_80 = "progress80.gif" ; private static final String PROGRESS_100 = "progress100.gif" ; private static final String SLEEPING_JOB = "sleeping.gif" ; private static final String WAITING_JOB = "waiting.gif" ; private static final String BLOCKED_JOB = "lockedstate.gif" ; private static final String BUSY_OVERLAY = "progressspin.gif" ; private static final String MAXIMIZE = "maximize.gif" ; private static final String MINIMIZE = "minimize.gif" ; private static final String PROGRESS_20_KEY = "PROGRESS_20" ; private static final String PROGRESS_40_KEY = "PROGRESS_40" ; private static final String PROGRESS_60_KEY = "PROGRESS_60" ; private static final String PROGRESS_80_KEY = "PROGRESS_80" ; private static final String PROGRESS_100_KEY = "PROGRESS_100" ; public static final String SLEEPING_JOB_KEY = "SLEEPING_JOB" ; public static final String WAITING_JOB_KEY = "WAITING_JOB" ; public static final String BLOCKED_JOB_KEY = "LOCKED_JOB" ; public static final String BUSY_OVERLAY_KEY = "BUSY_OVERLAY" ; public static final String MINIMIZE_KEY = "MINIMIZE_FLOATING" ; public static final String MAXIMIZE_KEY = "MAXIMIZE_FLOATING" ; static final String [ ] keys = new String [ ] { ProgressManager . PROGRESS_20_KEY , ProgressManager . PROGRESS_40_KEY , ProgressManager . PROGRESS_60_KEY , ProgressManager . PROGRESS_80_KEY , ProgressManager . PROGRESS_100_KEY } ; final Map runnableMonitors = Collections . synchronizedMap ( new HashMap ( ) ) ; public static ProgressManager getInstance ( ) { } public static Image getProgressImageFor ( int done ) { } class JobMonitor implements IProgressMonitorWithBlocking { Job job ; String currentTaskName ; IProgressMonitorWithBlocking listener ; JobMonitor ( Job newJob ) { } void addProgressListener ( IProgressMonitorWithBlocking monitor ) { } public void beginTask ( String taskName , int totalWork ) { } public void done ( ) { } public void internalWorked ( double work ) { } public boolean isCanceled ( ) { } public void setCanceled ( boolean value ) { } public void setTaskName ( String taskName ) { } public void subTask ( String name ) { } public void worked ( int work ) { } public void clearBlocked ( ) { } public void setBlocked ( IStatus reason ) { } } ProgressManager ( ) { } private void createChangeListener ( ) { changeListener = new JobChangeAdapter ( ) { public void aboutToRun ( IJobChangeEvent event ) { JobInfo info = getJobInfo ( event . getJob ( ) ) ; refreshJobInfo ( info ) ; Iterator startListeners = busyListenersForJob ( event . getJob ( ) ) . iterator ( ) ; while ( startListeners . hasNext ( ) ) { IJobBusyListener next = ( ( IJobBusyListener ) ( startListeners . next ( ) ) ) ; next . incrementBusy ( event . getJob ( ) ) ; } if ( event . getJob ( ) . isUser ( ) ) { boolean noDialog = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) . getBoolean ( RUN_IN_BACKGROUND ) ; if ( ! noDialog ) { final IJobChangeEvent finalEvent = event ; WorkbenchJob showJob = new WorkbenchJob ( ProgressMessages . getString ( "ProgressManager.showInDialogName" ) ) { public IStatus runInUIThread ( IProgressMonitor monitor ) { showInDialog ( null , finalEvent . getJob ( ) ) ; return Status . OK_STATUS ; } } ; showJob . setSystem ( true ) ; showJob . schedule ( ) ; return ; } } } public void done ( IJobChangeEvent event ) { if ( ! ( PlatformUI . isWorkbenchRunning ( ) ) ) return ; Iterator startListeners = busyListenersForJob ( event . getJob ( ) ) . iterator ( ) ; while ( startListeners . hasNext ( ) ) { IJobBusyListener next = ( ( IJobBusyListener ) ( startListeners . next ( ) ) ) ; next . decrementBusy ( event . getJob ( ) ) ; } JobInfo info = getJobInfo ( event . getJob ( ) ) ; <START_BUG> if ( ( event . getResult ( ) . getSeverity ( ) ) == ( IStatus . ERROR ) ) { <END_BUG> errorManager . addError ( event . getResult ( ) , event . getJob ( ) . getName ( ) ) ; } jobs . remove ( event . getJob ( ) ) ; removeJobInfo ( info ) ; if ( ( hasNoRegularJobInfos ( ) ) && ( ! ( isNonDisplayableJob ( event . getJob ( ) , false ) ) ) ) refreshAll ( ) ; } public void scheduled ( IJobChangeEvent event ) { if ( isNeverDisplayedJob ( event . getJob ( ) ) ) return ; if ( jobs . containsKey ( event . getJob ( ) ) ) refreshJobInfo ( getJobInfo ( event . getJob ( ) ) ) ; else { addJobInfo ( new JobInfo ( event . getJob ( ) ) ) ; } } } ; } private void setUpImage ( URL iconsRoot , String fileName , String key ) throws MalformedURLException { } public IProgressMonitor createMonitor ( Job job ) { } public IProgressMonitor getDefaultMonitor ( ) { } public ProgressManager . JobMonitor progressFor ( Job job ) { } void addListener ( IJobProgressManagerListener listener ) { } void removeListener ( IJobProgressManagerListener listener ) { } JobInfo getJobInfo ( Job job ) { } public void refreshJobInfo ( JobInfo info ) { } public void refreshGroup ( GroupInfo info ) { } public void refreshAll ( ) { } public void removeJobInfo ( JobInfo info ) { } public void removeGroup ( GroupInfo group ) { } public void addJobInfo ( JobInfo info ) { } public void addGroup ( GroupInfo info ) { } boolean isNonDisplayableJob ( Job job , boolean debug ) { } private boolean isNeverDisplayedJob ( Job job ) { } public JobInfo [ ] getJobInfos ( boolean debug ) { } public JobTreeElement [ ] getRootElements ( boolean debug ) { } public boolean hasJobInfos ( ) { } private boolean hasNoRegularJobInfos ( ) { } Image getImage ( ImageData source ) { }

Fix:
if ( ( ( event . getResult ( ) ) != null ) && ( ( event . getResult ( ) . getSeverity ( ) ) == ( IStatus . ERROR ) ) ) {