Program: 6544
Project: 6544
Buggy source:
private void fixElementIfRequired(FElement element){
  String typeName="String_Node_Str";
  boolean isCustomTyped;
  if (SchemaHelper.isBuiltinTypedElement(element)) {
    FSchemaType schemaType=null;
    if (FSchemaTypeHelper.isList(element)) {
      FList listType=(FList)element.getSchemaType();
      schemaType=listType.getItemType();
    }
 else {
      schemaType=element.getSchemaType();
    }
    typeName=this.mapper.lookup(JavaTypeGen.getFabricTypeName(schemaType));
    LOGGER.debug(String.format("String_Node_Str",typeName));
    isCustomTyped=false;
    typeName=this.fixPrimitiveTypes(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";
    }
    isCustomTyped=true;
  }
  LOGGER.debug("String_Node_Str" + element.getName() + "String_Node_Str");
  if (null != element.getSchemaType() && !FSchemaTypeHelper.isEnum(element.getSchemaType())) {
    if (FSchemaTypeHelper.isArray(element)) {
      ArrayData arrayToFix=new ArrayData(element.getName(),typeName,"String_Node_Str",typeName,isCustomTyped);
      if (!this.fixArrays.contains(arrayToFix)) {
        LOGGER.debug("String_Node_Str");
        this.fixArrays.add(arrayToFix);
      }
    }
 else     if (FSchemaTypeHelper.isList(element)) {
      ListData listToFix=new ListData(element.getName(),typeName,typeName,isCustomTyped);
      if (!this.fixLists.contains(listToFix)) {
        LOGGER.debug("String_Node_Str");
        this.fixLists.add(listToFix);
      }
    }
 else     if (isCustomTyped && element.getSchemaType().isSimple()) {
      ElementData elementToFix=new ElementData(element.getName());
      if (!this.fixElements.contains(elementToFix)) {
        LOGGER.debug("String_Node_Str");
        this.fixElements.add(elementToFix);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * This method checks whether value-tags need to be fixed for a particular XML element or not. In case the element needs to be fixed, its data is added to the corresponding field (e.g. fixElements, fixArrays or fixLists) and true is returned. Otherwise simply nothing happens and the method will return false.
 * @param element FElement object
 * @return True if element was fixed, false otherwise
 */
private boolean fixElementIfRequired(FElement element){
  boolean elementWasFixed=false;
  String typeName="String_Node_Str";
  boolean isCustomTyped;
  if (SchemaHelper.isBuiltinTypedElement(element)) {
    FSchemaType schemaType=null;
    if (FSchemaTypeHelper.isList(element)) {
      FList listType=(FList)element.getSchemaType();
      schemaType=listType.getItemType();
    }
 else {
      schemaType=element.getSchemaType();
    }
    typeName=this.mapper.lookup(JavaTypeGen.getFabricTypeName(schemaType));
    LOGGER.debug(String.format("String_Node_Str",typeName));
    isCustomTyped=false;
    typeName=this.fixPrimitiveTypes(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";
    }
    isCustomTyped=true;
  }
  LOGGER.debug(String.format("String_Node_Str",element.getName()));
  if (null != element.getSchemaType() && !FSchemaTypeHelper.isEnum(element.getSchemaType())) {
    if (FSchemaTypeHelper.isArray(element)) {
      ArrayData arrayToFix=new ArrayData(element.getName(),typeName,"String_Node_Str",typeName,isCustomTyped);
      if (!this.fixArrays.contains(arrayToFix)) {
        LOGGER.debug(String.format("String_Node_Str",(isCustomTyped ? "String_Node_Str" : "String_Node_Str"),element.getName()));
        this.fixArrays.add(arrayToFix);
        elementWasFixed=true;
      }
    }
 else     if (FSchemaTypeHelper.isList(element)) {
      ListData listToFix=new ListData(element.getName(),typeName,typeName,isCustomTyped);
      if (!this.fixLists.contains(listToFix)) {
        LOGGER.debug(String.format("String_Node_Str",(isCustomTyped ? "String_Node_Str" : "String_Node_Str"),element.getName()));
        this.fixLists.add(listToFix);
        elementWasFixed=true;
      }
    }
 else     if (isCustomTyped && element.getSchemaType().isSimple()) {
      ElementData elementToFix=new ElementData(element.getName());
      if (!this.fixElements.contains(elementToFix)) {
        LOGGER.debug(String.format("String_Node_Str",element.getName()));
        this.fixElements.add(elementToFix);
        elementWasFixed=true;
      }
    }
  }
  return elementWasFixed;
}