idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
162,600
private void traceJndiReturn ( String methodname , long duration , Object ... objs ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , JNDI_CALL + methodname + " [" + duration + " ms]" , objs ) ; } }
Trace a message with JNDI_CALL that includes the returned objects from that JNDI call .
74
23
162,601
private void traceJndiThrow ( String methodname , long duration , NamingException ne ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , JNDI_CALL + methodname + " [" + duration + " ms] " + ne . getMessage ( ) , ne ) ; } }
Trace a message with JNDI_CALL that includes the resulting exception from that JNDI call .
81
23
162,602
public void encodeChildren ( FacesContext context , UIComponent component ) throws IOException { if ( context == null ) { throw new NullPointerException ( "context" ) ; } if ( component == null ) { throw new NullPointerException ( "component" ) ; } if ( component . getChildCount ( ) > 0 ) { for ( int i = 0 , childCount...
Render all children if there are any .
143
8
162,603
void registerCallback ( AsynchConsumerCallback callback ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerCallback" , callback ) ; asynchConsumerCallback = callback ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc ,...
Register the AsynchConsumerCallback . If callback is null then this is the equivalent of deregister i . e . callbackRegistered is set to false .
93
31
162,604
void processMsgs ( LockedMessageEnumeration msgEnumeration , ConsumerSession consumerSession ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processMsgs" , new Object [ ] { msgEnumeration , consumerSession } ) ; // Remember that a callback is running asynchConsumerRu...
Calls the registered AsynchConsumerCallback with the given message enumeration .
569
16
162,605
boolean isAsynchConsumerRunning ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isAsynchConsumerRunning" ) ; SibTr . exit ( tc , "isAsynchConsumerRunning" , new Boolean ( asynchConsumerRunning ) ) ; } return asynchConsumerRunning ; }
Is the callback currently running?
88
6
162,606
private long sendMessage ( SIBusMessage msg ) throws OperationFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "sendMessage" , msg ) ; long retValue = 0 ; // If we are at FAP9 or above we can do a 'chunked' send of the message in seperate // slices...
Helper function . Sends an SIBusMessage to the client taking care of the myriad pesky exceptions which may get thrown . If something does go wrong then the caller is notified by a single OperationFailedException . By this point the appropriate error flow has also been transmitted to the client .
223
58
162,607
@ Override public void reset ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . en...
Called in response to a client requesting we reset the browse cursor for a particular broser session .
158
20
162,608
@ Override public void flush ( int requestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "flush" , "" + requestNumber ) ; // Locate the browser session to use. BrowserSession browserSession = mainConsumer . getBrowserSession ( ) ; SIBusMessage msg = nul...
Invoked when the client sends a flush consumer . Since browser sessions do not have an activeConsumer method this translates to attempting a single browse next and sending back the result .
391
34
162,609
@ Override public void close ( int requestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" , "" + requestNumber ) ; BrowserSession browserSession = mainConsumer . getBrowserSession ( ) ; try { browserSession . close ( ) ; } catch ( SIException e )...
Closes the browser .
476
5
162,610
static Class < ? > getTypeFromMember ( Member member ) throws InjectionException { Class < ? > memberType = null ; if ( member instanceof Field ) { memberType = ( ( Field ) member ) . getType ( ) ; } else if ( member instanceof Method ) { Method method = ( Method ) member ; if ( method . getParameterTypes ( ) == null |...
This returns the type of the injection being requested based on either the annotated field or annotated method .
176
21
162,611
public static void sendExceptionToClient ( Throwable throwable , String probeId , Conversation conversation , int requestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendExceptionToClient" , new Object [ ] { throwable , probeId , conversation , requestNumbe...
Sends an exception response back to the client .
362
10
162,612
public static void sendAsyncExceptionToClient ( Throwable throwable , String probeId , short clientSessionId , Conversation conversation , int requestNumber ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendAsyncExceptionToClient" , new Object [ ] { throwable , pro...
This method is used to flow a message down to the client that will get picked up and delivered to the asynchronousException method of any listeners that the client has registered .
373
33
162,613
public static void sendSessionCreateResponse ( int segmentType , int requestNumber , Conversation conversation , short sessionId , DestinationSession session , SIDestinationAddress originalDestinationAddr ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendSessionCre...
Because of the larger amount of data needed to be sent back on the response to a session create I have split this into a seperate method so that we are not repeating code all over the place .
811
40
162,614
private static JavaDumper createInstance ( ) { try { // Try to find IBM Java dumper class. Class < ? > dumpClass = Class . forName ( "com.ibm.jvm.Dump" ) ; try { // Try to find the IBM Java 7.1 dump methods. Class < ? > [ ] paramTypes = new Class < ? > [ ] { String . class } ; Method javaDumpToFileMethod = dumpClass . ...
Create a dumper for the current JVM .
421
10
162,615
private Map < String , String > filterProps ( Map < String , Object > props ) { HashMap < String , String > filteredProps = new HashMap <> ( ) ; Iterator < String > it = props . keySet ( ) . iterator ( ) ; boolean debug = tc . isDebugEnabled ( ) && TraceComponent . isAnyTracingEnabled ( ) ; while ( it . hasNext ( ) ) {...
given the map of properties remove ones we don t care about and translate some others . If it s not one we re familiar with transfer it unaltered
399
31
162,616
private String validateAuthn ( String value ) { // for now, if we got here we're validating an authnToken String result = null ; String valueLower = value . toLowerCase ( ) ; do { if ( valueLower . equals ( "saml" ) ) { result = JAXRSClientConstants . SAML_HANDLER ; break ; } if ( valueLower . equals ( "oauth" ) ) { re...
validate the value for authnToken key and select appropriate new key Note that the check is not case sensitive .
192
23
162,617
private String getURI ( Map < String , Object > props ) { if ( props == null ) return null ; if ( props . keySet ( ) . contains ( URI ) ) { return ( props . get ( URI ) . toString ( ) ) ; } else { return null ; } }
find the uri parameter which we will key off of
61
11
162,618
private static XMLInputFactory getXMLInputFactory ( ) { if ( SAFE_INPUT_FACTORY != null ) { return SAFE_INPUT_FACTORY ; } XMLInputFactory f = NS_AWARE_INPUT_FACTORY_POOL . poll ( ) ; if ( f == null ) { f = createXMLInputFactory ( true ) ; } return f ; }
Return a cached namespace - aware factory .
87
8
162,619
public static void copy ( XMLStreamReader reader , XMLStreamWriter writer ) throws XMLStreamException { copy ( reader , writer , false , false ) ; }
Copies the reader to the writer . The start and end document methods must be handled on the writer manually .
32
22
162,620
public static QName readQName ( XMLStreamReader reader ) throws XMLStreamException { String value = reader . getElementText ( ) ; if ( value == null ) { return null ; } value = value . trim ( ) ; int index = value . indexOf ( ":" ) ; if ( index == - 1 ) { return new QName ( value ) ; } String prefix = value . substring...
Reads a QName from the element text . Reader must be positioned at the start tag .
191
19
162,621
public boolean addReference ( ServiceReference < T > reference ) { if ( reference == null ) return false ; ConcurrentServiceReferenceElement < T > element = new ConcurrentServiceReferenceElement < T > ( referenceName , reference ) ; synchronized ( elementMap ) { ConcurrentServiceReferenceElement < T > oldElement = elem...
Adds the service reference to the set or notifies the set that the service ranking for the reference might have been updated .
133
24
162,622
public boolean removeReference ( ServiceReference < T > reference ) { synchronized ( elementMap ) { ConcurrentServiceReferenceElement < T > element = elementMap . remove ( reference ) ; if ( element == null ) { return false ; } elementSet . remove ( element ) ; return true ; } }
Removes the service reference from the set
61
8
162,623
private Iterator < ConcurrentServiceReferenceElement < T > > elements ( ) { Collection < ConcurrentServiceReferenceElement < T >> set ; synchronized ( elementMap ) { if ( elementSetUnsorted ) { elementSet = new ConcurrentSkipListSet < ConcurrentServiceReferenceElement < T > > ( elementMap . values ( ) ) ; elementSetUns...
Return an iterator for the elements in service ranking order .
95
11
162,624
public void setChannelData ( ChannelData data ) throws ChannelException { this . channelData = data ; setValues ( data . getPropertyBag ( ) ) ; if ( tc . isDebugEnabled ( ) ) outputConfigToTrace ( ) ; }
Update the configuration with a new channel framework configuration object .
53
11
162,625
public void setChannelReceiveBufferSize ( int size ) { this . channelReceiveBufferSize = size ; if ( size < 0 || size > UDPConfigConstants . MAX_UDP_PACKET_SIZE ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Channel Receive buffer size not within Limits: " + size + " setting to default: " + UDPConfigConstants ...
Set the size of the bytebuffer to allocate when receiving data .
130
13
162,626
public void addSICoreConnection ( SICoreConnection conn , Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addSICoreConnection" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "Params: con...
Creates a new SICoreConnection that this listener is listening for events from .
240
17
162,627
@ Override public void asynchronousException ( ConsumerSession session , Throwable e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "asynchronousException" , new Object [ ] { session , e } ) ; FFDCFilter . processException ( e , CLASS_NAME + ".asynchronousException" ...
This event is generated if an exception is thrown during the processing of an asynchronous callback . In practise this should never occur as we should ensure that we catch all the errors in the place they occur as no state is available here .
332
45
162,628
@ Override public void meTerminated ( SICoreConnection conn ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "meTerminated" ) ; //Remember the fact that the ME has terminated so we don't issue spurious FFDCs final Conversation conversation = conversationTable . get ( c...
This method is called when the ME terminates .
607
10
162,629
@ Override public void commsFailure ( SICoreConnection conn , SIConnectionLostException e ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "commsFailure" , new Object [ ] { conn , e } ) ; FFDCFilter . processException ( e , CLASS_NAME + ".commsFailure" , CommsConstants...
This is used to indicate a communication failure on the client . Seeing as we are the only people who would ever generate this event for the client if this gets invoked on the server then someone has done something not bad not even wrong but silly .
193
48
162,630
public String getRequestURL ( ) { HttpServletRequest httpReq = getRequest ( ) ; if ( httpReq == null ) return null ; else return httpReq . getRequestURL ( ) . toString ( ) ; }
Get the URL of this invocation .
51
7
162,631
public HttpServletRequest getRequest ( ) { // moved as part of LIDB-3598 to ServletUtil /* ServletRequest r = _req; while (!(r instanceof HttpServletRequest)) { if (r instanceof ServletRequestWrapper) { r = ((ServletRequestWrapper) r).getRequest(); } } return (HttpServletRequest) r; */ //begin 311003, 61FVT:Simple SIP ...
Get the request used for the servlet invocation .
268
10
162,632
public HttpServletResponse getResponse ( ) { // moved as part of LIDB-3598 to ServletUtil /* ServletResponse r = _resp; while (!(r instanceof HttpServletResponse)) { if (r instanceof ServletResponseWrapper) { r = ((ServletResponseWrapper) r).getResponse(); } } return (HttpServletResponse) r; */ //begin 311003, 61FVT:Si...
Get the response used for the servlet invocation .
264
10
162,633
public boolean isAvailableInPlatform ( String p ) { if ( this . platform . equals ( PLATFORM_ALL ) ) return true ; else return ( this . platform . equals ( p ) ) ; }
Return true if this statistic is available in the given platform
43
11
162,634
protected byte [ ] loadClassDataFromFile ( String fileName ) { byte [ ] classBytes = null ; try { InputStream in = getResourceAsStream ( fileName ) ; if ( in == null ) { return null ; } ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; byte buf [ ] = new byte [ 1024 ] ; for ( int i = 0 ; ( i = in . read ( bu...
Load JSP class data from file .
150
8
162,635
private final Object typeCheck ( Object value , int type ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "typecheck: value = " + value + ", " + value . getClass ( ) + " , type=" + type ) ; switch ( type ) { /* No checking, just return the value */ case Selector...
Check the type of the value obtained from the message .
186
11
162,636
final Serializable restoreMapObject ( byte [ ] mapItemArray ) throws IOException , ClassNotFoundException { Serializable item = null ; ; /* If it is a real byte array, we need to return a safe copy with the */ /* header bytes removed. */ if ( ( mapItemArray [ 0 ] == HEADER_BYTE_0 ) && ( mapItemArray [ 1 ] == HEADER_BYT...
Restore an item retrieved from a Property or SystemContext map as a byte array into whatever it originally was .
530
22
162,637
final void setTransportVersion ( Object value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setTransportVersion" , value ) ; getHdr2 ( ) . setField ( JsHdr2Access . TRANSPORTVERSION_DATA , value ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEnt...
Set the transportVersion field in the message header to the given value . This method is package visibility as it is also used by JsJmsMessageImpl
121
31
162,638
final void clearTransportVersion ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "clearTransportVersion" ) ; getHdr2 ( ) . setChoiceField ( JsHdr2Access . TRANSPORTVERSION , JsHdr2Access . IS_TRANSPORTVERSION_EMPTY ) ; if ( TraceComponent . isAnyTracingEnable...
Clear the transportVersion field in the message header . This method is package visibility as it is also used by JsJmsMessageImpl
134
27
162,639
public Object getInstanceOf ( String key ) { try { ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; return Class . forName ( ( String ) classesMap . get ( key ) , true , loader ) . newInstance ( ) ; } catch ( IllegalAccessException e ) { logger . logp ( Level . SEVERE , "JspClassFactory" , ...
Creates an instance of the type of class specified by the key arg dependent on the value stored in the classesMap .
237
24
162,640
static ImmutableAttributes loadAttributes ( String repoType , File featureFile , ProvisioningDetails details ) throws IOException { // This will throw exceptions if required attributes mismatch or are missing details . ensureValid ( ) ; // retrieve the symbolic name and feature manifest version String symbolicName = de...
Create the ImmutableAttributes based on the contents read from a subsystem manifest .
589
15
162,641
static ImmutableAttributes loadAttributes ( String line , ImmutableAttributes cachedAttributes ) { // Builder pattern for Immutable attributes // This parses a cache line that looks like this: // repoType|symbolicName=Lots;of;attribtues int index = line . indexOf ( ' ' ) ; String key = line . substring ( 0 , index ) ; ...
Create the ImmutableAttributes based on an line in a cache file . There is no validation or warnings in this load path as it is assumed the definition would not have been added to the cache if it were invalid .
715
43
162,642
public final synchronized void commitDecrementReferenceCount ( PersistentTransaction transaction ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "commitDecrementReferenceCount" ) ; if ( _referenceCount < 1 ) { SevereMessageSto...
This method is called when committing the removal of a reference . It should only be called by the message store code .
363
23
162,643
public final synchronized void incrementReferenceCount ( ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "incrementReferenceCount" ) ; if ( _referenceCountIsDecreasing ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . ...
This method is called when a reference is being added by an active transaction and when a reference is being restored . It should only be called by the message store code .
219
33
162,644
public final synchronized void rollbackIncrementReferenceCount ( PersistentTransaction transaction ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "rollbackIncrementReferenceCount" ) ; if ( _referenceCount < 1 ) { SevereMessag...
This method is called when rolling back the addition of a reference . It should only be called by the message store code .
285
24
162,645
@ Override public void performFileBasedAction ( Collection < File > modifiedFiles ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "performFileBasedAction" , new Object [ ] { modifiedFiles } ) ; try { com . ibm . ws . ssl . config . KeyStoreManager . getInstance ( ) . cle...
The specified files have been modified and we need to clear the SSLContext caches and keystore caches . This will cause the new keystore file to get loaded on the next use of the ssl context . If the keystore associated with the SSLContext that the process is using then the process SSLContext needs to be reloaded .
290
66
162,646
protected void unsetFileMonitorRegistration ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "unsetFileMonitorRegistration" ) ; } if ( keyStoreFileMonitorRegistration != null ) { keyStoreFileMonitorRegistration . unregister ( ) ; keyStoreFileMonitorRegistration...
Remove the reference to the file monitor .
82
8
162,647
protected void setFileMonitorRegistration ( ServiceRegistration < FileMonitor > keyStoreFileMonitorRegistration ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "setFileMonitorRegistration" ) ; } this . keyStoreFileMonitorRegistration = keyStoreFileMonitorRegistr...
Sets the keystore file monitor registration .
74
9
162,648
private void createFileMonitor ( String ID , String keyStoreLocation , String trigger , long interval ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createFileMonitor" , new Object [ ] { ID , keyStoreLocation , trigger , interval } ) ; try { keyStoreFileMonitor = new S...
Handles the creation of the keystore file monitor .
245
11
162,649
protected void unsetKeyringMonitorRegistration ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "unsetKeyringMonitorRegistration" ) ; } if ( keyringMonitorRegistration != null ) { keyringMonitorRegistration . unregister ( ) ; keyringMonitorRegistration = null ;...
Remove the reference to the keyRing monitor .
81
9
162,650
protected void setKeyringMonitorRegistration ( ServiceRegistration < KeyringMonitor > keyringMonitorRegistration ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "setKeyringMonitorRegistration" ) ; } this . keyringMonitorRegistration = keyringMonitorRegistration ...
Sets the keyring monitor registration .
74
8
162,651
private void createKeyringMonitor ( String ID , String trigger , String keyStoreLocation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createKeyringMonitor" , new Object [ ] { ID , trigger } ) ; try { KeyringMonitor = new KeyringMonitorImpl ( this ) ; setKeyringMonito...
Handles the creation of the keyring monitor .
230
10
162,652
public static byte [ ] encodeDN ( Codec codec , String distinguishedName ) throws Exception { X500Principal issuer = new X500Principal ( distinguishedName ) ; X509CertSelector certSelector = new X509CertSelector ( ) ; certSelector . setIssuer ( issuer ) ; byte [ ] asnX501DN = certSelector . getIssuerAsBytes ( ) ; Any a...
Encode a distinguished name into a codec encoded ASN . 1 X501 encoded Distinguished Name .
129
20
162,653
public static String decodeDN ( Codec codec , byte [ ] encodedDN ) throws SASException { String dn = null ; try { Any any = codec . decode_value ( encodedDN , X501DistinguishedNameHelper . type ( ) ) ; byte [ ] asnX501DN = X501DistinguishedNameHelper . extract ( any ) ; X500Principal x500Principal = new X500Principal (...
Decode a distinguished name from an ASN . 1 X501 encoded Distinguished Name
161
17
162,654
private static String upperCaseIndexString ( String iiopName ) { StringBuilder StringBuilder = new StringBuilder ( ) ; for ( int i = 0 ; i < iiopName . length ( ) ; i ++ ) { char c = iiopName . charAt ( i ) ; if ( Character . isUpperCase ( c ) ) { StringBuilder . append ( ' ' ) . append ( i ) ; } } return StringBuilder...
Return the a string containing an underscore _ index of each uppercase character in the iiop name .
98
21
162,655
private static String replace ( String source , char oldChar , String newString ) { StringBuilder StringBuilder = new StringBuilder ( source . length ( ) ) ; for ( int i = 0 ; i < source . length ( ) ; i ++ ) { char c = source . charAt ( i ) ; if ( c == oldChar ) { StringBuilder . append ( newString ) ; } else { String...
Replaces any occurnace of the specified oldChar with the nes string .
103
17
162,656
private static String buildOverloadParameterString ( Class < ? > parameterType ) { String name = "_" ; int arrayDimensions = 0 ; while ( parameterType . isArray ( ) ) { arrayDimensions ++ ; parameterType = parameterType . getComponentType ( ) ; } // arrays start with org_omg_boxedRMI_ if ( arrayDimensions > 0 ) { name ...
Returns a single parameter type encoded using the Java to IDL rules .
318
14
162,657
private static String buildClassName ( Class < ? > type ) { if ( type . isArray ( ) ) { throw new IllegalArgumentException ( "type is an array: " + type ) ; } // get the classname String typeName = type . getName ( ) ; int endIndex = typeName . lastIndexOf ( ' ' ) ; if ( endIndex < 0 ) { return typeName ; } StringBuild...
Returns a string contianing an encoded class name .
270
11
162,658
public List < Persistence . PersistenceUnit > getPersistenceUnit ( ) { if ( persistenceUnit == null ) { persistenceUnit = new ArrayList < Persistence . PersistenceUnit > ( ) ; } return this . persistenceUnit ; }
Gets the value of the persistenceUnit property .
50
10
162,659
public final static PersistenceType getPersistenceType ( Byte aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Value = " + aValue ) ; return set [ aValue . intValue ( ) ] ; }
Returns the corresponding PersistenceType for a given Byte . This method should NOT be called by any code outside the MFP component . It is only public so that it can be accessed by sub - packages .
67
41
162,660
protected void register ( String [ ] specificPackageList ) { if ( TraceComponent . isAnyTracingEnabled ( ) && _tc . isEntryEnabled ( ) ) SibTr . entry ( _tc , "register" , new Object [ ] { this , specificPackageList } ) ; synchronized ( SibDiagnosticModule . class ) { if ( ! _registeredMasterDiagnosticModule ) { SibDia...
Register a subclass of this diagnostic module with FFDC
178
10
162,661
protected void captureDefaultInformation ( IncidentStream is , Throwable th ) { is . writeLine ( "Platform Messaging :: Messaging engine:" , SibTr . getMEName ( null ) ) ; // is.writeLine("Platform Messaging :: Release name: ", BuildInfo.getBuildRelease()); // is.writeLine("Platform Messaging :: Level name: ", BuildInf...
Capture the default information about the messaging engine exception etc .
298
11
162,662
public void ffdcDumpDefault ( Throwable t , IncidentStream is , Object callerThis , Object [ ] objs , String sourceId ) { is . writeLine ( "SIB FFDC dump for:" , t ) ; captureDefaultInformation ( is , t ) ; if ( callerThis != null ) { is . writeLine ( "SibDiagnosticModule :: Dump of callerThis (DiagnosticModule)" , toF...
Capture information about this problem into the incidentStream
234
9
162,663
public final String toFFDCString ( Object obj ) { if ( obj instanceof Map ) { return toFFDCString ( ( Map ) obj ) ; } else if ( obj instanceof Collection ) { return toFFDCString ( ( Collection ) obj ) ; } else if ( obj instanceof Object [ ] ) { return toFFDCString ( ( Object [ ] ) obj ) ; } return toFFDCStringSingleObj...
Generates a string representation of the object for FFDC . If the object is an Object Array Collection or Map the elements are inspected individually up to a maximum of multiple_object_count_to_ffdc
93
42
162,664
protected String toFFDCStringSingleObject ( Object obj ) { if ( obj == null ) { return "<null>" ; } else if ( obj instanceof Traceable ) { return ( ( Traceable ) obj ) . toTraceString ( ) ; } else if ( obj instanceof String ) { return ( ( String ) obj ) ; } else if ( obj instanceof byte [ ] ) { return toFFDCString ( ( ...
Generates a string representation of an object for FFDC .
109
12
162,665
public final String toFFDCString ( Collection aCollection ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( ' ' ) ; if ( aCollection == null ) { buffer . append ( "<null>" ) ; } else { Iterator i = aCollection . iterator ( ) ; boolean hasNext = i . hasNext ( ) ; int ctr = 0 ; while ( hasNext ) { Object...
Generates a String representation of a Collection calling toFFDCStringObject for the first multiple_object_count_to_ffdc elements
189
28
162,666
public final String toFFDCString ( Map aMap ) { StringBuffer buffer = new StringBuffer ( ) ; buffer . append ( ' ' ) ; if ( aMap == null ) { buffer . append ( "<null>" ) ; } else { Iterator i = aMap . entrySet ( ) . iterator ( ) ; boolean hasNext = i . hasNext ( ) ; int ctr = 0 ; while ( hasNext ) { Map . Entry entry =...
Generates a String representation of a Map calling toFFDCStringObject for the first multiple_object_count_to_ffdc elements
248
28
162,667
private boolean removeComments ( DocumentBuilder parser , Document doc ) { try { // Check for the traversal module DOMImplementation impl = parser . getDOMImplementation ( ) ; if ( ! impl . hasFeature ( "traversal" , "2.0" ) ) { // DOM implementation does not support traversal unable to remove comments return false ; }...
Removes all comments from the document except for the Properties comment All exceptions are suppressed because this is just a nicety to improve human readability .
200
29
162,668
public static void nodeListRemoveAll ( Element xEml , NodeList nodes ) { int cnt = nodes . getLength ( ) ; for ( int i = 0 ; i < cnt ; i ++ ) xEml . removeChild ( nodes . item ( 0 ) ) ; }
Removes all nodes contained in the NodeList from the Element . Convenience method because NodeList objects in the DOM are live .
60
27
162,669
private ServiceRegistration < ? > registerMBeanService ( String jmsResourceName , BundleContext bundleContext ) { Dictionary < String , String > props = new Hashtable < String , String > ( ) ; props . put ( KEY_SERVICE_VENDOR , "IBM" ) ; JmsServiceProviderMBeanImpl jmsProviderMBean = new JmsServiceProviderMBeanImpl ( g...
Registers MBean for JMSServiceProvider .. in future can be made generic .
218
19
162,670
private static Object invokeDefaultMethodUsingPrivateLookup ( Class < ? > declaringClass , Object o , Method m , Object [ ] params ) throws WrappedException , NoSuchMethodException { try { final Method privateLookup = MethodHandles . class . getDeclaredMethod ( "privateLookupIn" , Class . class , MethodHandles . Lookup...
For JDK 9 + we could use MethodHandles . privateLookupIn which is not available in JDK 8 .
166
25
162,671
@ Override public WsByteBuffer buildFrameForWrite ( ) { WsByteBuffer [ ] output = buildFrameArrayForWrite ( ) ; int size = 0 ; for ( WsByteBuffer b : output ) { if ( b != null ) { size += b . remaining ( ) ; } } WsByteBuffer singleBuffer = this . getBuffer ( size ) ; singleBuffer . put ( output ) ; singleBuffer . flip ...
The test code expects a single buffer instead of an array of buffers as returned by buildFrameArrayForWrite
99
21
162,672
public EJSHome create ( BeanMetaData beanMetaData ) throws RemoteException { J2EEName name = beanMetaData . j2eeName ; HomeRecord hr = beanMetaData . homeRecord ; StatelessBeanO homeBeanO = null ; EJSHome result = null ; try { result = ( EJSHome ) beanMetaData . homeBeanClass . newInstance ( ) ; homeBeanO = ( Stateless...
Create a new EJSHome instance .
244
9
162,673
public void addHome ( BeanMetaData bmd ) // F743-26072 throws RemoteException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addHome : " + bmd . j2eeName ) ; if ( homesByName . get ( bmd . j2eeName ) != null ) { throw new DuplicateHo...
LIDB859 - 4 d429866 . 2
617
12
162,674
private void updateAppLinkData ( AppLinkData linkData , boolean add , J2EEName j2eeName , BeanMetaData bmd ) // F743-26072 { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "updateAppLinkData: " + j2eeName + ", add=" + add ) ; int numBea...
Updates the EJB - link and auto - link data for a bean .
445
16
162,675
private static < T > void updateAppLinkDataTable ( Map < String , Set < T > > table , boolean add , String key , T value , String tracePrefix ) // F743-26072 { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; Set < T > values = table . get ( key ) ; if ( add ) { if ( isTraceOn && tc . isDebugEnabled...
Updates a map from name to set of values .
341
11
162,676
private void updateAutoLink ( AppLinkData linkData , boolean add , J2EEName j2eeName , BeanMetaData bmd ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "updateAutoLink" ) ; String module = j2eeName . getModule ( ) ; String beanInterf...
d429866 . 2
790
5
162,677
@ Override public BeanO createBeanO ( EJBThreadData threadData , ContainerTx tx , BeanId id ) throws RemoteException { J2EEName homeKey = id . getJ2EEName ( ) ; // d366845.3 HomeRecord hr = homesByName . get ( homeKey ) ; // d366845.3 BeanO result = null ; // d199071 if ( hr != null ) { // d199071 result = hr . beanO ;...
Added ContainerTx d168509
352
6
162,678
@ Override public String getEnterpriseBeanClassName ( Object homeKey ) { HomeRecord hr = homesByName . get ( homeKey ) ; // d366845.3 return hr . homeInternal . getEnterpriseBeanClassName ( homeKey ) ; }
Return the name of the class that implements the bean s owned by the given home .
58
17
162,679
public Object resolveVariable ( String pName ) throws ELException { ELContext ctx = this . getELContext ( ) ; return ctx . getELResolver ( ) . getValue ( ctx , null , pName ) ; }
LIDB4147 - 9 Begin - modified for JSP 2 . 1
51
16
162,680
private void copyTagToPageScope ( int scope ) { Iterator iter = null ; switch ( scope ) { case VariableInfo . NESTED : if ( nestedVars != null ) { iter = nestedVars . iterator ( ) ; } break ; case VariableInfo . AT_BEGIN : if ( atBeginVars != null ) { iter = atBeginVars . iterator ( ) ; } break ; case VariableInfo . AT...
Copies the variables of the given scope from the virtual page scope of this JSP context wrapper to the page scope of the invoking JSP context .
214
30
162,681
private void saveNestedVariables ( ) { if ( nestedVars != null ) { Iterator iter = nestedVars . iterator ( ) ; while ( iter . hasNext ( ) ) { String varName = ( String ) iter . next ( ) ; varName = findAlias ( varName ) ; Object obj = invokingJspCtxt . getAttribute ( varName ) ; if ( obj != null ) { originalNestedVars ...
Saves the values of any NESTED variables that are present in the invoking JSP context so they can later be restored .
105
26
162,682
private void restoreNestedVariables ( ) { if ( nestedVars != null ) { Iterator iter = nestedVars . iterator ( ) ; while ( iter . hasNext ( ) ) { String varName = ( String ) iter . next ( ) ; varName = findAlias ( varName ) ; Object obj = originalNestedVars . get ( varName ) ; if ( obj != null ) { invokingJspCtxt . setA...
Restores the values of any NESTED variables in the invoking JSP context .
126
17
162,683
public RangeObject getNext ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getNext" , Integer . valueOf ( cursor ) ) ; int curr = cursor ; cursor = cursor < ( blockVector . size ( ) - 1 ) ? cursor + 1 : cursor ; if ( TraceComponent . isAnyTracingEnabled ( ) ...
Returns the next range object
153
5
162,684
public void replacePrefix ( RangeObject w ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "replacePrefix" , w ) ; long lstamp = w . endstamp ; // Set index to position of lstamp. int lindex ; RangeObject lastro ; for ( lindex = 0 ; ; lindex ++ ) { lastro = ( Ra...
return a list of RangeObjects that are removed
370
10
162,685
protected final int getIndex ( long stamp ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getIndex" , Long . valueOf ( stamp ) ) ; int first = 0 ; int last = blockVector . size ( ) ; int index = linearSearch ( stamp , first , last - 1 ) ; if ( TraceComponent ....
gets the index in blockVector for the RangeObject containing stamp
126
12
162,686
protected void handleJwtRequest ( HttpServletRequest request , HttpServletResponse response , ServletContext servletContext , JwtConfig jwtConfig , EndpointType endpointType ) throws IOException { if ( jwtConfig == null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "No JwtConfig object provided" ) ; } return ;...
Handle the request for the respective endpoint to which the request was directed .
366
14
162,687
private boolean isTransportSecure ( HttpServletRequest req ) { String url = req . getRequestURL ( ) . toString ( ) ; if ( req . getScheme ( ) . equals ( "https" ) ) { return true ; } String value = req . getHeader ( "X-Forwarded-Proto" ) ; if ( value != null && value . toLowerCase ( ) . equals ( "https" ) ) { return tr...
determine if transport is secure . Either the protocol must be https or we must see a forwarding header that indicates it was https upstream of a proxy . Use of a configuration property to allow plain http was rejected in review .
102
45
162,688
private void processTokenRequest ( HttpServletResponse response , JwtConfig jwtConfig ) throws IOException { String tokenString = new TokenBuilder ( ) . createTokenString ( jwtConfig ) ; addNoCacheHeaders ( response ) ; response . setStatus ( 200 ) ; if ( tokenString == null ) { return ; } try { PrintWriter pw = respon...
produces a JWT token based upon the jwt Configuration and the security credentials of the authenticated user that called this method . Returns the token as JSON in the response .
204
34
162,689
private void processJWKRequest ( HttpServletResponse response , JwtConfig jwtConfig ) throws IOException { /* * if (!jwtConfig.isJwkEnabled()) { String errorMsg = * Tr.formatMessage(tc, "JWK_ENDPOINT_JWK_NOT_ENABLED", new Object[] { * jwtConfig.getId() }); Tr.error(tc, errorMsg); * response.sendError(HttpServletRespons...
Obtains the JWK string that is active in the specified config and prints it in JSON format in the response . If a JWK is not found the response will be empty .
430
38
162,690
protected void addNoCacheHeaders ( HttpServletResponse response ) { String cacheControlValue = response . getHeader ( WebConstants . HEADER_CACHE_CONTROL ) ; if ( cacheControlValue != null && ! cacheControlValue . isEmpty ( ) ) { cacheControlValue = cacheControlValue + ", " + WebConstants . CACHE_CONTROL_NO_STORE ; } e...
Adds header values to avoid caching of the provided response .
171
11
162,691
protected void activate ( ) throws Exception { // If the ProbeProxy class is available, check it's version String runtimeVersion = getRuntimeClassVersion ( ) ; if ( runtimeVersion != null && ! runtimeVersion . equals ( getCurrentVersion ( ) ) ) { // TODO: Use a compatibility check instead throw new IllegalStateExceptio...
Activate this declarative services component . Bundles that are currently active will be examined for monitoring metadata and registered as appropriate .
178
26
162,692
@ FFDCIgnore ( Exception . class ) String getRuntimeClassVersion ( ) { String runtimeVersion = null ; try { Class < ? > clazz = Class . forName ( PROBE_PROXY_CLASS_NAME ) ; Field version = ReflectionHelper . getDeclaredField ( clazz , VERSION_FIELD_NAME ) ; runtimeVersion = ( String ) version . get ( null ) ; } catch (...
Determine if the boot delegated proxy is already available and if so what its version is .
99
19
162,693
JarFile getBootProxyJarIfCurrent ( ) { File dataFile = bundleContext . getDataFile ( "boot-proxy.jar" ) ; if ( ! dataFile . exists ( ) ) { return null ; } JarFile jarFile = null ; try { jarFile = new JarFile ( dataFile ) ; Manifest manifest = jarFile . getManifest ( ) ; Attributes attrs = manifest . getMainAttributes (...
Get the boot proxy jar from the current data area if the code matches the current bundle version .
157
19
162,694
JarFile createBootProxyJar ( ) throws IOException { File dataFile = bundleContext . getDataFile ( "boot-proxy.jar" ) ; // Create the file if it doesn't already exist if ( ! dataFile . exists ( ) ) { dataFile . createNewFile ( ) ; } // Generate a manifest Manifest manifest = createBootJarManifest ( ) ; // Create the fil...
Create a jar file that contains the proxy code that will live in the boot delegation package .
315
18
162,695
public void createDirectoryEntries ( JarOutputStream jarStream , String packageName ) throws IOException { StringBuilder entryName = new StringBuilder ( packageName . length ( ) ) ; for ( String str : packageName . split ( "\\." ) ) { entryName . append ( str ) . append ( "/" ) ; JarEntry jarEntry = new JarEntry ( entr...
Create the jar directory entries corresponding to the specified package name .
99
12
162,696
private void writeRemappedClass ( URL classUrl , JarOutputStream jarStream , String targetPackage ) throws IOException { InputStream inputStream = classUrl . openStream ( ) ; String sourceInternalName = getClassInternalName ( classUrl ) ; String targetInternalName = getTargetInternalName ( sourceInternalName , targetPa...
Transform the proxy template class that s in this package into a class that s in a package on the framework boot delegation package list .
236
26
162,697
String getTargetInternalName ( String sourceInternalName , String targetPackage ) { StringBuilder targetInternalName = new StringBuilder ( ) ; targetInternalName . append ( targetPackage . replaceAll ( "\\." , "/" ) ) ; int lastSlashIndex = sourceInternalName . lastIndexOf ( ' ' ) ; targetInternalName . append ( source...
Get the class internal name that should be used where moving the internal class across packages .
98
17
162,698
void activateProbeProxyTarget ( ) throws Exception { Method method = ReflectionHelper . getDeclaredMethod ( probeManagerImpl . getClass ( ) , ProbeMethodAdapter . FIRE_PROBE_METHOD_NAME , long . class , Object . class , Object . class , Object . class ) ; ReflectionHelper . setAccessible ( method , true ) ; if ( ! Type...
Hook up the monitoring boot proxy delegate .
155
9
162,699
@ Override public void setWebApp ( com . ibm . ws . webcontainer . webapp . WebApp webApp ) { super . setWebApp ( ( WebApp ) webApp ) ; }
Override to ensure all WebApp are osgi . WebApp .
44
13