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()) { fEntryBuilder.row(moduleId).clear(); return false; } } fetchTreeIsComplete &= ss.waitUntilBuilt(0); addStateSystem(monitor, ss, moduleId); moduleEnd = Long.max(moduleEnd, ss.getCurrentEndTime()); hasChildren = true; } moduleEntry.setEndTime(moduleEnd); fEntryBuilder.put(parentId, moduleName, moduleEntry); ModuleEntryModel finalModuleEntry = moduleEntry.build(); moduleEntryModelList.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); addStateSystem(monitor, ss, moduleId); if (monitor != null) { if (monitor.isCanceled()) { EntryModelBuilder ssEntry = Objects.requireNonNull(fEntryBuilder.get(moduleId, ss.getSSID())); 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(); moduleEntryModelList.add(finalModuleEntry); if (fetchTreeIsComplete && hasChildren) { fModulesToStatus.put(module, true); } return fetchTreeIsComplete; }