Program: 119637
Project: 119637
Buggy source:
@SuppressWarnings("String_Node_Str") private void createItemRoot(Composite workArea){
  Composite projectGroup=new Composite(workArea,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.makeColumnsEqualWidth=false;
  layout.marginWidth=0;
  projectGroup.setLayout(layout);
  projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  itemFromDirectoryRadio=new Button(projectGroup,SWT.RADIO);
  itemFromDirectoryRadio.setText(DataTransferMessages.WizardProjectsImportPage_RootSelectTitle);
  this.directoryPathField=new Text(projectGroup,SWT.BORDER);
  this.directoryPathField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
  String exportDirPath=reloadExportPath(DIRECTORY_PATH);
  if (exportDirPath != null) {
    this.directoryPathField.setText(exportDirPath);
    this.lastPath=exportDirPath;
  }
  browseDirectoriesButton=new Button(projectGroup,SWT.PUSH);
  browseDirectoriesButton.setText(DataTransferMessages.DataTransfer_browse);
  setButtonLayoutData(browseDirectoriesButton);
  itemFromArchiveRadio=new Button(projectGroup,SWT.RADIO);
  itemFromArchiveRadio.setText(DataTransferMessages.WizardProjectsImportPage_ArchiveSelectTitle);
  archivePathField=new Text(projectGroup,SWT.BORDER);
  archivePathField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
  if (selection != null && selection.getFirstElement() instanceof RepositoryNode) {
    RepositoryNode node=(RepositoryNode)selection.getFirstElement();
    String arcFileName;
    if (node.getObject() == null) {
      arcFileName=node.getLabel();
    }
 else {
      arcFileName=node.getObject().getLabel();
    }
    String exportArchivePath=reloadExportPath(ARCHIVE_PATH);
    if (exportArchivePath != null && exportArchivePath.trim().length() > 0) {
      File beforeExportArchiveFolder=new File(exportArchivePath).getParentFile();
      if (beforeExportArchiveFolder != null) {
        String newPath=new File(beforeExportArchiveFolder,arcFileName + FileConstants.ZIP_FILE_SUFFIX).getAbsolutePath();
        this.archivePathField.setText(newPath);
      }
    }
 else     if (exportDirPath != null && exportDirPath.trim().length() > 0) {
      String newPath=exportDirPath + File.separator + arcFileName+ FileConstants.ZIP_FILE_SUFFIX;
      this.archivePathField.setText(newPath);
    }
  }
  browseArchivesButton=new Button(projectGroup,SWT.PUSH);
  browseArchivesButton.setText(DataTransferMessages.DataTransfer_browse);
  setButtonLayoutData(browseArchivesButton);
  itemFromDirectoryRadio.setSelection(true);
  archivePathField.setEnabled(false);
  browseArchivesButton.setEnabled(false);
  browseDirectoriesButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      handleLocationDirectoryButtonPressed();
    }
  }
);
  browseArchivesButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      handleLocationArchiveButtonPressed();
    }
  }
);
  directoryPathField.addTraverseListener(new TraverseListener(){
    @Override public void keyTraversed(    TraverseEvent e){
      if (e.detail == SWT.TRAVERSE_RETURN) {
        e.doit=false;
        lastPath=directoryPathField.getText().trim();
      }
    }
  }
);
  directoryPathField.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    org.eclipse.swt.events.FocusEvent e){
      lastPath=directoryPathField.getText().trim();
    }
  }
);
  directoryPathField.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      saveExportPath(DIRECTORY_PATH,directoryPathField.getText());
    }
  }
);
  archivePathField.addTraverseListener(new TraverseListener(){
    @Override public void keyTraversed(    TraverseEvent e){
      if (e.detail == SWT.TRAVERSE_RETURN) {
        e.doit=false;
        lastPath=archivePathField.getText().trim();
      }
    }
  }
);
  archivePathField.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    org.eclipse.swt.events.FocusEvent e){
      lastPath=archivePathField.getText().trim();
    }
  }
);
  archivePathField.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      saveExportPath(ARCHIVE_PATH,archivePathField.getText());
    }
  }
);
  itemFromDirectoryRadio.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      directoryRadioSelected();
    }
  }
);
  itemFromArchiveRadio.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      archiveRadioSelected();
    }
  }
);
  exportDependencies=new Button(workArea,SWT.CHECK);
  exportDependencies.setText(Messages.getString("String_Node_Str"));
  exportDependencies.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      checkedDependency.clear();
      implicitDependences.clear();
      CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
      Set allNode=new HashSet();
      if (exportDependencies.getSelection()) {
        refreshExportDependNodes();
        exportDependenciesSelected();
        allNode.addAll(checkedDependency);
      }
 else {
        allNode.addAll(initcheckedNodes);
      }
      Set toselect=new HashSet();
      for (      Object obj : allNode) {
        ERepositoryObjectType objectType=getObjectType(obj);
        expandRoot(objectType);
        expandParent(exportItemsTreeViewer,obj,objectType);
        checkElement(obj,toselect);
      }
      exportItemsTreeViewer.setCheckedElements(toselect.toArray());
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void createItemRoot(Composite workArea){
  Composite projectGroup=new Composite(workArea,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.makeColumnsEqualWidth=false;
  layout.marginWidth=0;
  projectGroup.setLayout(layout);
  projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  itemFromDirectoryRadio=new Button(projectGroup,SWT.RADIO);
  itemFromDirectoryRadio.setText(DataTransferMessages.WizardProjectsImportPage_RootSelectTitle);
  this.directoryPathField=new Text(projectGroup,SWT.BORDER);
  this.directoryPathField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
  String exportDirPath=reloadExportPath(DIRECTORY_PATH);
  if (exportDirPath != null) {
    this.directoryPathField.setText(exportDirPath);
    this.lastPath=exportDirPath;
  }
  browseDirectoriesButton=new Button(projectGroup,SWT.PUSH);
  browseDirectoriesButton.setText(DataTransferMessages.DataTransfer_browse);
  setButtonLayoutData(browseDirectoriesButton);
  itemFromArchiveRadio=new Button(projectGroup,SWT.RADIO);
  itemFromArchiveRadio.setText(DataTransferMessages.WizardProjectsImportPage_ArchiveSelectTitle);
  archivePathField=new Text(projectGroup,SWT.BORDER);
  archivePathField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));
  if (selection != null && selection.getFirstElement() instanceof RepositoryNode) {
    RepositoryNode node=(RepositoryNode)selection.getFirstElement();
    String arcFileName;
    if (node.getObject() == null) {
      arcFileName=node.getLabel();
    }
 else {
      arcFileName=node.getObject().getLabel();
    }
    String exportArchivePath=reloadExportPath(ARCHIVE_PATH);
    if (exportArchivePath != null && exportArchivePath.trim().length() > 0) {
      File beforeExportArchiveFolder=new File(exportArchivePath).getParentFile();
      if (beforeExportArchiveFolder != null) {
        String newPath=new File(beforeExportArchiveFolder,arcFileName + FileConstants.ZIP_FILE_SUFFIX).getAbsolutePath();
        this.archivePathField.setText(newPath);
      }
    }
 else     if (exportDirPath != null && exportDirPath.trim().length() > 0) {
      String newPath=exportDirPath + File.separator + arcFileName+ FileConstants.ZIP_FILE_SUFFIX;
      this.archivePathField.setText(newPath);
    }
  }
  browseArchivesButton=new Button(projectGroup,SWT.PUSH);
  browseArchivesButton.setText(DataTransferMessages.DataTransfer_browse);
  setButtonLayoutData(browseArchivesButton);
  itemFromDirectoryRadio.setSelection(true);
  archivePathField.setEnabled(false);
  browseArchivesButton.setEnabled(false);
  browseDirectoriesButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      handleLocationDirectoryButtonPressed();
    }
  }
);
  browseArchivesButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      handleLocationArchiveButtonPressed();
    }
  }
);
  directoryPathField.addTraverseListener(new TraverseListener(){
    @Override public void keyTraversed(    TraverseEvent e){
      if (e.detail == SWT.TRAVERSE_RETURN) {
        e.doit=false;
        lastPath=directoryPathField.getText().trim();
      }
    }
  }
);
  directoryPathField.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    org.eclipse.swt.events.FocusEvent e){
      lastPath=directoryPathField.getText().trim();
    }
  }
);
  directoryPathField.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      saveExportPath(DIRECTORY_PATH,directoryPathField.getText());
    }
  }
);
  archivePathField.addTraverseListener(new TraverseListener(){
    @Override public void keyTraversed(    TraverseEvent e){
      if (e.detail == SWT.TRAVERSE_RETURN) {
        e.doit=false;
        lastPath=archivePathField.getText().trim();
      }
    }
  }
);
  archivePathField.addFocusListener(new FocusAdapter(){
    @Override public void focusLost(    org.eclipse.swt.events.FocusEvent e){
      lastPath=archivePathField.getText().trim();
    }
  }
);
  archivePathField.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      saveExportPath(ARCHIVE_PATH,archivePathField.getText());
    }
  }
);
  itemFromDirectoryRadio.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      directoryRadioSelected();
    }
  }
);
  itemFromArchiveRadio.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      archiveRadioSelected();
    }
  }
);
  exportDependencies=new Button(workArea,SWT.CHECK);
  exportDependencies.setText(Messages.getString("String_Node_Str"));
  exportDependencies.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      checkedDependency.clear();
      implicitDependences.clear();
      CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
      Set allNode=new HashSet();
      if (exportDependencies.getSelection()) {
        refreshExportDependNodes();
        exportDependenciesSelected();
        allNode.addAll(checkedDependency);
        allNode.addAll(implicitDependences);
      }
 else {
        allNode.addAll(initcheckedNodes);
      }
      Set toselect=new HashSet();
      for (      Object obj : allNode) {
        ERepositoryObjectType objectType=getObjectType(obj);
        expandRoot(objectType);
        expandParent(exportItemsTreeViewer,obj,objectType);
        checkElement(obj,toselect);
      }
      exportItemsTreeViewer.setCheckedElements(toselect.toArray());
      if (!exportDependencies.getSelection()) {
        for (        Object unchecked : uncheckedNodes) {
          exportItemsTreeViewer.setChecked(unchecked,false);
        }
      }
    }
  }
);
}