<commit_before>// Includes file dependencies
define([
], function() {

    var Mixin = {
        isActive: function() {
            return this.get("expiresOn") > Date.now();
        },
        isExpired: function() {
            return this.get("expiresOn") < Date.now();
        },
        status: function() {
            if (this.isActive()) {
                return "Active";
            } else {
                return "Expired";
            }
        }
    };

    // Returns the View class
    return Mixin;

} );
<commit_msg>Protect against exceptions in ExpirationMixin<commit_after>// Includes file dependencies
define([
], function() {

    var Mixin = {
        isActive: function() {
            if (this.has("expiresOn")) {
                return this.get("expiresOn") > Date.now();
            }
            return false;
        },
        isExpired: function() {
            if (this.has("expiresOn")) {
                return this.get("expiresOn") < Date.now();
            }
            return false;
        },
        status: function() {
            if (this.isActive()) {
                return "Active";
            } else {
                return "Expired";
            }
        }
    };

    // Returns the View class
    return Mixin;

} );

{'fraction_non_alphanumeric': 0.13228346456692913, 'fraction_numerical': 0.0, 'mean_word_length': 1.3493530499075785, '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': '3097925', 'n_tokens_mistral': 351, 'n_tokens_neox': 340, 'n_words': 78}