rem: when.events = when.events.filter(function (e) { if (e.id != item.id) return true; if (e.recurrenceId && item.recurrenceId && e.recurrenceId.compare(item.recurrenceId) != 0) return true; return false; }); 
add: [this.today, this.tomorrow, this.soon].forEach(function(when) { function compare(a, b) { var ad = a.startDate || a.dueDate; var bd = b.startDate || b.dueDate; return ad.compare(bd); } when.events.sort(compare); }); 
context:     when.events = when.events.filter(function (e) {                                         if (e.id != item.id)                                             return true;                                         if (e.recurrenceId && item.recurrenceId &&                                             e.recurrenceId.compare(item.recurrenceId) != 0)                                             return true;                                         return false;                                     });
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/84fbd99c0facd6c141e1b09b67cf7b3599f671a3/agenda-tree.js/buggy/calendar/lightning/content/agenda-tree.js