Source:
protected boolean executeAnalysis(final IProgressMonitor monitor) throws TmfAnalysisException { TmfGraphBuilderModule graphModule = getGraph(); if (graphModule == null) { Activator.getInstance().logWarning("No graph was found to execute the critical path on"); return true; } graphModule.schedule(); monitor.setTaskName(NLS.bind(Messages.CriticalPathModule_waitingForGraph, graphModule.getName())); if (!graphModule.waitForCompletion(monitor)) { Activator.getInstance().logInfo("Critical path execution: graph building was cancelled. Results may not be accurate."); return false; } TmfGraph graph = graphModule.getGraph(); if (graph == null) { throw new TmfAnalysisException("Critical Path analysis: graph " + graphModule.getName() + " is null"); } Object workerObj = getParameter(PARAM_WORKER); if (workerObj == null) { return false; } if (!(workerObj instanceof IGraphWorker)) { throw new IllegalStateException("Worker object must be an IGraphWorker"); } IGraphWorker worker = (IGraphWorker) workerObj; TmfVertex head = graph.getHead(worker); if (head == null) { fCriticalPath = new TmfGraph(); return true; } TmfTimeRange tr = TmfTraceManager.getInstance().getCurrentTraceContext().getWindowRange(); TmfVertex start = graph.getVertexAt(tr.getStartTime(), worker); if (start == null) { fCriticalPath = new TmfGraph(); return true; } ICriticalPathAlgorithm cp = getAlgorithm(graph); try { fCriticalPath = cp.compute(start, null); return true; } catch (CriticalPathAlgorithmException e) { Activator.getInstance().logError(NonNullUtils.nullToEmptyString(e.getMessage()), e); } return false; }

Target:
protected boolean executeAnalysis(final IProgressMonitor monitor) throws TmfAnalysisException { TmfGraphBuilderModule graphModule = getGraph(); if (graphModule == null) { Activator.getInstance().logWarning("No graph was found to execute the critical path on"); return true; } graphModule.schedule(); monitor.setTaskName(NLS.bind(Messages.CriticalPathModule_waitingForGraph, graphModule.getName())); if (!graphModule.waitForCompletion(monitor)) { Activator.getInstance().logInfo("Critical path execution: graph building was cancelled. Results may not be accurate."); return false; } TmfGraph graph = graphModule.getGraph(); if (graph == null) { throw new TmfAnalysisException("Critical Path analysis: graph " + graphModule.getName() + " is null"); } Object workerObj = getParameter(PARAM_WORKER); if (workerObj == null) { return false; } if (!(workerObj instanceof IGraphWorker)) { throw new IllegalStateException("Worker parameter must be an IGraphWorker"); } IGraphWorker worker = (IGraphWorker) workerObj; TmfVertex head = graph.getHead(worker); if (head == null) { fCriticalPath = new TmfGraph(); return true; } TmfTimeRange tr = TmfTraceManager.getInstance().getCurrentTraceContext().getWindowRange(); TmfVertex start = graph.getVertexAt(tr.getStartTime(), worker); if (start == null) { fCriticalPath = new TmfGraph(); return true; } ICriticalPathAlgorithm cp = getAlgorithm(graph); try { fCriticalPath = cp.compute(start, null); return true; } catch (CriticalPathAlgorithmException e) { Activator.getInstance().logError(NonNullUtils.nullToEmptyString(e.getMessage()), e); } return false; }