Program: 6579
Project: 6579
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
 */
@Override public void addMemberVariable(FElement element){
  if (!this.incompleteBuilders.empty()) {
    String typeName="String_Node_Str";
    if (element.getName().equals(element.getSchemaType().getName())) {
      typeName=this.mapper.lookup(this.getFabricTypeName(element.getSchemaType()));
    }
 else {
      typeName=element.getSchemaType().getName();
    }
    AttributeContainer.Builder current=this.incompleteBuilders.pop();
    if (FSchemaTypeHelper.isArray(element)) {
      current.addElementArray(typeName,element.getName(),element.getMinOccurs(),element.getMaxOccurs());
    }
 else     if (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.isList(element)) {
      current.addElementArray(typeName,element.getName(),FSchemaTypeHelper.getMinLength((FList)element.getSchemaType()),FSchemaTypeHelper.getMaxLength((FList)element.getSchemaType()));
    }
 else     if (FSchemaTypeHelper.hasDefaultValue(element)) {
      current.addElement(typeName,element.getName(),element.getDefaultValue());
    }
 else     if (FSchemaTypeHelper.hasFixedValue(element)) {
      current.addConstantElement(typeName,element.getName(),element.getFixedValue());
    }
 else {
      current.addElement(typeName,element.getName());
    }
    this.incompleteBuilders.push(current);
    LOGGER.debug(String.format("String_Node_Str",element.getName(),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
 */
@Override public void addMemberVariable(FElement element){
  if (!this.incompleteBuilders.empty()) {
    String typeName="String_Node_Str";
    if (element.getName().equals(element.getSchemaType().getName())) {
      typeName=this.mapper.lookup(this.getFabricTypeName(element.getSchemaType()));
    }
 else {
      typeName=element.getSchemaType().getName();
    }
    AttributeContainer.Builder current=this.incompleteBuilders.pop();
    AttributeContainer.Restriction restrictions=new AttributeContainer.Restriction();
    if ((element.getSchemaType().isSimple() && !element.getSchemaType().isTopLevel()) || this.generatedElements.containsKey(typeName)) {
      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.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);
    }
    this.incompleteBuilders.push(current);
    LOGGER.debug(String.format("String_Node_Str",element.getName(),typeName,current.getName()));
  }
}