Program: 70548
Project: 70548
Buggy source:
protected void buildProperties(IContent content,LayoutContext context){
  IStyle style=content.getComputedStyle();
  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));
  localProperties.setPaddingBottom(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_BOTTOM),maw));
  localProperties.setPaddingLeft(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_LEFT),maw));
  localProperties.setPaddingTop(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_TOP),maw));
  localProperties.setPaddingRight(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_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);
  }
  this.boxStyle=new BoxStyle();
  int borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_LEFT_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setLeftBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_LEFT_COLOR),style.getProperty(IStyle.STYLE_BORDER_LEFT_STYLE),borderWidth));
  }
  borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_RIGHT_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setRightBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_RIGHT_COLOR),style.getProperty(IStyle.STYLE_BORDER_RIGHT_STYLE),borderWidth));
  }
  borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_TOP_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setTopBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_TOP_COLOR),style.getProperty(IStyle.STYLE_BORDER_TOP_STYLE),borderWidth));
  }
  borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_BOTTOM_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setBottomBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_BOTTOM_COLOR),style.getProperty(IStyle.STYLE_BORDER_BOTTOM_STYLE),borderWidth));
  }
  Color color=PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));
  if (color != null) {
    boxStyle.setBackgroundColor(color);
  }
  CSSValue url=style.getProperty(IStyle.STYLE_BACKGROUND_IMAGE);
  if (!IStyle.NONE_VALUE.equals(style.getProperty(IStyle.STYLE_BACKGROUND_IMAGE))) {
    boxStyle.setBackgroundImage(new BackgroundImageInfo(url.getCssText(),style.getProperty(IStyle.STYLE_BACKGROUND_REPEAT),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_X),maw),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_Y),maw)));
  }
  textAlign=style.getProperty(IStyle.STYLE_TEXT_ALIGN);
  action=content.getHyperlinkAction();
  bookmark=content.getBookmark();
}

Fixed version (ground truth):
protected void buildProperties(IContent content,LayoutContext context){
  IStyle style=content.getComputedStyle();
  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));
  localProperties.setPaddingBottom(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_BOTTOM),maw));
  localProperties.setPaddingLeft(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_LEFT),maw));
  localProperties.setPaddingTop(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_TOP),maw));
  localProperties.setPaddingRight(getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_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);
  }
  this.boxStyle=new BoxStyle();
  int borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_LEFT_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setLeftBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_LEFT_COLOR),style.getProperty(IStyle.STYLE_BORDER_LEFT_STYLE),borderWidth));
  }
  borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_RIGHT_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setRightBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_RIGHT_COLOR),style.getProperty(IStyle.STYLE_BORDER_RIGHT_STYLE),borderWidth));
  }
  borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_TOP_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setTopBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_TOP_COLOR),style.getProperty(IStyle.STYLE_BORDER_TOP_STYLE),borderWidth));
  }
  borderWidth=getDimensionValue(style.getProperty(IStyle.STYLE_BORDER_BOTTOM_WIDTH),maw);
  if (borderWidth > 0) {
    boxStyle.setBottomBorder(new BorderInfo(style.getProperty(IStyle.STYLE_BORDER_BOTTOM_COLOR),style.getProperty(IStyle.STYLE_BORDER_BOTTOM_STYLE),borderWidth));
  }
  Color color=PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));
  if (color != null) {
    boxStyle.setBackgroundColor(color);
  }
  CSSValue url=style.getProperty(IStyle.STYLE_BACKGROUND_IMAGE);
  if (!IStyle.NONE_VALUE.equals(style.getProperty(IStyle.STYLE_BACKGROUND_IMAGE))) {
    boxStyle.setBackgroundImage(new BackgroundImageInfo(getImageUrl(url.getCssText()),style.getProperty(IStyle.STYLE_BACKGROUND_REPEAT),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_X),maw),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_Y),maw)));
  }
  textAlign=style.getProperty(IStyle.STYLE_TEXT_ALIGN);
  action=content.getHyperlinkAction();
  bookmark=content.getBookmark();
}