Buggy code:
class XSDAttributeTraverser extends XSDAbstractTraverser { public XSDAttributeTraverser ( XSDHandler handler , XSAttributeChecker gAttrCheck ) { } protected XSAttributeUse traverseLocal ( Element attrDecl , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { Object [ ] attrValues = fAttrChecker . checkAttributes ( attrDecl , false , schemaDoc ) ; String defaultAtt = ( ( String ) ( attrValues [ XSAttributeChecker . ATTIDX_DEFAULT ] ) ) ; String fixedAtt = ( ( String ) ( attrValues [ XSAttributeChecker . ATTIDX_FIXED ] ) ) ; String nameAtt = ( ( String ) ( attrValues [ XSAttributeChecker . ATTIDX_NAME ] ) ) ; QName refAtt = ( ( QName ) ( attrValues [ XSAttributeChecker . ATTIDX_REF ] ) ) ; XInt useAtt = ( ( XInt ) ( attrValues [ XSAttributeChecker . ATTIDX_USE ] ) ) ; XSAttributeDecl attribute = null ; if ( ( attrDecl . getAttributeNode ( ATT_REF ) ) != null ) { if ( refAtt != null ) { attribute = ( ( XSAttributeDecl ) ( fSchemaHandler . getGlobalDecl ( schemaDoc , ATTRIBUTE_TYPE , refAtt , attrDecl ) ) ) ; Element child = DOMUtil . getFirstChildElement ( attrDecl ) ; if ( ( child != null ) && ( DOMUtil . getLocalName ( child ) . equals ( ELT_ANNOTATION ) ) ) { traverseAnnotationDecl ( child , attrValues , false , schemaDoc ) ; child = DOMUtil . getNextSiblingElement ( child ) ; } if ( child != null ) { reportSchemaError ( "src-attribute.3.2" , new Object [ ] { refAtt } , child ) ; } nameAtt = refAtt . localpart ; } else { attribute = null ; } } else { attribute = traverseNamedAttr ( attrDecl , attrValues , schemaDoc , grammar , false ) ; } short consType = XSAttributeDecl . NO_CONSTRAINT ; if ( defaultAtt != null ) { consType = XSAttributeDecl . DEFAULT_VALUE ; } else if ( fixedAtt != null ) { consType = XSAttributeDecl . FIXED_VALUE ; defaultAtt = fixedAtt ; fixedAtt = null ; } XSAttributeUse attrUse = null ; if ( attribute != null ) { if ( ( fSchemaHandler . fDeclPool ) != null ) { attrUse = fDeclPool . getAttributeUse ( ) ; } else { attrUse = new XSAttributeUse ( ) ; } attrUse . fAttrDecl = attribute ; attrUse . fUse = useAtt . shortValue ( ) ; attrUse . fConstraintType = consType ; if ( defaultAtt != null ) { attrUse . fDefault = new ValidatedInfo ( ) ; attrUse . fDefault . normalizedValue = defaultAtt ; } } fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; if ( ( defaultAtt != null ) && ( fixedAtt != null ) ) { reportSchemaError ( "src-attribute.1" , new Object [ ] { nameAtt } , attrDecl ) ; } if ( ( ( consType == ( XSAttributeDecl . DEFAULT_VALUE ) ) && ( useAtt != null ) ) && ( ( useAtt . intValue ( ) ) != ( SchemaSymbols . USE_OPTIONAL ) ) ) { reportSchemaError ( "src-attribute.2" , new Object [ ] { nameAtt } , attrDecl ) ; } if ( ( defaultAtt != null ) && ( attrUse != null ) ) { fValidationState . setNamespaceSupport ( schemaDoc . fNamespaceSupport ) ; if ( ! ( checkDefaultValid ( attrUse ) ) ) { reportSchemaError ( "a-props-correct.2" , new Object [ ] { nameAtt , defaultAtt } , attrDecl ) ; } if ( attribute . fType . isIDType ( ) ) { reportSchemaError ( "a-props-correct.3" , new Object [ ] { nameAtt } , attrDecl ) ; } if ( ( ( attrUse . fAttrDecl . getConstraintType ( ) ) == ( XSAttributeDecl . FIXED_VALUE ) ) && ( ( attrUse . fConstraintType ) != ( XSAttributeDecl . NO_CONSTRAINT ) ) ) { <START_BUG> if ( ( ( attrUse . fConstraintType ) != ( XSAttributeDecl . FIXED_VALUE ) ) || ( attrUse . fAttrDecl . fType . isEqual ( attrUse . fAttrDecl . fDefault . actualValue , attrUse . fDefault . actualValue ) ) ) { <END_BUG> reportSchemaError ( "au-props-correct.2" , new Object [ ] { nameAtt } , attrDecl ) ; } } } return attrUse ; } protected XSAttributeDecl traverseGlobal ( Element attrDecl , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { } XSAttributeDecl traverseNamedAttr ( Element attrDecl , Object [ ] attrValues , XSDocumentInfo schemaDoc , SchemaGrammar grammar , boolean isGlobal ) { } boolean checkDefaultValid ( XSAttributeDecl attribute ) { } boolean checkDefaultValid ( XSAttributeUse attrUse ) { } }

Fix:
if ( ( ( attrUse . fConstraintType ) != ( XSAttributeDecl . FIXED_VALUE ) ) || ( ! ( attrUse . fAttrDecl . fType . isEqual ( attrUse . fAttrDecl . fDefault . actualValue , attrUse . fDefault . actualValue ) ) ) ) {