mean += dl.amountTransferred; base += dl.size; 
if (dl.percentComplete < 100 && dl.size > 0) { mean += dl.amountTransferred; base += dl.size; } 
function onUpdateProgress(){  if (gDownloadManager.activeDownloads == 0) {    document.title = document.documentElement.getAttribute("statictitle");    gLastComputedMean = -1;    return;  }  // Establish the mean transfer speed and amount downloaded.  var mean = 0;  var base = 0;  var numActiveDownloads = 0;  var dls = gDownloadManager.activeDownloads;  while (dls.hasMoreElements()) {    let dl = dls.getNext();    dl.QueryInterface(Ci.nsIDownload);    mean += dl.amountTransferred;    base += dl.size;    numActiveDownloads++;  }  // we're not downloading anything at the moment,  // but we already downloaded something.  if (base == 0) {    mean = 100;  } else {    mean = Math.floor((mean / base) * 100);  }  // Update title of window  if (mean != gLastComputedMean || gLastActiveDownloads != numActiveDownloads) {    gLastComputedMean = mean;    gLastActiveDownloads = numActiveDownloads;    let strings = document.getElementById("downloadStrings");    if (numActiveDownloads > 1) {      document.title = strings.getFormattedString("downloadsTitleMultiple",                                                  [mean, numActiveDownloads]);    } else {      document.title = strings.getFormattedString("downloadsTitle", [mean]);    }  }}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/c2a0f8ebc6db42787b699d7553477a3b94cce2f9/downloads.js/buggy/toolkit/mozapps/downloads/content/downloads.js