Buggy code:
public class CalculatedStyle { private CalculatedStyle _parent ; private BorderPropertySet _border ; private RectPropertySet _margin ; private RectPropertySet _padding ; private float _lineHeight ; private boolean _lineHeightResolved ; private FSFont _FSFont ; private FSFontMetrics _FSFontMetrics ; private boolean _marginsAllowed = true ; private boolean _paddingAllowed = true ; private boolean _bordersAllowed = true ; private BackgroundSize _backgroundSize ; private final HashMap _childCache = new HashMap ( ) ; private final FSDerivedValue [ ] _derivedValuesById ; private FontSpecification _font ; protected CalculatedStyle ( ) { } private CalculatedStyle ( CalculatedStyle parent , CascadedStyle matched ) { } private void checkPaddingAllowed ( ) { } private void checkMarginsAllowed ( ) { } private void checkBordersAllowed ( ) { } public synchronized CalculatedStyle deriveStyle ( CascadedStyle matched ) { } public int countAssigned ( ) { } public CalculatedStyle getParent ( ) { } public String toString ( ) { } public FSColor asColor ( CSSName cssName ) { } public float asFloat ( CSSName cssName ) { } public String asString ( CSSName cssName ) { } public String [ ] asStringArray ( CSSName cssName ) { } public void setDefaultValue ( CSSName cssName , FSDerivedValue fsDerivedValue ) { } public boolean hasAbsoluteUnit ( CSSName cssName ) { } public boolean isIdent ( CSSName cssName , IdentValue val ) { } public IdentValue getIdent ( CSSName cssName ) { } public FSColor getColor ( ) { } public FSColor getBackgroundColor ( ) { } public BackgroundSize getBackgroundSize ( ) { } private BackgroundSize createBackgroundSize ( ) { } public BackgroundPosition getBackgroundPosition ( ) { } public List getCounterReset ( ) { } public List getCounterIncrement ( ) { } public BorderPropertySet getBorder ( CssContext ctx ) { } public FontSpecification getFont ( CssContext ctx ) { } public FontSpecification getFontSpecification ( ) { } private IdentValue resolveAbsoluteFontSize ( ) { } public float getFloatPropertyProportionalTo ( CSSName cssName , float baseValue , CssContext ctx ) { } public float getFloatPropertyProportionalWidth ( CSSName cssName , float parentWidth , CssContext ctx ) { } public float getFloatPropertyProportionalHeight ( CSSName cssName , float parentHeight , CssContext ctx ) { } public float getLineHeight ( CssContext ctx ) { } public RectPropertySet getMarginRect ( float cbWidth , CssContext ctx ) { } public RectPropertySet getMarginRect ( float cbWidth , CssContext ctx , boolean useCache ) { } public RectPropertySet getPaddingRect ( float cbWidth , CssContext ctx , boolean useCache ) { } public RectPropertySet getPaddingRect ( float cbWidth , CssContext ctx ) { } public String getStringProperty ( CSSName cssName ) { } public boolean isLength ( CSSName cssName ) { } public boolean isLengthOrNumber ( CSSName cssName ) { } public FSDerivedValue valueByName ( CSSName cssName ) { } private void derive ( CascadedStyle matched ) { } private FSDerivedValue deriveValue ( CSSName cssName , CSSPrimitiveValue value ) { } private String genStyleKey ( ) { } public RectPropertySet getCachedPadding ( ) { } public RectPropertySet getCachedMargin ( ) { } private static RectPropertySet getPaddingProperty ( CalculatedStyle style , CSSName shorthandProp , CSSName . CSSSideProperties sides , float cbWidth , CssContext ctx , boolean useCache ) { } private static RectPropertySet getMarginProperty ( CalculatedStyle style , CSSName shorthandProp , CSSName . CSSSideProperties sides , float cbWidth , CssContext ctx , boolean useCache ) { } private static RectPropertySet newRectInstance ( CalculatedStyle style , CSSName shorthand , CSSName . CSSSideProperties sides , float cbWidth , CssContext ctx ) { } private static BorderPropertySet getBorderProperty ( CalculatedStyle style , CssContext ctx ) { if ( ( style . _border ) == null ) { BorderPropertySet result = BorderPropertySet . newInstance ( style , ctx ) ; boolean allZeros = result . isAllZeros ( ) ; <START_BUG> if ( allZeros && ( ! ( result . hasHidden ( ) ) ) ) { <END_BUG> result = BorderPropertySet . EMPTY_BORDER ; } style . _border = result ; if ( ( ! allZeros ) && ( style . _border . hasNegativeValues ( ) ) ) { style . _border . resetNegativeValues ( ) ; } } return style . _border ; } public static final int LEFT = 1 ; public static final int RIGHT = 2 ; public static final int TOP = 3 ; public static final int BOTTOM = 4 ; public int getMarginBorderPadding ( CssContext cssCtx , int cbWidth , int which ) { } public IdentValue getWhitespace ( ) { } public FSFont getFSFont ( CssContext cssContext ) { } public FSFontMetrics getFSFontMetrics ( CssContext c ) { } public IdentValue getWordWrap ( ) { } public boolean isClearLeft ( ) { } public boolean isClearRight ( ) { } public boolean isCleared ( ) { } public IdentValue getBackgroundRepeat ( ) { } public IdentValue getBackgroundAttachment ( ) { } public boolean isFixedBackground ( ) { } public boolean isInline ( ) { } public boolean isInlineBlock ( ) { } public boolean isTable ( ) { } public boolean isInlineTable ( ) { } public boolean isTableCell ( ) { } public boolean isTableSection ( ) { } public boolean isTableCaption ( ) { } public boolean isTableHeader ( ) { } public boolean isTableFooter ( ) { } public boolean isTableRow ( ) { } public boolean isDisplayNone ( ) { } public boolean isSpecifiedAsBlock ( ) { } public boolean isBlockEquivalent ( ) { } public boolean isLayedOutInInlineContext ( ) { } public boolean isNeedAutoMarginResolution ( ) { } public boolean isAbsolute ( ) { } public boolean isFixed ( ) { } public boolean isFloated ( ) { } public boolean isFloatedLeft ( ) { } public boolean isFloatedRight ( ) { } public boolean isRelative ( ) { } public boolean isPostionedOrFloated ( ) { } public boolean isPositioned ( ) { } public boolean isAutoWidth ( ) { } public boolean isAbsoluteWidth ( ) { } public boolean isAutoHeight ( ) { } public boolean isAutoLeftMargin ( ) { } public boolean isAutoRightMargin ( ) { }

Fix:
if ( ( allZeros && ( ! ( result . hasHidden ( ) ) ) ) && ( ! ( result . hasBorderRadius ( ) ) ) ) {