Program: 67751
Project: 67751
Buggy source:
private void initDataSelector(){
  boolean isInheritingSummaryTable=isInheritingSummaryTable();
  cmbInherit.setItems(new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")});
  if (isInheritingSummaryTable) {
    cmbInherit.select(0);
    getContext().setInheritColumnsOnly(true);
  }
 else   if (dataProvider.isInheritColumnsSet()) {
    cmbInherit.select(dataProvider.isInheritColumnsOnly() ? 1 : 0);
  }
 else {
    if (ChartItemUtil.hasAggregation(getChartModel())) {
      cmbInherit.select(1);
      getContext().setInheritColumnsOnly(true);
    }
 else {
      cmbInherit.select(0);
      getContext().setInheritColumnsOnly(false);
    }
  }
  cmbInherit.setEnabled(false);
  cmbDataItems.setItems(createDataComboItems());
  String sItemRef=getDataServiceProvider().getReportItemReference();
  if (sItemRef != null) {
    btnUseData.setSelection(true);
    bIsInheritSelected=false;
    ChartUIUtil.setText(cmbDataItems,sItemRef);
    currentData=sItemRef;
    return;
  }
  String sDataSet=getDataServiceProvider().getDataSet();
  if (sDataSet != null && !getDataServiceProvider().isInheritanceOnly()) {
    btnUseData.setSelection(true);
    bIsInheritSelected=false;
    ChartUIUtil.setText(cmbDataItems,sDataSet);
    currentData=sDataSet;
    return;
  }
  String sDataCube=getDataServiceProvider().getDataCube();
  if (sDataCube != null && !getDataServiceProvider().isInheritanceOnly()) {
    btnUseData.setSelection(true);
    bIsInheritSelected=false;
    ChartUIUtil.setText(cmbDataItems,sDataCube);
    currentData=sDataCube;
    return;
  }
  cmbInherit.setEnabled(!isInheritingSummaryTable && getDataServiceProvider().getInheritedDataSet() != null && ChartItemUtil.isContainerInheritable(itemHandle));
  if (!cmbInherit.isEnabled()) {
    if (itemHandle.getContainer() instanceof MultiViewsHandle || itemHandle.getDataBindingReference() != null) {
      cmbInherit.select(0);
    }
 else {
      cmbInherit.select(1);
    }
  }
  btnInherit.setSelection(true);
  bIsInheritSelected=true;
  if (getDataServiceProvider().isInheritanceOnly()) {
    btnUseData.setSelection(false);
    btnUseData.setEnabled(false);
  }
  cmbDataItems.select(0);
  currentData=null;
  cmbDataItems.setEnabled(false);
  getDataServiceProvider().setDataSet(null);
}

Fixed version (ground truth):
private void initDataSelector(){
  boolean isInheritingSummaryTable=isInheritingSummaryTable();
  cmbInherit.setItems(new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")});
  if (isInheritingSummaryTable) {
    cmbInherit.select(0);
    getContext().setInheritColumnsOnly(true);
  }
 else   if (dataProvider.isInheritColumnsSet()) {
    cmbInherit.select(dataProvider.isInheritColumnsOnly() ? 1 : 0);
  }
 else {
    if (ChartItemUtil.hasAggregation(getChartModel())) {
      cmbInherit.select(1);
      getContext().setInheritColumnsOnly(true);
    }
 else {
      cmbInherit.select(0);
      getContext().setInheritColumnsOnly(false);
    }
  }
  cmbInherit.setEnabled(false);
  cmbDataItems.setItems(createDataComboItems());
  String sItemRef=getDataServiceProvider().getReportItemReference();
  if (sItemRef != null) {
    btnUseData.setSelection(true);
    bIsInheritSelected=false;
    cmbDataItems.setText(sItemRef);
    currentData=sItemRef;
    return;
  }
  String sDataSet=getDataServiceProvider().getDataSet();
  if (sDataSet != null && !getDataServiceProvider().isInheritanceOnly()) {
    btnUseData.setSelection(true);
    bIsInheritSelected=false;
    cmbDataItems.setText(sDataSet);
    currentData=sDataSet;
    return;
  }
  String sDataCube=getDataServiceProvider().getDataCube();
  if (sDataCube != null && !getDataServiceProvider().isInheritanceOnly()) {
    btnUseData.setSelection(true);
    bIsInheritSelected=false;
    cmbDataItems.setText(sDataCube);
    currentData=sDataCube;
    return;
  }
  cmbInherit.setEnabled(!isInheritingSummaryTable && getDataServiceProvider().getInheritedDataSet() != null && ChartItemUtil.isContainerInheritable(itemHandle));
  if (!cmbInherit.isEnabled()) {
    if (itemHandle.getContainer() instanceof MultiViewsHandle || itemHandle.getDataBindingReference() != null) {
      cmbInherit.select(0);
    }
 else {
      cmbInherit.select(1);
    }
  }
  btnInherit.setSelection(true);
  bIsInheritSelected=true;
  if (getDataServiceProvider().isInheritanceOnly()) {
    btnUseData.setSelection(false);
    btnUseData.setEnabled(false);
  }
  cmbDataItems.select(0);
  currentData=null;
  cmbDataItems.setEnabled(false);
  getDataServiceProvider().setDataSet(null);
}