Source:
protected boolean executeAnalysis(IProgressMonitor monitor) throws TmfAnalysisException { ITmfTrace trace = checkNotNull(getTrace()); final @Nullable String dataFileName = getDataFileName(); if (dataFileName != null) { String dir = TmfTraceManager.getSupplementaryFileDir(trace); final Path file = Paths.get(dir, dataFileName); if (Files.exists(file)) { try (ObjectInputStream ois = new ObjectInputStream(Files.newInputStream(file))) { Object[] segmentArray = readObject(ois); final ISegmentStore<ISegment> store = new TreeMapStore<>(); for (Object element : segmentArray) { if (element instanceof ISegment) { ISegment segment = (ISegment) element; store.add(segment); } } fSegmentStore = store; for (IAnalysisProgressListener listener : getListeners()) { listener.onComplete(this, store); } return true; } catch (IOException | ClassNotFoundException | ClassCastException e) { try { Files.delete(file); } catch (IOException e1) { } } } } ISegmentStore<ISegment> treeMap = new TreeMapStore<>(); ITmfEventRequest req = fOngoingRequest; if ((req != null) && (!req.isCompleted())) { req.cancel(); } req = createAnalysisRequest(treeMap); fOngoingRequest = req; trace.sendRequest(req); try { req.waitForCompletion(); } catch (InterruptedException e) { } if (req.isCancelled() || req.isFailed()) { return false; } fSegmentStore = treeMap; if (dataFileName != null) { String dir = TmfTraceManager.getSupplementaryFileDir(trace); final Path file = Paths.get(dir, dataFileName); try (ObjectOutputStream oos = new ObjectOutputStream(Files.newOutputStream(file))) { oos.writeObject(treeMap.toArray()); } catch (IOException e) { } } for (IAnalysisProgressListener listener : getListeners()) { listener.onComplete(this, treeMap); } return true; }

Target:
protected boolean executeAnalysis(IProgressMonitor monitor) throws TmfAnalysisException { ITmfTrace trace = checkNotNull(getTrace()); final @Nullable String dataFileName = getDataFileName(); if (dataFileName != null) { String dir = TmfTraceManager.getSupplementaryFileDir(trace); final Path file = Paths.get(dir, dataFileName); if (Files.exists(file)) { try (ObjectInputStream ois = new ObjectInputStream(Files.newInputStream(file))) { Object[] segmentArray = readObject(ois); final ISegmentStore<ISegment> store = new TreeMapStore<>(); for (Object element : segmentArray) { if (element instanceof ISegment) { ISegment segment = (ISegment) element; store.add(segment); } } fSegmentStore = store; for (IAnalysisProgressListener listener : getListeners()) { listener.onComplete(this, store); } return true; } catch (IOException | ClassNotFoundException | ClassCastException e) { try { Files.delete(file); } catch (IOException e1) { } } } } ISegmentStore<ISegment> segmentStore = new TreeMapStore<>(); ITmfEventRequest req = fOngoingRequest; if ((req != null) && (!req.isCompleted())) { req.cancel(); } req = createAnalysisRequest(segmentStore); fOngoingRequest = req; trace.sendRequest(req); try { req.waitForCompletion(); } catch (InterruptedException e) { } if (req.isCancelled() || req.isFailed()) { return false; } fSegmentStore = segmentStore; if (dataFileName != null) { String dir = TmfTraceManager.getSupplementaryFileDir(trace); final Path file = Paths.get(dir, dataFileName); try (ObjectOutputStream oos = new ObjectOutputStream(Files.newOutputStream(file))) { oos.writeObject(segmentStore.toArray()); } catch (IOException e) { } } for (IAnalysisProgressListener listener : getListeners()) { listener.onComplete(this, segmentStore); } return true; }