Program: 153642
Project: 153642
Buggy source:
/** 
 * Reads the next token.
 * @return The next token.
 */
public Token next(){
  if (this.ungot != null) {
    this.token=this.ungot;
    this.ungot=null;
    return this.token;
  }
  try {
    for (; ; ) {
switch (this.current) {
case -1:
        return this.token=Token.EOF;
case '\n':
      this.lineNumber++;
case ' ':
case '\t':
case '\r':
    this.read();
  continue;
case '"':
case '\'':
this.readString();
return this.token=Token.STRING;
case '+':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_ADD;
}
 else if (this.current == '+') {
this.read();
return this.token=Token.MAP_CONCAT;
}
return this.token=Token.ADD;
case '-':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_SUB;
}
 else if (this.current == '>') {
this.read();
return this.token=Token.ARROW;
}
return this.token=Token.SUB;
case '*':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_MUL;
}
return this.token=Token.MUL;
case '%':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_MODULO;
}
return this.token=Token.MODULO;
case '?':
this.read();
return this.token=Token.TERNARY;
case '/':
this.read();
if (this.current == '/') {
while (this.current != '\n' && this.current != -1) this.read();
continue;
}
 else if (this.current == '*') {
this.read();
boolean inComment=true;
while (inComment) {
switch (this.current) {
case -1:
throw new WeelException(this.error("String_Node_Str"));
case '*':
this.read();
if (this.current == '/') {
this.read();
inComment=false;
}
break;
case '\n':
this.lineNumber++;
default :
this.read();
break;
}
}
continue;
}
 else if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_DIV;
}
return this.token=Token.DIV;
case '(':
this.read();
return this.token=Token.BRACE_OPEN;
case ')':
this.read();
return this.token=Token.BRACE_CLOSE;
case '{':
this.read();
return this.token=Token.CURLY_BRACE_OPEN;
case '}':
this.read();
return this.token=Token.CURLY_BRACE_CLOSE;
case '[':
this.read();
return this.token=Token.BRACKET_OPEN;
case ']':
this.read();
return this.token=Token.BRACKET_CLOSE;
case ',':
this.read();
return this.token=Token.COMMA;
case '.':
this.read();
if (this.current == '.') {
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_STRCAT;
}
return this.token=Token.STRING_CONCAT;
}
 else if (Character.isDigit(this.current)) {
this.readNumber(true);
return this.token=Token.NUMBER;
}
return this.token=Token.DOT;
case ';':
this.read();
return this.token=Token.SEMICOLON;
case '~':
this.read();
return this.token=Token.BINARY_NOT;
case '^':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_XOR;
}
return this.token=Token.BINARY_XOR;
case '=':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.EQUAL;
}
return this.token=Token.ASSIGN;
case '>':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.GREATER_EQUAL;
}
return this.token=Token.GREATER;
case '<':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.LESS_EQUAL;
}
return this.token=Token.LESS;
case '&':
this.read();
if (this.current == '&') {
this.read();
return this.token=Token.LOGICAL_AND;
}
 else if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_AND;
}
return this.token=Token.BINARY_AND;
case '|':
this.read();
if (this.current == '|') {
this.read();
return this.token=Token.LOGICAL_OR;
}
 else if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_OR;
}
return this.token=Token.BINARY_OR;
case '!':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.NOT_EQUAL;
}
return this.token=Token.LOGICAL_NOT;
case '@':
this.read();
if (this.current == '{') {
this.read();
return this.token=Token.ANON_OPEN;
}
return this.token=Token.AT;
case ':':
this.read();
if (this.current == ':') {
this.read();
return this.token=Token.DOUBLE_COLON;
}
return this.token=Token.COLON;
default :
if (Character.isLetter(this.current) || this.current == '_') {
this.readName();
if ((this.reserved=ReservedWord.fromString(this.string)) != null) return this.token=Token.RESERVED;
return this.token=Token.NAME;
}
 else if (Character.isDigit(this.current)) {
this.readNumber(false);
return this.token=Token.NUMBER;
}
throw new WeelException(this.error("String_Node_Str",this.current));
}
}
}
 catch (final IOException e) {
throw new WeelException(this.error(e.toString()),e);
}
}

Fixed version (ground truth):
/** 
 * Reads the next token.
 * @return The next token.
 */
public Token next(){
  if (this.ungot != null) {
    this.token=this.ungot;
    this.ungot=null;
    return this.token;
  }
  try {
    for (; ; ) {
switch (this.current) {
case -1:
        return this.token=Token.EOF;
case '\n':
      this.lineNumber++;
case ' ':
case '\t':
case '\r':
    this.read();
  continue;
case '"':
case '\'':
this.readString();
return this.token=Token.STRING;
case '+':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_ADD;
}
 else if (this.current == '+') {
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_MAPCAT;
}
return this.token=Token.MAP_CONCAT;
}
return this.token=Token.ADD;
case '-':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_SUB;
}
 else if (this.current == '>') {
this.read();
return this.token=Token.ARROW;
}
return this.token=Token.SUB;
case '*':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_MUL;
}
return this.token=Token.MUL;
case '%':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_MODULO;
}
return this.token=Token.MODULO;
case '?':
this.read();
return this.token=Token.TERNARY;
case '/':
this.read();
if (this.current == '/') {
while (this.current != '\n' && this.current != -1) this.read();
continue;
}
 else if (this.current == '*') {
this.read();
boolean inComment=true;
while (inComment) {
switch (this.current) {
case -1:
throw new WeelException(this.error("String_Node_Str"));
case '*':
this.read();
if (this.current == '/') {
this.read();
inComment=false;
}
break;
case '\n':
this.lineNumber++;
default :
this.read();
break;
}
}
continue;
}
 else if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_DIV;
}
return this.token=Token.DIV;
case '(':
this.read();
return this.token=Token.BRACE_OPEN;
case ')':
this.read();
return this.token=Token.BRACE_CLOSE;
case '{':
this.read();
return this.token=Token.CURLY_BRACE_OPEN;
case '}':
this.read();
return this.token=Token.CURLY_BRACE_CLOSE;
case '[':
this.read();
return this.token=Token.BRACKET_OPEN;
case ']':
this.read();
return this.token=Token.BRACKET_CLOSE;
case ',':
this.read();
return this.token=Token.COMMA;
case '.':
this.read();
if (this.current == '.') {
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_STRCAT;
}
return this.token=Token.STRING_CONCAT;
}
 else if (Character.isDigit(this.current)) {
this.readNumber(true);
return this.token=Token.NUMBER;
}
return this.token=Token.DOT;
case ';':
this.read();
return this.token=Token.SEMICOLON;
case '~':
this.read();
return this.token=Token.BINARY_NOT;
case '^':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_XOR;
}
return this.token=Token.BINARY_XOR;
case '=':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.EQUAL;
}
return this.token=Token.ASSIGN;
case '>':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.GREATER_EQUAL;
}
return this.token=Token.GREATER;
case '<':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.LESS_EQUAL;
}
return this.token=Token.LESS;
case '&':
this.read();
if (this.current == '&') {
this.read();
return this.token=Token.LOGICAL_AND;
}
 else if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_AND;
}
return this.token=Token.BINARY_AND;
case '|':
this.read();
if (this.current == '|') {
this.read();
return this.token=Token.LOGICAL_OR;
}
 else if (this.current == '=') {
this.read();
return this.token=Token.ASSIGN_OR;
}
return this.token=Token.BINARY_OR;
case '!':
this.read();
if (this.current == '=') {
this.read();
return this.token=Token.NOT_EQUAL;
}
return this.token=Token.LOGICAL_NOT;
case '@':
this.read();
if (this.current == '{') {
this.read();
return this.token=Token.ANON_OPEN;
}
return this.token=Token.AT;
case ':':
this.read();
if (this.current == ':') {
this.read();
return this.token=Token.DOUBLE_COLON;
}
return this.token=Token.COLON;
default :
if (Character.isLetter(this.current) || this.current == '_') {
this.readName();
if ((this.reserved=ReservedWord.fromString(this.string)) != null) return this.token=Token.RESERVED;
return this.token=Token.NAME;
}
 else if (Character.isDigit(this.current)) {
this.readNumber(false);
return this.token=Token.NUMBER;
}
throw new WeelException(this.error("String_Node_Str",this.current));
}
}
}
 catch (final IOException e) {
throw new WeelException(this.error(e.toString()),e);
}
}