<commit_before>;(function(exports) {
  // creates lines and circles and starts the animation
  function start(canvas) {
    var world = {
      circles: [],
      lines: [],
      dimensions: { x: canvas.width, y: canvas.height }
    };

    // make new circle every so often
    setInterval(function() {
      world.circles.push(makeCircle(world.dimensions.x / 2));
    }, 400);

    // make grid of lines
    for (var i = 1; i < 6; i++) {
      for (var j = 1; j < 6; j++) {
        world.lines.push(makeLine(i * 80, j * 80, i * j));
      }
    }
    world.lines.splice(10, 2); // throw away top center lines

    // start update/draw loop
    function tick() {
      update(world);
      draw(world, canvas);
      requestAnimationFrame(tick);
    };

    tick();
  };
  exports.start = start; // make start function available to HTML page

  // rotates the lines, moves and bounces the circles
  function update(world) {
    for (var i = world.circles.length - 1; i >= 0; i--) {
      for (var j = 0; j < world.lines.length; j++) {
        bounceCircle(world.circles[i], world.lines[j]);
      }

      moveCircle(world.circles[i]);
      if (!isCircleInWorld(world.circles[i], world.dimensions)) {
        world.circles.splice(i, 1); // remove circles that have left screen
      }
    }

    for (var i = 0; i < world.lines.length; i++) {
      world.lines[i].angle += world.lines[i].rotateSpeed;
    }
  };

  function draw(world, canvas) {
    var ctx = canvas.getContext('2d');<commit_msg>Better comments<commit_after>;(function(exports) {
  // creates lines and circles and starts the animation
  function start(canvas) {
    var world = {
      circles: [],
      lines: [],
      dimensions: { x: canvas.width, y: canvas.height }
    };

    // make new circle every so often
    setInterval(function() {
      world.circles.push(makeCircle(world.dimensions.x / 2));
    }, 400);

    // make grid of lines
    for (var i = 1; i < 6; i++) {
      for (var j = 1; j < 6; j++) {
        world.lines.push(makeLine(i * 80, j * 80, i * j));
      }
    }
    world.lines.splice(10, 2); // throw away top center lines

    // move shapes, draw shapes
    function tick() {
      update(world);
      draw(world, canvas);
      requestAnimationFrame(tick); // queues next tick with browser
    };

    tick(); // start update/draw loop
  };
  exports.start = start; // make start function available to HTML page

  // rotates the lines, moves and bounces the circles
  function update(world) {
    for (var i = world.circles.length - 1; i >= 0; i--) {
      for (var j = 0; j < world.lines.length; j++) {
        bounceCircle(world.circles[i], world.lines[j]);
      }

      moveCircle(world.circles[i]);
      if (!isCircleInWorld(world.circles[i], world.dimensions)) {
        world.circles.splice(i, 1); // remove circles that have left screen
      }
    }

    for (var i = 0; i < world.lines.length; i++) {
      world.lines[i].angle += world.lines[i].rotateSpeed;
    }
  };

  function draw(world, canvas) {
    var ctx = canvas.getContext('2d');
{'fraction_non_alphanumeric': 0.14995099640640314, 'fraction_numerical': 0.013721006207121855, 'mean_word_length': 2.353778751369113, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '25669', 'n_tokens_mistral': 1032, 'n_tokens_neox': 980, 'n_words': 277}