Program: 78209
Project: 78209
Buggy source:
/** 
 * Overridden behavior for graphic element series that are plotted along axes
 * @param bo
 */
public final void render(Map htRenderers,Bounds bo) throws ChartException {
  final boolean bFirstInSequence=(iSeriesIndex == 0);
  final boolean bLastInSequence=(iSeriesIndex == iSeriesCount - 1);
  long lTimer=System.currentTimeMillis();
  final Chart cm=getModel();
  final IDeviceRenderer idr=getDevice();
  final ScriptHandler sh=getRunTimeContext().getScriptHandler();
  if (bFirstInSequence) {
    lTimer=System.currentTimeMillis();
    htRenderers.put(TIMER,new Long(lTimer));
    Block bl=cm.getBlock();
    final Enumeration e=bl.children(true);
    final BlockGenerationEvent bge=new BlockGenerationEvent(bl);
    ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
    bge.updateBlock(bl);
    renderChartBlock(idr,bl,StructureSource.createUnknown(bl));
    ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
    while (e.hasMoreElements()) {
      bl=(Block)e.nextElement();
      bge.updateBlock(bl);
      if (bl instanceof Plot) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderPlot(idr,(Plot)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
        if (!bLastInSequence) {
          break;
        }
      }
 else       if (bl instanceof TitleBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderTitle(idr,(TitleBlock)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof LabelBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLabel(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof Legend) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLegend(idr,(Legend)bl,htRenderers);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderBlock(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
    }
  }
 else   if (bLastInSequence) {
    Block bl=cm.getBlock();
    final Enumeration e=bl.children(true);
    final BlockGenerationEvent bge=new BlockGenerationEvent(this);
    boolean bStarted=false;
    while (e.hasMoreElements()) {
      bl=(Block)e.nextElement();
      if (!bStarted && !bl.isPlot()) {
        continue;
      }
      bStarted=true;
      bge.updateBlock(bl);
      if (bl instanceof Plot) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderPlot(idr,(Plot)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof TitleBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderTitle(idr,(TitleBlock)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof LabelBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLabel(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof Legend) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLegend(idr,(Legend)bl,htRenderers);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderBlock(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
    }
  }
 else {
    final BlockGenerationEvent bge=new BlockGenerationEvent(this);
    Plot p=cm.getPlot();
    bge.updateBlock(p);
    ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,p,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,p);
    renderPlot(idr,p);
    ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,p,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,p);
  }
  lTimer=System.currentTimeMillis() - lTimer;
  if (htRenderers.containsKey(TIMER)) {
    final Long l=(Long)htRenderers.get(TIMER);
    htRenderers.put(TIMER,new Long(l.longValue() + lTimer));
  }
 else {
    htRenderers.put(TIMER,new Long(lTimer));
  }
  if (bLastInSequence) {
    Object obj=getComputations();
    if (obj instanceof PlotWith2DAxes) {
      final PlotWith2DAxes pw2da=(PlotWith2DAxes)getComputations();
      pw2da.getStackedSeriesLookup().resetSubUnits();
    }
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{new Long(lTimer)},getRunTimeContext().getULocale()));
    htRenderers.remove(TIMER);
  }
}

Fixed version (ground truth):
/** 
 * Overridden behavior for graphic element series that are plotted along axes
 * @param bo
 */
public final void render(Map htRenderers,Bounds bo) throws ChartException {
  final boolean bFirstInSequence=(iSeriesIndex == 0);
  final boolean bLastInSequence=(iSeriesIndex == iSeriesCount - 1);
  long lTimer=System.currentTimeMillis();
  final Chart cm=getModel();
  final IDeviceRenderer idr=getDevice();
  final ScriptHandler sh=getRunTimeContext().getScriptHandler();
  if (bFirstInSequence) {
    lTimer=System.currentTimeMillis();
    htRenderers.put(TIMER,new Long(lTimer));
    Block bl=cm.getBlock();
    final Enumeration e=bl.children(true);
    final BlockGenerationEvent bge=new BlockGenerationEvent(bl);
    ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
    bge.updateBlock(bl);
    renderChartBlock(idr,bl,StructureSource.createChartBlock(bl));
    ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
    while (e.hasMoreElements()) {
      bl=(Block)e.nextElement();
      bge.updateBlock(bl);
      if (bl instanceof Plot) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderPlot(idr,(Plot)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
        if (!bLastInSequence) {
          break;
        }
      }
 else       if (bl instanceof TitleBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderTitle(idr,(TitleBlock)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof LabelBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLabel(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof Legend) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLegend(idr,(Legend)bl,htRenderers);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderBlock(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
    }
  }
 else   if (bLastInSequence) {
    Block bl=cm.getBlock();
    final Enumeration e=bl.children(true);
    final BlockGenerationEvent bge=new BlockGenerationEvent(this);
    boolean bStarted=false;
    while (e.hasMoreElements()) {
      bl=(Block)e.nextElement();
      if (!bStarted && !bl.isPlot()) {
        continue;
      }
      bStarted=true;
      bge.updateBlock(bl);
      if (bl instanceof Plot) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderPlot(idr,(Plot)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof TitleBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderTitle(idr,(TitleBlock)bl);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof LabelBlock) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLabel(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else       if (bl instanceof Legend) {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderLegend(idr,(Legend)bl,htRenderers);
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
 else {
        ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,bl);
        renderBlock(idr,bl,StructureSource.createUnknown(bl));
        ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,bl,getRunTimeContext().getScriptContext());
        getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,bl);
      }
    }
  }
 else {
    final BlockGenerationEvent bge=new BlockGenerationEvent(this);
    Plot p=cm.getPlot();
    bge.updateBlock(p);
    ScriptHandler.callFunction(sh,ScriptHandler.BEFORE_DRAW_BLOCK,p,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_BLOCK,p);
    renderPlot(idr,p);
    ScriptHandler.callFunction(sh,ScriptHandler.AFTER_DRAW_BLOCK,p,getRunTimeContext().getScriptContext());
    getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_BLOCK,p);
  }
  lTimer=System.currentTimeMillis() - lTimer;
  if (htRenderers.containsKey(TIMER)) {
    final Long l=(Long)htRenderers.get(TIMER);
    htRenderers.put(TIMER,new Long(l.longValue() + lTimer));
  }
 else {
    htRenderers.put(TIMER,new Long(lTimer));
  }
  if (bLastInSequence) {
    Object obj=getComputations();
    if (obj instanceof PlotWith2DAxes) {
      final PlotWith2DAxes pw2da=(PlotWith2DAxes)getComputations();
      pw2da.getStackedSeriesLookup().resetSubUnits();
    }
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{new Long(lTimer)},getRunTimeContext().getULocale()));
    htRenderers.remove(TIMER);
  }
}