Buggy code:
protected transient int [ ] [ ] fNodeParent ; protected transient int [ ] [ ] fNodeLastChild ; protected transient int [ ] [ ] fNodePrevSib ; protected transient Object [ ] [ ] fNodeURI ; protected transient int [ ] [ ] fNodeExtra ; protected transient int fIdCount ; protected transient String [ ] fIdName ; protected transient int [ ] fIdElement ; protected boolean fNamespacesEnabled = false ; public DeferredDocumentImpl ( ) { } public DeferredDocumentImpl ( boolean namespacesEnabled ) { } public DeferredDocumentImpl ( boolean namespaces , boolean grammarAccess ) { } boolean getNamespacesEnabled ( ) { } void setNamespacesEnabled ( boolean enable ) { } public int createDeferredDocument ( ) { } public int createDeferredDocumentType ( String rootElementName , String publicId , String systemId ) { } public void setInternalSubset ( int doctypeIndex , String subset ) { } public int createDeferredNotation ( String notationName , String publicId , String systemId ) throws Exception { } public int createDeferredEntity ( String entityName , String publicId , String systemId , String notationName ) throws Exception { } public void setEntityInfo ( int currentEntityDecl , String version , String encoding ) { } public int createDeferredEntityReference ( String name ) { } public int createDeferredElement ( String elementName , XMLAttributes attrList ) { } public int createDeferredElement ( String elementURI , String elementName , XMLAttributes attrList ) { } public int createDeferredAttribute ( String attrName , String attrValue , boolean specified ) { } public int createDeferredAttribute ( String attrName , String attrURI , String attrValue , boolean specified ) { } public int createDeferredElementDefinition ( String elementName ) { } public int createDeferredTextNode ( String data , boolean ignorableWhitespace ) { } public int createDeferredCDATASection ( String data ) { } public int createDeferredProcessingInstruction ( String target , String data ) { } public int createDeferredComment ( String data ) { } public void appendChild ( int parentIndex , int childIndex ) { } public int setAttributeNode ( int elemIndex , int attrIndex ) { } public int insertBefore ( int parentIndex , int newChildIndex , int refChildIndex ) { } public void setAsLastChild ( int parentIndex , int childIndex ) { } public int getParentNode ( int nodeIndex ) { } public int getParentNode ( int nodeIndex , boolean free ) { } public int getLastChild ( int nodeIndex ) { } public int getLastChild ( int nodeIndex , boolean free ) { } public int getPrevSibling ( int nodeIndex ) { } public int getPrevSibling ( int nodeIndex , boolean free ) { } public int getRealPrevSibling ( int nodeIndex ) { } public int getRealPrevSibling ( int nodeIndex , boolean free ) { } public int lookupElementDefinition ( String elementName ) { } public DeferredNode getNodeObject ( int nodeIndex ) { } public String getNodeName ( int nodeIndex ) { } public String getNodeName ( int nodeIndex , boolean free ) { } public String getNodeValueString ( int nodeIndex ) { } public String getNodeValueString ( int nodeIndex , boolean free ) { } public String getNodeValue ( int nodeIndex ) { } public String getNodeValue ( int nodeIndex , boolean free ) { } public int getNodeExtra ( int nodeIndex ) { } public int getNodeExtra ( int nodeIndex , boolean free ) { } public short getNodeType ( int nodeIndex ) { } public short getNodeType ( int nodeIndex , boolean free ) { } public String getAttribute ( int elemIndex , String name ) { } public String getNodeURI ( int nodeIndex ) { } public String getNodeURI ( int nodeIndex , boolean free ) { } public void putIdentifier ( String name , int elementNodeIndex ) { } public void print ( ) { } public int getNodeIndex ( ) { } protected void synchronizeData ( ) { } protected void synchronizeChildren ( ) { } protected final void synchronizeChildren ( AttrImpl a , int nodeIndex ) { boolean orig = getMutationEvents ( ) ; setMutationEvents ( false ) ; a . needsSyncChildren ( false ) ; int last = getLastChild ( nodeIndex ) ; int prev = getPrevSibling ( last ) ; if ( prev == ( - 1 ) ) { <START_BUG> a . value = getNodeValueString ( last ) ; <END_BUG> a . hasStringValue ( true ) ; } else { ChildNode firstNode = null ; ChildNode lastNode = null ; for ( int index = last ; index != ( - 1 ) ; index = getPrevSibling ( index ) ) { ChildNode node = ( ( ChildNode ) ( getNodeObject ( index ) ) ) ; if ( lastNode == null ) { lastNode = node ; } else { firstNode . previousSibling = node ; } node . ownerNode = a ; node . isOwned ( true ) ; node . nextSibling = firstNode ; firstNode = node ; } if ( lastNode != null ) { a . value = firstNode ; firstNode . isFirstChild ( true ) ; a . lastChild ( lastNode ) ; } a . hasStringValue ( false ) ; } setMutationEvents ( orig ) ; } protected final void synchronizeChildren ( ParentNode p , int nodeIndex ) { } protected boolean ensureCapacity ( int chunk , int index ) { } protected int createNode ( short nodeType ) { } protected static int binarySearch ( final int [ ] values , int start , int end , int target ) { } private final void createChunk ( int [ ] [ ] data , int chunk ) { } class RefCount { int fCount ; } private final void createChunk ( Object [ ] [ ] data , int chunk ) { } private final int setChunkIndex ( int [ ] [ ] data , int value , int chunk , int index ) { }

Fix:
a . value = getNodeValueString ( nodeIndex ) ;