<commit_before><?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <!-- INTERFACE -->
    <cc:interface name="loginDialog">
      <cc:attribute name="usernameLabel" default="Username: "/>
      <cc:attribute name="passwordLabel" default="Password: "/>
      <cc:attribute name="loginButtonText" default="Login"/>
      <cc:attribute name="cancelButtonText" default="Cancel"/>
      <cc:attribute name="loginAction" method-signature="void action(java.lang.String, java.lang.String)" default="#{facesContext.externalContext.request.login}"/>
      <cc:attribute name="cancelAction" method-signature="void action()"/>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
      <f:subview id="loginDialog">
        <h:panelGroup rendered="#{facesContext.externalContext.request.queryString == 'form-based'}">
          <form name="j_security_check"
                method="post"
                action="j_security_check"
                enctype="application/x-www-form-urlencoded">
            <label for="username"><h:outputText value="#{cc.attrs.usernameLabel}"/></label>
            <input id="username" type="text" name="j_username" title="#{cc.attrs.usernameLabel}"/>  
            <label for="password"><h:outputText value="#{cc.attrs.passwordLabel}"/></label>
            <input id="password" type="password" name="j_password" title="#{cc.attrs.passwordLabel}"/>  
		    <br />
		    <div class="buttons">
		      <input name="j_security_check_submit" type="submit" value="#{cc.attrs.loginButtonText}" />
		      <input name="j_security_check_cancel" type="reset" value="#{cc.attrs.cancelButtonText}" />
		    </div>
		  </form>        
        </h:panelGroup>
        <h:panelGroup rendered="#{facesContext.externalContext.request.queryString != 'form-based'}">
          <h:form id="loginForm">
            <h:outputLabel value="#{cc.attrs.usernameLabel}" for="username"/>
            <h:inputText id="username" name="username"/>
            <h:outputLabel value="#{cc.attrs.passwordLabel}" for="password"/>
            <h:inputSecret id="password" name="password"/>
            <br />
            <h:panelGroup layout="block" styleClass="buttons">
              <h:commandButton id="loginButton"
                               value="#{cc.attrs.loginButtonText}">
                <f:param name="outcome" value="#{facesContext.externalContext.requestParameterMap['return']}?#{facesContext.externalContext.requestParameterMap['query']}#{not empty facesContext.externalContext.requestParameterMap['query']? '&amp;': ''}faces-redirect=true&amp;includeViewParams=true}"/>
                <f:actionListener type="net.sf.jpasecurity.jsf.LoginActionListener"/>
              </h:commandButton>
              <h:commandButton id="cancelButton"
                               value="#{cc.attrs.cancelButtonText}">
                <f:param name="outcome" value="#{facesContext.externalContext.requestParameterMap['return']}?#{facesContext.externalContext.requestParameterMap['query']}#{not empty facesContext.externalContext.requestParameterMap['query']? '&amp;': ''}faces-redirect=true&amp;includeViewParams=true}"/>
                <f:actionListener type="net.sf.jpasecurity.jsf.LoginActionListener"/>
              </h:commandButton>
            </h:panelGroup>
          </h:form>
        </h:panelGroup>
      </f:subview>
    </cc:implementation>
</html><commit_msg>Fixed bug when page with loginDialog is invoked without return parameter<commit_after><?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <!-- INTERFACE -->
    <cc:interface name="loginDialog">
      <cc:attribute name="usernameLabel" default="Username: "/>
      <cc:attribute name="passwordLabel" default="Password: "/>
      <cc:attribute name="loginButtonText" default="Login"/>
      <cc:attribute name="cancelButtonText" default="Cancel"/>
      <cc:attribute name="loginAction" method-signature="void action(java.lang.String, java.lang.String)" default="#{facesContext.externalContext.request.login}"/>
      <cc:attribute name="cancelAction" method-signature="void action()"/>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>
      <f:subview id="loginDialog">
        <h:panelGroup rendered="#{facesContext.externalContext.request.queryString == 'form-based'}">
          <form name="j_security_check"
                method="post"
                action="j_security_check"
                enctype="application/x-www-form-urlencoded">
            <label for="username"><h:outputText value="#{cc.attrs.usernameLabel}"/></label>
            <input id="username" type="text" name="j_username" title="#{cc.attrs.usernameLabel}"/>  
            <label for="password"><h:outputText value="#{cc.attrs.passwordLabel}"/></label>
            <input id="password" type="password" name="j_password" title="#{cc.attrs.passwordLabel}"/>  
		    <br />
		    <div class="buttons">
		      <input name="j_security_check_submit" type="submit" value="#{cc.attrs.loginButtonText}" />
		      <input name="j_security_check_cancel" type="reset" value="#{cc.attrs.cancelButtonText}" />
		    </div>
		  </form>        
        </h:panelGroup>
        <h:panelGroup rendered="#{facesContext.externalContext.request.queryString != 'form-based'}">
          <h:form id="loginForm">
            <h:outputLabel value="#{cc.attrs.usernameLabel}" for="username"/>
            <h:inputText id="username" name="username"/>
            <h:outputLabel value="#{cc.attrs.passwordLabel}" for="password"/>
            <h:inputSecret id="password" name="password"/>
            <br />
            <h:panelGroup layout="block" styleClass="buttons">
              <h:commandButton id="loginButton"
                               value="#{cc.attrs.loginButtonText}">
                <f:param name="outcome" value="#{not empty facesContext.externalContext.requestParameterMap['return']? facesContext.externalContext.requestParameterMap['return']: facesContext.viewRoot.viewId}?#{facesContext.externalContext.requestParameterMap['query']}#{not empty facesContext.externalContext.requestParameterMap['query']? '&amp;': ''}faces-redirect=true&amp;includeViewParams=true}"/>
                <f:actionListener type="net.sf.jpasecurity.jsf.LoginActionListener"/>
              </h:commandButton>
              <h:commandButton id="cancelButton"
                               value="#{cc.attrs.cancelButtonText}">
                <f:param name="outcome" value="#{not empty facesContext.externalContext.requestParameterMap['return']? facesContext.externalContext.requestParameterMap['return']: facesContext.viewRoot.viewId}?#{facesContext.externalContext.requestParameterMap['query']}#{not empty facesContext.externalContext.requestParameterMap['query']? '&amp;': ''}faces-redirect=true&amp;includeViewParams=true}"/>
                <f:actionListener type="net.sf.jpasecurity.jsf.LoginActionListener"/>
              </h:commandButton>
            </h:panelGroup>
          </h:form>
        </h:panelGroup>
      </f:subview>
    </cc:implementation>
</html>
{'fraction_non_alphanumeric': 0.17043838096469677, 'fraction_numerical': 0.003620845726108884, 'mean_word_length': 3.3327731092436976, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 2, '>': 111, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 12}, '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': '5050031', 'n_tokens_mistral': 2293, 'n_tokens_neox': 2218, 'n_words': 293}