rem:  if ( !calendarToDo.parseIcalString(toDoData) ) {  initCalendarToDo( calendarToDo );   calendarToDo.description = toDoData; }  calendarToDoArray[ calendarToDoArray.length ] = calendarToDo; 
add: calendar.addItem(calendarToDo, null); 
context: function parseIcalToDos( icalStr ){   var calendarToDoArray =  new Array();   for(var i=0, j=0; (i = icalStr.indexOf("BEGIN:VTODO", j)) != -1; )   {       // try to find the begin and end of an toDo. ParseIcalString does not support VCALENDAR      j = icalStr.indexOf("END:VTODO", i + "BEGIN:VTODO".length);      j = (j == -1? icalStr.length : j + "END:VTODO".length);      var toDoData = icalStr.substring(i, j);      var calendarToDo = createToDo();      // if parsing import iCalendar failed, add data as description      if ( !calendarToDo.parseIcalString(toDoData) )      {         // initialize start and end dates.         initCalendarToDo( calendarToDo );         // Save the parsed text as description.         calendarToDo.description = toDoData;            }      calendarToDoArray[ calendarToDoArray.length ] = calendarToDo;   }      return calendarToDoArray;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/dc5c8682eb051e91cbfee84f9933ff32e91a2a1b/importExport.js/buggy/calendar/resources/content/importExport.js