<commit_before>function shuffle(array) {
  var currentIndex = array.length, temporaryValue, randomIndex;

  // While there remain elements to shuffle...
  while (0 !== currentIndex) {

    // Pick a remaining element...
    randomIndex = Math.floor(Math.random() * currentIndex);
    currentIndex -= 1;

    // And swap it with the current element.
    temporaryValue = array[currentIndex];
    array[currentIndex] = array[randomIndex];
    array[randomIndex] = temporaryValue;
  }

  return array;
}

function deal(num) {
  var i;
  var initialHandLength = hand.length;
  var pos;
  var url;

  for (i = 0; i < num; i++)
  {
    url = 'https://api.pokemontcg.io/v1/cards/' + deck[deck.length - 1].set + "-" + deck[deck.length - 1].setNo;

    $.getJSON(url, function(data) {
      $("#hand").append("<img src='" + data.card.imageUrl + "'></img>");
    });

    //$("#hand").append("<p class = 'card'>" + deck[deck.length - 1].name + "</p>");
    deck.pop();
  }
}

function dealPrizes()
{
  var i;

  for (i = 0; i < 6; i++)
  {
    prizes.push(deck[deck.length - 1]);
    deck.pop();
    //document.getElementById("sometext").innerHTML = hand[i].recallName();
  }
}

function playCard(pos)
{
  discard.push(hand[pos]);
  hand.splice(pos, 1);

  var cardsS = document.getElementById('hand');
  cardsS.removeChild(cardsS.childNodes[pos]);

  //alert('card' + pos)
}

function shuffleHandInDeck()
{
  var handLength = $("#hand").children().length;
  var i;
  for (i = 0; i < handLength; i++)
  {
    pictodeck($('#hand').children().first().src)
    $('#hand').children().first().remove();
  }

  shuffle(deck);
}<commit_msg>renamed deal to draw -__-<commit_after>function shuffle(array) {
  var currentIndex = array.length, temporaryValue, randomIndex;

  // While there remain elements to shuffle...
  while (0 !== currentIndex) {

    // Pick a remaining element...
    randomIndex = Math.floor(Math.random() * currentIndex);
    currentIndex -= 1;

    // And swap it with the current element.
    temporaryValue = array[currentIndex];
    array[currentIndex] = array[randomIndex];
    array[randomIndex] = temporaryValue;
  }

  return array;
}

function draw(num) {
  var i;
  var initialHandLength = hand.length;
  var pos;
  var url;

  for (i = 0; i < num; i++)
  {
    url = 'https://api.pokemontcg.io/v1/cards/' + deck[deck.length - 1].set + "-" + deck[deck.length - 1].setNo;

    $.getJSON(url, function(data) {
      $("#hand").append("<img src='" + data.card.imageUrl + "'></img>");
    });

    //$("#hand").append("<p class = 'card'>" + deck[deck.length - 1].name + "</p>");
    deck.pop();
  }
}

function dealPrizes()
{
  var i;

  for (i = 0; i < 6; i++)
  {
    prizes.push(deck[deck.length - 1]);
    deck.pop();
    //document.getElementById("sometext").innerHTML = hand[i].recallName();
  }
}

function shuffleHandInDeck()
{
  var handLength = $("#hand").children().length;
  var i;
  for (i = 0; i < handLength; i++)
  {
    pictodeck($("#hand img").first().attr("src"))
    $('#hand').children().first().remove();
  }

  shuffle(deck);
}

function discardHand()
{
  var handLength = $("#hand").children().length;
  var i;
  for (i = 0; i < handLength; i++)
  {
    $("#discard").append("<img src = '" + $("#hand img").first().attr("src") + "'</img>");
    $('#hand').children().first().remove();
    discardCount++;
  }
}
{'fraction_non_alphanumeric': 0.20448430493273542, 'fraction_numerical': 0.007174887892376682, 'mean_word_length': 3.1565217391304348, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 12, 'https://': 2, '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': '573257', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1146, 'n_words': 250}