Source:
<code>public void handleEvent(final ISuspendedDMEvent event) { IDMContext context = event.getDMContext(); <START> if (isSessionAllStop(event.getDMContext().getSessionId()) ) { <END> fVisualizer.update(); return; } if (context instanceof IContainerDMContext) { } else if (context instanceof IMIExecutionDMContext) { final IMIExecutionDMContext execDmc = (IMIExecutionDMContext)context; IThreadDMContext threadContext = DMContexts.getAncestorOfType(execDmc, IThreadDMContext.class); DsfServicesTracker tracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(), execDmc.getSessionId()); IProcesses procService = tracker.getService(IProcesses.class); tracker.dispose(); procService.getExecutionData(threadContext, new ImmediateDataRequestMonitor<IThreadDMData>() { @Override protected void handleSuccess() { IThreadDMData data = getData(); if (data instanceof IGdbThreadDMData) { String[] cores = ((IGdbThreadDMData)data).getCores(); if (cores != null) { assert cores.length == 1; int coreId = Integer.parseInt(cores[0]); VisualizerCore vCore = fVisualizer.getModel().getCore(coreId); int tid = execDmc.getThreadId(); VisualizerThread thread = fVisualizer.getModel().getThread(tid); if (thread != null) { assert thread.getState() == VisualizerExecutionState.RUNNING; VisualizerExecutionState newState = VisualizerExecutionState.SUSPENDED; if (event.getReason() == StateChangeReason.SIGNAL) { if (event instanceof IMIDMEvent) { Object miEvent = ((IMIDMEvent)event).getMIEvent(); if (miEvent instanceof MISignalEvent) { String signalName = ((MISignalEvent)miEvent).getName(); if (DSFDebugModel.isCrashSignal(signalName)) { newState = VisualizerExecutionState.CRASHED; } } } } thread.setState(newState); thread.setCore(vCore); fVisualizer.refresh(); } } } } } ); } }</code><technical_language>Variable context right above. Also, check for null, in case. Note InstanceOf check is implicit check for null</technical_language>

Target:
public void handleEvent(final ISuspendedDMEvent event) { IDMContext context = event.getDMContext(); if (context != null && isSessionAllStop(context.getSessionId()) ) { fVisualizer.update(); return; } if (context instanceof IContainerDMContext) { } else if (context instanceof IMIExecutionDMContext) { final IMIExecutionDMContext execDmc = (IMIExecutionDMContext)context; IThreadDMContext threadContext = DMContexts.getAncestorOfType(execDmc, IThreadDMContext.class); DsfServicesTracker tracker = new DsfServicesTracker(MulticoreVisualizerUIPlugin.getBundleContext(), execDmc.getSessionId()); IProcesses procService = tracker.getService(IProcesses.class); tracker.dispose(); procService.getExecutionData(threadContext, new ImmediateDataRequestMonitor<IThreadDMData>() { @Override protected void handleSuccess() { IThreadDMData data = getData(); if (data instanceof IGdbThreadDMData) { String[] cores = ((IGdbThreadDMData)data).getCores(); if (cores != null) { assert cores.length == 1; int coreId = Integer.parseInt(cores[0]); VisualizerCore vCore = fVisualizer.getModel().getCore(coreId); int tid = execDmc.getThreadId(); VisualizerThread thread = fVisualizer.getModel().getThread(tid); if (thread != null) { assert thread.getState() == VisualizerExecutionState.RUNNING; VisualizerExecutionState newState = VisualizerExecutionState.SUSPENDED; if (event.getReason() == StateChangeReason.SIGNAL) { if (event instanceof IMIDMEvent) { Object miEvent = ((IMIDMEvent)event).getMIEvent(); if (miEvent instanceof MISignalEvent) { String signalName = ((MISignalEvent)miEvent).getName(); if (DSFDebugModel.isCrashSignal(signalName)) { newState = VisualizerExecutionState.CRASHED; } } } } thread.setState(newState); thread.setCore(vCore); fVisualizer.refresh(); } } } } } ); } }