Program: 67332
Project: 67332
Buggy source:
private void updateDragDataSource(){
  if (dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {
    if (columnListDescription != null) {
      ((GridData)columnListDescription.getLayoutData()).exclude=true;
      columnListDescription.setVisible(false);
      cmpColumnsList.layout();
    }
    if (dataPreviewDescription != null) {
      ((GridData)dataPreviewDescription.getLayoutData()).exclude=true;
      dataPreviewDescription.setVisible(false);
      cmpDataPreview.layout();
    }
  }
  if (isCubeMode()) {
    if (getDataServiceProvider().checkState(IDataServiceProvider.SHARE_CROSSTAB_QUERY)) {
      if (!getDataServiceProvider().checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {
        ((GridData)columnListDescription.getLayoutData()).exclude=false;
        columnListDescription.setVisible(true);
        columnListDescription.setText(Messages.getString("String_Node_Str"));
        cmpColumnsList.layout();
      }
      getContext().setShowingDataPreview(Boolean.FALSE);
      btnShowDataPreviewB.setSelection(false);
      btnShowDataPreviewB.setEnabled(false);
      stackLayout.topControl=cmpColumnsList;
      refreshDataPreviewPane();
    }
 else {
      stackLayout.topControl=cmpCubeTree;
      cubeTreeViewer.setInput(getCube());
    }
    cmpStack.layout();
    return;
  }
  if (columnListDescription != null) {
    if (!dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {
      ((GridData)columnListDescription.getLayoutData()).exclude=false;
      columnListDescription.setVisible(true);
      columnListDescription.setText(Messages.getString("String_Node_Str"));
      cmpColumnsList.layout();
    }
  }
  btnShowDataPreviewB.setEnabled(true);
  String pValue=(previousData == null) ? "String_Node_Str" : previousData;
  String cValue=(currentData == null) ? "String_Node_Str" : currentData;
  if (!pValue.equals(cValue)) {
    getContext().setShowingDataPreview(null);
  }
  previousData=currentData;
  try {
    if (!getContext().isSetShowingDataPreview() && getDataServiceProvider().getPreviewHeadersInfo().length >= 6) {
      getContext().setShowingDataPreview(Boolean.FALSE);
    }
    ChartWizard.removeException(ChartWizard.StaChartDSh_gHeaders_ID);
  }
 catch (  NullPointerException e) {
  }
catch (  ChartException e) {
    ChartWizard.showException(ChartWizard.StaChartDSh_gHeaders_ID,e.getMessage());
  }
  btnShowDataPreviewA.setSelection(getContext().isShowingDataPreview());
  btnShowDataPreviewB.setSelection(getContext().isShowingDataPreview());
  if (getContext().isShowingDataPreview()) {
    stackLayout.topControl=cmpDataPreview;
  }
 else {
    stackLayout.topControl=cmpColumnsList;
  }
  refreshDataPreviewPane();
  cmpStack.layout();
}

Fixed version (ground truth):
private void updateDragDataSource(){
  if (dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {
    if (columnListDescription != null) {
      ((GridData)columnListDescription.getLayoutData()).exclude=true;
      columnListDescription.setVisible(false);
      cmpColumnsList.layout();
    }
    if (dataPreviewDescription != null) {
      ((GridData)dataPreviewDescription.getLayoutData()).exclude=true;
      dataPreviewDescription.setVisible(false);
      cmpDataPreview.layout();
    }
  }
  if (isCubeMode()) {
    if (getDataServiceProvider().checkState(IDataServiceProvider.SHARE_CROSSTAB_QUERY)) {
      if (!getDataServiceProvider().checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {
        ((GridData)columnListDescription.getLayoutData()).exclude=false;
        columnListDescription.setVisible(true);
        columnListDescription.setText(Messages.getString("String_Node_Str"));
        cmpColumnsList.layout();
      }
      getContext().setShowingDataPreview(Boolean.FALSE);
      btnShowDataPreviewB.setSelection(false);
      btnShowDataPreviewB.setEnabled(false);
      stackLayout.topControl=cmpColumnsList;
      refreshDataPreviewPane();
    }
 else {
      stackLayout.topControl=cmpCubeTree;
      cubeTreeViewer.setInput(getCube());
    }
    cmpStack.layout();
    ChartWizard.removeException(ChartWizard.StaChartDSh_dPreview_ID);
    return;
  }
  if (columnListDescription != null) {
    if (!dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {
      ((GridData)columnListDescription.getLayoutData()).exclude=false;
      columnListDescription.setVisible(true);
      columnListDescription.setText(Messages.getString("String_Node_Str"));
      cmpColumnsList.layout();
    }
  }
  btnShowDataPreviewB.setEnabled(true);
  String pValue=(previousData == null) ? "String_Node_Str" : previousData;
  String cValue=(currentData == null) ? "String_Node_Str" : currentData;
  if (!pValue.equals(cValue)) {
    getContext().setShowingDataPreview(null);
  }
  previousData=currentData;
  try {
    if (!getContext().isSetShowingDataPreview() && getDataServiceProvider().getPreviewHeadersInfo().length >= 6) {
      getContext().setShowingDataPreview(Boolean.FALSE);
    }
    ChartWizard.removeException(ChartWizard.StaChartDSh_gHeaders_ID);
  }
 catch (  NullPointerException e) {
  }
catch (  ChartException e) {
    ChartWizard.showException(ChartWizard.StaChartDSh_gHeaders_ID,e.getMessage());
  }
  btnShowDataPreviewA.setSelection(getContext().isShowingDataPreview());
  btnShowDataPreviewB.setSelection(getContext().isShowingDataPreview());
  if (getContext().isShowingDataPreview()) {
    stackLayout.topControl=cmpDataPreview;
  }
 else {
    stackLayout.topControl=cmpColumnsList;
  }
  refreshDataPreviewPane();
  cmpStack.layout();
}