rem: var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"] .getService(Components.interfaces.nsIStringBundleService); var props =  sbs.createBundle("chrome: 
context: function getOccurrenceOrParent(occurrence) {    // Check if this actually is an instance of a recurring event    if (occurrence == occurrence.parentItem) {        return occurrence;    }    // if the user wants to edit an occurrence which is already    // an exception, always edit this single item.    var parentItem = occurrence.parentItem;    var rec = parentItem.recurrenceInfo;    if (rec) {        var exceptions = rec.getExceptionIds({});        if (exceptions.some(function (exid) {                                return exid.compare(occurrence.recurrenceId) == 0;                            })) {            return occurrence;        }    }    var promptService =              Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                       .getService(Components.interfaces.nsIPromptService);    var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"]                        .getService(Components.interfaces.nsIStringBundleService);    var props =  sbs.createBundle("chrome://calendar/locale/calendar.properties");    var promptTitle = props.GetStringFromName("editRecurTitle");    var promptMessage = props.GetStringFromName("editRecurMessage");    var buttonLabel1 = props.GetStringFromName("editRecurAll");    var buttonLabel2 = props.GetStringFromName("editRecurSingle");    var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +                promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1 +                promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2;    var choice = promptService.confirmEx(null, promptTitle, promptMessage, flags,                                         buttonLabel1,null , buttonLabel2, null, {});    switch(choice) {        case 0: return occurrence.parentItem;        case 2: return occurrence;        default: return null;    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4deb9624b116020469000c8700678915abb1edaf/calendar-item-editing.js/buggy/calendar/base/content/calendar-item-editing.js