Program: 70549
Project: 70549
Buggy source:
protected void buildProperties(IContent content,LayoutContext context){
  IStyle style=content.getStyle();
  if (style != null && !style.isEmpty()) {
    boxStyle=new BoxStyle();
    Color color=PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));
    if (color != null) {
      boxStyle.setBackgroundColor(color);
    }
    String url=style.getBackgroundImage();
    if (url != null) {
      boxStyle.setBackgroundImage(new BackgroundImageInfo(url,style.getProperty(IStyle.STYLE_BACKGROUND_REPEAT),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_X),width),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_Y),width)));
    }
    localProperties=new LocalProperties();
    int maw=parent.getMaxAvaWidth();
    localProperties.setMarginBottom(getDimensionValue(style.getProperty(IStyle.STYLE_MARGIN_BOTTOM),maw));
    localProperties.setMarginLeft(getDimensionValue(style.getProperty(IStyle.STYLE_MARGIN_LEFT),maw));
    localProperties.setMarginTop(getDimensionValue(style.getProperty(IStyle.STYLE_MARGIN_TOP),maw));
    localProperties.setMarginRight(getDimensionValue(style.getProperty(IStyle.STYLE_MARGIN_RIGHT),maw));
    if (!isInInlineStacking) {
      pageBreakAfter=style.getProperty(IStyle.STYLE_PAGE_BREAK_AFTER);
      pageBreakInside=style.getProperty(IStyle.STYLE_PAGE_BREAK_INSIDE);
      pageBreakBefore=style.getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE);
    }
  }
 else {
    hasStyle=false;
    boxStyle=BoxStyle.DEFAULT;
    localProperties=LocalProperties.DEFAULT;
  }
  bookmark=content.getBookmark();
  action=content.getHyperlinkAction();
}

Fixed version (ground truth):
protected void buildProperties(IContent content,LayoutContext context){
  IStyle style=content.getStyle();
  if (style != null && !style.isEmpty()) {
    boxStyle=new BoxStyle();
    IStyle cs=content.getComputedStyle();
    Color color=PropertyUtil.getColor(cs.getProperty(IStyle.STYLE_BACKGROUND_COLOR));
    if (color != null) {
      boxStyle.setBackgroundColor(color);
    }
    String url=style.getBackgroundImage();
    if (url != null) {
      boxStyle.setBackgroundImage(new BackgroundImageInfo(getImageUrl(url),cs.getProperty(IStyle.STYLE_BACKGROUND_REPEAT),getDimensionValue(cs.getProperty(IStyle.STYLE_BACKGROUND_POSITION_X),width),getDimensionValue(cs.getProperty(IStyle.STYLE_BACKGROUND_POSITION_Y),width)));
    }
    localProperties=new LocalProperties();
    int maw=parent.getMaxAvaWidth();
    localProperties.setMarginBottom(getDimensionValue(cs.getProperty(IStyle.STYLE_MARGIN_BOTTOM),maw));
    localProperties.setMarginLeft(getDimensionValue(cs.getProperty(IStyle.STYLE_MARGIN_LEFT),maw));
    localProperties.setMarginTop(getDimensionValue(cs.getProperty(IStyle.STYLE_MARGIN_TOP),maw));
    localProperties.setMarginRight(getDimensionValue(cs.getProperty(IStyle.STYLE_MARGIN_RIGHT),maw));
    if (!isInInlineStacking) {
      pageBreakAfter=cs.getProperty(IStyle.STYLE_PAGE_BREAK_AFTER);
      pageBreakInside=cs.getProperty(IStyle.STYLE_PAGE_BREAK_INSIDE);
      pageBreakBefore=cs.getProperty(IStyle.STYLE_PAGE_BREAK_BEFORE);
    }
  }
 else {
    hasStyle=false;
    boxStyle=BoxStyle.DEFAULT;
    localProperties=LocalProperties.DEFAULT;
  }
  bookmark=content.getBookmark();
  action=content.getHyperlinkAction();
}