idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
162,700
public static boolean isBeanValidationAvailable ( ) { if ( beanValidationAvailable == null ) { try { try { beanValidationAvailable = ( Class . forName ( "javax.validation.Validation" ) != null ) ; } catch ( ClassNotFoundException e ) { beanValidationAvailable = Boolean . FALSE ; } if ( beanValidationAvailable ) { try {...
This method determines if Bean Validation is present .
263
10
162,701
void handleRollback ( SubscriptionMessage subMessage , LocalTransaction transaction ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleRollback" , new Object [ ] { subMessage , transaction } ) ; try { if ( transaction != null ) { try { transaction . rollback ( ) ; } catch ( SIException e ) { // If there are...
Rolls back and readds the proxy subscriptions that may have been removed .
495
15
162,702
void handleDeleteProxySubscription ( SubscriptionMessage deleteMessage , Transaction transaction ) throws SIResourceException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleDeleteProxySubscription" , new Object [ ] { deleteMessage , transaction } ) ; // Get the iterators that we require for this method fi...
Used to remove a proxy subscription on this Neighbour
277
10
162,703
public void setKerberosConnection ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setting this mc to indicate it was gotten using kerberos" ) ; kerberosConnection = true ; }
new code RRS
64
4
162,704
public void markStale ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "mark mc stale" ) ; _mcStale = true ; }
Marks the managed connection as stale .
52
8
162,705
private final void addHandle ( WSJdbcConnection handle ) throws ResourceException { ( numHandlesInUse < handlesInUse . length - 1 ? handlesInUse : resizeHandleList ( ) ) [ numHandlesInUse ++ ] = handle ; if ( ! inRequest && dsConfig . get ( ) . enableBeginEndRequest ) try { inRequest = true ; mcf . jdbcRuntime . beginR...
Add a handle to this ManagedConnection s list of handles . Signal the JDBC 4 . 3 + driver that a request is starting .
154
28
162,706
public void connectionClosed ( javax . sql . ConnectionEvent event ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( this , tc , "connectionClosed" , "Notification of connection closed received from the JDBC driver" , AdapterUtil . toString ( event . getSource ( ) ) ) ; // We h...
Invoked by the JDBC driver when the java . sql . Connection is closed .
217
17
162,707
private void destroyStatement ( Object unwantedStatement ) { try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Statement cache at capacity. Discarding a statement." , AdapterUtil . toString ( unwantedStatement ) ) ; ( ( Statement ) unwantedStatement ) . close ( )...
Destroy an unwanted statement . This method should close the statement .
173
12
162,708
final void detectMultithreadedAccess ( ) { Thread currentThreadID = Thread . currentThread ( ) ; if ( currentThreadID == threadID ) return ; if ( threadID == null ) threadID = currentThreadID ; else { mcf . detectedMultithreadedAccess = true ; java . io . StringWriter writer = new java . io . StringWriter ( ) ; new Err...
Detect multithreaded access . This method is called only if detection is enabled . The method ensures that the current thread id matches the saved thread id for this MC . If the MC was just taken out the pool the thread id may not have been recorded yet . In this case we save the current thread id . Otherwise if the th...
199
85
162,709
public void dissociateConnections ( ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "dissociateConnections" ) ; // The first exception to occur while dissociating connection handles. ResourceException ...
Dissociate all connection handles from this ManagedConnection transitioning the handles to an inactive state where are not associated with any ManagedConnection . Processing continues when errors occur . All errors are logged and the first error is saved to be thrown when processing completes .
516
51
162,710
public final void enforceAutoCommit ( boolean autoCommit ) throws SQLException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "enforceAutoCommit" , autoCommit ) ; // Only set values if the requested value is different from the ...
Enforce the autoCommit setting in the underlying database and update the current value on the MC . This method must be invoked by the Connection handle before doing any work on the database .
221
37
162,711
private CacheMap getStatementCache ( ) { int newSize = dsConfig . get ( ) . statementCacheSize ; // Check if statement cache is dynamically enabled if ( statementCache == null && newSize > 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "enable statement cache w...
Processes any dynamic updates to the statement cache size and then returns the statement cache .
249
17
162,712
public final boolean isGlobalTransactionActive ( ) { UOWCurrent uow = ( UOWCurrent ) mcf . connectorSvc . getTransactionManager ( ) ; UOWCoordinator coord = uow == null ? null : uow . getUOWCoord ( ) ; return coord != null && coord . isGlobal ( ) ; }
Returns true if a global transaction is active on the thread otherwise false .
72
14
162,713
public final boolean isTransactional ( ) { // Take a snapshot of the value with first use (or reuse from pool) of the managed connection. // This value will be cleared when the managed connection is returned to the pool. if ( transactional == null ) { transactional = mcf . dsConfig . get ( ) . transactional ; if ( Trac...
This method checks if transaction enlistment is enabled on the MC
117
12
162,714
public void processConnectionClosedEvent ( WSJdbcConnection handle ) throws ResourceException { //A connection handle was closed - must notify the connection manager // of the close on the handle. JDBC connection handles // which are closed are not allowed to be reused because there is no // guarantee that the user wil...
Process request for a CONNECTION_CLOSED event .
542
12
162,715
public void processLocalTransactionStartedEvent ( Object handle ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "processLocalTransactionStartedEvent" , handle ) ; if ( tc . isDebugEnabled ( ) ) {...
Process request for a LOCAL_TRANSACTION_STARTED event .
740
16
162,716
public void processLocalTransactionCommittedEvent ( Object handle ) throws ResourceException { // A application level local transaction has been committed. final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "processLocalTransac...
Process request for a LOCAL_TRANSACTION_COMMITTED event .
747
17
162,717
public void statementClosed ( javax . sql . StatementEvent event ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( this , tc , "statementClosed" , "Notification of statement closed received from the JDBC driver" , AdapterUtil . toString ( event . getSource ( ) ) , AdapterUtil ....
Invoked by the JDBC driver when a prepared statement is closed .
109
14
162,718
public void statementErrorOccurred ( StatementEvent event ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "statementErrorOccurred" , "Notification of a fatal statement error received from the JDBC driver" , AdapterUtil . toStr...
Invoked by the JDBC driver when a fatal statement error occurs .
199
14
162,719
public void lazyEnlistInGlobalTran ( LazyEnlistableConnectionManager lazyEnlistableConnectionManager ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "lazyEnlist" , lazyEnlistableConnectionManager...
Signal the Application Server for lazy enlistment if we aren t already enlisted in a transaction . The lazy enlistment signal should only be sent once for a transaction . Connection handles will always invoke this method when doing work in the database regardless of whether we are already enlisted . In the case where w...
484
68
162,720
void refreshCachedAutoCommit ( ) { try { boolean autoCommit = sqlConn . getAutoCommit ( ) ; if ( currentAutoCommit != autoCommit ) { currentAutoCommit = autoCommit ; for ( int i = 0 ; i < numHandlesInUse ; i ++ ) handlesInUse [ i ] . setCurrentAutoCommit ( autoCommit , key ) ; } } catch ( SQLException x ) { // Mark the...
After XAResource . end Oracle resets the autocommit value to whatever it was before the transaction instead of leaving it as the value that the application set during the transaction . Refresh our cached copy of the autocommit value to be consistent with the JDBC driver s behavior .
132
60
162,721
private final boolean removeHandle ( WSJdbcConnection handle ) { // Find the handle in the list and remove it. for ( int i = numHandlesInUse ; i > 0 ; ) if ( handle == handlesInUse [ -- i ] ) { // Once found, the handle is removed by replacing it with the last handle in the // list and nulling out the previous entry fo...
Remove a handle from the list of handles associated with this ManagedConnection .
135
15
162,722
private void replaceCRI ( WSConnectionRequestInfoImpl newCRI ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "replaceCRI" , "Current:" , cri , "New:" , newCRI ) ; if ( numHandlesInUse > 0 || ! cri . is...
Replace the CRI of this ManagedConnection with the new CRI .
539
16
162,723
private WSJdbcConnection [ ] resizeHandleList ( ) { System . arraycopy ( handlesInUse , 0 , handlesInUse = new WSJdbcConnection [ maxHandlesInUse > numHandlesInUse ? maxHandlesInUse : ( maxHandlesInUse = numHandlesInUse * 2 ) ] , 0 , numHandlesInUse ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabl...
Increase the size of the array that keeps track of handles associated with this ManagedConnection .
130
18
162,724
private void handleCleanReuse ( ) throws ResourceException { // moved clearing the cache to before we issue the reuse connection //Now since a reuse was issued, the connection is restored to its orginal properties, so make sure // that you match the cri. try { currentTransactionIsolation = sqlConn . getTransactionIsola...
used to do some cleanup after a reuse of connection
258
10
162,725
public final Object getStatement ( StatementCacheKey key ) { Object stmt = statementCache . remove ( key ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { if ( stmt == null ) { Tr . debug ( this , tc , "No Matching Prepared Statement found in cache" ) ; } else { Tr . debug ( this , tc , "...
Return a statement from the cache matching the key provided . Null is returned if no statement matches .
109
19
162,726
public final void cacheStatement ( Statement statement , StatementCacheKey key ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( this , tc , "cacheStatement" , AdapterUtil . toString ( statement ) , key ) ; // Add the statement to the cache. If there is no room in the cache, a ...
Returns the statement into the cache . The statement is closed if an error occurs attempting to cache it . This method will only called if statement caching was enabled at some point although it might not be enabled anymore .
153
41
162,727
public void dissociateHandle ( WSJdbcConnection connHandle ) { if ( ! cleaningUpHandles && ! removeHandle ( connHandle ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Unable to dissociate Connection handle with current ManagedConnection because it is not curren...
This method is invoked by the connection handle during dissociation to signal the ManagedConnection to remove all references to the handle . If the ManagedConnection is not associated with the specified handle this method is a no - op and a warning message is traced .
93
51
162,728
public final void clearStatementCache ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; // The closing of cached statements is now separated from the removing of statements // from the cache to avoid synchronization during the closing of statements. if ( statementCache == null ) { if ( isTraceO...
Removes and closes all statements in the statement cache for this ManagedConnection .
290
16
162,729
private ResourceException closeHandles ( ) { ResourceException firstX = null ; Object conn = null ; // Indicate that we are cleaning up handles, so we know not to send events for // operations done in the cleanup. cleaningUpHandles = true ; for ( int i = numHandlesInUse ; i > 0 ; ) { conn = handlesInUse [ -- i ] ; hand...
Closes all handles associated with this ManagedConnection . Processing continues even if close fails on a handle . All errors are logged and the first error is saved to be returned when processing completes .
253
38
162,730
public XAResource getXAResource ( ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getXAResource" ) ; if ( xares != null ) { if ( isTraceOn && tc . isEventEnabled ( ) ) Tr . event ( this , tc , "Return...
Returns a javax . transaction . xa . XAresource instance . An application server enlists this XAResource instance with the Transaction Manager if the ManagedConnection instance is being used in a JTA transaction that is being coordinated by the Transaction Manager .
397
54
162,731
public final LocalTransaction getLocalTransaction ( ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getLocalTransaction" ) ; localTran = localTran == null ? new WSRdbSpiLocalTransactionImpl ( this , s...
Returns an javax . resource . spi . LocalTransaction instance . The LocalTransaction interface is used by the container to manage local transactions for a RM instance .
131
33
162,732
public final void setTransactionIsolation ( int isoLevel ) throws SQLException { if ( currentTransactionIsolation != isoLevel ) { // Reject switching to an isolation level of TRANSACTION_NONE if ( isoLevel == Connection . TRANSACTION_NONE ) { throw new SQLException ( AdapterUtil . getNLSMessage ( "DSRA4011.tran.none.is...
Set the transactionIsolation level to the requested Isolation Level . If the requested and current are the same then do not drive it to the database If they are different drive it all the way to the database .
229
42
162,733
public final int getTransactionIsolation ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { try { Tr . debug ( this , tc , "The current isolation level from our tracking is: " , currentTransactionIsolation ) ; Tr . debug ( this , tc , "Isolation reported by the JDBC driver: " , sqlConn ....
Get the transactionIsolation level
128
6
162,734
public final void setHoldability ( int holdability ) throws SQLException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setHoldability" , "Set Holdability to " + AdapterUtil . getCursorHoldabilityString ( holdability ) ) ; sqlConn . setHoldability ( holdability ) ...
Set the cursor holdability value to the request value
100
10
162,735
public final void setCatalog ( String catalog ) throws SQLException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Set Catalog to " + catalog ) ; sqlConn . setCatalog ( catalog ) ; connectionPropertyChanged = true ; }
Updates the value of the catalog property .
69
9
162,736
public final void setReadOnly ( boolean isReadOnly ) throws SQLException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Set readOnly to " + isReadOnly ) ; sqlConn . setReadOnly ( isReadOnly ) ; connectionPropertyChanged = true ; }
Updates the value of the readOnly property .
78
10
162,737
public final void setShardingKeys ( Object shardingKey , Object superShardingKey ) throws SQLException { if ( mcf . beforeJDBCVersion ( JDBCRuntimeVersion . VERSION_4_3 ) ) throw new SQLFeatureNotSupportedException ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc ,...
Updates the value of the sharding keys .
191
10
162,738
public final boolean setShardingKeysIfValid ( Object shardingKey , Object superShardingKey , int timeout ) throws SQLException { if ( mcf . beforeJDBCVersion ( JDBCRuntimeVersion . VERSION_4_3 ) ) throw new SQLFeatureNotSupportedException ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) ...
Updates the value of the sharding keys after validating them .
259
14
162,739
public final void setTypeMap ( Map < String , Class < ? > > typeMap ) throws SQLException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Set TypeMap to " + typeMap ) ; try { sqlConn . setTypeMap ( typeMap ) ; } catch ( SQLFeatureNotSupportedException nse ) { if ( ...
Updates the value of the typeMap property .
225
10
162,740
public final Object getSQLJConnectionContext ( Class < ? > DefaultContext , WSConnectionManager cm ) throws SQLException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getSQLJConnectionContext" ) ; if ( sqljContext == null ) {...
This method returns the SQLJ ConnectionContext . This method is only called by the WSJccConnection class . The ConnectionContext caches all the RTStatements
235
31
162,741
public void setClaimedVictim ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "marking this mc as _claimedVictim" ) ; _claimedVictim = true ; }
Claim the unused managed connection as a victim connection which can then be reauthenticated and reused .
60
19
162,742
public void setSchema ( String schema ) throws SQLException { Transaction suspendTx = null ; if ( mcf . beforeJDBCVersion ( JDBCRuntimeVersion . VERSION_4_1 ) ) throw new SQLFeatureNotSupportedException ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "Set Schema...
Set a schema for this managed connection .
213
8
162,743
public String getSchema ( ) throws SQLException { Transaction suspendTx = null ; if ( mcf . beforeJDBCVersion ( JDBCRuntimeVersion . VERSION_4_1 ) ) return null ; // Global trans must be suspended for jdbc-4.1 getters and setters on zOS if ( AdapterUtil . isZOS ( ) && isGlobalTransactionActive ( ) ) suspendTx = suspend...
Retrieve the schema being used by this managed connection .
159
11
162,744
void setFileTag ( File file ) throws IOException { if ( initialized && fileEncodingCcsid != 0 ) { int returnCode = setFileTag ( file . getAbsolutePath ( ) , fileEncodingCcsid ) ; if ( returnCode != 0 ) { issueTaggingFailedMessage ( returnCode ) ; } } }
Tag the specified file as ISO8859 - 1 text .
73
12
162,745
private synchronized void issueTaggingFailedMessage ( int returnCode ) { if ( taggingFailedIssued ) { return ; } System . err . println ( MessageFormat . format ( BootstrapConstants . messages . getString ( "warn.unableTagFile" ) , returnCode ) ) ; taggingFailedIssued = true ; }
Issue the tagging failed message .
72
6
162,746
private static boolean registerNatives ( ) { try { final String methodDescriptor = "zJNIBOOT_" + TaggedFileOutputStream . class . getCanonicalName ( ) . replaceAll ( "\\." , "_" ) ; long dllHandle = NativeMethodHelper . registerNatives ( TaggedFileOutputStream . class , methodDescriptor , null ) ; if ( dllHandle > 0 ) ...
Register the native method needed for file tagging .
210
9
162,747
private static int acquireFileEncodingCcsid ( ) { // Get the charset represented by file.encoding Charset charset = null ; String fileEncoding = System . getProperty ( "file.encoding" ) ; try { charset = Charset . forName ( fileEncoding ) ; } catch ( Throwable t ) { // Problem with the JVM's file.encoding property } in...
Get the character code set identifier that represents the JVM s file encoding . This should only be called by the class static initializer .
156
27
162,748
public static ParsedScheduleExpression parse ( ScheduleExpression expr ) { ParsedScheduleExpression parsedExpr = new ParsedScheduleExpression ( expr ) ; parse ( parsedExpr ) ; return parsedExpr ; }
Parses the specified schedule expression and returns the result .
50
12
162,749
static void parse ( ParsedScheduleExpression parsedExpr ) // d639610 { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "parse: " + toString ( parsedExpr . getSchedule ( ) ) ) ; ScheduleExpression expr = parsedExpr . getSchedule ( ) ; Sch...
Parses the schedule expression contained within the ParsedScheduleExpression object and store the results in that object .
435
24
162,750
private void parseTimeZone ( ParsedScheduleExpression parsedExpr , String string ) { if ( parsedExpr . timeZone == null ) // d639610 { if ( string == null ) { parsedExpr . timeZone = TimeZone . getDefault ( ) ; // d639610 } else { parsedExpr . timeZone = TimeZone . getTimeZone ( string . trim ( ) ) ; // d664511 // If a...
Parses the time zone ID and stores the result in parsedExpr . If the parsed schedule already has a time zone then it is kept . If the time zone ID is null then the default time zone is used .
202
45
162,751
private long parseDate ( Date date , long defaultValue ) // d666295 { if ( date == null ) { return defaultValue ; } long value = date . getTime ( ) ; if ( value > 0 ) { // Round up to the nearest second. long remainder = value % 1000 ; if ( remainder != 0 ) { // Protect against overflow. long newValue = value - remaind...
Parses the date to milliseconds and rounds up to the nearest second .
109
15
162,752
private void error ( ScheduleExpressionParserException . Error error ) // F743-506 { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "parse error in " + ivAttr + " at " + ivPos ) ; throw new ScheduleExpressionParserException ( error , ivAttr . getDisplayName ( ) , ivString )...
Issues a lexical analysis or parsing error .
105
10
162,753
private void parseAttribute ( ParsedScheduleExpression parsedExpr , Attribute attr , String string ) { // Reset state. ivAttr = attr ; ivString = string ; ivPos = 0 ; if ( string == null ) { // d660135 - Per CTS, null values must be rejected rather than being // translated to the default attribute value. error ( Schedu...
Parses the specified attribute of this parsers schedule expression and stores the result in parsedExpr . This method sets the ivAttr ivString and ivPos member variables that are accessed by other parsing methods . Only ivPos should be modified by those other methods .
706
54
162,754
private void skipWhitespace ( ) { while ( ivPos < ivString . length ( ) && Character . isWhitespace ( ivString . charAt ( ivPos ) ) ) { ivPos ++ ; } }
Skip any whitespace at the current position in the parse string .
46
13
162,755
private int scanToken ( ) { int begin = ivPos ; if ( ivPos < ivString . length ( ) ) { if ( ivString . charAt ( ivPos ) == ' ' ) { // dayOfWeek allows tokens to begin with "-" (e.g., "-7"). We // cannot add "-" to isTokenChar or else "1-2" would be parsed as a // single atom. ivPos ++ ; } while ( ivPos < ivString . len...
Skip the minimum number of characters necessary to form a single unit of information within a value . Whitespace before the value is not skipped .
130
27
162,756
private int findNamedValue ( int begin , String [ ] namedValues , int min ) { int length = ivPos - begin ; for ( int i = 0 ; i < namedValues . length ; i ++ ) { String namedValue = namedValues [ i ] ; if ( length == namedValue . length ( ) && ivString . regionMatches ( true , begin , namedValue , 0 , length ) ) { retur...
Case - insensitively search the specified list of named values for a substring of the parse string . The substring of the parse string is the range [ begin ivPos ) .
99
36
162,757
public static byte [ ] generateSalt ( String saltString ) { byte [ ] output = null ; if ( saltString == null || saltString . length ( ) < 1 ) { // use randomly generated value output = new byte [ SEED_LENGTH ] ; SecureRandom rand = new SecureRandom ( ) ; rand . setSeed ( rand . generateSeed ( SEED_LENGTH ) ) ; rand . n...
generate salt value by using given string . salt was generated as following format String format of current time + given string + hostname
163
26
162,758
public static byte [ ] digest ( char [ ] plainBytes , byte [ ] salt , String algorithm , int iteration , int length ) throws InvalidPasswordCipherException { if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "algorithm : " + algorithm + " iteration : " + iteration ) ; logger . fine ( "input length: " + plai...
perform message digest and then append a salt at the end .
409
13
162,759
public DERObject toASN1Object ( ) { ASN1EncodableVector v = new ASN1EncodableVector ( ) ; v . add ( digestedObjectType ) ; if ( otherObjectTypeID != null ) { v . add ( otherObjectTypeID ) ; } v . add ( digestAlgorithm ) ; v . add ( objectDigest ) ; return new DERSequence ( v ) ; }
Produce an object suitable for an ASN1OutputStream .
92
13
162,760
private boolean findInList ( Entry oEntry ) { return findInList ( oEntry . getHashcodes ( ) , oEntry . getLengths ( ) , firstCell , oEntry . getCurrentSize ( ) - 1 ) ; }
Determine if an address represented by an Entry object is in the address tree
50
16
162,761
private boolean putInList ( Entry entry ) { FilterCellFastStr currentCell = firstCell ; FilterCellFastStr nextCell = null ; int [ ] hashcodes = entry . getHashcodes ( ) ; int [ ] lengths = entry . getLengths ( ) ; // work from back to front int lastIndex = entry . getCurrentSize ( ) - 1 ; for ( int i = lastIndex ; i >=...
Add and new address to the address tree where the new address is represented by an Entry object .
317
19
162,762
private Entry convertToEntries ( String newAddress ) { byte [ ] ba = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "convertToEntries" ) ; } try { ba = newAddress . getBytes ( "ISO-8859-1" ) ; } catch ( UnsupportedEncodingException x ) { // should never happen, log...
Convert a single URL address to an Entry object . The entry object will contain the hashcode array and length array of the substrings of this address
523
30
162,763
public static void hash ( byte [ ] data , byte [ ] output ) { int len = output . length ; if ( len == 0 ) return ; int [ ] code = calculate ( data ) ; for ( int outIndex = 0 , codeIndex = 0 , shift = 24 ; outIndex < len && codeIndex < 5 ; ++ outIndex , shift -= 8 ) { output [ outIndex ] = ( byte ) ( code [ codeIndex ] ...
Calculates the SHA - 1 hash code of the input data and writes up to 20 bytes of it in the output byte array parameter .
124
28
162,764
public UIViewRoot createView ( FacesContext context , String viewId ) { checkNull ( context , "context" ) ; //checkNull(viewId, "viewId"); try { viewId = calculateViewId ( context , viewId ) ; Application application = context . getApplication ( ) ; // Create a new UIViewRoot object instance using Application.createCom...
Process the specification required algorithm that is generic to all PDL .
464
13
162,765
private Object getDestinationName ( String destinationType , Object destination ) throws Exception { String methodName ; if ( "javax.jms.Queue" . equals ( destinationType ) ) methodName = "getQueueName" ; else if ( "javax.jms.Topic" . equals ( destinationType ) ) methodName = "getTopicName" ; else throw new InvalidProp...
Returns the name of the queue or topic .
169
9
162,766
JCAContextProvider getJCAContextProvider ( Class < ? > workContextClass ) { JCAContextProvider provider = null ; for ( Class < ? > cl = workContextClass ; provider == null && cl != null ; cl = cl . getSuperclass ( ) ) provider = contextProviders . getService ( cl . getName ( ) ) ; return provider ; }
Returns the JCAContextProvider for the specified work context class .
81
14
162,767
String getJCAContextProviderName ( Class < ? > workContextClass ) { ServiceReference < JCAContextProvider > ref = null ; for ( Class < ? > cl = workContextClass ; ref == null && cl != null ; cl = cl . getSuperclass ( ) ) ref = contextProviders . getReference ( cl . getName ( ) ) ; String name = ref == null ? null : ( S...
Returns the component name of the JCAContextProvider for the specified work context class .
138
18
162,768
public Class < ? > loadClass ( final String className ) throws ClassNotFoundException , UnableToAdaptException , MalformedURLException { ClassLoader raClassLoader = resourceAdapterSvc . getClassLoader ( ) ; if ( raClassLoader != null ) { return Utils . priv . loadClass ( raClassLoader , className ) ; } else { // TODO w...
Load a resource adapter class .
654
6
162,769
protected void setContextProvider ( ServiceReference < JCAContextProvider > ref ) { contextProviders . putReference ( ( String ) ref . getProperty ( JCAContextProvider . TYPE ) , ref ) ; }
Declarative Services method for setting a JCAContextProvider service reference
46
15
162,770
private void stopResourceAdapter ( ) { if ( resourceAdapter != null ) try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "stop" , resourceAdapter ) ; ArrayList < ThreadContext > threadContext = startTask ( raThreadContextDescriptor ) ; try { beginContext ( raMetaDa...
Stop the resource adapter if it has started .
317
9
162,771
@ SuppressWarnings ( "unchecked" ) private ThreadContextDescriptor captureRaThreadContext ( WSContextService contextSvc ) { Map < String , String > execProps = new HashMap < String , String > ( ) ; execProps . put ( WSContextService . DEFAULT_CONTEXT , WSContextService . ALL_CONTEXT_TYPES ) ; execProps . put ( WSContex...
Capture current thread context of the context service .
122
9
162,772
private ArrayList < ThreadContext > startTask ( ThreadContextDescriptor raThreadContextDescriptor ) { return raThreadContextDescriptor == null ? null : raThreadContextDescriptor . taskStarting ( ) ; }
Start task if there is a resource adapter context descriptor .
48
11
162,773
private void stopTask ( ThreadContextDescriptor raThreadContextDescriptor , ArrayList < ThreadContext > threadContext ) { if ( raThreadContextDescriptor != null ) raThreadContextDescriptor . taskStopping ( threadContext ) ; }
Stop the resource adapter context descriptor task if one was started .
54
12
162,774
protected void unsetContextProvider ( ServiceReference < JCAContextProvider > ref ) { contextProviders . removeReference ( ( String ) ref . getProperty ( JCAContextProvider . TYPE ) , ref ) ; }
Declarative Services method for unsetting a JCAContextProvider service reference
47
16
162,775
private WebAuthenticator getAuthenticatorForFailOver ( String authType , WebRequest webRequest ) { WebAuthenticator authenticator = null ; if ( LoginConfiguration . FORM . equals ( authType ) ) { authenticator = createFormLoginAuthenticator ( webRequest ) ; } else if ( LoginConfiguration . BASIC . equals ( authType ) )...
Get the appropriate Authenticator based on the authType
90
10
162,776
private boolean appHasWebXMLFormLogin ( WebRequest webRequest ) { return webRequest . getFormLoginConfiguration ( ) != null && webRequest . getFormLoginConfiguration ( ) . getLoginPage ( ) != null && webRequest . getFormLoginConfiguration ( ) . getErrorPage ( ) != null ; }
Determines if the application has a FORM login configuration in its web . xml
66
16
162,777
private boolean globalWebAppSecurityConfigHasFormLogin ( ) { WebAppSecurityConfig globalConfig = WebAppSecurityCollaboratorImpl . getGlobalWebAppSecurityConfig ( ) ; return globalConfig != null && globalConfig . getLoginFormURL ( ) != null ; }
Determine if the global WebAppSecurityConfig has a form login page .
56
16
162,778
public WebAuthenticator getWebAuthenticator ( WebRequest webRequest ) { String authMech = webAppSecurityConfig . getOverrideHttpAuthMethod ( ) ; if ( authMech != null && authMech . equals ( "CLIENT_CERT" ) ) { return createCertificateLoginAuthenticator ( ) ; } SecurityMetadata securityMetadata = webRequest . getSecurit...
Determine the correct WebAuthenticator to use based on the authentication method . If there authentication method is not specified in the web . xml file then we will use BasicAuth as default .
191
38
162,779
public BasicAuthAuthenticator getBasicAuthAuthenticator ( ) { try { return createBasicAuthenticator ( ) ; } catch ( RegistryException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "RegistryException while trying to create BasicAuthAuthenticator" , e ) ; } } return ...
Create an instance of BasicAuthAuthenticator .
82
9
162,780
@ Override public boolean handleAttribute ( DDParser parser , String nsURI , String localName , int index ) throws ParseException { boolean result = false ; if ( nsURI != null ) { return result ; } if ( CONTEXT_ROOT_ATTRIBUTE_NAME . equals ( localName ) ) { this . contextRoot = parser . parseStringAttributeValue ( inde...
parse the context - root attribute defined in the element .
92
11
162,781
@ Override public boolean isPersistent ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isPersistent: " + this ) ; // Determine if the calling bean is in a state that allows timer service // method access - throws IllegalStateExcep...
Query whether this timer has persistent semantics .
165
8
162,782
public Entry getNext ( ) { checkEntryParent ( ) ; Entry entry = null ; if ( ! isLast ( ) ) { entry = next ; } return entry ; }
Unsynchronized . Get the next entry in the list .
36
13
162,783
Entry insertAfter ( Entry newEntry ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "insertAfter" , new Object [ ] { newEntry } ) ; checkEntryParent ( ) ; //make sure that the new entry is not already in a list if ( newEntry . parentList == null ) { //get the next entry in the list Entry nextEntry = getNext ( ) ...
Unsynchronized . Insert a new entry in after this one .
484
14
162,784
Entry remove ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "remove" ) ; checkEntryParent ( ) ; Entry removedEntry = null ; Entry prevEntry = getPrevious ( ) ; if ( prevEntry != null ) { //link the previous entry to the next one prevEntry . next = next ; } Entry nextEntry = getNext ( ) ; if ( nextEntry != nu...
Unsynchronized . Removes this entry from the list .
256
13
162,785
void checkEntryParent ( ) { if ( parentList == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0001" , new Object [ ] { "com.ibm.ws.sib.processor.utils.linkedlist.Entry" , "1:239:1.3" } , null ) ) ; // FFDC FFDCFilter . processException ( e , "com.ibm.ws.s...
Unsynchronized . Check that the parent list is not null and therefore the entry is still valid . Otherwise throw a runtime exception
251
26
162,786
@ Override public Object put ( Object key , Object value ) { return localMap . put ( key , value ) ; }
2 . As with the put may need methods that use the common map for any of these other methods below but assume not for now
26
26
162,787
static Converter getValueTypeConverter ( FacesContext facesContext , UISelectMany component ) { Converter converter = null ; Object valueTypeAttr = component . getAttributes ( ) . get ( VALUE_TYPE_KEY ) ; if ( valueTypeAttr != null ) { // treat the valueType attribute exactly like the collectionType attribute Class < ?...
Uses the valueType attribute of the given UISelectMany component to get a by - type converter .
276
22
162,788
private final void checkTopicNotNull ( String topic ) throws InvalidTopicSyntaxException { if ( topic == null ) throw new InvalidTopicSyntaxException ( NLS . format ( "INVALID_TOPIC_ERROR_CWSIH0005" , new Object [ ] { topic } ) ) ; }
null topic check
65
3
162,789
private CookieData matchAndParse ( byte [ ] data , HeaderKeys hdr ) { int pos = this . bytePosition ; int start = - 1 ; int stop = - 1 ; for ( ; pos < data . length ; pos ++ ) { byte b = data [ pos ] ; // found the delimiter for the name */ if ( ' ' == b ) { break ; } // In case of headers like MyNullCookie; // Set-Coo...
This method matches the cookie attribute header with the pre - established Cookie header types . If a match is established the appropriate Cookie header data type is returned .
591
30
162,790
private void parseValue ( byte [ ] data , CookieData token ) { int start = - 1 ; int stop = - 1 ; int pos = this . bytePosition ; int num_quotes = 0 ; // cycle through each byte until we hit a delimiter or end of data for ( ; pos < data . length ; pos ++ ) { byte b = data [ pos ] ; // check for delimiter if ( ' ' == b ...
This method parses the cookie attribute value .
456
9
162,791
protected static JwtContext parseJwtWithoutValidation ( String jwtString ) throws Exception { JwtConsumer firstPassJwtConsumer = new JwtConsumerBuilder ( ) . setSkipAllValidators ( ) . setDisableRequireSignature ( ) . setSkipSignatureVerification ( ) . build ( ) ; JwtContext jwtContext = firstPassJwtConsumer . process ...
Just parse without validation for now
93
6
162,792
public static boolean isValidJmxPropertyValue ( String s ) { if ( ( s . indexOf ( ":" ) >= 0 ) || ( s . indexOf ( "*" ) >= 0 ) || ( s . indexOf ( ' ' ) >= 0 ) || ( s . indexOf ( "?" ) >= 0 ) || ( s . indexOf ( "," ) >= 0 ) || ( s . indexOf ( "=" ) >= 0 ) ) { return false ; } else return true ; }
Does the specified string contain characters valid in a JMX key property?
105
14
162,793
public static < R > MethodResult < R > success ( R result ) { return new MethodResult <> ( result , null , false ) ; }
Create a MethodResult for a method which returned a value
31
11
162,794
public static < R > MethodResult < R > failure ( Throwable failure ) { return new MethodResult <> ( null , failure , false ) ; }
Create a MethodResult for a method which threw an exception
32
11
162,795
public static < R > MethodResult < R > internalFailure ( Throwable failure ) { return new MethodResult < R > ( null , failure , true ) ; }
Create a MethodResult for an internal exception which occurred while trying to run a method
34
16
162,796
private final void clearUnreferencedEntries ( ) { for ( WeakEntry entry = ( WeakEntry ) queue . poll ( ) ; entry != null ; entry = ( WeakEntry ) queue . poll ( ) ) { WeakEntry removedEntry = ( WeakEntry ) super . remove ( entry . key ) ; // The entry for this key may have been replaced with another one after it was der...
Remove the unreferenced Entries from the map .
120
12
162,797
protected void attachBifurcatedConsumer ( BifurcatedConsumerSessionImpl consumer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "attachBifurcatedConsumer" , consumer ) ; // Create a bifurcated list if required if ( _bifurcatedConsumers == null ) { synchronized ( this...
Adds the bifurcated consumer to the list of associated consumers .
202
15
162,798
protected void removeBifurcatedConsumer ( BifurcatedConsumerSessionImpl consumer ) throws SIResourceException , SISessionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeBifurcatedConsumer" , consumer ) ; synchronized ( _bifurcatedConsumers ) { _b...
Removes the bifurcated consumer to the list of associated consumers .
179
16
162,799
void _close ( ) throws SIResourceException , SIConnectionLostException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "_close" ) ; try { //close the LCP _localConsumerPoint . close ( ) ; } catch ( SINotPossibleInCurrentConfigurationException e ) { //...
Performs any operations required to close this consumer session but it does not modify any references which the connection might have .
189
23