rem:   var sip = Components.classes["@mozilla.org/supports-interface-pointer;1"] .createInstance(Components.interfaces.nsISupportsInterfacePointer); sip.data = aCalendar; sip.dataIID = Components.interfaces.calICalendar; return getCalendars().indexOf(sip.data); 
add: for (var i = 0; i < gCalendars.length; ++i) { if (gCalendars[i].id == aCalendar.id) { return i; } } return -1; 
context: function getIndexForCalendar(aCalendar) {    // Special trick to compare interface pointers, since normal, ==    // comparison can fail due to javascript wrapping.    var sip = Components.classes["@mozilla.org/supports-interface-pointer;1"]                        .createInstance(Components.interfaces.nsISupportsInterfacePointer);    sip.data = aCalendar;    sip.dataIID = Components.interfaces.calICalendar;    return getCalendars().indexOf(sip.data);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/2289d8bc143211c25fb37aa74324ecdf1bc8296e/calendar-management.js/buggy/calendar/lightning/content/calendar-management.js