Source:
<code>private TableEventRequest filteredTableRequest(int queryCount, long queryIndex, Map<Long, ITmfEventAspect<?>> aspects, ITmfFilter filter, @Nullable ITmfFilter searchFilter, boolean forwardSearch, @Nullable ITmfFilter collapseFilter, @Nullable IProgressMonitor monitor) { applyFilter(filter); Entry<Long, Long> nearestEntry = fIndexToRankMap.floorEntry(queryIndex); long startingRank = nearestEntry != null ? nearestEntry.getValue() : 0L; Long startingIndex = nearestEntry != null ? nearestEntry.getKey() : 0L; return new TableEventRequest(startingRank) { private long currentIndex = startingIndex; private long rank = startingRank; @Override public void handleData(@NonNull ITmfEvent event) { super.handleData(event); if (monitor != null && monitor.isCanceled()) { cancel(); return; } List<EventTableLine> events = getEventLines(); if (filter.matches(event) && (collapseFilter == null || collapseFilter.matches(event))) { if (searchFilter == null || searchFilter.matches(event)) { if (events.size() < queryCount && queryIndex <= currentIndex) { EventTableLine eventLine = buildEventTableLine(aspects, event, currentIndex, rank); <START> events.add(eventLine); <END> } if (currentIndex % INDEX_STORING_INTERVAL == 0) { fIndexToRankMap.put(currentIndex, rank); fRankToIndexMap.put(rank, currentIndex); } } currentIndex++; incrementCount(); } else if (collapseFilter != null && !events.isEmpty()) { int lastIndex = events.size() - 1; EventTableLine prevLine = events.get(lastIndex); long prevRepeatCount = prevLine.getRepeatCount(); events.set(lastIndex, new EventTableLine(prevLine.getLine(), prevLine.getIndex(), prevLine.getTimestamp(), prevLine.getRank(), prevRepeatCount++)); } if (searchFilter != null && ((!forwardSearch && getCurrentCount() == queryCount) || events.size() == queryCount)) { done(); return; } rank++; } }; }</code><technical_language>inline</technical_language>

Target:
private TableEventRequest filteredTableRequest(int queryCount, long queryIndex, Map<Long, ITmfEventAspect<?>> aspects, ITmfFilter filter, @Nullable ITmfFilter searchFilter, boolean forwardSearch, @Nullable ITmfFilter collapseFilter, @Nullable IProgressMonitor monitor) { applyFilter(filter); Entry<Long, Long> nearestEntry = fIndexToRankMap.floorEntry(queryIndex); long startingRank = nearestEntry != null ? nearestEntry.getValue() : 0L; Long startingIndex = nearestEntry != null ? nearestEntry.getKey() : 0L; return new TableEventRequest(startingRank) { private long currentIndex = startingIndex; private long rank = startingRank; @Override public void handleData(@NonNull ITmfEvent event) { super.handleData(event); if (monitor != null && monitor.isCanceled()) { cancel(); return; } List<EventTableLine> events = getEventLines(); if (filter.matches(event) && (collapseFilter == null || collapseFilter.matches(event))) { if (searchFilter == null || searchFilter.matches(event)) { if (events.size() < queryCount && queryIndex <= currentIndex) { events.add(buildEventTableLine(aspects, event, currentIndex, rank)); } if (currentIndex % INDEX_STORING_INTERVAL == 0) { fIndexToRankMap.put(currentIndex, rank); fRankToIndexMap.put(rank, currentIndex); } } currentIndex++; incrementCount(); } else if (collapseFilter != null && !events.isEmpty()) { int lastIndex = events.size() - 1; EventTableLine prevLine = events.get(lastIndex); long prevRepeatCount = prevLine.getRepeatCount(); events.set(lastIndex, new EventTableLine(prevLine.getLine(), prevLine.getIndex(), prevLine.getTimestamp(), prevLine.getRank(), prevRepeatCount++)); } if (searchFilter != null && ((!forwardSearch && getCurrentCount() == queryCount) || events.size() == queryCount)) { done(); return; } rank++; } @Override public long getCurrentCount() { long currentCount = super.getCurrentCount(); if (fFilteredCount == -1L) { fFilteredCount = currentCount; } return fFilteredCount; } }; }