Buggy code:
public void setOutputFormat ( OutputFormat format ) { } public boolean reset ( ) { } private void prepare ( ) throws IOException { } public void serialize ( Element elem ) throws IOException { } public void serialize ( DocumentFragment frag ) throws IOException { } public void serialize ( Document doc ) throws IOException { } public void characters ( char [ ] chars , int start , int length ) { } public void ignorableWhitespace ( char [ ] chars , int start , int length ) { } public void processingInstruction ( String target , String code ) { } public void comment ( char [ ] chars , int start , int length ) { } public void comment ( String text ) { } public void startCDATA ( ) { } public void endCDATA ( ) { } public void startNonEscaping ( ) { } public void endNonEscaping ( ) { } public void startPreserving ( ) { } public void endPreserving ( ) { } public void endDocument ( ) throws SAXException { } public void startEntity ( String name ) { } public void endEntity ( String name ) { } public void setDocumentLocator ( Locator locator ) { } public void skippedEntity ( String name ) throws SAXException { } public void startPrefixMapping ( String prefix , String uri ) throws SAXException { } public void endPrefixMapping ( String prefix ) throws SAXException { } public void startDTD ( String name , String publicId , String systemId ) { } public void endDTD ( ) { } public void elementDecl ( String name , String model ) { } public void attributeDecl ( String eName , String aName , String type , String valueDefault , String value ) { } public void internalEntityDecl ( String name , String value ) { } public void externalEntityDecl ( String name , String publicId , String systemId ) { } public void unparsedEntityDecl ( String name , String publicId , String systemId , String notationName ) { } public void notationDecl ( String name , String publicId , String systemId ) { } protected void serializeNode ( Node node ) { switch ( node . getNodeType ( ) ) { case Node . TEXT_NODE : { String text ; text = node . getNodeValue ( ) ; if ( text != null ) characters ( node . getNodeValue ( ) ) ; break ; } case Node . CDATA_SECTION_NODE : { String text ; text = node . getNodeValue ( ) ; if ( text != null ) { startCDATA ( ) ; characters ( node . getNodeValue ( ) ) ; endCDATA ( ) ; } break ; } case Node . COMMENT_NODE : { String text ; text = node . getNodeValue ( ) ; if ( text != null ) comment ( node . getNodeValue ( ) ) ; break ; } case Node . ENTITY_REFERENCE_NODE : { Node child ; endCDATA ( ) ; content ( ) ; child = node . getFirstChild ( ) ; while ( child != null ) { serializeNode ( child ) ; child = child . getNextSibling ( ) ; } break ; } case Node . PROCESSING_INSTRUCTION_NODE : processingInstruction ( node . getNodeName ( ) , node . getNodeValue ( ) ) ; break ; case Node . ELEMENT_NODE : serializeElement ( ( ( Element ) ( node ) ) ) ; break ; case Node . DOCUMENT_NODE : { DocumentType docType ; DOMImplementation domImpl ; NamedNodeMap map ; Entity entity ; Notation notation ; int i ; docType = ( ( Document ) ( node ) ) . getDoctype ( ) ; if ( docType != null ) { domImpl = ( ( Document ) ( node ) ) . getImplementation ( ) ; try { String internal ; startDTD ( docType . getName ( ) , docType . getPublicId ( ) , docType . getSystemId ( ) ) ; internal = docType . getInternalSubset ( ) ; if ( ( internal != null ) && ( ( internal . length ( ) ) > 0 ) ) <START_BUG> printText ( internal , true ) ; <END_BUG> endDTD ( ) ; } catch ( NoSuchMethodError nsme ) { Class docTypeClass = docType . getClass ( ) ; String docTypePublicId = null ; String docTypeSystemId = null ; try { Method getPublicId = docTypeClass . getMethod ( "getPublicId" , null ) ; if ( getPublicId . getReturnType ( ) . equals ( String . class ) ) { docTypePublicId = ( ( String ) ( getPublicId . invoke ( docType , null ) ) ) ; } } catch ( Exception e ) { } try { Method getSystemId = docTypeClass . getMethod ( "getSystemId" , null ) ; if ( getSystemId . getReturnType ( ) . equals ( String . class ) ) { docTypeSystemId = ( ( String ) ( getSystemId . invoke ( docType , null ) ) ) ; } } catch ( Exception e ) { } startDTD ( docType . getName ( ) , docTypePublicId , docTypeSystemId ) ; endDTD ( ) ; } } } case Node . DOCUMENT_FRAGMENT_NODE : { Node child ; child = node . getFirstChild ( ) ; while ( child != null ) { serializeNode ( child ) ; child = child . getNextSibling ( ) ; } break ; } default : break ; } } protected ElementState content ( ) { } protected void characters ( String text ) { } protected abstract String getEntityRef ( char ch ) { } protected abstract void serializeElement ( Element elem ) { } protected void serializePreRoot ( ) { } protected final void printText ( char [ ] chars , int start , int length , boolean preserveSpace , boolean unescaped ) { } protected final void printText ( String text , boolean preserveSpace , boolean unescaped ) { }

Fix:
_printer . printText ( internal ) ;