Program: 125321
Project: 125321
Buggy source:
private static void initializeHiddenComponents(){
  RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
  if (repositoryContext == null) {
    return;
  }
  Project project=repositoryContext.getProject();
  if (project == null) {
    return;
  }
  org.talend.core.model.properties.Project emfProject=project.getEmfProject();
  if (emfProject == null) {
    return;
  }
  hiddenComponents=new HashMap<String,Map<String,Set<String>>>();
  EList list=emfProject.getComponentsSettings();
  for (  IComponent component : ComponentsFactoryProvider.getInstance().getComponents()) {
    if (component.isTechnical() || component.getComponentType() == EComponentType.JOBLET) {
      continue;
    }
    if (!hiddenComponents.containsKey(component.getPaletteType())) {
      hiddenComponents.put(component.getPaletteType(),new HashMap<String,Set<String>>());
    }
    if (!component.isVisibleInComponentDefinition()) {
      hiddenComponents.get(component.getPaletteType()).put(component.getName(),new HashSet<String>());
      for (      String family : component.getOriginalFamilyName().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
        hiddenComponents.get(component.getPaletteType()).get(component.getName()).add(family);
      }
    }
  }
  for (  Object oSetting : list) {
    ComponentSetting setting=(ComponentSetting)oSetting;
    String paletteType;
    String componentName;
    if (setting.getName().contains("String_Node_Str")) {
      String[] splitted=setting.getName().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);
      paletteType=splitted[0];
      componentName=splitted[1];
    }
 else {
      paletteType=ComponentCategory.CATEGORY_4_DI.getName();
      componentName=setting.getName();
    }
    if (!hiddenComponents.containsKey(paletteType)) {
      hiddenComponents.put(paletteType,new HashMap<String,Set<String>>());
    }
    if (setting.isHidden()) {
      if (!hiddenComponents.get(paletteType).containsKey(componentName)) {
        hiddenComponents.get(paletteType).put(componentName,new HashSet<String>());
      }
      for (      String family : setting.getFamily().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
        hiddenComponents.get(paletteType).get(componentName).add(family);
      }
    }
 else {
      if (hiddenComponents.get(paletteType).containsKey(componentName)) {
        for (        String family : setting.getFamily().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
          hiddenComponents.get(paletteType).get(componentName).remove(family);
        }
        if (hiddenComponents.get(paletteType).get(componentName).isEmpty()) {
          hiddenComponents.get(paletteType).remove(componentName);
        }
      }
    }
  }
  displayedFamilies=new HashMap<String,Set<String>>();
  for (  IComponent component : ComponentsFactoryProvider.getInstance().getComponents()) {
    if (component.isTechnical() || component.getComponentType() == EComponentType.JOBLET) {
      continue;
    }
    if (!displayedFamilies.containsKey(component.getPaletteType())) {
      displayedFamilies.put(component.getPaletteType(),new HashSet<String>());
    }
    for (    String family : component.getOriginalFamilyName().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
      if (isComponentVisible(component,null)) {
        displayedFamilies.get(component.getPaletteType()).add(family);
      }
    }
  }
}

Fixed version (ground truth):
private static void initializeHiddenComponents(){
  RepositoryContext repositoryContext=(RepositoryContext)CoreRuntimePlugin.getInstance().getContext().getProperty(Context.REPOSITORY_CONTEXT_KEY);
  if (repositoryContext == null) {
    return;
  }
  Project project=repositoryContext.getProject();
  if (project == null) {
    return;
  }
  org.talend.core.model.properties.Project emfProject=project.getEmfProject();
  if (emfProject == null) {
    return;
  }
  hiddenComponents=new HashMap<String,Map<String,Set<String>>>();
  EList list=emfProject.getComponentsSettings();
  Collection<IComponent> componentList=ComponentsFactoryProvider.getInstance().readComponents();
  for (  IComponent component : componentList) {
    if (component.isTechnical() || component.getComponentType() == EComponentType.JOBLET) {
      continue;
    }
    if (!hiddenComponents.containsKey(component.getPaletteType())) {
      hiddenComponents.put(component.getPaletteType(),new HashMap<String,Set<String>>());
    }
    if (!component.isVisibleInComponentDefinition()) {
      hiddenComponents.get(component.getPaletteType()).put(component.getName(),new HashSet<String>());
      for (      String family : component.getOriginalFamilyName().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
        hiddenComponents.get(component.getPaletteType()).get(component.getName()).add(family);
      }
    }
  }
  for (  Object oSetting : list) {
    ComponentSetting setting=(ComponentSetting)oSetting;
    String paletteType;
    String componentName;
    if (setting.getName().contains("String_Node_Str")) {
      String[] splitted=setting.getName().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);
      paletteType=splitted[0];
      componentName=splitted[1];
    }
 else {
      paletteType=ComponentCategory.CATEGORY_4_DI.getName();
      componentName=setting.getName();
    }
    if (!hiddenComponents.containsKey(paletteType)) {
      hiddenComponents.put(paletteType,new HashMap<String,Set<String>>());
    }
    if (setting.isHidden()) {
      if (!hiddenComponents.get(paletteType).containsKey(componentName)) {
        hiddenComponents.get(paletteType).put(componentName,new HashSet<String>());
      }
      for (      String family : setting.getFamily().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
        hiddenComponents.get(paletteType).get(componentName).add(family);
      }
    }
 else {
      if (hiddenComponents.get(paletteType).containsKey(componentName)) {
        for (        String family : setting.getFamily().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
          hiddenComponents.get(paletteType).get(componentName).remove(family);
        }
        if (hiddenComponents.get(paletteType).get(componentName).isEmpty()) {
          hiddenComponents.get(paletteType).remove(componentName);
        }
      }
    }
  }
  displayedFamilies=new HashMap<String,Set<String>>();
  for (  IComponent component : componentList) {
    if (component.isTechnical() || component.getComponentType() == EComponentType.JOBLET) {
      continue;
    }
    if (!displayedFamilies.containsKey(component.getPaletteType())) {
      displayedFamilies.put(component.getPaletteType(),new HashSet<String>());
    }
    for (    String family : component.getOriginalFamilyName().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
      if (isComponentVisible(component,null)) {
        displayedFamilies.get(component.getPaletteType()).add(family);
      }
    }
  }
}