add:  findCalendarID: function(calendar) { var stmt = this.mFindCalendar; stmt.reset(); var pp = stmt.params; pp.name = calendar.name; pp.type = calendar.type; pp.uri = calendar.uri.spec;  var id = -1; if (stmt.step()) { id = stmt.row.id; } stmt.reset(); return id; },   /** * calICalendarManager interface */ createCalendar: function(name, type, uri) { var calendar = Components.classes["@mozilla.org/calendar/calendar;1?type=" + type].createInstance(Components.interfaces.calICalendar); calendar.name = name; calendar.uri = uri; return calendar; }, 
context:     initDB: function() {        var calendarTable = "id INTEGER PRIMARY KEY, name STRING, type STRING, uri STRING";        var dbService = Components.classes[kStorageServiceContractID].getService(kStorageServiceIID);        this.mDB = dbService.getProfileStorage("profile");        try {            this.mDB.createTable("cal_calendars", calendarTable);        } catch (e) {            dump("error creating table cal_calendars -- probably already exists\n");        }        this.mSelectCalendars = createStatement (            this.mDB,            "SELECT oid,* FROM cal_calendars");        this.mFindCalendar = createStatement (            this.mDB,            "SELECT id FROM cal_calendars WHERE name = :name AND type = :type AND uri = :uri");        this.mRegisterCalendar = createStatement (            this.mDB,            "INSERT INTO cal_calendars (name, type, uri) " +            "VALUES (:name, :type, :uri)"            );        this.mUnregisterCalendar = createStatement (            this.mDB,            "DELETE FROM cal_calendars WHERE id = :id"            );    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/f713b3e877f3e56b104ca75ca9864e4bb876b645/calCalendarManager.js/buggy/calendar/base/src/calCalendarManager.js