<commit_before>'use strict';

function draw_body(body){
    // Calculate offset.
    var offset_x = 0;
    var offset_y = 0;
    if(body['parent'] != null){
        offset_x += bodies[body['parent']]['x'];
        offset_y += bodies[body['parent']]['y'];
    }

    // Bodies orbit around their parent.
    body['rotation'] += body['speed'];
    if(body['rotation'] > 360){
        body['rotation'] -= 360;
    }else if(body['rotation'] < 0){
        body['rotation'] += 360;
    }
    body['x'] = body['orbit'] * Math.cos(body['rotation']) + offset_x;
    body['y'] = body['orbit'] * Math.sin(body['rotation']) + offset_y;

    // Draw body.
    buffer.fillStyle = body['color'];
    buffer.beginPath();
    buffer.arc(
      body['x'],
      body['y'],
      body['radius'],
      0,
      tau,
      1
    );
    buffer.closePath();
    buffer.fill();

    // Draw orbit path and line to parent, if player allows it.
    if(settings['line-orbit']
      || settings['line-parent']){
        buffer.strokeStyle = body['color'];
        buffer.lineWidth = Math.ceil(body['radius'] / 10) / zoom;

        buffer.beginPath();
        if(settings['line-orbit']){
            buffer.arc(
              offset_x,
              offset_y,
              body['orbit'],
              0,
              tau,
              1
            );
        }
        if(settings['line-parent']){
            buffer.moveTo(
              body['x'],
              body['y']
            );
            buffer.lineTo(
              offset_x,
              offset_y
            );
        }
        buffer.closePath();
        buffer.stroke();
    }

    // If no moons, we're done here.
    if(body['moons'] == void(0)){
        return;
    }

    // Draw moons.
    var moonloop_counter = body['moons'].length - 1;
    do{
        draw_body(body['moons'][moonloop_counter]);
    }while(moonloop_counter--);
}

function draw(){
    buffer.clearRect(
      0,
      0,<commit_msg>changed void(0) to void 0<commit_after>'use strict';

function draw_body(body){
    // Calculate offset.
    var offset_x = 0;
    var offset_y = 0;
    if(body['parent'] != null){
        offset_x += bodies[body['parent']]['x'];
        offset_y += bodies[body['parent']]['y'];
    }

    // Bodies orbit around their parent.
    body['rotation'] += body['speed'];
    if(body['rotation'] > 360){
        body['rotation'] -= 360;
    }else if(body['rotation'] < 0){
        body['rotation'] += 360;
    }
    body['x'] = body['orbit'] * Math.cos(body['rotation']) + offset_x;
    body['y'] = body['orbit'] * Math.sin(body['rotation']) + offset_y;

    // Draw body.
    buffer.fillStyle = body['color'];
    buffer.beginPath();
    buffer.arc(
      body['x'],
      body['y'],
      body['radius'],
      0,
      tau,
      1
    );
    buffer.closePath();
    buffer.fill();

    // Draw orbit path and line to parent, if player allows it.
    if(settings['line-orbit']
      || settings['line-parent']){
        buffer.strokeStyle = body['color'];
        buffer.lineWidth = Math.ceil(body['radius'] / 10) / zoom;

        buffer.beginPath();
        if(settings['line-orbit']){
            buffer.arc(
              offset_x,
              offset_y,
              body['orbit'],
              0,
              tau,
              1
            );
        }
        if(settings['line-parent']){
            buffer.moveTo(
              body['x'],
              body['y']
            );
            buffer.lineTo(
              offset_x,
              offset_y
            );
        }
        buffer.closePath();
        buffer.stroke();
    }

    // If no moons, we're done here.
    if(body['moons'] == void 0){
        return;
    }

    // Draw moons.
    var moonloop_counter = body['moons'].length - 1;
    do{
        draw_body(body['moons'][moonloop_counter]);
    }while(moonloop_counter--);
}

function draw(){
    buffer.clearRect(
      0,
      0,
{'fraction_non_alphanumeric': 0.16943097729012505, 'fraction_numerical': 0.011737688185761675, 'mean_word_length': 1.7222222222222223, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1161770', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1192, 'n_words': 236}