<commit_before><f:subview xmlns:f="http://java.sun.com/jsf/core"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
  xmlns:t="http://myfaces.apache.org/tomahawk"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxdir="http://nuxeo.org/nxdirectory"
  id="#{widget.id}">

  <c:if test="#{widget.mode != 'create' and widget.mode != 'edit' and field_0 != null}">

    <nxh:outputLink
      value="#{nxd:fileUrl('downloadFile', value, widget.fieldDefinitions[0].propertyName, field_1)}">
      <nxh:graphicImage value="#{nxd:fileIconPath(field_0)}"
        rendered="#{! empty nxd:fileIconPath(field_0)}" />
      <nxh:outputText value="#{field_1}" />
    </nxh:outputLink>

    <nxu:methodResult name="hasPDFCapabilities"
      value="#{conversionActions.isFileExportableToPDF(widget.fieldDefinitions[0].propertyName)}">
      <h:panelGroup rendered="#{hasPDFCapabilities}">
        <h:outputText value=" | " />
        <h:commandLink action="#{conversionActions.generatePdfFile}">
          <f:param name="fileFieldFullName"
            value="#{widget.fieldDefinitions[0].propertyName}" />
          <f:param name="filename" value="#{field_1}" />
          <h:outputText value="#{messages['label.document.generatePdf']}" />
        </h:commandLink>
      </h:panelGroup>
    </nxu:methodResult>

    <nxu:methodResult name="isLiveEditable"
      value="#{liveEditHelper.isCurrentDocumentLiveEditable(widget.fieldDefinitions[0].propertyName)}">
      <h:panelGroup
        rendered="#{isLiveEditable}">
        <h:outputText value=" | " />
        <h:outputLink
          value="#{nxd:liveEditUrl(changeableDocument, widget.fieldDefinitions[0].schemaName, widget.fieldDefinitions[0].fieldName, widget.fieldDefinitions[1].fieldName)}"
          <h:outputText value="#{messages['label.document.directEdit']}" />
        </h:outputLink> 
      </h:panelGroup>
    </nxu:methodResult>

  </c:if>

  <c:if test="#{widget.mode == 'create' or widget.mode == 'edit'}">

    <nxu:inputFile id="#{widget.id}_file" value="#{field_0}"
      filename="#{field_1}" required="#{widget.required}" editFilename="false" />
    <h:message styleClass="errorMessage" for="#{widget.id}_file"
      id="#{widget.id}_message" />

  </c:if>

</f:subview><commit_msg>NXP-2190: Close h:outputLink tag<commit_after><f:subview xmlns:f="http://java.sun.com/jsf/core"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
  xmlns:t="http://myfaces.apache.org/tomahawk"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxdir="http://nuxeo.org/nxdirectory"
  id="#{widget.id}">

  <c:if test="#{widget.mode != 'create' and widget.mode != 'edit' and field_0 != null}">

    <nxh:outputLink
      value="#{nxd:fileUrl('downloadFile', value, widget.fieldDefinitions[0].propertyName, field_1)}">
      <nxh:graphicImage value="#{nxd:fileIconPath(field_0)}"
        rendered="#{! empty nxd:fileIconPath(field_0)}" />
      <nxh:outputText value="#{field_1}" />
    </nxh:outputLink>

    <nxu:methodResult name="hasPDFCapabilities"
      value="#{conversionActions.isFileExportableToPDF(widget.fieldDefinitions[0].propertyName)}">
      <h:panelGroup rendered="#{hasPDFCapabilities}">
        <h:outputText value=" | " />
        <h:commandLink action="#{conversionActions.generatePdfFile}">
          <f:param name="fileFieldFullName"
            value="#{widget.fieldDefinitions[0].propertyName}" />
          <f:param name="filename" value="#{field_1}" />
          <h:outputText value="#{messages['label.document.generatePdf']}" />
        </h:commandLink>
      </h:panelGroup>
    </nxu:methodResult>

    <nxu:methodResult name="isLiveEditable"
      value="#{liveEditHelper.isCurrentDocumentLiveEditable(widget.fieldDefinitions[0].propertyName)}">
      <h:panelGroup
        rendered="#{isLiveEditable}">
        <h:outputText value=" | " />
        <h:outputLink
          value="#{nxd:liveEditUrl(changeableDocument, widget.fieldDefinitions[0].schemaName, widget.fieldDefinitions[0].fieldName, widget.fieldDefinitions[1].fieldName)}">
          <h:outputText value="#{messages['label.document.directEdit']}" />
        </h:outputLink> 
      </h:panelGroup>
    </nxu:methodResult>

  </c:if>

  <c:if test="#{widget.mode == 'create' or widget.mode == 'edit'}">

    <nxu:inputFile id="#{widget.id}_file" value="#{field_0}"
      filename="#{field_1}" required="#{widget.required}" editFilename="false" />
    <h:message styleClass="errorMessage" for="#{widget.id}_file"
      id="#{widget.id}_message" />

  </c:if>

</f:subview>

{'fraction_non_alphanumeric': 0.19212133979355384, 'fraction_numerical': 0.008005055824731409, 'mean_word_length': 4.160869565217391, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 62, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5741587', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1627, 'n_words': 178}