Program: 72994
Project: 72994
Buggy source:
public final void updateFigure(ExtendedItemHandle eih,IFigure ifg){
  try {
    eih.loadExtendedElement();
    final ChartReportItemImpl crii=(ChartReportItemImpl)eih.getReportItem();
    crii.setHandle(eih);
    handleChartInXTab(eih);
    final Chart cm=(Chart)crii.getProperty(ChartReportItemUtil.PROPERTY_CHART);
    Bounds defaultBounds=ChartReportItemUtil.createDefaultChartBounds(eih,cm);
    double dHeightInPoints=defaultBounds.getHeight();
    double dWidthInPoints=defaultBounds.getWidth();
    final DimensionHandle dhHeight=eih.getHeight();
    final DimensionHandle dhWidth=eih.getWidth();
    double dOriginalHeight=dhHeight.getMeasure();
    String sHeightUnits=dhHeight.getUnits();
    double dOriginalWidth=dhWidth.getMeasure();
    String sWidthUnits=dhWidth.getUnits();
    final IDisplayServer idsSWT=ChartUIUtil.getDisplayServer();
    if (sHeightUnits != null) {
      if (sHeightUnits == DesignChoiceConstants.UNITS_PX) {
        dOriginalHeight=ChartUtil.convertPixelsToPoints(idsSWT,dOriginalHeight);
        sHeightUnits=DesignChoiceConstants.UNITS_PT;
      }
      if (sHeightUnits == DesignChoiceConstants.UNITS_PERCENTAGE) {
        IFigure parentFigure=ifg.getParent();
        if (parentFigure != null) {
          int height=(int)((parentFigure.getSize().height - parentFigure.getInsets().getHeight()) * dOriginalHeight / 100);
          dOriginalHeight=ChartUtil.convertPixelsToPoints(idsSWT,height);
          sHeightUnits=DesignChoiceConstants.UNITS_PT;
        }
      }
      dHeightInPoints=DimensionUtil.convertTo(dOriginalHeight,sHeightUnits,DesignChoiceConstants.UNITS_PT).getMeasure();
    }
    if (sWidthUnits != null) {
      if (sWidthUnits == DesignChoiceConstants.UNITS_PX) {
        dOriginalWidth=(dOriginalWidth * 72d) / idsSWT.getDpiResolution();
        sWidthUnits=DesignChoiceConstants.UNITS_PT;
      }
      if (sWidthUnits == DesignChoiceConstants.UNITS_PERCENTAGE) {
        IFigure parentFigure=ifg.getParent();
        if (parentFigure != null) {
          int width=(int)((parentFigure.getSize().width - parentFigure.getInsets().getWidth()) * dOriginalWidth / 100);
          dOriginalWidth=ChartUtil.convertPixelsToPoints(idsSWT,width);
          sWidthUnits=DesignChoiceConstants.UNITS_PT;
        }
      }
      dWidthInPoints=DimensionUtil.convertTo(dOriginalWidth,sWidthUnits,DesignChoiceConstants.UNITS_PT).getMeasure();
    }
    final double dHeightInPixels=(idsSWT.getDpiResolution() * dHeightInPoints) / 72d;
    final double dWidthInPixels=(idsSWT.getDpiResolution() * dWidthInPoints) / 72d;
    if (cm != null && !ChartXTabUtil.isAxisChart(eih)) {
      if (dWidthInPoints > 0)       cm.getBlock().getBounds().setWidth(dWidthInPoints);
      if (dHeightInPoints > 0)       cm.getBlock().getBounds().setHeight(dHeightInPoints);
    }
    if (crii.getDesignerRepresentation() != null) {
      ((DesignerRepresentation)crii.getDesignerRepresentation()).setDirty(true);
    }
    Dimension newSize=ifg.getBounds().getCopy().getSize();
    if (dWidthInPixels > 0)     newSize.width=(int)dWidthInPixels;
    if (dHeightInPixels > 0)     newSize.height=(int)dHeightInPixels;
    ifg.setSize(newSize);
  }
 catch (  BirtException ex) {
    logger.log(ex);
  }
}

Fixed version (ground truth):
public final void updateFigure(ExtendedItemHandle eih,IFigure ifg){
  try {
    eih.loadExtendedElement();
    final ChartReportItemImpl crii=(ChartReportItemImpl)eih.getReportItem();
    crii.setHandle(eih);
    handleChartInXTab(eih);
    final Chart cm=(Chart)crii.getProperty(ChartReportItemUtil.PROPERTY_CHART);
    if (cm == null) {
      return;
    }
    Bounds defaultBounds=ChartReportItemUtil.createDefaultChartBounds(eih,cm);
    double dHeightInPoints=defaultBounds.getHeight();
    double dWidthInPoints=defaultBounds.getWidth();
    final DimensionHandle dhHeight=eih.getHeight();
    final DimensionHandle dhWidth=eih.getWidth();
    double dOriginalHeight=dhHeight.getMeasure();
    String sHeightUnits=dhHeight.getUnits();
    double dOriginalWidth=dhWidth.getMeasure();
    String sWidthUnits=dhWidth.getUnits();
    final IDisplayServer idsSWT=ChartUIUtil.getDisplayServer();
    if (sHeightUnits != null) {
      if (sHeightUnits == DesignChoiceConstants.UNITS_PX) {
        dOriginalHeight=ChartUtil.convertPixelsToPoints(idsSWT,dOriginalHeight);
        sHeightUnits=DesignChoiceConstants.UNITS_PT;
      }
      if (sHeightUnits == DesignChoiceConstants.UNITS_PERCENTAGE) {
        IFigure parentFigure=ifg.getParent();
        if (parentFigure != null) {
          int height=(int)((parentFigure.getSize().height - parentFigure.getInsets().getHeight()) * dOriginalHeight / 100);
          dOriginalHeight=ChartUtil.convertPixelsToPoints(idsSWT,height);
          sHeightUnits=DesignChoiceConstants.UNITS_PT;
        }
      }
      dHeightInPoints=DimensionUtil.convertTo(dOriginalHeight,sHeightUnits,DesignChoiceConstants.UNITS_PT).getMeasure();
    }
    if (sWidthUnits != null) {
      if (sWidthUnits == DesignChoiceConstants.UNITS_PX) {
        dOriginalWidth=(dOriginalWidth * 72d) / idsSWT.getDpiResolution();
        sWidthUnits=DesignChoiceConstants.UNITS_PT;
      }
      if (sWidthUnits == DesignChoiceConstants.UNITS_PERCENTAGE) {
        IFigure parentFigure=ifg.getParent();
        if (parentFigure != null) {
          int width=(int)((parentFigure.getSize().width - parentFigure.getInsets().getWidth()) * dOriginalWidth / 100);
          dOriginalWidth=ChartUtil.convertPixelsToPoints(idsSWT,width);
          sWidthUnits=DesignChoiceConstants.UNITS_PT;
        }
      }
      dWidthInPoints=DimensionUtil.convertTo(dOriginalWidth,sWidthUnits,DesignChoiceConstants.UNITS_PT).getMeasure();
    }
    final double dHeightInPixels=(idsSWT.getDpiResolution() * dHeightInPoints) / 72d;
    final double dWidthInPixels=(idsSWT.getDpiResolution() * dWidthInPoints) / 72d;
    if (cm != null && !ChartXTabUtil.isAxisChart(eih)) {
      if (dWidthInPoints > 0)       cm.getBlock().getBounds().setWidth(dWidthInPoints);
      if (dHeightInPoints > 0)       cm.getBlock().getBounds().setHeight(dHeightInPoints);
    }
    if (crii.getDesignerRepresentation() != null) {
      ((DesignerRepresentation)crii.getDesignerRepresentation()).setDirty(true);
    }
    Dimension newSize=ifg.getBounds().getCopy().getSize();
    if (dWidthInPixels > 0)     newSize.width=(int)dWidthInPixels;
    if (dHeightInPixels > 0)     newSize.height=(int)dHeightInPixels;
    ifg.setSize(newSize);
  }
 catch (  BirtException ex) {
    logger.log(ex);
  }
}