candidate.set(candidateEnd++, item.toAddress()); lock.release();
try { lock.acquire(); int origLength = candidate.length(); if (candidateEnd >= origLength) {  AddressArray newCandidate = AddressArray.create((int) (growthFactor * origLength)); for (int i=0; i<origLength; i++) { newCandidate.set(i, candidate.get(i)); } candidate = newCandidate; } candidate.set(candidateEnd++, item.toAddress()); } finally { lock.release(); }
  public static final void addCandidate(ObjectReference item)      throws NoInlinePragma, InterruptiblePragma {    lock.acquire();    int origLength = candidate.length();    if (candidateEnd >= origLength) {      AddressArray newCandidate = AddressArray.create((int) (growthFactor * origLength));      for (int i = 0; i < origLength; i++)        newCandidate.set(i, candidate.get(i));      candidate = newCandidate;    }    candidate.set(candidateEnd++, item.toAddress());    lock.release();  }