Program: 118116
Project: 118116
Buggy source:
/** 
 * DOC cmeng Comment method "createRecentlyUsedEntry".
 * @param componentsDrawer
 * @param ht
 * @param recentlyUsedList
 * @param recentlyUsedMap
 * @return
 */
protected static void createRecentlyUsedEntryList(Hashtable<String,PaletteDrawer> ht,List<RecentlyUsedComponent> recentlyUsedList,Map<String,IComponent> recentlyUsedMap){
  String name;
  String longName;
  TalendCombinedTemplateCreationEntry component;
  final int recentlyUsedSize=PaletteSettingsPreferencePage.getPaletteRencentlyUsedListSize();
  int i=1;
  for (  RecentlyUsedComponent recentlyUsed : recentlyUsedList) {
    if (recentlyUsedSize < i) {
      break;
    }
    IComponent recentlyUsedComponent=recentlyUsedMap.get(recentlyUsed.getName());
    if (recentlyUsedComponent == null) {
      continue;
    }
    if (!ComponentUtilities.isComponentVisible(recentlyUsedComponent)) {
      continue;
    }
    ++i;
    PaletteDrawer componentsDrawer=ht.get(RECENTLY_USED);
    if (componentsDrawer != null) {
      name=recentlyUsedComponent.getName();
      longName=recentlyUsedComponent.getLongName();
      ImageDescriptor imageSmall=recentlyUsedComponent.getIcon16();
      IPreferenceStore store=DesignerPlugin.getDefault().getPreferenceStore();
      ImageDescriptor imageLarge;
      final String string=store.getString(TalendDesignerPrefConstants.LARGE_ICONS_SIZE);
      if (string.equals("String_Node_Str")) {
        imageLarge=recentlyUsedComponent.getIcon24();
      }
 else {
        imageLarge=recentlyUsedComponent.getIcon32();
      }
      component=new TalendCombinedTemplateCreationEntry(name,name,Node.class,new PaletteComponentFactory(recentlyUsedComponent),imageSmall,imageLarge);
      component.setDescription(longName);
      component.setParent(componentsDrawer);
      component.setTimestemp(recentlyUsed.getTimestamp());
      componentsDrawer.add(component);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC cmeng Comment method "createRecentlyUsedEntry".
 * @param componentsDrawer
 * @param ht
 * @param recentlyUsedList
 * @param recentlyUsedMap
 * @return
 */
protected static void createRecentlyUsedEntryList(Hashtable<String,PaletteDrawer> ht,List<RecentlyUsedComponent> recentlyUsedList,Map<String,IComponent> recentlyUsedMap){
  String name;
  String longName;
  TalendCombinedTemplateCreationEntry component;
  final int recentlyUsedSize=PaletteSettingsPreferencePage.getPaletteRencentlyUsedListSize();
  int i=1;
  for (  RecentlyUsedComponent recentlyUsed : recentlyUsedList) {
    if (recentlyUsedSize < i) {
      break;
    }
    IComponent recentlyUsedComponent=recentlyUsedMap.get(recentlyUsed.getName());
    if (recentlyUsedComponent == null) {
      continue;
    }
    if (!ComponentUtilities.isComponentVisible(recentlyUsedComponent)) {
      continue;
    }
    ++i;
    PaletteDrawer componentsDrawer=ht.get(RECENTLY_USED);
    if (componentsDrawer != null) {
      name=recentlyUsedComponent.getName();
      longName=recentlyUsedComponent.getLongName();
      ImageDescriptor imageSmall=recentlyUsedComponent.getIcon16();
      IPreferenceStore store=DesignerPlugin.getDefault().getPreferenceStore();
      ImageDescriptor imageLarge;
      final String string=store.getString(TalendDesignerPrefConstants.LARGE_ICONS_SIZE);
      if (string.equals("String_Node_Str")) {
        imageLarge=recentlyUsedComponent.getIcon24();
      }
 else {
        imageLarge=recentlyUsedComponent.getIcon32();
      }
      component=new TalendCombinedTemplateCreationEntry(name,name,Node.class,recentlyUsedComponent,imageSmall,imageLarge);
      component.setDescription(longName);
      component.setParent(componentsDrawer);
      component.setTimestemp(recentlyUsed.getTimestamp());
      componentsDrawer.add(component);
    }
  }
}