Program: 68165
Project: 68165
Buggy source:
private void init(AxesRenderer renderer,IPrimitiveRenderer ipr,Plot pl,OneAxis ax,int iWhatToDraw) throws ChartException {
  this.renderer=renderer;
  this.ax=ax;
  this.iWhatToDraw=iWhatToDraw;
  this.ipr=ipr;
  axModel=ax.getModelAxis();
  pwa=(PlotWithAxes)renderer.getComputations();
  cComp=pwa.getChartComputation();
  insCA=pwa.getAxes().getInsets();
  sh=getRunTimeContext().getScriptHandler();
  dLocation=ax.getAxisCoordinate();
  sc=ax.getScale();
  iv=ax.getIntersectionValue();
  iMajorTickStyle=ax.getGrid().getTickStyle(IConstants.MAJOR);
  iMinorTickStyle=ax.getGrid().getTickStyle(IConstants.MINOR);
  iLabelLocation=ax.getLabelPosition();
  iOrientation=ax.getOrientation();
  xs=renderer.getDevice().getDisplayServer();
  la=goFactory.copyOf(ax.getLabel());
  daEndPoints=sc.getEndPoints();
  da=sc.getTickCordinates();
  daMinor=sc.getMinorCoordinates(ax.getGrid().getMinorCountPerMajor());
  sText=null;
  iDimension=pwa.getDimension();
  nde=NumberDataElementImpl.create(0);
  dSeriesThickness=pwa.getSeriesThickness();
  bAxisLabelStaggered=sc.isAxisLabelStaggered();
  df=null;
  lia=ax.getLineAttributes();
  liaMajorTick=ax.getGrid().getTickAttributes(IConstants.MAJOR);
  liaMinorTick=ax.getGrid().getTickAttributes(IConstants.MINOR);
  bRenderAxisLabels=ax.isShowLabels() && ((iWhatToDraw & IConstants.LABELS) == IConstants.LABELS && la.isVisible());
  bRenderAxisTitle=((iWhatToDraw & IConstants.LABELS) == IConstants.LABELS);
  lo=goFactory.createLocation(0,0);
  trae=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(axModel),TransformationEvent.class);
  tre=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(axModel),TextRenderEvent.class);
  lre=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(axModel),LineRenderEvent.class);
  bRendering3D=iDimension == IConstants.THREE_D;
  bRenderOrthogonal3DAxis=(iWhatToDraw & IConstants.ORTHOGONAL_AXIS) == IConstants.ORTHOGONAL_AXIS && bRendering3D;
  bRenderBase3DAxis=(iWhatToDraw & IConstants.BASE_AXIS) == IConstants.BASE_AXIS && bRendering3D;
  bRenderAncillary3DAxis=(iWhatToDraw & IConstants.ANCILLARY_AXIS) == IConstants.ANCILLARY_AXIS && bRendering3D;
  dc=renderer.getDeferredCache();
  axisType=ax.getAxisType();
  panningOffset=renderer.getPanningOffset();
  bTransposed=renderer.isTransposed();
  daEndPoints3D=null;
  da3D=null;
  lo3d=null;
  t3dre=null;
  l3dre=null;
  bTickBetweenCategories=axModel.getScale().isTickBetweenCategories();
  bLabelWithinAxes=ax.getModelAxis().isLabelWithinAxes();
}

Fixed version (ground truth):
private void init(AxesRenderer renderer,IPrimitiveRenderer ipr,Plot pl,OneAxis ax,int iWhatToDraw) throws ChartException {
  this.renderer=renderer;
  this.ax=ax;
  this.iWhatToDraw=iWhatToDraw;
  this.ipr=ipr;
  axModel=ax.getModelAxis();
  pwa=(PlotWithAxes)renderer.getComputations();
  cComp=pwa.getChartComputation();
  insCA=pwa.getAxes().getInsets();
  sh=getRunTimeContext().getScriptHandler();
  dLocation=ax.getAxisCoordinate();
  sc=ax.getScale();
  iv=ax.getIntersectionValue();
  iMajorTickStyle=ax.getGrid().getTickStyle(IConstants.MAJOR);
  iMinorTickStyle=ax.getGrid().getTickStyle(IConstants.MINOR);
  iLabelLocation=ax.getLabelPosition();
  iOrientation=ax.getOrientation();
  xs=renderer.getDevice().getDisplayServer();
  la=goFactory.copyOf(ax.getLabel());
  daEndPoints=sc.getEndPoints();
  da=sc.getTickCordinates();
  daMinor=sc.getMinorCoordinates(ax.getGrid().getMinorCountPerMajor());
  sText=null;
  iDimension=pwa.getDimension();
  nde=NumberDataElementImpl.create(0);
  dSeriesThickness=pwa.getSeriesThickness();
  bAxisLabelStaggered=sc.isAxisLabelStaggered();
  df=null;
  lia=ax.getLineAttributes();
  liaMajorTick=ax.getGrid().getTickAttributes(IConstants.MAJOR);
  liaMinorTick=ax.getGrid().getTickAttributes(IConstants.MINOR);
  bRenderAxisLabels=ax.isShowLabels() && ((iWhatToDraw & IConstants.LABELS) == IConstants.LABELS && la.isVisible());
  bRenderAxisTitle=((iWhatToDraw & IConstants.LABELS) == IConstants.LABELS);
  lo=goFactory.createLocation(0,0);
  trae=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(axModel),TransformationEvent.class);
  tre=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(axModel),TextRenderEvent.class);
  lre=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(axModel),LineRenderEvent.class);
  bRendering3D=iDimension == IConstants.THREE_D;
  bRenderOrthogonal3DAxis=(iWhatToDraw & IConstants.ORTHOGONAL_AXIS) == IConstants.ORTHOGONAL_AXIS && bRendering3D;
  bRenderBase3DAxis=(iWhatToDraw & IConstants.BASE_AXIS) == IConstants.BASE_AXIS && bRendering3D;
  bRenderAncillary3DAxis=(iWhatToDraw & IConstants.ANCILLARY_AXIS) == IConstants.ANCILLARY_AXIS && bRendering3D;
  dc=renderer.getDeferredCache();
  axisType=ax.getAxisType();
  panningOffset=renderer.getPanningOffset();
  bTransposed=renderer.isTransposed();
  daEndPoints3D=null;
  da3D=null;
  lo3d=null;
  t3dre=null;
  l3dre=null;
  bTickBetweenCategories=ax.isTickBwtweenCategories();
  bLabelWithinAxes=ax.getModelAxis().isLabelWithinAxes();
}