<commit_before>var test = false;
var donationsQueue = [];
var test2 = false;
var CHECK_INTERVAL = 5000;
var donationsInterval;
var fetchInterval;

function openAlertWindow() {
  window.open(location.href, location.href, 'menubar=0,resizable=1,width=1000,height=600,titlebar=no');
}

function processDonations(donations) {
  var promise = new Promise(function(resolve, reject){
    var sliced = donations.slice(0, 10);
    var currentTime = new Date().getTime();
    if(test) {
      var q = new Date().getTime() - 5;
      sliced.push({
        message: "Hello World",
        createdOn: q,
        donorName: 'thelanzolini',
        avatarImageURL: "//assets.donordrive.com/clients/extralife/img/avatar-constituent-default.gif",
        donationAmount: 5
      });
      test2 = true;
    }

    test = true;

    sliced.forEach(function(donation, index){
      var donationTime = new Date(donation.createdOn).getTime();
      if(currentTime - donationTime < CHECK_INTERVAL){
        donationsQueue.push(donation);
      }
    });

    donationsCache = sliced;
    resolve(sliced);
  });
  return promise;
}

function fetchRecentDonations(participantID) {
  if(test2) return;
  return window.fetch('https://www.extra-life.org/index.cfm?fuseaction=donorDrive.participantDonations&participantID='+ participantID +'&format=json')
    .then(function(response){
      return response.json();
    })
    .then(processDonations)
  ;
}

function init() {
  var APP = document.getElementById('app');
  var participantID = window.location.search.replace('?', '').split('=')[1];
<commit_msg>get that https outta here<commit_after>var test = false;
var donationsQueue = [];
var test2 = false;
var CHECK_INTERVAL = 5000;
var donationsInterval;
var fetchInterval;

function openAlertWindow() {
  window.open(location.href, location.href, 'menubar=0,resizable=1,width=1000,height=600,titlebar=no');
}

function processDonations(donations) {
  var promise = new Promise(function(resolve, reject){
    var sliced = donations.slice(0, 10);
    var currentTime = new Date().getTime();
    if(test) {
      var q = new Date().getTime() - 5;
      sliced.push({
        message: "Hello World",
        createdOn: q,
        donorName: 'thelanzolini',
        avatarImageURL: "//assets.donordrive.com/clients/extralife/img/avatar-constituent-default.gif",
        donationAmount: 5
      });
      test2 = true;
    }

    test = true;

    sliced.forEach(function(donation, index){
      var donationTime = new Date(donation.createdOn).getTime();
      if(currentTime - donationTime < CHECK_INTERVAL){
        donationsQueue.push(donation);
      }
    });

    donationsCache = sliced;
    resolve(sliced);
  });
  return promise;
}

function fetchRecentDonations(participantID) {
  if(test2) return;
  return window.fetch('http://www.extra-life.org/index.cfm?fuseaction=donorDrive.participantDonations&participantID='+ participantID +'&format=json')
    .then(function(response){
      return response.json();
    })
    .then(processDonations)
  ;
}

function init() {
  var APP = document.getElementById('app');
  var participantID = window.location.search.replace('?', '').split('=')[1];

{'fraction_non_alphanumeric': 0.13993066498581783, 'fraction_numerical': 0.013867002836432399, 'mean_word_length': 3.688330871491876, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, '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': '541034', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1005, 'n_words': 190}