Program: 122468
Project: 122468
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 reloaded=reloadExportPath(DIRECTORY_PATH);
  if (reloaded != null) {
    this.directoryPathField.setText(reloaded);
    this.lastPath=reloaded;
  }
  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();
    }
    if (reloadExportPath(ARCHIVE_PATH) != null) {
      String newPath=reloadExportPath(ARCHIVE_PATH).substring(0,reloadExportPath(ARCHIVE_PATH).lastIndexOf("String_Node_Str") + 1) + arcFileName + "String_Node_Str";
      this.archivePathField.setText(newPath);
    }
 else {
      if (reloadExportPath(DIRECTORY_PATH) != null) {
        String newPath=reloadExportPath(DIRECTORY_PATH) + "String_Node_Str" + arcFileName+ "String_Node_Str";
        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(){
    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(){
    public void modifyText(    ModifyEvent e){
      if (getDialogSettings() != null) {
        IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
        if (section == null) {
          section=getDialogSettings().addNewSection(DESTINATION_FILE);
        }
        section.put(DIRECTORY_PATH,directoryPathField.getText());
      }
    }
  }
);
  archivePathField.addTraverseListener(new TraverseListener(){
    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(){
    public void modifyText(    ModifyEvent e){
      if (getDialogSettings() != null) {
        IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
        if (section == null) {
          section=getDialogSettings().addNewSection(DESTINATION_FILE);
        }
        section.put(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){
      refreshExportDependNodes();
      CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
      exportItemsTreeViewer.expandAll();
      exportItemsTreeViewer.collapseAll();
      exportItemsTreeViewer.expandToLevel(3);
      exportDependenciesSelected();
      allNode.clear();
      if (exportDependencies.getSelection()) {
        allNode.addAll(checkedNodes);
      }
 else {
        repositoryNodes.clear();
        repositoryNodes.addAll(selection.toList());
        allNode.addAll(repositoryNodes);
      }
      Set<RepositoryNode> nodes=new HashSet<RepositoryNode>();
      for (      RepositoryNode node : allNode) {
        expandRoot(node);
        expandParent(exportItemsTreeViewer,node);
        checkElement(node,nodes);
      }
      exportItemsTreeViewer.setCheckedElements(nodes.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 reloaded=reloadExportPath(DIRECTORY_PATH);
  if (reloaded != null) {
    this.directoryPathField.setText(reloaded);
    this.lastPath=reloaded;
  }
  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();
    }
    if (reloadExportPath(ARCHIVE_PATH) != null) {
      if (!reloadExportPath(ARCHIVE_PATH).equals("String_Node_Str")) {
        String newPath=reloadExportPath(ARCHIVE_PATH).substring(0,reloadExportPath(ARCHIVE_PATH).lastIndexOf("String_Node_Str") + 1) + arcFileName + "String_Node_Str";
        this.archivePathField.setText(newPath);
      }
 else {
        this.archivePathField.setText(reloadExportPath(ARCHIVE_PATH));
      }
    }
 else {
      if (reloadExportPath(DIRECTORY_PATH) != null) {
        if (!reloadExportPath(DIRECTORY_PATH).equals("String_Node_Str")) {
          String newPath=reloadExportPath(DIRECTORY_PATH) + "String_Node_Str" + arcFileName+ "String_Node_Str";
          this.archivePathField.setText(newPath);
        }
      }
 else {
        this.archivePathField.setText(reloadExportPath(DIRECTORY_PATH));
      }
    }
  }
  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(){
    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(){
    public void modifyText(    ModifyEvent e){
      if (getDialogSettings() != null) {
        IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
        if (section == null) {
          section=getDialogSettings().addNewSection(DESTINATION_FILE);
        }
        section.put(DIRECTORY_PATH,directoryPathField.getText());
      }
    }
  }
);
  archivePathField.addTraverseListener(new TraverseListener(){
    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(){
    public void modifyText(    ModifyEvent e){
      if (getDialogSettings() != null) {
        IDialogSettings section=getDialogSettings().getSection(DESTINATION_FILE);
        if (section == null) {
          section=getDialogSettings().addNewSection(DESTINATION_FILE);
        }
        section.put(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){
      refreshExportDependNodes();
      CheckboxTreeViewer exportItemsTreeViewer=getItemsTreeViewer();
      exportItemsTreeViewer.expandAll();
      exportItemsTreeViewer.collapseAll();
      exportItemsTreeViewer.expandToLevel(3);
      exportDependenciesSelected();
      allNode.clear();
      if (exportDependencies.getSelection()) {
        allNode.addAll(checkedNodes);
      }
 else {
        repositoryNodes.clear();
        repositoryNodes.addAll(selection.toList());
        allNode.addAll(repositoryNodes);
      }
      Set<RepositoryNode> nodes=new HashSet<RepositoryNode>();
      for (      RepositoryNode node : allNode) {
        expandRoot(node);
        expandParent(exportItemsTreeViewer,node);
        checkElement(node,nodes);
      }
      exportItemsTreeViewer.setCheckedElements(nodes.toArray());
    }
  }
);
}