Program: 102159
Project: 102159
Buggy source:
@SuppressWarnings("String_Node_Str") private void createPanel(Composite parent){
  CTabFolder tabFolder=WidgetFactory.createTabFolder(parent);
  CTabItem modelsTab=new CTabItem(tabFolder,SWT.NONE);
  modelsTab.setText(Messages.modelDetailsPanel_modelDetails);
  modelsTab.setToolTipText(Messages.modelDetailsPanel_modelDetailsTooltip);
  Composite modelDetailsPanel=new Composite(tabFolder,SWT.NONE);
  modelDetailsPanel.setLayout(new GridLayout(1,false));
  modelDetailsPanel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  ((GridData)modelDetailsPanel.getLayoutData()).widthHint=200;
  modelsTab.setControl(modelDetailsPanel);
  NAME_LOCATION_DESCRIPTION_PANEL: {
    Composite subPanel_1=WidgetFactory.createPanel(modelDetailsPanel,SWT.NONE,GridData.FILL_BOTH,1,2);
    subPanel_1.setLayout(new GridLayout(2,false));
    Label label=new Label(subPanel_1,SWT.NONE);
    label.setText("String_Node_Str");
    this.modelNameText=new Text(subPanel_1,SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
    this.modelNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    this.modelNameText.setBackground(subPanel_1.getBackground());
    label=new Label(subPanel_1,SWT.NONE);
    label.setText("String_Node_Str");
    this.modelLocationText=new Text(subPanel_1,SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
    this.modelLocationText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    this.modelLocationText.setBackground(subPanel_1.getBackground());
    Group descriptionGroup=WidgetFactory.createGroup(subPanel_1,i18n("String_Node_Str"),GridData.FILL_BOTH,2,1);
    this.modelDescriptionEditor=new StyledTextEditor(descriptionGroup,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.WRAP| SWT.BORDER);
    final GridData gridData=new GridData(GridData.FILL_BOTH);
    gridData.horizontalSpan=1;
    this.modelDescriptionEditor.setLayoutData(gridData);
    this.modelDescriptionEditor.getDocument().addDocumentListener(new IDocumentListener(){
      /** 
 * {@inheritDoc}
 * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
 */
      @Override public void documentAboutToBeChanged(      final DocumentEvent event){
      }
      /** 
 * {@inheritDoc}
 * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
 */
      @Override public void documentChanged(      final DocumentEvent event){
        if (selectedVdbModelEntry != null) {
          selectedVdbModelEntry.setDescription(modelDescriptionEditor.getText());
        }
      }
    }
);
    selectedVdbModelEntry=null;
    modelNameText.setText(Messages.noSelection);
    modelLocationText.setText(Messages.noSelection);
    modelDescriptionEditor.setText(EMPTY_STRING);
  }
  CTabItem bindingsTab=new CTabItem(tabFolder,SWT.NONE);
  bindingsTab.setText(Messages.modelDetailsPanel_sourceBindingDefinition);
  bindingsTab.setToolTipText(Messages.modelDetailsPanel_sourceBindingDefinitionTooltip);
  Composite sourceBindingsGroup=new Composite(tabFolder,SWT.NONE);
  sourceBindingsGroup.setLayout(new GridLayout(2,false));
  sourceBindingsGroup.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  bindingsTab.setControl(sourceBindingsGroup);
  SOURCE_BINDING_PANEL: {
    Composite subPanel_1=WidgetFactory.createPanel(sourceBindingsGroup,SWT.NONE,GridData.FILL_BOTH,2,4);
    subPanel_1.setLayout(new GridLayout(4,false));
    multiSourceCB=WidgetFactory.createButton(subPanel_1,Messages.modelDetailsPanel_multiSourceLabel,SWT.NONE,1,SWT.CHECK);
    multiSourceCB.setToolTipText(Messages.modelDetailsPanel_multiSourceCheckBoxTooltip);
    multiSourceCB.addSelectionListener(new SelectionListener(){
      @Override public void widgetSelected(      SelectionEvent e){
        if (selectedVdbModelEntry != null) {
          selectedVdbModelEntry.getSourceInfo().setIsMultiSource(multiSourceCB.getSelection());
        }
        refreshModelDetails();
      }
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
    }
);
    addColumnCB=WidgetFactory.createButton(subPanel_1,Messages.modelDetailsPanel_addColumnLabel + "String_Node_Str",SWT.NONE,1,SWT.CHECK);
    addColumnCB.setToolTipText(Messages.modelDetailsPanel_addColumnCheckBoxTooltip);
    addColumnCB.addSelectionListener(new SelectionListener(){
      @Override public void widgetSelected(      SelectionEvent e){
        if (selectedVdbModelEntry != null) {
          selectedVdbModelEntry.getSourceInfo().setAddColumn(addColumnCB.getSelection());
        }
        refreshModelDetails();
      }
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
    }
);
    columnAliaslabel=new Label(subPanel_1,SWT.NONE);
    columnAliaslabel.setText("String_Node_Str");
    columnAliaslabel.setToolTipText(Messages.modelDetailsPanel_columnAliaslabelTooltip);
    columnAliasText=new Text(subPanel_1,SWT.BORDER | SWT.SINGLE);
    columnAliasText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    columnAliasText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      ModifyEvent e){
        selectedVdbModelEntry.getSourceInfo().setColumnAlias(columnAliasText.getText());
      }
    }
);
    Composite leftToolbarPanel=new Composite(sourceBindingsGroup,SWT.NONE);
    GridLayout tbGL=new GridLayout();
    tbGL.marginHeight=0;
    tbGL.marginWidth=0;
    tbGL.verticalSpacing=2;
    leftToolbarPanel.setLayout(tbGL);
    GridData ltpGD=new GridData(GridData.FILL_VERTICAL);
    ltpGD.heightHint=100;
    leftToolbarPanel.setLayoutData(ltpGD);
    addButton=new Button(leftToolbarPanel,SWT.PUSH);
    addButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.ADD));
    addButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    addButton.setEnabled(false);
    addButton.setToolTipText(Messages.modelDetailsPanel_addButtonTooltip);
    addButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        int numSources=selectedVdbModelEntry.getSourceInfo().getSources().size();
        String newName="String_Node_Str" + numSources;
        selectedVdbModelEntry.getSourceInfo().add(newName,"String_Node_Str","String_Node_Str");
        refreshModelDetails();
      }
    }
);
    deleteButton=new Button(leftToolbarPanel,SWT.PUSH);
    deleteButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.DELETE));
    deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    deleteButton.setEnabled(false);
    deleteButton.setToolTipText(Messages.modelDetailsPanel_deleteButtonTooltip);
    deleteButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        IStructuredSelection selection=(IStructuredSelection)bindingsViewer.getSelection();
        for (        Object obj : selection.toArray()) {
          if (obj instanceof VdbSource) {
            selectedVdbModelEntry.getSourceInfo().removeSource((VdbSource)obj);
            refreshModelDetails();
          }
        }
      }
    }
);
    BINDING_TABLE: {
      Table table=new Table(sourceBindingsGroup,SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
      table.setHeaderVisible(true);
      table.setLinesVisible(true);
      table.setLayout(new TableLayout());
      GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true);
      table.setLayoutData(gd);
      bindingsViewer=new TableViewer(table);
      bindingsViewer.getControl().setLayoutData(gd);
      TableViewerColumn column=new TableViewerColumn(bindingsViewer,SWT.LEFT);
      column.getColumn().setText(Messages.modelDetailsPanel_sourceNameLabel + "String_Node_Str");
      column.setEditingSupport(new SourceNameTextEditingSupport(bindingsViewer));
      column.setLabelProvider(new BindingDataLabelProvider(0));
      column.getColumn().pack();
      column=new TableViewerColumn(bindingsViewer,SWT.LEFT);
      column.getColumn().setText(Messages.modelDetailsPanel_translatorNameLabel + "String_Node_Str");
      column.setEditingSupport(new TranslatorEditingSupport(bindingsViewer,vdbEditor.getVdb().getFile()));
      column.setLabelProvider(new BindingDataLabelProvider(1));
      column.getColumn().pack();
      column=new TableViewerColumn(bindingsViewer,SWT.LEFT);
      column.getColumn().setText(Messages.modelDetailsPanel_jndiNameLabel + "String_Node_Str");
      column.setEditingSupport(new JndiEditingSupport(bindingsViewer,vdbEditor.getVdb().getFile()));
      column.setLabelProvider(new BindingDataLabelProvider(2));
      column.getColumn().pack();
      bindingsViewer.addSelectionChangedListener(new ISelectionChangedListener(){
        @Override public void selectionChanged(        SelectionChangedEvent event){
          IStructuredSelection sel=(IStructuredSelection)event.getSelection();
          if (sel.isEmpty()) {
            deleteButton.setEnabled(false);
          }
 else           if (selectedVdbModelEntry.getSourceInfo().isMultiSource()) {
            boolean enable=true;
            Object[] objs=sel.toArray();
            for (            Object obj : objs) {
              if (!(obj instanceof VdbSource)) {
                enable=false;
                break;
              }
            }
            if (objs.length == 0) {
              enable=false;
            }
            deleteButton.setEnabled(enable);
          }
        }
      }
);
    }
  }
  tabFolder.setSelection(0);
  multiSourceCB.setEnabled(false);
  addColumnCB.setEnabled(false);
  columnAliasText.setEnabled(false);
  addButton.setEnabled(false);
  deleteButton.setEnabled(false);
  columnAliaslabel.setEnabled(false);
  columnAliasText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void createPanel(Composite parent){
  CTabFolder tabFolder=WidgetFactory.createTabFolder(parent);
  CTabItem modelsTab=new CTabItem(tabFolder,SWT.NONE);
  modelsTab.setText(Messages.modelDetailsPanel_modelDetails);
  modelsTab.setToolTipText(Messages.modelDetailsPanel_modelDetailsTooltip);
  Composite modelDetailsPanel=new Composite(tabFolder,SWT.NONE);
  modelDetailsPanel.setLayout(new GridLayout(1,false));
  modelDetailsPanel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  ((GridData)modelDetailsPanel.getLayoutData()).widthHint=200;
  modelsTab.setControl(modelDetailsPanel);
  NAME_LOCATION_DESCRIPTION_PANEL: {
    Composite subPanel_1=WidgetFactory.createPanel(modelDetailsPanel,SWT.NONE,GridData.FILL_BOTH,1,2);
    subPanel_1.setLayout(new GridLayout(2,false));
    Label label=new Label(subPanel_1,SWT.NONE);
    label.setText("String_Node_Str");
    this.modelNameText=new Text(subPanel_1,SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
    this.modelNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    this.modelNameText.setBackground(subPanel_1.getBackground());
    label=new Label(subPanel_1,SWT.NONE);
    label.setText("String_Node_Str");
    this.modelLocationText=new Text(subPanel_1,SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
    this.modelLocationText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    this.modelLocationText.setBackground(subPanel_1.getBackground());
    Group descriptionGroup=WidgetFactory.createGroup(subPanel_1,i18n("String_Node_Str"),GridData.FILL_BOTH,2,1);
    this.modelDescriptionEditor=new StyledTextEditor(descriptionGroup,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.WRAP| SWT.BORDER);
    final GridData gridData=new GridData(GridData.FILL_BOTH);
    gridData.horizontalSpan=1;
    this.modelDescriptionEditor.setLayoutData(gridData);
    this.modelDescriptionEditor.getDocument().addDocumentListener(new IDocumentListener(){
      /** 
 * {@inheritDoc}
 * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
 */
      @Override public void documentAboutToBeChanged(      final DocumentEvent event){
      }
      /** 
 * {@inheritDoc}
 * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
 */
      @Override public void documentChanged(      final DocumentEvent event){
        if (selectedVdbModelEntry != null) {
          selectedVdbModelEntry.setDescription(modelDescriptionEditor.getText());
        }
      }
    }
);
    selectedVdbModelEntry=null;
    modelNameText.setText(Messages.noSelection);
    modelLocationText.setText(Messages.noSelection);
    modelDescriptionEditor.setText(EMPTY_STRING);
  }
  CTabItem bindingsTab=new CTabItem(tabFolder,SWT.NONE);
  bindingsTab.setText(Messages.modelDetailsPanel_sourceBindingDefinition);
  bindingsTab.setToolTipText(Messages.modelDetailsPanel_sourceBindingDefinitionTooltip);
  Composite sourceBindingsGroup=new Composite(tabFolder,SWT.NONE);
  sourceBindingsGroup.setLayout(new GridLayout(1,false));
  sourceBindingsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
  bindingsTab.setControl(sourceBindingsGroup);
  SOURCE_BINDING_PANEL: {
    Composite subPanel_1=WidgetFactory.createPanel(sourceBindingsGroup,SWT.NONE,GridData.FILL_HORIZONTAL,1,4);
    subPanel_1.setLayout(new GridLayout(4,false));
    multiSourceCB=WidgetFactory.createButton(subPanel_1,Messages.modelDetailsPanel_multiSourceLabel,SWT.NONE,1,SWT.CHECK);
    multiSourceCB.setToolTipText(Messages.modelDetailsPanel_multiSourceCheckBoxTooltip);
    multiSourceCB.addSelectionListener(new SelectionListener(){
      @Override public void widgetSelected(      SelectionEvent e){
        if (selectedVdbModelEntry != null) {
          selectedVdbModelEntry.getSourceInfo().setIsMultiSource(multiSourceCB.getSelection());
        }
        refreshModelDetails();
      }
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
    }
);
    addColumnCB=WidgetFactory.createButton(subPanel_1,Messages.modelDetailsPanel_addColumnLabel + "String_Node_Str",SWT.NONE,1,SWT.CHECK);
    addColumnCB.setToolTipText(Messages.modelDetailsPanel_addColumnCheckBoxTooltip);
    addColumnCB.addSelectionListener(new SelectionListener(){
      @Override public void widgetSelected(      SelectionEvent e){
        if (selectedVdbModelEntry != null) {
          selectedVdbModelEntry.getSourceInfo().setAddColumn(addColumnCB.getSelection());
        }
        refreshModelDetails();
      }
      @Override public void widgetDefaultSelected(      SelectionEvent e){
      }
    }
);
    columnAliaslabel=new Label(subPanel_1,SWT.NONE);
    columnAliaslabel.setText("String_Node_Str");
    columnAliaslabel.setToolTipText(Messages.modelDetailsPanel_columnAliaslabelTooltip);
    columnAliasText=new Text(subPanel_1,SWT.BORDER | SWT.SINGLE);
    columnAliasText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    columnAliasText.addModifyListener(new ModifyListener(){
      @Override public void modifyText(      ModifyEvent e){
        selectedVdbModelEntry.getSourceInfo().setColumnAlias(columnAliasText.getText());
      }
    }
);
    Composite lowerPanel=WidgetFactory.createPanel(sourceBindingsGroup,SWT.NONE,GridData.FILL_BOTH,2,1);
    lowerPanel.setLayout(new GridLayout(2,false));
    GridData gridData=new GridData(GridData.FILL_BOTH | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);
    gridData.grabExcessHorizontalSpace=true;
    gridData.grabExcessVerticalSpace=true;
    lowerPanel.setLayoutData(gridData);
    Composite leftToolbarPanel=WidgetFactory.createPanel(lowerPanel,SWT.NONE,GridData.FILL_VERTICAL);
    GridLayout tbGL=new GridLayout();
    tbGL.marginHeight=0;
    tbGL.marginWidth=0;
    tbGL.verticalSpacing=2;
    leftToolbarPanel.setLayout(tbGL);
    addButton=new Button(leftToolbarPanel,SWT.PUSH);
    addButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.ADD));
    addButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    addButton.setEnabled(false);
    addButton.setToolTipText(Messages.modelDetailsPanel_addButtonTooltip);
    addButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        int numSources=selectedVdbModelEntry.getSourceInfo().getSources().size();
        boolean added=false;
        while (!added) {
          String newName="String_Node_Str" + numSources;
          added=selectedVdbModelEntry.getSourceInfo().add(newName,"String_Node_Str","String_Node_Str");
          if (!added)           numSources++;
        }
        refreshModelDetails();
      }
    }
);
    deleteButton=new Button(leftToolbarPanel,SWT.PUSH);
    deleteButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.DELETE));
    deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    deleteButton.setEnabled(false);
    deleteButton.setToolTipText(Messages.modelDetailsPanel_deleteButtonTooltip);
    deleteButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        IStructuredSelection selection=(IStructuredSelection)bindingsViewer.getSelection();
        for (        Object obj : selection.toArray()) {
          if (obj instanceof VdbSource) {
            selectedVdbModelEntry.getSourceInfo().removeSource((VdbSource)obj);
            refreshModelDetails();
          }
        }
      }
    }
);
    BINDING_TABLE: {
      int tableStyle=SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER;
      bindingsViewer=new TableViewer(lowerPanel,tableStyle);
      Table table=bindingsViewer.getTable();
      table.setLayout(new TableLayout());
      final GridData tblGD=new GridData(GridData.FILL_BOTH);
      tblGD.grabExcessHorizontalSpace=true;
      tblGD.grabExcessVerticalSpace=true;
      table.setLayoutData(tblGD);
      table.setHeaderVisible(true);
      table.setLinesVisible(true);
      TableViewerColumn column=new TableViewerColumn(bindingsViewer,SWT.LEFT);
      column.getColumn().setText(Messages.modelDetailsPanel_sourceNameLabel + "String_Node_Str");
      column.setEditingSupport(new SourceNameTextEditingSupport(bindingsViewer));
      column.setLabelProvider(new BindingDataLabelProvider(0));
      column.getColumn().pack();
      column=new TableViewerColumn(bindingsViewer,SWT.LEFT);
      column.getColumn().setText(Messages.modelDetailsPanel_translatorNameLabel + "String_Node_Str");
      column.setEditingSupport(new TranslatorEditingSupport(bindingsViewer,vdbEditor.getVdb().getFile()));
      column.setLabelProvider(new BindingDataLabelProvider(1));
      column.getColumn().pack();
      column=new TableViewerColumn(bindingsViewer,SWT.LEFT);
      column.getColumn().setText(Messages.modelDetailsPanel_jndiNameLabel + "String_Node_Str");
      column.setEditingSupport(new JndiEditingSupport(bindingsViewer,vdbEditor.getVdb().getFile()));
      column.setLabelProvider(new BindingDataLabelProvider(2));
      column.getColumn().pack();
      bindingsViewer.addSelectionChangedListener(new ISelectionChangedListener(){
        @Override public void selectionChanged(        SelectionChangedEvent event){
          IStructuredSelection sel=(IStructuredSelection)event.getSelection();
          if (sel.isEmpty()) {
            deleteButton.setEnabled(false);
          }
 else           if (selectedVdbModelEntry.getSourceInfo().isMultiSource()) {
            boolean enable=true;
            Object[] objs=sel.toArray();
            for (            Object obj : objs) {
              if (!(obj instanceof VdbSource)) {
                enable=false;
                break;
              }
            }
            if (objs.length == 0) {
              enable=false;
            }
            deleteButton.setEnabled(enable);
          }
        }
      }
);
    }
  }
  tabFolder.setSelection(0);
  multiSourceCB.setEnabled(false);
  addColumnCB.setEnabled(false);
  columnAliasText.setEnabled(false);
  addButton.setEnabled(false);
  deleteButton.setEnabled(false);
  columnAliaslabel.setEnabled(false);
  columnAliasText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
}