Program: 61747
Project: 61747
Buggy source:
private GraphTargetItem name(Reference<Boolean> needsActivation,boolean typeOnly,List<Integer> openedNamespaces,HashMap<String,Integer> registerVars,boolean inFunction,boolean inMethod,List<AssignableAVM2Item> variables,List<String> importedClasses) throws IOException, ParseException {
  ParsedSymbol s=lex();
  String name="String_Node_Str";
  if (s.type == SymbolType.ATTRIBUTE) {
    name+="String_Node_Str";
    s=lex();
  }
  expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.THIS,SymbolType.SUPER,SymbolType.STRING_OP);
  name+=s.value.toString();
  s=lex();
  while (s.isType(SymbolType.DOT)) {
    name+=s.value.toString();
    s=lex();
    if (s.type == SymbolType.ATTRIBUTE) {
      name+="String_Node_Str";
      s=lex();
      if (s.type == SymbolType.IDENTIFIER) {
        name+=s.value.toString();
      }
 else {
        if (s.type != SymbolType.BRACKET_OPEN) {
          throw new ParseException("String_Node_Str",lexer.yyline());
        }
        continue;
      }
    }
 else {
      expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.NAMESPACE);
      name+=s.value.toString();
    }
    s=lex();
  }
  String nsname=null;
  String nsprop=null;
  if (s.type == SymbolType.NAMESPACE_OP) {
    if (name.contains("String_Node_Str")) {
      nsname=name.substring(name.lastIndexOf('.') + 1);
    }
 else {
      nsname=name;
    }
    s=lex();
    if (s.type == SymbolType.IDENTIFIER) {
      nsprop=s.value.toString();
    }
 else {
      nsprop=null;
      lexer.pushback(s);
    }
    if (name.contains("String_Node_Str")) {
      name=name.substring(0,name.lastIndexOf('.'));
    }
 else {
      name=null;
    }
    s=lex();
  }
  List<String> params=new ArrayList<>();
  if (s.type == SymbolType.TYPENAME) {
    s=lex();
    do {
      String p="String_Node_Str";
      expected(s,lexer.yyline(),SymbolType.IDENTIFIER);
      p=s.value.toString();
      s=lex();
      while (s.type == SymbolType.DOT) {
        s=lex();
        expected(s,lexer.yyline(),SymbolType.IDENTIFIER);
        name+="String_Node_Str" + s.value.toString();
        s=lex();
      }
      params.add(p);
    }
 while (s.type == SymbolType.COMMA);
    expected(s,lexer.yyline(),SymbolType.GREATER_THAN);
    s=lex();
  }
  GraphTargetItem index=null;
  if (s.type == SymbolType.BRACKET_OPEN) {
    index=expression(needsActivation,importedClasses,openedNamespaces,registerVars,inFunction,inMethod,true,variables);
    expectedType(SymbolType.BRACKET_CLOSE);
  }
 else {
    lexer.pushback(s);
  }
  GraphTargetItem ret=null;
  if (name != null) {
    UnresolvedAVM2Item unr=new UnresolvedAVM2Item(params,importedClasses,typeOnly,null,lexer.yyline(),name,null,openedNamespaces);
    unr.setIndex(index);
    variables.add(unr);
    ret=unr;
  }
  if (nsname != null) {
    boolean attr=nsname.startsWith("String_Node_Str");
    if (attr) {
      nsname=nsname.substring(1);
    }
    UnresolvedAVM2Item ns=new UnresolvedAVM2Item(params,importedClasses,typeOnly,null,lexer.yyline(),nsname,null,openedNamespaces);
    variables.add(ns);
    ret=new NamespacedAVM2Item(index,ns,nsprop,ret,attr,openedNamespaces,null);
  }
  return ret;
}

Fixed version (ground truth):
private GraphTargetItem name(Reference<Boolean> needsActivation,boolean typeOnly,List<Integer> openedNamespaces,HashMap<String,Integer> registerVars,boolean inFunction,boolean inMethod,List<AssignableAVM2Item> variables,List<String> importedClasses) throws IOException, ParseException {
  ParsedSymbol s=lex();
  String name="String_Node_Str";
  if (s.type == SymbolType.ATTRIBUTE) {
    name+="String_Node_Str";
    s=lex();
  }
  expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.THIS,SymbolType.SUPER,SymbolType.STRING_OP);
  name+=s.value.toString();
  s=lex();
  boolean attrBracket=false;
  while (s.isType(SymbolType.DOT)) {
    name+=s.value.toString();
    s=lex();
    if (s.type == SymbolType.ATTRIBUTE) {
      name+="String_Node_Str";
      s=lex();
      if (s.type == SymbolType.IDENTIFIER) {
        name+=s.value.toString();
      }
 else {
        if (s.type != SymbolType.BRACKET_OPEN) {
          throw new ParseException("String_Node_Str",lexer.yyline());
        }
        attrBracket=true;
        continue;
      }
    }
 else {
      expected(s,lexer.yyline(),SymbolType.IDENTIFIER,SymbolType.NAMESPACE);
      name+=s.value.toString();
    }
    s=lex();
  }
  String nsname=null;
  String nsprop=null;
  if (s.type == SymbolType.NAMESPACE_OP) {
    if (name.contains("String_Node_Str")) {
      nsname=name.substring(name.lastIndexOf('.') + 1);
    }
 else {
      nsname=name;
    }
    s=lex();
    if (s.type == SymbolType.IDENTIFIER) {
      nsprop=s.value.toString();
    }
 else {
      nsprop=null;
      lexer.pushback(s);
    }
    if (name.contains("String_Node_Str")) {
      name=name.substring(0,name.lastIndexOf('.'));
    }
 else {
      name=null;
    }
    s=lex();
  }
  List<String> params=new ArrayList<>();
  if (s.type == SymbolType.TYPENAME) {
    s=lex();
    do {
      String p="String_Node_Str";
      expected(s,lexer.yyline(),SymbolType.IDENTIFIER);
      p=s.value.toString();
      s=lex();
      while (s.type == SymbolType.DOT) {
        s=lex();
        expected(s,lexer.yyline(),SymbolType.IDENTIFIER);
        name+="String_Node_Str" + s.value.toString();
        s=lex();
      }
      params.add(p);
    }
 while (s.type == SymbolType.COMMA);
    expected(s,lexer.yyline(),SymbolType.GREATER_THAN);
    s=lex();
  }
  GraphTargetItem ret=null;
  if (name != null) {
    UnresolvedAVM2Item unr=new UnresolvedAVM2Item(params,importedClasses,typeOnly,null,lexer.yyline(),name,null,openedNamespaces);
    variables.add(unr);
    ret=unr;
  }
  if (nsname != null) {
    boolean attr=nsname.startsWith("String_Node_Str");
    if (attr) {
      nsname=nsname.substring(1);
    }
    UnresolvedAVM2Item ns=new UnresolvedAVM2Item(params,importedClasses,typeOnly,null,lexer.yyline(),nsname,null,openedNamespaces);
    variables.add(ns);
    ret=new NamespacedAVM2Item(ns,nsprop,ret,attr,openedNamespaces,null);
  }
  if (s.type == SymbolType.BRACKET_OPEN) {
    lexer.pushback(s);
    if (attrBracket) {
      lexer.pushback(new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.ATTRIBUTE,"String_Node_Str"));
      lexer.pushback(new ParsedSymbol(SymbolGroup.OPERATOR,SymbolType.DOT,"String_Node_Str"));
    }
    ret=member(needsActivation,importedClasses,openedNamespaces,ret,registerVars,inFunction,inMethod,variables);
  }
 else {
    lexer.pushback(s);
  }
  return ret;
}