<commit_before><button id="checkout-button" type="button" style="display:none;">checkout</button>

<script>
'use strict';
$(() => {

  const $button = $('#checkout-button');
  const tip = `make this traffic-light's<br/>files your current files`;
  cd.createTip($button, tip);
  $button.click(() => cd.review.fadeOut(checkout));

  cd.review.checkoutButton = {
    show: () => $button.show()
  };

  const checkout = () => {
    const args = {
      // where we are writing to
      id: cd.kata.id(),       // eg 'Xd4f2P'
      index: cd.kata.index(), // eg 17
      // where we are reading from
      src_id: cd.review.id(),
      src_index: cd.review.index(),
      src_avatar_index: cd.review.avatarIndex()
    };
    $.post('/kata/checkout', args, (data) => {
      cd.kata.editor.deleteFiles();
      for (const filename in data.files) {
        cd.kata.editor.createFile(filename, { content:data.files[filename] });
        cd.kata.editor.showFile(filename);
      }
      cd.kata.editor.output(data.stdout.content, data.stderr.content, data.status);
      cd.kata.tabs.output().click();
      cd.kata.filenames.refresh();
      cd.kata.appendTrafficLight(data.light);
      cd.kata.updateTrafficLightsCounts(data.light);
      cd.kata.updatePredictCounts(data.light);
      cd.kata.scrollLastTrafficLightIntoView();
    }, 'json');
  };

});
</script><commit_msg>Fixed missed function rename JS error.<commit_after><button id="checkout-button" type="button" style="display:none;">checkout</button>

<script>
'use strict';
$(() => {

  const $button = $('#checkout-button');
  const tip = `make this traffic-light's<br/>files your current files`;
  cd.createTip($button, tip);
  $button.click(() => cd.review.fadeOut(checkout));

  cd.review.checkoutButton = {
    show: () => $button.show()
  };

  const checkout = () => {
    const args = {
      // where we are writing to
      id: cd.kata.id(),       // eg 'Xd4f2P'
      index: cd.kata.index(), // eg 17
      // where we are reading from
      src_id: cd.review.id(),
      src_index: cd.review.index(),
      src_avatar_index: cd.review.avatarIndex()
    };
    $.post('/kata/checkout', args, (data) => {
      cd.kata.editor.deleteFiles();
      for (const filename in data.files) {
        cd.kata.editor.createFile(filename, { content:data.files[filename] });
        cd.kata.editor.showFile(filename);
      }
      cd.kata.editor.output(data.stdout.content, data.stderr.content, data.status);
      cd.kata.tabs.output().click();
      cd.kata.filenames.refresh();
      cd.kata.appendTrafficLight(data.light);
      cd.kata.addToTrafficLightsCounts(data.light);
      cd.kata.addToPredictCounts(data.light);
      cd.kata.scrollLastTrafficLightIntoView();
    }, 'json');
  };

});
</script>
{'fraction_non_alphanumeric': 0.1763853676204274, 'fraction_numerical': 0.002897500905469033, 'mean_word_length': 2.997105643994211, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, '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': '5313497', 'n_tokens_mistral': 950, 'n_tokens_neox': 930, 'n_words': 156}