Buggy code:
Node eventSet = nl . item ( 0 ) ; NodeList eventList = eventSet . getChildNodes ( ) ; for ( int eventIndex = 0 ; eventIndex < ( eventList . getLength ( ) ) ; eventIndex ++ ) { Node eventNode = eventList . item ( eventIndex ) ; if ( ( eventNode . getNodeType ( ) ) != ( Node . ELEMENT_NODE ) ) { continue ; } logger = Logger . getLogger ( eventNode . getAttributes ( ) . getNamedItem ( "logger" ) . getNodeValue ( ) ) ; timeStamp = Long . parseLong ( eventNode . getAttributes ( ) . getNamedItem ( "timestamp" ) . getNodeValue ( ) ) ; level = eventNode . getAttributes ( ) . getNamedItem ( "level" ) . getNodeValue ( ) ; threadName = eventNode . getAttributes ( ) . getNamedItem ( "thread" ) . getNodeValue ( ) ; NodeList list = eventNode . getChildNodes ( ) ; int listLength = list . getLength ( ) ; for ( int y = 0 ; y < listLength ; y ++ ) { String tagName = list . item ( y ) . getNodeName ( ) ; if ( tagName . equalsIgnoreCase ( "log4j:message" ) ) { message = getCData ( list . item ( y ) ) ; } if ( tagName . equalsIgnoreCase ( "log4j:NDC" ) ) { ndc = getCData ( list . item ( y ) ) ; } if ( tagName . equalsIgnoreCase ( "log4j:MDC" ) ) { properties = new Hashtable ( ) ; NodeList propertyList = list . item ( y ) . getChildNodes ( ) ; int propertyLength = propertyList . getLength ( ) ; for ( int i = 0 ; i < propertyLength ; i ++ ) { String propertyTag = propertyList . item ( i ) . getNodeName ( ) ; if ( propertyTag . equalsIgnoreCase ( "log4j:data" ) ) { Node property = propertyList . item ( i ) ; String name = property . getAttributes ( ) . getNamedItem ( "name" ) . getNodeValue ( ) ; String value = property . getAttributes ( ) . getNamedItem ( "value" ) . getNodeValue ( ) ; properties . put ( name , value ) ; } } } if ( tagName . equalsIgnoreCase ( "log4j:throwable" ) ) { exception = new String [ ] { getCData ( list . item ( y ) ) } ; } if ( tagName . equalsIgnoreCase ( "log4j:locationinfo" ) ) { className = list . item ( y ) . getAttributes ( ) . getNamedItem ( "class" ) . getNodeValue ( ) ; methodName = list . item ( y ) . getAttributes ( ) . getNamedItem ( "method" ) . getNodeValue ( ) ; fileName = list . item ( y ) . getAttributes ( ) . getNamedItem ( "file" ) . getNodeValue ( ) ; lineNumber = list . item ( y ) . getAttributes ( ) . getNamedItem ( "line" ) . getNodeValue ( ) ; } if ( tagName . equalsIgnoreCase ( "log4j:properties" ) ) { if ( properties == null ) { properties = new Hashtable ( ) ; } NodeList propertyList = list . item ( y ) . getChildNodes ( ) ; int propertyLength = propertyList . getLength ( ) ; for ( int i = 0 ; i < propertyLength ; i ++ ) { String propertyTag = propertyList . item ( i ) . getNodeName ( ) ; if ( propertyTag . equalsIgnoreCase ( "log4j:data" ) ) { Node property = propertyList . item ( i ) ; String name = property . getAttributes ( ) . getNamedItem ( "name" ) . getNodeValue ( ) ; String value = property . getAttributes ( ) . getNamedItem ( "value" ) . getNodeValue ( ) ; properties . put ( name , value ) ; } } } if ( ( additionalProperties . size ( ) ) > 0 ) { if ( properties == null ) { properties = new Hashtable ( additionalProperties ) ; } else { properties . putAll ( additionalProperties ) ; } } } Level levelImpl = null ; if ( ( properties != null ) && ( ( properties . get ( "log4j.eventtype" ) ) != null ) ) { String s = ( ( String ) ( properties . get ( "log4j.eventtype" ) ) ) ; if ( "util-logging" . equalsIgnoreCase ( s ) ) { levelImpl = UtilLoggingLevel . toLevel ( level ) ; } } if ( levelImpl == null ) { levelImpl = Level . toLevel ( level ) ; } LocationInfo info = null ; if ( ( ( ( fileName != null ) || ( className != null ) ) || ( methodName != null ) ) || ( lineNumber != null ) ) { info = new LocationInfo ( fileName , className , methodName , lineNumber ) ; } else { info = LocationInfo . NA_LOCATION_INFO ; } if ( exception == null ) { <START_BUG> exception = new String [ ] { } ; <END_BUG> } LoggingEvent loggingEvent = new LoggingEvent ( ) ; loggingEvent . setLogger ( logger ) ; loggingEvent . setTimeStamp ( timeStamp ) ; loggingEvent . setLevel ( levelImpl ) ; loggingEvent . setThreadName ( threadName ) ; loggingEvent . setMessage ( message ) ; loggingEvent . setNDC ( ndc ) ; loggingEvent . setThrowableInformation ( new ThrowableInformation ( exception ) ) ; loggingEvent . setLocationInformation ( info ) ; loggingEvent . setProperties ( properties ) ; events . add ( loggingEvent ) ; logger = null ; timeStamp = 0L ; level = null ; threadName = null ; message = null ; ndc = null ; exception = null ; className = null ; methodName = null ; fileName = null ; lineNumber = null ; properties = null ; } return events ; } private String getCData ( Node n ) { } }

Fix:
exception = new String [ ] { "" } ;