Program: 150164
Project: 150164
Buggy source:
public void acquire(){
  int ticket=VM_Synchronization.fetchAndAdd(this,dispenserFieldOffset,1);
  int retryCountdown=TIMEOUT_CHECK_FREQ;
  long localStart=0;
  long lastSlowReport=0;
  while (ticket != serving) {
    if (localStart == 0)     lastSlowReport=localStart=VM_Time.cycles();
    if (--retryCountdown == 0) {
      retryCountdown=TIMEOUT_CHECK_FREQ;
      long now=VM_Time.cycles();
      long lastReportDuration=now - lastSlowReport;
      long waitTime=now - localStart;
      if (lastReportDuration > SLOW_THRESHOLD + VM_Time.millisToCycles(200 * (VM_Thread.getCurrentThread().getIndex() % 5))) {
        lastSlowReport=now;
        Log.write("String_Node_Str");
        VM_Thread.getCurrentThread().dumpToLog();
        Log.write("String_Node_Str");
        Log.write(ticket);
        Log.write("String_Node_Str");
        Log.write(id);
        Log.write("String_Node_Str");
        Log.write(name);
        Log.write("String_Node_Str");
        Log.write(serving);
        Log.write("String_Node_Str");
        Log.write(VM_Time.cyclesToMillis(waitTime));
        Log.write("String_Node_Str");
        Log.writelnNoFlush();
        VM_Thread t=thread;
        if (t == null)         Log.writeln("String_Node_Str",false);
 else {
          Log.write("String_Node_Str");
          t.dumpToLog();
          Log.write("String_Node_Str");
          Log.writeln(where,false);
        }
        Log.write("String_Node_Str");
        Log.writeln(localStart,false);
        for (int i=(serving + 90) % 100; i != serving; i=(i + 1) % 100) {
          if (VM.VerifyAssertions)           VM._assert(i >= 0 && i < 100);
          Log.write("String_Node_Str");
          Log.write(i);
          Log.write("String_Node_Str");
          Log.write(servingHistory[i]);
          Log.write("String_Node_Str");
          Log.write(tidHistory[i]);
          Log.write("String_Node_Str");
          Log.write(startHistory[i]);
          Log.write("String_Node_Str");
          Log.write(endHistory[i]);
          Log.write("String_Node_Str");
          Log.write(VM_Time.cyclesToMillis(startHistory[i] - localStart));
          Log.writelnNoFlush();
        }
        Log.flush();
      }
      if (waitTime > TIME_OUT) {
        Log.write("String_Node_Str");
        VM_Thread.getCurrentThread().dumpToLog();
        Log.writeln();
        VM_Scheduler.dumpStack();
        Assert.fail("String_Node_Str");
      }
    }
  }
  if (REPORT_SLOW) {
    servingHistory[serving % 100]=serving;
    tidHistory[serving % 100]=VM_Thread.getCurrentThread().getIndex();
    startHistory[serving % 100]=VM_Time.cycles();
    setLocker(VM_Time.cycles(),VM_Thread.getCurrentThread(),-1);
  }
  if (verbose > 1) {
    Log.write("String_Node_Str");
    thread.dumpToLog();
    Log.write("String_Node_Str");
    Log.write(id);
    Log.write("String_Node_Str");
    Log.write(name);
    Log.writeln();
  }
  VM_Magic.isync();
}

Fixed version (ground truth):
public void acquire(){
  int ticket=VM_Synchronization.fetchAndAdd(this,dispenserFieldOffset,1);
  int retryCountdown=TIMEOUT_CHECK_FREQ;
  long localStart=0;
  long lastSlowReport=0;
  while (ticket != serving) {
    if (localStart == 0)     lastSlowReport=localStart=VM_Time.cycles();
    if (--retryCountdown == 0) {
      retryCountdown=TIMEOUT_CHECK_FREQ;
      long now=VM_Time.cycles();
      long lastReportDuration=now - lastSlowReport;
      long waitTime=now - localStart;
      if (lastReportDuration > SLOW_THRESHOLD + VM_Time.millisToCycles(200 * (VM_Thread.getCurrentThread().getIndex() % 5))) {
        lastSlowReport=now;
        VM.sysWrite("String_Node_Str");
        VM_Thread.getCurrentThread().dump(1);
        VM.sysWrite("String_Node_Str",ticket);
        VM.sysWrite("String_Node_Str",id);
        VM.sysWrite("String_Node_Str",name);
        VM.sysWrite("String_Node_Str",serving);
        VM.sysWriteln("String_Node_Str",VM_Time.cyclesToMillis(waitTime),"String_Node_Str");
        VM_Thread t=thread;
        if (t == null)         VM.sysWriteln("String_Node_Str");
 else {
          VM.sysWrite("String_Node_Str");
          t.dump(1);
          VM.sysWriteln("String_Node_Str",where);
        }
        VM.sysWriteln("String_Node_Str",localStart);
        for (int i=(serving + 90) % 100; i != serving; i=(i + 1) % 100) {
          if (VM.VerifyAssertions)           VM._assert(i >= 0 && i < 100);
          VM.sysWrite("String_Node_Str");
          VM.sysWrite(i,"String_Node_Str",servingHistory[i]);
          VM.sysWrite("String_Node_Str",tidHistory[i]);
          VM.sysWrite("String_Node_Str",startHistory[i]);
          VM.sysWrite("String_Node_Str",endHistory[i]);
          VM.sysWriteln("String_Node_Str",VM_Time.cyclesToMillis(startHistory[i] - localStart));
        }
      }
      if (waitTime > TIME_OUT) {
        VM.sysWrite("String_Node_Str");
        VM_Thread.getCurrentThread().dump(1);
        VM_Scheduler.dumpStack();
        Assert.fail("String_Node_Str");
      }
    }
  }
  if (REPORT_SLOW) {
    servingHistory[serving % 100]=serving;
    tidHistory[serving % 100]=VM_Thread.getCurrentThread().getIndex();
    startHistory[serving % 100]=VM_Time.cycles();
    setLocker(VM_Time.cycles(),VM_Thread.getCurrentThread(),-1);
  }
  if (verbose > 1) {
    VM.sysWrite("String_Node_Str");
    thread.dump();
    VM.sysWrite("String_Node_Str",id);
    VM.sysWriteln("String_Node_Str",name);
  }
  VM_Magic.isync();
}