<commit_before>const UserCtrl = (function() {
  const userObj = {};
  // Simply gets the user input from login
  const getUserInput = (input, difficulty) => {
    userApiCall(input);
    userObj['level'] = difficulty;
  };
  // Makes the ajax call to the server which makes the call to the REST api provided
  // Also, handles loading screen animations
  const userApiCall = (input) => {
    axios.get('user?' + 'nickname=' + input.nickname + '&secret=' + input.secret)
    .then( (resp) => {
      userObj["id"] = resp.data.id;
      userObj["nickname"] = resp.data.nickname;
      userObj["score"] = resp.data.score;
      $('#login-profile').show();
      $('#user-score').show();
      $('#user-score').append(resp.data.score);
    })
    .catch( (err) => {
      console.log(err);
      alert('Sorry a problem occured. Please try again!');
      location.reload();
    })
  };

  const scoreIndex = (level) => {
    switch(level) {<commit_msg>[Fix] Added log for debugging UserCtrl<commit_after>const UserCtrl = (function() {
  const userObj = {};
  // Simply gets the user input from login
  const getUserInput = (input, difficulty) => {
    userApiCall(input);
    userObj['level'] = difficulty;
  };
  // Makes the ajax call to the server which makes the call to the REST api provided
  // Also, handles loading screen animations
  const userApiCall = (input) => {
    axios.get('user?' + 'nickname=' + input.nickname + '&secret=' + input.secret)
    .then( (resp) => {
      console.log(resp)
      userObj["id"] = resp.data.id;
      userObj["nickname"] = resp.data.nickname;
      userObj["score"] = resp.data.score;
      $('#login-profile').show();
      $('#user-score').show();
      $('#user-score').append(resp.data.score);
    })
    .catch( (err) => {
      console.log(err);
      alert('Sorry a problem occured. Please try again!');
      location.reload();
    })
  };

  const scoreIndex = (level) => {
    switch(level) {
{'fraction_non_alphanumeric': 0.17223650385604114, 'fraction_numerical': 0.0, 'mean_word_length': 2.9552845528455283, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5988007', 'n_tokens_mistral': 609, 'n_tokens_neox': 601, 'n_words': 154}