<commit_before>function __processArg(obj, key) {
    var arg = null;
    if (obj) {
        arg = obj[key] || null;
        delete obj[key];
    }
    return arg;
}

function Controller() {
    function generateEventWindow(event) {
        if (!event) {
            $.eventNavigationWindow.close();
            return;
        }
        eventData = event;
        var windowReference = null;
        $.eventNavigationWindow.setTitle(event.title);
        $.eventNavigationWindow.setBackgroundColor(event.styles.background);
        data.set("windowReference", windowReference);
        var image = Ti.UI.createImageView({
            image: event.image,
            width: "100%",
            top: "0dp"
        });
        $.eventView.add(image);
        var label = "";
        for (var item in event.order) switch (event.order[item]) {
          case "home":
            addEventMenuItem({
                icon: event.home_icon,
                label: "Inicio",
                onClick: function() {
                    $.eventNavigationWindow.close();
                }
            });
            break;

          case "form":
            if (event.form) {
                label = event.form_label || "Inscripción online";
                addEventMenuItem({
                    icon: event.form_icon,
                    label: label,
                    controller: "form"
                });
            }
            break;

          case "certificate":
            if (event.certificate) {
                label = event.certificate_label || "Certificación web";
                addEventMenuItem({
                    icon: event.certificate_icon,
                    label: label,
                    controller: "certificate"
                });
            }
            break;

          case "favorites":
            if (event.agenda_label) {
                label = event.favorites_label || "Favoritos";
                addEventMenuItem({
                    icon: event.favorites_icon,
                    label: label,
                    controller: "favorite"
                });
            }
            break;

          case "link":
            if (event.link_url) {
                label = event.link_label || "Link";
                addEventMenuItem({
                    icon: event.link_icon,
                    label: label,
                    controller: "link"
                });
            }
            break;

          case "accommodations":
            if (event.accommodations_label) {
                label = event.accommodations_label || "Alojamientos";
                addEventMenuItem({
                    icon: event.accommodations_icon,
                    label: label,
                    controller: "accommodations"
                });
            }
            break;

          case "map":
            if (event.map_label) {
                label = event.map_label || "Ubicación";
                addEventMenuItem({
                    icon: event.map_icon,
                    label: label,
                    controller: "map"
                });
            }
            break;

          case "pages":
            for (var j in event.pages) addEventMenuItem({
                icon: event.pages[j].icon,
                label: event.pages[j].title,
                onClick: function(e) {
                    var page = null, title = e.source.getTitle();
                    for (var i in eventData.pages) if (eventData.pages[i].title == title) {
                        page = eventData.pages[i];
                        break;
                    }
                    data.set("page", page);
                    var window = Alloy.createController("page").getView();
                    window.open({
                        modal: true
                    });
                }
            });
            break;

          case "agenda":
            if (event.agenda) {
                label = event.agenda_label || "Agenda";
                addEventMenuItem({
                    icon: event.agenda_icon,
                    label: label,
                    controller: "agenda"
                });
            }
        }
        $.eventView.add(Ti.UI.createView({
            height: 10,
            width: "100%",
            left: 0,
            top: 0
        }));
    }
    function addEventMenuItem(item) {
        var button = Titanium.UI.createButton({
            title: item.label,
            width: Ti.UI.FILL,
            height: 40,
            textAlign: "left",
            backgroundColor: "transparent",<commit_msg>Latest compilation.<commit_after>function __processArg(obj, key) {
    var arg = null;
    if (obj) {
        arg = obj[key] || null;
        delete obj[key];
    }
    return arg;
}

function Controller() {
    function generateEventWindow(event) {
        if (!event) {
            $.eventNavigationWindow.close();
            return;
        }
        eventData = event;
        var windowReference = null;
        $.eventNavigationWindow.setTitle(event.title);
        $.eventNavigationWindow.setBackgroundColor(event.styles.background);
        data.set("windowReference", windowReference);
        var image = Ti.UI.createImageView({
            image: event.image,
            width: "100%",
            top: "0dp"
        });
        $.eventView.add(image);
        var label = "";
        pageId = 0, j = null;
        for (var item in event.order) {
            if ("page_" == event.order[item].substring(0, 5)) {
                pageId = event.order[item].match("[0-9]+")[0];
                for (j in event.pages) {
                    if (event.pages[j].id != pageId) continue;
                    addEventMenuItem({
                        icon: event.pages[j].icon,
                        label: event.pages[j].title,
                        onClick: function(e) {
                            var page = null, title = e.source.getTitle();
                            for (var i in eventData.pages) if (eventData.pages[i].title == title) {
                                page = eventData.pages[i];
                                break;
                            }
                            data.set("page", page);
                            var window = Alloy.createController("page").getView();
                            window.open({
                                modal: true
                            });
                        }
                    });
                }
            }
            switch (event.order[item]) {
              case "home":
                addEventMenuItem({
                    icon: event.home_icon,
                    label: "Inicio",
                    onClick: function() {
                        $.eventNavigationWindow.close();
                    }
                });
                break;

              case "form":
                if (event.form) {
                    label = event.form_label || "Inscripción online";
                    addEventMenuItem({
                        icon: event.form_icon,
                        label: label,
                        controller: "form"
                    });
                }
                break;

              case "certificate":
                if (event.certificate) {
                    label = event.certificate_label || "Certificación web";
                    addEventMenuItem({
                        icon: event.certificate_icon,
                        label: label,
                        controller: "certificate"
                    });
                }
                break;

              case "favorites":
                if (event.agenda_label) {
                    label = event.favorites_label || "Favoritos";
                    addEventMenuItem({
                        icon: event.favorites_icon,
                        label: label,
                        controller: "favorite"
                    });
                }
                break;

              case "link":
                if (event.link_url) {
                    label = event.link_label || "Link";
                    addEventMenuItem({
                        icon: event.link_icon,
                        label: label,
                        controller: "link"
                    });
                }
                break;

              case "accommodations":
                if (event.accommodations_label) {
                    label = event.accommodations_label || "Alojamientos";
                    addEventMenuItem({
                        icon: event.accommodations_icon,
                        label: label,
                        controller: "accommodations"
                    });
                }
                break;

              case "map":
                if (event.map_label) {
                    label = event.map_label || "Ubicación";
                    addEventMenuItem({
                        icon: event.map_icon,
                        label: label,
                        controller: "map"
                    });
                }
                break;

              case "agenda":
                if (event.agenda_label) {
                    label = event.agenda_label || "Agenda";
                    addEventMenuItem({
                        icon: event.agenda_icon,
                        label: label,
                        controller: "agenda"
                    });
                }
            }
        }
        $.eventView.add(Ti.UI.createView({
            height: 10,
            width: "100%",
            left: 0,
            top: 0
        }));
    }
    function addEventMenuItem(item) {
        var button = Titanium.UI.createButton({
            title: item.label,
            width: Ti.UI.FILL,
            height: 40,
            textAlign: "left",
            backgroundColor: "transparent",
{'fraction_non_alphanumeric': 0.09828282828282828, 'fraction_numerical': 0.0032323232323232323, 'mean_word_length': 0.964484126984127, 'pattern_counts': {'":': 17, '<': 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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5206799', 'n_tokens_mistral': 2452, 'n_tokens_neox': 2270, 'n_words': 472}