Buggy code:
public class JMSSource extends ProcessTupleProducer { private static final String CLASS_NAME = "com.ibm.streamsx.messaging.jms.JMSSource" ; private static Logger logger = Logger . getLogger ( ( ( ( LoggerNames . LOG_FACILITY ) + "." ) + ( JMSSource . CLASS_NAME ) ) , "com.ibm.streamsx.messaging.jms.JMSMessages" ) ; private StreamingOutput < OutputTuple > dataOutputPort ; private boolean hasErrorPort = false ; private StreamingOutput < OutputTuple > errorOutputPort ; JMSConnectionHelper jmsConnectionHelper ; private MessageClass messageType ; private boolean isAMQ ; Metric nMessagesRead ; Metric nMessagesDropped ; Metric nReconnectionAttempts ; @ CustomMetric ( kind = Kind . COUNTER ) public void setnMessagesRead ( Metric nMessagesRead ) { } @ CustomMetric ( kind = Kind . COUNTER ) public void setnMessagesDropped ( Metric nMessagesDropped ) { } @ 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 JMSMessageHandlerImpl messageHandlerImpl ; @ 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 , 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 ( compile = true ) public static void checkInConsistentRegion ( OperatorContextChecker checker ) { } @ ContextCheck public static void checkErrorOutputPort ( 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 ) ; ConnectionDocumentParser connectionDocumentParser = new ConnectionDocumentParser ( ) ; if ( ( context . getNumberOfStreamingOutputs ( ) ) == 2 ) { hasErrorPort = true ; errorOutputPort = getOutput ( 1 ) ; } dataOutputPort = getOutput ( 0 ) ; StreamSchema streamSchema = getOutput ( 0 ) . getStreamSchema ( ) ; <START_BUG> connectionDocumentParser . parseAndValidateConnectionDocument ( getConnectionDocument ( ) , connection , access , streamSchema , false ) ; <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" ) ; } messageType = connectionDocumentParser . getMessageType ( ) ; isAMQ = connectionDocumentParser . isAMQ ( ) ; jmsConnectionHelper = new JMSConnectionHelper ( reconnectionPolicy , reconnectionBound , period , false , 0 , 0 , connectionDocumentParser . getDeliveryMode ( ) , nReconnectionAttempts , JMSSource . logger ) ; jmsConnectionHelper . createAdministeredObjects ( connectionDocumentParser . getInitialContextFactory ( ) , connectionDocumentParser . getProviderURL ( ) , connectionDocumentParser . getUserPrincipal ( ) , connectionDocumentParser . getUserCredential ( ) , connectionDocumentParser . getConnectionFactory ( ) , connectionDocumentParser . getDestination ( ) ) ; switch ( connectionDocumentParser . getMessageType ( ) ) { case map : messageHandlerImpl = new MapMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) ) ; break ; case stream : messageHandlerImpl = new StreamMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) ) ; break ; case bytes : messageHandlerImpl = new BytesMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) , codepage ) ; break ; case empty : messageHandlerImpl = new EmptyMessageHandler ( connectionDocumentParser . getNativeSchemaObjects ( ) ) ; break ; case text : messageHandlerImpl = 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 protected void process ( ) throws ConnectionException , UnsupportedEncodingException , Exception , InterruptedException { } private void sendOutputErrorMsg ( String errorMessage ) throws Exception { } @ Override public void shutdown ( ) throws Exception { } }

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