rem: aCalendar.addItem(event, null); 
add: doTransaction('add', event, aCalendar, null, null); 
context:     createNewEvent: function (aCalendar, aStartTime, aEndTime) {        // XXX If we're adding an item from the view, let's make sure that        // XXX the calendar in question is visible!                if (!aCalendar) {            aCalendar = ltnSelectedCalendar();        }        // if we're given both times, skip the dialog        if (aStartTime && aEndTime && !aStartTime.isDate && !aEndTime.isDate) {            var event = createEvent();            event.startDate = aStartTime;            event.endDate = aEndTime;            var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"]                                .getService(Components.interfaces.nsIStringBundleService);            var props = sbs.createBundle("chrome://calendar/locale/calendar.properties");            event.title = props.GetStringFromName("newEvent");            setDefaultAlarmValues(event);            aCalendar.addItem(event, null);        } else if (aStartTime && aStartTime.isDate) {            var event = createEvent();            event.startDate = aStartTime;            setDefaultAlarmValues(event);            aCalendar.addItem(event, null);        } else {            // default pop up the dialog            var date = document.getElementById("calendar-view-box").selectedPanel.selectedDay.clone();            date.isDate = false;            createEventWithDialog(aCalendar, date, date);        }    },
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/dfb1c04b7b37bedca7fd02a138b9a504933f4ebc/calendar-management.js/buggy/calendar/lightning/content/calendar-management.js