Program: 61744
Project: 61744
Buggy source:
private GraphTargetItem classTraits(int packageInternalNs,List<String> importedClasses,int privateNs,boolean isDynamic,boolean isFinal,List<Integer> openedNamespaces,String packageName,int namespace,boolean isInterface,String nameStr,GraphTargetItem extendsStr,List<GraphTargetItem> implementsStr,List<AssignableAVM2Item> variables) throws IOException, ParseException, CompilationException {
  GraphTargetItem ret=null;
  ParsedSymbol s=null;
  List<GraphTargetItem> traits=new ArrayList<>();
  String classNameStr=nameStr;
  openedNamespaces=new ArrayList<>(openedNamespaces);
  int protectedNs=0;
  int publicNs=namespace;
  int protectedStaticNs=0;
  openedNamespaces.add(protectedNs=abc.constants.addNamespace(new Namespace(Namespace.KIND_PROTECTED,abc.constants.getStringId(packageName.isEmpty() ? classNameStr : packageName + "String_Node_Str" + classNameStr,true))));
  openedNamespaces.add(protectedStaticNs=abc.constants.addNamespace(new Namespace(Namespace.KIND_STATIC_PROTECTED,abc.constants.getStringId(packageName.isEmpty() ? classNameStr : packageName + "String_Node_Str" + classNameStr,true))));
  List<Integer> indices=new ArrayList<>();
  List<String> names=new ArrayList<>();
  List<String> namespaces=new ArrayList<>();
  AVM2SourceGenerator.parentNamesAddNames(abc,otherABCs,AVM2SourceGenerator.resolveType(((TypeItem)((UnresolvedAVM2Item)extendsStr).resolve(new ArrayList<GraphTargetItem>(),new ArrayList<String>(),abc,otherABCs,new ArrayList<MethodBody>(),new ArrayList<AssignableAVM2Item>())),abc),indices,names,namespaces);
  for (int i=0; i < names.size(); i++) {
    if (namespaces.get(i).isEmpty()) {
      continue;
    }
    openedNamespaces.add(abc.constants.getNamespaceId(new Namespace(Namespace.KIND_STATIC_PROTECTED,abc.constants.getStringId(namespaces.get(i) + "String_Node_Str" + names.get(i),true)),0,true));
  }
  Reference<Boolean> staticNeedsActivation=new Reference<>(false);
  List<GraphTargetItem> staticInit=new ArrayList<>();
  List<AssignableAVM2Item> sinitVariables=new ArrayList<>();
  GraphTargetItem constr=traits(sinitVariables,staticNeedsActivation,staticInit,importedClasses,privateNs,protectedNs,publicNs,packageInternalNs,protectedStaticNs,openedNamespaces,packageName,classNameStr,isInterface,traits);
  if (isInterface) {
    return new InterfaceAVM2Item(openedNamespaces,isFinal,namespace,classNameStr,implementsStr,traits);
  }
 else {
    return new ClassAVM2Item(openedNamespaces,protectedNs,isDynamic,isFinal,namespace,classNameStr,extendsStr,implementsStr,staticInit,staticNeedsActivation.getVal(),sinitVariables,constr,traits);
  }
}

Fixed version (ground truth):
private GraphTargetItem classTraits(int packageInternalNs,List<String> importedClasses,int privateNs,boolean isDynamic,boolean isFinal,List<Integer> openedNamespaces,String packageName,int namespace,boolean isInterface,String nameStr,GraphTargetItem extendsStr,List<GraphTargetItem> implementsStr,List<AssignableAVM2Item> variables) throws IOException, ParseException, CompilationException {
  GraphTargetItem ret=null;
  ParsedSymbol s=null;
  List<GraphTargetItem> traits=new ArrayList<>();
  String classNameStr=nameStr;
  openedNamespaces=new ArrayList<>(openedNamespaces);
  int protectedNs=0;
  int publicNs=namespace;
  int protectedStaticNs=0;
  openedNamespaces.add(protectedNs=abc.constants.addNamespace(new Namespace(Namespace.KIND_PROTECTED,abc.constants.getStringId(packageName.isEmpty() ? classNameStr : packageName + "String_Node_Str" + classNameStr,true))));
  openedNamespaces.add(protectedStaticNs=abc.constants.addNamespace(new Namespace(Namespace.KIND_STATIC_PROTECTED,abc.constants.getStringId(packageName.isEmpty() ? classNameStr : packageName + "String_Node_Str" + classNameStr,true))));
  List<Integer> indices=new ArrayList<>();
  List<String> names=new ArrayList<>();
  List<String> namespaces=new ArrayList<>();
  AVM2SourceGenerator.parentNamesAddNames(abc,otherABCs,AVM2SourceGenerator.resolveType(((TypeItem)((UnresolvedAVM2Item)extendsStr).resolve(null,new ArrayList<GraphTargetItem>(),new ArrayList<String>(),abc,otherABCs,new ArrayList<MethodBody>(),new ArrayList<AssignableAVM2Item>())),abc),indices,names,namespaces);
  for (int i=0; i < names.size(); i++) {
    if (namespaces.get(i).isEmpty()) {
      continue;
    }
    openedNamespaces.add(abc.constants.getNamespaceId(new Namespace(Namespace.KIND_STATIC_PROTECTED,abc.constants.getStringId(namespaces.get(i) + "String_Node_Str" + names.get(i),true)),0,true));
  }
  Reference<Boolean> staticNeedsActivation=new Reference<>(false);
  List<GraphTargetItem> staticInit=new ArrayList<>();
  List<AssignableAVM2Item> sinitVariables=new ArrayList<>();
  GraphTargetItem constr=traits(sinitVariables,staticNeedsActivation,staticInit,importedClasses,privateNs,protectedNs,publicNs,packageInternalNs,protectedStaticNs,openedNamespaces,packageName,classNameStr,isInterface,traits);
  if (isInterface) {
    return new InterfaceAVM2Item(openedNamespaces,isFinal,namespace,classNameStr,implementsStr,traits);
  }
 else {
    return new ClassAVM2Item(openedNamespaces,protectedNs,isDynamic,isFinal,namespace,classNameStr,extendsStr,implementsStr,staticInit,staticNeedsActivation.getVal(),sinitVariables,constr,traits);
  }
}