Program: 121752
Project: 121752
Buggy source:
/** 
 * initialization of the available components.
 * @param codeLanguage
 * @param jetBeans
 * @param codePart
 * @param component
 */
private static void initComponent(ECodeLanguage codeLanguage,List<JetBean> jetBeans,ECodePart codePart,IComponent component){
  if (component.getAvailableCodeParts().contains(codePart)) {
    IComponentFileNaming fileNamingInstance=ComponentsFactoryProvider.getFileNamingInstance();
    String templateURI=component.getPathSource() + TemplateUtil.DIR_SEP + component.getName()+ TemplateUtil.DIR_SEP+ fileNamingInstance.getJetFileName(component,codeLanguage.getExtension(),codePart);
    String componentsPath=IComponentsFactory.COMPONENTS_LOCATION;
    IBrandingService breaningService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
    if (breaningService.isPoweredOnlyCamel()) {
      componentsPath=IComponentsFactory.CAMEL_COMPONENTS_LOCATION;
    }
    if (component instanceof EmfComponent) {
      componentsPath=((EmfComponent)component).getSourceBundleName();
    }
    JetBean jetBean=new JetBean(componentsPath,templateURI,component.getName(),component.getVersion(),codeLanguage.getName(),codePart.getName());
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str",CorePlugin.PLUGIN_ID);
    jetBean.addClassPath("String_Node_Str",CodeGeneratorActivator.PLUGIN_ID);
    jetBean.addClassPath("String_Node_Str",CommonsPlugin.PLUGIN_ID);
    for (    String pluginDependency : component.getPluginDependencies()) {
      jetBean.addClassPath(pluginDependency.toUpperCase().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str",pluginDependency);
    }
    String familyName=component.getOriginalFamilyName();
    if (familyName.contains("String_Node_Str")) {
      familyName=component.getOriginalFamilyName().substring(0,component.getOriginalFamilyName().indexOf("String_Node_Str"));
    }
    jetBean.setFamily(StringUtils.removeSpecialCharsForPackage(familyName.toLowerCase()));
    if (component.getPluginExtension() != null) {
      jetBean.addClassPath("String_Node_Str" + component.getPluginExtension().toUpperCase().replaceAll("String_Node_Str","String_Node_Str"),component.getPluginExtension());
      jetBean.setClassLoader(ExternalNodesFactory.getInstance(component.getPluginExtension()).getClass().getClassLoader());
    }
 else {
      jetBean.setClassLoader(new CodeGeneratorEmittersPoolFactory().getClass().getClassLoader());
    }
    jetBeans.add(jetBean);
  }
  if (codePart.compareTo(ECodePart.MAIN) == 0) {
    if (component.getAvailableCodeParts().contains(ECodePart.BEGIN)) {
      initComponent(codeLanguage,jetBeans,ECodePart.BEGIN,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.END)) {
      initComponent(codeLanguage,jetBeans,ECodePart.END,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.DF)) {
      initComponent(codeLanguage,jetBeans,ECodePart.DF,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.MAP)) {
      initComponent(codeLanguage,jetBeans,ECodePart.MAP,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.REDUCE)) {
      initComponent(codeLanguage,jetBeans,ECodePart.REDUCE,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.CONFIG)) {
      initComponent(codeLanguage,jetBeans,ECodePart.CONFIG,component);
    }
  }
}

Fixed version (ground truth):
/** 
 * initialization of the available components.
 * @param codeLanguage
 * @param jetBeans
 * @param codePart
 * @param component
 */
private static void initComponent(ECodeLanguage codeLanguage,List<JetBean> jetBeans,ECodePart codePart,IComponent component){
  if (component.getAvailableCodeParts().contains(codePart)) {
    IComponentFileNaming fileNamingInstance=ComponentsFactoryProvider.getFileNamingInstance();
    String templateURI=component.getPathSource() + TemplateUtil.DIR_SEP + component.getName()+ TemplateUtil.DIR_SEP+ fileNamingInstance.getJetFileName(component,codeLanguage.getExtension(),codePart);
    String componentsPath=IComponentsFactory.COMPONENTS_LOCATION;
    IBrandingService breaningService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
    if (breaningService.isPoweredOnlyCamel()) {
      componentsPath=IComponentsFactory.CAMEL_COMPONENTS_LOCATION;
    }
    if (component instanceof EmfComponent) {
      componentsPath=((EmfComponent)component).getSourceBundleName();
    }
    JetBean jetBean=new JetBean(componentsPath,templateURI,component.getName(),component.getVersion(),codeLanguage.getName(),codePart.getName());
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str","String_Node_Str");
    jetBean.addClassPath("String_Node_Str",CorePlugin.PLUGIN_ID);
    jetBean.addClassPath("String_Node_Str",CodeGeneratorActivator.PLUGIN_ID);
    jetBean.addClassPath("String_Node_Str",CommonsPlugin.PLUGIN_ID);
    if (PluginChecker.isGEFAbstractMapLoaded()) {
      jetBean.addClassPath("String_Node_Str","String_Node_Str");
    }
    for (    String pluginDependency : component.getPluginDependencies()) {
      jetBean.addClassPath(pluginDependency.toUpperCase().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str",pluginDependency);
    }
    String familyName=component.getOriginalFamilyName();
    if (familyName.contains("String_Node_Str")) {
      familyName=component.getOriginalFamilyName().substring(0,component.getOriginalFamilyName().indexOf("String_Node_Str"));
    }
    jetBean.setFamily(StringUtils.removeSpecialCharsForPackage(familyName.toLowerCase()));
    if (component.getPluginExtension() != null) {
      jetBean.addClassPath("String_Node_Str" + component.getPluginExtension().toUpperCase().replaceAll("String_Node_Str","String_Node_Str"),component.getPluginExtension());
      jetBean.setClassLoader(ExternalNodesFactory.getInstance(component.getPluginExtension()).getClass().getClassLoader());
    }
 else {
      jetBean.setClassLoader(new CodeGeneratorEmittersPoolFactory().getClass().getClassLoader());
    }
    jetBeans.add(jetBean);
  }
  if (codePart.compareTo(ECodePart.MAIN) == 0) {
    if (component.getAvailableCodeParts().contains(ECodePart.BEGIN)) {
      initComponent(codeLanguage,jetBeans,ECodePart.BEGIN,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.END)) {
      initComponent(codeLanguage,jetBeans,ECodePart.END,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.DF)) {
      initComponent(codeLanguage,jetBeans,ECodePart.DF,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.MAP)) {
      initComponent(codeLanguage,jetBeans,ECodePart.MAP,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.REDUCE)) {
      initComponent(codeLanguage,jetBeans,ECodePart.REDUCE,component);
    }
    if (component.getAvailableCodeParts().contains(ECodePart.CONFIG)) {
      initComponent(codeLanguage,jetBeans,ECodePart.CONFIG,component);
    }
  }
}