Program: 66780
Project: 66780
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (e.widget.equals(btn)) {
    int iSelection=cbType.getSelectionIndex();
    cm=PrimitiveCharts.createChart(iSelection);
    if (cm instanceof ChartWithAxes) {
      cbTransposed.setEnabled(true);
      cbLogarithmic.setEnabled(true);
      cbPercent.setEnabled(true);
      ChartWithAxes cwa=((ChartWithAxes)cm);
      cwa.setTransposed(cbTransposed.getSelection());
      Axis ax=cwa.getPrimaryOrthogonalAxis(cwa.getPrimaryBaseAxes()[0]);
      if (cbLogarithmic.getSelection()) {
        if (ax.getType() == AxisType.LINEAR_LITERAL) {
          ax.setType(AxisType.LOGARITHMIC_LITERAL);
        }
      }
 else {
        if (ax.getType() == AxisType.LOGARITHMIC_LITERAL) {
          ax.setType(AxisType.LINEAR_LITERAL);
        }
      }
      if (cbPercent.getSelection() == true) {
        ax.setFormatSpecifier(JavaNumberFormatSpecifierImpl.create("String_Node_Str"));
      }
 else {
        ax.setFormatSpecifier(null);
      }
    }
 else     if (cm instanceof ChartWithoutAxes) {
      cbTransposed.setEnabled(false);
      cbLogarithmic.setEnabled(false);
      cbPercent.setEnabled(false);
    }
    if (cbType.getSelectionIndex() == 7 || cbType.getSelectionIndex() == 6 || cbType.getSelectionIndex() == 9) {
      cm.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
    }
 else {
switch (cbDimension.getSelectionIndex()) {
case 0:
        cm.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
      break;
case 1:
    cm.setDimension(ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL);
  break;
}
}
bNeedsGeneration=true;
this.redraw();
}
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  if (e.widget.equals(btn)) {
    int iSelection=cbType.getSelectionIndex();
    cm=PrimitiveCharts.createChart(iSelection);
    if (cm instanceof ChartWithAxes) {
      cbPercent.setEnabled(true);
      ChartWithAxes cwa=((ChartWithAxes)cm);
      cwa.setTransposed(cbTransposed.getSelection());
      Axis ax=cwa.getPrimaryOrthogonalAxis(cwa.getPrimaryBaseAxes()[0]);
      if (cbLogarithmic.getSelection()) {
        if (ax.getType() == AxisType.LINEAR_LITERAL) {
          ax.setType(AxisType.LOGARITHMIC_LITERAL);
        }
      }
 else {
        if (ax.getType() == AxisType.LOGARITHMIC_LITERAL) {
          ax.setType(AxisType.LINEAR_LITERAL);
        }
      }
      if (cbPercent.getSelection() == true) {
        ax.setFormatSpecifier(JavaNumberFormatSpecifierImpl.create("String_Node_Str"));
      }
 else {
        ax.setFormatSpecifier(null);
      }
    }
 else     if (cm instanceof ChartWithoutAxes) {
      cbTransposed.setEnabled(false);
      cbLogarithmic.setEnabled(false);
      cbPercent.setEnabled(false);
    }
    if (cbType.getSelectionIndex() == 7 || cbType.getSelectionIndex() == 6 || cbType.getSelectionIndex() == 9) {
      cm.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
    }
 else {
switch (cbDimension.getSelectionIndex()) {
case 0:
        cm.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
      break;
case 1:
    cm.setDimension(ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL);
  break;
}
}
bNeedsGeneration=true;
this.redraw();
}
}