Program: 78584
Project: 78584
Buggy source:
public Object onRowSets(IRowSet[] irsa) throws BirtException {
  if (irsa == null || irsa.length != 1 || ibqda == null || ibqda.length != 1 || irsa[0] == null) {
    logger.log(new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,"String_Node_Str",ResourceBundle.getBundle(Messages.REPORT_ITEM,rtc.getLocale())));
    return null;
  }
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
  try {
    String javaHandlerClass=handle.getEventHandlerClass();
    if (javaHandlerClass != null && javaHandlerClass.length() > 0) {
      cm.setScript(javaHandlerClass);
    }
    BIRTDataRowEvaluator rowAdapter=new BIRTDataRowEvaluator(irsa[0],ibqda[0]);
    Generator.instance().bindData(rowAdapter,new BIRTActionEvaluator(),cm,rtc);
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
    try {
      fChartImage=File.createTempFile("String_Node_Str","String_Node_Str" + sExtension);
      logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{sExtension,fChartImage.getPath()}));
    }
 catch (    IOException ioex) {
      throw new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,ioex);
    }
    idr=PluginSettings.instance().getDevice("String_Node_Str" + sExtension.toUpperCase(Locale.US));
    idr.setProperty(IDeviceRenderer.DPI_RESOLUTION,new Integer(dpi));
    final Bounds originalBounds=cm.getBlock().getBounds();
    final Bounds bo=(Bounds)EcoreUtil.copy(originalBounds);
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",bo));
    final Generator gr=Generator.instance();
    GeneratedChartState gcs=null;
    rtc.setScriptClassLoader(new BIRTScriptClassLoader());
    rtc.setActionRenderer(new BIRTActionRenderer(this.handle,this.ah,rowAdapter,this.context));
    gcs=gr.build(idr.getDisplayServer(),cm,bo,new BIRTExternalContext(context),rtc,new ChartReportStyleProcessor(handle));
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
    idr.setProperty(IDeviceRenderer.FILE_IDENTIFIER,fChartImage.getPath());
    idr.setProperty(IDeviceRenderer.UPDATE_NOTIFIER,new EmptyUpdateNotifier(cm,gcs.getChartModel()));
    gr.render(idr,gcs);
    rowAdapter.close();
    try {
      fis=new FileInputStream(fChartImage.getPath());
    }
 catch (    IOException ioex) {
      throw new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,ioex);
    }
    if (!"String_Node_Str".equals(sExtension) && idr instanceof IImageMapEmitter) {
      imageMap=((IImageMapEmitter)idr).getImageMap();
    }
  }
 catch (  BirtException ex) {
    if (ex.getCause() instanceof ChartException && ((ChartException)ex.getCause()).getType() == ChartException.ZERO_DATASET) {
      logger.log(ex);
      return null;
    }
    if ((ex.getCause() instanceof ChartException && ((ChartException)ex.getCause()).getType() == ChartException.INVALID_IMAGE_SIZE) || (ex instanceof ChartException && ((ChartException)ex).getType() == ChartException.INVALID_IMAGE_SIZE)) {
      logger.log(ex);
      return null;
    }
    logger.log(ILogger.ERROR,Messages.getString("String_Node_Str"));
    logger.log(ex);
    throw ex;
  }
catch (  RuntimeException ex) {
    logger.log(ILogger.ERROR,Messages.getString("String_Node_Str"));
    logger.log(ex);
    throw new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,ex);
  }
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
  if ("String_Node_Str".equals(sExtension)) {
    return fis;
  }
 else {
    return new Object[]{fis,imageMap};
  }
}

Fixed version (ground truth):
public Object onRowSets(IRowSet[] irsa) throws BirtException {
  if (irsa == null || irsa.length != 1 || ibqda == null || ibqda.length != 1 || irsa[0] == null) {
    logger.log(new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,"String_Node_Str",ResourceBundle.getBundle(Messages.REPORT_ITEM,rtc.getLocale())));
    return null;
  }
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
  try {
    String javaHandlerClass=handle.getEventHandlerClass();
    if (javaHandlerClass != null && javaHandlerClass.length() > 0) {
      cm.setScript(javaHandlerClass);
    }
    BIRTDataRowEvaluator rowAdapter=new BIRTDataRowEvaluator(irsa[0],ibqda[0]);
    Generator.instance().bindData(rowAdapter,new BIRTActionEvaluator(),cm,rtc);
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
    try {
      fChartImage=File.createTempFile("String_Node_Str","String_Node_Str" + sExtension);
      logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{sExtension,fChartImage.getPath()}));
    }
 catch (    IOException ioex) {
      throw new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,ioex);
    }
    idr=PluginSettings.instance().getDevice("String_Node_Str" + sExtension.toUpperCase(Locale.US));
    idr.setProperty(IDeviceRenderer.DPI_RESOLUTION,new Integer(dpi));
    final Bounds originalBounds=cm.getBlock().getBounds();
    final Bounds bo=(Bounds)EcoreUtil.copy(originalBounds);
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",bo));
    final Generator gr=Generator.instance();
    GeneratedChartState gcs=null;
    rtc.setScriptClassLoader(new BIRTScriptClassLoader());
    rtc.setActionRenderer(new BIRTActionRenderer(this.handle,this.ah,rowAdapter,this.context));
    rtc.setMessageLookup(new BIRTMessageLookup(context));
    gcs=gr.build(idr.getDisplayServer(),cm,bo,new BIRTExternalContext(context),rtc,new ChartReportStyleProcessor(handle));
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
    idr.setProperty(IDeviceRenderer.FILE_IDENTIFIER,fChartImage.getPath());
    idr.setProperty(IDeviceRenderer.UPDATE_NOTIFIER,new EmptyUpdateNotifier(cm,gcs.getChartModel()));
    gr.render(idr,gcs);
    rowAdapter.close();
    try {
      fis=new FileInputStream(fChartImage.getPath());
    }
 catch (    IOException ioex) {
      throw new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,ioex);
    }
    if (!"String_Node_Str".equals(sExtension) && idr instanceof IImageMapEmitter) {
      imageMap=((IImageMapEmitter)idr).getImageMap();
    }
  }
 catch (  BirtException ex) {
    if (ex.getCause() instanceof ChartException && ((ChartException)ex.getCause()).getType() == ChartException.ZERO_DATASET) {
      logger.log(ex);
      return null;
    }
    if ((ex.getCause() instanceof ChartException && ((ChartException)ex.getCause()).getType() == ChartException.INVALID_IMAGE_SIZE) || (ex instanceof ChartException && ((ChartException)ex).getType() == ChartException.INVALID_IMAGE_SIZE)) {
      logger.log(ex);
      return null;
    }
    logger.log(ILogger.ERROR,Messages.getString("String_Node_Str"));
    logger.log(ex);
    throw ex;
  }
catch (  RuntimeException ex) {
    logger.log(ILogger.ERROR,Messages.getString("String_Node_Str"));
    logger.log(ex);
    throw new ChartException(ChartReportItemPlugin.ID,ChartException.GENERATION,ex);
  }
  logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str"));
  if ("String_Node_Str".equals(sExtension)) {
    return fis;
  }
 else {
    return new Object[]{fis,imageMap};
  }
}