Program: 70014
Project: 70014
Buggy source:
void buildAxes() throws IllegalArgumentException, ChartException {
  final Axis[] axa=getModel().getPrimaryBaseAxes();
  final Axis axPrimaryBase=axa[0];
  if (!axPrimaryBase.isSetOrientation()) {
    axPrimaryBase.setOrientation(Orientation.HORIZONTAL_LITERAL);
  }
  validateAxis(axPrimaryBase);
  final Axis axPrimaryOrthogonal=getModel().getPrimaryOrthogonalAxis(axPrimaryBase);
  if (!axPrimaryOrthogonal.isSetOrientation()) {
    axPrimaryOrthogonal.setOrientation(Orientation.VERTICAL_LITERAL);
  }
  validateAxis(axPrimaryOrthogonal);
  final Axis axAncillaryBase=getModel().getAncillaryBaseAxis(axPrimaryBase);
{
    axAncillaryBase.setOrientation(Orientation.HORIZONTAL_LITERAL);
  }
  validateAxis(axAncillaryBase);
  if (axPrimaryBase.getAssociatedAxes().size() > 1) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.COMPUTATION,"String_Node_Str",Messages.getResourceBundle(rtc.getULocale()));
  }
  aax=new AllAxes(null);
  insCA=aax.getInsets();
  aax.swapAxes(getModel().isTransposed());
  final OneAxis oaxPrimaryBase=new OneAxis(axPrimaryBase,IConstants.BASE_AXIS);
  oaxPrimaryBase.set(getOrientation(IConstants.BASE),transposeLabelPosition(IConstants.BASE,getLabelPosition(axPrimaryBase.getLabelPosition())),transposeLabelPosition(IConstants.BASE,getLabelPosition(axPrimaryBase.getTitlePosition())),axPrimaryBase.isSetCategoryAxis() && axPrimaryBase.isCategoryAxis(),axPrimaryBase.getScale().isTickBetweenCategories());
  oaxPrimaryBase.setGridProperties(axPrimaryBase.getMajorGrid().getLineAttributes(),axPrimaryBase.getMinorGrid().getLineAttributes(),axPrimaryBase.getMajorGrid().getTickAttributes(),axPrimaryBase.getMinorGrid().getTickAttributes(),transposeTickStyle(IConstants.BASE,getTickStyle(axPrimaryBase,MAJOR)),transposeTickStyle(IConstants.BASE,getTickStyle(axPrimaryBase,MINOR)),axPrimaryBase.getScale().getMinorGridsPerUnit());
  oaxPrimaryBase.set(axPrimaryBase.getLabel(),axPrimaryBase.getTitle());
  oaxPrimaryBase.set(getIntersection(axPrimaryBase));
  oaxPrimaryBase.set(axPrimaryBase.getLineAttributes());
  aax.definePrimary(oaxPrimaryBase);
  final OneAxis oaxPrimaryOrthogonal=new OneAxis(axPrimaryOrthogonal,IConstants.ORTHOGONAL_AXIS);
  oaxPrimaryOrthogonal.set(getOrientation(IConstants.ORTHOGONAL),transposeLabelPosition(IConstants.ORTHOGONAL,getLabelPosition(axPrimaryOrthogonal.getLabelPosition())),transposeLabelPosition(IConstants.ORTHOGONAL,getLabelPosition(axPrimaryOrthogonal.getTitlePosition())),axPrimaryOrthogonal.isSetCategoryAxis() && axPrimaryOrthogonal.isCategoryAxis(),axPrimaryOrthogonal.getScale().isTickBetweenCategories());
  oaxPrimaryOrthogonal.setGridProperties(axPrimaryOrthogonal.getMajorGrid().getLineAttributes(),axPrimaryOrthogonal.getMinorGrid().getLineAttributes(),axPrimaryOrthogonal.getMajorGrid().getTickAttributes(),axPrimaryOrthogonal.getMinorGrid().getTickAttributes(),transposeTickStyle(IConstants.ORTHOGONAL,getTickStyle(axPrimaryOrthogonal,MAJOR)),transposeTickStyle(IConstants.ORTHOGONAL,getTickStyle(axPrimaryOrthogonal,MINOR)),axPrimaryOrthogonal.getScale().getMinorGridsPerUnit());
  oaxPrimaryOrthogonal.set(axPrimaryOrthogonal.getLabel(),axPrimaryOrthogonal.getTitle());
  oaxPrimaryOrthogonal.set(getIntersection(axPrimaryOrthogonal));
  oaxPrimaryOrthogonal.set(axPrimaryOrthogonal.getLineAttributes());
  aax.definePrimary(oaxPrimaryOrthogonal);
  final OneAxis oaxAncillaryBase=new OneAxis(axAncillaryBase,IConstants.ANCILLARY_AXIS);
  oaxAncillaryBase.set(IConstants.HORIZONTAL,getLabelPosition(axAncillaryBase.getLabelPosition()),getLabelPosition(axAncillaryBase.getTitlePosition()),axAncillaryBase.isSetCategoryAxis() && axAncillaryBase.isCategoryAxis(),axAncillaryBase.getScale().isTickBetweenCategories());
  oaxAncillaryBase.setGridProperties(axAncillaryBase.getMajorGrid().getLineAttributes(),axAncillaryBase.getMinorGrid().getLineAttributes(),axAncillaryBase.getMajorGrid().getTickAttributes(),axAncillaryBase.getMinorGrid().getTickAttributes(),getTickStyle(axAncillaryBase,MAJOR),getTickStyle(axAncillaryBase,MINOR),axAncillaryBase.getScale().getMinorGridsPerUnit());
  oaxAncillaryBase.set(axAncillaryBase.getLabel(),axAncillaryBase.getTitle());
  oaxAncillaryBase.set(getIntersection(axAncillaryBase));
  oaxAncillaryBase.set(axAncillaryBase.getLineAttributes());
  aax.defineAncillaryBase(oaxAncillaryBase);
}

Fixed version (ground truth):
void buildAxes() throws IllegalArgumentException, ChartException {
  final Axis[] axa=getModel().getPrimaryBaseAxes();
  final Axis axPrimaryBase=axa[0];
  validateAxis(axPrimaryBase);
  final Axis axPrimaryOrthogonal=getModel().getPrimaryOrthogonalAxis(axPrimaryBase);
  validateAxis(axPrimaryOrthogonal);
  final Axis axAncillaryBase=getModel().getAncillaryBaseAxis(axPrimaryBase);
  validateAxis(axAncillaryBase);
  if (axPrimaryBase.getAssociatedAxes().size() > 1) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.COMPUTATION,"String_Node_Str",Messages.getResourceBundle(rtc.getULocale()));
  }
  aax=new AllAxes(null);
  insCA=aax.getInsets();
  aax.swapAxes(getModel().isTransposed());
  final OneAxis oaxPrimaryBase=new OneAxis(axPrimaryBase,IConstants.BASE_AXIS);
  oaxPrimaryBase.set(getOrientation(IConstants.BASE),transposeLabelPosition(IConstants.BASE,getLabelPosition(axPrimaryBase.getLabelPosition())),transposeLabelPosition(IConstants.BASE,getLabelPosition(axPrimaryBase.getTitlePosition())),axPrimaryBase.isCategoryAxis(),axPrimaryBase.getScale().isTickBetweenCategories());
  oaxPrimaryBase.setGridProperties(axPrimaryBase.getMajorGrid().getLineAttributes(),axPrimaryBase.getMinorGrid().getLineAttributes(),axPrimaryBase.getMajorGrid().getTickAttributes(),axPrimaryBase.getMinorGrid().getTickAttributes(),transposeTickStyle(IConstants.BASE,getTickStyle(axPrimaryBase,MAJOR)),transposeTickStyle(IConstants.BASE,getTickStyle(axPrimaryBase,MINOR)),axPrimaryBase.getScale().getMinorGridsPerUnit());
  oaxPrimaryBase.set(axPrimaryBase.getLabel(),axPrimaryBase.getTitle());
  oaxPrimaryBase.set(getIntersection(axPrimaryBase));
  oaxPrimaryBase.set(axPrimaryBase.getLineAttributes());
  aax.definePrimary(oaxPrimaryBase);
  final OneAxis oaxPrimaryOrthogonal=new OneAxis(axPrimaryOrthogonal,IConstants.ORTHOGONAL_AXIS);
  oaxPrimaryOrthogonal.set(getOrientation(IConstants.ORTHOGONAL),transposeLabelPosition(IConstants.ORTHOGONAL,getLabelPosition(axPrimaryOrthogonal.getLabelPosition())),transposeLabelPosition(IConstants.ORTHOGONAL,getLabelPosition(axPrimaryOrthogonal.getTitlePosition())),axPrimaryOrthogonal.isCategoryAxis(),axPrimaryOrthogonal.getScale().isTickBetweenCategories());
  oaxPrimaryOrthogonal.setGridProperties(axPrimaryOrthogonal.getMajorGrid().getLineAttributes(),axPrimaryOrthogonal.getMinorGrid().getLineAttributes(),axPrimaryOrthogonal.getMajorGrid().getTickAttributes(),axPrimaryOrthogonal.getMinorGrid().getTickAttributes(),transposeTickStyle(IConstants.ORTHOGONAL,getTickStyle(axPrimaryOrthogonal,MAJOR)),transposeTickStyle(IConstants.ORTHOGONAL,getTickStyle(axPrimaryOrthogonal,MINOR)),axPrimaryOrthogonal.getScale().getMinorGridsPerUnit());
  oaxPrimaryOrthogonal.set(axPrimaryOrthogonal.getLabel(),axPrimaryOrthogonal.getTitle());
  oaxPrimaryOrthogonal.set(getIntersection(axPrimaryOrthogonal));
  oaxPrimaryOrthogonal.set(axPrimaryOrthogonal.getLineAttributes());
  aax.definePrimary(oaxPrimaryOrthogonal);
  final OneAxis oaxAncillaryBase=new OneAxis(axAncillaryBase,IConstants.ANCILLARY_AXIS);
  oaxAncillaryBase.set(IConstants.HORIZONTAL,getLabelPosition(axAncillaryBase.getLabelPosition()),getLabelPosition(axAncillaryBase.getTitlePosition()),axAncillaryBase.isCategoryAxis(),axAncillaryBase.getScale().isTickBetweenCategories());
  oaxAncillaryBase.setGridProperties(axAncillaryBase.getMajorGrid().getLineAttributes(),axAncillaryBase.getMinorGrid().getLineAttributes(),axAncillaryBase.getMajorGrid().getTickAttributes(),axAncillaryBase.getMinorGrid().getTickAttributes(),getTickStyle(axAncillaryBase,MAJOR),getTickStyle(axAncillaryBase,MINOR),axAncillaryBase.getScale().getMinorGridsPerUnit());
  oaxAncillaryBase.set(axAncillaryBase.getLabel(),axAncillaryBase.getTitle());
  oaxAncillaryBase.set(getIntersection(axAncillaryBase));
  oaxAncillaryBase.set(axAncillaryBase.getLineAttributes());
  aax.defineAncillaryBase(oaxAncillaryBase);
}