<commit_before><%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<!-- bagUploadConfirm.jsp -->
<html:xhtml/>

<html:form action="/bagUploadConfirm" focus="newBagName" method="post" enctype="multipart/form-data" styleId="bagUploadConfirmForm">

<div id="sidebar">
  <div class="wrap">
    <div class='button <c:if test="${matchCount == 0}">inactive</c:if>'>
      <div class="left"></div><input id="saveList" type="button" name="confirmBagUpload"
          value='Save a list of ${matchCount} ${bagUploadConfirmForm.bagType}<c:if test="${matchCount != 1}">s</c:if>'
          onclick="javascript:validateBagName('bagUploadConfirmForm');"/><div class="right"></div>
    </div>
    <div style="clear:both;"></div>
    <c:if test="${!empty duplicates || ! empty lowQualityMatches || ! empty convertedObjects}">
      <p id="furtherMatches" class="hl">There are further matches provided below.</p>
    </c:if>
  </div>

  <div style="clear:both;"></div>

  <h2>In your list</h2>
  <ul>
    <li class="added">${matchCount} ${bagUploadConfirmForm.bagType}<c:if test="${matchCount != 1}">s</c:if></li>
    <c:if test="${! empty lowQualityMatches}">
      <li class="lowQ"><a>Add</a> ${fn:length(lowQualityMatches)} Synonym match<c:if test="${fn:length(lowQualityMatches) > 1}">es</c:if></li>
      <script type="text/javascript">
        jQuery('#sidebar ul li.lowQ a').click(function(e) { addAll('lowQ', '${flatLowQualityMatches}'); });
      </script>
    </c:if>
    <c:if test="${! empty duplicates}">
      <li class="duplicate"><a>Add</a> ${fn:length(duplicates)} Duplicate match<c:if test="${fn:length(duplicates) != 1}">es</c:if></li>
      <script type="text/javascript">
        jQuery('#sidebar ul li.duplicate a').click(function(e) { addAll('duplicate', '${flatDuplicate}'); });
      </script>
    </c:if>
    <c:if test="${! empty convertedObjects}">
      <li class="converted"><a>Add</a> ${fn:length(convertedObjects)} Converted type<c:if test="${fn:length(convertedObjects) != 1}">s</c:if></li>
      <script type="text/javascript">
        jQuery('#sidebar ul li.converted a').click(function(e) { addAll('converted', '${flatConverted}'); });
      </script>
    </c:if>
  </ul>
</div>

<html:hidden property="matchIDs" styleId="matchIDs"/>
<html:hidden property="bagType"/>

<script type="text/javascript" src="js/baguploadconfirm.js"></script>

<c:set var="totalIdCount" value="${fn:length (duplicates) + fn:length(lowQualityMatches) + fn:length(convertedObjects) + matchCount + fn:length(unresolved)}"/>
<div class="body">

    <c:choose>
      <c:when test="${(totalIdCount - fn:length(unresolved)) > 0}">
        <h1>Before we show you the results...</h1>
      </c:when>
      <c:otherwise>
        <h1>There are no matches</h1>
      </c:otherwise>
    </c:choose>

    <div id="list-progress"><commit_msg>Fix space in fn:length (), some versions of tomcat can't parse.<commit_after><%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<!-- bagUploadConfirm.jsp -->
<html:xhtml/>

<html:form action="/bagUploadConfirm" focus="newBagName" method="post" enctype="multipart/form-data" styleId="bagUploadConfirmForm">

<div id="sidebar">
  <div class="wrap">
    <div class='button <c:if test="${matchCount == 0}">inactive</c:if>'>
      <div class="left"></div><input id="saveList" type="button" name="confirmBagUpload"
          value='Save a list of ${matchCount} ${bagUploadConfirmForm.bagType}<c:if test="${matchCount != 1}">s</c:if>'
          onclick="javascript:validateBagName('bagUploadConfirmForm');"/><div class="right"></div>
    </div>
    <div style="clear:both;"></div>
    <c:if test="${!empty duplicates || ! empty lowQualityMatches || ! empty convertedObjects}">
      <p id="furtherMatches" class="hl">There are further matches provided below.</p>
    </c:if>
  </div>

  <div style="clear:both;"></div>

  <h2>In your list</h2>
  <ul>
    <li class="added">${matchCount} ${bagUploadConfirmForm.bagType}<c:if test="${matchCount != 1}">s</c:if></li>
    <c:if test="${! empty lowQualityMatches}">
      <li class="lowQ"><a>Add</a> ${fn:length(lowQualityMatches)} Synonym match<c:if test="${fn:length(lowQualityMatches) > 1}">es</c:if></li>
      <script type="text/javascript">
        jQuery('#sidebar ul li.lowQ a').click(function(e) { addAll('lowQ', '${flatLowQualityMatches}'); });
      </script>
    </c:if>
    <c:if test="${! empty duplicates}">
      <li class="duplicate"><a>Add</a> ${fn:length(duplicates)} Duplicate match<c:if test="${fn:length(duplicates) != 1}">es</c:if></li>
      <script type="text/javascript">
        jQuery('#sidebar ul li.duplicate a').click(function(e) { addAll('duplicate', '${flatDuplicate}'); });
      </script>
    </c:if>
    <c:if test="${! empty convertedObjects}">
      <li class="converted"><a>Add</a> ${fn:length(convertedObjects)} Converted type<c:if test="${fn:length(convertedObjects) != 1}">s</c:if></li>
      <script type="text/javascript">
        jQuery('#sidebar ul li.converted a').click(function(e) { addAll('converted', '${flatConverted}'); });
      </script>
    </c:if>
  </ul>
</div>

<html:hidden property="matchIDs" styleId="matchIDs"/>
<html:hidden property="bagType"/>

<script type="text/javascript" src="js/baguploadconfirm.js"></script>

<c:set var="totalIdCount" value="${fn:length(duplicates) + fn:length(lowQualityMatches) + fn:length(convertedObjects) + matchCount + fn:length(unresolved)}"/>
<div class="body">

    <c:choose>
      <c:when test="${(totalIdCount - fn:length(unresolved)) > 0}">
        <h1>Before we show you the results...</h1>
      </c:when>
      <c:otherwise>
        <h1>There are no matches</h1>
      </c:otherwise>
    </c:choose>

    <div id="list-progress">
{'fraction_non_alphanumeric': 0.22215259282469058, 'fraction_numerical': 0.004699984333385555, 'mean_word_length': 4.684772929652716, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 181, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1215763', 'n_tokens_mistral': 2286, 'n_tokens_neox': 2201, 'n_words': 381}