Buggy code:
public class XSAttributeGroupDecl implements XSAttributeGroupDefinition { public String fName = null ; public String fTargetNamespace = null ; int fAttrUseNum = 0 ; private static final int INITIAL_SIZE = 5 ; XSAttributeUseImpl [ ] fAttributeUses = new XSAttributeUseImpl [ XSAttributeGroupDecl . INITIAL_SIZE ] ; public XSWildcardDecl fAttributeWC = null ; public String fIDAttrName = null ; public String addAttributeUse ( XSAttributeUseImpl attrUse ) { } public XSAttributeUseImpl getAttributeUse ( String uri , String localpart ) { } public void removeProhibitedAttrs ( ) { } public String validRestrictionOf ( XSAttributeGroupDecl baseGroup ) { String errorCode = null ; XSAttributeUseImpl attrUse = null ; XSAttributeDecl attrDecl = null ; XSAttributeUseImpl baseAttrUse = null ; XSAttributeDecl baseAttrDecl = null ; for ( int i = 0 ; i < ( fAttrUseNum ) ; i ++ ) { attrUse = fAttributeUses [ i ] ; attrDecl = attrUse . fAttrDecl ; baseAttrUse = baseGroup . getAttributeUse ( attrDecl . fTargetNamespace , attrDecl . fName ) ; if ( baseAttrUse != null ) { if ( ( ( baseAttrUse . fUse ) == ( SchemaSymbols . USE_REQUIRED ) ) && ( ( attrUse . fUse ) != ( SchemaSymbols . USE_REQUIRED ) ) ) { errorCode = "derivation-ok-restriction.2.1.1" ; return errorCode ; } if ( ( attrUse . fUse ) == ( SchemaSymbols . USE_PROHIBITED ) ) { continue ; } baseAttrDecl = baseAttrUse . fAttrDecl ; if ( ! ( XSConstraints . checkSimpleDerivationOk ( attrDecl . fType , baseAttrDecl . fType , baseAttrDecl . fType . getFinal ( ) ) ) ) { errorCode = "derivation-ok-restriction.2.1.2" ; return errorCode ; } int baseConsType = ( ( baseAttrUse . fConstraintType ) != ( XSConstants . VC_NONE ) ) ? baseAttrUse . fConstraintType : baseAttrDecl . getConstraintType ( ) ; int thisConstType = ( ( attrUse . fConstraintType ) != ( XSConstants . VC_NONE ) ) ? attrUse . fConstraintType : attrDecl . getConstraintType ( ) ; if ( baseConsType == ( XSConstants . VC_FIXED ) ) { if ( thisConstType != ( XSConstants . VC_FIXED ) ) { errorCode = "derivation-ok-restriction.2.1.3" ; return errorCode ; } else { ValidatedInfo baseFixedValue = ( ( baseAttrUse . fDefault ) != null ) ? baseAttrUse . fDefault : baseAttrDecl . fDefault ; ValidatedInfo thisFixedValue = ( ( attrUse . fDefault ) != null ) ? attrUse . fDefault : attrDecl . fDefault ; <START_BUG> if ( ! ( baseAttrDecl . fType . isEqual ( baseFixedValue . actualValue , thisFixedValue . actualValue ) ) ) { <END_BUG> errorCode = "derivation-ok-restriction.2.1.3" ; return errorCode ; } } } } else { if ( ( ( baseGroup . fAttributeWC ) == null ) || ( ! ( baseGroup . fAttributeWC . allowNamespace ( attrDecl . fTargetNamespace ) ) ) ) { errorCode = "derivation-ok-restriction.2.2" ; return errorCode ; } } } for ( int i = 0 ; i < ( baseGroup . fAttrUseNum ) ; i ++ ) { baseAttrUse = baseGroup . fAttributeUses [ i ] ; if ( ( baseAttrUse . fUse ) == ( SchemaSymbols . USE_REQUIRED ) ) { baseAttrDecl = baseAttrUse . fAttrDecl ; XSAttributeUseImpl thisAttrUse = getAttributeUse ( baseAttrDecl . fTargetNamespace , baseAttrDecl . fName ) ; if ( thisAttrUse == null ) { errorCode = "derivation-ok-restriction.3" ; return errorCode ; } } } if ( ( fAttributeWC ) != null ) { if ( ( baseGroup . fAttributeWC ) == null ) { errorCode = "derivation-ok-restriction.4" ; return errorCode ; } if ( ! ( fAttributeWC . isSubsetOf ( baseGroup . fAttributeWC ) ) ) { errorCode = "derivation-ok-restriction.4" ; return errorCode ; } } return null ; } static final XSAttributeUseImpl [ ] resize ( XSAttributeUseImpl [ ] oldArray , int newSize ) { } public void reset ( ) { } public short getType ( ) { } public String getName ( ) { } public String getNamespace ( ) { } public XSObjectList getAttributeUses ( ) { } public XSWildcard getAttributeWildcard ( ) { } public XSAnnotation getAnnotation ( ) { } }

Fix:
if ( ! ( baseFixedValue . actualValue . equals ( thisFixedValue . actualValue ) ) ) {