Buggy code:
protected XSSimpleTypeDecl setListValues ( String name , String uri , short finalSet , XSSimpleTypeDecl itemType , XSObjectList annotations ) { } protected XSSimpleTypeDecl setUnionValues ( String name , String uri , short finalSet , XSSimpleTypeDecl [ ] memberTypes , XSObjectList annotations ) { } public short getType ( ) { } public short getTypeCategory ( ) { } public String getName ( ) { } public String getNamespace ( ) { } public short getFinal ( ) { } public boolean isFinal ( short derivation ) { } public XSTypeDefinition getBaseType ( ) { } public boolean getAnonymous ( ) { } public short getVariety ( ) { } public boolean isIDType ( ) { } public short getWhitespace ( ) throws DatatypeException { } public short getPrimitiveKind ( ) { } public short getBuiltInKind ( ) { } public XSSimpleTypeDefinition getPrimitiveType ( ) { } public XSSimpleTypeDefinition getItemType ( ) { } public XSObjectList getMemberTypes ( ) { } public void applyFacets ( XSFacets facets , short presentFacet , short fixedFacet , ValidationContext context ) throws InvalidDatatypeFacetException { } void applyFacets1 ( XSFacets facets , short presentFacet , short fixedFacet ) { } void applyFacets1 ( XSFacets facets , short presentFacet , short fixedFacet , short patternType ) { } void applyFacets ( XSFacets facets , short presentFacet , short fixedFacet , short patternType , ValidationContext context ) throws InvalidDatatypeFacetException { } public Object validate ( String content , ValidationContext context , ValidatedInfo validatedInfo ) throws InvalidDatatypeValueException { } public Object validate ( Object content , ValidationContext context , ValidatedInfo validatedInfo ) throws InvalidDatatypeValueException { } public void validate ( ValidationContext context , ValidatedInfo validatedInfo ) throws InvalidDatatypeValueException { } private void checkFacets ( ValidatedInfo validatedInfo ) throws InvalidDatatypeValueException { } private void checkExtraRules ( ValidationContext context , ValidatedInfo validatedInfo ) throws InvalidDatatypeValueException { } private Object getActualValue ( Object content , ValidationContext context , ValidatedInfo validatedInfo , boolean needNormalize ) throws InvalidDatatypeValueException { } public boolean isEqual ( Object value1 , Object value2 ) { } public static String normalize ( String content , short ws ) { } protected String normalize ( Object content , short ws ) { } void reportError ( String key , Object [ ] args ) throws InvalidDatatypeFacetException { } private String whiteSpaceValue ( short ws ) { } public short getOrdered ( ) { } public boolean getBounded ( ) { } public boolean getFinite ( ) { } public boolean getNumeric ( ) { } public boolean isDefinedFacet ( short facetName ) { } public short getDefinedFacets ( ) { } public boolean isFixedFacet ( short facetName ) { } public short getFixedFacets ( ) { } public String getLexicalFacetValue ( short facetName ) { } public StringList getLexicalEnumeration ( ) { } public StringList getLexicalPattern ( ) { if ( ( ( ( fPatternType ) == ( XSSimpleTypeDecl . SPECIAL_PATTERN_NONE ) ) && ( ( fValidationDV ) != ( XSSimpleTypeDecl . DV_INTEGER ) ) ) && ( ( fPatternStr ) == null ) ) return null ; if ( ( fLexicalPattern ) == null ) { int size = ( ( fPatternStr ) == null ) ? 0 : fPatternStr . size ( ) ; String [ ] strs ; if ( ( fPatternType ) == ( XSSimpleTypeDecl . SPECIAL_PATTERN_NMTOKEN ) ) { strs = new String [ size + 1 ] ; strs [ size ] = "\\c+" ; } else if ( ( fPatternType ) == ( XSSimpleTypeDecl . SPECIAL_PATTERN_NAME ) ) { strs = new String [ size + 1 ] ; strs [ size ] = "\\i\\c*" ; } else if ( ( fPatternType ) == ( XSSimpleTypeDecl . SPECIAL_PATTERN_NCNAME ) ) { strs = new String [ size + 2 ] ; strs [ size ] = "\\i\\c*" ; strs [ ( size + 1 ) ] = "[\\i-[:]][\\c-[:]]*" ; } else if ( ( fValidationDV ) == ( XSSimpleTypeDecl . DV_INTEGER ) ) { strs = new String [ size + 1 ] ; strs [ size ] = "[+\\-]?[0-9]+" ; } else { strs = new String [ size ] ; } for ( int i = 0 ; i < size ; i ++ ) strs [ i ] = ( ( String ) ( fPatternStr . elementAt ( i ) ) ) ; <START_BUG> fLexicalPattern = new StringListImpl ( strs , size ) ; <END_BUG> } return fLexicalPattern ; } public XSObjectList getAnnotations ( ) { } private void caclFundamentalFacets ( ) { } private void setOrdered ( ) { } private void setNumeric ( ) { } private void setBounded ( ) { } private boolean specialCardinalityCheck ( ) { } private void setCardinality ( ) { } private short getPrimitiveDV ( short validationDV ) { } public boolean derivedFromType ( XSTypeDefinition ancestor , short derivation ) { } public boolean derivedFrom ( String ancestorNS , String ancestorName , short derivation ) { } static final XSSimpleTypeDecl fAnySimpleType = new XSSimpleTypeDecl ( null , "anySimpleType" , XSSimpleTypeDecl . DV_ANYSIMPLETYPE , ORDERED_FALSE , false , true , false , true , XSConstants . ANYSIMPLETYPE_DT ) ; static final ValidationContext fDummyContext = new ValidationContext ( ) { public boolean needFacetChecking ( ) { } public boolean needExtraChecking ( ) { } public boolean needToNormalize ( ) { } public boolean useNamespaces ( ) { } public boolean isEntityDeclared ( String name ) { } public boolean isEntityUnparsed ( String name ) { } public boolean isIdDeclared ( String name ) { } public void addId ( String name ) { } public void addIdRef ( String name ) { } public String getSymbol ( String symbol ) { } public String getURI ( String prefix ) { } } ; class ValidationContextImpl implements ValidationContext { ValidationContext fExternal ; ValidationContextImpl ( ValidationContext external ) { } NamespaceContext fNSContext ; void setNSContext ( NamespaceContext nsContext ) { } public boolean needFacetChecking ( ) { }

Fix:
fLexicalPattern = new StringListImpl ( strs , strs . length ) ;