Program: 5548
Project: 5548
Buggy source:
public long stepMicros(long jumpMicros,long executeMicros) throws EmulationException {
  if (isRunning()) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (jumpMicros < 0) {
    throw new IllegalArgumentException("String_Node_Str" + jumpMicros);
  }
  if (!microClockReady) {
    lastMicrosCycles=maxCycles;
  }
  lastMicrosDelta+=jumpMicros;
  if (microClockReady) {
    maxCycles=lastMicrosCycles + (lastMicrosDelta * dcoFrq) / 1000000;
    if (cpuOff) {
      if (maxCycles > nextEventCycles) {
        lastMicrosDelta-=jumpMicros;
        printEventQueues(System.out);
        throw new IllegalArgumentException("String_Node_Str" + maxCycles + "String_Node_Str"+ cycles+ "String_Node_Str"+ nextEventCycles);
      }
    }
 else     if (maxCycles > cycles) {
      lastMicrosDelta-=jumpMicros;
      throw new IllegalArgumentException("String_Node_Str" + maxCycles + "String_Node_Str"+ cycles);
    }
  }
  microClockReady=true;
  maxCycles=lastMicrosCycles + ((lastMicrosDelta + executeMicros) * dcoFrq) / 1000000;
  if (debug) {
    if (servicedInterrupt >= 0) {
      disAsm.disassemble(reg[PC],memory,reg,servicedInterrupt);
    }
 else {
      disAsm.disassemble(reg[PC],memory,reg);
    }
  }
  while (cycles < maxCycles || (cpuOff && (nextEventCycles < cycles))) {
    if (emulateOP(maxCycles)) {
      if (execCounter != null) {
        execCounter[reg[PC]]++;
      }
      if (trace != null) {
        if (tracePos > trace.length) {
          tracePos=0;
        }
        trace[tracePos++]=reg[PC];
      }
    }
  }
  if (cpuOff && !(interruptsEnabled && servicedInterrupt == -1 && interruptMax >= 0)) {
    lastReturnedMicros=(1000000 * (nextEventCycles - cycles)) / dcoFrq;
  }
 else {
    lastReturnedMicros=0;
  }
  if (cycles < maxCycles) {
    throw new RuntimeException("String_Node_Str" + cycles + "String_Node_Str"+ maxCycles);
  }
  if (lastReturnedMicros < 0) {
    throw new RuntimeException("String_Node_Str" + lastReturnedMicros);
  }
  return lastReturnedMicros;
}

Fixed version (ground truth):
public long stepMicros(long jumpMicros,long executeMicros) throws EmulationException {
  int pc;
  if (isRunning()) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (jumpMicros < 0) {
    throw new IllegalArgumentException("String_Node_Str" + jumpMicros);
  }
  if (!microClockReady) {
    lastMicrosCycles=maxCycles;
  }
  lastMicrosDelta+=jumpMicros;
  if (microClockReady) {
    maxCycles=lastMicrosCycles + (lastMicrosDelta * dcoFrq) / 1000000;
    if (cpuOff) {
      if (maxCycles > nextEventCycles) {
        lastMicrosDelta-=jumpMicros;
        printEventQueues(System.out);
        throw new IllegalArgumentException("String_Node_Str" + maxCycles + "String_Node_Str"+ cycles+ "String_Node_Str"+ nextEventCycles);
      }
    }
 else     if (maxCycles > cycles) {
      lastMicrosDelta-=jumpMicros;
      throw new IllegalArgumentException("String_Node_Str" + maxCycles + "String_Node_Str"+ cycles);
    }
  }
  microClockReady=true;
  maxCycles=lastMicrosCycles + ((lastMicrosDelta + executeMicros) * dcoFrq) / 1000000;
  while (cycles < maxCycles || (cpuOff && (nextEventCycles < cycles))) {
    if ((pc=emulateOP(maxCycles)) >= 0) {
      if (execCounter != null) {
        execCounter[reg[PC]]++;
      }
      if (trace != null) {
        if (tracePos > trace.length) {
          tracePos=0;
        }
        trace[tracePos++]=pc;
      }
      if (debug) {
        if (servicedInterrupt >= 0) {
          disAsm.disassemble(pc,memory,reg,servicedInterrupt);
        }
 else {
          disAsm.disassemble(pc,memory,reg);
        }
      }
    }
  }
  if (cpuOff && !(interruptsEnabled && servicedInterrupt == -1 && interruptMax >= 0)) {
    lastReturnedMicros=(1000000 * (nextEventCycles - cycles)) / dcoFrq;
  }
 else {
    lastReturnedMicros=0;
  }
  if (cycles < maxCycles) {
    throw new RuntimeException("String_Node_Str" + cycles + "String_Node_Str"+ maxCycles);
  }
  if (lastReturnedMicros < 0) {
    throw new RuntimeException("String_Node_Str" + lastReturnedMicros);
  }
  return lastReturnedMicros;
}