Buggy code:
public abstract class JobManager implements Runnable { protected IJob [ ] awaitingJobs = new IJob [ 10 ] ; protected int jobStart = 0 ; protected int jobEnd = - 1 ; protected boolean executing = false ; protected Thread processingThread ; protected Job progressJob ; private int enableCount = 1 ; public static boolean VERBOSE = false ; public boolean activated = false ; private int awaitingClients = 0 ; public void activateProcessing ( ) { } public synchronized int awaitingJobsCount ( ) { } public synchronized IJob currentJob ( ) { } public void disable ( ) { } public void discardJobs ( String jobFamily ) { } public synchronized void enable ( ) { } protected synchronized boolean isJobWaiting ( IJob request ) { } protected synchronized void moveToNextJob ( ) { } protected void notifyIdle ( long idlingTime ) { } public boolean performConcurrentJob ( IJob searchJob , int waitingPolicy , IProgressMonitor progress ) { if ( JobManager . VERBOSE ) Util . verbose ( ( "STARTING<seq2seq4repair_space>concurrent<seq2seq4repair_space>job<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; searchJob . ensureReadyToRun ( ) ; int concurrentJobWork = 100 ; if ( progress != null ) progress . beginTask ( "" , concurrentJobWork ) ; boolean status = IJob . FAILED ; if ( ( awaitingJobsCount ( ) ) > 0 ) { switch ( waitingPolicy ) { case IJob . ForceImmediate : if ( JobManager . VERBOSE ) Util . verbose ( ( "-><seq2seq4repair_space>NOT<seq2seq4repair_space>READY<seq2seq4repair_space>-<seq2seq4repair_space>forcing<seq2seq4repair_space>immediate<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; try { disable ( ) ; status = searchJob . execute ( ( progress == null ? null : new SubProgressMonitor ( progress , concurrentJobWork ) ) ) ; } finally { enable ( ) ; } if ( JobManager . VERBOSE ) Util . verbose ( ( "FINISHED<seq2seq4repair_space>concurrent<seq2seq4repair_space>job<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; return status ; case IJob . CancelIfNotReady : if ( JobManager . VERBOSE ) Util . verbose ( ( "-><seq2seq4repair_space>NOT<seq2seq4repair_space>READY<seq2seq4repair_space>-<seq2seq4repair_space>cancelling<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; if ( JobManager . VERBOSE ) Util . verbose ( ( "CANCELED<seq2seq4repair_space>concurrent<seq2seq4repair_space>job<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; throw new OperationCanceledException ( ) ; case IJob . WaitUntilReady : int awaitingWork ; IJob previousJob = null ; IJob currentJob ; IProgressMonitor subProgress = null ; int totalWork = this . awaitingJobsCount ( ) ; if ( ( progress != null ) && ( totalWork > 0 ) ) { subProgress = new SubProgressMonitor ( progress , ( concurrentJobWork // 2 ) ) ; subProgress . beginTask ( "" , totalWork ) ; concurrentJobWork = concurrentJobWork // 2 ; } Thread t = this . processingThread ; int originalPriority = ( t == null ) ? - 1 : t . getPriority ( ) ; try { if ( t != null ) t . setPriority ( Thread . currentThread ( ) . getPriority ( ) ) ; synchronized ( this ) { ( this . awaitingClients ) ++ ; } while ( ( awaitingWork = awaitingJobsCount ( ) ) > 0 ) { if ( ( subProgress != null ) && ( subProgress . isCanceled ( ) ) ) throw new OperationCanceledException ( ) ; currentJob = currentJob ( ) ; if ( ( currentJob != null ) && ( currentJob != previousJob ) ) { if ( JobManager . VERBOSE ) Util . verbose ( ( "-><seq2seq4repair_space>NOT<seq2seq4repair_space>READY<seq2seq4repair_space>-<seq2seq4repair_space>waiting<seq2seq4repair_space>until<seq2seq4repair_space>ready<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; if ( subProgress != null ) { subProgress . subTask ( Messages . bind ( manager_filesToIndex , Integer . toString ( awaitingWork ) ) ) ; subProgress . worked ( 1 ) ; } previousJob = currentJob ; } try { if ( JobManager . VERBOSE ) Util . verbose ( ( "-><seq2seq4repair_space>GOING<seq2seq4repair_space>TO<seq2seq4repair_space>SLEEP<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; Thread . sleep ( 50 ) ; } catch ( InterruptedException e ) { } } } finally { synchronized ( this ) { ( this . awaitingClients ) -- ; } <START_BUG> if ( ( originalPriority > ( - 1 ) ) && ( t . isAlive ( ) ) ) <END_BUG> t . setPriority ( originalPriority ) ; } if ( subProgress != null ) subProgress . done ( ) ; } } status = searchJob . execute ( ( progress == null ? null : new SubProgressMonitor ( progress , concurrentJobWork ) ) ) ; if ( progress != null ) progress . done ( ) ; if ( JobManager . VERBOSE ) Util . verbose ( ( "FINISHED<seq2seq4repair_space>concurrent<seq2seq4repair_space>job<seq2seq4repair_space>-<seq2seq4repair_space>" + searchJob ) ) ; return status ; } public abstract String processName ( ) { } public synchronized void request ( IJob job ) { } public synchronized void reset ( ) { } public void run ( ) { } public void shutdown ( ) { } public String toString ( ) { } }

Fix:
if ( ( ( t != null ) && ( originalPriority > ( - 1 ) ) ) && ( t . isAlive ( ) ) )