Source:
private boolean addModule(@Nullable IProgressMonitor monitor, ITmfAnalysisModuleWithStateSystems module, Long parentId, Long startTime) { synchronized (fStartedAnalysis) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } } waitForInitialization(getTrace(), module); String moduleName = Objects.requireNonNull(module.getName()); EntryModelBuilder entry = fEntryBuilder.get(parentId, moduleName); ModuleEntryModel.Builder moduleEntry; if (entry != null && entry instanceof ModuleEntryModel.Builder) { moduleEntry = (ModuleEntryModel.Builder) entry; } else { long newId = ENTRY_ID.getAndIncrement(); moduleEntry = new ModuleEntryModel.Builder(newId, parentId, moduleName, startTime, module); fEntryBuilder.put(parentId, moduleName, moduleEntry); } long moduleId = moduleEntry.getId(); boolean fetchTreeIsComplete = true; Long moduleEnd = startTime; boolean hasChildren = false; for (ITmfStateSystem ss : module.getStateSystems()) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } fetchTreeIsComplete &= ss.waitUntilBuilt(0); if (!ss.isCancelled()) { addStateSystem(monitor, ss, moduleId); } else { EntryModelBuilder ssEntry = fEntryBuilder.get(moduleId, ss.getSSID()); if (ssEntry != null) { deleteElementFromBuildEntryList(ssEntry.getId()); } return false; } moduleEnd = Long.max(moduleEnd, ss.getCurrentEndTime()); hasChildren = true; } moduleEntry.setEndTime(moduleEnd); fEntryBuilder.put(parentId, moduleName, moduleEntry); ModuleEntryModel finalModuleEntry = moduleEntry.build(); fModuleEntryModelList.add(finalModuleEntry); if (fetchTreeIsComplete && hasChildren) { fModulesToStatus.put(module, true); } return fetchTreeIsComplete; }

Target:
private boolean addModule(@Nullable IProgressMonitor monitor, ITmfAnalysisModuleWithStateSystems module, Long parentId, Long startTime) { synchronized (fStartedAnalysis) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } } waitForInitialization(getTrace(), module); String moduleName = Objects.requireNonNull(module.getName()); EntryModelBuilder entry = fEntryBuilder.get(parentId, moduleName); ModuleEntryModel.Builder moduleEntry; if (entry != null && entry instanceof ModuleEntryModel.Builder) { moduleEntry = (ModuleEntryModel.Builder) entry; } else { long newId = ENTRY_ID.getAndIncrement(); moduleEntry = new ModuleEntryModel.Builder(newId, parentId, moduleName, startTime, module); fEntryBuilder.put(parentId, moduleName, moduleEntry); } long moduleId = moduleEntry.getId(); boolean fetchTreeIsComplete = true; Long moduleEnd = startTime; boolean hasChildren = false; for (ITmfStateSystem ss : module.getStateSystems()) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } fetchTreeIsComplete &= ss.waitUntilBuilt(0); if (!ss.isCancelled()) { addStateSystem(monitor, ss, moduleId); moduleEnd = Long.max(moduleEnd, ss.getCurrentEndTime()); hasChildren = true; } else { EntryModelBuilder ssEntry = fEntryBuilder.get(moduleId, ss.getSSID()); if (ssEntry != null) { deleteElementFromBuildEntryList(ssEntry.getId()); } } } moduleEntry.setEndTime(moduleEnd); fEntryBuilder.put(parentId, moduleName, moduleEntry); ModuleEntryModel finalModuleEntry = moduleEntry.build(); fModuleEntryModelList.add(finalModuleEntry); if (fetchTreeIsComplete && hasChildren) { fModulesToStatus.put(module, true); } return fetchTreeIsComplete; }