Program: 108252
Project: 108252
Buggy source:
/** 
 * Creates the design of this page along with the appropriate listeners.
 * @param parent
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  setControl(container);
  container.setLayout(new GridLayout(2,false));
  checkboxTableViewer=CheckboxTableViewer.newCheckList(container,SWT.BORDER | SWT.FULL_SELECTION);
  checkboxTableViewer.setContentProvider(new ArrayContentProvider());
  checkboxTableViewer.setCheckStateProvider(new ICheckStateProvider(){
    /** 
 * @return {@link ImportWizardModelColumn#isEnabled()} 
 */
    @Override public boolean isChecked(    Object column){
      return ((ImportWizardModelColumn)column).isEnabled();
    }
    /** 
 * No column should be grayed out 
 */
    @Override public boolean isGrayed(    Object column){
      return false;
    }
  }
);
  checkboxTableViewer.addCheckStateListener(new ICheckStateListener(){
    /** 
 * Sets the enabled status for the given item Using   {@link ImportWizardModelColumn#setEnabled(boolean)} thismethod will set the enabled flag for the given column. Furthermore it makes sure the page is marked as complete once at least one item is selected.
 */
    @Override public void checkStateChanged(    CheckStateChangedEvent event){
      setPageComplete(false);
      ((ImportWizardModelColumn)event.getElement()).setEnabled(event.getChecked());
      for (      ImportWizardModelColumn column : wizardImport.getData().getWizardColumns()) {
        if (column.isEnabled()) {
          setPageComplete(true);
          return;
        }
      }
    }
  }
);
  table=checkboxTableViewer.getTable();
  table.setHeaderVisible(true);
  table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
  table.addSelectionListener(new SelectionAdapter(){
    /** 
 * Makes the buttons for column reordering (un)clickable This checks the current selection and will enable and/or disable the   {@link #btnUp} and {@link #btnDown} if either the first orlast item is currently selected.
 */
    @Override public void widgetSelected(    SelectionEvent e){
      if (table.getSelectionIndex() == 0) {
        btnUp.setEnabled(false);
      }
 else {
        btnUp.setEnabled(true);
      }
      if (table.getSelectionIndex() == table.getItemCount() - 1) {
        btnDown.setEnabled(false);
      }
 else {
        btnDown.setEnabled(true);
      }
    }
  }
);
  tableViewerColumnEnabled=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnEnabled.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Cells within this column should always be empty 
 */
    @Override public String getText(    Object element){
      return null;
    }
  }
);
  tblclmnEnabled=tableViewerColumnEnabled.getColumn();
  tblclmnEnabled.setToolTipText("String_Node_Str");
  tblclmnEnabled.setText("String_Node_Str");
  tblclmnEnabled.setWidth(40);
  tblclmnEnabled.addSelectionListener(new ColumnEnabledSelectionListener());
  tableViewerColumnName=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnName.setEditingSupport(new NameEditingSupport(checkboxTableViewer));
  tableViewerColumnName.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Gets name of cells from   {@link ImportColumn#getAliasName()}This also makes sure that all column names are unique using  {@link #uniqueColumnNames()}. In case there are duplicates it sets an error message.
 */
    @Override public String getText(    Object element){
      if (!uniqueColumnNames()) {
        setErrorMessage("String_Node_Str");
        setPageComplete(false);
      }
 else {
        setErrorMessage(null);
        setPageComplete(true);
      }
      ImportWizardModelColumn column=(ImportWizardModelColumn)element;
      return column.getColumn().getAliasName();
    }
  }
);
  tblclmnName=tableViewerColumnName.getColumn();
  tblclmnName.setToolTipText("String_Node_Str");
  tblclmnName.setWidth(300);
  tblclmnName.setText("String_Node_Str");
  tableViewerColumnDatatype=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnDatatype.setEditingSupport(new DatatypeEditingSupport(checkboxTableViewer));
  tableViewerColumnDatatype.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Gets string representation for given datatype of column Internally it makes use of   {@link ImportColumn#getDataType()}.
 */
    @Override public String getText(    Object element){
      DataType<?> datatype=((ImportWizardModelColumn)element).getColumn().getDataType();
      for (      DataTypeDescription<?> description : DataType.list()) {
        if (description.newInstance().getClass() == datatype.getClass()) {
          return description.getLabel();
        }
      }
      return null;
    }
  }
);
  tblclmnDatatype=tableViewerColumnDatatype.getColumn();
  tblclmnDatatype.setToolTipText("String_Node_Str");
  tblclmnDatatype.setWidth(120);
  tblclmnDatatype.setText("String_Node_Str");
  tableViewerColumnFormat=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnFormat.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Returns format string of datatype for column This retrieves the used format string of the chosen datatype for each column.
 * @note In case of simple datatypes without a format specifier anempty string is returned.
 * @param element Column in question
 */
    @Override public String getText(    Object element){
      DataType<?> column=((ImportWizardModelColumn)element).getColumn().getDataType();
      if (column instanceof DataTypeWithFormat) {
        return ((DataTypeWithFormat)column).getFormat();
      }
      return "String_Node_Str";
    }
  }
);
  tblclmnFormat=tableViewerColumnFormat.getColumn();
  tblclmnFormat.setWidth(120);
  tblclmnFormat.setToolTipText("String_Node_Str");
  tblclmnFormat.setWidth(100);
  tblclmnFormat.setText("String_Node_Str");
  btnUp=new Button(container,SWT.NONE);
  btnUp.setText("String_Node_Str");
  btnUp.setImage(wizardImport.getController().getResources().getImage("String_Node_Str"));
  btnUp.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,1,1));
  btnUp.setEnabled(false);
  btnUp.addSelectionListener(new SelectionAdapter(){
    /** 
 * Swaps the current element with the one above This makes also sure that the button is disabled once the top is reached by notifying the appropriate selection listener.
 */
    @Override public void widgetSelected(    SelectionEvent e){
      int current=table.getSelectionIndex();
      if (current > 0) {
        List<ImportWizardModelColumn> columns=wizardImport.getData().getWizardColumns();
        Collections.swap(columns,current,current - 1);
        checkboxTableViewer.setInput(columns);
        table.notifyListeners(SWT.Selection,null);
      }
    }
  }
);
  btnDown=new Button(container,SWT.NONE);
  btnDown.setText("String_Node_Str");
  btnDown.setImage(wizardImport.getController().getResources().getImage("String_Node_Str"));
  btnDown.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,1,1));
  btnDown.setEnabled(false);
  btnDown.addSelectionListener(new SelectionAdapter(){
    /** 
 * Swaps the current element with the one below This makes also sure that the button is disabled once the bottom is reached by notifying the appropriate selection listener.
 */
    @Override public void widgetSelected(    SelectionEvent e){
      int current=table.getSelectionIndex();
      if (current < table.getItemCount() - 1) {
        List<ImportWizardModelColumn> columns=wizardImport.getData().getWizardColumns();
        Collections.swap(columns,current,current + 1);
        checkboxTableViewer.setInput(columns);
        table.notifyListeners(SWT.Selection,null);
      }
    }
  }
);
  setPageComplete(false);
}

Fixed version (ground truth):
/** 
 * Creates the design of this page along with the appropriate listeners.
 * @param parent
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  setControl(container);
  container.setLayout(new GridLayout(2,false));
  checkboxTableViewer=CheckboxTableViewer.newCheckList(container,SWT.BORDER | SWT.FULL_SELECTION);
  checkboxTableViewer.setContentProvider(new ArrayContentProvider());
  checkboxTableViewer.setCheckStateProvider(new ICheckStateProvider(){
    /** 
 * @return {@link ImportWizardModelColumn#isEnabled()} 
 */
    @Override public boolean isChecked(    Object column){
      return ((ImportWizardModelColumn)column).isEnabled();
    }
    /** 
 * No column should be grayed out 
 */
    @Override public boolean isGrayed(    Object column){
      return false;
    }
  }
);
  checkboxTableViewer.addCheckStateListener(new ICheckStateListener(){
    /** 
 * Sets the enabled status for the given item Using   {@link ImportWizardModelColumn#setEnabled(boolean)} thismethod will set the enabled flag for the given column. Furthermore it makes sure the page is marked as complete once at least one item is selected.
 */
    @Override public void checkStateChanged(    CheckStateChangedEvent event){
      ((ImportWizardModelColumn)event.getElement()).setEnabled(event.getChecked());
      check();
    }
  }
);
  table=checkboxTableViewer.getTable();
  table.setHeaderVisible(true);
  table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,1));
  table.addSelectionListener(new SelectionAdapter(){
    /** 
 * Makes the buttons for column reordering (un)clickable This checks the current selection and will enable and/or disable the   {@link #btnUp} and {@link #btnDown} if either the first orlast item is currently selected.
 */
    @Override public void widgetSelected(    SelectionEvent e){
      if (table.getSelectionIndex() == 0) {
        btnUp.setEnabled(false);
      }
 else {
        btnUp.setEnabled(true);
      }
      if (table.getSelectionIndex() == table.getItemCount() - 1) {
        btnDown.setEnabled(false);
      }
 else {
        btnDown.setEnabled(true);
      }
    }
  }
);
  tableViewerColumnEnabled=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnEnabled.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Cells within this column should always be empty 
 */
    @Override public String getText(    Object element){
      return null;
    }
  }
);
  tblclmnEnabled=tableViewerColumnEnabled.getColumn();
  tblclmnEnabled.setToolTipText("String_Node_Str");
  tblclmnEnabled.setText("String_Node_Str");
  tblclmnEnabled.setWidth(40);
  tblclmnEnabled.addSelectionListener(new ColumnEnabledSelectionListener());
  tableViewerColumnName=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnName.setEditingSupport(new NameEditingSupport(checkboxTableViewer));
  tableViewerColumnName.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Gets name of cells from   {@link ImportColumn#getAliasName()}This also makes sure that all column names are unique using  {@link #uniqueColumnNames()}. In case there are duplicates it sets an error message.
 */
    @Override public String getText(    Object element){
      ImportWizardModelColumn column=(ImportWizardModelColumn)element;
      return column.getColumn().getAliasName();
    }
  }
);
  tblclmnName=tableViewerColumnName.getColumn();
  tblclmnName.setToolTipText("String_Node_Str");
  tblclmnName.setWidth(300);
  tblclmnName.setText("String_Node_Str");
  tableViewerColumnDatatype=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnDatatype.setEditingSupport(new DatatypeEditingSupport(checkboxTableViewer));
  tableViewerColumnDatatype.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Gets string representation for given datatype of column Internally it makes use of   {@link ImportColumn#getDataType()}.
 */
    @Override public String getText(    Object element){
      DataType<?> datatype=((ImportWizardModelColumn)element).getColumn().getDataType();
      for (      DataTypeDescription<?> description : DataType.list()) {
        if (description.newInstance().getClass() == datatype.getClass()) {
          return description.getLabel();
        }
      }
      return null;
    }
  }
);
  tblclmnDatatype=tableViewerColumnDatatype.getColumn();
  tblclmnDatatype.setToolTipText("String_Node_Str");
  tblclmnDatatype.setWidth(120);
  tblclmnDatatype.setText("String_Node_Str");
  tableViewerColumnFormat=new TableViewerColumn(checkboxTableViewer,SWT.NONE);
  tableViewerColumnFormat.setLabelProvider(new ColumnLabelProvider(){
    /** 
 * Returns format string of datatype for column This retrieves the used format string of the chosen datatype for each column.
 * @note In case of simple datatypes without a format specifier anempty string is returned.
 * @param element Column in question
 */
    @Override public String getText(    Object element){
      DataType<?> column=((ImportWizardModelColumn)element).getColumn().getDataType();
      if (column instanceof DataTypeWithFormat) {
        return ((DataTypeWithFormat)column).getFormat();
      }
      return "String_Node_Str";
    }
  }
);
  tblclmnFormat=tableViewerColumnFormat.getColumn();
  tblclmnFormat.setWidth(120);
  tblclmnFormat.setToolTipText("String_Node_Str");
  tblclmnFormat.setWidth(100);
  tblclmnFormat.setText("String_Node_Str");
  btnUp=new Button(container,SWT.NONE);
  btnUp.setText("String_Node_Str");
  btnUp.setImage(wizardImport.getController().getResources().getImage("String_Node_Str"));
  btnUp.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,1,1));
  btnUp.setEnabled(false);
  btnUp.addSelectionListener(new SelectionAdapter(){
    /** 
 * Swaps the current element with the one above This makes also sure that the button is disabled once the top is reached by notifying the appropriate selection listener.
 */
    @Override public void widgetSelected(    SelectionEvent e){
      int current=table.getSelectionIndex();
      if (current > 0) {
        List<ImportWizardModelColumn> columns=wizardImport.getData().getWizardColumns();
        Collections.swap(columns,current,current - 1);
        checkboxTableViewer.setInput(columns);
        table.notifyListeners(SWT.Selection,null);
      }
    }
  }
);
  btnDown=new Button(container,SWT.NONE);
  btnDown.setText("String_Node_Str");
  btnDown.setImage(wizardImport.getController().getResources().getImage("String_Node_Str"));
  btnDown.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,1,1));
  btnDown.setEnabled(false);
  btnDown.addSelectionListener(new SelectionAdapter(){
    /** 
 * Swaps the current element with the one below This makes also sure that the button is disabled once the bottom is reached by notifying the appropriate selection listener.
 */
    @Override public void widgetSelected(    SelectionEvent e){
      int current=table.getSelectionIndex();
      if (current < table.getItemCount() - 1) {
        List<ImportWizardModelColumn> columns=wizardImport.getData().getWizardColumns();
        Collections.swap(columns,current,current + 1);
        checkboxTableViewer.setInput(columns);
        table.notifyListeners(SWT.Selection,null);
      }
    }
  }
);
  setPageComplete(false);
}