idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
161,000
@ Trivial public static < U > CompletionStage < U > failedStage ( Throwable x ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.failedStage" ) ) ; }
Because CompletableFuture . failedStage is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static failedStage method on that .
62
53
161,001
public static < T > CompletableFuture < T > newIncompleteFuture ( Executor executor ) { if ( JAVA8 ) return new ManagedCompletableFuture < T > ( new CompletableFuture < T > ( ) , executor , null ) ; else return new ManagedCompletableFuture < T > ( executor , null ) ; }
Construct a new incomplete CompletableFuture that is backed by the specified executor .
79
17
161,002
@ Trivial public static CompletableFuture < Void > runAsync ( Runnable action ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.runAsync" ) ) ; }
Because CompletableFuture . runAsync is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static runAsync method on that .
61
53
161,003
@ Trivial public static < U > CompletableFuture < U > supplyAsync ( Supplier < U > action ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.supplyAsync" ) ) ; }
Because CompletableFuture . supplyAsync is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static supplyAsync method on that .
67
53
161,004
private ThreadContextDescriptor captureThreadContext ( Executor executor ) { WSManagedExecutorService managedExecutor = defaultExecutor instanceof WSManagedExecutorService // ? ( WSManagedExecutorService ) defaultExecutor // : executor != defaultExecutor && executor instanceof WSManagedExecutorService // ? ( WSManagedE...
Captures thread context if possible first based on the default asynchronous execution facility otherwise based on the specified executor . If neither of these executors are a managed executor then thread context is not captured .
152
40
161,005
@ Trivial private final static FutureRefExecutor supportsAsync ( Executor executor ) { if ( executor instanceof ExecutorService ) return new FutureRefExecutor ( ( ExecutorService ) executor ) ; // valid if ( executor instanceof UnusableExecutor ) throw new UnsupportedOperationException ( ) ; // not valid for executing ...
Convenience method to validate that an executor supports running asynchronously and to wrap the executor if an ExecutorService with FutureRefExecutor . This method is named supportsAsync to make failure stacks more meaningful to users .
80
47
161,006
static File validateDirectory ( final File directory ) { File newDirectory = null ; try { newDirectory = AccessController . doPrivileged ( new java . security . PrivilegedExceptionAction < File > ( ) { @ Override public File run ( ) throws Exception { boolean ok = true ; if ( ! directory . exists ( ) ) ok = directory ....
This method will create the directory if it does not exist ensuring the specified location is writable .
207
19
161,007
static File createNewFile ( final FileLogSet fileLogSet ) { final File directory = fileLogSet . getDirectory ( ) ; final String fileName = fileLogSet . getFileName ( ) ; final String fileExtension = fileLogSet . getFileExtension ( ) ; File f = null ; try { f = AccessController . doPrivileged ( new java . security . Pri...
This method will create a new file with the specified name and extension in the specified directory . If a unique file is required then it will add a timestamp to the file and if necessary a unqiue identifier to the file name .
189
46
161,008
public void releaseBuffers ( ) { // release buffers is desired if ( payloadBuffers != null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "release payload buffers. number to release is: " + payloadCountOfBuffers ) ; } // if the payload buffers have been set into here, then release those for ( int i = 0 ; i < pa...
This is never called except in an exception case . frame buffers should be cleaned up when reset is called on the FrameReadProcessor
246
26
161,009
public static boolean methodParamsMatch ( List < String > typeNames , Class < ? > [ ] types ) { if ( typeNames . size ( ) != types . length ) { return false ; } for ( int i = 0 ; i < types . length ; i ++ ) { String typeName = typeNames . get ( i ) ; int typeNameEnd = typeName . length ( ) ; Class < ? > type = types [ ...
Checks if the specified method parameters object matches the specified method parameter types .
195
15
161,010
String evaluateExpression ( String expr ) throws ConfigEvaluatorException { ConfigExpressionScanner scanner = new ConfigExpressionScanner ( expr ) ; // Expression = Arithmetic | FilterCall // Arithmetic = Operand [( "+" | "-" | "*" | "/") Operand]* // Operand = VarName | Long | FunctionCall // VarName = <Java identifie...
Evaluate a variable expression .
296
7
161,011
private int evaluateCountExpression ( Object value ) { if ( value == null ) { return 0 ; } if ( value . getClass ( ) . isArray ( ) ) { return Array . getLength ( value ) ; } if ( value instanceof Vector < ? > ) { return ( ( Vector < ? > ) value ) . size ( ) ; } return 1 ; }
Evaluates the count expression function . If the value is null then 0 is returned . If the value is an array the length is returned . If the value is a vector the size is returned . Otherwise 1 is returned .
78
45
161,012
@ Override public Map < String , Object > getRequestCookieMap ( ) { if ( _requestCookieMap == null ) { checkHttpServletRequest ( ) ; _requestCookieMap = new CookieMap ( _httpServletRequest ) ; } return _requestCookieMap ; }
would be more elegant - = Simon Lessard = -
63
11
161,013
public LockingCursor getDefaultGetCursor ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDefaultGetCursor" ) ; LockingCursor cursor = consumerKeyFilter [ 0 ] . getGetCursor ( ) ; if ( keyGroup != null ) cursor = keyGroup . getDefaultGetCursor ( ) ; if ( TraceCom...
Return the getCursor for this consumer . This method is only called in the case where messages are not classified by XD .
135
25
161,014
private int chooseGetCursorIndex ( int classification ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "chooseGetCursorIndex" ) ; int classIndex = 0 ; if ( classifyingMessages ) classIndex = consumerSet . chooseGetCursorIndex ( classification ) ; if ( TraceComponent . ...
Determine the index of the getCursor to use based on the classifications defined for the ConsumerSet that a consumer belongs to . If SIB is not registered with XD and no classification is being performed then the default index is returned
126
48
161,015
public void detach ( ) throws SIResourceException , SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "detach" ) ; // Make sure we are not ready notReady ( ) ; // Remove us from any group we are a member of if ( keyGroup != nul...
Detach this consumer
299
4
161,016
public SIBUuid12 getConnectionUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getConnectionUuid" ) ; SibTr . exit ( tc , "getConnectionUuid" , connectionUuid ) ; } return connectionUuid ; }
Return the consumer s connection Uuid
78
7
161,017
public boolean requiresRecovery ( SIMPMessage msg ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "requiresRecovery" , new Object [ ] { msg } ) ; boolean recoverable ; Reliability msgReliability = msg . getReliability ( ) ; recoverable = msgReliability . compareTo ( u...
Determine if this consumer will require this message to be recoverable
141
14
161,018
public void markNotReady ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "markNotReady" ) ; ready = false ; if ( keyGroup != null ) keyGroup . markNotReady ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "markNotR...
Make this key not ready
101
5
161,019
public JSConsumerKey getParent ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getParent" ) ; JSConsumerKey key = this ; if ( keyGroup != null ) key = keyGroup ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getPare...
Return this key s parent if it is a member of a keyGroup
108
14
161,020
public void start ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "start" ) ; if ( ! started ) { started = true ; if ( keyGroup != null ) keyGroup . startMember ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "s...
The ConsumerKey doesn t actually care if the consumer is started but its ConsumerKey does
101
17
161,021
public void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stop" ) ; if ( started ) { started = false ; if ( keyGroup != null ) keyGroup . stopMember ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stop"...
The ConsumerKey doesn t actually care if the consumer is stopped but its ConsumerKey does
100
17
161,022
private void createNewFiltersAndCursors ( ItemStream itemStream ) throws SIResourceException , MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createNewFiltersAndCursors" , itemStream ) ; LockingCursor cursor = null ; // Instantiate a new array of...
Create the filters and cursors for this Key . If XD has registered a MessageController we ll need a cursor - filter pair for each classification .
461
29
161,023
@ Override public JmsConnectionFactory createConnectionFactory ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createConnectionFactory" ) ; JmsConnectionFactory jmscf = null ; // get a jca managed connection factory, which is used to cons...
This method is called by the application to retrieve its first ConnectionFactory object .
586
15
161,024
@ Override public JmsQueueConnectionFactory createQueueConnectionFactory ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createQueueConnectionFactory" ) ; JmsQueueConnectionFactory jmsqcf = null ; // get a jca managed queue connection fac...
This method is called by the application to retrieve its first QueueConnectionFactory object .
451
17
161,025
@ Override public JmsTopicConnectionFactory createTopicConnectionFactory ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createTopicConnectionFactory" ) ; JmsTopicConnectionFactory jmstcf = null ; // get a jca managed topic connection fac...
This method is called by the application to retrieve its first TopicConnectionFactory object .
447
16
161,026
@ Override public JmsQueue createQueue ( String name ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createQueue" , name ) ; JmsQueue queue = null ; // if name string is null, empty or just "queue://", throw exception if ( ( name == null ) ...
This method is called by the application to create a jms administered queue object .
345
16
161,027
@ Override public JmsTopic createTopic ( String name ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createTopic" , name ) ; JmsTopic topic = null ; // if name string is null throw exception if ( name == null ) { throw ( InvalidDestinationE...
This method is called by the application to create a jms administered topic object .
310
16
161,028
void handlePut ( SimpleTest test , Conjunction selector , MatchTarget object , InternTable subExpr ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "handlePut" , new Object [ ] { test , selector , object , subExpr } ) ; Object value = test . getValue ( ) ; if ( value == null ) th...
Implement handlePut .
134
5
161,029
void handleEqualityPut ( Object value , Conjunction selector , MatchTarget object , InternTable subExpr ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "handleEqualityPut" , new Object [ ] { value , selector , object , subExpr } ) ; ContentMatcher next = ( ContentMatcher ) ( ( c...
Perform the handlePut function when the test is an equality test
200
13
161,030
void handleEqualityRemove ( Object value , Conjunction selector , MatchTarget object , InternTable subExpr , OrdinalPosition parentId ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "handleEqualityRemove" , new Object [ ] { value , selector , object , subExpr } ) ; ContentMatche...
Perform the handleRemove function when the test is an equality test
182
13
161,031
boolean isEmpty ( ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "isEmpty" ) ; boolean ans = super . isEmpty ( ) && ! haveEqualityMatches ( ) ; if ( tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "isEmpty" , new Boolean ( ans ) ) ; return ans ; }
Override isEmpty to check whether children is empty
86
9
161,032
ContentMatcher nextMatcher ( Conjunction selector , ContentMatcher oldMatcher ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "nextMatcher" , "selector: " + selector + ", oldMatcher: " + oldMatcher ) ; ContentMatcher ans ; if ( ! cacheing ) ans = super . nextMatcher ( selector , oldMatcher ) ; else if (...
Override nextMatcher to handle possibility of cacheing
162
10
161,033
public void setDestination ( DestinationHandler originalDestination ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setDestination" , originalDestination ) ; _originalDestination = originalDestination ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEna...
Sets the destination that could not be delivered to .
99
11
161,034
@ Override public void setDestination ( SIDestinationAddress destinationAddr ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setDestination" , destinationAddr ) ; if ( destinationAddr != null ) { try { _originalDestination = _messageProcessor . getDestinationManager ...
Sets the destination that could not be delivered to . Looks up the destination given its name .
262
19
161,035
public int checkCanExceptionMessage ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkCanExceptionMessage" ) ; // Return code int rc = DestinationHandler . OUTPUT_HANDLER_NOT_FOUND ; String newExceptionDestination = null ; boolean usingDefault = false ; if ( _or...
Check whether it will be possible to place a message on the exception destination .
490
15
161,036
@ Override public UndeliverableReturnCode handleUndeliverableMessage ( SIBusMessage msg , String alternateUser , TransactionCommon tran , int exceptionReason , String [ ] exceptionStrings ) { // F001333-14610 // Delegate down onto the new method passing a null // subscription ID. return handleUndeliverableMessage ( msg...
Wrapper method for handleUndeliverableMessage . This version will be called from an external component via the com . ibm . ws . sib . processor . ExceptionDestinationHandler interface . E . g . we need to access this routine from the MQLink in the comms component .
94
62
161,037
private UndeliverableReturnCode checkMessage ( SIMPMessage message ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkMessage" , message ) ; UndeliverableReturnCode rc = UndeliverableReturnCode . OK ; // F001333:E3 // If the message's reliability equals or is less ...
Checks that a message is valid for delivery to an exception destination
560
13
161,038
private void handleAccessDenied ( AccessResult result , JsMessage msg , String alternateUser ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleAccessDenied" , new Object [ ] { result , msg , alternateUser } ) ; // Determine the username and operation for messagin...
Fire an event if eventing is enabled and write an audit record .
382
14
161,039
private void fireMessageExceptionedEvent ( String apiMsgId , SIMPMessage message , int exceptionReason ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireMessageExceptionedEvent" , new Object [ ] { apiMsgId , message , Integer . valueOf ( exceptionReason ) } ) ; JsM...
Fire an event notification of type TYPE_SIB_MESSAGE_EXCEPTIONED
689
20
161,040
public static String decodeUri ( String url ) { int index1 = url . indexOf ( sessUrlRewritePrefix ) ; int index2 = url . indexOf ( qMark ) ; String tmp = null ; if ( index2 != - 1 && index2 > index1 ) { tmp = url . substring ( index2 ) ; } if ( index1 != - 1 ) { url = url . substring ( 0 , index1 ) ; if ( tmp != null )...
Strips out the sessionId only form the URI
115
11
161,041
public static final void setInstance ( FaceletFactory factory ) { if ( factory == null ) { instance . remove ( ) ; } else { instance . set ( factory ) ; } }
Set the static instance
38
4
161,042
protected Object getSession ( String id , int version , boolean isSessionAccess , boolean forceSessionRetrieval , Object xdCorrelator ) { if ( isSessionAccess ) { if ( version == - 1 ) { _store . refreshSession ( id , xdCorrelator ) ; } else { _store . refreshSession ( id , version , xdCorrelator ) ; } } ISession iSess...
forceSessionRetrieval can only be true when using applicationSessions
228
14
161,043
public static byte [ ] copyCredToken ( byte [ ] credToken ) { if ( credToken == null ) { return null ; } final int LEN = credToken . length ; if ( LEN == 0 ) { return new byte [ LEN ] ; } byte [ ] newCredToken = new byte [ LEN ] ; System . arraycopy ( credToken , 0 , newCredToken , 0 , LEN ) ; return newCredToken ; }
Create a copy of the specified byte array .
99
9
161,044
public static X509Certificate [ ] copyCertChain ( X509Certificate [ ] certChain ) { if ( certChain == null ) { return null ; } final int LEN = certChain . length ; if ( LEN == 0 ) { return new X509Certificate [ LEN ] ; } X509Certificate [ ] newCertChain = new X509Certificate [ LEN ] ; System . arraycopy ( certChain , 0...
Create a copy of the specified cert array .
110
9
161,045
public void waitOnChains ( long quiesceTimeout ) { ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; int elapsedTime = 0 ; if ( waitingChainNames . size ( ) > 0 && elapsedTime < quiesceTimeout ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc...
Poll the list of chains until they re stopped or the quiesce timeout is hit
189
17
161,046
static void closeLink ( CommsConnection conn ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "closeLink" , conn ) ; conn . setSchemaSet ( null ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "closeLink" ) ; }
Called when a connection closes .
94
7
161,047
static byte [ ] receiveHandshake ( CommsConnection conn , byte [ ] data ) throws JMFException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "receiveHandshake" , conn ) ; Coder coder = new Coder ( data ) ; conn . setSchemaSet ( makeSchemaIdSet ( coder ) ) ; byte [ ] id...
Called when schema ids are received during an initial handshake
159
12
161,048
static void receiveSchemas ( CommsConnection conn , byte [ ] data ) throws JMFException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "receiveSchemas" , conn ) ; final SchemaSet ids ; try { ids = ( SchemaSet ) conn . getSchemaSet ( ) ; if ( ids == null ) { if ( TraceC...
Called when schema definitions are received on a connection
281
10
161,049
private static void addSchemaDefinitions ( SchemaSet ids , Coder coder ) throws JMFException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Decoding " + coder . count + "new schema definitions" ) ; // Decode the new schemas and add them to the registry and the list of...
Add extra incoming schema definitions
258
5
161,050
public void cleanUpSubject ( ) { if ( temporarySubject != null ) { AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { @ Override public Object run ( ) { removeSubjectPrincipals ( ) ; removeSubjectPublicCredentials ( ) ; removeSubjectPrivateCredentials ( ) ; return null ; } } ) ; } temporarySubject ...
Common Subject clean up .
82
5
161,051
protected void payloadWritten ( int payloadSize ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "payloadWritten" , new Object [ ] { this , new Integer ( payloadSize ) } ) ; // Track the unwritten payload decrease directly. We take no account for this classes header // values in this figure. The total payload remai...
Informs the recoverable unit section that previously unwritten data has been written to disk by one of its data items and no longer needs to be tracked in the unwritten data field . The recoverable unit must use the supplied information to track the amount of unwritten active data it holds . This information must be pa...
268
86
161,052
protected void payloadDeleted ( int totalPayloadSize , int unwrittenPayloadSize ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "payloadDeleted" , new Object [ ] { this , new Integer ( totalPayloadSize ) , new Integer ( unwrittenPayloadSize ) } ) ; // Track the payload decreases directly. We take no account for th...
Informs the recoverable unit section that data has been removed . At present this method is only used by the SingleDataItem class to remove the payload required for the its data before adding back additional payload back again for the replacement data data .
358
48
161,053
public BeanId getBeanId ( ) { if ( ivBeanId == null ) { ivBeanId = new BeanId ( ivBMD . j2eeName , null , false ) ; } return ivBeanId ; }
Gets the partially formed BeanId for this bean . The resulting BeanId will not have a home reference .
51
22
161,054
protected String promptForText ( com . ibm . ws . security . audit . reader . utils . ConsoleWrapper stdin , PrintStream stdout ) { return promptForText ( stdin , stdout , "encode.enterText" , "encode.reenterText" , "encode.readError" , "encode.entriesDidNotMatch" ) ; }
Prompt the user to enter text to encode . Prompts twice and compares to ensure it was entered correctly .
84
22
161,055
public static String getPropertyOrNull ( String name ) { try { return AccessController . doPrivileged ( new SystemPropertyAction ( name ) ) ; } catch ( SecurityException ex ) { LOG . log ( Level . FINE , "SecurityException raised getting property " + name , ex ) ; return null ; } }
Get the system property via the AccessController but if a SecurityException is raised just return null ;
66
19
161,056
public MatchTarget duplicate ( ) { try { return ( MatchTarget ) clone ( ) ; } catch ( CloneNotSupportedException e ) { // No FFDC Code Needed. // FFDC driven by wrapper class. FFDC . processException ( cclass , "com.ibm.ws.sib.matchspace.MatchTarget.duplicate" , e , "1:112:1.15" ) ; // should not happen throw new Illeg...
Creates a clone of this MatchTarget . Override only if the system clone support does not produce a correct result .
102
24
161,057
@ Override public EJBBinding createBindingObject ( HomeRecord hr , HomeWrapperSet homeSet , String interfaceName , int interfaceIndex , boolean local ) { return new EJBBinding ( hr , interfaceName , interfaceIndex , local ) ; }
Store the binding information for later use .
55
8
161,058
@ Override public EJBBinding createJavaBindingObject ( HomeRecord hr , HomeWrapperSet homeSet , String interfaceName , int interfaceIndex , boolean local , EJBBinding bindingObject ) { return bindingObject ; }
This method is provided for tWas and is not used for Liberty . Just return the bindingObject for now .
49
22
161,059
@ Override protected Class < ? > loadClass ( String className , boolean resolve ) throws ClassNotFoundException { Class < ? > loadedClass = null ; synchronized ( this ) { loadedClass = findLoadedClass ( className ) ; if ( loadedClass == null ) { int index = className . lastIndexOf ( ' ' ) ; String packageName = index >...
load class from the local classpath first and the class was not found load from parent or system classload again .
262
23
161,060
public DERObject getConvertedValue ( DERObjectIdentifier oid , String value ) { if ( value . length ( ) != 0 && value . charAt ( 0 ) == ' ' ) { try { return convertHexEncoded ( value , 1 ) ; } catch ( IOException e ) { throw new RuntimeException ( "can't recode value for oid " + oid . getId ( ) , e ) ; } } else if ( oi...
Apply default coversion for the given value depending on the oid and the character range of the value .
183
21
161,061
@ Override public byte [ ] transform ( ClassLoader loader , String className , Class < ? > classBeingRedefined , ProtectionDomain protectionDomain , byte [ ] classfileBuffer ) throws IllegalClassFormatException { // Skip over anything on the bootstrap loader and some VM // internal classes (like those in support of ref...
Perform necessary transformation to hook static initializers of probe candidates .
143
13
161,062
public synchronized void setStoreFileSize ( long newMinimumStoreFileSize , long newMaximumStoreFileSize ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setStoreFileSize" , new Object [ ] { new Long ( newMinimumStoreFileSize ) , ne...
Sets the size of the store file to the new values . At least the minimum space is reserved in the file system . No more than the maximum number of bytes will be used . Blocks until this has completed . The initial values used by the ObjecStore are 0 and Long . MAX_VAULE . The store will attempt to release space as Mana...
601
82
161,063
public synchronized void setCachedManagedObjectsSize ( int cachedManagedObjectsSize ) throws ObjectManagerException { this . cachedManagedObjectsSize = cachedManagedObjectsSize ; cachedManagedObjects = new java . lang . ref . SoftReference [ cachedManagedObjectsSize ] ; writeHeader ( ) ; force ( ) ; }
Causes all curently cached ManagedObjects to be dropped .
75
15
161,064
protected void setAllocationAllowed ( ) throws ObjectManagerException { final String methodName = "setAllocationAllowed" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { new Long ( storeFileSizeAllocated ) , new Long ( storeFileSizeUs...
Tests to see if allocation of new Objects should be allowed or not . Caller must be synchronized on this .
861
22
161,065
public void simulateFull ( boolean isFull ) throws ObjectManagerException { final String methodName = "simulateFull" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { new Boolean ( isFull ) } ) ; if ( isFull ) { // Clear as much space ...
When enabled reserve requests to this ObjectStore will throw ObjectStoreFullException .
360
15
161,066
public Map < String , ProvisioningFeatureDefinition > getFeatureDefinitions ( String productName ) { if ( productName . equals ( CORE_PRODUCT_NAME ) ) { return getCoreProductFeatureDefinitions ( ) ; } else if ( productName . equals ( USR_PRODUCT_EXT_NAME ) ) { return getUsrProductFeatureDefinitions ( ) ; } else { retur...
Retrieves a map of features definitions associated with the specified product name .
96
15
161,067
public Map < String , ProvisioningFeatureDefinition > getCoreFeatureDefinitionsExceptPlatform ( ) { Map < String , ProvisioningFeatureDefinition > features = new TreeMap < String , ProvisioningFeatureDefinition > ( ) ; File featureDir = getCoreFeatureDir ( ) ; //the feature directory may not exist if the packaged serve...
This API for install used only .
335
7
161,068
private Map < String , ProvisioningFeatureDefinition > getCoreProductFeatureDefinitions ( ) { Map < String , ProvisioningFeatureDefinition > features = new TreeMap < String , ProvisioningFeatureDefinition > ( ) ; File featureDir = getCoreFeatureDir ( ) ; //the feature directory may not exist if the packaged server had ...
Retrieves a Map of Liberty core features .
487
10
161,069
private Map < String , ProvisioningFeatureDefinition > getUsrProductFeatureDefinitions ( ) { Map < String , ProvisioningFeatureDefinition > features = null ; File userDir = Utils . getUserDir ( ) ; if ( userDir != null && userDir . exists ( ) ) { File userFeatureDir = new File ( userDir , USER_FEATURE_DIR ) ; if ( user...
Retrieves a Map of feature definitions in default usr product extension location
268
15
161,070
public String getProdFeatureLocation ( String productName ) { String location = null ; if ( productName . equals ( CORE_PRODUCT_NAME ) ) { location = Utils . getInstallDir ( ) . getAbsolutePath ( ) ; } else if ( productName . equals ( USR_PRODUCT_EXT_NAME ) ) { location = Utils . getUserDir ( ) . getAbsolutePath ( ) ; ...
Retrieves the location of the specified product name .
145
11
161,071
public String getProdFeatureId ( String productName ) { String productId = null ; if ( ! productName . equals ( CORE_PRODUCT_NAME ) && ! productName . equals ( USR_PRODUCT_EXT_NAME ) ) { readProductExtFeatureLocations ( ) ; if ( productExtNameInfoMap . containsKey ( productName ) ) { productId = productExtNameInfoMap ....
Retrieves the ID of the specified product name .
107
11
161,072
public File getCoreFeatureDir ( ) { File featureDir = null ; File installDir = Utils . getInstallDir ( ) ; if ( installDir != null ) { featureDir = new File ( installDir , FEATURE_DIR ) ; } if ( featureDir == null ) { throw new RuntimeException ( "Feature Directory not found" ) ; } return featureDir ; }
Retrieves the Liberty core features directory .
79
9
161,073
public File getCorePlatformDir ( ) { File platformDir = null ; File installDir = Utils . getInstallDir ( ) ; if ( installDir != null ) { platformDir = new File ( installDir , PLATFORM_DIR ) ; } if ( platformDir == null ) { throw new RuntimeException ( "Platform Directory not found" ) ; } return platformDir ; }
Retrieves the Liberty core platform directory .
80
9
161,074
public File getCoreAssetDir ( ) { File assetDir = null ; File installDir = Utils . getInstallDir ( ) ; if ( installDir != null ) { assetDir = new File ( installDir , ASSET_DIR ) ; } if ( assetDir == null ) { throw new RuntimeException ( "Asset Directory not found" ) ; } return assetDir ; }
Retrieves the Liberty core assets directory .
79
9
161,075
public ContentBasedLocalBundleRepository getBundleRepository ( String featureName , WsLocationAdmin locService ) { return BundleRepositoryRegistry . getRepositoryHolder ( featureName ) . getBundleRepository ( ) ; }
Get bundle repository
52
3
161,076
@ FFDCIgnore ( { IllegalCharsetNameException . class , UnsupportedCharsetException . class } ) public static String mapCharset ( String enc , String deflt ) { if ( enc == null ) { return deflt ; } //older versions of tomcat don't properly parse ContentType headers with stuff //after charset=StandardCharsets.UTF_8 int i...
into something that is actually supported by Java and the Stax parsers and such .
294
17
161,077
@ BeforeClass public static void setUp ( ) throws Exception { // Add LDAP variables to bootstrap properties file LDAPUtils . addLDAPVariables ( server ) ; Log . info ( c , "setUp" , "Starting the server... (will wait for userRegistry servlet to start)" ) ; server . copyFileToLibertyInstallRoot ( "lib/features" , "inter...
Updates the sample which is expected to be at the hard - coded path . If this test is failing check this path is correct .
336
27
161,078
@ Test public void getUserSecurityName ( ) throws Exception { String user = "vmmtestuser" ; String securityName = "cn=vmmtestuser,cn=users,dc=secfvt2,dc=austin,dc=ibm,dc=com" ; Log . info ( c , "getUserSecurityName" , "Checking with a valid user." ) ; LDAPFatUtils . assertDNsEqual ( "User security name didn't match exp...
Hit the test servlet to see if getUserSecurityName works when supplied with a valid user
124
19
161,079
public void initialRead ( ) { try { this . buffer = this . isc . getRequestBodyBuffer ( ) ; if ( null != this . buffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Buffer returned from getRequestBodyBuffer : " + this . buffer ) ; } // record the new amount of data ...
with the current set of data
155
6
161,080
private String encode ( PrintStream stderr , String plaintext , String encodingType , Map < String , String > properties ) throws InvalidPasswordEncodingException , UnsupportedCryptoAlgorithmException { String ret = null ; try { ret = PasswordUtil . encode ( plaintext , encodingType == null ? PasswordUtil . getDefaultE...
Handle encoding of the plaintext provided . Capture any Exceptions and print the stack trace .
140
18
161,081
protected String getDescription ( JSONArray customInfoArray ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( getMessage ( "encode.option-custom.encryption" ) ) ; for ( int i = 0 ; i < customInfoArray . size ( ) ; i ++ ) { JSONObject customInfo = ( JSONObject ) customInfoArray . get ( i ) ; String name = ( Str...
Returns the message string of the custom encryption information .
200
10
161,082
private void extractFiles ( ArtifactMetadata artifactMetadata ) throws RepositoryArchiveIOException , RepositoryArchiveEntryNotFoundException , RepositoryArchiveException { _readmePayload = artifactMetadata . getFileWithExtension ( ".txt" ) ; if ( _readmePayload == null ) { throw new RepositoryArchiveEntryNotFoundExcep...
Extract the files from the zip
129
7
161,083
private String getFixId ( IFixInfo iFixInfo , ExtractedFileInformation xmlInfo ) throws RepositoryArchiveInvalidEntryException { // check for null input if ( null == iFixInfo ) { throw new RepositoryArchiveInvalidEntryException ( "Null XML object provided" , xmlInfo . getSourceArchive ( ) , xmlInfo . getSelectedPathFro...
Get the ID of the iFix from the Java representation of the iFix XML
105
16
161,084
private List < String > getProvides ( IFixInfo iFixInfo , ParserBase . ExtractedFileInformation xmlInfo ) throws RepositoryArchiveInvalidEntryException { // check for null input if ( null == iFixInfo ) { throw new RepositoryArchiveInvalidEntryException ( "Null document provided" , xmlInfo . getSourceArchive ( ) , xmlIn...
Get a list of the APARs fixed by this iFix
297
13
161,085
private String parseManifestForAppliesTo ( File file ) throws RepositoryArchiveIOException { Manifest mf = null ; try ( JarFile jar = new JarFile ( file ) ) { try { mf = jar . getManifest ( ) ; } catch ( IOException ioe ) { throw new RepositoryArchiveIOException ( "Error getting manifest from jar " + jar . getName ( ) ...
Looks at the manifest file extracting info and putting the info into the supplied asset
272
15
161,086
public static int bytesToInt ( byte [ ] bytes , int offset ) { return ( ( bytes [ offset + 3 ] & 0xFF ) << 0 ) + ( ( bytes [ offset + 2 ] & 0xFF ) << 8 ) + ( ( bytes [ offset + 1 ] & 0xFF ) << 16 ) + ( ( bytes [ offset + 0 ] & 0xFF ) << 24 ) ; }
A utility method to convert the int from the byte array to an int .
86
15
161,087
public static short bytesToShort ( byte [ ] bytes , int offset ) { short result = 0x0 ; for ( int i = offset ; i < offset + 2 ; ++ i ) { result = ( short ) ( ( result ) << 8 ) ; result |= ( bytes [ i ] & 0x00FF ) ; } return result ; }
A utility method to convert the short from the byte array to a short .
73
15
161,088
public static long bytesToLong ( byte [ ] bytes , int offset ) { long result = 0x0 ; for ( int i = offset ; i < offset + 8 ; ++ i ) { result = result << 8 ; result |= ( bytes [ i ] & 0x00000000000000FF l ) ; } return result ; }
A utility method to convert the long from the byte array to a long .
68
15
161,089
public static char bytesToChar ( byte [ ] bytes , int offset ) { char result = 0x0 ; for ( int i = offset ; i < offset + 2 ; ++ i ) { result = ( char ) ( ( result ) << 8 ) ; result |= ( bytes [ i ] & 0x00FF ) ; } return result ; }
A utility method to convert the char from the byte array to a char .
73
15
161,090
public static void intToBytes ( int value , byte [ ] bytes , int offset ) { bytes [ offset + 3 ] = ( byte ) ( value >>> 0 ) ; bytes [ offset + 2 ] = ( byte ) ( value >>> 8 ) ; bytes [ offset + 1 ] = ( byte ) ( value >>> 16 ) ; bytes [ offset + 0 ] = ( byte ) ( value >>> 24 ) ; }
A utility method to convert an int into bytes in an array .
84
13
161,091
public static void shortToBytes ( short value , byte [ ] bytes , int offset ) { for ( int i = offset + 1 ; i >= offset ; -- i ) { bytes [ i ] = ( byte ) value ; value = ( short ) ( ( value ) >> 8 ) ; } }
A utility method to convert a short into bytes in an array .
61
13
161,092
public static void longToBytes ( long value , byte [ ] bytes , int offset ) { for ( int i = offset + 7 ; i >= offset ; -- i ) { bytes [ i ] = ( byte ) value ; value = value >> 8 ; } }
A utility method to convert the long into bytes in an array .
54
13
161,093
public static long varIntBytesToLong ( byte [ ] bytes , int offset ) { int shift = 0 ; long result = 0 ; while ( shift < 64 ) { final byte b = bytes [ offset ++ ] ; result |= ( long ) ( b & 0x7F ) << shift ; if ( ( b & 0x80 ) == 0 ) { return result ; } shift += 7 ; } throw new IllegalStateException ( "Varint representa...
Reads a long from the byte array in the Varint format .
106
14
161,094
public static int varIntBytesToInt ( byte [ ] bytes , int offset ) { byte tmp = bytes [ offset ++ ] ; if ( tmp >= 0 ) { return tmp ; } int result = tmp & 0x7f ; if ( ( tmp = bytes [ offset ++ ] ) >= 0 ) { result |= tmp << 7 ; } else { result |= ( tmp & 0x7f ) << 7 ; if ( ( tmp = bytes [ offset ++ ] ) >= 0 ) { result |=...
Reads an int from the byte array in the Varint format .
286
14
161,095
public static int writeLongAsVarIntBytes ( long v , byte [ ] bytes , int offest ) { int pos = offest ; while ( true ) { if ( ( v & ~ 0x7F L ) == 0 ) { bytes [ pos ++ ] = ( ( byte ) v ) ; return pos ; } else { bytes [ pos ++ ] = ( byte ) ( ( v & 0x7F ) | 0x80 ) ; v >>>= 7 ; } } }
Writes a long to the byte array in the Varint format .
101
14
161,096
public static int writeIntAsVarIntBytes ( int intVal , byte [ ] bytes , int offset ) { int pos = offset ; int v = intVal ; if ( ( v & ~ 0x7F ) == 0 ) { bytes [ pos ++ ] = ( ( byte ) v ) ; return 1 + offset ; } while ( true ) { if ( ( v & ~ 0x7F ) == 0 ) { bytes [ pos ++ ] = ( ( byte ) v ) ; return pos ; } else { bytes ...
Writes an integer to the byte array in the Varint format .
139
14
161,097
public static String limitedBytesToString ( byte [ ] bytes ) { if ( bytes . length <= 1000 ) { return Arrays . toString ( bytes ) ; } else { byte [ ] firstBytes = new byte [ 1000 ] ; System . arraycopy ( bytes , 0 , firstBytes , 0 , 1000 ) ; return Arrays . toString ( firstBytes ) ; } }
If the byte array length is less than 1000 returns the result of calling Arrays . toString on the supplied byte array . Otherwise returns the result of calling Arrays . toString on a byte array containing the first 1000 bytes in the supplied byte array .
78
51
161,098
public static RESTHandlerJsonException createRESTHandlerJsonException ( Throwable e , JSONConverter converter , int status ) { try { //See if we need to fetch a converter if ( converter == null ) { converter = JSONConverter . getConverter ( ) ; } //Create a new OutputStream to avoid any corrupted data ByteArrayOutputSt...
This method will recycle the given converter .
251
8
161,099
public static synchronized void notifyStarted ( HttpEndpointImpl endpoint , String resolvedHostName , int port , boolean isHttps ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Notify endpoint started: " + endpoint , resolvedHostName , port , isHttps , defaultHost . g...
Add an endpoint that has started listening and notify associated virtual hosts
179
12