Program: 69773
Project: 69773
Buggy source:
private void updateDragDataSource(){
  if (isCubeMode()) {
    if (getDataServiceProvider().getReportItemReference() != null) {
      if (!getDataServiceProvider().checkState(IDataServiceProvider.SHARE_CHART_QUERY)) {
        ((GridData)columnListDescription.getLayoutData()).exclude=false;
        columnListDescription.setVisible(true);
        columnListDescription.setText(Messages.getString("String_Node_Str"));
      }
 else {
        ((GridData)columnListDescription.getLayoutData()).exclude=true;
        columnListDescription.setVisible(false);
      }
      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) {
    ((GridData)columnListDescription.getLayoutData()).exclude=false;
    columnListDescription.setVisible(true);
    columnListDescription.setText(Messages.getString("String_Node_Str"));
  }
  btnShowDataPreviewB.setEnabled(true);
  cmpColumnsList.layout();
  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();
    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();
}