rem: entries.forEach(function(entry) { if (!(entry.resource.category in entriesByCategory)) entriesByCategory[entry.resource.category] = []; entriesByCategory[entry.resource.category].push(entry); }); 
add: entriesByCategory[category].forEach(function(entry) { if (entry.resource.startTime == -1 || entry.resource.endTime == -1) return;  if (earliestStart === undefined) earliestStart = entry.resource.startTime; else earliestStart = Math.min(earliestStart, entry.resource.startTime);  if (latestEnd === undefined) latestEnd = entry.resource.endTime; else latestEnd = Math.max(latestEnd, entry.resource.endTime);  if (entry.resource.startTime <= segment.end) { segment.end = Math.max(segment.end, entry.resource.endTime); return; }  categoryValues[category] += segment.end - segment.start;  segment.start = entry.resource.startTime; segment.end = entry.resource.endTime; }); 
context:         entries.forEach(function(entry) {            if (!(entry.resource.category in entriesByCategory))                entriesByCategory[entry.resource.category] = [];            entriesByCategory[entry.resource.category].push(entry);        });
meta: 10664	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10664/965b04dcc7aa4a96c0b1977050db552253146955/NetworkPanel.js/buggy/third_party/WebKit/WebCore/page/inspector/NetworkPanel.js