rem: skinParam.count = rows.getColumnItem("COUNT"); skinParam.referrer = rows.getColumnItem("ACCESSLOG_REFERRER"); skinParam.text = skinParam.referrer.clip(50); 
add: skinParam.count = rows.getColumnItem("count"); skinParam.referrer = rows.getColumnItem("referrer"); skinParam.referrer && (skinParam.text = skinParam.referrer.clip(50)); 
context: Story.prototype.backlinks_macro = function(param) {   // check if scheduler has done a new update of accesslog   // if not and we have cached backlinks simply return them   if (this.cache.lrBacklinks >= app.data.lastAccessLogUpdate)      return this.cache.rBacklinks;   var c = getDBConnection("antville");   var dbError = c.getLastError();   if (dbError)      return getMessage("error.database", dbError);   // we're doing this with direct db access here   // (there's no need to do it with prototypes):   var query = "select ACCESSLOG_REFERRER, count(*) as \"COUNT\" from AV_ACCESSLOG where ACCESSLOG_F_TEXT = " + this._id + " group by ACCESSLOG_REFERRER order by \"COUNT\" desc, ACCESSLOG_REFERRER asc;";   var rows = c.executeRetrieval(query);   var dbError = c.getLastError();   if (dbError)      return getMessage("error.database", dbError);   // we show a maximum of 100 backlinks   var limit = Math.min((param.limit ? parseInt(param.limit, 10) : 100), 100);   res.push();   var skinParam = new Object();   var cnt = 0;   while (rows.next() && cnt <= limit) {      skinParam.count = rows.getColumnItem("COUNT");      skinParam.referrer = rows.getColumnItem("ACCESSLOG_REFERRER");      skinParam.text = skinParam.referrer.clip(50);      this.renderSkin("backlinkItem", skinParam);      cnt++;   }   rows.release();   // cache rendered backlinks and set timestamp for   // checking if backlinks should be rendered again   skinParam = {referrers: res.pop()};   if (skinParam.referrers.length > 0)      this.cache.rBacklinks = this.renderSkinAsString("backlinks", skinParam);   else      this.cache.rBacklinks = "";   this.cache.lrBacklinks = new Date();   res.write(this.cache.rBacklinks);   return;};
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/993/4b8d6a823bd5d00f71cf836f5f540553b9fdd13f/Story.js/buggy/code/Story/Story.js