Program: 84179
Project: 84179
Buggy source:
@Override public void parse(IParserManager pm,IToken token){
  final int type=token.type();
switch (type) {
case Tokens.EOF:
case BaseSymbols.SEMICOLON:
case BaseSymbols.COMMA:
case Tokens.STRING_PART:
case Tokens.STRING_END:
    this.end(pm,true);
  return;
}
switch (this.mode) {
case END:
this.end(pm,true);
return;
case VALUE:
if ((type & Tokens.IDENTIFIER) != 0) {
this.parseInfixAccess(pm,token);
return;
}
if (this.parseValue(pm,token,type)) {
return;
}
case ACCESS:
switch (type) {
case BaseSymbols.DOT:
this.mode=DOT_ACCESS;
return;
case DyvilSymbols.ARROW_RIGHT:
case DyvilSymbols.DOUBLE_ARROW_RIGHT:
if (!this.hasFlag(IGNORE_LAMBDA)) {
break;
}
case DyvilKeywords.ELSE:
case DyvilKeywords.CATCH:
case DyvilKeywords.FINALLY:
case DyvilKeywords.WHILE:
this.end(pm,true);
return;
case DyvilKeywords.AS:
{
final CastOperator castOperator=new CastOperator(token.raw(),this.value);
pm.pushParser(new TypeParser(castOperator));
this.value=castOperator;
return;
}
case DyvilKeywords.IS:
{
final InstanceOfOperator instanceOfOperator=new InstanceOfOperator(token.raw(),this.value);
pm.pushParser(new TypeParser(instanceOfOperator));
this.value=instanceOfOperator;
return;
}
case DyvilKeywords.MATCH:
MatchExpr me=new MatchExpr(token.raw(),this.value);
pm.pushParser(new MatchExpressionParser(me));
this.value=me;
return;
case BaseSymbols.OPEN_SQUARE_BRACKET:
final SubscriptAccess subscriptAccess=new SubscriptAccess(token,this.value);
ArgumentListParser.parseArguments(pm,token.next(),subscriptAccess);
this.value=subscriptAccess;
this.mode=SUBSCRIPT_END;
return;
case BaseSymbols.OPEN_PARENTHESIS:
final ApplyMethodCall applyMethodCall=new ApplyMethodCall(this.value.getPosition(),this.value);
ArgumentListParser.parseArguments(pm,token.next(),applyMethodCall);
this.value=applyMethodCall;
this.mode=PARAMETERS_END;
return;
case BaseSymbols.COLON:
if (this.hasFlag(IGNORE_COLON)) {
this.end(pm,true);
return;
}
this.parseInfixAccess(pm,token,Names.colon);
return;
case DyvilSymbols.ELLIPSIS:
this.parseInfixAccess(pm,token,Names.dotdotdot);
return;
case BaseSymbols.EQUALS:
if (this.value == null) {
pm.report(Markers.syntaxError(token,"String_Node_Str",token));
this.mode=VALUE;
return;
}
this.parseInfixAccess(pm,token,Names.eq);
return;
}
if (ParserUtil.isExpressionEnd(type)) {
this.end(pm,true);
return;
}
if (isSymbol(type)) {
this.parseInfixAccess(pm,token);
return;
}
if (this.value != null) {
if (this.hasFlag(IGNORE_APPLY) || this.ignoreClosure(type)) {
this.end(pm,true);
return;
}
final ApplyMethodCall applyCall=new ApplyMethodCall(ICodePosition.between(token.prev(),token),this.value,EmptyArguments.VISIBLE);
this.value=applyCall;
this.parseApply(pm,token,applyCall);
pm.reparse();
return;
}
pm.report(Markers.syntaxError(token,"String_Node_Str",token.toString()));
return;
case DOT_ACCESS:
if (type == BaseSymbols.OPEN_CURLY_BRACKET) {
final BraceAccessExpr braceAccessExpr=new BraceAccessExpr(token.raw(),this.value);
pm.pushParser(new StatementListParser(braceAccessExpr::setStatement),true);
this.value=braceAccessExpr;
this.mode=ACCESS;
return;
}
if (isIdentifier(type)) {
this.parseInfixAccess(pm,token);
return;
}
pm.report(Markers.syntaxError(token,"String_Node_Str"));
if (ParserUtil.isTerminator(type)) {
pm.popParser(true);
return;
}
this.mode=ACCESS;
pm.reparse();
return;
case PARAMETERS_END:
this.mode=ACCESS;
this.value.expandPosition(token);
if (type != BaseSymbols.CLOSE_PARENTHESIS) {
pm.reparse();
pm.report(token,"String_Node_Str");
}
return;
case SUBSCRIPT_END:
this.mode=ACCESS;
this.value.expandPosition(token);
if (type != BaseSymbols.CLOSE_SQUARE_BRACKET) {
pm.reparse();
pm.report(token,"String_Node_Str");
}
return;
case TYPE_ARGUMENTS_END:
if (!TypeParser.isGenericEnd(token,type)) {
pm.reparse();
pm.report(token,"String_Node_Str");
}
pm.splitJump(token,1);
final IToken next=token.next();
if (next.type() == BaseSymbols.OPEN_PARENTHESIS) {
pm.skip();
ArgumentListParser.parseArguments(pm,next.next(),(ICall)this.value);
this.mode=PARAMETERS_END;
return;
}
this.mode=ACCESS;
return;
}
throw new Error("String_Node_Str");
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token){
  final int type=token.type();
switch (type) {
case Tokens.EOF:
case BaseSymbols.SEMICOLON:
case BaseSymbols.COMMA:
case Tokens.STRING_PART:
case Tokens.STRING_END:
    this.end(pm,true);
  return;
}
switch (this.mode) {
case END:
this.end(pm,true);
return;
case VALUE:
if ((type & Tokens.IDENTIFIER) != 0) {
this.parseInfixAccess(pm,token,token.nameValue());
return;
}
if (this.parseValue(pm,token,type)) {
return;
}
case ACCESS:
switch (type) {
case BaseSymbols.DOT:
this.mode=DOT_ACCESS;
return;
case DyvilSymbols.ARROW_RIGHT:
case DyvilSymbols.DOUBLE_ARROW_RIGHT:
if (!this.hasFlag(IGNORE_LAMBDA)) {
break;
}
case DyvilKeywords.ELSE:
case DyvilKeywords.CATCH:
case DyvilKeywords.FINALLY:
case DyvilKeywords.WHILE:
this.end(pm,true);
return;
case DyvilKeywords.AS:
{
final CastOperator castOperator=new CastOperator(token.raw(),this.value);
pm.pushParser(new TypeParser(castOperator));
this.value=castOperator;
return;
}
case DyvilKeywords.IS:
{
final InstanceOfOperator instanceOfOperator=new InstanceOfOperator(token.raw(),this.value);
pm.pushParser(new TypeParser(instanceOfOperator));
this.value=instanceOfOperator;
return;
}
case DyvilKeywords.MATCH:
MatchExpr me=new MatchExpr(token.raw(),this.value);
pm.pushParser(new MatchExpressionParser(me));
this.value=me;
return;
case BaseSymbols.OPEN_SQUARE_BRACKET:
final SubscriptAccess subscriptAccess=new SubscriptAccess(token,this.value);
ArgumentListParser.parseArguments(pm,token.next(),subscriptAccess);
this.value=subscriptAccess;
this.mode=SUBSCRIPT_END;
return;
case BaseSymbols.OPEN_PARENTHESIS:
final ApplyMethodCall applyMethodCall=new ApplyMethodCall(this.value.getPosition(),this.value);
ArgumentListParser.parseArguments(pm,token.next(),applyMethodCall);
this.value=applyMethodCall;
this.mode=PARAMETERS_END;
return;
case BaseSymbols.COLON:
if (this.hasFlag(IGNORE_COLON)) {
this.end(pm,true);
return;
}
this.parseInfixAccess(pm,token,Names.colon);
return;
case BaseSymbols.EQUALS:
if (this.value == null) {
pm.report(Markers.syntaxError(token,"String_Node_Str",token));
this.mode=VALUE;
return;
}
this.parseInfixAccess(pm,token,Names.eq);
return;
}
if (ParserUtil.isExpressionEnd(type)) {
this.end(pm,true);
return;
}
if (isSymbol(type)) {
this.parseInfixAccess(pm,token);
return;
}
if (this.value != null) {
if (this.hasFlag(IGNORE_APPLY) || this.ignoreClosure(type)) {
this.end(pm,true);
return;
}
final ApplyMethodCall applyCall=new ApplyMethodCall(ICodePosition.between(token.prev(),token),this.value,EmptyArguments.VISIBLE);
this.value=applyCall;
this.parseApply(pm,token,applyCall);
pm.reparse();
return;
}
pm.report(Markers.syntaxError(token,"String_Node_Str",token.toString()));
return;
case DOT_ACCESS:
if (type == BaseSymbols.OPEN_CURLY_BRACKET) {
final BraceAccessExpr braceAccessExpr=new BraceAccessExpr(token.raw(),this.value);
pm.pushParser(new StatementListParser(braceAccessExpr::setStatement),true);
this.value=braceAccessExpr;
this.mode=ACCESS;
return;
}
if (isIdentifier(type)) {
this.parseInfixAccess(pm,token,token.nameValue());
return;
}
pm.report(Markers.syntaxError(token,"String_Node_Str"));
if (ParserUtil.isTerminator(type)) {
pm.popParser(true);
return;
}
this.mode=ACCESS;
pm.reparse();
return;
case PARAMETERS_END:
this.mode=ACCESS;
this.value.expandPosition(token);
if (type != BaseSymbols.CLOSE_PARENTHESIS) {
pm.reparse();
pm.report(token,"String_Node_Str");
}
return;
case SUBSCRIPT_END:
this.mode=ACCESS;
this.value.expandPosition(token);
if (type != BaseSymbols.CLOSE_SQUARE_BRACKET) {
pm.reparse();
pm.report(token,"String_Node_Str");
}
return;
case TYPE_ARGUMENTS_END:
if (!TypeParser.isGenericEnd(token,type)) {
pm.reparse();
pm.report(token,"String_Node_Str");
}
pm.splitJump(token,1);
final IToken next=token.next();
if (next.type() == BaseSymbols.OPEN_PARENTHESIS) {
pm.skip();
ArgumentListParser.parseArguments(pm,next.next(),(ICall)this.value);
this.mode=PARAMETERS_END;
return;
}
this.mode=ACCESS;
return;
}
throw new Error("String_Node_Str");
}