<commit_before><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <h:head>
    </h:head>

    <h:body>
        <ui:composition template="/dataverse_template.xhtml">
            <ui:param name="pageTitle" value="#{empty DataversePage.dataverse.name ? 'New' : DataversePage.dataverse.name} Dataverse"/>
            <ui:param name="dataverse" value="#{DataversePage.dataverse}"/>
            <ui:param name="ownerId" value="#{DataversePage.ownerId}"/>
            <ui:param name="showBreadcrumbs" value="#{empty DataversePage.editMode}"/>
            <ui:define name="body">

                <f:metadata>
                    <f:viewParam name="id" value="#{DataversePage.dataverse.id}"/>
                    <f:viewParam name="ownerId" value="#{DataversePage.ownerId}"/>
                    <f:viewAction action="#{DataversePage.init}"/>                
                    <f:viewParam name="id" value="#{SearchIncludeFragment.dataverseId}"/>
                    <f:viewParam name="q" value="#{SearchIncludeFragment.query}"/>
                    <f:viewParam name="types" value="#{SearchIncludeFragment.selectedTypesString}"/>
                    <f:viewParam name="fq1" value="#{SearchIncludeFragment.fq1}"/>
                    <f:viewParam name="fq0" value="#{SearchIncludeFragment.fq0}"/>
                    <f:viewParam name="fq2" value="#{SearchIncludeFragment.fq2}"/>
                    <f:viewParam name="fq3" value="#{SearchIncludeFragment.fq3}"/>
                    <f:viewParam name="fq4" value="#{SearchIncludeFragment.fq4}"/>
                    <f:viewParam name="fq5" value="#{SearchIncludeFragment.fq5}"/>
                    <f:viewParam name="fq6" value="#{SearchIncludeFragment.fq6}"/>
                    <f:viewParam name="fq7" value="#{SearchIncludeFragment.fq7}"/>
                    <f:viewParam name="fq8" value="#{SearchIncludeFragment.fq8}"/>
                    <f:viewParam name="fq9" value="#{SearchIncludeFragment.fq9}"/>
                    <f:viewParam name="page" value="#{SearchIncludeFragment.page}"/>
                    <f:viewParam name="debug" value="#{SearchIncludeFragment.debug}"/>
                    <f:viewAction action="#{SearchIncludeFragment.search()}" />
                </f:metadata>

                <h:form id="dataverseForm">
                    <!-- Name Panel -->
                    <p:panel styleClass="panelLayoutBlock" rendered="#{DataversePage.editMode == 'INFO'}">
                        <p:panelGrid styleClass="panelgridLayoutTable" columns="2">
                            <p:panelGrid columns="2">
                                <ui:fragment>
                                    <p:inputText id="name" style="margin-right:.5em;" value="#{DataversePage.dataverse.name}"/>
                                    <p:outputLabel value="Dataverse" for="name"/>
                                    <h:outputText value="*" style="color: #B94A48;"/>
                                    <p:watermark for="name" value="Enter name..."/>
                                </ui:fragment>
                                <p:message for="name"/>
                            </p:panelGrid>
                            <p:panelGrid columns="2" rendered="#{DataversePage.ownerId != null}">
                                <p:outputLabel value="Host Dataverse" for="hostDataverse"/>
                                <p:selectOneMenu id="hostDataverse" value="#{DataversePage.ownerId}" filter="true" filterMatchMode="startsWith" effect="none">
                                    <f:selectItems value="#{dataverseServiceBean.findAll()}" var="dv" itemLabel="#{dv.name}" itemValue="#{dv.id}"
                                                   itemDisabled="#{dv eq DataversePage.dataverse or dv.owners.contains(DataversePage.dataverse)}"/>
                                </p:selectOneMenu>
                            </p:panelGrid>
                        </p:panelGrid>
                    </p:panel>

                    <!-- Edit Info Panel -->
                    <p:panel styleClass="panelLayoutBlock" rendered="#{(not empty DataversePage.owner
                                                                       and permissionServiceBean.on(DataversePage.owner).canIssueCommand('RenameDataverseCommand'))
                                                                       and DataversePage.editMode == 'INFO'}">
                        <p:panelGrid styleClass="panelgridLayoutTable" columns="1" columnClasses="leftClass" rendered="#{DataversePage.editMode == 'INFO'}">
                            <p:panelGrid columns="2" styleClass="panelgridFormTable">
                                <ui:fragment>
                                    <p:outputLabel value="Alias" for="alias"/> <h:outputText value="*" style="color: #B94A48;"/>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:panelGrid columns="2">
                                        <p:inputText id="alias" value="#{DataversePage.dataverse.alias}"/>
                                        <p:message for="alias"/>
                                    </p:panelGrid>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:outputLabel value="E-mail" for="contactEmail"/> <h:outputText value="*" style="color: #B94A48;"/>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:panelGrid columns="2">
                                        <p:inputText id="contactEmail" value="#{DataversePage.dataverse.contactEmail}"/>
                                        <p:message for="contactEmail"/>
                                    </p:panelGrid>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:outputLabel value="Affiliation" for="affiliation"/>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:panelGrid columns="2">
                                        <p:inputText id="affiliation" value="#{DataversePage.dataverse.affiliation}"/>
                                        <p:message for="affiliation"/>
                                    </p:panelGrid>
                                </ui:fragment>
                            </p:panelGrid>
                        </p:panelGrid>
                    </p:panel>

                    <!-- Description Panel -->
                    <div class="clearfix" style="border-bottom:1px solid #DDDDDD;">

                        <!-- Edit Button -->
                        <ui:fragment rendered="#{!dataverseSession.user.guest and empty DataversePage.editMode}">
                            <div class="pull-right" style="padding:0 1em 1em 1em; margin:0 0 1em 1em;">
                                <div class="btn-group">
                                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                        Edit Dataverse <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu pull-right" role="menu" style="text-align:left;">
                                        <li>
                                            <div style="padding:.5em 1em .25em 1em; overflow:hidden; width:400px;">
                                                <div style="width:48px; float:left; margin:4px 12px 6px 0;">
                                                    <img src="/resources/images/icon_dataverse.png" style="width:48px;" border="0" alt="Dataverse"/>
                                                </div>
                                                <div style="float:left; width:300px;">
                                                    <div style="font-weight:bold;">#{DataversePage.dataverse.name} Dataverse <h:outputText value=" (#{DataversePage.dataverse.affiliation})" rendered="#{!empty DataversePage.dataverse.affiliation}"/></div>
                                                    <div style="color:#777;">#{DataversePage.dataverse.alias}</div>
                                                    <div style="color:#777;">#{DataversePage.dataverse.contactEmail}</div>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="divider" role="presentation"></li>
                                        <li>
                                            <p:commandLink id="editInfo" actionListener="#{DataversePage.edit('INFO')}" update="@all">
                                                <h:outputText value="General Information" />
                                            </p:commandLink>
                                        </li>
                                        <li>
                                            <h:link id="manageRoles" styleClass="ui-commandlink ui-widget" outcome="manage-roles">
                                                <h:outputText value="Roles + Permissions" />
                                                <f:param name="dataverseId" value="#{DataversePage.dataverse.id}" />
                                                <f:param name="objectType" value="DATAVERSE" />
                                            </h:link>
                                        </li>
                                        <li><a href="#" class="ui-commandlink ui-widget" style="pointer-events: none; color: grey;">Theme</a></li>
                                        <li>
                                            <p:commandLink id="editSetup" actionListener="#{DataversePage.edit('SETUP')}" update="@all">
                                                <h:outputText value="Setup" />
                                            </p:commandLink>   
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </ui:fragment>

                        <div style="padding-bottom:.75em;">
                            <h:outputText value="#{DataversePage.dataverse.description}" rendered="#{empty DataversePage.editMode}"/>
                        </div>

                        <p:panel styleClass="panelLayoutBlock" rendered="#{DataversePage.editMode == 'INFO'}">
                            <p:panelGrid styleClass="panelgridLayoutTable" columns="2" columnClasses="leftClass,rightClass">
                                <ui:fragment>
                                    <p:panelGrid columns="3" styleClass="panelgridFormTable">
                                        <p:outputLabel value="Description" for="description"/>
                                        <ui:fragment>
                                            <p:inputTextarea id="description" value="#{DataversePage.dataverse.description}"
                                                             rows="5" cols="50" counter="counter" maxlength="1000"
                                                             counterTemplate="{0} characters remaining" autoResize="false"/>
                                            <h:outputText id="counter" style="display:block;"/>
                                        </ui:fragment>
                                        <p:message for="description"/>
                                    </p:panelGrid>
                                </ui:fragment>
                            </p:panelGrid>
                        </p:panel>
                    </div>

                    <!-- Dataverse Setup Panel -->                
                    <ui:fragment  rendered="#{DataversePage.editMode == 'SETUP'}">
                        <!-- Dataverse Setup Form -->
                        <ui:fragment rendered="#{DataversePage.dataverse.owner != null}">
                            <h:outputText value="Use MetadataBlocks form Parent Dataverse? " />
                            <p:selectBooleanCheckbox value="#{DataversePage.inheritMetadataBlockFromParent}">  
                                <p:ajax update="@all" listener="#{DataversePage.editMetadataBlocks}"/>  
                            </p:selectBooleanCheckbox> 
                        </ui:fragment> 

                        <p:selectManyMenu id="mdbSelect" value="#{DataversePage.dataverse.metadataBlocks}" converter="metadataBlockConverter" rendered="#{DataversePage.dataverse.metadataBlockRoot or DataversePage.dataverse.owner == null }" 
                                          showCheckbox="true"  style="width:250px;height:300px">  
                            <f:selectItems value="#{dataverseServiceBean.findAllMetadataBlocks()}" var="mdb" 
                                           itemLabel="#{mdb.displayName}" itemValue="#{mdb}" /> 
                        </p:selectManyMenu>  

                        <hr/>     
                    </ui:fragment>                    
<commit_msg>removed extraneous <hr/><commit_after><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <h:head>
    </h:head>

    <h:body>
        <ui:composition template="/dataverse_template.xhtml">
            <ui:param name="pageTitle" value="#{empty DataversePage.dataverse.name ? 'New' : DataversePage.dataverse.name} Dataverse"/>
            <ui:param name="dataverse" value="#{DataversePage.dataverse}"/>
            <ui:param name="ownerId" value="#{DataversePage.ownerId}"/>
            <ui:param name="showBreadcrumbs" value="#{empty DataversePage.editMode}"/>
            <ui:define name="body">

                <f:metadata>
                    <f:viewParam name="id" value="#{DataversePage.dataverse.id}"/>
                    <f:viewParam name="ownerId" value="#{DataversePage.ownerId}"/>
                    <f:viewAction action="#{DataversePage.init}"/>                
                    <f:viewParam name="id" value="#{SearchIncludeFragment.dataverseId}"/>
                    <f:viewParam name="q" value="#{SearchIncludeFragment.query}"/>
                    <f:viewParam name="types" value="#{SearchIncludeFragment.selectedTypesString}"/>
                    <f:viewParam name="fq1" value="#{SearchIncludeFragment.fq1}"/>
                    <f:viewParam name="fq0" value="#{SearchIncludeFragment.fq0}"/>
                    <f:viewParam name="fq2" value="#{SearchIncludeFragment.fq2}"/>
                    <f:viewParam name="fq3" value="#{SearchIncludeFragment.fq3}"/>
                    <f:viewParam name="fq4" value="#{SearchIncludeFragment.fq4}"/>
                    <f:viewParam name="fq5" value="#{SearchIncludeFragment.fq5}"/>
                    <f:viewParam name="fq6" value="#{SearchIncludeFragment.fq6}"/>
                    <f:viewParam name="fq7" value="#{SearchIncludeFragment.fq7}"/>
                    <f:viewParam name="fq8" value="#{SearchIncludeFragment.fq8}"/>
                    <f:viewParam name="fq9" value="#{SearchIncludeFragment.fq9}"/>
                    <f:viewParam name="page" value="#{SearchIncludeFragment.page}"/>
                    <f:viewParam name="debug" value="#{SearchIncludeFragment.debug}"/>
                    <f:viewAction action="#{SearchIncludeFragment.search()}" />
                </f:metadata>

                <h:form id="dataverseForm">
                    <!-- Name Panel -->
                    <p:panel styleClass="panelLayoutBlock" rendered="#{DataversePage.editMode == 'INFO'}">
                        <p:panelGrid styleClass="panelgridLayoutTable" columns="2">
                            <p:panelGrid columns="2">
                                <ui:fragment>
                                    <p:inputText id="name" style="margin-right:.5em;" value="#{DataversePage.dataverse.name}"/>
                                    <p:outputLabel value="Dataverse" for="name"/>
                                    <h:outputText value="*" style="color: #B94A48;"/>
                                    <p:watermark for="name" value="Enter name..."/>
                                </ui:fragment>
                                <p:message for="name"/>
                            </p:panelGrid>
                            <p:panelGrid columns="2" rendered="#{DataversePage.ownerId != null}">
                                <p:outputLabel value="Host Dataverse" for="hostDataverse"/>
                                <p:selectOneMenu id="hostDataverse" value="#{DataversePage.ownerId}" filter="true" filterMatchMode="startsWith" effect="none">
                                    <f:selectItems value="#{dataverseServiceBean.findAll()}" var="dv" itemLabel="#{dv.name}" itemValue="#{dv.id}"
                                                   itemDisabled="#{dv eq DataversePage.dataverse or dv.owners.contains(DataversePage.dataverse)}"/>
                                </p:selectOneMenu>
                            </p:panelGrid>
                        </p:panelGrid>
                    </p:panel>

                    <!-- Edit Info Panel -->
                    <p:panel styleClass="panelLayoutBlock" rendered="#{(not empty DataversePage.owner
                                                                       and permissionServiceBean.on(DataversePage.owner).canIssueCommand('RenameDataverseCommand'))
                                                                       and DataversePage.editMode == 'INFO'}">
                        <p:panelGrid styleClass="panelgridLayoutTable" columns="1" columnClasses="leftClass" rendered="#{DataversePage.editMode == 'INFO'}">
                            <p:panelGrid columns="2" styleClass="panelgridFormTable">
                                <ui:fragment>
                                    <p:outputLabel value="Alias" for="alias"/> <h:outputText value="*" style="color: #B94A48;"/>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:panelGrid columns="2">
                                        <p:inputText id="alias" value="#{DataversePage.dataverse.alias}"/>
                                        <p:message for="alias"/>
                                    </p:panelGrid>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:outputLabel value="E-mail" for="contactEmail"/> <h:outputText value="*" style="color: #B94A48;"/>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:panelGrid columns="2">
                                        <p:inputText id="contactEmail" value="#{DataversePage.dataverse.contactEmail}"/>
                                        <p:message for="contactEmail"/>
                                    </p:panelGrid>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:outputLabel value="Affiliation" for="affiliation"/>
                                </ui:fragment>
                                <ui:fragment>
                                    <p:panelGrid columns="2">
                                        <p:inputText id="affiliation" value="#{DataversePage.dataverse.affiliation}"/>
                                        <p:message for="affiliation"/>
                                    </p:panelGrid>
                                </ui:fragment>
                            </p:panelGrid>
                        </p:panelGrid>
                    </p:panel>

                    <!-- Description Panel -->
                    <div class="clearfix" style="border-bottom:1px solid #DDDDDD;">

                        <!-- Edit Button -->
                        <ui:fragment rendered="#{!dataverseSession.user.guest and empty DataversePage.editMode}">
                            <div class="pull-right" style="padding:0 1em 1em 1em; margin:0 0 1em 1em;">
                                <div class="btn-group">
                                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                        Edit Dataverse <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu pull-right" role="menu" style="text-align:left;">
                                        <li>
                                            <div style="padding:.5em 1em .25em 1em; overflow:hidden; width:400px;">
                                                <div style="width:48px; float:left; margin:4px 12px 6px 0;">
                                                    <img src="/resources/images/icon_dataverse.png" style="width:48px;" border="0" alt="Dataverse"/>
                                                </div>
                                                <div style="float:left; width:300px;">
                                                    <div style="font-weight:bold;">#{DataversePage.dataverse.name} Dataverse <h:outputText value=" (#{DataversePage.dataverse.affiliation})" rendered="#{!empty DataversePage.dataverse.affiliation}"/></div>
                                                    <div style="color:#777;">#{DataversePage.dataverse.alias}</div>
                                                    <div style="color:#777;">#{DataversePage.dataverse.contactEmail}</div>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="divider" role="presentation"></li>
                                        <li>
                                            <p:commandLink id="editInfo" actionListener="#{DataversePage.edit('INFO')}" update="@all">
                                                <h:outputText value="General Information" />
                                            </p:commandLink>
                                        </li>
                                        <li>
                                            <h:link id="manageRoles" styleClass="ui-commandlink ui-widget" outcome="manage-roles">
                                                <h:outputText value="Roles + Permissions" />
                                                <f:param name="dataverseId" value="#{DataversePage.dataverse.id}" />
                                                <f:param name="objectType" value="DATAVERSE" />
                                            </h:link>
                                        </li>
                                        <li><a href="#" class="ui-commandlink ui-widget" style="pointer-events: none; color: grey;">Theme</a></li>
                                        <li>
                                            <p:commandLink id="editSetup" actionListener="#{DataversePage.edit('SETUP')}" update="@all">
                                                <h:outputText value="Setup" />
                                            </p:commandLink>   
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </ui:fragment>

                        <div style="padding-bottom:.75em;">
                            <h:outputText value="#{DataversePage.dataverse.description}" rendered="#{empty DataversePage.editMode}"/>
                        </div>

                        <p:panel styleClass="panelLayoutBlock" rendered="#{DataversePage.editMode == 'INFO'}">
                            <p:panelGrid styleClass="panelgridLayoutTable" columns="2" columnClasses="leftClass,rightClass">
                                <ui:fragment>
                                    <p:panelGrid columns="3" styleClass="panelgridFormTable">
                                        <p:outputLabel value="Description" for="description"/>
                                        <ui:fragment>
                                            <p:inputTextarea id="description" value="#{DataversePage.dataverse.description}"
                                                             rows="5" cols="50" counter="counter" maxlength="1000"
                                                             counterTemplate="{0} characters remaining" autoResize="false"/>
                                            <h:outputText id="counter" style="display:block;"/>
                                        </ui:fragment>
                                        <p:message for="description"/>
                                    </p:panelGrid>
                                </ui:fragment>
                            </p:panelGrid>
                        </p:panel>
                    </div>

                    <!-- Dataverse Setup Panel -->                
                    <ui:fragment  rendered="#{DataversePage.editMode == 'SETUP'}">
                        <!-- Dataverse Setup Form -->
                        <ui:fragment rendered="#{DataversePage.dataverse.owner != null}">
                            <h:outputText value="Use MetadataBlocks form Parent Dataverse? " />
                            <p:selectBooleanCheckbox value="#{DataversePage.inheritMetadataBlockFromParent}">  
                                <p:ajax update="@all" listener="#{DataversePage.editMetadataBlocks}"/>  
                            </p:selectBooleanCheckbox> 
                        </ui:fragment> 

                        <p:selectManyMenu id="mdbSelect" value="#{DataversePage.dataverse.metadataBlocks}" converter="metadataBlockConverter" rendered="#{DataversePage.dataverse.metadataBlockRoot or DataversePage.dataverse.owner == null }" 
                                          showCheckbox="true"  style="width:250px;height:300px">  
                            <f:selectItems value="#{dataverseServiceBean.findAllMetadataBlocks()}" var="mdb" 
                                           itemLabel="#{mdb.displayName}" itemValue="#{mdb}" /> 
                        </p:selectManyMenu>     
                    </ui:fragment>                    

{'fraction_non_alphanumeric': 0.12416057304879868, 'fraction_numerical': 0.0074615728995672285, 'mean_word_length': 1.157344064386318, 'pattern_counts': {'":': 0, '<': 353, '<?xml version=': 0, '>': 353, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 210, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1056114', 'n_tokens_mistral': 6112, 'n_tokens_neox': 5764, 'n_words': 897}