Buggy code:
public abstract class AbstractSAXParser extends AbstractXMLDocumentParser implements Parser , XMLReader { protected static final String NAMESPACES = ( Constants . SAX_FEATURE_PREFIX ) + ( Constants . NAMESPACES_FEATURE ) ; protected static final String NAMESPACE_PREFIXES = ( Constants . SAX_FEATURE_PREFIX ) + ( Constants . NAMESPACE_PREFIXES_FEATURE ) ; protected static final String SYMBOL_TABLE = ( Constants . XERCES_PROPERTY_PREFIX ) + ( Constants . SYMBOL_TABLE_PROPERTY ) ; protected boolean fNamespaces ; protected boolean fNamespacePrefixes = false ; protected ContentHandler fContentHandler ; protected DocumentHandler fDocumentHandler ; protected DTDHandler fDTDHandler ; protected DeclHandler fDeclHandler ; protected LexicalHandler fLexicalHandler ; protected QName fQName = new QName ( ) ; private String fEmptySymbol ; private String fXmlnsSymbol ; protected boolean fParseInProgress = false ; private final AbstractSAXParser . AttributesProxy fAttributesProxy = new AbstractSAXParser . AttributesProxy ( ) ; protected AbstractSAXParser ( XMLParserConfiguration config ) { } public void startDocument ( XMLLocator locator , String encoding , Augmentations augs ) throws XNIException { } public void doctypeDecl ( String rootElement , String publicId , String systemId , Augmentations augs ) throws XNIException { } public void startEntity ( String name , String publicId , String systemId , String baseSystemId , String encoding , Augmentations augs ) throws XNIException { } public void endEntity ( String name , Augmentations augs ) throws XNIException { } public void startPrefixMapping ( String prefix , String uri , Augmentations augs ) throws XNIException { } public void startElement ( QName element , XMLAttributes attributes , Augmentations augs ) throws XNIException { } public void characters ( XMLString text , Augmentations augs ) throws XNIException { } public void ignorableWhitespace ( XMLString text , Augmentations augs ) throws XNIException { } public void endElement ( QName element , Augmentations augs ) throws XNIException { } public void endPrefixMapping ( String prefix , Augmentations augs ) throws XNIException { } public void startCDATA ( Augmentations augs ) throws XNIException { } public void endCDATA ( Augmentations augs ) throws XNIException { } public void comment ( XMLString text , Augmentations augs ) throws XNIException { } public void processingInstruction ( String target , XMLString data , Augmentations augs ) throws XNIException { } public void endDocument ( Augmentations augs ) throws XNIException { } public void processingInstruction ( String target , XMLString data ) throws XNIException { } public void comment ( XMLString text ) throws XNIException { } public void startEntity ( String name , String publicId , String systemId , String baseSystemId , String encoding ) throws XNIException { } public void endEntity ( String name ) throws XNIException { } public void elementDecl ( String name , String contentModel ) throws XNIException { } public void attributeDecl ( String elementName , String attributeName , String type , String [ ] enumeration , String defaultType , XMLString defaultValue ) throws XNIException { try { if ( ( fDeclHandler ) != null ) { if ( type . equals ( "NOTATION" ) ) { StringBuffer str = new StringBuffer ( ) ; str . append ( type ) ; str . append ( "<seq2seq4repair_space>(" ) ; for ( int i = 0 ; i < ( enumeration . length ) ; i ++ ) { str . append ( enumeration [ i ] ) ; if ( i < ( ( enumeration . length ) - 1 ) ) { str . append ( '|' ) ; } } str . append ( ')' ) ; type = str . toString ( ) ; } <START_BUG> String value = defaultValue . toString ( ) ; <END_BUG> fDeclHandler . attributeDecl ( elementName , attributeName , type , defaultType , value ) ; } } catch ( SAXException e ) { throw new XNIException ( e ) ; } } public void internalEntityDecl ( String name , XMLString text , XMLString nonNormalizedText ) throws XNIException { } public void externalEntityDecl ( String name , String publicId , String systemId , String baseSystemId ) throws XNIException { } public void unparsedEntityDecl ( String name , String publicId , String systemId , String notation ) throws XNIException { } public void notationDecl ( String name , String publicId , String systemId ) throws XNIException { } public void endDTD ( ) throws XNIException { } public void parse ( String systemId ) throws IOException , SAXException { } public void parse ( InputSource inputSource ) throws IOException , SAXException { } public void setEntityResolver ( EntityResolver resolver ) { } public EntityResolver getEntityResolver ( ) { } public void setErrorHandler ( ErrorHandler errorHandler ) { } public ErrorHandler getErrorHandler ( ) { } public void setLocale ( Locale locale ) throws SAXException { } public void setDTDHandler ( DTDHandler dtdHandler ) { } public void setDocumentHandler ( DocumentHandler documentHandler ) { } public void setContentHandler ( ContentHandler contentHandler ) { } public ContentHandler getContentHandler ( ) { } public DTDHandler getDTDHandler ( ) { } public void setFeature ( String featureId , boolean state ) throws SAXNotRecognizedException , SAXNotSupportedException { } public boolean getFeature ( String featureId ) throws SAXNotRecognizedException , SAXNotSupportedException { } public void setProperty ( String propertyId , Object value ) throws SAXNotRecognizedException , SAXNotSupportedException { } public Object getProperty ( String propertyId ) throws SAXNotRecognizedException , SAXNotSupportedException { } protected void setDeclHandler ( DeclHandler handler ) throws SAXNotRecognizedException , SAXNotSupportedException { } protected DeclHandler getDeclHandler ( ) throws SAXNotRecognizedException , SAXNotSupportedException { } protected void setLexicalHandler ( LexicalHandler handler ) throws SAXNotRecognizedException , SAXNotSupportedException { } protected LexicalHandler getLexicalHandler ( ) throws SAXNotRecognizedException , SAXNotSupportedException { } public void reset ( ) throws XNIException { } protected static class LocatorProxy implements Locator { protected XMLLocator fLocator ; public LocatorProxy ( XMLLocator locator ) { } public String getPublicId ( ) { } public String getSystemId ( ) { } public int getLineNumber ( ) { } public int getColumnNumber ( ) { } } protected static final class AttributesProxy implements AttributeList , Attributes { protected XMLAttributes fAttributes ;

Fix:
String value = ( defaultValue == null ) ? null : defaultValue . toString ( ) ;