Program: 67503
Project: 67503
Buggy source:
/** 
 * Checks whether the element is block, inline or inline-block level. In BIRT, the absolute positioning model is used and a box is explicitly offset with respect to its containing block. When an element's x or y is set, it will be treated as a block level element regardless of the 'Display' property set in style. When designating width or height value to an inline element, it will be treated as inline-block.
 * @param x Specifies how far a box's left margin edge is offset to the right of the left edge of the box's containing block.
 * @param y Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block.
 * @param width The width of the element.
 * @param height The height of the element.
 * @param style The <code>IStyle</code> object.
 * @return The display type of the element.
 */
public int getElementType(DimensionType x,DimensionType y,DimensionType width,DimensionType height,IStyle style){
  int type=0;
  String display=null;
  if (style != null) {
    display=style.getDisplay();
  }
  if (EngineIRConstants.DISPLAY_NONE.equalsIgnoreCase(display)) {
    type|=HTMLEmitterUtil.DISPLAY_NONE;
  }
  if (x != null || y != null) {
    return type | HTMLEmitterUtil.DISPLAY_BLOCK;
  }
 else   if (EngineIRConstants.DISPLAY_INLINE.equalsIgnoreCase(display)) {
    type|=HTMLEmitterUtil.DISPLAY_INLINE;
    if (width != null || height != null) {
      type|=HTMLEmitterUtil.DISPLAY_INLINE_BLOCK;
    }
    return type;
  }
  return type | HTMLEmitterUtil.DISPLAY_BLOCK;
}

Fixed version (ground truth):
/** 
 * Checks whether the element is block, inline or inline-block level. In BIRT, the absolute positioning model is used and a box is explicitly offset with respect to its containing block. When an element's x or y is set, it will be treated as a block level element regardless of the 'Display' property set in style. When designating width or height value to an inline element, or when the element has right-to-left base direction, it it will be treated as inline-block.
 * @param x Specifies how far a box's left margin edge is offset to the right of the left edge of the box's containing block.
 * @param y Specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block.
 * @param width The width of the element.
 * @param height The height of the element.
 * @param style The <code>IStyle</code> object.
 * @return The display type of the element.
 */
public int getElementType(DimensionType x,DimensionType y,DimensionType width,DimensionType height,IStyle style){
  int type=0;
  String display=null;
  if (style != null) {
    display=style.getDisplay();
  }
  if (EngineIRConstants.DISPLAY_NONE.equalsIgnoreCase(display)) {
    type|=HTMLEmitterUtil.DISPLAY_NONE;
  }
  if (x != null || y != null) {
    return type | HTMLEmitterUtil.DISPLAY_BLOCK;
  }
 else   if (EngineIRConstants.DISPLAY_INLINE.equalsIgnoreCase(display)) {
    type|=HTMLEmitterUtil.DISPLAY_INLINE;
    if (width != null || height != null) {
      type|=HTMLEmitterUtil.DISPLAY_INLINE_BLOCK;
    }
 else     if (IStyle.CSS_RTL_VALUE.equals(style.getDirection())) {
      type|=HTMLEmitterUtil.DISPLAY_INLINE_BLOCK;
    }
    return type;
  }
  return type | HTMLEmitterUtil.DISPLAY_BLOCK;
}