Source:
<code>private MouseAdapter openBuildLocationListener() { return new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { ViewerCell viewerCell = fViewer.getCell(new Point(e.x, e.y)); if (viewerCell != null && viewerCell.getColumnIndex() == ReviewTableDefinition.VERIFY.ordinal()) { ISelection selection = fViewer.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selection; Object element = structuredSelection.getFirstElement(); <START> if (element instanceof ChangeInfo) { <END> final String VERIFIED = "Verified"; ChangeInfo review = (ChangeInfo) element; QueryHelpers.loadBasicInformation(gerritClient, review); String lastMessage = null; EList<ChangeMessageInfo> reviewMessages = review.getMessages(); Iterator itr = reviewMessages.iterator(); while (itr.hasNext()) { ChangeMessageInfo current = (ChangeMessageInfo) itr.next(); if (current.get_revision_number() == review.getUserSelectedRevision().get_number()) { if (current.getMessage().contains(BUILD_FAILED)) { lastMessage = current.getMessage(); break; } continue; } } if (lastMessage != null) { int val = org.eclipse.egerrit.internal.core.utils.Utils.verifyTally((VERIFIED), ((ChangeInfo) element).getLabels()); if (val == -1) { if (UIUtils.showConfirmDialog(BUILDINFO_KEY, fViewer.getControl().getShell(), Messages.GerritTableView_openBuild, Messages.GerritTableView_openBuildMessage) == 1) { return; } } int startIdx = lastMessage.indexOf(BUILD_FAILED); int endIdx = lastMessage.indexOf(FAILURE); String uriToServer = lastMessage.substring(startIdx + new String(BUILD_FAILED).length(), endIdx); try { PlatformUI.getWorkbench() .getBrowserSupport() .getExternalBrowser() .openURL(new URL(uriToServer)); } catch (PartInitException | MalformedURLException e1) { logger.debug("Error opening URL :" + e1.toString()); } } } } } } }; }</code><technical_language>reverse check return soon if want</technical_language>

Target:
private MouseAdapter openBuildLocationListener() { return new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { ViewerCell viewerCell = fViewer.getCell(new Point(e.x, e.y)); if (viewerCell != null && viewerCell.getColumnIndex() == ReviewTableDefinition.VERIFY.ordinal()) { ISelection selection = fViewer.getSelection(); if (selection instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selection; Object element = structuredSelection.getFirstElement(); if (element instanceof ChangeInfo) { ChangeInfo review = (ChangeInfo) element; QueryHelpers.loadBasicInformation(gerritClient, review); String lastMessage = null; EList<ChangeMessageInfo> reviewMessages = review.getMessages(); Iterator itr = reviewMessages.iterator(); int val = org.eclipse.egerrit.internal.core.utils.Utils.verifyTally((VERIFIED), ((ChangeInfo) element).getLabels()); if (val == -1) { while (itr.hasNext()) { ChangeMessageInfo current = (ChangeMessageInfo) itr.next(); if (current.get_revision_number() == review.getUserSelectedRevision() .get_number()) { if (current.getMessage().contains(BUILD_FAILED)) { lastMessage = current.getMessage(); if (lastMessage != null) { int startIdx = lastMessage.indexOf(HTTPS); int endIdx = lastMessage.indexOf(FAILURE); String uriToServer = lastMessage.substring(startIdx, endIdx); if (UIUtils.showConfirmDialog(BUILDINFO_KEY, fViewer.getControl().getShell(), Messages.GerritTableView_openBuild, Messages.GerritTableView_openBuildMessage) == 1) { return; } try { PlatformUI.getWorkbench() .getBrowserSupport() .getExternalBrowser() .openURL(new URL(uriToServer)); } catch (PartInitException | MalformedURLException e1) { logger.debug("Error opening URL :" + e1.toString()); } } break; } } continue; } } } } } } }; }