idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
159,900
@ Override public MPSubscription getSubscription ( String subscriptionName ) throws SIDurableSubscriptionNotFoundException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getSubscription" , subscriptionName ) ; HashMap durableSubs = _destinationManager . getDurableSubs...
Retrieve the MPSubscription object that represents the named durable subscription
325
14
159,901
@ Override public void deregisterConsumerSetMonitor ( ConsumerSetChangeCallback callback ) throws SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deregisterConsumerSetMonitor" , new Object [ ] { callback } ) ; _messageProces...
Deregisters a previously registered callback .
142
9
159,902
public Map getConnectionProperties ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getConnectionProperties" ) ; SibTr . exit ( tc , "getConnectionProperties" , _connectionProperties ) ; } return _connectionProperties ; }
Retrieve the properties associated with this connection .
76
9
159,903
public void setConnectionProperties ( Map connectionProperties ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getConnectionProperties" , connectionProperties ) ; SibTr . exit ( tc , "getConnectionProperties" ) ; } _connectionProperties = connectionProperties ; }
Set the properties associated with this connection . Supports Unittest environment .
82
14
159,904
private void stopChain ( String name , Event event ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Stop chain event; chain=" + name ) ; } ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; try { if ( cf . isChainRunning ( name ) ) { // stop the ...
Stop the explicit chain provided .
184
6
159,905
private static WebServiceRefPartialInfo buildPartialInfoFromWebServiceClient ( Class < ? > serviceInterfaceClass ) { WebServiceClient webServiceClient = serviceInterfaceClass . getAnnotation ( WebServiceClient . class ) ; if ( webServiceClient == null ) { return null ; } String className = serviceInterfaceClass . getNa...
This method will build a ServiceRefPartialInfo object from a class with an
261
16
159,906
public Map < ConfigID , List < T > > collectElementsById ( Map < ConfigID , List < T > > map , String defaultId , String pid ) { if ( map == null ) { map = new HashMap < ConfigID , List < T > > ( ) ; } int index = 0 ; for ( T configElement : configElements ) { String id = configElement . getId ( ) ; if ( id == null ) {...
Collects elements into Lists based on their ID . If an ID is not specified the defaultId will be used . If the defaultId is null an id will be generated .
240
35
159,907
public static long readLong ( byte b [ ] , int offset ) { long retValue ; retValue = ( ( long ) b [ offset ++ ] ) << 56 ; retValue |= ( ( long ) b [ offset ++ ] & 0xff ) << 48 ; retValue |= ( ( long ) b [ offset ++ ] & 0xff ) << 40 ; retValue |= ( ( long ) b [ offset ++ ] & 0xff ) << 32 ; retValue |= ( ( long ) b [ off...
Unserializes a long from a byte array at a specific offset in big - endian order
175
19
159,908
public static void writeLong ( byte b [ ] , int offset , long value ) { b [ offset ++ ] = ( byte ) ( value >>> 56 ) ; b [ offset ++ ] = ( byte ) ( value >>> 48 ) ; b [ offset ++ ] = ( byte ) ( value >>> 40 ) ; b [ offset ++ ] = ( byte ) ( value >>> 32 ) ; b [ offset ++ ] = ( byte ) ( value >>> 24 ) ; b [ offset ++ ] = ...
Serializes a long into a byte array at a specific offset in big - endian order
134
18
159,909
public static int readInt ( byte b [ ] , int offset ) { int retValue ; retValue = ( ( int ) b [ offset ++ ] ) << 24 ; retValue |= ( ( int ) b [ offset ++ ] & 0xff ) << 16 ; retValue |= ( ( int ) b [ offset ++ ] & 0xff ) << 8 ; retValue |= ( int ) b [ offset ] & 0xff ; return retValue ; }
Unserializes an int from a byte array at a specific offset in big - endian order
95
19
159,910
public static void writeInt ( byte [ ] b , int offset , int value ) { b [ offset ++ ] = ( byte ) ( value >>> 24 ) ; b [ offset ++ ] = ( byte ) ( value >>> 16 ) ; b [ offset ++ ] = ( byte ) ( value >>> 8 ) ; b [ offset ] = ( byte ) value ; }
Serializes an int into a byte array at a specific offset in big - endian order
74
18
159,911
public static short readShort ( byte b [ ] , int offset ) { int retValue ; retValue = b [ offset ++ ] << 8 ; retValue |= b [ offset ] & 0xff ; return ( short ) retValue ; }
Unserializes a short from a byte array at a specific offset in big - endian order
50
19
159,912
public static void writeShort ( byte b [ ] , int offset , short value ) { b [ offset ++ ] = ( byte ) ( value >>> 8 ) ; b [ offset ] = ( byte ) value ; }
Serializes a short into a byte array at a specific offset in big - endian order
44
18
159,913
public static void establishSSLContext ( HttpClient client , int port , LibertyServer server ) { establishSSLContext ( client , port , server , null , null , null , null , "TLSv1.2" ) ; }
Adds an SSL context to the HttpClient . No trust or client certificate is established and a trust - all policy is assumed .
49
26
159,914
public final void fireEvent ( EventObject evt , EventListenerV visitor ) { EventListener [ ] list = getListenerArray ( ) ; for ( int i = 0 ; i < list . length ; i ++ ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_N...
Fire the event to all listeners by allowing the visitor to visit each listener . The visitor is responsible for implementing the actual firing of the event to each listener .
152
31
159,915
public final synchronized void addListener ( EventListener l ) { if ( l == null ) { throw new IllegalArgumentException ( "Listener " + l + " is null" ) ; } if ( listeners == EMPTY_LISTENERS ) { listeners = new EventListener [ 1 ] ; listeners [ 0 ] = l ; } else { int i = listeners . length ; EventListener [ ] tmp = new ...
Add the listener as a listener to the list .
121
10
159,916
public final synchronized void removeListener ( EventListener l ) { if ( l == null ) { throw new IllegalArgumentException ( "Listener " + l + " is null" ) ; } // Is l on the list? int index = - 1 ; for ( int i = listeners . length - 1 ; i >= 0 ; i -- ) { if ( listeners [ i ] . equals ( l ) == true ) { index = i ; break...
Remove the listener .
237
4
159,917
private ClassLoader getClassLoaderForInterfaces ( final ClassLoader loader , final Class < ? > [ ] interfaces ) { if ( canSeeAllInterfaces ( loader , interfaces ) ) { LOG . log ( Level . FINE , "current classloader " + loader + " can see all interface" ) ; return loader ; } String sortedNameFromInterfaceArray = getSort...
Return a classloader that can see all the given interfaces If the given loader can see all interfaces then it is used . If not then a combined classloader of all interface classloaders is returned .
303
40
159,918
private Application getMyfacesApplicationInstance ( ) { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; if ( facesContext != null ) { ExternalContext externalContext = facesContext . getExternalContext ( ) ; if ( externalContext != null ) { return ( Application ) externalContext . getApplicationMap ...
Retrieve the current Myfaces Application Instance lookup on the application map . All methods introduced on jsf 1 . 2 for Application interface should thrown by default UnsupportedOperationException but the ri scan and find the original Application impl and redirect the call to that method instead throwing it allowing ...
90
69
159,919
protected ClassLoader buildClassLoader ( final List < URL > urlList , String verifyJarProperty ) { if ( libertyBoot ) { // for liberty boot we just use the class loader that loaded this class return AccessController . doPrivileged ( new PrivilegedAction < ClassLoader > ( ) { @ Override public ClassLoader run ( ) { retu...
Build the nested classloader containing the OSGi framework and the log provider .
334
15
159,920
public static void enableJava2SecurityIfSet ( BootstrapConfig bootProps , List < URL > urlList ) { if ( bootProps . get ( BootstrapConstants . JAVA_2_SECURITY_PROPERTY ) != null ) { NameBasedLocalBundleRepository repo = new NameBasedLocalBundleRepository ( bootProps . getInstallRoot ( ) ) ; urlList . add ( getJarFileFr...
Set Java 2 Security if enabled
303
6
159,921
protected static String getProductInfoDisplayName ( ) { String result = null ; try { Map < String , ProductInfo > products = ProductInfo . getAllProductInfo ( ) ; StringBuilder builder = new StringBuilder ( ) ; for ( ProductInfo productInfo : products . values ( ) ) { ProductInfo replaced = productInfo . getReplacedBy ...
Return a display name for the currently running server .
217
10
159,922
protected Instrumentation getInstrumentation ( ) { ClassLoader cl = ClassLoader . getSystemClassLoader ( ) ; Instrumentation i = findInstrumentation ( cl , "com.ibm.ws.kernel.instrument.BootstrapAgent" ) ; if ( i == null ) i = findInstrumentation ( cl , "wlp.lib.extract.agent.BootstrapAgent" ) ; return i ; }
Fetch the BootstrapAgent instrumentation instance from the BootstrapAgent in the system classloader .
90
20
159,923
public JspConfiguration createClonedJspConfiguration ( ) { return new JspConfiguration ( configManager , this . getServletVersion ( ) , this . jspVersion , this . isXml , this . isXmlSpecified , this . elIgnored , this . scriptingInvalid ( ) , this . isTrimDirectiveWhitespaces ( ) , this . isDeferredSyntaxAllowedAsLite...
This method is used for creating a configuration for a tag file . The tag file may want to override some properties if it s jsp version in the tld is different than the server version
180
38
159,924
public ExpressionFactory getExpressionFactory ( ) { // lazy init here, sync to avoid race condition synchronized ( this ) { if ( expressionFactory == null ) { expressionFactory = ExpressionFactory . newInstance ( ) ; } } //allow JCDI to wrap our expression factory so they can clean up objects after the expressions are ...
LIDB4147 - 9 Begin
232
8
159,925
protected ClassInfoImpl getDelayableClassInfo ( Type type ) { String typeClassName = type . getClassName ( ) ; if ( tc . isDebugEnabled ( ) ) { // Type 'toString' answers the descriptor; // show the type class name, too, for clarity. Tr . debug ( tc , MessageFormat . format ( "[ {0} ] ENTER [ {1} ] [ {2} ]" , new Objec...
For array types the previous implementation used the element name .
427
11
159,926
public ArrayClassInfo getArrayClassInfo ( String typeClassName , Type arrayType ) { ClassInfoImpl elementClassInfo = getDelayableClassInfo ( arrayType . getElementType ( ) ) ; return new ArrayClassInfo ( typeClassName , elementClassInfo ) ; }
Note that this will recurse as long as the element type is still an array type .
59
18
159,927
protected boolean addClassInfo ( NonDelayedClassInfo classInfo ) { boolean didAdd ; if ( classInfo . isJavaClass ( ) ) { didAdd = basicPutJavaClassInfo ( classInfo ) ; } else if ( classInfo . isAnnotationPresent ( ) || classInfo . isFieldAnnotationPresent ( ) || classInfo . isMethodAnnotationPresent ( ) ) { didAdd = ba...
Do update the LRU state .
270
7
159,928
protected void addAsFirst ( NonDelayedClassInfo classInfo ) { String methodName = "addAsFirst" ; boolean doLog = tc . isDebugEnabled ( ) ; String useHashText = ( doLog ? getHashText ( ) : null ) ; String useClassHashText = ( doLog ? classInfo . getHashText ( ) : null ) ; if ( doLog ) { logLinks ( methodName , classInfo...
put us over the maximum size trim off the last element .
769
12
159,929
public void makeFirst ( NonDelayedClassInfo classInfo ) { String methodName = "makeFirst" ; boolean doLog = tc . isDebugEnabled ( ) ; String useHashText = ( doLog ? getHashText ( ) : null ) ; String useClassHashText = ( doLog ? classInfo . getHashText ( ) : null ) ; if ( doLog ) { logLinks ( methodName , classInfo ) ; ...
The class info is last or the class info is somewhere in the middle .
592
15
159,930
@ Override @ FFDCIgnore ( MalformedURLException . class ) public URL getResource ( ) { String useRelPath = getRelativePath ( ) ; if ( ( zipEntryData == null ) || zipEntryData . isDirectory ( ) ) { useRelPath += "/" ; } URI entryUri = rootContainer . createEntryUri ( useRelPath ) ; if ( entryUri == null ) { return null ...
Answer the URL of this entry .
298
7
159,931
@ Override public InputStream getInputStream ( ) throws IOException { if ( ( zipEntryData == null ) || zipEntryData . isDirectory ( ) ) { return null ; } final ZipFileHandle zipFileHandle = rootContainer . getZipFileHandle ( ) ; // throws IOException ZipFile zipFile = zipFileHandle . open ( ) ; // The open must have a ...
Obtain an input stream for the entry .
678
9
159,932
@ Override public ArtifactContainer getEnclosingContainer ( ) { // The enclosing container may be set when the entry is // created, in which case the enclosing container lock is null // and is never needed. // // The entry can be created in these ways: // // ZipFileContainer.createEntry(ArtifactContainer, String, Strin...
Answer the enclosing container of this entry .
800
9
159,933
public char normalize ( char currentChar ) { if ( NORMALIZE_UPPER == getNormalization ( ) ) { return toUpper ( currentChar ) ; } if ( NORMALIZE_LOWER == getNormalization ( ) ) { return toLower ( currentChar ) ; } return currentChar ; }
Take the input character and normalize based on this normalizer instance .
66
14
159,934
static public char normalize ( char input , int format ) { if ( NORMALIZE_LOWER == format ) { return toLower ( input ) ; } if ( NORMALIZE_UPPER == format ) { return toUpper ( input ) ; } return input ; }
Take the input character and normalize based on the input format .
58
13
159,935
public void init ( IFilterConfig filterConfig ) throws ServletException { try { // init the filter instance _filterState = FILTER_STATE_INITIALIZING ; // LIDB-3598: begin this . _filterConfig = filterConfig ; if ( _eventSource != null && _eventSource . hasFilterListeners ( ) ) { _eventSource . onFilterStartInit ( getFi...
Initializes the filter wrapper and the underlying filter instance
336
10
159,936
public void destroy ( ) throws ServletException { try { // destroy the filter instance _filterState = FILTER_STATE_DESTROYING ; for ( int i = 0 ; ( nServicing . get ( ) > 0 ) && i < 60 ; i ++ ) { try { if ( i == 0 ) { logger . logp ( Level . INFO , CLASS_NAME , "destroy" , "waiting.to.destroy.filter.[{0}]" , _filterNam...
Destroys the filter wrapper and the underlying filter instance
479
11
159,937
protected synchronized void activate ( ComponentContext cc ) { pipelineRef . activate ( cc ) ; securityServiceRef . activate ( cc ) ; insertJMXSecurityFilter ( ) ; }
Insert the JMX security filter upon activation . This will only happen if we have both the MBeanServerPipeline and the SecurityService .
36
30
159,938
protected synchronized void deactivate ( ComponentContext cc ) { removeJMXSecurityFilter ( ) ; pipelineRef . deactivate ( cc ) ; securityServiceRef . deactivate ( cc ) ; }
Remove the JMX security filter upon deactivation .
39
10
159,939
private void throwAuthzException ( ) throws SecurityException { SubjectManager subjectManager = new SubjectManager ( ) ; String name = "UNAUTHENTICATED" ; if ( subjectManager . getInvocationSubject ( ) != null ) { name = subjectManager . getInvocationSubject ( ) . getPrincipals ( ) . iterator ( ) . next ( ) . getName (...
Throwing a SecurityException as not all of the methods that need protection throw an MBeanException . We can change this if we need to .
172
30
159,940
protected void setupNotificationArea ( ) throws Throwable { final String sourceMethod = "setupNotificationArea" ; URL notificationsURL = null ; HttpsURLConnection connection = null ; try { // Get URL for creating a notification area notificationsURL = serverConnection . getNotificationsURL ( ) ; if ( logger . isLoggabl...
we want to avoid cycles .
805
6
159,941
private void sendClosingSignal ( ) { URL clientURL = null ; HttpsURLConnection connection = null ; try { // Get the appropriate URL to delete notification client if ( serverConnection . serverVersion >= 4 ) { //V4+ clients use /{clientID} to delete the notification client clientURL = getNotificationClientURL ( ) ; } el...
We don t throw any errors because the connector is about to be closed .
399
15
159,942
private static Type getAsynchronizedGenericType ( Object targetObject ) { if ( targetObject instanceof java . util . Collection ) { Class < ? extends java . util . Collection > rawType = ( Class < ? extends Collection > ) targetObject . getClass ( ) ; Class < ? > actualType = Object . class ; if ( ( ( java . util . Col...
Hack to generate a type class for collection object .
265
10
159,943
@ Override public synchronized FailureScope currentFailureScope ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "currentFailureScope" , this ) ; if ( _currentFailureScope == null ) { _currentFailureScope = new FileFailureScope ( ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "currentFailureScope" , _curre...
Invoked by a client service to determine the current FailureScope . This is defined as a FailureScope that identifies the current point of execution . In practice this means the current server on distributed or server region on 390 .
96
43
159,944
@ Override public void registerRecoveryEventListener ( RecoveryEventListener rel ) /* @MD19638A */ { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerRecoveryEventListener" , rel ) ; RegisteredRecoveryEventListeners . instance ( ) . add ( rel ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "registerRecover...
Register the recovery event callback listener .
93
7
159,945
@ Override public boolean isHAEnabled ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isHAEnabled" ) ; final boolean haEnabled = Configuration . HAEnabled ( ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isHAEnabled" , haEnabled ) ; return haEnabled ; }
This method allows a client service to determine if High Availability support has been enabled for the local cluster .
77
20
159,946
public void registerCallback ( UOWScopeCallback callback ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerCallback" , new Object [ ] { callback , this } ) ; _callbackManager . addCallback ( callback ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "registerCallback" ) ; }
Register users who want notification on UserTransaction Begin and End
77
11
159,947
public void unregisterCallback ( UOWScopeCallback callback ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "unregisterCallback" , new Object [ ] { callback , this } ) ; _callbackManager . removeCallback ( callback ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "unregisterCallback" ) ; }
unregister users who want notification on UserTransaction Begin and End
80
12
159,948
private void connectCommon ( Object _udpRequestContextObject ) throws IOException { String localAddress = "*" ; int localPort = 0 ; Map < Object , Object > vcStateMap = getVirtualConnection ( ) . getStateMap ( ) ; if ( vcStateMap != null ) { // // Size of the buffer the channel should use to read. // String value = ( S...
Common connect logic between sync and async connect requests .
618
10
159,949
public String retrieveEndpointName ( J2EEName j2eeName ) { for ( Entry < String , J2EEName > entry : endpointNameJ2EENameMap . entrySet ( ) ) { if ( entry . getValue ( ) . equals ( j2eeName ) ) { return entry . getKey ( ) ; } } return null ; }
Get the endpoint name by j2eeName
79
9
159,950
private final void _tryUnlink ( ) { if ( 0 >= _cursorCount && _state == LOGICALLY_UNLINKED ) { _previousLink . _nextLink = _nextLink ; _nextLink . _previousLink = _previousLink ; _previousLink = null ; _nextLink = null ; // Defect 240039 //_parent = null; _state = PHYSICALLY_UNLINKED ; } }
Attempt to physically unlink the receiver if appropriate . MUST BE CALLED UNDER _parent MONITOR .
98
21
159,951
public final Link getNextLink ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( this , tc , "getNextLink" , _positionString ( ) ) ; } Link nextLink = null ; LinkedList parent = _parent ; if ( null != parent ) { nextLink = _parent . getNextLink ( this ) ; } if ( TraceComp...
Navigate to the next logical link . This version is for use with non - cursored navigation .
138
20
159,952
public void xmlWriteOn ( FormattedWriter writer ) throws IOException { String name = "link" ; writer . write ( "<" ) ; writer . write ( name ) ; xmlWriteAttributesOn ( writer ) ; writer . write ( " />" ) ; }
Default XML output .
55
4
159,953
@ SuppressWarnings ( "rawtypes" ) public void doPostConstruct ( Class clazz , List < LifecycleCallback > postConstructs ) throws InjectionException { mainClassName = clazz . getName ( ) ; doPostConstruct ( clazz , postConstructs , null ) ; }
Processes the PostConstruct callback method for the application main class
64
12
159,954
public void doPostConstruct ( Object instance , List < LifecycleCallback > postConstructs ) throws InjectionException { doPostConstruct ( instance . getClass ( ) , postConstructs , instance ) ; }
Processes the PostConstruct callback method for the login callback handler class
43
13
159,955
public void doPreDestroy ( Object instance , List < LifecycleCallback > preDestroy ) throws InjectionException { doPreDestroy ( instance . getClass ( ) , preDestroy , instance ) ; }
Processes the PreDestroy callback method for the login callback handler class
41
13
159,956
@ SuppressWarnings ( "rawtypes" ) private void doPostConstruct ( Class clazz , List < LifecycleCallback > postConstructs , Object instance ) throws InjectionException { if ( ! metadataComplete && clazz . getSuperclass ( ) != null ) { doPostConstruct ( clazz . getSuperclass ( ) , postConstructs , instance ) ; } String c...
Processes the PostConstruct callback method
179
7
159,957
@ SuppressWarnings ( "rawtypes" ) public Method getAnnotatedMethod ( Class clazz , Class < ? extends Annotation > annotationClass ) { Method m = null ; Method [ ] methods = clazz . getDeclaredMethods ( ) ; for ( int i = 0 ; i < methods . length ; i ++ ) { Annotation [ ] a = methods [ i ] . getAnnotations ( ) ; if ( a !...
Gets the annotated method from the class object .
206
11
159,958
@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) public void invokeMethod ( final Class clazz , final String methodName , final Object instance ) { // instance can be null for the static application main method AccessController . doPrivileged ( new PrivilegedAction ( ) { @ Override public Object run ( ) { try { fina...
Invokes the class method . The object instance can be null for the application main class .
187
18
159,959
public String getMethodNameFromDD ( List < LifecycleCallback > callbacks , String classname ) { String methodName = null ; for ( LifecycleCallback callback : callbacks ) { // lifecycle-callback-class default to the enclosing component class Client String callbackClassName ; callbackClassName = callback . getClassName (...
Gets the lifecycle callback method name from the application client module deployment descriptor
171
15
159,960
private final void encrypt ( ) throws Exception { String signStr = Base64Coder . toString ( Base64Coder . base64Encode ( signature ) ) ; String ud = userData . toString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "encrypt: userData" + ud ) ; } byte [ ] acc...
Encrypt the token passed into the token .
409
9
159,961
@ FFDCIgnore ( { BadPaddingException . class , Exception . class } ) private final void decrypt ( ) throws InvalidTokenException { byte [ ] tokenData ; try { tokenData = LTPAKeyUtil . decrypt ( encryptedBytes . clone ( ) , sharedKey , cipher ) ; checkTokenBytes ( tokenData ) ; String UTF8TokenString = toUTF8String ( to...
Decrypt the encrypted token bytes passed into the constructor .
480
11
159,962
private final void sign ( ) throws Exception { String dataStr = this . getUserData ( ) . toString ( ) ; byte [ ] data = Base64Coder . getBytes ( dataStr ) ; byte [ ] signature = sign ( data , this . privateKey ) ; this . setSignature ( signature ) ; }
Sign the token passed into the token .
68
8
159,963
private final boolean verify ( ) throws Exception { String dataStr = this . getUserData ( ) . toString ( ) ; byte [ ] data = Base64Coder . getBytes ( dataStr ) ; return verify ( data , signature , publicKey ) ; }
Verify the token .
55
5
159,964
public final void validateExpiration ( ) throws TokenExpiredException { Date d = new Date ( ) ; Date expD = new Date ( getExpiration ( ) ) ; boolean expired = d . after ( expD ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Current time = " + d + ", expiration ...
Checks if the token has expired .
185
8
159,965
private final void setExpiration ( long expirationInMinutes ) { expirationInMilliseconds = System . currentTimeMillis ( ) + expirationInMinutes * 60 * 1000 ; signature = null ; if ( userData != null ) { encryptedBytes = null ; userData . addAttribute ( "expire" , Long . toString ( expirationInMilliseconds ) ) ; } else ...
Set expiration limit of the LTPA2 token
89
9
159,966
private static final String toUTF8String ( byte [ ] b ) { String ns = null ; try { ns = new String ( b , "UTF8" ) ; } catch ( UnsupportedEncodingException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Error converting to string; " + e ) ; } } return ns ; }
Convert the byte representation to the UTF - 8 String form .
91
13
159,967
private static final String toSimpleString ( byte [ ] b ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 , len = b . length ; i < len ; i ++ ) { sb . append ( ( char ) ( b [ i ] & 0xff ) ) ; } String str = sb . toString ( ) ; return str ; }
Convert the byte representation to the String form .
81
10
159,968
private static final byte [ ] getSimpleBytes ( String str ) { StringBuilder sb = new StringBuilder ( str ) ; byte [ ] b = new byte [ sb . length ( ) ] ; for ( int i = 0 , len = sb . length ( ) ; i < len ; i ++ ) { b [ i ] = ( byte ) sb . charAt ( i ) ; } return b ; }
Convert the String form to the byte representation
88
9
159,969
public static ProtectedFunctionMapper getInstance ( ) { ProtectedFunctionMapper funcMapper ; if ( System . getSecurityManager ( ) != null ) { funcMapper = ( ProtectedFunctionMapper ) AccessController . doPrivileged ( new PrivilegedAction ( ) { @ Override public Object run ( ) { return new ProtectedFunctionMapper ( ) ; ...
Generated Servlet and Tag Handler implementations call this method to retrieve an instance of the ProtectedFunctionMapper . This is necessary since generated code does not have access to create instances of classes in this package .
122
42
159,970
@ Override public Method resolveFunction ( String prefix , String localName ) { return ( Method ) this . fnmap . get ( prefix + ":" + localName ) ; }
Resolves the specified local name and prefix into a Java . lang . Method . Returns null if the prefix and local name are not found .
37
28
159,971
public void setItemType ( JMFType elem ) { if ( elem == null ) throw new NullPointerException ( "Repeated item cannot be null" ) ; itemType = ( JSType ) elem ; itemType . parent = this ; itemType . siblingPosition = 0 ; }
Set the item type of the array
64
7
159,972
protected void incrementActiveConns ( ) { int count = this . activeConnections . incrementAndGet ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Increment active, current=" + count ) ; } }
Increase the number of active connections currently being processed inside the HTTP dispatcher .
65
14
159,973
protected void decrementActiveConns ( ) { int count = this . activeConnections . decrementAndGet ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Decrement active, current=" + count ) ; } if ( 0 == count && this . quiescing ) { signalNoConnections ( ) ; } }
Decrement the number of active connections being processed by the dispatcher .
88
13
159,974
@ Trivial public void enactOpen ( long openAt ) { String methodName = "enactOpen" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " On [ " + path + " ] at [ " + toRelSec ( initialAt , openAt ) + " (s) ]" ) ; } if ( zipFileState == ZipFileState . OPEN ) { // ...
PENDING - > FULLY_CLOSED
526
10
159,975
@ Trivial protected ZipFile reacquireZipFile ( ) throws IOException , ZipException { String methodName = "reacquireZipFile" ; File rawZipFile = new File ( path ) ; long newZipLength = FileUtils . fileLength ( rawZipFile ) ; long newZipLastModified = FileUtils . fileLastModified ( rawZipFile ) ; boolean zipFileChanged =...
Re - acquire the ZIP file .
713
7
159,976
public static String getAttribute ( XMLStreamReader reader , String localName ) { int count = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { String name = reader . getAttributeLocalName ( i ) ; if ( localName . equals ( name ) ) { return reader . getAttributeValue ( i ) ; } } return null ; }
Get the element attribute value
82
5
159,977
public static < T > T createInstanceByElement ( XMLStreamReader reader , Class < T > clazz , Set < String > attrNames ) { if ( reader == null || clazz == null || attrNames == null ) return null ; try { T instance = clazz . newInstance ( ) ; int count = reader . getAttributeCount ( ) ; int matchCount = attrNames . size ...
Create the instance by parse the element the instance s class must have the empty construct . The clazz must have the fields in attrNames and all the fields type must be String
256
36
159,978
public void removeEjbBindings ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "removeEjbBindings called" ) ; // Just loop through the values, not the keys, as the simple-binding-name // key may have a # in front of it when the bean was not simple, and that // won't mat...
Removes all of the EJB bindings for this EJB from the bean specific and sever wide maps .
155
21
159,979
public boolean isUniqueShortDefaultBinding ( String interfaceName ) { // If there were no explicit bindings, and only one implicit // binding, then it is considered uniquie. d457053.1 BindingData bdata = ivServerContextBindingMap . get ( interfaceName ) ; if ( bdata != null && bdata . ivExplicitBean == null && bdata . ...
Returns true if a short form default binding is present for the specified interface and the current bean is currently the only bean with this short form default binding and there are no explicit bindings .
114
36
159,980
public void removeShortDefaultBindings ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "removeShortDefaultBindings called" ) ; for ( String bindingName : ivEjbContextShortDefaultJndiNames ) { removeFromServerContextBindingMap ( bindingName , false ) ; } ivEjbContextSho...
Removes all of the short form default bindings for this EJB from the bean specific and sever wide maps .
98
22
159,981
private void addToServerContextBindingMap ( String interfaceName , String bindingName ) throws NameAlreadyBoundException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "addToServerContextBindingMap : " + interfaceName + ", binding : " + bindingName ) ; BindingData bdata =...
d457053 . 1
783
6
159,982
public static BindingsHelper getLocalHelper ( HomeRecord homeRecord ) { if ( homeRecord . ivLocalBindingsHelper == null ) { homeRecord . ivLocalBindingsHelper = new BindingsHelper ( homeRecord , cvAllLocalBindings , null ) ; } return homeRecord . ivLocalBindingsHelper ; }
A method for obtaining a Binding Name Helper for use with the local jndi namespace .
68
19
159,983
public static BindingsHelper getRemoteHelper ( HomeRecord homeRecord ) { if ( homeRecord . ivRemoteBindingsHelper == null ) { homeRecord . ivRemoteBindingsHelper = new BindingsHelper ( homeRecord , cvAllRemoteBindings , "ejb/" ) ; } return homeRecord . ivRemoteBindingsHelper ; }
A method for obtaining a Binding Name Helper for use with the remote jndi namespace .
72
19
159,984
public synchronized void stop ( ) { if ( timer != null ) { timer . keepRunning = false ; timer . interrupt ( ) ; timer = null ; } // Remove this manager from the space alert list LogRepositorySpaceAlert . getInstance ( ) . removeRepositoryInfo ( this ) ; }
stop logging and thus stop the timer retention thread
61
9
159,985
protected static long calculateFileSplit ( long repositorySize ) { if ( repositorySize <= 0 ) { return MAX_LOG_FILE_SIZE ; } if ( repositorySize < MIN_REPOSITORY_SIZE ) { throw new IllegalArgumentException ( "Specified repository size is too small" ) ; } long result = repositorySize / SPLIT_RATIO ; if ( result < MIN_LO...
calculates maximum size of repository files based on the required maximum limit on total size of the repository .
130
21
159,986
private void initFileList ( boolean force ) { if ( totalSize < 0 || force ) { fileList . clear ( ) ; parentFilesMap . clear ( ) ; totalSize = 0L ; File [ ] files = listRepositoryFiles ( ) ; if ( files . length > 0 ) { Arrays . sort ( files , fileComparator ) ; for ( File file : files ) { long size = AccessHelper . getF...
Initializes file list from the list of files in the repository . This method should be called while holding a lock on fileList .
405
26
159,987
protected void deleteEmptyRepositoryDirs ( ) { File [ ] directories = listRepositoryDirs ( ) ; //determine if the server/controller instance directory is empty for ( int i = 0 ; i < directories . length ; i ++ ) { // This is a directory we should not delete boolean currentDir = ivSubDirectory != null && ivSubDirectory ...
Deletes all empty server instance directories including empty servant directories
481
11
159,988
protected void deleteDirectory ( File directoryName ) { if ( debugLogger . isLoggable ( Level . FINE ) && isDebugEnabled ( ) ) { debugLogger . logp ( Level . FINE , thisClass , "deleteDirectory" , "empty directory " + ( ( directoryName == null ) ? "None" : directoryName . getPath ( ) ) ) ; } if ( AccessHelper . deleteF...
Deletes the specified directory
222
5
159,989
private boolean purgeOldFiles ( long total ) { boolean result = false ; // Should delete some files. if ( debugLogger . isLoggable ( Level . FINE ) && LogRepositoryBaseImpl . isDebugEnabled ( ) ) { debugLogger . logp ( Level . FINE , thisClass , "purgeOldFiles" , "total: " + total + " listSz: " + fileList . size ( ) ) ...
Removes old files from the repository . This method does not remove the most recent file . This method should be called while holding a lock on fileList .
225
31
159,990
private FileDetails purgeOldestFile ( ) { debugListLL ( "prepurgeOldestFile" ) ; debugListHM ( "prepurgeOldestFile" ) ; FileDetails returnFD = getOldestInactive ( ) ; if ( debugLogger . isLoggable ( Level . FINE ) && LogRepositoryBaseImpl . isDebugEnabled ( ) ) { debugLogger . logp ( Level . FINE , thisClass , "purgeOl...
Removes the oldest file from the repository . This method has logic to avoid removing currently active files This method should be called with a lock on filelist already attained
544
32
159,991
public synchronized String addNewFileFromSubProcess ( long spTimeStamp , String spPid , String spLabel ) { // TODO: It is theoretically possible that subProcess already created one of these (although it won't happen in our scenario. // Consider either pulling actual pid from the files on initFileList or looking for the...
add information about a new file being created by a subProcess in order to maintain retention information . This is done for all files created by each subProcess . If IPC facility is not ready subProcess may have to create first then notify when IPC is up .
583
53
159,992
public void inactivateSubProcess ( String spPid ) { synchronized ( fileList ) { // always lock fileList first to avoid deadlock synchronized ( activeFilesMap ) { // Right into sync block because 99% case is that map contains pid activeFilesMap . remove ( spPid ) ; } } if ( debugLogger . isLoggable ( Level . FINE ) && L...
inactivate active file for a given process . Should only be one file active for a process
129
18
159,993
protected int getContentLength ( boolean update ) { if ( update ) { contentLength = ( int ) this . getFileSize ( update ) ; return contentLength ; } else { if ( contentLength == - 1 ) { contentLength = ( int ) this . getFileSize ( update ) ; return contentLength ; } else { return contentLength ; } } }
PM92967 pulled up method
75
7
159,994
public void logError ( String moduleName , String beanName , String methodName ) { Tr . error ( tc , ivError . getMessageId ( ) , new Object [ ] { beanName , moduleName , methodName , ivField } ) ; }
Logs an error message corresponding to this exception .
53
10
159,995
protected void restore ( ObjectInputStream ois , int dataVersion ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "restore" , new Object [ ] { dataVersion } ) ; checkPersistentVersionId ( dataVersion ) ; if ( TraceComponent . isAnyTra...
Child classes should override this method to restore their persistent data .
111
12
159,996
synchronized void captureCheckpointManagedObjects ( ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "captureCheckpointManagedObjectsremove" ) ; // Now that we are synchronized check that we have not captured the checkpoint sets already. if ( checkpointManagedOb...
Capture the ManagedObjects to write and delete as part of the checkpoint .
230
16
159,997
private void write ( ManagedObject managedObject ) throws ObjectManagerException { final String methodName = "write" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { managedObject } ) ; // Pick up and write the latest serialized bytes...
Writes an object to hardened storage but may return before the write completes .
715
15
159,998
public void writeHeader ( ) throws ObjectManagerException { final String methodName = "writeHeader" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; try { java . io . FileOutputStream headerOutputStream = new java . io . FileOutputStream ( storeDire...
Write header information for disk in the file headerIdentifier and force it to disk .
366
17
159,999
public static RestRepositoryConnection createConnection ( RestRepositoryConnectionProxy proxy ) throws RepositoryBackendIOException { readRepoProperties ( proxy ) ; RestRepositoryConnection connection = new RestRepositoryConnection ( repoProperties . getProperty ( REPOSITORY_URL_PROP ) . trim ( ) ) ; connection . setPr...
Creates a LoginInfoEntry with a proxy . This will then load the default repository using a hosted properties file on DHE .
469
26