Source:
<code>protected void setItemData(final TableItem item, final ITmfEvent event, final long rank) { item.setText(getItemStrings(event)); item.setData(event); item.setData(Key.TIMESTAMP, new TmfTimestamp(event.getTimestamp())); item.setData(Key.RANK, rank); <START> StringBuilder bookmark = null; <END> final Collection<Long> markerIds = fBookmarksMap.get(rank); if (!markerIds.isEmpty()) { bookmark = new StringBuilder(); try { String separator = ""; if (markerIds.size() > 1) { bookmark.append(Messages.TmfEventsTable_MultipleBookmarksToolTip); separator = "\n -"; } for (long markerId : markerIds) { final IMarker marker = fBookmarksFile.findMarker(markerId); bookmark.append(separator); bookmark.append(marker.getAttribute(IMarker.MESSAGE)); } item.setData(Key.BOOKMARK, bookmark.toString()); } catch (final CoreException e) { displayException(e); } } else { item.setData(Key.BOOKMARK, null); } boolean searchMatch = false; boolean searchNoMatch = false; final ITmfFilter searchFilter = (ITmfFilter) fTable.getData(Key.SEARCH_OBJ); if (searchFilter != null) { if (searchFilter.matches(event)) { searchMatch = true; } else { searchNoMatch = true; } } final ColorSetting colorSetting = ColorSettingsManager.getColorSetting(event); if (searchNoMatch) { item.setForeground(colorSetting.getDimmedForegroundColor()); item.setBackground(colorSetting.getDimmedBackgroundColor()); } else { item.setForeground(colorSetting.getForegroundColor()); item.setBackground(colorSetting.getBackgroundColor()); } if (searchMatch) { if (bookmark != null) { item.setImage(SEARCH_MATCH_BOOKMARK_IMAGE); } else { item.setImage(SEARCH_MATCH_IMAGE); } } else if (bookmark != null) { item.setImage(BOOKMARK_IMAGE); } else { item.setImage((Image) null); } }</code><technical_language>defined if() limit scope</technical_language>

Target:
protected void setItemData(final TableItem item, final ITmfEvent event, final long rank) { item.setText(getItemStrings(event)); item.setData(event); item.setData(Key.TIMESTAMP, new TmfTimestamp(event.getTimestamp())); item.setData(Key.RANK, rank); final Collection<Long> markerIds = fBookmarksMap.get(rank); if (!markerIds.isEmpty()) { Joiner joiner = Joiner.on("\n -"); List<Object> parts = new ArrayList<>(); if (markerIds.size() > 1) { parts.add(Messages.TmfEventsTable_MultipleBookmarksToolTip); } try { for (long markerId : markerIds) { final IMarker marker = fBookmarksFile.findMarker(markerId); parts.add(marker.getAttribute(IMarker.MESSAGE)); } } catch (CoreException e) { displayException(e); } item.setData(Key.BOOKMARK, joiner.join(parts)); } else { item.setData(Key.BOOKMARK, null); } boolean searchMatch = false; boolean searchNoMatch = false; final ITmfFilter searchFilter = (ITmfFilter) fTable.getData(Key.SEARCH_OBJ); if (searchFilter != null) { if (searchFilter.matches(event)) { searchMatch = true; } else { searchNoMatch = true; } } final ColorSetting colorSetting = ColorSettingsManager.getColorSetting(event); if (searchNoMatch) { item.setForeground(colorSetting.getDimmedForegroundColor()); item.setBackground(colorSetting.getDimmedBackgroundColor()); } else { item.setForeground(colorSetting.getForegroundColor()); item.setBackground(colorSetting.getBackgroundColor()); } if (searchMatch) { if (!markerIds.isEmpty()) { item.setImage(SEARCH_MATCH_BOOKMARK_IMAGE); } else { item.setImage(SEARCH_MATCH_IMAGE); } } else if (!markerIds.isEmpty()) { item.setImage(BOOKMARK_IMAGE); } else { item.setImage((Image) null); } }