<commit_before><%@ page
        import="org.springframework.security.core.AuthenticationException" %>
<%@ page
        import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %>
<%@ page
        import="org.springframework.security.oauth2.common.exceptions.UnapprovedClientAuthenticationException" %>
<%@ taglib prefix="authz"
           uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Foosball Booking Service</title>
    <link type="text/css" rel="stylesheet"
          href="../webjars/bootstrap/3.2.0/css/bootstrap.min.css"/>
    <script type="text/javascript" src="../webjars/jquery/2.1.1/jquery.min.js"></script>
    <script type="text/javascript"
            src="../webjars/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>

<body>

<div class="container">
    <h1>Foosball Booking Service</h1>

    <%
        if (session.getAttribute(AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY) != null && !(session.getAttribute(
                AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY) instanceof UnapprovedClientAuthenticationException)) {
    %>
    <div class="error">
        <h2>Woops!</h2>

        <p>
            Access could not be granted. (<%=((AuthenticationException) session.getAttribute(
                AbstractAuthenticationProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY)).getMessage()%>)
        </p>
    </div>
    <%
        }
    %>
    <c:remove scope="session" var="SPRING_SECURITY_LAST_EXCEPTION"/>

    <authz:authorize ifAllGranted="ROLE_USER">
        <h2>Please Confirm</h2>

        <p>
            You hereby authorize "
            <c:out value="${client.clientId}"/>
            " to access your protected resources.
        </p>

        <form id="confirmationForm" name="confirmationForm"
              action="<%=request.getContextPath()%>/oauth/authorize" method="post">
            <input name="user_oauth_approval" value="true" type="hidden"/>
            <ul class="list-unstyled">
                <c:forEach items="${scopes}" var="scope">
                    <c:set var="approved">
                        <c:if test="${scope.value}"> checked</c:if>
                    </c:set>
                    <c:set var="denied">
                        <c:if test="${!scope.value}"> checked</c:if>
                    </c:set>
                    <li>
                        <div class="form-group">
                                ${scope.key}: <input type="radio" name="${scope.key}"
                                                     value="true" ${approved}>Approve</input> <input type="radio"
                                                                                                     name="${scope.key}" value="false" ${denied}>Deny</input>
                        </div>
                    </li>
                </c:forEach>
            </ul>
            <button class="btn btn-primary" type="submit">Submit</button>
        </form>

    </authz:authorize>

</div>

</body>
</html>
<commit_msg>Usage of deprecated interfaces removed.<commit_after><%@ page
        import="org.springframework.security.core.AuthenticationException" %>
<%@ page
        import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %>
<%@ page
        import="org.springframework.security.oauth2.common.exceptions.UnapprovedClientAuthenticationException" %>
<%@ page import="org.springframework.security.web.WebAttributes" %>
<%@ taglib prefix="authz"
           uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Foosball Booking Service</title>
    <link type="text/css" rel="stylesheet"
          href="../webjars/bootstrap/3.2.0/css/bootstrap.min.css"/>
    <script type="text/javascript" src="../webjars/jquery/2.1.1/jquery.min.js"></script>
    <script type="text/javascript"
            src="../webjars/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>

<body>

<div class="container">
    <h1>Foosball Booking Service</h1>

    <%
        if (session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION) != null && !(session.getAttribute(
                WebAttributes.AUTHENTICATION_EXCEPTION) instanceof UnapprovedClientAuthenticationException)) {
    %>
    <div class="error">
        <h2>Woops!</h2>

        <p>
            Access could not be granted. (<%=((AuthenticationException) session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION)).getMessage()%>)
        </p>
    </div>
    <%
        }
    %>
    <c:remove scope="session" var="SPRING_SECURITY_LAST_EXCEPTION"/>

    <authz:authorize ifAllGranted="ROLE_USER">
        <h2>Please Confirm</h2>

        <h3><c:out value="${client.clientId}"/> requests permission for:</h3>

        <form id="confirmationForm" name="confirmationForm"
              action="<%=request.getContextPath()%>/oauth/authorize" method="post">
            <input name="user_oauth_approval" value="true" type="hidden"/>

            <div class="form-group">
                <c:forEach items="${scopes}" var="scope">
                    <div class="row">
                        <label class="col-sm-3 control-label">
                            <c:if test="${scope.key=='scope.Read_Booking_List'}">Reading the booking list</c:if>
                            <c:if test="${scope.key=='scope.Add_Booking'}">Adding bookings on behalf of you</c:if>
                        </label>

                        <div class="col-sm-2">
                            <input type="radio" name="${scope.key}" value="true">Approve</input>
                        </div>
                        <div class="col-sm-2">
                            <input type="radio" name="${scope.key}" value="false" checked>Deny</input>
                        </div>
                    </div>
                </c:forEach>
            </div>
            <div class="row">
                <button class="col-sm-1 btn btn-primary" type="submit">Submit</button>
            </div>
        </form>

    </authz:authorize>

</div>

</body>
</html>

{'fraction_non_alphanumeric': 0.15922212093588575, 'fraction_numerical': 0.006684898207231844, 'mean_word_length': 2.254078101828967, 'pattern_counts': {'":': 0, '<': 142, '<?xml version=': 0, '>': 142, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1365466', 'n_tokens_mistral': 1963, 'n_tokens_neox': 1867, 'n_words': 286}