Program: 85196
Project: 85196
Buggy source:
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == 0 || type == Tokens.SEMICOLON) {
    pm.popParser(true);
    return true;
  }
  if (this.isInMode(VALUE)) {
    if (type == Tokens.OPEN_PARENTHESIS) {
      this.mode=TUPLE_END;
      this.value=new TupleValue(token);
      if (!token.next().isType(Tokens.CLOSE_PARENTHESIS)) {
        pm.pushParser(new ExpressionListParser((IValueList)this.value));
      }
      return true;
    }
    if (type == Tokens.OPEN_SQUARE_BRACKET) {
      this.mode=ACCESS | VARIABLE | LAMBDA;
      pm.pushParser(new TypeParser(this),true);
      return true;
    }
    if (type == Tokens.OPEN_CURLY_BRACKET) {
      this.mode=LIST_END;
      this.value=new StatementList(token);
      if (!token.next().isType(Tokens.CLOSE_CURLY_BRACKET)) {
        pm.pushParser(new ExpressionListParser((IValueList)this.value));
      }
      return true;
    }
    if ((type & Tokens.TYPE_SYMBOL_ID) == Tokens.TYPE_SYMBOL_ID) {
      this.prefix=true;
      return this.getAccess(pm,token.value(),token,type);
    }
    if (type == Tokens.ARROW_OPERATOR) {
      this.mode=ACCESS | VARIABLE;
      pm.pushParser(new TypeParser(this),true);
      return true;
    }
    if (ParserUtil.isIdentifier(type)) {
      this.mode=ACCESS | VARIABLE | LAMBDA;
      pm.pushParser(new TypeParser(this),true);
      return true;
    }
    if (this.parsePrimitive(token,type)) {
      this.mode=ACCESS;
      return true;
    }
    if (this.parseKeyword(pm,token,type)) {
      return true;
    }
    this.mode=ACCESS;
  }
  if (this.isInMode(LIST_END)) {
    if (type == Tokens.CLOSE_CURLY_BRACKET) {
      this.value.expandPosition(token);
      if (token.next().equals("String_Node_Str")) {
        this.mode=ACCESS_2;
        this.dotless=false;
        pm.skip();
        return true;
      }
      pm.popParser();
      return true;
    }
    return false;
  }
  if (this.isInMode(TUPLE_END)) {
    if (type == Tokens.CLOSE_PARENTHESIS) {
      this.value.expandPosition(token);
      this.mode=ACCESS | VARIABLE | LAMBDA;
      return true;
    }
    return false;
  }
  if (this.isInMode(BYTECODE)) {
    if (type == Tokens.OPEN_CURLY_BRACKET) {
      Bytecode bc=new Bytecode(token);
      pm.pushParser(new BytecodeParser(bc));
      this.value=bc;
      this.mode=BYTECODE_END;
      return true;
    }
    return false;
  }
  if (this.isInMode(BYTECODE_END)) {
    if (type == Tokens.CLOSE_CURLY_BRACKET) {
      this.value.expandPosition(token);
      pm.popParser();
      return true;
    }
    return false;
  }
  if (this.isInMode(LAMBDA)) {
    if (type == Tokens.ARROW_OPERATOR) {
      LambdaValue lv=getLambdaValue(this.value);
      if (lv != null) {
        lv.expandPosition(token);
        this.value=lv;
        pm.popParser();
        pm.pushParser(new ExpressionParser(lv));
        return true;
      }
      if (this.value.getValueType() == IValue.TUPLE) {
        TupleType tt=getTupleType((TupleValue)this.value);
        if (tt != null) {
          LambdaType lt=new LambdaType(tt);
          pm.pushParser(new TypeParser(lt));
          this.value=new ClassAccess(null,lt);
          this.mode=VARIABLE;
          return true;
        }
      }
      return false;
    }
  }
  if (this.isInMode(VARIABLE)) {
    if (ParserUtil.isIdentifier(type) && token.next().isType(Tokens.EQUALS)) {
      ICodePosition pos=token.raw();
      IType itype;
      int i=this.value.getValueType();
      if (i == IValue.CLASS_ACCESS) {
        itype=((ClassAccess)this.value).type;
      }
 else       if (i == IValue.TUPLE) {
        itype=getTupleType((TupleValue)this.value);
      }
 else {
        return false;
      }
      String name=token.value();
      FieldInitializer access=new FieldInitializer(pos,name,itype);
      this.value=access;
      pm.skip();
      pm.pushParser(new ExpressionParser(access));
      return true;
    }
  }
  if (this.isInMode(ACCESS)) {
    if (type == Tokens.DOT) {
      this.mode=ACCESS_2;
      this.dotless=false;
      return true;
    }
    this.dotless=true;
    this.mode=ACCESS_2;
    if (type == Tokens.ELSE) {
      pm.popParser(true);
      return true;
    }
    if (type == Tokens.EQUALS) {
      return this.getAssign(pm);
    }
    if (type == Tokens.OPEN_PARENTHESIS) {
      IToken prev=token.prev();
      if (prev.isType(Tokens.TYPE_IDENTIFIER)) {
        this.value=new MethodCall(prev,null,prev.value());
        this.mode=PARAMETERS;
      }
 else {
        this.value=new ApplyMethodCall(this.value.getPosition(),this.value);
        this.mode=PARAMETERS;
      }
    }
  }
  if (this.isInMode(ACCESS_2)) {
    if (ParserUtil.isIdentifier(type)) {
      this.prefix=false;
      String name=token.value();
      if (this.precedence != 0 && this.dotless) {
        int p=Operators.index(name);
        if (p != 0 && this.precedence >= p) {
          pm.popParser(true);
          return true;
        }
      }
      return this.getAccess(pm,name,token,type);
    }
 else     if (ParserUtil.isTerminator(type)) {
      pm.popParser(true);
      return true;
    }
    IToken prev=token.prev();
    if (prev.isType(Tokens.TYPE_IDENTIFIER)) {
      this.value=null;
      pm.reparse();
      return this.getAccess(pm,prev.value(),prev,type);
    }
 else {
      ApplyMethodCall call=new ApplyMethodCall(token.raw(),this.value);
      this.value=call;
      this.mode=0;
      pm.pushParser(new ExpressionParser(this),true);
      return true;
    }
  }
  if (this.isInMode(CONSTRUCTOR)) {
    if (type == Tokens.OPEN_PARENTHESIS) {
      pm.pushParser(new ExpressionListParser((IValueList)this.value));
      this.mode=PARAMETERS_END;
      return true;
    }
    if (type == Tokens.OPEN_CURLY_BRACKET) {
      SpecialConstructor pc=new SpecialConstructor(token,(ConstructorCall)this.value);
      pm.pushParser(new ExpressionListParser(pc.list));
      this.value=pc;
      this.mode=LIST_END;
      return true;
    }
    pm.pushParser(new ExpressionParser(this),true);
    ((ConstructorCall)this.value).isSugarCall=true;
    this.mode=0;
    return true;
  }
  if (this.isInMode(PARAMETERS)) {
    if (type == Tokens.OPEN_PARENTHESIS) {
      pm.pushParser(new ExpressionListParser((IValueList)this.value));
      this.mode=PARAMETERS_END;
      return true;
    }
    return false;
  }
  if (this.isInMode(PARAMETERS_END)) {
    if (type == Tokens.CLOSE_PARENTHESIS) {
      this.value.expandPosition(token);
      this.mode=ACCESS;
      return true;
    }
    return false;
  }
  if (this.value != null) {
    this.value.expandPosition(token);
    pm.popParser(true);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == 0 || type == Tokens.SEMICOLON) {
    pm.popParser(true);
    return true;
  }
  if (this.isInMode(VALUE)) {
    if (type == Tokens.OPEN_PARENTHESIS) {
      this.mode=TUPLE_END;
      this.value=new TupleValue(token);
      int nextType=token.next().type();
      if (nextType != Tokens.CLOSE_PARENTHESIS) {
        pm.pushParser(new ExpressionListParser((IValueList)this.value));
      }
      return true;
    }
    if (type == Tokens.OPEN_SQUARE_BRACKET) {
      this.mode=ACCESS | VARIABLE | LAMBDA;
      pm.pushParser(new TypeParser(this),true);
      return true;
    }
    if (type == Tokens.OPEN_CURLY_BRACKET) {
      this.mode=LIST_END;
      this.value=new StatementList(token);
      int nextType=token.next().type();
      if (nextType != Tokens.CLOSE_CURLY_BRACKET) {
        pm.pushParser(new ExpressionListParser((IValueList)this.value));
      }
      return true;
    }
    if ((type & Tokens.TYPE_SYMBOL_ID) == Tokens.TYPE_SYMBOL_ID) {
      this.prefix=true;
      return this.getAccess(pm,token.value(),token,type);
    }
    if (type == Tokens.ARROW_OPERATOR) {
      this.mode=ACCESS | VARIABLE;
      pm.pushParser(new TypeParser(this),true);
      return true;
    }
    if (ParserUtil.isIdentifier(type)) {
      this.mode=ACCESS | VARIABLE | LAMBDA;
      pm.pushParser(new TypeParser(this),true);
      return true;
    }
    if (this.parsePrimitive(token,type)) {
      this.mode=ACCESS;
      return true;
    }
    if (this.parseKeyword(pm,token,type)) {
      return true;
    }
    this.mode=ACCESS;
  }
  if (this.isInMode(LIST_END)) {
    if (type == Tokens.CLOSE_CURLY_BRACKET) {
      this.value.expandPosition(token);
      if (token.next().equals("String_Node_Str")) {
        this.mode=ACCESS_2;
        this.dotless=false;
        pm.skip();
        return true;
      }
      pm.popParser();
      return true;
    }
    return false;
  }
  if (this.isInMode(TUPLE_END)) {
    if (type == Tokens.CLOSE_PARENTHESIS) {
      this.value.expandPosition(token);
      this.mode=ACCESS | VARIABLE | LAMBDA;
      return true;
    }
    return false;
  }
  if (this.isInMode(PARAMETERS)) {
    if (type == Tokens.OPEN_PARENTHESIS) {
      pm.pushParser(new ExpressionListParser((IValueList)this.value));
      this.mode=PARAMETERS_END;
      return true;
    }
    return false;
  }
  if (this.isInMode(PARAMETERS_END)) {
    if (type == Tokens.CLOSE_PARENTHESIS) {
      this.value.expandPosition(token);
      this.mode=ACCESS;
      return true;
    }
    return false;
  }
  if (this.isInMode(BYTECODE)) {
    if (type == Tokens.OPEN_CURLY_BRACKET) {
      Bytecode bc=new Bytecode(token);
      pm.pushParser(new BytecodeParser(bc));
      this.value=bc;
      this.mode=BYTECODE_END;
      return true;
    }
    return false;
  }
  if (this.isInMode(BYTECODE_END)) {
    if (type == Tokens.CLOSE_CURLY_BRACKET) {
      this.value.expandPosition(token);
      pm.popParser();
      return true;
    }
    return false;
  }
  if (ParserUtil.isCloseBracket(type)) {
    pm.popParser(true);
    return true;
  }
  if (this.isInMode(LAMBDA)) {
    if (type == Tokens.ARROW_OPERATOR) {
      LambdaValue lv=getLambdaValue(this.value);
      if (lv != null) {
        lv.expandPosition(token);
        this.value=lv;
        pm.popParser();
        pm.pushParser(new ExpressionParser(lv));
        return true;
      }
      if (this.value.getValueType() == IValue.TUPLE) {
        TupleType tt=getTupleType((TupleValue)this.value);
        if (tt != null) {
          LambdaType lt=new LambdaType(tt);
          pm.pushParser(new TypeParser(lt));
          this.value=new ClassAccess(null,lt);
          this.mode=VARIABLE;
          return true;
        }
      }
      return false;
    }
  }
  if (this.isInMode(VARIABLE)) {
    if (ParserUtil.isIdentifier(type) && token.next().type() == Tokens.EQUALS) {
      ICodePosition pos=token.raw();
      IType itype;
      int i=this.value.getValueType();
      if (i == IValue.CLASS_ACCESS) {
        itype=((ClassAccess)this.value).type;
      }
 else       if (i == IValue.TUPLE) {
        itype=getTupleType((TupleValue)this.value);
      }
 else {
        return false;
      }
      String name=token.value();
      FieldInitializer access=new FieldInitializer(pos,name,itype);
      this.value=access;
      pm.skip();
      pm.pushParser(new ExpressionParser(access));
      return true;
    }
  }
  if (this.isInMode(ACCESS)) {
    if (type == Tokens.DOT) {
      this.mode=ACCESS_2;
      this.dotless=false;
      return true;
    }
    this.dotless=true;
    this.mode=ACCESS_2;
    if (type == Tokens.ELSE) {
      pm.popParser(true);
      return true;
    }
    if (type == Tokens.EQUALS) {
      return this.getAssign(pm);
    }
    if (type == Tokens.OPEN_PARENTHESIS) {
      IToken prev=token.prev();
      if (ParserUtil.isIdentifier(prev.type())) {
        this.value=new MethodCall(prev,null,prev.value());
        this.mode=PARAMETERS;
      }
 else {
        this.value=new ApplyMethodCall(this.value.getPosition(),this.value);
        this.mode=PARAMETERS;
      }
    }
  }
  if (this.isInMode(ACCESS_2)) {
    if (ParserUtil.isIdentifier(type)) {
      this.prefix=false;
      String name=token.value();
      if (this.precedence != 0 && this.dotless) {
        int p=Operators.index(name);
        if (p != 0 && this.precedence >= p) {
          pm.popParser(true);
          return true;
        }
      }
      return this.getAccess(pm,name,token,type);
    }
 else     if (ParserUtil.isTerminator(type)) {
      pm.popParser(true);
      return true;
    }
    IToken prev=token.prev();
    if (ParserUtil.isIdentifier(prev.type())) {
      this.value=null;
      pm.reparse();
      return this.getAccess(pm,prev.value(),prev,type);
    }
 else {
      ApplyMethodCall call=new ApplyMethodCall(token.raw(),this.value);
      this.value=call;
      this.mode=0;
      pm.pushParser(new ExpressionParser(this),true);
      return true;
    }
  }
  if (this.isInMode(CONSTRUCTOR)) {
    if (type == Tokens.OPEN_PARENTHESIS) {
      pm.pushParser(new ExpressionListParser((IValueList)this.value));
      this.mode=PARAMETERS_END;
      return true;
    }
    if (type == Tokens.OPEN_CURLY_BRACKET) {
      SpecialConstructor pc=new SpecialConstructor(token,(ConstructorCall)this.value);
      pm.pushParser(new ExpressionListParser(pc.list));
      this.value=pc;
      this.mode=LIST_END;
      return true;
    }
    pm.pushParser(new ExpressionParser(this),true);
    ((ConstructorCall)this.value).isSugarCall=true;
    this.mode=0;
    return true;
  }
  if (this.value != null) {
    this.value.expandPosition(token);
    pm.popParser(true);
    return true;
  }
  return false;
}