<commit_before><!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>

<h1>Login into a registered account</h1>

<form id="login">
    <input type="email" name="email" placeholder="email" required></input>
    <br>
    <input type="password" name="password" placeholder="password" required></input>
    <br>
    <input type="submit" value="Login"></input>
    <br>
    <input type="button" value="Retrieve Password" id="retrieve-pw"></input>
</form>

<p id="message"></p>

<a href="register-page">Register page</a>

<script>
function login_submit(event){
    $.post('ajax?action=login', $('#login').serialize(), function(data) {
        //alert( data.message );
        $('#message').text( data.message.text );
        if(data.message.status=='login successful')
            location.href = 'logged-html';
    });
    return false;
}

function retrieve_password(event){
    $.post('ajax?action=retrieve_password', $('#login').serialize(), function(data) {
        // alert( data.message );
        $('#message').text( data.message );
    });
    return false;
}

$(function(){ $('#login').submit(login_submit); });
$(function(){ $('#retrieve-pw').click(retrieve_password); });
</script>

</body>
</html><commit_msg>login failure<commit_after><!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>

<h1>Login into a registered account</h1>

<form id="login">
    <input type="email" name="email" placeholder="email" required></input>
    <br>
    <input type="password" name="password" placeholder="password" required></input>
    <br>
    <input type="submit" value="Login"></input>
    <br>
    <input type="button" value="Retrieve Password" id="retrieve-pw"></input>
</form>

<p id="message"></p>

<a href="register-page">Register page</a>

<script>
function login_submit(event){
  $('#message').text( "Loading..." );
  $.post('ajax?action=login', $('#login').serialize())
  .done(function(data) {
      //alert( data.message );
      $('#message').text( data.message.text );
      if(data.message.status=='login successful')
        location.href = 'logged-html';
  }).fail(function() {
    $('#message').text( 'Internet error' );
  })
  return false;
}

function retrieve_password(event){
    $.post('ajax?action=retrieve_password', $('#login').serialize(), function(data) {
        // alert( data.message );
        $('#message').text( data.message );
    });
    return false;
}

$(function(){ $('#login').submit(login_submit); });
$(function(){ $('#retrieve-pw').click(retrieve_password); });
</script>

</body>
</html>
{'fraction_non_alphanumeric': 0.2232610321615557, 'fraction_numerical': 0.004487658937920718, 'mean_word_length': 4.2042801556420235, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '3047546', 'n_tokens_mistral': 860, 'n_tokens_neox': 850, 'n_words': 158}