Buggy code:
} else { WSNRequestParser . log . error ( ( "Parsing<seq2seq4repair_space>error:<seq2seq4repair_space>" + initialJaxbParsingException ) ) ; } try { XMLParser . writeObjectToStream ( Utilities . createSoapFault ( "Client" , "Invalid<seq2seq4repair_space>formatted<seq2seq4repair_space>message" ) , streamToRequestor ) ; return new InternalMessage ( ( ( InternalMessage . STATUS_FAULT ) | ( InternalMessage . STATUS_FAULT_INVALID_PAYLOAD ) ) , null ) ; } catch ( JAXBException faultGeneratingJaxbException ) { WSNRequestParser . log . error ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>generate<seq2seq4repair_space>SOAP<seq2seq4repair_space>fault<seq2seq4repair_space>message:<seq2seq4repair_space>" + ( faultGeneratingJaxbException . getMessage ( ) ) ) ) ; return new InternalMessage ( ( ( InternalMessage . STATUS_FAULT ) | ( InternalMessage . STATUS_FAULT_INTERNAL_ERROR ) ) , null ) ; } } } message . statusCode = ( ( InternalMessage . STATUS_OK ) | ( InternalMessage . STATUS_HAS_MESSAGE ) ) | ( InternalMessage . STATUS_ENDPOINTREF_IS_SET ) ; if ( foundRecipient ) { WSNRequestParser . log . debug ( "Have<seq2seq4repair_space>recipient<seq2seq4repair_space>service,<seq2seq4repair_space>sending<seq2seq4repair_space>to<seq2seq4repair_space>recipient<seq2seq4repair_space>object" ) ; returnMessage = recipient . acceptMessage ( message ) ; WSNRequestParser . log . debug ( "Recieved<seq2seq4repair_space>returnMessage<seq2seq4repair_space>from<seq2seq4repair_space>recipient<seq2seq4repair_space>object" ) ; } else { WSNRequestParser . log . debug ( "Looking<seq2seq4repair_space>for<seq2seq4repair_space>service<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>to..." ) ; for ( ServiceConnection s : WSNRequestParser . _protocolServer . getServices ( ) ) { WSNRequestParser . log . debug ( ( "Attempting<seq2seq4repair_space>to<seq2seq4repair_space>forward<seq2seq4repair_space>request<seq2seq4repair_space>to<seq2seq4repair_space>" + s ) ) ; returnMessage = s . acceptMessage ( message ) ; if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_FAULT_INVALID_DESTINATION ) ) > 0 ) { continue ; } else if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_OK ) ) > 0 ) { break ; } else if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_FAULT_INTERNAL_ERROR ) ) > 0 ) { break ; } else if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_EXCEPTION_SHOULD_BE_HANDLED ) ) > 0 ) { break ; } } } if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_OK ) ) > 0 ) { if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_HAS_MESSAGE ) ) > 0 ) { WSNRequestParser . log . debug ( "Returning<seq2seq4repair_space>message..." ) ; if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_MESSAGE_IS_INPUTSTREAM ) ) > 0 ) { try { ByteStreams . copy ( ( ( InputStream ) ( returnMessage . getMessage ( ) ) ) , streamToRequestor ) ; return new InternalMessage ( InternalMessage . STATUS_OK , null ) ; } catch ( Exception e ) { WSNRequestParser . log . error ( ( "Casting<seq2seq4repair_space>the<seq2seq4repair_space>returnMessage<seq2seq4repair_space>to<seq2seq4repair_space>InputStream<seq2seq4repair_space>failed,<seq2seq4repair_space>" + "even<seq2seq4repair_space>though<seq2seq4repair_space>someone<seq2seq4repair_space>set<seq2seq4repair_space>the<seq2seq4repair_space>MESSAGE_IS_INPUTSTREAM<seq2seq4repair_space>flag." ) ) ; return new InternalMessage ( ( ( InternalMessage . STATUS_FAULT ) | ( InternalMessage . STATUS_FAULT_INTERNAL_ERROR ) ) , null ) ; } } else { Object messageToParse = wrapInJAXBAcceptedSoapEnvelope ( returnMessage . getMessage ( ) ) ; try { XMLParser . writeObjectToStream ( messageToParse , streamToRequestor ) ; return new InternalMessage ( InternalMessage . STATUS_OK , null ) ; } catch ( JAXBException e ) { String faultMessage = e . getClass ( ) . getName ( ) ; faultMessage += ( ( e . getMessage ( ) ) == null ) ? "" : e . getMessage ( ) ; Throwable cause = e . getCause ( ) ; while ( cause != null ) { faultMessage += "\n\tCaused<seq2seq4repair_space>by:<seq2seq4repair_space>" ; faultMessage += ( cause . getClass ( ) . getName ( ) ) + ( ( cause . getMessage ( ) ) == null ? "" : cause . getMessage ( ) ) ; cause = cause . getCause ( ) ; } if ( ( e . getLinkedException ( ) ) != null ) { faultMessage += "\n\tWith<seq2seq4repair_space>linked<seq2seq4repair_space>exception:" + ( e . getLinkedException ( ) . getClass ( ) . getName ( ) ) ; faultMessage += ( ( e . getLinkedException ( ) . getMessage ( ) ) == null ) ? "" : e . getLinkedException ( ) . getMessage ( ) ; } WSNRequestParser . log . error ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>marshal<seq2seq4repair_space>returnMessage.<seq2seq4repair_space>Consider<seq2seq4repair_space>converting<seq2seq4repair_space>the<seq2seq4repair_space>" + "message-payload<seq2seq4repair_space>at<seq2seq4repair_space>an<seq2seq4repair_space>earlier<seq2seq4repair_space>point.<seq2seq4repair_space>Reason<seq2seq4repair_space>given:\n\t" ) + faultMessage ) ) ; return new InternalMessage ( ( ( InternalMessage . STATUS_FAULT ) | ( InternalMessage . STATUS_FAULT_INTERNAL_ERROR ) ) , null ) ; } } } else { return returnMessage ; } } else { if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_EXCEPTION_SHOULD_BE_HANDLED ) ) > 0 ) { <START_BUG> WSNRequestParser . log . info ( "Exception<seq2seq4repair_space>thrown<seq2seq4repair_space>up<seq2seq4repair_space>the<seq2seq4repair_space>stack" ) ; <END_BUG> try { Utilities . attemptToParseException ( ( ( Exception ) ( returnMessage . getMessage ( ) ) ) , streamToRequestor ) ; WSNRequestParser . log . debug ( "Returning<seq2seq4repair_space>parsed<seq2seq4repair_space>error" ) ; return new InternalMessage ( InternalMessage . STATUS_FAULT , null ) ; } catch ( IllegalArgumentException e ) { WSNRequestParser . log . error ( "parseMessage():<seq2seq4repair_space>Error<seq2seq4repair_space>not<seq2seq4repair_space>parseable,<seq2seq4repair_space>the<seq2seq4repair_space>error<seq2seq4repair_space>can<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>wsdl-specified<seq2seq4repair_space>one." ) ; return new InternalMessage ( ( ( InternalMessage . STATUS_FAULT ) | ( InternalMessage . STATUS_FAULT_INVALID_PAYLOAD ) ) , null ) ; } catch ( ClassCastException e ) { WSNRequestParser . log . error ( "parseMessage():<seq2seq4repair_space>The<seq2seq4repair_space>returned<seq2seq4repair_space>exception<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>subclass<seq2seq4repair_space>of<seq2seq4repair_space>Exception." ) ; return new InternalMessage ( ( ( InternalMessage . STATUS_FAULT ) | ( InternalMessage . STATUS_FAULT_INVALID_PAYLOAD ) ) , null ) ; } } else { if ( ( ( returnMessage . statusCode ) & ( InternalMessage . STATUS_FAULT_INVALID_DESTINATION ) ) > 0 ) { try { XMLParser . writeObjectToStream ( Utilities . createSoapFault ( "Client" , "The<seq2seq4repair_space>message<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>any<seq2seq4repair_space>information<seq2seq4repair_space>relevant<seq2seq4repair_space>to<seq2seq4repair_space>any<seq2seq4repair_space>web<seq2seq4repair_space>service<seq2seq4repair_space>at<seq2seq4repair_space>this<seq2seq4repair_space>address" ) , streamToRequestor ) ; return returnMessage ; } catch ( JAXBException e ) { WSNRequestParser . log . error ( "Something<seq2seq4repair_space>went<seq2seq4repair_space>horribly<seq2seq4repair_space>wrong<seq2seq4repair_space>while<seq2seq4repair_space>creating<seq2seq4repair_space>soap<seq2seq4repair_space>fault." ) ; WSNRequestParser . log . trace ( e . getStackTrace ( ) ) ; } } else { try { XMLParser . writeObjectToStream ( Utilities . createSoapFault ( "Server" , "There<seq2seq4repair_space>was<seq2seq4repair_space>an<seq2seq4repair_space>unexpected<seq2seq4repair_space>error<seq2seq4repair_space>while<seq2seq4repair_space>processing<seq2seq4repair_space>the<seq2seq4repair_space>request." ) , streamToRequestor ) ; return returnMessage ; } catch ( JAXBException e ) { WSNRequestParser . log . error ( "Something<seq2seq4repair_space>went<seq2seq4repair_space>horribly<seq2seq4repair_space>wrong<seq2seq4repair_space>while<seq2seq4repair_space>creating<seq2seq4repair_space>soap<seq2seq4repair_space>fault." ) ; WSNRequestParser . log . trace ( e . getStackTrace ( ) ) ; } } } } returnMessage . statusCode = InternalMessage . STATUS_FAULT_INTERNAL_ERROR ; return returnMessage ; }

Fix:
WSNRequestParser . log . error ( "Exception<seq2seq4repair_space>thrown<seq2seq4repair_space>up<seq2seq4repair_space>the<seq2seq4repair_space>stack" ) ;