Buggy code:
public class XMLAttributesImpl implements XMLAttributes { protected static final int TABLE_SIZE = 101 ; protected static final int SIZE_LIMIT = 20 ; protected boolean fNamespaces = true ; protected int fLargeCount = 1 ; protected int fLength ; protected XMLAttributesImpl . Attribute [ ] fAttributes = new XMLAttributesImpl . Attribute [ 4 ] ; protected XMLAttributesImpl . Attribute [ ] fAttributeTableView ; protected int [ ] fAttributeTableViewChainState ; protected int fTableViewBuckets ; protected boolean fIsTableViewConsistent ; public XMLAttributesImpl ( ) { } public XMLAttributesImpl ( int tableSize ) { } public void setNamespaces ( boolean namespaces ) { } public int addAttribute ( QName name , String type , String value ) { int index ; if ( ( fLength ) < ( XMLAttributesImpl . SIZE_LIMIT ) ) { <START_BUG> index = ( ( ( name . uri ) != null ) && ( ! ( name . uri . equals ( "" ) ) ) ) ? getIndexFast ( name . uri , name . localpart ) : getIndexFast ( name . rawname ) ; <END_BUG> if ( index == ( - 1 ) ) { index = fLength ; if ( ( ( fLength ) ++ ) == ( fAttributes . length ) ) { XMLAttributesImpl . Attribute [ ] attributes = new XMLAttributesImpl . Attribute [ ( fAttributes . length ) + 4 ] ; System . arraycopy ( fAttributes , 0 , attributes , 0 , fAttributes . length ) ; for ( int i = fAttributes . length ; i < ( attributes . length ) ; i ++ ) { attributes [ i ] = new XMLAttributesImpl . Attribute ( ) ; } fAttributes = attributes ; } } } else if ( ( ( ( name . uri ) == null ) || ( ( name . uri . length ( ) ) == 0 ) ) || ( ( index = getIndexFast ( name . uri , name . localpart ) ) == ( - 1 ) ) ) { if ( ( ! ( fIsTableViewConsistent ) ) || ( ( fLength ) == ( XMLAttributesImpl . SIZE_LIMIT ) ) ) { prepareAndPopulateTableView ( ) ; fIsTableViewConsistent = true ; } int bucket = getTableViewBucket ( name . rawname ) ; if ( ( fAttributeTableViewChainState [ bucket ] ) != ( fLargeCount ) ) { index = fLength ; if ( ( ( fLength ) ++ ) == ( fAttributes . length ) ) { XMLAttributesImpl . Attribute [ ] attributes = new XMLAttributesImpl . Attribute [ ( fAttributes . length ) << 1 ] ; System . arraycopy ( fAttributes , 0 , attributes , 0 , fAttributes . length ) ; for ( int i = fAttributes . length ; i < ( attributes . length ) ; i ++ ) { attributes [ i ] = new XMLAttributesImpl . Attribute ( ) ; } fAttributes = attributes ; } fAttributeTableViewChainState [ bucket ] = fLargeCount ; fAttributes [ index ] . next = null ; fAttributeTableView [ bucket ] = fAttributes [ index ] ; } else { XMLAttributesImpl . Attribute found = fAttributeTableView [ bucket ] ; while ( found != null ) { if ( ( found . name . rawname ) == ( name . rawname ) ) { break ; } found = found . next ; } if ( found == null ) { index = fLength ; if ( ( ( fLength ) ++ ) == ( fAttributes . length ) ) { XMLAttributesImpl . Attribute [ ] attributes = new XMLAttributesImpl . Attribute [ ( fAttributes . length ) << 1 ] ; System . arraycopy ( fAttributes , 0 , attributes , 0 , fAttributes . length ) ; for ( int i = fAttributes . length ; i < ( attributes . length ) ; i ++ ) { attributes [ i ] = new XMLAttributesImpl . Attribute ( ) ; } fAttributes = attributes ; } fAttributes [ index ] . next = fAttributeTableView [ bucket ] ; fAttributeTableView [ bucket ] = fAttributes [ index ] ; } else { index = getIndexFast ( name . rawname ) ; } } } XMLAttributesImpl . Attribute attribute = fAttributes [ index ] ; attribute . name . setValues ( name ) ; attribute . type = type ; attribute . value = value ; attribute . nonNormalizedValue = value ; attribute . specified = false ; attribute . augs . removeAllItems ( ) ; return index ; } public void removeAllAttributes ( ) { } public void removeAttributeAt ( int attrIndex ) { } public void setName ( int attrIndex , QName attrName ) { } public void getName ( int attrIndex , QName attrName ) { } public void setType ( int attrIndex , String attrType ) { } public void setValue ( int attrIndex , String attrValue ) { } public void setNonNormalizedValue ( int attrIndex , String attrValue ) { } public String getNonNormalizedValue ( int attrIndex ) { } public void setSpecified ( int attrIndex , boolean specified ) { } public boolean isSpecified ( int attrIndex ) { } public int getLength ( ) { } public String getType ( int index ) { } public String getType ( String qname ) { } public String getValue ( int index ) { } public String getValue ( String qname ) { } public String getName ( int index ) { } public int getIndex ( String qName ) { } public int getIndex ( String uri , String localPart ) { } public String getLocalName ( int index ) { } public String getQName ( int index ) { } public String getType ( String uri , String localName ) { } public String getPrefix ( int index ) { } public String getURI ( int index ) { } public String getValue ( String uri , String localName ) { }

Fix:
index = ( ( ( name . uri ) != null ) && ( ( name . uri . length ( ) ) != 0 ) ) ? getIndexFast ( name . uri , name . localpart ) : getIndexFast ( name . rawname ) ;