Program: 118264
Project: 118264
Buggy source:
@Override public void initializeDefaultPreferences(){
  IPreferenceStore store=DesignerPlugin.getDefault().getPreferenceStore();
  String logPath=Platform.getLogFileLocation().toOSString();
  int lastIndex=logPath.lastIndexOf(File.separatorChar);
  logPath=TalendTextUtils.addQuotes(logPath.substring(0,lastIndex));
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_LABEL,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_HINT,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_CONNECTION_FORMAT,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_HINT_USED,false);
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_DISPLAY,false);
  store.setDefault(TalendDesignerPrefConstants.USE_REPOSITORY_NAME,true);
  store.setDefault(TalendEditorPaletteFactory.PALETTE_STATE,FlyoutPaletteComposite.STATE_PINNED_OPEN);
  store.setDefault(TalendDesignerPrefConstants.COMP_DEFAULT_FILE_DIR,Platform.getLocation().toPortableString());
  store.setDefault(TalendDesignerPrefConstants.PRODUCT_ROOT_DIR,Platform.getLocation().removeLastSegments(1).toPortableString());
  Bundle refBundle=Platform.getBundle("String_Node_Str");
  if (refBundle != null) {
    try {
      String dirPath=FileLocator.getBundleFile(refBundle).getPath().replace(File.separatorChar,'/');
      store.setDefault(TalendDesignerPrefConstants.DQ_REPORTING_BUNDLE_DIR,dirPath);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  store.setDefault(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK,false);
  store.setDefault(TalendDesignerPrefConstants.LARGE_ICONS_SIZE,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.SCHEMA_OPTIONS,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.VIEW_OPTIONS,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DISPLAY_SUBJOBS,true);
  store.setDefault(TalendDesignerPrefConstants.COMPONENT_ASSIST,true);
  store.setDefault(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB,false);
  store.setDefault(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.PROPERTY_TYPE.getName(),EmfComponent.BUILTIN);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_REALTIME_STATS.getName(),false);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_RUNTIME_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_USER_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_USER_WARNING.getName(),true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILE_PATH.getName(),logPath);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILENAME_LOGS.getName(),TalendTextUtils.addQuotes(DEFAULT_LOGS_FILE_NAME));
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILENAME_STATS.getName(),TalendTextUtils.addQuotes(DEFAULT_STATS_FILE_NAME));
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILENAME_METTER.getName(),TalendTextUtils.addQuotes(DEFAULT_METER_FILE_NAME));
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.PROPERTY_TYPE.getName(),EmfComponent.BUILTIN);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_REALTIME_STATS.getName(),false);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_RUNTIME_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_USER_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_USER_WARNING.getName(),true);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILE_PATH.getName(),logPath);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILENAME_LOGS.getName(),TalendTextUtils.addQuotes(DEFAULT_LOGS_FILE_NAME));
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILENAME_STATS.getName(),TalendTextUtils.addQuotes(DEFAULT_STATS_FILE_NAME));
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILENAME_METTER.getName(),TalendTextUtils.addQuotes(DEFAULT_METER_FILE_NAME));
  store.setDefault(IRepositoryPrefConstants.MANUALLY_REFRESH,false);
  store.setDefault(IRepositoryPrefConstants.CREATING_REFRESH,true);
  store.setDefault(IRepositoryPrefConstants.SAVING_REFRESH,true);
  store.setDefault(IRepositoryPrefConstants.DELETING_REFRESH,true);
  store.setDefault(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED,true);
  store.setDefault(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT,15);
  store.setDefault(ITalendCorePrefConstants.ADD_USER_ROUTINES,true);
  store.setDefault(ITalendCorePrefConstants.ADD_SYSTEM_ROUTINES,true);
  store.setDefault(IRepositoryPrefConstants.USE_EXPORT_SAVE,false);
  store.setDefault(IRepositoryPrefConstants.ADD_CLASSPATH_JAR,false);
  store.setDefault(IRepositoryPrefConstants.REBUILD_RELATIONSHIPS,false);
  store.setDefault(TalendDesignerPrefConstants.NOT_SHOW_WARNING_WHEN_DELETE_LINK_WITH_JOBLETTRIGGERLINKCOMPONENT,false);
  if (PluginChecker.isSVNProviderPluginLoaded()) {
    store.setDefault(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK,true);
    store.setDefault(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK_TIME_INTERVAL,1);
    store.setDefault(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK,true);
    store.setDefault(ITalendCorePrefConstants.AUTO_REFRESH_LOCKS,true);
    store.setDefault(ITalendCorePrefConstants.PERFORMANCE_TAC_CONNECTION_TIMEOUT,30);
  }
  store.setDefault(ITalendCorePrefConstants.NEXUS_TIMEOUT,10000);
  store.setDefault(ITalendCorePrefConstants.NEXUS_REFRESH_FREQUENCY,0);
  if (!CommonUIPlugin.isFullyHeadless()) {
    Display display=Display.getDefault();
    if (display == null) {
      display=Display.getCurrent();
    }
    if (display != null) {
      display.asyncExec(new Runnable(){
        @Override public void run(){
          IPreferenceStore store=CorePlugin.getDefault().getPreferenceStore();
          Font font=new Font(null,"String_Node_Str",10,SWT.NONE);
          PreferenceConverter.setDefault(store,TalendDesignerPrefConstants.MEMO_TEXT_FONT,font.getFontData());
          PreferenceConverter.setDefault(store,TalendDesignerPrefConstants.CONSOLT_TEXT_FONT,font.getFontData());
        }
      }
);
    }
    store.setDefault(TalendDesignerPrefConstants.EDITOR_ANTIALIASING,true);
    store.setDefault(TalendDesignerPrefConstants.EDITOR_LINESTYLE,true);
    DesignerColorUtils.initPreferenceDefault(store);
    ColorManager.initDefaultColors(store);
    store.setDefault(MetadataTypeLengthConstants.FIELD_DEFAULT_TYPE,JavaTypesManager.STRING.getId());
    store.setDefault(MetadataTypeLengthConstants.VALUE_DEFAULT_TYPE,JavaTypesManager.STRING.getId());
  }
  store.setDefault(TalendDesignerPrefConstants.PALETTE_SETTINGS_RECENTLY_USED_LIST_SIZE,12);
  store.setDefault(TalendDesignerPrefConstants.PALETTE_SETTINGS_SEARCH_FROM_HELP,true);
  store.setDefault(TalendDesignerPrefConstants.PALETTE_SETTINGS_SEARCH_RESULT_LIMIT_FROM_HELP,10);
  store.setDefault(ITalendCorePrefConstants.PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT,30);
}

Fixed version (ground truth):
@Override public void initializeDefaultPreferences(){
  IPreferenceStore store=DesignerPlugin.getDefault().getPreferenceStore();
  String logPath=Platform.getLogFileLocation().toOSString();
  int lastIndex=logPath.lastIndexOf(File.separatorChar);
  logPath=TalendTextUtils.addQuotes(logPath.substring(0,lastIndex));
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_LABEL,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_HINT,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_CONNECTION_FORMAT,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_HINT_USED,false);
  store.setDefault(TalendDesignerPrefConstants.DEFAULT_DISPLAY,false);
  store.setDefault(TalendDesignerPrefConstants.USE_REPOSITORY_NAME,true);
  store.setDefault(TalendEditorPaletteFactory.PALETTE_STATE,FlyoutPaletteComposite.STATE_PINNED_OPEN);
  store.setDefault(TalendDesignerPrefConstants.COMP_DEFAULT_FILE_DIR,Platform.getLocation().toPortableString());
  store.setDefault(TalendDesignerPrefConstants.PRODUCT_ROOT_DIR,Platform.getLocation().removeLastSegments(1).toPortableString());
  Bundle refBundle=Platform.getBundle("String_Node_Str");
  if (refBundle != null) {
    try {
      String dirPath=FileLocator.getBundleFile(refBundle).getPath().replace(File.separatorChar,'/');
      store.setDefault(TalendDesignerPrefConstants.DQ_REPORTING_BUNDLE_DIR,dirPath);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  store.setDefault(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK,false);
  store.setDefault(TalendDesignerPrefConstants.LARGE_ICONS_SIZE,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.SCHEMA_OPTIONS,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.VIEW_OPTIONS,"String_Node_Str");
  store.setDefault(TalendDesignerPrefConstants.DISPLAY_SUBJOBS,true);
  store.setDefault(TalendDesignerPrefConstants.COMPONENT_ASSIST,true);
  store.setDefault(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB,false);
  store.setDefault(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.PROPERTY_TYPE.getName(),EmfComponent.BUILTIN);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_REALTIME_STATS.getName(),false);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_RUNTIME_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_USER_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.CATCH_USER_WARNING.getName(),true);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILE_PATH.getName(),logPath);
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILENAME_LOGS.getName(),TalendTextUtils.addQuotes(DEFAULT_LOGS_FILE_NAME));
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILENAME_STATS.getName(),TalendTextUtils.addQuotes(DEFAULT_STATS_FILE_NAME));
  store.setDefault(ECodeLanguage.JAVA.toString() + "String_Node_Str" + EParameterName.FILENAME_METTER.getName(),TalendTextUtils.addQuotes(DEFAULT_METER_FILE_NAME));
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.PROPERTY_TYPE.getName(),EmfComponent.BUILTIN);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_REALTIME_STATS.getName(),false);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_RUNTIME_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_USER_ERRORS.getName(),true);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.CATCH_USER_WARNING.getName(),true);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILE_PATH.getName(),logPath);
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILENAME_LOGS.getName(),TalendTextUtils.addQuotes(DEFAULT_LOGS_FILE_NAME));
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILENAME_STATS.getName(),TalendTextUtils.addQuotes(DEFAULT_STATS_FILE_NAME));
  store.setDefault(ECodeLanguage.PERL.toString() + "String_Node_Str" + EParameterName.FILENAME_METTER.getName(),TalendTextUtils.addQuotes(DEFAULT_METER_FILE_NAME));
  store.setDefault(IRepositoryPrefConstants.MANUALLY_REFRESH,false);
  store.setDefault(IRepositoryPrefConstants.CREATING_REFRESH,true);
  store.setDefault(IRepositoryPrefConstants.SAVING_REFRESH,true);
  store.setDefault(IRepositoryPrefConstants.DELETING_REFRESH,true);
  store.setDefault(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED,true);
  store.setDefault(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT,15);
  store.setDefault(ITalendCorePrefConstants.ADD_USER_ROUTINES,true);
  store.setDefault(ITalendCorePrefConstants.ADD_SYSTEM_ROUTINES,true);
  store.setDefault(IRepositoryPrefConstants.USE_EXPORT_SAVE,false);
  store.setDefault(IRepositoryPrefConstants.ADD_CLASSPATH_JAR,false);
  store.setDefault(IRepositoryPrefConstants.REBUILD_RELATIONSHIPS,false);
  store.setDefault(TalendDesignerPrefConstants.NOT_SHOW_WARNING_WHEN_DELETE_LINK_WITH_JOBLETTRIGGERLINKCOMPONENT,false);
  if (PluginChecker.isSVNProviderPluginLoaded()) {
    store.setDefault(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK,true);
    store.setDefault(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK_TIME_INTERVAL,1);
    store.setDefault(ITalendCorePrefConstants.SVN_UPDATE_INFO_AUTO_CHECK,true);
    store.setDefault(ITalendCorePrefConstants.AUTO_REFRESH_LOCKS,true);
    store.setDefault(ITalendCorePrefConstants.PERFORMANCE_TAC_CONNECTION_TIMEOUT,5);
  }
  store.setDefault(ITalendCorePrefConstants.NEXUS_TIMEOUT,10000);
  store.setDefault(ITalendCorePrefConstants.NEXUS_REFRESH_FREQUENCY,0);
  if (!CommonUIPlugin.isFullyHeadless()) {
    Display display=Display.getDefault();
    if (display == null) {
      display=Display.getCurrent();
    }
    if (display != null) {
      display.asyncExec(new Runnable(){
        @Override public void run(){
          IPreferenceStore store=CorePlugin.getDefault().getPreferenceStore();
          Font font=new Font(null,"String_Node_Str",10,SWT.NONE);
          PreferenceConverter.setDefault(store,TalendDesignerPrefConstants.MEMO_TEXT_FONT,font.getFontData());
          PreferenceConverter.setDefault(store,TalendDesignerPrefConstants.CONSOLT_TEXT_FONT,font.getFontData());
        }
      }
);
    }
    store.setDefault(TalendDesignerPrefConstants.EDITOR_ANTIALIASING,true);
    store.setDefault(TalendDesignerPrefConstants.EDITOR_LINESTYLE,true);
    DesignerColorUtils.initPreferenceDefault(store);
    ColorManager.initDefaultColors(store);
    store.setDefault(MetadataTypeLengthConstants.FIELD_DEFAULT_TYPE,JavaTypesManager.STRING.getId());
    store.setDefault(MetadataTypeLengthConstants.VALUE_DEFAULT_TYPE,JavaTypesManager.STRING.getId());
  }
  store.setDefault(TalendDesignerPrefConstants.PALETTE_SETTINGS_RECENTLY_USED_LIST_SIZE,12);
  store.setDefault(TalendDesignerPrefConstants.PALETTE_SETTINGS_SEARCH_FROM_HELP,true);
  store.setDefault(TalendDesignerPrefConstants.PALETTE_SETTINGS_SEARCH_RESULT_LIMIT_FROM_HELP,10);
  store.setDefault(ITalendCorePrefConstants.PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT,30);
}