private Thread resolutionCandidate(Thread[] candidates) {
for (int i = 0; i < candidates.length; i++) {
if (!ownsRuleLocks(candidates[i]))
return candidates[i];
}
<BUG>for (int i = 0; i < candidates.length; i++) {
if (ownsRealLocks(candidates[i]))
return candidates[i];
}</BUG>
return candidates[0];

private Thread resolutionCandidate(Thread[] candidates) {
for (int i = 0; i < candidates.length; i++) {
if (!ownsRuleLocks(candidates[i]))
return candidates[i];
