rem: 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; }); 
add: entries.forEach(function(entry) { if (!(entry.resource.category.name in entriesByCategory)) entriesByCategory[entry.resource.category.name] = []; entriesByCategory[entry.resource.category.name].push(entry); }); 
context:             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;            });
meta: 10664	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10664/7b1a356bc95948da16efa90f2b09a24e7d570cdd/NetworkPanel.js/buggy/third_party/WebKit/WebCore/page/inspector/NetworkPanel.js