Program: 67943
Project: 67943
Buggy source:
protected static int _getDimensionValue(IContent content,DimensionType d,int dpi,int referenceLength){
  if (d.getValueType() == DimensionType.TYPE_DIMENSION) {
    String units=d.getUnits();
    if (units.equals(EngineIRConstants.UNITS_PT) || units.equals(EngineIRConstants.UNITS_CM) || units.equals(EngineIRConstants.UNITS_MM)|| units.equals(EngineIRConstants.UNITS_PC)|| units.equals(EngineIRConstants.UNITS_IN)) {
      double point=d.convertTo(EngineIRConstants.UNITS_PT) * 1000;
      return (int)point;
    }
 else     if (units.equals(EngineIRConstants.UNITS_PX)) {
      if (dpi == 0) {
        dpi=96;
      }
      double point=d.getMeasure() / dpi * 72000d;
      return (int)point;
    }
 else     if (units.equals(EngineIRConstants.UNITS_PERCENTAGE)) {
      double point=referenceLength * d.getMeasure() / 100.0;
      return (int)point;
    }
 else     if (units.equals(EngineIRConstants.UNITS_EM) || units.equals(EngineIRConstants.UNITS_EX)) {
      int size=9000;
      if (content != null) {
        IStyle style=content.getComputedStyle();
        CSSValue fontSize=style.getProperty(IStyle.STYLE_FONT_SIZE);
        size=getDimensionValue(fontSize);
      }
      double point=size * d.getMeasure();
      return (int)point;
    }
  }
 else   if (d.getValueType() == DimensionType.TYPE_CHOICE) {
    String choice=d.getChoice();
    if (IStyle.CSS_MEDIUM_VALUE.equals(choice)) {
      return 3000;
    }
 else     if (IStyle.CSS_THIN_VALUE.equals(choice)) {
      return 1000;
    }
 else     if (IStyle.CSS_THICK_VALUE.equals(choice)) {
      return 5000;
    }
  }
  return 0;
}

Fixed version (ground truth):
protected static int _getDimensionValue(IContent content,DimensionType d,int renderOptionDpi,int referenceLength){
  if (d.getValueType() == DimensionType.TYPE_DIMENSION) {
    String units=d.getUnits();
    if (units.equals(EngineIRConstants.UNITS_PT) || units.equals(EngineIRConstants.UNITS_CM) || units.equals(EngineIRConstants.UNITS_MM)|| units.equals(EngineIRConstants.UNITS_PC)|| units.equals(EngineIRConstants.UNITS_IN)) {
      double point=d.convertTo(EngineIRConstants.UNITS_PT) * 1000;
      return (int)point;
    }
 else     if (units.equals(EngineIRConstants.UNITS_PX)) {
      double point=d.getMeasure() / getRenderDpi(content,renderOptionDpi) * 72000d;
      return (int)point;
    }
 else     if (units.equals(EngineIRConstants.UNITS_PERCENTAGE)) {
      double point=referenceLength * d.getMeasure() / 100.0;
      return (int)point;
    }
 else     if (units.equals(EngineIRConstants.UNITS_EM) || units.equals(EngineIRConstants.UNITS_EX)) {
      int size=9000;
      if (content != null) {
        IStyle style=content.getComputedStyle();
        CSSValue fontSize=style.getProperty(IStyle.STYLE_FONT_SIZE);
        size=getDimensionValue(fontSize);
      }
      double point=size * d.getMeasure();
      return (int)point;
    }
  }
 else   if (d.getValueType() == DimensionType.TYPE_CHOICE) {
    String choice=d.getChoice();
    if (IStyle.CSS_MEDIUM_VALUE.equals(choice)) {
      return 3000;
    }
 else     if (IStyle.CSS_THIN_VALUE.equals(choice)) {
      return 1000;
    }
 else     if (IStyle.CSS_THICK_VALUE.equals(choice)) {
      return 5000;
    }
  }
  return 0;
}