Program: 37614
Project: 37614
Buggy source:
/** 
 * Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
 * @return      the next token
 * @exception IOException  if any I/O-Error occurs
 */
public java_cup.runtime.Symbol next_token() throws java.io.IOException {
  int yy_input;
  int yy_action;
  int yy_currentPos_l;
  int yy_markedPos_l;
  int yy_endRead_l=yy_endRead;
  char[] yy_buffer_l=yy_buffer;
  char[] yycmap_l=yycmap;
  int[] yytrans_l=yytrans;
  int[] yy_rowMap_l=yy_rowMap;
  int[] yy_attr_l=YY_ATTRIBUTE;
  while (true) {
    yy_markedPos_l=yy_markedPos;
    boolean yy_r=false;
    for (yy_currentPos_l=yy_startRead; yy_currentPos_l < yy_markedPos_l; yy_currentPos_l++) {
switch (yy_buffer_l[yy_currentPos_l]) {
case '\u000B':
case '\u000C':
case '\u0085':
case '\u2028':
case '\u2029':
        yyline++;
      yycolumn=0;
    yy_r=false;
  break;
case '\r':
yyline++;
yycolumn=0;
yy_r=true;
break;
case '\n':
if (yy_r) yy_r=false;
 else {
yyline++;
yycolumn=0;
}
break;
default :
yy_r=false;
yycolumn++;
}
}
if (yy_r) {
boolean yy_peek;
if (yy_markedPos_l < yy_endRead_l) yy_peek=yy_buffer_l[yy_markedPos_l] == '\n';
 else if (yy_atEOF) yy_peek=false;
 else {
boolean eof=yy_refill();
yy_markedPos_l=yy_markedPos;
yy_buffer_l=yy_buffer;
if (eof) yy_peek=false;
 else yy_peek=yy_buffer_l[yy_markedPos_l] == '\n';
}
if (yy_peek) yyline--;
}
yy_action=-1;
yy_currentPos_l=yy_currentPos=yy_startRead=yy_markedPos_l;
yy_state=yy_lexical_state;
yy_forAction: {
while (true) {
if (yy_currentPos_l < yy_endRead_l) yy_input=yy_buffer_l[yy_currentPos_l++];
 else if (yy_atEOF) {
yy_input=YYEOF;
break yy_forAction;
}
 else {
yy_currentPos=yy_currentPos_l;
yy_markedPos=yy_markedPos_l;
boolean eof=yy_refill();
yy_currentPos_l=yy_currentPos;
yy_markedPos_l=yy_markedPos;
yy_buffer_l=yy_buffer;
yy_endRead_l=yy_endRead;
if (eof) {
yy_input=YYEOF;
break yy_forAction;
}
 else {
yy_input=yy_buffer_l[yy_currentPos_l++];
}
}
int yy_next=yytrans_l[yy_rowMap_l[yy_state] + yycmap_l[yy_input]];
if (yy_next == -1) break yy_forAction;
yy_state=yy_next;
int yy_attributes=yy_attr_l[yy_state];
if ((yy_attributes & 1) == 1) {
yy_action=yy_state;
yy_markedPos_l=yy_currentPos_l;
if ((yy_attributes & 8) == 8) break yy_forAction;
}
}
}
yy_markedPos=yy_markedPos_l;
switch (yy_action < 0 ? yy_action : YY_ACTION[yy_action]) {
case 22:
{
return symbol(sym.GUARD);
}
case 63:
break;
case 61:
{
return symbol(sym.CHAR_CODE_LITERAL,yytext());
}
case 64:
break;
case 34:
{
return symbol(sym.MINUS_DOT);
}
case 65:
break;
case 48:
{
token.append(yytext());
yybegin(YYINITIAL);
return symbol(sym.SYMBOL_NAME,string.toString(),token.toString(),startline,startcol);
}
case 66:
break;
case 45:
{
return symbol(sym.RBRACE_UNDERBAR);
}
case 67:
break;
case 18:
{
return symbol(sym.RPAREN);
}
case 68:
break;
case 53:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 69:
break;
case 41:
{
return symbol(sym.PLUS_DOT);
}
case 70:
break;
case 35:
{
return symbol(sym.NEGATIVE);
}
case 71:
break;
case 11:
{
return symbol(sym.BACKSLASH);
}
case 72:
break;
case 23:
{
return symbol(sym.HAT);
}
case 73:
break;
case 19:
{
return symbol(sym.LBRACE);
}
case 74:
break;
case 47:
{
string.setLength(0);
token.setLength(0);
token.append(yytext());
startline=yyline;
startcol=yycolumn;
yybegin(QUOTED);
}
case 75:
break;
case 26:
{
return symbol(sym.LBRACKET);
}
case 76:
break;
case 57:
{
return symbol(sym.RBRACE_SLASH_AT);
}
case 77:
break;
case 25:
{
return symbol(sym.PROCVAR);
}
case 78:
break;
case 8:
{
string.setLength(0);
token.setLength(0);
token.append(yytext());
startline=yyline;
startcol=yycolumn;
yybegin(STRING);
}
case 79:
break;
case 44:
{
return symbol(sym.RBRACE_AT);
}
case 80:
break;
case 56:
{
return symbol(sym.SYMBOL_NAME,yytext());
}
case 81:
break;
case 13:
{
return symbol(sym.SLASH);
}
case 82:
break;
case 21:
{
return symbol(sym.RULEVAR);
}
case 83:
break;
case 32:
{
yybegin(YYINITIAL);
}
case 84:
break;
case 15:
{
return symbol(sym.PLUS);
}
case 85:
break;
case 60:
{
return symbol(sym.MOD);
}
case 86:
break;
case 6:
{
return symbol(sym.PERIOD);
}
case 87:
break;
case 42:
{
return symbol(sym.RBRACE_SLASH);
}
case 88:
break;
case 62:
{
return symbol(sym.RBRACE_UNDERBAR_SLASH_AT);
}
case 89:
break;
case 14:
{
return symbol(sym.ASTERISK);
}
case 90:
break;
case 55:
{
return symbol(sym.PATHED_ATOM_NAME,yytext());
}
case 91:
break;
case 31:
{
yybegin(COMMENT);
}
case 92:
break;
case 4:
{
return symbol(sym.LINK_NAME,yytext(),yytext(),yyline,yycolumn);
}
case 93:
break;
case 27:
{
return symbol(sym.RBRACKET);
}
case 94:
break;
case 12:
{
return symbol(sym.COLON);
}
case 95:
break;
case 50:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 96:
break;
case 39:
{
return symbol(sym.ASTERISK_DOT);
}
case 97:
break;
case 40:
{
return symbol(sym.ASTERISK_ASTERISK);
}
case 98:
break;
case 38:
{
return symbol(sym.SLASH_DOT);
}
case 99:
break;
case 43:
{
return symbol(sym.RBRACE_ASTERISK);
}
case 100:
break;
case 17:
{
return symbol(sym.LPAREN);
}
case 101:
break;
case 30:
{
yybegin(COMMENT_INNER);
}
case 102:
break;
case 20:
{
return symbol(sym.RBRACE);
}
case 103:
break;
case 33:
{
return symbol(sym.NUMBER_NAME,yytext());
}
case 104:
break;
case 52:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 105:
break;
case 9:
{
return symbol(sym.RELOP,yytext());
}
case 106:
break;
case 3:
{
}
case 107:
break;
case 49:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 108:
break;
case 58:
{
return symbol(sym.RBRACE_UNDERBAR_SLASH);
}
case 109:
break;
case 7:
{
return symbol(sym.MINUS);
}
case 110:
break;
case 28:
{
token.append(yytext());
string.append(yytext());
}
case 111:
break;
case 54:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 112:
break;
case 36:
{
return symbol(sym.RULE,new Integer(yyline + 1));
}
case 113:
break;
case 2:
{
throw new Error("String_Node_Str" + yytext() + "String_Node_Str"+ (yyline + 1));
}
case 114:
break;
case 29:
{
token.append(yytext());
yybegin(YYINITIAL);
return symbol(sym.STRING,string.toString(),token.toString(),startline,startcol);
}
case 115:
break;
case 46:
{
return symbol(sym.RULENAMESEP);
}
case 116:
break;
case 59:
{
return symbol(sym.RBRACE_UNDERBAR_AT);
}
case 117:
break;
case 51:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 118:
break;
case 10:
{
return symbol(sym.EXCLA);
}
case 119:
break;
case 5:
{
return symbol(sym.ATOM_NAME,yytext());
}
case 120:
break;
case 16:
{
return symbol(sym.COMMA);
}
case 121:
break;
case 24:
{
return symbol(sym.TILDE);
}
case 122:
break;
case 37:
{
return symbol(sym.HL,yytext());
}
case 123:
break;
case 1:
{
}
case 124:
break;
default :
if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
yy_atEOF=true;
yy_do_eof();
switch (yy_lexical_state) {
case STRING:
{
throw new Error("String_Node_Str");
}
case 105:
break;
case QUOTED:
{
throw new Error("String_Node_Str");
}
case 106:
break;
case COMMENT:
{
throw new Error("String_Node_Str");
}
case 107:
break;
case COMMENT_INNER:
{
throw new Error("String_Node_Str");
}
case 108:
break;
default :
{
return new java_cup.runtime.Symbol(sym.EOF);
}
}
}
 else {
yy_ScanError(YY_NO_MATCH);
}
}
}
}

Fixed version (ground truth):
/** 
 * Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
 * @return      the next token
 * @exception IOException  if any I/O-Error occurs
 */
public java_cup.runtime.Symbol next_token() throws java.io.IOException {
  int yy_input;
  int yy_action;
  int yy_currentPos_l;
  int yy_markedPos_l;
  int yy_endRead_l=yy_endRead;
  char[] yy_buffer_l=yy_buffer;
  char[] yycmap_l=yycmap;
  int[] yytrans_l=yytrans;
  int[] yy_rowMap_l=yy_rowMap;
  int[] yy_attr_l=YY_ATTRIBUTE;
  while (true) {
    yy_markedPos_l=yy_markedPos;
    boolean yy_r=false;
    for (yy_currentPos_l=yy_startRead; yy_currentPos_l < yy_markedPos_l; yy_currentPos_l++) {
switch (yy_buffer_l[yy_currentPos_l]) {
case '\u000B':
case '\u000C':
case '\u0085':
case '\u2028':
case '\u2029':
        yyline++;
      yycolumn=0;
    yy_r=false;
  break;
case '\r':
yyline++;
yycolumn=0;
yy_r=true;
break;
case '\n':
if (yy_r) yy_r=false;
 else {
yyline++;
yycolumn=0;
}
break;
default :
yy_r=false;
yycolumn++;
}
}
if (yy_r) {
boolean yy_peek;
if (yy_markedPos_l < yy_endRead_l) yy_peek=yy_buffer_l[yy_markedPos_l] == '\n';
 else if (yy_atEOF) yy_peek=false;
 else {
boolean eof=yy_refill();
yy_markedPos_l=yy_markedPos;
yy_buffer_l=yy_buffer;
if (eof) yy_peek=false;
 else yy_peek=yy_buffer_l[yy_markedPos_l] == '\n';
}
if (yy_peek) yyline--;
}
yy_action=-1;
yy_currentPos_l=yy_currentPos=yy_startRead=yy_markedPos_l;
yy_state=yy_lexical_state;
yy_forAction: {
while (true) {
if (yy_currentPos_l < yy_endRead_l) yy_input=yy_buffer_l[yy_currentPos_l++];
 else if (yy_atEOF) {
yy_input=YYEOF;
break yy_forAction;
}
 else {
yy_currentPos=yy_currentPos_l;
yy_markedPos=yy_markedPos_l;
boolean eof=yy_refill();
yy_currentPos_l=yy_currentPos;
yy_markedPos_l=yy_markedPos;
yy_buffer_l=yy_buffer;
yy_endRead_l=yy_endRead;
if (eof) {
yy_input=YYEOF;
break yy_forAction;
}
 else {
yy_input=yy_buffer_l[yy_currentPos_l++];
}
}
int yy_next=yytrans_l[yy_rowMap_l[yy_state] + yycmap_l[yy_input]];
if (yy_next == -1) break yy_forAction;
yy_state=yy_next;
int yy_attributes=yy_attr_l[yy_state];
if ((yy_attributes & 1) == 1) {
yy_action=yy_state;
yy_markedPos_l=yy_currentPos_l;
if ((yy_attributes & 8) == 8) break yy_forAction;
}
}
}
yy_markedPos=yy_markedPos_l;
switch (yy_action < 0 ? yy_action : YY_ACTION[yy_action]) {
case 22:
{
return symbol(sym.GUARD);
}
case 63:
break;
case 61:
{
return symbol(sym.CHAR_CODE_LITERAL,yytext());
}
case 64:
break;
case 34:
{
return symbol(sym.MINUS_DOT);
}
case 65:
break;
case 48:
{
token.append(yytext());
yybegin(YYINITIAL);
return symbol(sym.SYMBOL_NAME,string.toString(),token.toString(),startline,startcol);
}
case 66:
break;
case 45:
{
return symbol(sym.RBRACE_UNDERBAR);
}
case 67:
break;
case 18:
{
return symbol(sym.RPAREN);
}
case 68:
break;
case 53:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 69:
break;
case 41:
{
return symbol(sym.PLUS_DOT);
}
case 70:
break;
case 35:
{
return symbol(sym.NEGATIVE);
}
case 71:
break;
case 11:
{
return symbol(sym.BACKSLASH);
}
case 72:
break;
case 23:
{
return symbol(sym.HAT);
}
case 73:
break;
case 19:
{
return symbol(sym.LBRACE);
}
case 74:
break;
case 47:
{
string.setLength(0);
token.setLength(0);
token.append(yytext());
startline=yyline;
startcol=yycolumn;
yybegin(QUOTED);
}
case 75:
break;
case 26:
{
return symbol(sym.LBRACKET);
}
case 76:
break;
case 57:
{
return symbol(sym.RBRACE_SLASH_AT);
}
case 77:
break;
case 25:
{
return symbol(sym.PROCVAR);
}
case 78:
break;
case 8:
{
string.setLength(0);
token.setLength(0);
token.append(yytext());
startline=yyline;
startcol=yycolumn;
yybegin(STRING);
}
case 79:
break;
case 44:
{
return symbol(sym.RBRACE_AT);
}
case 80:
break;
case 56:
{
return symbol(sym.SYMBOL_NAME,yytext());
}
case 81:
break;
case 13:
{
return symbol(sym.SLASH);
}
case 82:
break;
case 21:
{
return symbol(sym.RULEVAR);
}
case 83:
break;
case 32:
{
yybegin(YYINITIAL);
}
case 84:
break;
case 15:
{
return symbol(sym.PLUS);
}
case 85:
break;
case 60:
{
return symbol(sym.MOD);
}
case 86:
break;
case 6:
{
return symbol(sym.PERIOD);
}
case 87:
break;
case 42:
{
return symbol(sym.RBRACE_SLASH);
}
case 88:
break;
case 62:
{
return symbol(sym.RBRACE_UNDERBAR_SLASH_AT);
}
case 89:
break;
case 14:
{
return symbol(sym.ASTERISK);
}
case 90:
break;
case 55:
{
return symbol(sym.PATHED_ATOM_NAME,yytext());
}
case 91:
break;
case 31:
{
yybegin(COMMENT);
}
case 92:
break;
case 4:
{
return symbol(sym.LINK_NAME,yytext(),yytext(),yyline,yycolumn);
}
case 93:
break;
case 27:
{
return symbol(sym.RBRACKET);
}
case 94:
break;
case 12:
{
return symbol(sym.COLON);
}
case 95:
break;
case 50:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 96:
break;
case 39:
{
return symbol(sym.ASTERISK_DOT);
}
case 97:
break;
case 40:
{
return symbol(sym.ASTERISK_ASTERISK);
}
case 98:
break;
case 38:
{
return symbol(sym.SLASH_DOT);
}
case 99:
break;
case 43:
{
return symbol(sym.RBRACE_ASTERISK);
}
case 100:
break;
case 17:
{
return symbol(sym.LPAREN);
}
case 101:
break;
case 30:
{
yybegin(COMMENT_INNER);
}
case 102:
break;
case 20:
{
return symbol(sym.RBRACE);
}
case 103:
break;
case 33:
{
return symbol(sym.NUMBER_NAME,yytext());
}
case 104:
break;
case 52:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 105:
break;
case 9:
{
return symbol(sym.RELOP,yytext());
}
case 106:
break;
case 3:
{
}
case 107:
break;
case 49:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 108:
break;
case 58:
{
return symbol(sym.RBRACE_UNDERBAR_SLASH);
}
case 109:
break;
case 7:
{
return symbol(sym.MINUS);
}
case 110:
break;
case 28:
{
token.append(yytext());
string.append(yytext());
}
case 111:
break;
case 54:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 112:
break;
case 36:
{
return symbol(sym.RULE,new Integer(yyline + 1));
}
case 113:
break;
case 2:
{
throw new Error("String_Node_Str" + yytext() + "String_Node_Str"+ (yyline + 1));
}
case 114:
break;
case 29:
{
token.append(yytext());
yybegin(YYINITIAL);
return symbol(sym.STRING,string.toString(),token.toString(),startline,startcol);
}
case 115:
break;
case 46:
{
return symbol(sym.RULENAMESEP);
}
case 116:
break;
case 59:
{
return symbol(sym.RBRACE_UNDERBAR_AT);
}
case 117:
break;
case 51:
{
token.append(yytext());
string.append("String_Node_Str");
}
case 118:
break;
case 10:
{
return symbol(sym.EXCLA);
}
case 119:
break;
case 5:
{
return symbol(sym.ATOM_NAME,yytext());
}
case 120:
break;
case 16:
{
return symbol(sym.COMMA);
}
case 121:
break;
case 24:
{
return symbol(sym.TILDE);
}
case 122:
break;
case 37:
{
return symbol(sym.HL,yytext());
}
case 123:
break;
case 1:
{
}
case 124:
break;
default :
if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
yy_atEOF=true;
yy_do_eof();
switch (yy_lexical_state) {
case STRING:
{
throw new Error("String_Node_Str");
}
case 101:
break;
case QUOTED:
{
throw new Error("String_Node_Str");
}
case 102:
break;
case COMMENT:
{
throw new Error("String_Node_Str");
}
case 103:
break;
case COMMENT_INNER:
{
throw new Error("String_Node_Str");
}
case 104:
break;
default :
{
return new java_cup.runtime.Symbol(sym.EOF);
}
}
}
 else {
yy_ScanError(YY_NO_MATCH);
}
}
}
}