Buggy code:
public boolean startElement ( int elementTypeIndex , XMLAttrList attrList ) throws Exception { } public boolean endElement ( int elementTypeIndex ) throws Exception { } private int normalizeAttributeValue ( int elementTypeIndex , int attrNameIndex , int attValueIndex , int attType , int enumIndex ) throws Exception { } private void pushElement ( int elementTypeIndex , int contentSpecType ) { } private void charDataInContent ( ) { } private int peekElementType ( ) { } private int peekContentSpecType ( ) { } private int peekChildCount ( ) { } private int [ ] peekChildren ( ) { } private void popElement ( ) throws Exception { } private void checkAttributes ( int elementIndex , XMLAttrList attrList , int attrIndex ) throws Exception { } public int checkContent ( int elementIndex , int childCount , int [ ] children ) throws Exception { } public void checkIDRefNames ( ) throws Exception { } public int whatCanGoHere ( int elementIndex , boolean fullyValid , InsertableElementsInfo info ) throws Exception { } private final XMLContentModel createChildModel ( int elementIndex ) throws CMException { } public XMLContentModel getContentModel ( int elementIndex ) throws CMException { } private int fLeafCount = 0 ; private int fEpsilonIndex = - 1 ; private final CMNode buildSyntaxTree ( int startNode , XMLContentSpecNode specNode ) throws CMException { } private int fCount = 0 ; private int [ ] fContentList = new int [ 64 ] ; private final void makeContentList ( int startNode , XMLContentSpecNode specNode ) throws CMException { } private final int buildContentList ( int startNode , int count , XMLContentSpecNode specNode ) throws CMException { } protected void reportRecoverableXMLError ( int majorCode , int minorCode ) throws Exception { } protected void reportRecoverableXMLError ( int majorCode , int minorCode , int stringIndex1 ) throws Exception { } protected void reportRecoverableXMLError ( int majorCode , int minorCode , String string1 ) throws Exception { } protected void reportRecoverableXMLError ( int majorCode , int minorCode , int stringIndex1 , int stringIndex2 ) throws Exception { } protected void reportRecoverableXMLError ( int majorCode , int minorCode , String string1 , String string2 ) throws Exception { } protected void reportRecoverableXMLError ( int majorCode , int minorCode , String string1 , String string2 , String string3 ) throws Exception { } private static final int CONTENTSPECNODE_ZERO_TO_N = ( XMLContentSpecNode . CONTENTSPECNODE_SEQ ) + 1 ; private static final int CONTENTSPECNODE_M_TO_N = ( XSchemaValidator . CONTENTSPECNODE_ZERO_TO_N ) + 1 ; private static final int CONTENTSPECNODE_M_OR_MORE = ( XSchemaValidator . CONTENTSPECNODE_M_TO_N ) + 1 ; private DOMParser fSchemaParser = null ; public void loadSchema ( String uri ) { } private void traverseSchema ( Element root ) throws Exception { if ( root == null ) { return ; } for ( Element child = XUtil . getFirstChildElement ( root ) ; child != null ; child = XUtil . getNextSiblingElement ( child ) ) { String name = child . getNodeName ( ) ; if ( name . equals ( XSchemaValidator . ELT_COMMENT ) ) { traverseComment ( child ) ; } else if ( name . equals ( XSchemaValidator . ELT_DATATYPEDECL ) ) { traverseDatatypeDecl ( child ) ; } else if ( name . equals ( XSchemaValidator . ELT_ARCHETYPEDECL ) ) { traverseTypeDecl ( child ) ; } else if ( name . equals ( XSchemaValidator . ELT_ELEMENTDECL ) ) { traverseElementDecl ( child ) ; } else if ( name . equals ( XSchemaValidator . ELT_ATTRGROUPDECL ) ) { traverseAttrGroup ( child ) ; } else if ( name . equals ( XSchemaValidator . ELT_MODELGROUPDECL ) ) { traverseModelGroup ( child ) ; } else if ( ( ( name . equals ( XSchemaValidator . ELT_TEXTENTITYDECL ) ) || ( name . equals ( XSchemaValidator . ELT_EXTERNALENTITYDECL ) ) ) || ( name . equals ( XSchemaValidator . ELT_UNPARSEDENTITYDECL ) ) ) { int entityName = fStringPool . addSymbol ( child . getAttribute ( XSchemaValidator . ATT_NAME ) ) ; if ( name . equals ( XSchemaValidator . ELT_TEXTENTITYDECL ) ) { <START_BUG> int value = fStringPool . addString ( child . getFirstChild ( ) . getNodeValue ( ) ) ; <END_BUG> fEntityPool . addEntityDecl ( entityName , value , ( - 1 ) , ( - 1 ) , ( - 1 ) , ( - 1 ) , true ) ; } else { int publicId = fStringPool . addString ( child . getAttribute ( "public" ) ) ; int systemId = fStringPool . addString ( child . getAttribute ( "system" ) ) ; if ( name . equals ( XSchemaValidator . ELT_EXTERNALENTITYDECL ) ) { fEntityPool . addEntityDecl ( entityName , ( - 1 ) , ( - 1 ) , publicId , systemId , ( - 1 ) , true ) ; } else { int notationName = fStringPool . addSymbol ( child . getAttribute ( "notation" ) ) ; fEntityPool . addEntityDecl ( entityName , ( - 1 ) , ( - 1 ) , publicId , systemId , notationName , true ) ; } } } else if ( name . equals ( XSchemaValidator . ELT_NOTATIONDECL ) ) { int notationName = fStringPool . addSymbol ( child . getAttribute ( XSchemaValidator . ATT_NAME ) ) ; int publicId = fStringPool . addString ( child . getAttribute ( "public" ) ) ; int systemId = fStringPool . addString ( child . getAttribute ( "system" ) ) ; fEntityPool . addNotationDecl ( notationName , publicId , systemId , true ) ; } } cleanupForwardReferences ( ) ; } private void cleanupForwardReferences ( ) { } private void cleanupForwardReferencesTo ( int r ) { } private void traverseComment ( Element comment ) { } private int traverseTypeDecl ( Element typeDecl ) throws Exception { } private int traverseGroup ( Element groupDecl ) throws Exception { } private int traverseModelGroup ( Element modelGroupDecl ) throws Exception { } private int traverseModelGroupRef ( Element modelGroupRef ) { }

Fix:
int value = fStringPool . addString ( child . getFirstChild ( ) . getFirstChild ( ) . getNodeValue ( ) ) ;