Program: 17536
Project: 17536
Buggy source:
public void createPartControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  GridLayout containerLayout=new GridLayout();
  containerLayout.numColumns=2;
  container.setLayout(containerLayout);
  comboViewer=new ComboViewer(container,SWT.READ_ONLY);
  comboViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      try {
        StructuredSelection sel=(StructuredSelection)e.getSelection();
        directoryTreeViewer.setInput(sel.getFirstElement());
        fileViewer.setInput(sel.getFirstElement());
        if (sel.getFirstElement() instanceof FtpConnectionProperties) {
          connectItem.setEnabled(true);
          disconnectItem.setEnabled(true);
        }
 else {
          connectItem.setEnabled(false);
          disconnectItem.setEnabled(false);
        }
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  comboViewer.setLabelProvider(new ComboLabelProvider());
  comboViewer.setContentProvider(new ComboContentProvider());
  final Combo combo=comboViewer.getCombo();
  final GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  combo.setLayoutData(gridData);
  comboViewer.setInput(new LocalFileSystem());
  Menu menu=new Menu(container.getShell(),SWT.POP_UP);
  manageItem=new MenuItem(menu,SWT.CASCADE);
  manageItem.setText("String_Node_Str");
  manageItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      String connectionID=null;
      StructuredSelection sel=(StructuredSelection)comboViewer.getSelection();
      if (sel.getFirstElement() instanceof FtpConnectionProperties) {
        connectionID=((FtpConnectionProperties)sel.getFirstElement()).getConnectionid();
      }
      FtpConnectionDialog dialog=new FtpConnectionDialog(e.widget.getDisplay().getActiveShell(),connectionID);
      if (dialog.open() == IDialogConstants.OK_ID) {
        comboViewer.setInput(dialog.connectionProperties);
      }
    }
  }
);
  disconnectItem=new MenuItem(menu,SWT.CASCADE);
  disconnectItem.setText("String_Node_Str");
  disconnectItem.setEnabled(false);
  disconnectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        FtpConnection.getInstance().disconnect();
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  connectItem=new MenuItem(menu,SWT.CASCADE);
  connectItem.setText("String_Node_Str");
  connectItem.setEnabled(false);
  connectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        FtpConnection.getInstance().connect();
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  Button menuButton=new Button(container,SWT.ARROW | SWT.RIGHT);
  menuButton.addMouseListener(new MenuMouseListener(menu));
  SashForm sash=new SashForm(container,SWT.VERTICAL);
  GridData sashData=new GridData(GridData.FILL_BOTH);
  sashData.horizontalSpan=2;
  sash.setLayoutData(sashData);
  directoryTreeViewer=new TreeViewer(sash,SWT.BORDER);
  directoryTreeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      fileViewer.setInput(e.getSelection());
    }
  }
);
  directoryTreeViewer.setSorter(new DirectorySorter());
  directoryTreeViewer.setLabelProvider(new DirectoryLabelProvider());
  directoryTreeViewer.setContentProvider(new DirectoryContentProvider());
  final Tree tree=directoryTreeViewer.getTree();
  directoryTreeViewer.setComparer(new FileComparer());
  tree.setLayoutData(new GridData(GridData.FILL_BOTH));
  directoryTreeViewer.setInput(new LocalFileSystem());
  FileContentProvider fileProvider=new FileContentProvider();
  fileViewer=new TableViewer(sash,SWT.BORDER);
  fileViewer.addDoubleClickListener(new FileDoubleClickListener(fileProvider));
  fileViewer.setSorter(new Sorter());
  fileViewer.setLabelProvider(new FileLabelProvider());
  fileViewer.setContentProvider(fileProvider);
  fileViewer.setComparer(new FileComparer());
  final Table table=fileViewer.getTable();
  table.setLayoutData(new GridData(GridData.FILL_BOTH));
  fileViewer.setInput(new LocalFileSystem());
  createActions();
  initializeToolBar();
  initializeMenu();
}

Fixed version (ground truth):
public void createPartControl(Composite parent){
  Composite container=new Composite(parent,SWT.NONE);
  GridLayout containerLayout=new GridLayout();
  containerLayout.numColumns=2;
  container.setLayout(containerLayout);
  comboViewer=new ComboViewer(container,SWT.READ_ONLY);
  comboViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      try {
        StructuredSelection sel=(StructuredSelection)e.getSelection();
        directoryTreeViewer.setInput(sel.getFirstElement());
        fileViewer.setInput(sel.getFirstElement());
        if (sel.getFirstElement() instanceof FtpConnectionProperties) {
          connectItem.setEnabled(true);
          disconnectItem.setEnabled(true);
        }
 else {
          connectItem.setEnabled(false);
          disconnectItem.setEnabled(false);
        }
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  comboViewer.setLabelProvider(new ComboLabelProvider());
  comboViewer.setContentProvider(new ComboContentProvider());
  final Combo combo=comboViewer.getCombo();
  final GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  combo.setLayoutData(gridData);
  comboViewer.setInput(new LocalFileSystem());
  Menu menu=new Menu(container.getShell(),SWT.POP_UP);
  manageItem=new MenuItem(menu,SWT.CASCADE);
  manageItem.setText("String_Node_Str");
  manageItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        String connectionID=null;
        StructuredSelection sel=(StructuredSelection)comboViewer.getSelection();
        if (sel.getFirstElement() instanceof FtpConnectionProperties) {
          connectionID=((FtpConnectionProperties)sel.getFirstElement()).getConnectionid();
        }
        FtpConnectionDialog dialog=new FtpConnectionDialog(e.widget.getDisplay().getActiveShell(),connectionID);
        if (dialog.open() == IDialogConstants.OK_ID) {
          comboViewer.setInput(dialog.connectionProperties);
        }
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  disconnectItem=new MenuItem(menu,SWT.CASCADE);
  disconnectItem.setText("String_Node_Str");
  disconnectItem.setEnabled(false);
  disconnectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        FtpConnection.getInstance().disconnect();
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  connectItem=new MenuItem(menu,SWT.CASCADE);
  connectItem.setText("String_Node_Str");
  connectItem.setEnabled(false);
  connectItem.addListener(SWT.Selection,new Listener(){
    public void handleEvent(    Event e){
      try {
        FtpConnection.getInstance().connect();
      }
 catch (      Exception ex) {
        ex.printStackTrace();
      }
    }
  }
);
  Button menuButton=new Button(container,SWT.ARROW | SWT.RIGHT);
  menuButton.addMouseListener(new MenuMouseListener(menu));
  SashForm sash=new SashForm(container,SWT.VERTICAL);
  GridData sashData=new GridData(GridData.FILL_BOTH);
  sashData.horizontalSpan=2;
  sash.setLayoutData(sashData);
  directoryTreeViewer=new TreeViewer(sash,SWT.BORDER);
  directoryTreeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent e){
      fileViewer.setInput(e.getSelection());
    }
  }
);
  directoryTreeViewer.setSorter(new DirectorySorter());
  directoryTreeViewer.setLabelProvider(new DirectoryLabelProvider());
  directoryTreeViewer.setContentProvider(new DirectoryContentProvider());
  final Tree tree=directoryTreeViewer.getTree();
  directoryTreeViewer.setComparer(new FileComparer());
  tree.setLayoutData(new GridData(GridData.FILL_BOTH));
  directoryTreeViewer.setInput(new LocalFileSystem());
  FileContentProvider fileProvider=new FileContentProvider();
  fileViewer=new TableViewer(sash,SWT.BORDER);
  fileViewer.addDoubleClickListener(new FileDoubleClickListener(fileProvider));
  fileViewer.setSorter(new Sorter());
  fileViewer.setLabelProvider(new FileLabelProvider());
  fileViewer.setContentProvider(fileProvider);
  fileViewer.setComparer(new FileComparer());
  final Table table=fileViewer.getTable();
  table.setLayoutData(new GridData(GridData.FILL_BOTH));
  fileViewer.setInput(new LocalFileSystem());
  createActions();
  initializeToolBar();
  initializeMenu();
}