startDate = currentView().selectedDay.clone(); 
 if (currentView().initialized) { startDate = currentView().selectedDay.clone(); } else { startDate = jsDateToDateTime(new Date()).getInTimezone(kDefaultTimezone); } 
function createEventWithDialog(calendar, startDate, endDate, summary, event){    const kDefaultTimezone = calendarDefaultTimezone();    var onNewEvent = function(event, calendar, originalEvent) {        doTransaction('add', event, calendar, null, null);    }    if (event) {        openEventDialog(event, calendar, "new", onNewEvent, null);        return;    }        event = createEvent();    if (!startDate) {        startDate = currentView().selectedDay.clone();        startDate.isDate = true;    }    if (startDate.isDate) {        if (!startDate.isMutable) {            startDate = startDate.clone();        }        startDate.isDate = false;        startDate.hour = now().hour;        startDate.minute = 0;        startDate.second = 0;        startDate.normalize();   }    event.startDate = startDate.clone();    if (!endDate) {        endDate = startDate.clone();        endDate.minute += getPrefSafe("calendar.event.defaultlength", 60);        endDate.normalize();    }    event.endDate = endDate.clone();    if (calendar) {        event.calendar = calendar;    } else if ("getSelectedCalendarOrNull" in window) {        // Sunbird specific code        event.calendar = getSelectedCalendarOrNull();    }    if (summary)        event.title = summary;    setDefaultAlarmValues(event);    openEventDialog(event, calendar, "new", onNewEvent, null);}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/66fcf7555c680fc355f8edb7b7d2739ab83d80d4/calendar-item-editing.js/buggy/calendar/base/content/calendar-item-editing.js