Source:
<code>protected ModelDelta getNextSuspendedThreadDelta(IThread currentThread, boolean reverse) { IDebugTarget target = fDebugTarget; if (target != null) { try { IThread[] threads = target.getThreads(); IThread chosen = null; int threadIndex = -1; boolean takeNext = currentThread == null; int startIdx = reverse ? threads.length - 1 : 0; int endIdx = reverse ? -1 : threads.length; int increment = reverse ? -1 : 1; for (int i = startIdx; i != endIdx; i = i + increment) { IThread thread = threads[i]; if (takeNext && thread.isSuspended()) { IBreakpoint[] bps = thread.getBreakpoints(); if (bps != null && bps.length > 0) { chosen = thread; threadIndex = i; break; } else { if (chosen == null) { chosen = thread; threadIndex = i; } } } takeNext = takeNext || thread.equals(currentThread); } if (chosen != null) { IStackFrame frame = chosen.getTopStackFrame(); if (frame != null) { ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); ModelDelta delta = new ModelDelta(manager, IModelDelta.NO_CHANGE); int launchIndex = getLaunchIndex(target.getLaunch()); int targetIndex = getTargetIndex(target); ModelDelta node = <START> delta.addNode(target.getLaunch(), launchIndex, <END> IModelDelta.NO_CHANGE, target.getLaunch().getChildren().length); node = node.addNode(target, targetIndex, IModelDelta.NO_CHANGE, threads.length); node = node.addNode(chosen, threadIndex, IModelDelta.NO_CHANGE | IModelDelta.EXPAND, chosen.getStackFrames().length); int stackFrameIndex = getStackFrameIndex(frame); node = node.addNode(frame, stackFrameIndex, IModelDelta.NO_CHANGE | IModelDelta.SELECT, 0); return delta; } } return null; } catch (DebugException e) { } } return null; }</code><technical_language>do following: extract this "launch" below, diff better, *all* new variables in this block created *before* line ModelDelta delta = ... diff match changed code</technical_language>

Target:
protected ModelDelta getNextSuspendedThreadDelta(IThread currentThread, boolean reverse) { IDebugTarget target = fDebugTarget; if (target != null) { try { IThread[] threads = target.getThreads(); IThread chosen = null; int threadIndex = -1; boolean takeNext = currentThread == null; int startIdx = reverse ? threads.length - 1 : 0; int endIdx = reverse ? -1 : threads.length; int increment = reverse ? -1 : 1; for (int i = startIdx; i != endIdx; i = i + increment) { IThread thread = threads[i]; if (takeNext && thread.isSuspended()) { IBreakpoint[] bps = thread.getBreakpoints(); if (bps != null && bps.length > 0) { chosen = thread; threadIndex = i; break; } else { if (chosen == null) { chosen = thread; threadIndex = i; } } } takeNext = takeNext || thread.equals(currentThread); } if (chosen != null) { IStackFrame frame = chosen.getTopStackFrame(); if (frame != null) { ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); ILaunch launch = target.getLaunch(); int launchIndex = getLaunchIndex(launch); int targetIndex = getTargetIndex(target); int stackFrameIndex = getStackFrameIndex(frame); ModelDelta delta = new ModelDelta(manager, IModelDelta.NO_CHANGE); ModelDelta node = delta.addNode(launch, launchIndex, IModelDelta.NO_CHANGE, target.getLaunch().getChildren().length); node = node.addNode(target, targetIndex, IModelDelta.NO_CHANGE, threads.length); node = node.addNode(chosen, threadIndex, IModelDelta.NO_CHANGE | IModelDelta.EXPAND, chosen.getStackFrames().length); node = node.addNode(frame, stackFrameIndex, IModelDelta.NO_CHANGE | IModelDelta.SELECT, 0); return delta; } } } catch (DebugException e) { } } return null; }