Program: 68711
Project: 68711
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;
    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;
    if (sDataSet != null) {
      switchDataTable();
    }
    return;
  }
  String sDataCube=getDataServiceProvider().getDataCube();
  if (sDataCube != null && !getDataServiceProvider().isInheritanceOnly()) {
    btnUseData.setSelection(true);
    bIsInheritSelected=false;
    cmbDataItems.setText(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);
  String reportDataSet=getDataServiceProvider().getInheritedDataSet();
  if (reportDataSet != null) {
    switchDataTable();
  }
}

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());
  cmbDataItems.setVisibleItemCount(cmbDataItems.getItemCount());
  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(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);
}