Program: 76879
Project: 76879
Buggy source:
private final int jjMoveNfa_0(int startState,int curPos){
  int strKind=jjmatchedKind;
  int strPos=jjmatchedPos;
  int seenUpto;
  input_stream.backup(seenUpto=curPos + 1);
  try {
    curChar=input_stream.readChar();
  }
 catch (  java.io.IOException e) {
    throw new Error("String_Node_Str");
  }
  curPos=0;
  int[] nextStates;
  int startsAt=0;
  jjnewStateCnt=7;
  int i=1;
  jjstateSet[0]=startState;
  int j, kind=0x7fffffff;
  for (; ; ) {
    if (++jjround == 0x7fffffff)     ReInitRounds();
    if (curChar < 64) {
      long l=1L << curChar;
      MatchLoop:       do {
switch (jjstateSet[--i]) {
case 4:
          if ((0xefffffffffffffffL & l) != 0L) {
            if (kind > 7)             kind=7;
            jjCheckNAdd(5);
          }
 else           if (curChar == 60) {
            if (kind > 7)             kind=7;
          }
        if ((0x100002600L & l) != 0L) {
          if (kind > 1)           kind=1;
          jjCheckNAdd(0);
        }
 else         if (curChar == 60)         jjstateSet[jjnewStateCnt++]=1;
      break;
case 0:
    if ((0x100002600L & l) == 0L)     break;
  if (kind > 1)   kind=1;
jjCheckNAdd(0);
break;
case 1:
if (curChar == 33) jjCheckNAddTwoStates(2,3);
break;
case 2:
if ((0xbfffffffffffffffL & l) != 0L) jjCheckNAddTwoStates(2,3);
break;
case 3:
if (curChar == 62 && kind > 2) kind=2;
break;
case 5:
if ((0xefffffffffffffffL & l) == 0L) break;
if (kind > 7) kind=7;
jjCheckNAdd(5);
break;
case 6:
if (curChar == 60 && kind > 7) kind=7;
break;
default :
break;
}
}
 while (i != startsAt);
}
 else if (curChar < 128) {
long l=1L << (curChar & 077);
MatchLoop: do {
switch (jjstateSet[--i]) {
case 4:
case 5:
if (kind > 7) kind=7;
jjCheckNAdd(5);
break;
case 2:
jjAddStates(0,1);
break;
default :
break;
}
}
 while (i != startsAt);
}
 else {
int hiByte=(int)(curChar >> 8);
int i1=hiByte >> 6;
long l1=1L << (hiByte & 077);
int i2=(curChar & 0xff) >> 6;
long l2=1L << (curChar & 077);
MatchLoop: do {
switch (jjstateSet[--i]) {
case 4:
case 5:
if (!jjCanMove_0(hiByte,i1,i2,l1,l2)) break;
if (kind > 7) kind=7;
jjCheckNAdd(5);
break;
case 2:
if (jjCanMove_0(hiByte,i1,i2,l1,l2)) jjAddStates(0,1);
break;
default :
break;
}
}
 while (i != startsAt);
}
if (kind != 0x7fffffff) {
jjmatchedKind=kind;
jjmatchedPos=curPos;
kind=0x7fffffff;
}
++curPos;
if ((i=jjnewStateCnt) == (startsAt=7 - (jjnewStateCnt=startsAt))) break;
try {
curChar=input_stream.readChar();
}
 catch (java.io.IOException e) {
break;
}
}
if (jjmatchedPos > strPos) return curPos;
int toRet=Math.max(curPos,seenUpto);
if (curPos < toRet) for (i=toRet - Math.min(curPos,seenUpto); i-- > 0; ) try {
curChar=input_stream.readChar();
}
 catch (java.io.IOException e) {
throw new Error("String_Node_Str");
}
if (jjmatchedPos < strPos) {
jjmatchedKind=strKind;
jjmatchedPos=strPos;
}
 else if (jjmatchedPos == strPos && jjmatchedKind > strKind) jjmatchedKind=strKind;
return toRet;
}

Fixed version (ground truth):
private final int jjMoveNfa_0(int startState,int curPos){
  int strKind=jjmatchedKind;
  int strPos=jjmatchedPos;
  int seenUpto;
  input_stream.backup(seenUpto=curPos + 1);
  try {
    curChar=input_stream.readChar();
  }
 catch (  java.io.IOException e) {
    throw new Error("String_Node_Str");
  }
  curPos=0;
  int startsAt=0;
  jjnewStateCnt=7;
  int i=1;
  jjstateSet[0]=startState;
  int kind=0x7fffffff;
  for (; ; ) {
    if (++jjround == 0x7fffffff)     ReInitRounds();
    if (curChar < 64) {
      long l=1L << curChar;
      do {
switch (jjstateSet[--i]) {
case 4:
          if ((0xefffffffffffffffL & l) != 0L) {
            if (kind > 7)             kind=7;
            jjCheckNAdd(5);
          }
 else           if (curChar == 60) {
            if (kind > 7)             kind=7;
          }
        if ((0x100002600L & l) != 0L) {
          if (kind > 1)           kind=1;
          jjCheckNAdd(0);
        }
 else         if (curChar == 60)         jjstateSet[jjnewStateCnt++]=1;
      break;
case 0:
    if ((0x100002600L & l) == 0L)     break;
  if (kind > 1)   kind=1;
jjCheckNAdd(0);
break;
case 1:
if (curChar == 33) jjCheckNAddTwoStates(2,3);
break;
case 2:
if ((0xbfffffffffffffffL & l) != 0L) jjCheckNAddTwoStates(2,3);
break;
case 3:
if (curChar == 62 && kind > 2) kind=2;
break;
case 5:
if ((0xefffffffffffffffL & l) == 0L) break;
if (kind > 7) kind=7;
jjCheckNAdd(5);
break;
case 6:
if (curChar == 60 && kind > 7) kind=7;
break;
default :
break;
}
}
 while (i != startsAt);
}
 else if (curChar < 128) {
do {
switch (jjstateSet[--i]) {
case 4:
case 5:
if (kind > 7) kind=7;
jjCheckNAdd(5);
break;
case 2:
jjAddStates(0,1);
break;
default :
break;
}
}
 while (i != startsAt);
}
 else {
int hiByte=(int)(curChar >> 8);
int i1=hiByte >> 6;
long l1=1L << (hiByte & 077);
int i2=(curChar & 0xff) >> 6;
long l2=1L << (curChar & 077);
do {
switch (jjstateSet[--i]) {
case 4:
case 5:
if (!jjCanMove_0(hiByte,i1,i2,l1,l2)) break;
if (kind > 7) kind=7;
jjCheckNAdd(5);
break;
case 2:
if (jjCanMove_0(hiByte,i1,i2,l1,l2)) jjAddStates(0,1);
break;
default :
break;
}
}
 while (i != startsAt);
}
if (kind != 0x7fffffff) {
jjmatchedKind=kind;
jjmatchedPos=curPos;
kind=0x7fffffff;
}
++curPos;
if ((i=jjnewStateCnt) == (startsAt=7 - (jjnewStateCnt=startsAt))) break;
try {
curChar=input_stream.readChar();
}
 catch (java.io.IOException e) {
break;
}
}
if (jjmatchedPos > strPos) return curPos;
int toRet=Math.max(curPos,seenUpto);
if (curPos < toRet) for (i=toRet - Math.min(curPos,seenUpto); i-- > 0; ) try {
curChar=input_stream.readChar();
}
 catch (java.io.IOException e) {
throw new Error("String_Node_Str");
}
if (jjmatchedPos < strPos) {
jjmatchedKind=strKind;
jjmatchedPos=strPos;
}
 else if (jjmatchedPos == strPos && jjmatchedKind > strKind) jjmatchedKind=strKind;
return toRet;
}