Program: 70311
Project: 70311
Buggy source:
protected void buildProperties(IContent content,LayoutContext context){
  IStyle style=content.getComputedStyle();
  boxStyle=new BoxStyle();
  Color color=PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));
  if (color != null) {
    boxStyle.setBackgroundColor(color);
  }
  String url=content.getStyle().getBackgroundImage();
  if (url != null) {
    boxStyle.setBackgroundImage(new BackgroundImageInfo(getImageUrl(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();
  IStyle cs=content.getStyle();
  CSSValue padding=cs.getProperty(IStyle.STYLE_PADDING_TOP);
  if (padding == null) {
    localProperties.setPaddingTop(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingTop(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_TOP),width));
  }
  padding=cs.getProperty(IStyle.STYLE_PADDING_BOTTOM);
  if (padding == null) {
    localProperties.setPaddingBottom(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingBottom(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_BOTTOM),width));
  }
  padding=cs.getProperty(IStyle.STYLE_PADDING_LEFT);
  if (padding == null) {
    localProperties.setPaddingLeft(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingLeft(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_LEFT),width));
  }
  padding=cs.getProperty(IStyle.STYLE_PADDING_RIGHT);
  if (padding == null) {
    localProperties.setPaddingRight(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingRight(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_RIGHT),width));
  }
  textAlign=content.getComputedStyle().getProperty(IStyle.STYLE_TEXT_ALIGN);
}

Fixed version (ground truth):
protected void buildProperties(IContent content,LayoutContext context){
  IStyle style=content.getComputedStyle();
  boxStyle=new BoxStyle();
  Color color=PropertyUtil.getColor(style.getProperty(IStyle.STYLE_BACKGROUND_COLOR));
  if (color != null) {
    boxStyle.setBackgroundColor(color);
  }
  String url=content.getStyle().getBackgroundImage();
  if (url != null) {
    boxStyle.setBackgroundImage(new BackgroundImageInfo(getImageUrl(url),style.getProperty(IStyle.STYLE_BACKGROUND_REPEAT),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_X),100),getDimensionValue(style.getProperty(IStyle.STYLE_BACKGROUND_POSITION_Y),100)));
  }
  localProperties=new LocalProperties();
  int maw=parent.getMaxAvaWidth();
  IStyle cs=content.getStyle();
  CSSValue padding=cs.getProperty(IStyle.STYLE_PADDING_TOP);
  if (padding == null) {
    localProperties.setPaddingTop(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingTop(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_TOP),width));
  }
  padding=cs.getProperty(IStyle.STYLE_PADDING_BOTTOM);
  if (padding == null) {
    localProperties.setPaddingBottom(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingBottom(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_BOTTOM),width));
  }
  padding=cs.getProperty(IStyle.STYLE_PADDING_LEFT);
  if (padding == null) {
    localProperties.setPaddingLeft(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingLeft(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_LEFT),width));
  }
  padding=cs.getProperty(IStyle.STYLE_PADDING_RIGHT);
  if (padding == null) {
    localProperties.setPaddingRight(DEFAULT_PADDING);
  }
 else {
    localProperties.setPaddingRight(PropertyUtil.getDimensionValue(style.getProperty(IStyle.STYLE_PADDING_RIGHT),width));
  }
  textAlign=content.getComputedStyle().getProperty(IStyle.STYLE_TEXT_ALIGN);
}