Program: 68496
Project: 68496
Buggy source:
private void initDataSelector(){
  cmbInherit.setItems(new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")});
  if (dataProvider.isInheritColumnsSet()) {
    cmbInherit.select(dataProvider.isInheritColumnsOnly() ? 1 : 0);
  }
 else {
    if (ChartReportItemUtil.hasAggregation(getChartModel())) {
      cmbInherit.select(1);
      getContext().setInheritColumnsOnly(true);
    }
 else {
      cmbInherit.select(0);
      getContext().setInheritColumnsOnly(false);
    }
  }
  cmbInherit.setEnabled(false);
  cmbDataItems.setItems(createDataComboItems());
  cmbDataItems.setVisibleItemCount(cmbDataItems.getItemCount());
  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(getDataServiceProvider().getInheritedDataSet() != null && ChartReportItemUtil.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(){
  cmbInherit.setItems(new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")});
  if (dataProvider.isInheritColumnsSet()) {
    cmbInherit.select(dataProvider.isInheritColumnsOnly() ? 1 : 0);
  }
 else {
    if (ChartReportItemUtil.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(getDataServiceProvider().getInheritedDataSet() != null && ChartReportItemUtil.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);
}