nus-yam/ex-repair huggingface dataset:
Program: 149731
Project: 149731
Buggy source:
/** 
 * Does this event type accept the supplied number of attributes of each type.
 * @param numInt The number of int attributes.
 * @param numLong The number of long attributes.
 * @param numDouble The number of double attributes.
 * @param numString The number of String attributes.
 * @return True if the event will accept attributes of the specified types.
 */
public boolean admits(int numInt,int numLong,int numDouble,int numString){
  return (numInt == numberOfInts) && (numLong == numLong) && (numDouble == numberOfDoubles)&& (numString == numberOfStrings);
}

Fixed version (ground truth):
/** 
 * Does this event type accept the supplied number of attributes of each type.
 * @param numInt The number of int attributes.
 * @param numLong The number of long attributes.
 * @param numDouble The number of double attributes.
 * @param numString The number of String attributes.
 * @return True if the event will accept attributes of the specified types.
 */
public boolean admits(int numInt,int numLong,int numDouble,int numString){
  return (numInt == numberOfInts) && (numLong == numberOfLongs) && (numDouble == numberOfDoubles)&& (numString == numberOfStrings);
}
Program: 149734
Project: 149734
Buggy source:
@Override public void run(){
  JavaThreadModel.collectorThreadLocal.set(collector);
  model.waitForGCStart();
  code.execute(new Env());
  model.collectorThreads.remove(this);
  model.exitGC();
}

Fixed version (ground truth):
@Override public void run(){
  JavaThreadModel.setCurrentCollector(collector);
  model.waitForGCStart();
  code.execute(new Env());
  model.removeCollector(this);
  model.exitGC();
}
Program: 149735
Project: 149735
Buggy source:
@Override public void run(){
  JavaThreadModel.collectorThreadLocal.set(collector);
  collector.run();
}

Fixed version (ground truth):
@Override public void run(){
  JavaThreadModel.setCurrentCollector(collector);
  collector.run();
}
Program: 149736
Project: 149736
Buggy source:
/** 
 * Perform the delicate operation of leaving the mutator pool. If there's a GC scheduled, and we are the last thread to join, join the GC (because we are required to trigger it) and then exit. Otherwise, just decrement the mutator count and leave.
 */
void leaveMutatorPool(){
synchronized (count) {
    boolean lastToGC=(mutatorsWaitingForGC == (activeMutators - 1));
    if (!lastToGC) {
      decActiveMutators();
      return;
    }
    mutatorsWaitingForGC++;
  }
  waitForGC(true);
synchronized (count) {
    mutatorsWaitingForGC--;
    decActiveMutators();
  }
}

Fixed version (ground truth):
/** 
 * Perform the delicate operation of leaving the mutator pool. If there's a GC scheduled, and we are the last thread to join, join the GC (because we are required to trigger it) and then exit. Otherwise, just decrement the mutator count and leave.
 */
void leaveMutatorPool(MutatorThread m){
  Trace.trace(Item.SCHEDULER,"String_Node_Str",Thread.currentThread().getId());
synchronized (count) {
    boolean lastToGC=(mutatorsWaitingForGC == (activeMutators - 1));
    if (!lastToGC) {
      decActiveMutators();
      return;
    }
    mutatorsWaitingForGC++;
  }
  waitForGC(true);
synchronized (count) {
    mutatorsWaitingForGC--;
    decActiveMutators();
  }
  mutatorThreads.remove(m);
}
Program: 149737
Project: 149737
Buggy source:
/** 
 * Wait for the mutator threads to exit.
 * @see org.mmtk.harness.scheduler.ThreadModel#schedule()
 */
@Override public void schedule(){
  startRunning();
  while (activeMutators > 0) {
synchronized (count) {
      try {
        count.wait();
      }
 catch (      InterruptedException e) {
      }
      System.err.println("String_Node_Str" + activeMutators);
    }
  }
}

Fixed version (ground truth):
/** 
 * Wait for the mutator threads to exit.
 * @see org.mmtk.harness.scheduler.ThreadModel#schedule()
 */
@Override public void schedule(){
  startRunning();
  while (mutatorThreads.size() > activeMutators) {
synchronized (count) {
      try {
        count.wait();
      }
 catch (      InterruptedException e) {
      }
      Trace.trace(Item.SCHEDULER,"String_Node_Str" + activeMutators);
    }
  }
  while (activeMutators > 0) {
synchronized (count) {
      try {
        count.wait();
      }
 catch (      InterruptedException e) {
      }
      Trace.trace(Item.SCHEDULER,"String_Node_Str" + activeMutators);
    }
  }
}
Program: 149738
Project: 149738
Buggy source:
private void incActiveMutators(){
  activeMutators++;
}

Fixed version (ground truth):
private void incActiveMutators(){
  activeMutators++;
  count.notify();
}
Program: 149739
Project: 149739
Buggy source:
private void endMutator(){
  model.leaveMutatorPool();
}

Fixed version (ground truth):
private void endMutator(){
  model.leaveMutatorPool(this);
}
Program: 149740
Project: 149740
Buggy source:
/** 
 * Recompute the normal out edges of 'this' based on the semantics of the branch instructions in the block. WARNING: Use this method with caution.  It does not update the CFG edges correctly if the method contains certain instructions such as throws and returns.  Incorrect liveness info and GC maps result, causing crashes during GC.  CMVC Defect 171189
 */
public final void recomputeNormalOut(IR ir){
  deleteNormalOut();
  for (InstructionEnumeration e=enumerateBranchInstructions(); e.hasMoreElements(); ) {
    Instruction branch=e.next();
    BasicBlockEnumeration targets=branch.getBranchTargets();
    while (targets.hasMoreElements()) {
      insertOut(targets.next());
    }
  }
  BasicBlock fallThrough=getFallThroughBlock();
  if (fallThrough != null) {
    insertOut(fallThrough);
  }
  if (hasReturn()) {
    insertOut(ir.cfg.exit());
  }
 else   if (hasAthrowInst() || hasNonReturningCall()) {
    if (mayThrowUncaughtException()) {
      insertOut(ir.cfg.exit());
    }
  }
 else   if (hasNonReturningOsr()) {
    insertOut(ir.cfg.exit());
  }
}

Fixed version (ground truth):
/** 
 * Recompute the normal out edges of 'this' based on the semantics of the branch instructions in the block. WARNING: Use this method with caution.  It does not update the CFG edges correctly if the method contains certain instructions such as throws and returns.  Incorrect liveness info and GC maps result, causing crashes during GC.  CMVC Defect 171189
 */
public final void recomputeNormalOut(IR ir){
  deleteNormalOut();
  for (InstructionEnumeration e=enumerateBranchInstructions(); e.hasMoreElements(); ) {
    Instruction branch=e.next();
    BasicBlockEnumeration targets=branch.getBranchTargets();
    while (targets.hasMoreElements()) {
      BasicBlock targetBlock=targets.next();
      if (targetBlock.isExceptionHandlerBasicBlock()) {
        targetBlock.setExceptionHandlerWithNormalIn();
      }
      insertOut(targetBlock);
    }
  }
  BasicBlock fallThrough=getFallThroughBlock();
  if (fallThrough != null) {
    if (fallThrough.isExceptionHandlerBasicBlock()) {
      fallThrough.setExceptionHandlerWithNormalIn();
    }
    insertOut(fallThrough);
  }
  if (hasReturn()) {
    insertOut(ir.cfg.exit());
  }
 else   if (hasAthrowInst() || hasNonReturningCall()) {
    if (mayThrowUncaughtException()) {
      insertOut(ir.cfg.exit());
    }
  }
 else   if (hasNonReturningOsr()) {
    insertOut(ir.cfg.exit());
  }
}
Program: 149741
Project: 149741
Buggy source:
private boolean isExceptionHandlerWithNormalIn(){
  return (flags & EXCEPTION_HANDLER_WITH_NORMAL_IN) != 0;
}

Fixed version (ground truth):
public final boolean isExceptionHandlerWithNormalIn(){
  return (flags & EXCEPTION_HANDLER_WITH_NORMAL_IN) != 0;
}
Program: 149742
Project: 149742
Buggy source:
@NoInline @Unpreemptible private void timedWaitRelativeNicelyImpl(long delayNanos){
  RVMThread.enterNative();
  timedWaitRelative(delayNanos);
  int recCount=unlockCompletely();
  RVMThread.leaveNative();
  relockNicelyImpl(recCount);
}

Fixed version (ground truth):
@NoInline @Unpreemptible @NoOptCompile private void timedWaitRelativeNicelyImpl(long delayNanos){
  RVMThread.enterNative();
  timedWaitRelative(delayNanos);
  int recCount=unlockCompletely();
  RVMThread.leaveNative();
  relockNicelyImpl(recCount);
}
Program: 149743
Project: 149743
Buggy source:
/** 
 * Send a broadcast, which should awaken anyone who is currently blocked in any of the wait methods.  This method should (in principle) be non-blocking, and, as such, it does not notify the threading subsystem that it is blocking.
 */
public void broadcast(){
  sysCall.sysPthreadCondBroadcast(cond);
}

Fixed version (ground truth):
/** 
 * Send a broadcast, which should awaken anyone who is currently blocked in any of the wait methods.  This method should (in principle) be non-blocking, and, as such, it does not notify the threading subsystem that it is blocking.
 */
@NoInline @NoOptCompile public void broadcast(){
  sysCall.sysPthreadCondBroadcast(cond);
}
Program: 149744
Project: 149744
Buggy source:
@NoInline @Unpreemptible private void lockNicelyNoRecImpl(){
  for (; ; ) {
    RVMThread.enterNative();
    sysCall.sysPthreadMutexLock(mutex);
    if (RVMThread.attemptLeaveNativeNoBlock()) {
      return;
    }
 else {
      sysCall.sysPthreadMutexUnlock(mutex);
      RVMThread.leaveNative();
    }
  }
}

Fixed version (ground truth):
@NoInline @Unpreemptible @NoOptCompile private void lockNicelyNoRecImpl(){
  for (; ; ) {
    RVMThread.enterNative();
    sysCall.sysPthreadMutexLock(mutex);
    if (RVMThread.attemptLeaveNativeNoBlock()) {
      return;
    }
 else {
      sysCall.sysPthreadMutexUnlock(mutex);
      RVMThread.leaveNative();
    }
  }
}
Program: 149745
Project: 149745
Buggy source:
@NoInline public static void unlock(boolean b,HeavyCondLock l){
  if (b)   l.unlock();
}

Fixed version (ground truth):
@NoInline @NoOptCompile public static void unlock(boolean b,HeavyCondLock l){
  if (b)   l.unlock();
}
Program: 149746
Project: 149746
Buggy source:
/** 
 * Completely release the lock, ignoring recursion.  Returns the recursion count.
 */
public int unlockCompletely(){
  int result=recCount;
  recCount=0;
  holder=null;
  sysCall.sysPthreadMutexUnlock(mutex);
  return result;
}

Fixed version (ground truth):
/** 
 * Completely release the lock, ignoring recursion.  Returns the recursion count.
 */
@NoInline @NoOptCompile public int unlockCompletely(){
  int result=recCount;
  recCount=0;
  holderSlot=-1;
  sysCall.sysPthreadMutexUnlock(mutex);
  return result;
}
Program: 149747
Project: 149747
Buggy source:
/** 
 * Wait until someone calls broadcast, or until at least the given number of nanoseconds pass. <p> This blocking method method does not notify the threading subsystem that it is blocking.  Thus, if someone (like, say, the GC) requests that the thread is blocked then their request will block until this method unblocks.  If this sounds like it might be undesirable, call timedWaitRelativeNicely instead.
 */
public void timedWaitRelative(long delayNanos){
  long now=sysCall.sysNanoTime();
  timedWaitAbsolute(now + delayNanos);
}

Fixed version (ground truth):
/** 
 * Wait until someone calls broadcast, or until at least the given number of nanoseconds pass. <p> This blocking method method does not notify the threading subsystem that it is blocking.  Thus, if someone (like, say, the GC) requests that the thread is blocked then their request will block until this method unblocks.  If this sounds like it might be undesirable, call timedWaitRelativeNicely instead.
 */
@NoInline @NoOptCompile public void timedWaitRelative(long delayNanos){
  long now=sysCall.sysNanoTime();
  timedWaitAbsolute(now + delayNanos);
}
Program: 149748
Project: 149748
Buggy source:
/** 
 * Wait until someone calls broadcast, or until the clock reaches the given time. <p> This blocking method method does not notify the threading subsystem that it is blocking.  Thus, if someone (like, say, the GC) requests that the thread is blocked then their request will block until this method unblocks.  If this sounds like it might be undesirable, call timedWaitAbsoluteNicely instead.
 */
public void timedWaitAbsolute(long whenWakeupNanos){
  int recCount=this.recCount;
  this.recCount=0;
  holder=null;
  sysCall.sysPthreadCondTimedWait(cond,mutex,whenWakeupNanos);
  this.recCount=recCount;
  holder=RVMThread.getCurrentThread();
}

Fixed version (ground truth):
/** 
 * Wait until someone calls broadcast, or until the clock reaches the given time. <p> This blocking method method does not notify the threading subsystem that it is blocking.  Thus, if someone (like, say, the GC) requests that the thread is blocked then their request will block until this method unblocks.  If this sounds like it might be undesirable, call timedWaitAbsoluteNicely instead.
 */
@NoInline @NoOptCompile public void timedWaitAbsolute(long whenWakeupNanos){
  int recCount=this.recCount;
  this.recCount=0;
  holderSlot=-1;
  sysCall.sysPthreadCondTimedWait(cond,mutex,whenWakeupNanos);
  if (VM.VerifyAssertions)   VM._assert(holderSlot == -1);
  if (VM.VerifyAssertions)   VM._assert(this.recCount == 0);
  this.recCount=recCount;
  holderSlot=RVMThread.getCurrentThreadSlot();
}
Program: 149749
Project: 149749
Buggy source:
@NoInline @Unpreemptible private void timedWaitAbsoluteNicelyImpl(long whenWakeupNanos){
  RVMThread.enterNative();
  timedWaitAbsolute(whenWakeupNanos);
  int recCount=unlockCompletely();
  RVMThread.leaveNative();
  relockNicelyImpl(recCount);
}

Fixed version (ground truth):
@NoInline @Unpreemptible @NoOptCompile private void timedWaitAbsoluteNicelyImpl(long whenWakeupNanos){
  RVMThread.enterNative();
  timedWaitAbsolute(whenWakeupNanos);
  int recCount=unlockCompletely();
  RVMThread.leaveNative();
  relockNicelyImpl(recCount);
}
Program: 149750
Project: 149750
Buggy source:
@NoInline @Unpreemptible private void relockNicelyImpl(int recCount){
  for (; ; ) {
    RVMThread.enterNative();
    sysCall.sysPthreadMutexLock(mutex);
    if (RVMThread.attemptLeaveNativeNoBlock()) {
      break;
    }
 else {
      sysCall.sysPthreadMutexUnlock(mutex);
      RVMThread.leaveNative();
    }
  }
  holder=RVMThread.getCurrentThread();
  this.recCount=recCount;
}

Fixed version (ground truth):
@NoInline @Unpreemptible @NoOptCompile private void relockNicelyImpl(int recCount){
  for (; ; ) {
    RVMThread.enterNative();
    sysCall.sysPthreadMutexLock(mutex);
    if (RVMThread.attemptLeaveNativeNoBlock()) {
      break;
    }
 else {
      sysCall.sysPthreadMutexUnlock(mutex);
      RVMThread.leaveNative();
    }
  }
  if (VM.VerifyAssertions)   VM._assert(holderSlot == -1);
  if (VM.VerifyAssertions)   VM._assert(this.recCount == 0);
  holderSlot=RVMThread.getCurrentThreadSlot();
  this.recCount=recCount;
}
Program: 149751
Project: 149751
Buggy source:
@NoInline @Unpreemptible private void waitNicelyImpl(){
  RVMThread.enterNative();
  await();
  int recCount=unlockCompletely();
  RVMThread.leaveNative();
  relockNicelyImpl(recCount);
}

Fixed version (ground truth):
@NoInline @Unpreemptible @NoOptCompile private void waitNicelyImpl(){
  RVMThread.enterNative();
  await();
  int recCount=unlockCompletely();
  RVMThread.leaveNative();
  relockNicelyImpl(recCount);
}
Program: 149752
Project: 149752
Buggy source:
/** 
 * Wait until it is possible to acquire the lock and then acquire it. There is no bound on how long you might wait, if someone else is holding the lock and there is no bound on how long they will hold it. As well, even if there is a bound on how long a thread might hold a lock but there are multiple threads contending on its acquisition, there will not necessarily be a bound on how long any particular thread will wait until it gets its turn. <p> This blocking method method notifies the threading subsystem that it is blocking.  Thus, it may be safer than calling lock.  But, its reliance on threading subsystem accounting methods may mean that it cannot be used in certain contexts (say, the threading subsystem itself). <p> This method will ensure that if it blocks, it does so with the mutex not held.  This is useful for cases where the subsystem that requested you to block needs to acquire the lock you were trying to acquire when the blocking request came. <p> It is usually not necessary to call this method instead of lock(), since most VM locks are held for short periods of time.
 */
@Unpreemptible("String_Node_Str") public void lockNicely(){
  RVMThread t=RVMThread.getCurrentThread();
  if (t != holder) {
    lockNicelyNoRec();
    holder=t;
  }
  recCount++;
  acquireCount++;
}

Fixed version (ground truth):
/** 
 * Wait until it is possible to acquire the lock and then acquire it. There is no bound on how long you might wait, if someone else is holding the lock and there is no bound on how long they will hold it. As well, even if there is a bound on how long a thread might hold a lock but there are multiple threads contending on its acquisition, there will not necessarily be a bound on how long any particular thread will wait until it gets its turn. <p> This blocking method method notifies the threading subsystem that it is blocking.  Thus, it may be safer than calling lock.  But, its reliance on threading subsystem accounting methods may mean that it cannot be used in certain contexts (say, the threading subsystem itself). <p> This method will ensure that if it blocks, it does so with the mutex not held.  This is useful for cases where the subsystem that requested you to block needs to acquire the lock you were trying to acquire when the blocking request came. <p> It is usually not necessary to call this method instead of lock(), since most VM locks are held for short periods of time.
 */
@Unpreemptible("String_Node_Str") @NoInline @NoOptCompile public void lockNicely(){
  int mySlot=RVMThread.getCurrentThreadSlot();
  if (mySlot != holderSlot) {
    lockNicelyNoRec();
    if (VM.VerifyAssertions)     VM._assert(holderSlot == -1);
    if (VM.VerifyAssertions)     VM._assert(recCount == 0);
    holderSlot=mySlot;
  }
  recCount++;
  acquireCount++;
}
Program: 149753
Project: 149753
Buggy source:
/** 
 * Send a broadcast after first acquiring the lock.  Release the lock after sending the broadacst.  In most cases where you want to send a broadcast but you don't need to acquire the lock to set the condition that the other thread(s) are waiting on, you want to call this method instead of <code>broadcast</code>.
 */
public void lockedBroadcast(){
  lock();
  broadcast();
  unlock();
}

Fixed version (ground truth):
/** 
 * Send a broadcast after first acquiring the lock.  Release the lock after sending the broadacst.  In most cases where you want to send a broadcast but you don't need to acquire the lock to set the condition that the other thread(s) are waiting on, you want to call this method instead of <code>broadcast</code>.
 */
@NoInline @NoOptCompile public void lockedBroadcast(){
  lock();
  broadcast();
  unlock();
}
Program: 149754
Project: 149754
Buggy source:
/** 
 * Relock the mutex after using unlockCompletely.
 */
public void relock(int recCount){
  sysCall.sysPthreadMutexLock(mutex);
  holder=RVMThread.getCurrentThread();
  this.recCount=recCount;
  acquireCount++;
}

Fixed version (ground truth):
/** 
 * Relock the mutex after using unlockCompletely.
 */
@NoInline @NoOptCompile public void relock(int recCount){
  sysCall.sysPthreadMutexLock(mutex);
  if (VM.VerifyAssertions)   VM._assert(holderSlot == -1);
  if (VM.VerifyAssertions)   VM._assert(this.recCount == 0);
  holderSlot=RVMThread.getCurrentThreadSlot();
  this.recCount=recCount;
  acquireCount++;
}
Program: 149755
Project: 149755
Buggy source:
/** 
 * Wait until someone calls broadcast. <p> This blocking method method does not notify the threading subsystem that it is blocking.  Thus, if someone (like, say, the GC) requests that the thread is blocked then their request will block until this method unblocks.  If this sounds like it might be undesirable, call waitNicely instead.
 */
public void await(){
  int recCount=this.recCount;
  this.recCount=0;
  holder=null;
  sysCall.sysPthreadCondWait(cond,mutex);
  this.recCount=recCount;
  holder=RVMThread.getCurrentThread();
}

Fixed version (ground truth):
/** 
 * Wait until someone calls broadcast. <p> This blocking method method does not notify the threading subsystem that it is blocking.  Thus, if someone (like, say, the GC) requests that the thread is blocked then their request will block until this method unblocks.  If this sounds like it might be undesirable, call waitNicely instead.
 */
@NoInline @NoOptCompile public void await(){
  int recCount=this.recCount;
  this.recCount=0;
  holderSlot=-1;
  sysCall.sysPthreadCondWait(cond,mutex);
  if (VM.VerifyAssertions)   VM._assert(holderSlot == -1);
  if (VM.VerifyAssertions)   VM._assert(this.recCount == 0);
  this.recCount=recCount;
  holderSlot=RVMThread.getCurrentThreadSlot();
}
Program: 149756
Project: 149756
Buggy source:
@NoInline public static boolean lock(HeavyCondLock l){
  if (l == null) {
    return false;
  }
 else {
    l.lock();
    return true;
  }
}

Fixed version (ground truth):
@NoInline @NoOptCompile public static boolean lock(HeavyCondLock l){
  if (l == null) {
    return false;
  }
 else {
    l.lock();
    return true;
  }
}
Program: 149757
Project: 149757
Buggy source:
@Unpreemptible public void lockNicely(){
  VM.disableYieldpoints();
  super.lockNicely();
}

Fixed version (ground truth):
@Unpreemptible @NoInline @NoOptCompile public void lockNicely(){
  VM.disableYieldpoints();
  super.lockNicely();
}
Program: 149758
Project: 149758
Buggy source:
public void unlock(){
  super.unlock();
  VM.enableYieldpoints();
}

Fixed version (ground truth):
@NoInline @NoOptCompile public void unlock(){
  super.unlock();
  VM.enableYieldpoints();
}
Program: 149759
Project: 149759
Buggy source:
public void lock(){
  VM.disableYieldpoints();
  super.lock();
}

Fixed version (ground truth):
@NoInline @NoOptCompile public void lock(){
  VM.disableYieldpoints();
  super.lock();
}
Program: 149760
Project: 149760
Buggy source:
/** 
 * @param obj an object
 * @param lockOffset the offset of the thin lock word in the object.
 * @param thread a thread
 * @return <code>true</code> if the lock on obj at offset lockOffset is currently ownedby thread <code>false</code> if it is not.
 */
public static boolean holdsLock(Object obj,Offset lockOffset,RVMThread thread){
  int tid=thread.getLockingId();
  Word bits=Magic.getWordAtOffset(obj,lockOffset);
  if (bits.and(TL_FAT_LOCK_MASK).isZero()) {
    return (bits.and(ThinLockConstants.TL_THREAD_ID_MASK).toInt() == tid);
  }
 else {
    int index=getLockIndex(bits);
    Lock l=Lock.getLock(index);
    return l != null && l.getOwnerId() == tid;
  }
}

Fixed version (ground truth):
/** 
 * @param obj an object
 * @param lockOffset the offset of the thin lock word in the object.
 * @param thread a thread
 * @return <code>true</code> if the lock on obj at offset lockOffset is currently ownedby thread <code>false</code> if it is not.
 */
public static boolean holdsLock(Object obj,Offset lockOffset,RVMThread thread){
  int tid=thread.getLockingId();
  Word bits=Magic.getWordAtOffset(obj,lockOffset);
  if (bits.and(TL_FAT_LOCK_MASK).isZero()) {
    return (bits.and(ThinLockConstants.TL_THREAD_ID_MASK).toInt() == tid);
  }
 else {
    int index=getLockIndex(bits);
    Lock l=Lock.getLock(index);
    boolean result=false;
    if (l != null) {
      l.mutex.lock();
      result=(l.getOwnerId() == tid && l.getLockedObject() == obj);
      l.mutex.unlock();
    }
    return result;
  }
}
Program: 149762
Project: 149762
Buggy source:
/** 
 * The main stack scanning loop.<p> Walk the stack one frame at a time, top (lo) to bottom (hi),<p>
 * @param gprs The general purpose registers associated with thestack being scanned (normally extracted from the thread).
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void scanThreadInternal(Address gprs,int verbosity){
  if (false) {
    VM.sysWriteln("String_Node_Str",thread.getThreadSlot(),"String_Node_Str",RVMThread.getCurrentThreadSlot());
  }
  if (verbosity >= 1) {
    Log.writeln("String_Node_Str");
    Log.write("String_Node_Str");
    Log.writeln(thread.getThreadSlot());
  }
  if (VM.VerifyAssertions)   assertImmovableInCurrentCollection();
  getHWExceptionRegisters();
  iteratorGroup.newStackWalk(thread,gprs);
  if (verbosity >= 1)   dumpTopFrameInfo(verbosity);
  if (fp.NE(ArchitectureSpecific.StackframeLayoutConstants.STACKFRAME_SENTINEL_FP)) {
    prevFp=Address.zero();
    while (Magic.getCallerFramePointer(fp).NE(ArchitectureSpecific.StackframeLayoutConstants.STACKFRAME_SENTINEL_FP)) {
      if (false) {
        VM.sysWriteln("String_Node_Str",RVMThread.getCurrentThreadSlot(),"String_Node_Str",fp);
      }
      prevFp=scanFrame(verbosity);
      ip=Magic.getReturnAddress(fp);
      fp=Magic.getCallerFramePointer(fp);
    }
  }
  checkJNIBase();
  if (verbosity >= 1)   Log.writeln("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * The main stack scanning loop.<p> Walk the stack one frame at a time, top (lo) to bottom (hi),<p>
 * @param gprs The general purpose registers associated with thestack being scanned (normally extracted from the thread).
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void scanThreadInternal(Address gprs,int verbosity){
  if (false) {
    VM.sysWriteln("String_Node_Str",thread.getThreadSlot(),"String_Node_Str",RVMThread.getCurrentThreadSlot());
  }
  if (verbosity >= 2) {
    Log.writeln("String_Node_Str");
    Log.write("String_Node_Str");
    Log.writeln(thread.getThreadSlot());
  }
  if (VM.VerifyAssertions)   assertImmovableInCurrentCollection();
  getHWExceptionRegisters();
  iteratorGroup.newStackWalk(thread,gprs);
  if (verbosity >= 2)   dumpTopFrameInfo(verbosity);
  if (fp.NE(ArchitectureSpecific.StackframeLayoutConstants.STACKFRAME_SENTINEL_FP)) {
    prevFp=Address.zero();
    while (Magic.getCallerFramePointer(fp).NE(ArchitectureSpecific.StackframeLayoutConstants.STACKFRAME_SENTINEL_FP)) {
      if (false) {
        VM.sysWriteln("String_Node_Str",RVMThread.getCurrentThreadSlot(),"String_Node_Str",fp);
      }
      prevFp=scanFrame(verbosity);
      ip=Magic.getReturnAddress(fp);
      fp=Magic.getCallerFramePointer(fp);
    }
  }
  checkJNIBase();
  if (verbosity >= 2)   Log.writeln("String_Node_Str");
}
Program: 149763
Project: 149763
Buggy source:
/** 
 * Scan the current stack frame.<p> First the various iterators are set up, then the frame is scanned for regular pointers, before scanning for code pointers.  The iterators are then cleaned up, and native frames skipped if necessary.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private Address scanFrame(int verbosity){
  if (!setUpFrame(verbosity))   return fp;
  scanFrameForObjects(verbosity);
  if (processCodeLocations && compiledMethodType != CompiledMethod.TRAP)   processFrameForCode(verbosity);
  iterator.cleanupPointers();
  if (compiledMethodType != CompiledMethod.TRAP && compiledMethod.getMethod().getDeclaringClass().hasBridgeFromNativeAnnotation()) {
    fp=RuntimeEntrypoints.unwindNativeStackFrameForGC(fp);
    if (verbosity >= 1)     Log.write("String_Node_Str");
  }
  return fp;
}

Fixed version (ground truth):
/** 
 * Scan the current stack frame.<p> First the various iterators are set up, then the frame is scanned for regular pointers, before scanning for code pointers.  The iterators are then cleaned up, and native frames skipped if necessary.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private Address scanFrame(int verbosity){
  if (!setUpFrame(verbosity))   return fp;
  scanFrameForObjects(verbosity);
  if (processCodeLocations && compiledMethodType != CompiledMethod.TRAP)   processFrameForCode(verbosity);
  iterator.cleanupPointers();
  if (compiledMethodType != CompiledMethod.TRAP && compiledMethod.getMethod().getDeclaringClass().hasBridgeFromNativeAnnotation()) {
    fp=RuntimeEntrypoints.unwindNativeStackFrameForGC(fp);
    if (verbosity >= 2)     Log.write("String_Node_Str");
  }
  return fp;
}
Program: 149764
Project: 149764
Buggy source:
/** 
 * Identify all the object pointers stored as local variables associated with (though not necessarily strictly within!) the current frame.  Loop through the GC map iterator, getting the address of each object pointer, adding them to the root locations deque.<p> NOTE: Because of the callee save policy of the optimizing compiler, references associated with a given frame may be in callee stack frames (lower memory), <i>outside</i> the current frame.  So the iterator may return locations that are outside the frame being scanned.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void scanFrameForObjects(int verbosity){
  for (Address refaddr=iterator.getNextReferenceAddress(); !refaddr.isZero(); refaddr=iterator.getNextReferenceAddress()) {
    if (VALIDATE_REFS)     checkReference(refaddr,verbosity);
    if (verbosity >= 3)     dumpRef(refaddr,verbosity);
    reportDelayedRootEdge(trace,refaddr);
  }
}

Fixed version (ground truth):
/** 
 * Identify all the object pointers stored as local variables associated with (though not necessarily strictly within!) the current frame.  Loop through the GC map iterator, getting the address of each object pointer, adding them to the root locations deque.<p> NOTE: Because of the callee save policy of the optimizing compiler, references associated with a given frame may be in callee stack frames (lower memory), <i>outside</i> the current frame.  So the iterator may return locations that are outside the frame being scanned.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void scanFrameForObjects(int verbosity){
  for (Address refaddr=iterator.getNextReferenceAddress(); !refaddr.isZero(); refaddr=iterator.getNextReferenceAddress()) {
    if (VALIDATE_REFS)     checkReference(refaddr,verbosity);
    if (verbosity >= 4)     dumpRef(refaddr,verbosity);
    reportDelayedRootEdge(trace,refaddr);
  }
}
Program: 149766
Project: 149766
Buggy source:
/** 
 * Dump the contents of a stack frame. Attempts to interpret each word as an object reference
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void dumpStackFrame(int verbosity){
  Address start, end;
  if (VM.BuildForIA32) {
    if (prevFp.isZero()) {
      start=fp.minus(20 * BYTES_IN_ADDRESS);
      Log.writeln("String_Node_Str",fp);
    }
 else {
      start=prevFp;
    }
    end=fp;
  }
 else {
    start=fp;
    end=fp.loadAddress();
  }
  for (Address loc=start; loc.LT(end); loc=loc.plus(BYTES_IN_ADDRESS)) {
    Log.write(loc);
    Log.write("String_Node_Str");
    Log.write(loc.diff(start));
    Log.write("String_Node_Str");
    ObjectReference value=Selected.Plan.get().loadObjectReference(loc);
    Log.write(value);
    Log.write("String_Node_Str");
    Log.flush();
    if (verbosity >= 3 && MemoryManager.objectInVM(value) && loc.NE(start) && loc.NE(end))     MemoryManager.dumpRef(value);
 else     Log.writeln();
  }
  Log.writeln();
}

Fixed version (ground truth):
/** 
 * Dump the contents of a stack frame. Attempts to interpret each word as an object reference
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void dumpStackFrame(int verbosity){
  Address start, end;
  if (VM.BuildForIA32) {
    if (prevFp.isZero()) {
      start=fp.minus(20 * BYTES_IN_ADDRESS);
      Log.writeln("String_Node_Str",fp);
    }
 else {
      start=prevFp;
    }
    end=fp;
  }
 else {
    start=fp;
    end=fp.loadAddress();
  }
  for (Address loc=start; loc.LT(end); loc=loc.plus(BYTES_IN_ADDRESS)) {
    Log.write(loc);
    Log.write("String_Node_Str");
    Log.write(loc.diff(start));
    Log.write("String_Node_Str");
    ObjectReference value=Selected.Plan.get().loadObjectReference(loc);
    Log.write(value);
    Log.write("String_Node_Str");
    Log.flush();
    if (verbosity >= 4 && MemoryManager.objectInVM(value) && loc.NE(start) && loc.NE(end))     MemoryManager.dumpRef(value);
 else     Log.writeln();
  }
  Log.writeln();
}
Program: 149767
Project: 149767
Buggy source:
/** 
 * Print out information associated with a reference.
 * @param refaddr The address of the reference in question.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void dumpRef(Address refaddr,int verbosity){
  ObjectReference ref=refaddr.loadObjectReference();
  VM.sysWrite(refaddr);
  if (verbosity >= 4) {
    VM.sysWrite("String_Node_Str");
    MemoryManager.dumpRef(ref);
  }
 else   VM.sysWriteln();
}

Fixed version (ground truth):
/** 
 * Print out information associated with a reference.
 * @param refaddr The address of the reference in question.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void dumpRef(Address refaddr,int verbosity){
  ObjectReference ref=refaddr.loadObjectReference();
  VM.sysWrite(refaddr);
  if (verbosity >= 5) {
    VM.sysWrite("String_Node_Str");
    MemoryManager.dumpRef(ref);
  }
 else   VM.sysWriteln();
}
Program: 149768
Project: 149768
Buggy source:
/** 
 * Set up to scan the current stack frame.  This means examining the frame to discover the method being invoked and then retrieving the associated metadata (stack maps etc).  Certain frames should not be scanned---these are identified and skipped.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 * @return True if the frame should be scanned, false if it shouldbe skipped.
 */
private boolean setUpFrame(int verbosity){
  int compiledMethodId=Magic.getCompiledMethodID(fp);
  if (compiledMethodId == ArchitectureSpecific.ArchConstants.INVISIBLE_METHOD_ID) {
    if (verbosity >= 1)     Log.writeln("String_Node_Str");
    return false;
  }
  compiledMethod=CompiledMethods.getCompiledMethod(compiledMethodId);
  compiledMethod.setActiveOnStack();
  compiledMethodType=compiledMethod.getCompilerType();
  if (verbosity >= 1)   printMethodHeader();
  Offset offset=compiledMethod.getInstructionOffset(ip);
  iterator=iteratorGroup.selectIterator(compiledMethod);
  iterator.setupIterator(compiledMethod,offset,fp);
  if (verbosity >= 2)   dumpStackFrame(verbosity);
  if (verbosity >= 3)   Log.writeln("String_Node_Str");
  return true;
}

Fixed version (ground truth):
/** 
 * Set up to scan the current stack frame.  This means examining the frame to discover the method being invoked and then retrieving the associated metadata (stack maps etc).  Certain frames should not be scanned---these are identified and skipped.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 * @return True if the frame should be scanned, false if it shouldbe skipped.
 */
private boolean setUpFrame(int verbosity){
  int compiledMethodId=Magic.getCompiledMethodID(fp);
  if (compiledMethodId == ArchitectureSpecific.ArchConstants.INVISIBLE_METHOD_ID) {
    if (verbosity >= 2)     Log.writeln("String_Node_Str");
    return false;
  }
  compiledMethod=CompiledMethods.getCompiledMethod(compiledMethodId);
  compiledMethod.setActiveOnStack();
  compiledMethodType=compiledMethod.getCompilerType();
  if (verbosity >= 2)   printMethodHeader();
  Offset offset=compiledMethod.getInstructionOffset(ip);
  iterator=iteratorGroup.selectIterator(compiledMethod);
  iterator.setupIterator(compiledMethod,offset,fp);
  if (verbosity >= 3)   dumpStackFrame(verbosity);
  if (verbosity >= 4)   Log.writeln("String_Node_Str");
  return true;
}
Program: 149769
Project: 149769
Buggy source:
/** 
 * Print out the basic information associated with the top frame on the stack.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void dumpTopFrameInfo(int verbosity){
  Log.write("String_Node_Str");
  Log.writeln(topFrame);
  Log.write("String_Node_Str");
  Log.writeln(ip);
  Log.write("String_Node_Str");
  Log.writeln(fp);
  Log.write("String_Node_Str");
  Log.writeln(thread.getContextRegisters().ip);
  if (verbosity >= 2 && thread.getJNIEnv() != null)   thread.getJNIEnv().dumpJniRefsStack();
}

Fixed version (ground truth):
/** 
 * Print out the basic information associated with the top frame on the stack.
 * @param verbosity The level of verbosity to be used whenperforming the scan.
 */
private void dumpTopFrameInfo(int verbosity){
  Log.write("String_Node_Str");
  Log.writeln(topFrame);
  Log.write("String_Node_Str");
  Log.writeln(ip);
  Log.write("String_Node_Str");
  Log.writeln(fp);
  Log.write("String_Node_Str");
  Log.writeln(thread.getContextRegisters().ip);
  if (verbosity >= 3 && thread.getJNIEnv() != null)   thread.getJNIEnv().dumpJniRefsStack();
}
Program: 149770
Project: 149770
Buggy source:
@Override public void run(){
  disableYieldpoints();
  if (verbose >= 1)   trace("String_Node_Str","String_Node_Str");
  try {
    for (; ; ) {
      sysCall.sysNanosleep(1000L * 1000L * (long)VM.interruptQuantum);
      RVMThread.timerTicks++;
      for (int i=0; i < RVMThread.numThreads; ++i) {
        RVMThread candidate=RVMThread.threads[i];
        if (candidate != null) {
          for (; ; ) {
            Offset offset=Entrypoints.timeSliceExpiredField.getOffset();
            int oldValue=Magic.prepareInt(candidate,offset);
            if (Magic.attemptInt(candidate,offset,oldValue,oldValue + 1)) {
              break;
            }
          }
          candidate.takeYieldpoint=1;
        }
      }
      RVMThread.checkDebugRequest();
    }
  }
 catch (  Throwable e) {
    printExceptionAndDie(e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  disableYieldpoints();
  if (verbose >= 1)   trace("String_Node_Str","String_Node_Str");
  try {
    for (; ; ) {
      sysCall.sysNanosleep(1000L * 1000L * (long)VM.interruptQuantum);
      RVMThread.acctLock.lock();
      RVMThread.timerTicks++;
      for (int i=0; i < RVMThread.numThreads; ++i) {
        RVMThread candidate=RVMThread.threads[i];
        if (candidate != null) {
          candidate.timeSliceExpired++;
          candidate.takeYieldpoint=1;
        }
      }
      RVMThread.acctLock.unlock();
      RVMThread.checkDebugRequest();
    }
  }
 catch (  Throwable e) {
    printExceptionAndDie(e);
  }
}
Program: 149771
Project: 149771
Buggy source:
static void compilePutstaticBarrierImm(Assembler asm,Offset fieldOffset,int locationMetadata){
  asm.emitPOP_Reg(S0);
  asm.emitPUSH_Imm(fieldOffset.toInt());
  asm.emitPUSH_Reg(S0);
  asm.emitPUSH_Imm(locationMetadata);
  BaselineCompilerImpl.genParameterRegisterLoad(asm,3);
  asm.emitCALL_Abs(Magic.getTocPointer().plus(Entrypoints.putstaticWriteBarrierMethod.getOffset()));
}

Fixed version (ground truth):
static void compilePutstaticBarrierImm(Assembler asm,Offset fieldOffset,int locationMetadata){
  asm.emitPUSH_Imm(fieldOffset.toInt());
  asm.emitPUSH_Imm(locationMetadata);
  BaselineCompilerImpl.genParameterRegisterLoad(asm,3);
  asm.emitCALL_Abs(Magic.getTocPointer().plus(Entrypoints.putstaticWriteBarrierMethod.getOffset()));
}
Program: 149772
Project: 149772
Buggy source:
/** 
 * LHSclass is a fully loaded class. Is rhsTIB the TIB of a subclass of LHSclass?
 * @param LHSclass a (fully loaded) class
 * @param rhsTIB the TIB of an object that might be an instance of LHSclass
 * @return <code>true</code> if the object is an instance of LHSClassor <code>false</code> if it is not
 */
@Uninterruptible public static boolean instanceOfClass(RVMClass LHSclass,TIB rhsTIB){
  if (VM.VerifyAssertions) {
    VM._assert(rhsTIB != null);
    VM._assert(rhsTIB.getSuperclassIds() != null);
  }
  short[] superclassIds=Magic.objectAsShortArray(rhsTIB.getSuperclassIds());
  int LHSDepth=LHSclass.getTypeDepth();
  if (LHSDepth >= superclassIds.length)   return false;
  int LHSId=LHSclass.getId();
  return superclassIds[LHSDepth] == LHSId;
}

Fixed version (ground truth):
/** 
 * LHSclass is a fully loaded class. Is rhsTIB the TIB of a subclass of LHSclass?
 * @param LHSclass a (fully loaded) class
 * @param rhsTIB the TIB of an object that might be an instance of LHSclass
 * @return <code>true</code> if the object is an instance of LHSClassor <code>false</code> if it is not
 */
@Uninterruptible public static boolean instanceOfClass(RVMClass LHSclass,TIB rhsTIB){
  if (VM.VerifyAssertions) {
    VM._assert(rhsTIB != null);
    VM._assert(rhsTIB.getSuperclassIds() != null);
  }
  short[] superclassIds=Magic.objectAsShortArray(rhsTIB.getSuperclassIds());
  int LHSDepth=LHSclass.getTypeDepth();
  if (LHSDepth >= superclassIds.length)   return false;
  int LHSId=LHSclass.getId();
  return (superclassIds[LHSDepth] & 0xFFFF) == LHSId;
}
Program: 149774
Project: 149774
Buggy source:
/** 
 * Generate a floating point move portion of a conditional move.
 * @param s the instruction to copy position info from
 * @param result the result of the conditional move
 * @param cond the condition operand
 * @param trueValue the value to move to result if cond is true
 * @param falseValue the value to move to result if cond is not true
 */
protected final void CMOV_FMOV(Instruction s,RegisterOperand result,ConditionOperand cond,Operand trueValue,Operand falseValue){
  if (result.similar(trueValue)) {
    EMIT(MIR_CondMove.mutate(s,IA32_FCMOV,result,asReg(s,IA32_FMOV,falseValue),COND(cond.flipCode())));
  }
 else   if (result.similar(falseValue)) {
    EMIT(MIR_CondMove.mutate(s,IA32_FCMOV,result,asReg(s,IA32_FMOV,trueValue),COND(cond)));
  }
 else {
    if (falseValue.isRegister()) {
      EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,result,trueValue)));
      EMIT(MIR_CondMove.mutate(s,IA32_FCMOV,result.copyRO(),falseValue,COND(cond.flipCode())));
    }
 else {
      EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,result,falseValue)));
      EMIT(MIR_CondMove.mutate(s,IA32_FCMOV,result.copyRO(),asReg(s,IA32_FMOV,trueValue),COND(cond)));
    }
  }
}

Fixed version (ground truth):
/** 
 * Generate a floating point move portion of a conditional move.
 * @param s the instruction to copy position info from
 * @param result the result of the conditional move
 * @param cond the condition operand
 * @param trueValue the value to move to result if cond is true
 * @param falseValue the value to move to result if cond is not true
 */
protected final void CMOV_FMOV(Instruction s,RegisterOperand result,ConditionOperand cond,Operand trueValue,Operand falseValue){
  RegisterOperand FP0=new RegisterOperand(burs.ir.regpool.getPhysicalRegisterSet().getFPR(0),result.getType());
  if (falseValue.isRegister()) {
    EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,FP0,trueValue)));
    EMIT(MIR_CondMove.mutate(s,IA32_FCMOV,FP0.copyRO(),falseValue,COND(cond.flipCode())));
  }
 else {
    EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,FP0,falseValue)));
    EMIT(MIR_CondMove.mutate(s,IA32_FCMOV,FP0.copyRO(),asReg(s,IA32_FMOV,trueValue),COND(cond)));
  }
  EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,result.copyRO(),FP0.copyRO())));
}
Program: 149775
Project: 149775
Buggy source:
/** 
 * Perform aastore bytecode
 */
@Entrypoint static void aastore(Object[] arrayRef,int index,Object value) throws ArrayStoreException, ArrayIndexOutOfBoundsException {
  checkstore(arrayRef,value);
  int nelts=ObjectModel.getArrayLength(arrayRef);
  if (index < nelts) {
    Services.setArrayUninterruptible(arrayRef,index,value);
  }
 else {
    throw new ArrayIndexOutOfBoundsException(index);
  }
}

Fixed version (ground truth):
/** 
 * Perform aastore bytecode
 */
@Entrypoint static void aastore(Object[] arrayRef,int index,Object value) throws ArrayStoreException, ArrayIndexOutOfBoundsException {
  checkstore(arrayRef,value);
  int nelts=ObjectModel.getArrayLength(arrayRef);
  if (index >= 0 && index < nelts) {
    Services.setArrayUninterruptible(arrayRef,index,value);
  }
 else {
    throw new ArrayIndexOutOfBoundsException(index);
  }
}
Program: 149776
Project: 149776
Buggy source:
/** 
 * Constructor
 * @param typeRef
 * @param elementType
 */
RVMArray(TypeReference typeRef,RVMType elementType){
  super(typeRef,typeRef.getDimensionality(),null);
  this.elementType=elementType;
  this.logElementSize=computeLogElementSize();
  depth=1;
  if (elementType.isArrayType()) {
    innermostElementType=elementType.asArray().getInnermostElementType();
  }
 else {
    innermostElementType=elementType;
  }
  innermostElementTypeDimension=innermostElementType.dimension;
  if (VM.BuildForIA32 && this == RVMArray.CodeArrayType) {
    this.alignment=16;
  }
 else   if (BYTES_IN_DOUBLE != BYTES_IN_ADDRESS) {
    if (elementType.isDoubleType() || elementType.isLongType()) {
      this.alignment=BYTES_IN_DOUBLE;
    }
 else {
      this.alignment=BYTES_IN_ADDRESS;
    }
  }
 else {
    this.alignment=BYTES_IN_DOUBLE;
  }
  acyclic=elementType.isAcyclicReference();
  state=CLASS_LOADED;
  if (VM.verboseClassLoading)   VM.sysWrite("String_Node_Str" + this.getDescriptor() + "String_Node_Str");
  if (VM.verboseClassLoading)   VM.sysWrite("String_Node_Str" + this.getDescriptor() + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param typeRef
 * @param elementType
 */
RVMArray(TypeReference typeRef,RVMType elementType){
  super(typeRef,typeRef.getDimensionality(),null);
  this.elementType=elementType;
  this.logElementSize=computeLogElementSize();
  depth=1;
  if (elementType.isArrayType()) {
    innermostElementType=elementType.asArray().getInnermostElementType();
  }
 else {
    innermostElementType=elementType;
  }
  innermostElementTypeDimension=innermostElementType.dimension;
  if (VM.BuildForIA32 && typeRef == TypeReference.CodeArray) {
    this.alignment=16;
  }
 else   if (BYTES_IN_DOUBLE != BYTES_IN_ADDRESS) {
    if (elementType.isDoubleType() || elementType.isLongType()) {
      this.alignment=BYTES_IN_DOUBLE;
    }
 else {
      this.alignment=BYTES_IN_ADDRESS;
    }
  }
 else {
    this.alignment=BYTES_IN_DOUBLE;
  }
  acyclic=elementType.isAcyclicReference();
  state=CLASS_LOADED;
  if (VM.verboseClassLoading)   VM.sysWrite("String_Node_Str" + this.getDescriptor() + "String_Node_Str");
  if (VM.verboseClassLoading)   VM.sysWrite("String_Node_Str" + this.getDescriptor() + "String_Node_Str");
}
Program: 149779
Project: 149779
Buggy source:
/** 
 * End of discontig getter @return The end of the discontiguous space 
 */
public static Address getDiscontigEnd(){
  return heapLimit;
}

Fixed version (ground truth):
/** 
 * End of discontig getter @return The end of the discontiguous space 
 */
public static Address getDiscontigEnd(){
  return heapLimit.minus(1);
}