Buggy code:
public class SchemaGrammar extends Grammar { private SymbolTable fSymbolTable ; public String fTargetNamespace ; SymbolHash fGlobalAttrDecls ; SymbolHash fGlobalAttrGrpDecls ; SymbolHash fGlobalElemDecls ; SymbolHash fGlobalGroupDecls ; SymbolHash fGlobalNotationDecls ; SymbolHash fGlobalIDConstraintDecls ; Hashtable fGlobalTypeDecls ; public SchemaGrammar ( SymbolTable symbolTable , String targetNamespace ) { } private static final int BASICSET_COUNT = 29 ; private static final int FULLSET_COUNT = 46 ; protected SchemaGrammar ( SymbolTable symbolTable ) { } public boolean isNamespaceAware ( ) { } public final String getTargetNamespace ( ) { } public final void addGlobalAttributeDecl ( XSAttributeDecl decl ) { } public final void addGlobalAttributeGroupDecl ( XSAttributeGroupDecl decl ) { } public final void addGlobalElementDecl ( XSElementDecl decl ) { } public final void addGlobalGroupDecl ( XSGroupDecl decl ) { } public final void addGlobalNotationDecl ( XSNotationDecl decl ) { } public final void addGlobalTypeDecl ( XSTypeDecl decl ) { } public final void addIDConstraintDecl ( XSElementDecl elmDecl , IdentityConstraint decl ) { } public final XSAttributeDecl getGlobalAttributeDecl ( String declName ) { } public final XSAttributeGroupDecl getGlobalAttributeGroupDecl ( String declName ) { } public final XSElementDecl getGlobalElementDecl ( String declName ) { } public final XSGroupDecl getGlobalGroupDecl ( String declName ) { } public final XSNotationDecl getNotationDecl ( String declName ) { } public final XSTypeDecl getGlobalTypeDecl ( String declName ) { } public final IdentityConstraint getIDConstraintDecl ( String declName ) { } private static final int INITIAL_SIZE = 16 ; private static final int INC_SIZE = 16 ; private int fCTCount = 0 ; private XSComplexTypeDecl [ ] fComplexTypeDecls = new XSComplexTypeDecl [ SchemaGrammar . INITIAL_SIZE ] ; private static final int REDEFINED_GROUP_INIT_SIZE = 2 ; private int fRGCount = 0 ; private XSGroupDecl [ ] fRedefinedGroupDecls = new XSGroupDecl [ SchemaGrammar . REDEFINED_GROUP_INIT_SIZE ] ; boolean fFullChecked = false ; public final void addComplexTypeDecl ( XSComplexTypeDecl decl ) { } public final void addRedefinedGroupDecl ( XSGroupDecl derived , XSGroupDecl base ) { if ( ( fRGCount ) == ( fRedefinedGroupDecls . length ) ) <START_BUG> fRedefinedGroupDecls = SchemaGrammar . resize ( fRedefinedGroupDecls , ( ( fRGCount ) << 2 ) ) ; <END_BUG> fRedefinedGroupDecls [ ( ( fRGCount ) ++ ) ] = derived ; fRedefinedGroupDecls [ ( ( fRGCount ) ++ ) ] = base ; } final XSComplexTypeDecl [ ] getUncheckedComplexTypeDecls ( ) { } final XSGroupDecl [ ] getRedefinedGroupDecls ( ) { } final void setUncheckedTypeNum ( int newSize ) { } private int fSubGroupCount = 0 ; private XSElementDecl [ ] fSubGroups = new XSElementDecl [ SchemaGrammar . INITIAL_SIZE ] ; final XSElementDecl [ ] getSubstitutionGroups ( ) { } public static final XSComplexTypeDecl fAnyType ; public static final SchemaGrammar SG_SchemaNS = new SchemaGrammar ( null ) ; public static final XSSimpleType fAnySimpleType = ( ( XSSimpleType ) ( SchemaGrammar . SG_SchemaNS . getGlobalTypeDecl ( ATTVAL_ANYSIMPLETYPE ) ) ) ; static final XSComplexTypeDecl [ ] resize ( XSComplexTypeDecl [ ] oldArray , int newSize ) { } static final XSGroupDecl [ ] resize ( XSGroupDecl [ ] oldArray , int newSize ) { } static final XSElementDecl [ ] resize ( XSElementDecl [ ] oldArray , int newSize ) { } }

Fix:
fRedefinedGroupDecls = SchemaGrammar . resize ( fRedefinedGroupDecls , ( ( fRGCount ) << 1 ) ) ;