Program: 127724
Project: 127724
Buggy source:
public static PaletteRoot createPaletteRootWithAllComponents(){
  Map<String,String> allComponentsCanBeProvided=ComponentsFactoryProvider.getInstance().getAllComponentsCanBeProvided();
  Set<String> components=allComponentsCanBeProvided.keySet();
  List<String> families=new ArrayList<String>();
  Hashtable<String,PaletteDrawer> ht=new Hashtable<String,PaletteDrawer>();
  PaletteRoot palette=new PaletteRoot();
  for (  String nameAndFamily : components) {
    String[] split=nameAndFamily.split(FAMILY_SPEARATOR);
    if (split.length != 2) {
      continue;
    }
    families.add(split[0]);
  }
  Collections.sort(families);
  for (Iterator iter=families.iterator(); iter.hasNext(); ) {
    String oraFam=(String)iter.next();
    String family=getTranslatedFamilyName(oraFam);
    PaletteDrawer componentsDrawer=ht.get(family);
    if (componentsDrawer == null) {
      componentsDrawer=createComponentDrawer(palette,ht,family,oraFam);
    }
  }
  for (  String nameAndFamily : components) {
    String[] split=nameAndFamily.split(FAMILY_SPEARATOR);
    if (split.length != 2) {
      continue;
    }
    String family=getTranslatedFamilyName(split[0]);
    String[] strings=family.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);
    for (int j=0; j < strings.length; j++) {
      ImageDescriptor imageDescriptor=ComponentsFactoryProvider.getInstance().getComponentsImageRegistry().get(allComponentsCanBeProvided.get(nameAndFamily));
      CombinedTemplateCreationEntry component=new CombinedTemplateCreationEntry(split[1],split[1],null,null,imageDescriptor,imageDescriptor);
      PaletteDrawer componentsDrawer=ht.get(strings[j]);
      component.setParent(componentsDrawer);
      componentsDrawer.add(component);
    }
  }
  return palette;
}

Fixed version (ground truth):
public static PaletteRoot createPaletteRootWithAllComponents(){
  Set<IComponent> components=ComponentsFactoryProvider.getInstance().getComponents();
  List<String> families=new ArrayList<String>();
  Hashtable<String,PaletteDrawer> ht=new Hashtable<String,PaletteDrawer>();
  PaletteRoot palette=new PaletteRoot();
  for (  IComponent component : components) {
    if (component.isTechnical() || component.getComponentType() == EComponentType.JOBLET) {
      continue;
    }
    String family=component.getOriginalFamilyName();
    families.add(family);
  }
  Collections.sort(families);
  for (  String family : families) {
    String[] strings=family.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);
    for (    String string : strings) {
      PaletteDrawer componentsDrawer=ht.get(string);
      if (componentsDrawer == null) {
        componentsDrawer=createComponentDrawer(palette,ht,string,family);
      }
    }
  }
  for (  IComponent component : components) {
    if (component.isTechnical() || component.getComponentType() == EComponentType.JOBLET) {
      continue;
    }
    String family=component.getOriginalFamilyName();
    String[] strings=family.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);
    for (    String string : strings) {
      CombinedTemplateCreationEntry componentEntry=new CombinedTemplateCreationEntry(component.getName(),component.getName(),null,null,component.getIcon24(),component.getIcon32());
      PaletteDrawer componentsDrawer=ht.get(string);
      componentEntry.setParent(componentsDrawer);
      componentsDrawer.add(componentEntry);
    }
  }
  return palette;
}