Program: 122037
Project: 122037
Buggy source:
private void addFieldListeners(){
  fileField.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getConnection().setFilePath(fileField.getText());
      previewBtn.setEnabled(checkFieldsValue());
      clearPreview();
      refreshPreview();
    }
  }
);
  rowSeparatorText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getConnection().setRowSeparatorValue(rowSeparatorText.getText());
      previewBtn.setEnabled(checkFieldsValue());
      clearPreview();
    }
  }
);
  fieldSeparatorText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
      previewBtn.setEnabled(checkFieldsValue());
      clearPreview();
    }
  }
);
  useMultiSaparators.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      boolean selected=useMultiSaparators.getSelection();
      fieldSeparatorCombo.setEnabled(!selected);
      fieldSeparatorText.setEditable(!selected);
      multiSeparatorsText.setEditable(selected);
      keyValuesText.setEditable(selected);
      keyIndexText.setEditable(selected);
      escapeCharCombo.setEnabled(selected);
      textEnclosureCombo.setEnabled(selected);
      csvRadio.setSelection(selected);
      delimitedRadio.setSelection(!selected);
      delimitedRadio.setEnabled(!selected);
      if (selected) {
        getConnection().setFieldSeparatorValue(multiSeparatorsText.getText());
        multiSchemaManager.setSelectedColumnIndex(Integer.parseInt(keyIndexText.getText()));
      }
 else {
        getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
      }
      clearPreview();
      previewBtn.setEnabled(checkFieldsValue());
      if (previewBtn.isEnabled()) {
        refreshPreview();
      }
    }
  }
);
  schemaTreeViewer.getTree().addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      getUIManager().refreshSchemasDetailView(schemaTreeViewer,schemaDetailsViewer,getSchemaDetailModel());
    }
  }
);
  schemaTreeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      removeRow.setEnabled(true);
      editSchema.setEnabled(true);
      if (isReadOnly()) {
        leftBtn.setEnabled(false);
        rightBtn.setEnabled(false);
      }
 else {
        leftBtn.setEnabled(getUIManager().enableMovedRecord(schemaTreeViewer,true));
        rightBtn.setEnabled(getUIManager().enableMovedRecord(schemaTreeViewer,false));
      }
      IStructuredSelection selection=(IStructuredSelection)schemaTreeViewer.getSelection();
      Object element=selection.getFirstElement();
      if (element != null && (element instanceof SchemasKeyData) && ((SchemasKeyData)element).getTagLevel() > 0) {
        cardText.setText(((SchemasKeyData)element).getCard());
        cardText.setEnabled(true);
      }
 else {
        cardText.setText("String_Node_Str");
        cardText.setEnabled(false);
      }
    }
  }
);
  schemaTreeViewer.getTree().addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
  schemaTreeViewer.addTreeListener(new ITreeViewerListener(){
    public void treeCollapsed(    TreeExpansionEvent event){
    }
    public void treeExpanded(    TreeExpansionEvent event){
    }
  }
);
}

Fixed version (ground truth):
private void addFieldListeners(){
  fileField.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getConnection().setFilePath(fileField.getText());
      previewBtn.setEnabled(checkFieldsValue());
      clearPreview();
      refreshPreview();
    }
  }
);
  rowSeparatorText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getConnection().setRowSeparatorValue(rowSeparatorText.getText());
      previewBtn.setEnabled(checkFieldsValue());
      clearPreview();
    }
  }
);
  fieldSeparatorText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
      previewBtn.setEnabled(checkFieldsValue());
      clearPreview();
    }
  }
);
  useMultiSaparators.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      boolean selected=useMultiSaparators.getSelection();
      fieldSeparatorCombo.setEnabled(!selected);
      fieldSeparatorText.setEditable(!selected);
      multiSeparatorsText.setEditable(selected);
      keyValuesText.setEditable(selected);
      keyIndexText.setEditable(selected);
      escapeCharCombo.setEnabled(selected);
      textEnclosureCombo.setEnabled(selected);
      csvRadio.setSelection(selected);
      delimitedRadio.setSelection(!selected);
      delimitedRadio.setEnabled(!selected);
      if (selected) {
        getConnection().setFieldSeparatorValue(multiSeparatorsText.getText());
        multiSchemaManager.setSelectedColumnIndex(Integer.parseInt(keyIndexText.getText()));
      }
 else {
        getConnection().setFieldSeparatorValue(fieldSeparatorText.getText());
      }
      clearPreview();
      previewBtn.setEnabled(checkFieldsValue());
      if (previewBtn.isEnabled()) {
        refreshPreview();
      }
    }
  }
);
  schemaTreeViewer.getTree().addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      getUIManager().refreshSchemasDetailView(schemaTreeViewer,schemaDetailsViewer,getSchemaDetailModel());
    }
  }
);
  schemaTreeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      removeRow.setEnabled(true);
      editSchema.setEnabled(true);
      if (isReadOnly()) {
        leftBtn.setEnabled(false);
        rightBtn.setEnabled(false);
      }
 else {
        leftBtn.setEnabled(getUIManager().enableMovedRecord(schemaTreeViewer,true));
        rightBtn.setEnabled(getUIManager().enableMovedRecord(schemaTreeViewer,false));
      }
      IStructuredSelection selection=(IStructuredSelection)schemaTreeViewer.getSelection();
      Object element=selection.getFirstElement();
      if (element != null && (element instanceof SchemasKeyData) && ((SchemasKeyData)element).getTagLevel() > 0) {
        cardText.setText(((SchemasKeyData)element).getCard());
        cardText.setEnabled(true);
      }
 else {
        cardText.setText("String_Node_Str");
        cardText.setEnabled(false);
      }
    }
  }
);
  schemaTreeViewer.getTree().addKeyListener(new KeyAdapter(){
    @Override public void keyPressed(    KeyEvent e){
    }
    @Override public void keyReleased(    KeyEvent e){
    }
  }
);
  schemaTreeViewer.addTreeListener(new ITreeViewerListener(){
    public void treeCollapsed(    TreeExpansionEvent event){
    }
    public void treeExpanded(    TreeExpansionEvent event){
    }
  }
);
}