Buggy code:
public class JMSSink extends AbstractOperator implements StateHandler { private static final String CLASS_NAME = "com.ibm.streamsx.messaging.jms.JMSSink" ; private static Logger logger = Logger . getLogger ( ( ( ( LoggerNames . LOG_FACILITY ) + "." ) + ( JMSSink . CLASS_NAME ) ) , "com.ibm.streamsx.messaging.jms.JMSMessages" ) ; private boolean hasErrorPort = false ; private boolean hasOptionalTupleInErrorPort = false ; private StreamingOutput < OutputTuple > errorOutputPort ; private StreamSchema embeddedSchema ; private JMSConnectionHelper jmsConnectionHelper ; Metric nTruncatedInserts ; Metric nFailedInserts ; Metric nReconnectionAttempts ; @ CustomMetric ( kind = Kind . COUNTER ) public void setnFailedInserts ( Metric nFailedInserts ) { } @ CustomMetric ( kind = Kind . COUNTER ) public void setnTruncatedInserts ( Metric nTruncatedInserts ) { } @ CustomMetric ( kind = Kind . COUNTER ) public void setnReconnectionAttempts ( Metric nReconnectionAttempts ) { } private String codepage = "UTF-8" ; private String access ; private String connection ; private String connectionDocument = null ; private int reconnectionBound = 5 ; private ReconnectionPolicies reconnectionPolicy = ReconnectionPolicies . valueOf ( "BoundedRetry" ) ; private double period = 60.0 ; private int maxMessageSendRetries = 0 ; private long messageSendRetryDelay = 0 ; private JMSMessageHandlerImpl mhandler ; private boolean isInitialConnection = true ; @ Parameter ( optional = false ) public void setAccess ( String access ) { } @ Parameter ( optional = false ) public void setConnection ( String connection ) { } @ Parameter ( optional = true ) public void setCodepage ( String codepage ) { } @ Parameter ( optional = true ) public void setReconnectionPolicy ( String reconnectionPolicy ) { } @ Parameter ( optional = true ) public void setReconnectionBound ( int reconnectionBound ) { } @ Parameter ( optional = true ) public void setPeriod ( double period ) { } @ Parameter ( optional = true ) public void setMaxMessageSendRetries ( int maxMessageSendRetries ) { } @ Parameter ( optional = true ) public void setMessageSendRetryDelay ( long messageSendRetryDelay ) { } @ Parameter ( optional = true , description = "Connection<seq2seq4repair_space>document<seq2seq4repair_space>containing<seq2seq4repair_space>connection<seq2seq4repair_space>information<seq2seq4repair_space>to<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>messaging<seq2seq4repair_space>servers.<seq2seq4repair_space>If<seq2seq4repair_space>not<seq2seq4repair_space>specified,<seq2seq4repair_space>the<seq2seq4repair_space>connection<seq2seq4repair_space>document<seq2seq4repair_space>is<seq2seq4repair_space>assumed<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>application_dir//etc//connections.xml." ) public void setConnectionDocument ( String connectionDocument ) { } public String getConnectionDocument ( ) { } @ ContextCheck public static void checkErrorOutputPort ( OperatorContextChecker checker ) { } @ ContextCheck ( compile = true , runtime = false ) public static void checkCompileTimeConsistentRegion ( OperatorContextChecker checker ) { } @ ContextCheck ( compile = false ) public static void checkParametersRuntime ( OperatorContextChecker checker ) { } @ ContextCheck ( compile = true ) public static void checkParameters ( OperatorContextChecker checker ) { } @ Override public synchronized void initialize ( OperatorContext context ) throws ConnectionException , ParseConnectionDocumentException , IOException , Exception , InterruptedException , NamingException , ParserConfigurationException , SAXException { super . initialize ( context ) ; JmsClasspathUtil . setupClassPaths ( context ) ; context . registerStateHandler ( this ) ; if ( ( context . getNumberOfStreamingOutputs ( ) ) == 1 ) { hasErrorPort = true ; errorOutputPort = getOutput ( 0 ) ; if ( ( errorOutputPort . getStreamSchema ( ) . getAttributeCount ( ) ) == 2 ) { embeddedSchema = errorOutputPort . newTuple ( ) . getTuple ( 0 ) . getStreamSchema ( ) ; hasOptionalTupleInErrorPort = true ; } } StreamSchema streamSchema = getInput ( 0 ) . getStreamSchema ( ) ; ConnectionDocumentParser connectionDocumentParser = new ConnectionDocumentParser ( ) ; <START_BUG> connectionDocumentParser . parseAndValidateConnectionDocument ( getConnectionDocument ( ) , connection , access , streamSchema , true ) ; <END_BUG> if ( ( ( connectionDocumentParser . getMessageType ( ) ) != ( MessageClass . bytes ) ) && ( context . getParameterNames ( ) . contains ( "codepage" ) ) ) { throw new ParseConnectionDocumentException ( "codepage<seq2seq4repair_space>appears<seq2seq4repair_space>only<seq2seq4repair_space>when<seq2seq4repair_space>the<seq2seq4repair_space>message<seq2seq4repair_space>class<seq2seq4repair_space>is<seq2seq4repair_space>bytes" ) ; } jmsConnectionHelper = new JMSConnectionHelper ( reconnectionPolicy , reconnectionBound , period , true , maxMessageSendRetries , messageSendRetryDelay , connectionDocumentParser . getDeliveryMode ( ) , nReconnectionAttempts , nFailedInserts , JMSSink . logger ) ; jmsConnectionHelper . createAdministeredObjects ( connectionDocumentParser . getInitialContextFactory ( ) , connectionDocumentParser . getProviderURL ( ) , connectionDocumentParser . getUserPrincipal ( ) , connectionDocumentParser . getUserCredential ( ) , connectionDocumentParser . getConnectionFactory ( ) , connectionDocumentParser . getDestination ( ) ) ; switch ( connectionDocumentParser . getMessageType ( ) ) { case map : mhandler = new MapMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) , nTruncatedInserts ) ; break ; case stream : mhandler = new StreamMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) , nTruncatedInserts ) ; break ; case bytes : mhandler = new BytesMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) , codepage , nTruncatedInserts ) ; break ; case empty : mhandler = new EmptyMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) ) ; break ; case wbe : mhandler = new WBETextMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) , getInput ( 0 ) . getName ( ) , nTruncatedInserts ) ; break ; case wbe22 : mhandler = new WBE22TextMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) , getInput ( 0 ) . getName ( ) , nTruncatedInserts ) ; break ; case xml : mhandler = new XMLTextMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) , getInput ( 0 ) . getName ( ) , nTruncatedInserts ) ; break ; case text : mhandler = new TextMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) ) ; break ; default : throw new RuntimeException ( "No<seq2seq4repair_space>valid<seq2seq4repair_space>message<seq2seq4repair_space>class<seq2seq4repair_space>is<seq2seq4repair_space>specified." ) ; } } @ Override public void process ( StreamingInput < Tuple > stream , Tuple tuple ) throws ConnectionException , UnsupportedEncodingException , Exception , InterruptedException , ParserConfigurationException , TransformerException { } private void sendOutputErrorMsg ( Tuple tuple , String errorMessage ) throws Exception { } @ Override public void shutdown ( ) throws Exception { } @ Override public void close ( ) throws IOException { } @ Override public void checkpoint ( Checkpoint checkpoint ) throws Exception { } @ Override public void drain ( ) throws Exception { } @ Override public void reset ( Checkpoint checkpoint ) throws Exception { } @ Override public void resetToInitialState ( ) throws Exception { }

Fix:
connectionDocumentParser . parseAndValidateConnectionDocument ( getConnectionDocument ( ) , connection , access , streamSchema , true , context . getPE ( ) . getApplicationDirectory ( ) ) ;