ISchedulingRule[] locksToSuspend = realLocksForThread(candidate);
Deadlock deadlock = new Deadlock(threads, locksToSuspend, candidate);
reportDeadlock(deadlock);
if (JobManager.DEBUG_DEADLOCK)
throw new IllegalStateException("Deadlock detected. Caused by thread " + client.getName() + '.'); //$NON-NLS-1$
<BUG>for (int i = 0; i < locksToSuspend.length; i++)
setToWait(deadlock.getCandidate(), locksToSuspend[i], true);
</BUG>
return deadlock;
}

ISchedulingRule[] locksToSuspend = realLocksForThread(candidate);
Deadlock deadlock = new Deadlock(threads, locksToSuspend, candidate);
reportDeadlock(deadlock);
if (JobManager.DEBUG_DEADLOCK)
throw new IllegalStateException("Deadlock detected. Caused by thread " + client.getName() + '.'); //$NON-NLS-1$
for (ISchedulingRule element : locksToSuspend)
setToWait(deadlock.getCandidate(), element, true);
return deadlock;
}
