<commit_before>var app = {
    inMenu : true,

    initialize : function(){
        document.addEventListener("deviceready", this.onDeviceReady, false);
    },

    onDeviceReady : function() {
        navigator.notification.alert("PhoneGap is working");
        document.addEventListener("backbutton", app.onBackKeyDown, false);
    },

    onBackKeyDown : function() {
        if(inMenu)
            navigator.app.exitApp();
        else
        {
            inMenu = true;
            addClass(document.getElementById("menu"), "visible");
        }
    },

    click : function(zap) {
        if (document.getElementById(zap))
        {
            if (document.getElementById(zap).className.indexOf('visible') > -1)
                removeClass(document.getElementById(zap), "visible");
            else
                addClass(document.getElementById(zap), "visible");
        }
        else
        {
            navigator.notification.alert(zap);
            inMenu = false;
            removeClass(document.getElementById("menu"), "visible");
        }
    }
};

function removeClass(elem, cls) {
  var str;
  do {
    str = " " + elem.className + " ";
    elem.className = str.replace(" " + cls + " ", " ").replace(/^\s+|\s+$/g, "");
  } while (str.match(cls));
}

function addClass(elem, cls) {
  elem.className += (" " + cls);
}<commit_msg>remove navigator.notification.<commit_after>var app = {
    inMenu : true,

    initialize : function(){
        document.addEventListener("deviceready", this.onDeviceReady, false);
    },

    onDeviceReady : function() {
        alert("PhoneGap is working");
        document.addEventListener("backbutton", app.onBackKeyDown, false);
    },

    onBackKeyDown : function() {
        if(inMenu)
            navigator.app.exitApp();
        else
        {
            inMenu = true;
            addClass(document.getElementById("menu"), "visible");
        }
    },

    click : function(zap) {
        if (document.getElementById(zap))
        {
            if (document.getElementById(zap).className.indexOf('visible') > -1)
                removeClass(document.getElementById(zap), "visible");
            else
                addClass(document.getElementById(zap), "visible");
        }
        else
        {
            alert(zap);
            inMenu = false;
            removeClass(document.getElementById("menu"), "visible");
        }
    }
};

function removeClass(elem, cls) {
  var str;
  do {
    str = " " + elem.className + " ";
    elem.className = str.replace(" " + cls + " ", " ").replace(/^\s+|\s+$/g, "");
  } while (str.match(cls));
}

function addClass(elem, cls) {
  elem.className += (" " + cls);
}
{'fraction_non_alphanumeric': 0.15177570093457943, 'fraction_numerical': 0.0007476635514018691, 'mean_word_length': 2.1116279069767443, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7412863', 'n_tokens_mistral': 769, 'n_tokens_neox': 757, 'n_words': 127}