<commit_before>(function(ko, global){
    function Card(data, posInList, totalCards) {
        var self = this;
        self.id = ko.observable(data.id);
        self.name = ko.observable(data.name);
        self.selected = ko.observable(false);
        self.highlighted = ko.observable(false);
        self.inArea = ko.observable(true);

        self.fractionThroughList = posInList / totalCards;

        self.update = function(data, posInList, totalCards) {
            ko.observable(data.id);
            ko.observable(data.name);
            self.fractionThroughList = posInList / totalCards;
            return self;
        }

        self.highlight = function() {
            self.highlighted(true);
        }

        self.unHighlight = function() {
            self.highlighted(false);
        }

        self.addToArea = function() {
            self.inArea(true);
        };

        self.removeFromArea = function() {
            self.inArea(false);
        };
    }

    global.Card = Card;
})(ko, window);<commit_msg>fix bug: actually set the id and name based on the data<commit_after>(function(ko, global){
    function Card(data, posInList, totalCards) {
        var self = this;
        self.id = ko.observable(data.id);
        self.name = ko.observable(data.name);
        self.selected = ko.observable(false);
        self.highlighted = ko.observable(false);
        self.inArea = ko.observable(true);

        self.fractionThroughList = posInList / totalCards;

        self.update = function(data, posInList, totalCards) {
            self.id(data.id);
            self.name(data.name);
            self.fractionThroughList = posInList / totalCards;
            return self;
        }

        self.highlight = function() {
            self.highlighted(true);
        }

        self.unHighlight = function() {
            self.highlighted(false);
        }

        self.addToArea = function() {
            self.inArea(true);
        };

        self.removeFromArea = function() {
            self.inArea(false);
        };
    }

    global.Card = Card;
})(ko, window);
{'fraction_non_alphanumeric': 0.12070610687022901, 'fraction_numerical': 0.0, 'mean_word_length': 1.8884297520661157, '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': '1037915', 'n_tokens_mistral': 635, 'n_tokens_neox': 600, 'n_words': 108}