Program: 107970
Project: 107970
Buggy source:
/** 
 * Creates the design of this page This adds all the controls to the page along with their listeners.
 * @param parent
 * @note {@link #tablePreview} is not visible until a file is loaded.
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  setControl(container);
  container.setLayout(new GridLayout(3,false));
  lblLocation=new Label(container,SWT.NONE);
  lblLocation.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  lblLocation.setText(Resources.getMessage("String_Node_Str"));
  comboLocation=new Combo(container,SWT.READ_ONLY);
  comboLocation.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  comboLocation.addSelectionListener(new SelectionAdapter(){
    /** 
 * Reads the sheets and selects active one
 */
    @Override public void widgetSelected(    SelectionEvent arg0){
      try {
        readSheets();
      }
 catch (      IOException e) {
        setErrorMessage(Resources.getMessage("String_Node_Str"));
        return;
      }
      comboSheet.setVisible(true);
      lblSheet.setVisible(true);
      btnContainsHeader.setVisible(true);
      comboSheet.select(workbook.getActiveSheetIndex());
      comboSheet.notifyListeners(SWT.Selection,null);
    }
  }
);
  btnChoose=new Button(container,SWT.NONE);
  btnChoose.setText(Resources.getMessage("String_Node_Str"));
  btnChoose.addSelectionListener(new SelectionAdapter(){
    /** 
 * Opens a file selection dialog for Excel files Both XLS and XLSX files can be selected. If a valid file was selected, it is added to   {@link #comboLocation} when it wasn'talready there. In either case it gets preselected.
 * @see {@link Controller#actionShowOpenFileDialog(String)}
 */
    @Override public void widgetSelected(    SelectionEvent arg0){
      final String path=wizardImport.getController().actionShowOpenFileDialog(getShell(),"String_Node_Str");
      if (path == null) {
        return;
      }
      if (comboLocation.indexOf(path) == -1) {
        comboLocation.add(path,0);
      }
      comboLocation.select(comboLocation.indexOf(path));
      comboLocation.notifyListeners(SWT.Selection,null);
    }
  }
);
  lblSheet=new Label(container,SWT.NONE);
  lblSheet.setVisible(false);
  lblSheet.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  lblSheet.setText(Resources.getMessage("String_Node_Str"));
  comboSheet=new Combo(container,SWT.READ_ONLY);
  comboSheet.setVisible(false);
  comboSheet.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  comboSheet.addSelectionListener(new SelectionAdapter(){
    /** 
 * (Re-)Evaluate page
 */
    @Override public void widgetSelected(    final SelectionEvent arg0){
      evaluatePage();
    }
  }
);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  btnContainsHeader=new Button(container,SWT.CHECK);
  btnContainsHeader.setVisible(false);
  btnContainsHeader.setText(Resources.getMessage("String_Node_Str"));
  btnContainsHeader.setSelection(true);
  btnContainsHeader.addSelectionListener(new SelectionAdapter(){
    /** 
 * (Re-)Evaluate page
 */
    @Override public void widgetSelected(    SelectionEvent arg0){
      evaluatePage();
    }
  }
);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  tableViewerPreview=SWTUtil.createTableViewer(container,SWT.BORDER | SWT.FULL_SELECTION);
  tableViewerPreview.setContentProvider(new ArrayContentProvider());
  tablePreview=tableViewerPreview.getTable();
  GridData gd_tablePreview=new GridData(SWT.FILL,SWT.FILL,true,true,3,1);
  gd_tablePreview.heightHint=150;
  tablePreview.setLayoutData(gd_tablePreview);
  tablePreview.setLinesVisible(true);
  tablePreview.setVisible(false);
  setPageComplete(false);
}

Fixed version (ground truth):
/** 
 * Creates the design of this page This adds all the controls to the page along with their listeners.
 * @param parent
 * @note {@link #tablePreview} is not visible until a file is loaded.
 */
public void createControl(Composite parent){
  Composite container=new Composite(parent,SWT.NULL);
  setControl(container);
  container.setLayout(new GridLayout(3,false));
  lblLocation=new Label(container,SWT.NONE);
  lblLocation.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  lblLocation.setText(Resources.getMessage("String_Node_Str"));
  comboLocation=new Combo(container,SWT.READ_ONLY);
  comboLocation.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  comboLocation.addSelectionListener(new SelectionAdapter(){
    /** 
 * Reads the sheets and selects active one
 */
    @Override public void widgetSelected(    SelectionEvent arg0){
      try {
        readSheets();
      }
 catch (      IOException e) {
        setErrorMessage(Resources.getMessage("String_Node_Str"));
        resetPage();
        return;
      }
      comboSheet.setVisible(true);
      lblSheet.setVisible(true);
      btnContainsHeader.setVisible(true);
      comboSheet.select(workbook.getActiveSheetIndex());
      comboSheet.notifyListeners(SWT.Selection,null);
    }
  }
);
  btnChoose=new Button(container,SWT.NONE);
  btnChoose.setText(Resources.getMessage("String_Node_Str"));
  btnChoose.addSelectionListener(new SelectionAdapter(){
    /** 
 * Opens a file selection dialog for Excel files Both XLS and XLSX files can be selected. If a valid file was selected, it is added to   {@link #comboLocation} when it wasn'talready there. In either case it gets preselected.
 * @see {@link Controller#actionShowOpenFileDialog(String)}
 */
    @Override public void widgetSelected(    SelectionEvent arg0){
      final String path=wizardImport.getController().actionShowOpenFileDialog(getShell(),"String_Node_Str");
      if (path == null) {
        return;
      }
      if (comboLocation.indexOf(path) == -1) {
        comboLocation.add(path,0);
      }
      comboLocation.select(comboLocation.indexOf(path));
      comboLocation.notifyListeners(SWT.Selection,null);
    }
  }
);
  lblSheet=new Label(container,SWT.NONE);
  lblSheet.setVisible(false);
  lblSheet.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  lblSheet.setText(Resources.getMessage("String_Node_Str"));
  comboSheet=new Combo(container,SWT.READ_ONLY);
  comboSheet.setVisible(false);
  comboSheet.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  comboSheet.addSelectionListener(new SelectionAdapter(){
    /** 
 * (Re-)Evaluate page
 */
    @Override public void widgetSelected(    final SelectionEvent arg0){
      evaluatePage();
    }
  }
);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  btnContainsHeader=new Button(container,SWT.CHECK);
  btnContainsHeader.setVisible(false);
  btnContainsHeader.setText(Resources.getMessage("String_Node_Str"));
  btnContainsHeader.setSelection(true);
  btnContainsHeader.addSelectionListener(new SelectionAdapter(){
    /** 
 * (Re-)Evaluate page
 */
    @Override public void widgetSelected(    SelectionEvent arg0){
      evaluatePage();
    }
  }
);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  new Label(container,SWT.NONE);
  tableViewerPreview=SWTUtil.createTableViewer(container,SWT.BORDER | SWT.FULL_SELECTION);
  tableViewerPreview.setContentProvider(new ArrayContentProvider());
  tablePreview=tableViewerPreview.getTable();
  GridData gd_tablePreview=new GridData(SWT.FILL,SWT.FILL,true,true,3,1);
  gd_tablePreview.heightHint=150;
  tablePreview.setLayoutData(gd_tablePreview);
  tablePreview.setLinesVisible(true);
  tablePreview.setVisible(false);
  setPageComplete(false);
}