Program: 148457
Project: 148457
Buggy source:
protected Control createDialogArea(Composite parent){
  try {
    if (editable) {
      parent.getShell().setText("String_Node_Str");
    }
 else {
      parent.getShell().setText("String_Node_Str");
    }
    Composite composite=new Composite(parent,SWT.NULL);
    GridLayout layout=new GridLayout();
    layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
    layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(composite);
    if (desc != null && desc.length() > 0) {
      new Label(composite,SWT.NONE).setText(desc);
    }
    tabFolder=new TabFolder(composite,SWT.TOP | SWT.H_SCROLL | SWT.V_SCROLL);
    tabFolder.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    ((GridData)tabFolder.getLayoutData()).heightHint=600;
    ((GridData)tabFolder.getLayoutData()).widthHint=600;
    tabFolder.addSelectionListener(new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        if (tabFolder.getSelectionIndex() == 0) {
          if (node == null) {
            try {
              if (sourceViewer == null || sourceViewer.getDocument() == null)               return;
              node=Util.parse(sourceViewer.getDocument().get());
            }
 catch (            Exception ex) {
              ex.printStackTrace();
              tabFolder.setSelection(1);
              MessageDialog.openError(DOMViewDialog.this.getShell(),"String_Node_Str","String_Node_Str" + ex.getLocalizedMessage());
              return;
            }
            domViewer.setInput(node);
            domViewer.expandAll();
          }
        }
 else         if (tabFolder.getSelectionIndex() == 1) {
          try {
            sourceViewer.setDocument(new org.eclipse.jface.text.Document(Util.nodeToString(node)));
            node=null;
          }
 catch (          Exception ex) {
            MessageDialog.openError(DOMViewDialog.this.getShell(),"String_Node_Str","String_Node_Str" + ex.getLocalizedMessage());
            sourceViewer.setDocument(new org.eclipse.jface.text.Document("String_Node_Str"));
          }
        }
      }
    }
);
    TabItem tiDOM=new TabItem(tabFolder,SWT.NULL);
    tiDOM.setText("String_Node_Str");
    tiDOM.setToolTipText("String_Node_Str");
    domViewer=new TreeViewer(tabFolder,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    domViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    domViewer.setSorter(null);
    domViewer.setLabelProvider(new DOMTreeLabelProvider());
    domViewer.setContentProvider(new DOMTreeContentProvider());
    domViewer.setInput(node);
    domViewer.expandAll();
    domViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
    tiDOM.setControl(domViewer.getControl());
    TabItem tiSource=new TabItem(tabFolder,SWT.NULL);
    tiSource.setText("String_Node_Str");
    tiSource.setToolTipText("String_Node_Str");
    org.eclipse.jface.text.Document doc=new org.eclipse.jface.text.Document(Util.nodeToString(node));
    sourceViewer=new SourceViewer(tabFolder,new VerticalRuler(5),SWT.H_SCROLL | SWT.V_SCROLL);
    sourceViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    sourceViewer.setDocument(doc);
    sourceViewer.setEditable(this.editable);
    tiSource.setControl(sourceViewer.getControl());
    tabFolder.setSelection(firstTab);
    if (firstTab == SOURCE_VIEWER)     node=null;
    return composite;
  }
 catch (  Exception e) {
    e.printStackTrace();
    MessageDialog.openError(this.getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return null;
  }
}

Fixed version (ground truth):
protected Control createDialogArea(Composite parent){
  try {
    if (editable) {
      parent.getShell().setText("String_Node_Str");
    }
 else {
      parent.getShell().setText("String_Node_Str");
    }
    Composite composite=new Composite(parent,SWT.NULL);
    GridLayout layout=new GridLayout();
    layout.marginHeight=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
    layout.marginWidth=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    layout.verticalSpacing=convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
    layout.horizontalSpacing=convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    applyDialogFont(composite);
    if (desc != null && desc.length() > 0) {
      new Label(composite,SWT.NONE).setText(desc);
    }
    tabFolder=new TabFolder(composite,SWT.TOP | SWT.H_SCROLL | SWT.V_SCROLL);
    tabFolder.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    ((GridData)tabFolder.getLayoutData()).heightHint=600;
    ((GridData)tabFolder.getLayoutData()).widthHint=600;
    tabFolder.addSelectionListener(new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        if (tabFolder.getSelectionIndex() == 0) {
          if (node == null) {
            try {
              if (sourceViewer == null || sourceViewer.getDocument() == null)               return;
              node=Util.parse(sourceViewer.getDocument().get());
            }
 catch (            Exception ex) {
              log.error(ex.getMessage(),ex);
              tabFolder.setSelection(1);
              MessageDialog.openError(DOMViewDialog.this.getShell(),"String_Node_Str","String_Node_Str" + ex.getLocalizedMessage());
              return;
            }
            domViewer.setInput(node);
            domViewer.expandAll();
          }
        }
 else         if (tabFolder.getSelectionIndex() == 1) {
          try {
            sourceViewer.setDocument(new org.eclipse.jface.text.Document(Util.nodeToString(node)));
            node=null;
          }
 catch (          Exception ex) {
            MessageDialog.openError(DOMViewDialog.this.getShell(),"String_Node_Str","String_Node_Str" + ex.getLocalizedMessage());
            sourceViewer.setDocument(new org.eclipse.jface.text.Document("String_Node_Str"));
          }
        }
      }
    }
);
    TabItem tiDOM=new TabItem(tabFolder,SWT.NULL);
    tiDOM.setText("String_Node_Str");
    tiDOM.setToolTipText("String_Node_Str");
    domViewer=new TreeViewer(tabFolder,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    domViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    domViewer.setSorter(null);
    domViewer.setLabelProvider(new DOMTreeLabelProvider());
    domViewer.setContentProvider(new DOMTreeContentProvider());
    domViewer.setInput(node);
    domViewer.expandAll();
    domViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
    tiDOM.setControl(domViewer.getControl());
    TabItem tiSource=new TabItem(tabFolder,SWT.NULL);
    tiSource.setText("String_Node_Str");
    tiSource.setToolTipText("String_Node_Str");
    org.eclipse.jface.text.Document doc=new org.eclipse.jface.text.Document(Util.nodeToString(node));
    sourceViewer=new SourceViewer(tabFolder,new VerticalRuler(5),SWT.H_SCROLL | SWT.V_SCROLL);
    sourceViewer.getControl().setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    sourceViewer.setDocument(doc);
    sourceViewer.setEditable(this.editable);
    tiSource.setControl(sourceViewer.getControl());
    tabFolder.setSelection(firstTab);
    if (firstTab == SOURCE_VIEWER)     node=null;
    return composite;
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
    MessageDialog.openError(this.getShell(),"String_Node_Str","String_Node_Str" + e.getLocalizedMessage());
    return null;
  }
}