Program: 6564
Project: 6564
Buggy source:
/** 
 * Add a member variable to the current container class. Type, name, initial value and restrictions of the element will be mapped to Java where applicable.
 * @param element FElement object
 * @param isTopLevel True if the element is a top-level elementor part of a top-level complex type; false if the element is part of a local complex type
 */
@Override public void addMemberVariable(FElement element,boolean isTopLevel){
  if ((isTopLevel && !this.incompleteBuilders.empty()) || this.hasIncompleteLocalBuilders()) {
    String typeName="String_Node_Str";
    if (SchemaHelper.isBuiltinTypedElement(element)) {
      typeName=this.mapper.lookup(this.getFabricTypeName(element.getSchemaType()));
      LOGGER.debug(String.format("String_Node_Str",typeName));
    }
 else {
      typeName=element.getSchemaType().getName();
      LOGGER.debug(String.format("String_Node_Str",typeName));
      if (!element.getSchemaType().isTopLevel() && !element.getSchemaType().isSimple()) {
        typeName+="String_Node_Str";
      }
    }
    AttributeContainer.Builder current=(isTopLevel ? this.incompleteBuilders.pop() : this.incompleteLocalBuilders.get(this.incompleteBuilders.peek().getName()).pop());
    AttributeContainer.Restriction restrictions=new AttributeContainer.Restriction();
    if (element.getSchemaType().isSimple() && !element.getSchemaType().isTopLevel()) {
      restrictions=this.createRestrictions((FSimpleType)(element.getSchemaType()));
    }
    if (!element.getSchemaType().isTopLevel() && FSchemaTypeHelper.isEnum(element.getSchemaType())) {
      Object[] constants=FSchemaTypeHelper.extractEnumArray((FSimpleType)element.getSchemaType());
      String[] enumConstants=Arrays.copyOf(constants,constants.length,String[].class);
      current.addEnumElement(element.getName() + "String_Node_Str",element.getName(),enumConstants);
    }
 else     if (FSchemaTypeHelper.isArray(element)) {
      current.addElementArray(typeName,element.getName(),element.getMinOccurs(),element.getMaxOccurs());
    }
 else     if (FSchemaTypeHelper.hasDefaultValue(element)) {
      current.addElement(typeName,element.getName(),element.getDefaultValue(),restrictions);
    }
 else     if (FSchemaTypeHelper.hasFixedValue(element)) {
      current.addConstantElement(typeName,element.getName(),element.getFixedValue());
    }
 else {
      current.addElement(typeName,element.getName(),restrictions);
    }
    if (isTopLevel) {
      this.incompleteBuilders.push(current);
    }
 else {
      String parentContainerName=this.incompleteBuilders.peek().getName();
      Stack<AttributeContainer.Builder> currentStack=this.incompleteLocalBuilders.get(parentContainerName);
      if (null == currentStack) {
        currentStack=new Stack<AttributeContainer.Builder>();
      }
      currentStack.push(current);
      this.incompleteLocalBuilders.put(parentContainerName,currentStack);
    }
    LOGGER.debug(String.format("String_Node_Str",element.getName(),(SchemaHelper.isBuiltinTypedElement(element) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str",typeName,current.getName()));
  }
}

Fixed version (ground truth):
/** 
 * Add a member variable to the current container class. Type, name, initial value and restrictions of the element will be mapped to Java where applicable.
 * @param element FElement object
 * @param isTopLevel True if the element is a top-level elementor part of a top-level complex type; false if the element is part of a local complex type
 */
@Override public void addMemberVariable(FElement element,boolean isTopLevel){
  if ((isTopLevel && !this.incompleteBuilders.empty()) || this.hasIncompleteLocalBuilders()) {
    String typeName="String_Node_Str";
    if (SchemaHelper.isBuiltinTypedElement(element)) {
      typeName=this.mapper.lookup(this.getFabricTypeName(element.getSchemaType()));
      LOGGER.debug(String.format("String_Node_Str",typeName));
    }
 else {
      typeName=element.getSchemaType().getName();
      LOGGER.debug(String.format("String_Node_Str",typeName));
      if (!element.getSchemaType().isTopLevel() && !element.getSchemaType().isSimple()) {
        typeName+="String_Node_Str";
      }
    }
    AttributeContainer.Builder current=(isTopLevel ? this.incompleteBuilders.pop() : this.incompleteLocalBuilders.get(this.incompleteBuilders.peek().getName()).pop());
    AttributeContainer.Restriction restrictions=new AttributeContainer.Restriction();
    if (element.getSchemaType().isSimple() && !element.getSchemaType().isTopLevel()) {
      restrictions=this.createRestrictions((FSimpleType)(element.getSchemaType()));
    }
    if (!element.getSchemaType().isTopLevel() && FSchemaTypeHelper.isEnum(element.getSchemaType())) {
      Object[] constants=FSchemaTypeHelper.extractEnumArray((FSimpleType)element.getSchemaType());
      String[] enumConstants=Arrays.copyOf(constants,constants.length,String[].class);
      current.addEnumElement(element.getName() + "String_Node_Str",element.getName(),enumConstants);
    }
 else     if (FSchemaTypeHelper.isArray(element)) {
      current.addElementArray(typeName,element.getName(),element.getMinOccurs(),element.getMaxOccurs());
    }
 else     if (FSchemaTypeHelper.isList(element)) {
      FList listType=(FList)element.getSchemaType();
      current.addElementList(typeName,element.getName(),FSchemaTypeHelper.getMinLength(listType),FSchemaTypeHelper.getMaxLength(listType));
    }
 else     if (FSchemaTypeHelper.hasDefaultValue(element)) {
      current.addElement(typeName,element.getName(),element.getDefaultValue(),restrictions);
    }
 else     if (FSchemaTypeHelper.hasFixedValue(element)) {
      current.addConstantElement(typeName,element.getName(),element.getFixedValue());
    }
 else {
      current.addElement(typeName,element.getName(),restrictions);
    }
    if (isTopLevel) {
      this.incompleteBuilders.push(current);
    }
 else {
      String parentContainerName=this.incompleteBuilders.peek().getName();
      Stack<AttributeContainer.Builder> currentStack=this.incompleteLocalBuilders.get(parentContainerName);
      if (null == currentStack) {
        currentStack=new Stack<AttributeContainer.Builder>();
      }
      currentStack.push(current);
      this.incompleteLocalBuilders.put(parentContainerName,currentStack);
    }
    LOGGER.debug(String.format("String_Node_Str",element.getName(),(SchemaHelper.isBuiltinTypedElement(element) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str",typeName,current.getName()));
  }
}