Program: 122633
Project: 122633
Buggy source:
@Override protected void createFieldEditors(){
  IBrandingService breaningService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  if (breaningService.isPoweredOnlyCamel()) {
    addField(new BooleanFieldEditor(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    dbConnTimeoutActive=new CheckBoxFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED,Messages.getString("String_Node_Str"),getFieldEditorParent());
    dbConnTimeoutActive.getButton().addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        checkDBTimeout();
      }
    }
);
    dbConnTimeout=new IntegerFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT,Messages.getString("String_Node_Str"),getFieldEditorParent());
    Text textControl=dbConnTimeout.getTextControl(getFieldEditorParent());
    textControl.setToolTipText(Messages.getString("String_Node_Str"));
    dbConnTimeout.setValidRange(0,Short.MAX_VALUE);
    textControl.setEnabled(getPreferenceStore().getBoolean(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED));
    addField(dbConnTimeoutActive);
    addField(dbConnTimeout);
  }
 else {
    addField(new BooleanFieldEditor(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    dbConnTimeoutActive=new CheckBoxFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED,Messages.getString("String_Node_Str"),getFieldEditorParent());
    dbConnTimeoutActive.getButton().addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        checkDBTimeout();
      }
    }
);
    dbConnTimeout=new IntegerFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT,Messages.getString("String_Node_Str"),getFieldEditorParent());
    Text textControl=dbConnTimeout.getTextControl(getFieldEditorParent());
    textControl.setToolTipText(Messages.getString("String_Node_Str"));
    dbConnTimeout.setValidRange(0,Short.MAX_VALUE);
    textControl.setEnabled(getPreferenceStore().getBoolean(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED));
    addField(dbConnTimeoutActive);
    addField(dbConnTimeout);
    addField(new BooleanFieldEditor(ITalendCorePrefConstants.ADD_USER_ROUTINES,Messages.getString("String_Node_Str"),getFieldEditorParent()));
  }
}

Fixed version (ground truth):
@Override protected void createFieldEditors(){
  IBrandingService breaningService=(IBrandingService)GlobalServiceRegister.getDefault().getService(IBrandingService.class);
  if (breaningService.isPoweredOnlyCamel()) {
    addField(new BooleanFieldEditor(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    dbConnTimeoutActive=new CheckBoxFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED,Messages.getString("String_Node_Str"),getFieldEditorParent());
    dbConnTimeoutActive.getButton().addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        checkDBTimeout();
      }
    }
);
    dbConnTimeout=new IntegerFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT,Messages.getString("String_Node_Str"),getFieldEditorParent());
    Text textControl=dbConnTimeout.getTextControl(getFieldEditorParent());
    textControl.setToolTipText(Messages.getString("String_Node_Str"));
    dbConnTimeout.setValidRange(0,Short.MAX_VALUE);
    textControl.setEnabled(getPreferenceStore().getBoolean(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED));
    addField(dbConnTimeoutActive);
    addField(dbConnTimeout);
  }
 else {
    addField(new BooleanFieldEditor(ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPERTY_CODE_CHECK,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.GENERATE_CODE_WHEN_OPEN_JOB,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.CHECK_ONLY_LAST_VERSION,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    addField(new BooleanFieldEditor(TalendDesignerPrefConstants.PROPAGATE_CONTEXT_VARIABLE,Messages.getString("String_Node_Str"),getFieldEditorParent()));
    dbConnTimeoutActive=new CheckBoxFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED,Messages.getString("String_Node_Str"),getFieldEditorParent());
    dbConnTimeoutActive.getButton().addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        checkDBTimeout();
      }
    }
);
    dbConnTimeout=new IntegerFieldEditor(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT,Messages.getString("String_Node_Str"),getFieldEditorParent());
    Text textControl=dbConnTimeout.getTextControl(getFieldEditorParent());
    textControl.setToolTipText(Messages.getString("String_Node_Str"));
    dbConnTimeout.setValidRange(0,Short.MAX_VALUE);
    textControl.setEnabled(getPreferenceStore().getBoolean(ITalendCorePrefConstants.DB_CONNECTION_TIMEOUT_ACTIVED));
    addField(dbConnTimeoutActive);
    addField(dbConnTimeout);
    addField(new BooleanFieldEditor(ITalendCorePrefConstants.ADD_USER_ROUTINES,Messages.getString("String_Node_Str"),getFieldEditorParent()));
  }
}