Program: 60221
Project: 60221
Buggy source:
public BorderInfo getBorderInfo(){
  BorderInfo binfo=this.borderInfo;
  if (binfo != INVALID_BORDER_INFO) {
    return binfo;
  }
  binfo=super.getBorderInfo();
  if (binfo == null || (binfo.topStyle == HtmlValues.BORDER_STYLE_NONE && binfo.bottomStyle == HtmlValues.BORDER_STYLE_NONE && binfo.leftStyle == HtmlValues.BORDER_STYLE_NONE && binfo.rightStyle == HtmlValues.BORDER_STYLE_NONE)) {
    if (binfo == null) {
      binfo=new BorderInfo();
    }
    HTMLElementImpl element=this.element;
    if (element != null) {
      String border=element.getAttribute(HtmlAttributeProperties.BORDER);
      if (border != null) {
        border=border.trim();
        int value;
        int valueType;
        if (border.endsWith("String_Node_Str")) {
          valueType=HtmlInsets.TYPE_PERCENT;
          try {
            value=Integer.parseInt(border.substring(0,border.length() - 1));
          }
 catch (          NumberFormatException nfe) {
            value=0;
          }
        }
 else {
          valueType=HtmlInsets.TYPE_PIXELS;
          try {
            value=Integer.parseInt(border);
          }
 catch (          NumberFormatException nfe) {
            value=0;
          }
        }
        HtmlInsets borderInsets=new HtmlInsets();
        borderInsets.top=borderInsets.left=borderInsets.right=borderInsets.bottom=value;
        borderInsets.topType=borderInsets.leftType=borderInsets.rightType=borderInsets.bottomType=valueType;
        binfo.insets=borderInsets;
        if (binfo.topColor == null) {
          binfo.topColor=Color.LIGHT_GRAY;
        }
        if (binfo.leftColor == null) {
          binfo.leftColor=Color.LIGHT_GRAY;
        }
        if (binfo.rightColor == null) {
          binfo.rightColor=Color.GRAY;
        }
        if (binfo.bottomColor == null) {
          binfo.bottomColor=Color.GRAY;
        }
        if (value != 0) {
          binfo.topStyle=binfo.leftStyle=binfo.rightStyle=binfo.bottomStyle=HtmlValues.BORDER_STYLE_SOLID;
        }
      }
    }
  }
  this.borderInfo=binfo;
  return binfo;
}

Fixed version (ground truth):
public BorderInfo getBorderInfo(){
  BorderInfo binfo=this.borderInfo;
  if (binfo != INVALID_BORDER_INFO) {
    return binfo;
  }
  binfo=super.getBorderInfo();
  if (binfo == null || (binfo.getTopStyle() == HtmlValues.BORDER_STYLE_NONE && binfo.getBottomStyle() == HtmlValues.BORDER_STYLE_NONE && binfo.getLeftStyle() == HtmlValues.BORDER_STYLE_NONE && binfo.getRightStyle() == HtmlValues.BORDER_STYLE_NONE)) {
    if (binfo == null) {
      binfo=new BorderInfo();
    }
    HTMLElementImpl element=this.element;
    if (element != null) {
      String border=element.getAttribute(HtmlAttributeProperties.BORDER);
      if (border != null) {
        border=border.trim();
        int value;
        int valueType;
        if (border.endsWith("String_Node_Str")) {
          valueType=HtmlInsets.TYPE_PERCENT;
          try {
            value=Integer.parseInt(border.substring(0,border.length() - 1));
          }
 catch (          NumberFormatException nfe) {
            value=0;
          }
        }
 else {
          valueType=HtmlInsets.TYPE_PIXELS;
          try {
            value=Integer.parseInt(border);
          }
 catch (          NumberFormatException nfe) {
            value=0;
          }
        }
        HtmlInsets borderInsets=new HtmlInsets();
        borderInsets.top=borderInsets.left=borderInsets.right=borderInsets.bottom=value;
        borderInsets.topType=borderInsets.leftType=borderInsets.rightType=borderInsets.bottomType=valueType;
        binfo.setInsets(borderInsets);
        if (binfo.getTopColor() == null) {
          binfo.setTopColor(Color.LIGHT_GRAY);
        }
        if (binfo.getLeftColor() == null) {
          binfo.setLeftColor(Color.LIGHT_GRAY);
        }
        if (binfo.getRightColor() == null) {
          binfo.setRightColor(Color.GRAY);
        }
        if (binfo.getBottomColor() == null) {
          binfo.setBottomColor(Color.GRAY);
        }
        if (value != 0) {
          binfo.setTopStyle(HtmlValues.BORDER_STYLE_SOLID);
          binfo.setLeftStyle(HtmlValues.BORDER_STYLE_SOLID);
          binfo.setRightStyle(HtmlValues.BORDER_STYLE_SOLID);
          binfo.setBottomStyle(HtmlValues.BORDER_STYLE_SOLID);
        }
      }
    }
  }
  this.borderInfo=binfo;
  return binfo;
}