<commit_before>function Pong() {
    "use strict";
    var version = 'v0.1.0';

    var WIDTH = 800, HEIGHT = 600, PI = Math.PI;
    var upArrow = 38, downArrow = 40;
    var canvas, context, keystate;
    var player, ai, ball;

    var bgImageReady = false;
    var bgImageSrc = 'img/background.png';
    var bgImage;

    var lost = false;

    player = {
        x: null,
        y: null,
        width: 20,
        height: 100,
        score: 0,

        imageReady: false,
        imageSrc: 'img/paddle.png',
        image: null,

        update: function() {
            if (keystate[upArrow])
                this.y -= 14;
            if (keystate[downArrow])
                this.y += 14;

            this.y = Math.max(Math.min(this.y, HEIGHT - this.height), 0);
        },

        draw: function() {
            if (this.imageReady) {
                context.drawImage(this.image, this.x, this.y);
            }

            context.fillText(this.score, WIDTH / 2 - 60, 38);
        }
    };

    ai = {
        x: null,
        y: null,
        width: 20,
        height: 100,
        score: 0,

        imageReady: false,
        imageSrc: 'img/paddle.png',
        image: null,

        update: function() {
            var dest_y = ball.y - (this.height + ball.side) * 0.5;
            this.y += (dest_y - this.y) * 0.1;

            this.y = Math.max(Math.min(this.y, HEIGHT - this.height), 0);
        },

        draw: function() {
            if (this.imageReady) {
                context.drawImage(this.image, this.x, this.y);
            }

            var score = this.score
            context.fillText(score, WIDTH / 2 + 60 - context.measureText(score).width, 38);<commit_msg>Corrected code style bug<commit_after>function Pong() {
    "use strict";
    var version = 'v0.1.0';

    var WIDTH = 800, HEIGHT = 600, PI = Math.PI;
    var upArrow = 38, downArrow = 40;
    var canvas, context, keystate;
    var player, ai, ball;

    var bgImageReady = false;
    var bgImageSrc = 'img/background.png';
    var bgImage;

    var lost = false;

    player = {
        x: null,
        y: null,
        width: 20,
        height: 100,
        score: 0,

        imageReady: false,
        imageSrc: 'img/paddle.png',
        image: null,

        update: function() {
            if (keystate[upArrow])
                this.y -= 14;
            if (keystate[downArrow])
                this.y += 14;

            this.y = Math.max(Math.min(this.y, HEIGHT - this.height), 0);
        },

        draw: function() {
            if (this.imageReady) {
                context.drawImage(this.image, this.x, this.y);
            }

            context.fillText(this.score, WIDTH / 2 - 60, 38);
        }
    };

    ai = {
        x: null,
        y: null,
        width: 20,
        height: 100,
        score: 0,

        imageReady: false,
        imageSrc: 'img/paddle.png',
        image: null,

        update: function() {
            var dest_y = ball.y - (this.height + ball.side) * 0.5;
            this.y += (dest_y - this.y) * 0.1;

            this.y = Math.max(Math.min(this.y, HEIGHT - this.height), 0);
        },

        draw: function() {
            if (this.imageReady) {
                context.drawImage(this.image, this.x, this.y);
            }

            var score = this.score;
            context.fillText(score, WIDTH / 2 + 60 - context.measureText(score).width, 38);
{'fraction_non_alphanumeric': 0.1332747510251904, 'fraction_numerical': 0.026362038664323375, 'mean_word_length': 1.4323361823361824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1301825', 'n_tokens_mistral': 1207, 'n_tokens_neox': 1083, 'n_words': 266}