idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
159,200
public static boolean isCharsetSupported ( String charset ) { Boolean supported = ( Boolean ) supportedEncodingsCache . get ( charset ) ; if ( supported != null ) { return supported . booleanValue ( ) ; } try { new String ( TEST_CHAR , charset ) ; supportedEncodingsCache . put ( charset , Boolean . TRUE ) ; } catch ( U...
rewritten as part of PK13492
192
8
159,201
public static < T > boolean compareInstance ( T t1 , T t2 ) { if ( t1 == t2 ) { return true ; } if ( t1 != null && t2 != null && t1 . equals ( t2 ) ) { return true ; } return false ; }
Compare tow instance . If both are null still equal
61
10
159,202
public static boolean compareStrings ( String s1 , String s2 ) { if ( s1 == s2 ) return true ; if ( s1 != null && s2 != null && s1 . equals ( s2 ) ) return true ; return false ; }
Compares two strings for equality . Either or both of the values may be null .
55
17
159,203
public static boolean compareQNames ( QName qn1 , QName qn2 ) { if ( qn1 == qn2 ) return true ; if ( qn1 == null || qn2 == null ) return false ; return qn1 . equals ( qn2 ) ; }
Compares two QNames for equality . Either or both of the values may be null .
63
18
159,204
public static boolean compareStringLists ( List < String > list1 , List < String > list2 ) { if ( list1 == null && list2 == null ) return true ; if ( list1 == null || list2 == null ) return false ; if ( list1 . size ( ) != list2 . size ( ) ) return false ; for ( int i = 0 ; i < list1 . size ( ) ; i ++ ) { if ( ! compar...
Compares two lists of strings for equality .
126
9
159,205
public static boolean compareQNameLists ( List < QName > list1 , List < QName > list2 ) { if ( list1 == list2 ) return true ; if ( list1 == null || list2 == null ) return false ; if ( list1 . size ( ) != list2 . size ( ) ) return false ; for ( int i = 0 ; i < list1 . size ( ) ; i ++ ) { if ( ! compareQNames ( list1 . g...
Compares two lists of QNames for equality .
123
10
159,206
public static < T > boolean compareLists ( List < T > list1 , List < T > list2 ) { if ( list1 == list2 ) return true ; if ( list1 == null || list2 == null ) return false ; if ( list1 . size ( ) != list2 . size ( ) ) return false ; for ( int i = 0 ; i < list1 . size ( ) ; i ++ ) { if ( ! list1 . get ( i ) . equals ( lis...
Compare two lists
122
3
159,207
public boolean preProcess ( ConfigEntry configEntry ) { boolean valid = true ; // there is no override, use the default processorData if ( configEntry . processorData == null ) configEntry . processorData = new Object [ BASE_SLOTS ] ; //persistToDisk Property p = ( Property ) configEntry . properties . get ( PROPERTY_P...
preprocess any data
261
4
159,208
public JSConsumerSet getConsumerSet ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getConsumerSet" ) ; SibTr . exit ( tc , "getConsumerSet" , consumerSet ) ; } return consumerSet ; }
Returns the consumerSet .
73
5
159,209
public long size ( Transaction transaction ) throws ObjectManagerException { // No trace because this is used by toString(), and hence by trace itself; long sizeFound ; // For return; synchronized ( this ) { sizeFound = availableSize ; // Move through the map adding in any extra available entries. if ( transaction != n...
Returns the number of key - value mappings in this map which ara available to the transaction .
145
20
159,210
public synchronized boolean isEmpty ( Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "isEmpty" , new Object [ ] { transaction } ) ; boolean returnValue ; if ( firstEntry ( transaction ) == null ) { returnVa...
Determines if the tree is empty as viewed by the transaction . Returns true if there are no entries visible to the transaction and false if there are entries visible .
141
33
159,211
private Entry getEntry ( Object key ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getEntry" , new Object [ ] { key } ) ; Entry entry = ( Entry ) super . find ( key ) ; if ( entry != null ) { // Look for the youngest duplicate. d...
Returns the first Entry matching the key or null if the map does not contain an entry for the key . The entry returned may be uncommited .
197
30
159,212
public synchronized void putDuplicate ( Object key , Token value , Transaction transaction ) throws ObjectManagerException { put ( key , value , transaction , true ) ; }
Associates the specified value with the specified key in this map . If the map previously contained a mapping for this key the old value is left alone and a new one added .
34
36
159,213
private void add ( Object key , Token value , Entry currentEntry , Transaction transaction , long logSpaceDelta ) throws ObjectManagerException { final String methodName = "add" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { key , v...
Add a new value to the tree at a point where they key is after all less than or equal keys and below the currentEntry .
526
27
159,214
private void undoPut ( ) throws ObjectManagerException { final String methodName = "undoPut" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; // Give back all of the remaining space. owningToken . objectStore . reserve ( ( int ) - reservedSpaceInSto...
Reverse the action of addition to the map used after an add has failed to log anything .
119
20
159,215
public synchronized void clear ( Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "clear" + "transaction=" + transaction + "(Transaction)" ) ; // Move through the map deleting each entry as we go. Entry entry...
Removes all mappings from this TreeMap which are visible to the transaction . Actual deletion of the entries takes place when the transaction commits .
147
28
159,216
private int compare ( Object key1 , Object key2 ) { if ( comparator == null ) return ( ( Comparable ) key1 ) . compareTo ( key2 ) ; else return comparator . compare ( key1 , key2 ) ; }
Use the comparator to compare the two keys .
52
10
159,217
private synchronized void deleteEntry ( Entry entry , Transaction transaction ) throws ObjectManagerException { final String methodName = "deleteEntry" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { entry , transaction } ) ; // mana...
Finalise removal of an Entry from the tree .
379
10
159,218
void move ( AbstractTreeMap . Entry x , AbstractTreeMap . Entry y ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "move" , new Object [ ] { x , y } ) ; Entry yParent = ( Entry ) y . getParent ( ) ; // Set x into the position occupie...
Move x to occupy the position currently held by y .
289
11
159,219
public synchronized void print ( java . io . PrintWriter printWriter ) { printWriter . println ( "Dump of TreeMap size=" + size + "(long)" ) ; try { for ( Iterator iterator = entrySet ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { Entry entry = ( Entry ) iterator . next ( ) ; printWriter . println ( ( indexLabel ( e...
Print a dump of the Map .
182
7
159,220
public static boolean containsMultipleRoutingContext ( RESTRequest request ) { //TODO: add a check for query string if ( request instanceof ServletRESTRequestWithParams ) { ServletRESTRequestWithParams req = ( ServletRESTRequestWithParams ) request ; return ( req . getParam ( ClientProvider . COLLECTIVE_HOST_NAMES ) !=...
Quick check for multiple - target routing context without actually fetching all pieces
131
14
159,221
public static String [ ] getRoutingContext ( RESTRequest request , boolean errorIfNull ) { //Look for headers first String targetHost = request . getHeader ( ClientProvider . ROUTING_KEY_HOST_NAME ) ; if ( targetHost != null ) { targetHost = URLDecoder ( targetHost , null ) ; String targetUserDir = request . getHeader ...
This helper method looks for the routing keys in the HTTP headers first and then fallsback into looking at the query string .
799
24
159,222
public static boolean isDefaultAttributeValue ( Object value ) { if ( value == null ) { return true ; } else if ( value instanceof Boolean ) { return ! ( ( Boolean ) value ) . booleanValue ( ) ; } else if ( value instanceof Number ) { if ( value instanceof Integer ) { return ( ( Number ) value ) . intValue ( ) == Integ...
See JSF Spec . 8 . 5 Table 8 - 1
234
12
159,223
public static Converter findUIOutputConverter ( FacesContext facesContext , UIOutput component ) throws FacesException { return _SharedRendererUtils . findUIOutputConverter ( facesContext , component ) ; }
Find the proper Converter for the given UIOutput component .
48
12
159,224
public static Converter findUISelectManyConverter ( FacesContext facesContext , UISelectMany component ) { return findUISelectManyConverter ( facesContext , component , false ) ; }
Calls findUISelectManyConverter with considerValueType = false .
44
17
159,225
public static Converter findUISelectManyConverter ( FacesContext facesContext , UISelectMany component , boolean considerValueType ) { // If the component has an attached Converter, use it. Converter converter = component . getConverter ( ) ; if ( converter != null ) { return converter ; } if ( considerValueType ) { //...
Find proper Converter for the entries in the associated Collection or array of the given UISelectMany as specified in API Doc of UISelectMany . If considerValueType is true the valueType attribute will be used in addition to the standard algorithm to get a valid converter .
597
56
159,226
public static Set getSelectedValuesAsSet ( FacesContext context , UIComponent component , Converter converter , UISelectMany uiSelectMany ) { Object selectedValues = uiSelectMany . getValue ( ) ; return internalSubmittedOrSelectedValuesAsSet ( context , component , converter , uiSelectMany , selectedValues , true ) ; }
Convenient utility method that returns the currently selected values of a UISelectMany component as a Set of which the contains method can then be easily used to determine if a value is currently selected . Calling the contains method of this Set with the item value as argument returns true if this item is selected .
77
60
159,227
public static String getConvertedStringValue ( FacesContext context , UIComponent component , Converter converter , Object value ) { if ( converter == null ) { if ( value == null ) { return "" ; } else if ( value instanceof String ) { return ( String ) value ; } else { return value . toString ( ) ; } } return converter...
Convenient utility method that returns the currently given value as String using the given converter . Especially usefull for dealing with primitive types .
88
26
159,228
public static String getConvertedStringValue ( FacesContext context , UIComponent component , Converter converter , SelectItem selectItem ) { return getConvertedStringValue ( context , component , converter , selectItem . getValue ( ) ) ; }
Convenient utility method that returns the currently given SelectItem value as String using the given converter . Especially usefull for dealing with primitive types .
52
28
159,229
public static Object getConvertedUISelectManyValue ( FacesContext facesContext , UISelectMany selectMany , Object submittedValue , boolean considerValueType ) throws ConverterException { if ( submittedValue == null ) { return null ; } if ( ! ( submittedValue instanceof String [ ] ) ) { throw new ConverterException ( "S...
Gets the converted value of a UISelectMany component .
137
13
159,230
public static void initPartialValidationAndModelUpdate ( UIComponent component , FacesContext facesContext ) { String actionFor = ( String ) component . getAttributes ( ) . get ( "actionFor" ) ; if ( actionFor != null ) { List li = convertIdsToClientIds ( actionFor , facesContext , component ) ; facesContext . getExter...
check for partial validation or model update attributes being set and initialize the request - map accordingly . SubForms will work with this information .
184
27
159,231
@ Deprecated public static ResponseStateManager getResponseStateManager ( FacesContext facesContext , String renderKitId ) throws FacesException { RenderKit renderKit = facesContext . getRenderKit ( ) ; if ( renderKit == null ) { // look for the renderkit in the request Map attributesMap = facesContext . getAttributes ...
Gets the ResponseStateManager for the renderKit Id provided
259
12
159,232
static public String toResourceUri ( FacesContext facesContext , Object o ) { if ( o == null ) { return null ; } String uri = o . toString ( ) ; // *** EL Coercion problem *** // If icon or image attribute was declared with #{resource[]} and that expression // evaluates to null (it means ResourceHandler.createResource ...
Coerces an object into a resource URI calling the view - handler .
334
15
159,233
public final static String trim ( String value ) { String result = null ; if ( null != value ) { result = value . trim ( ) ; } return result ; }
remove the blank characters in the left and right for a given value .
35
14
159,234
protected void customizeClientProperties ( Message message ) { if ( null == configPropertiesSet ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "There are no client properties." ) ; } return ; } Bus bus = message . getExchange ( ) . getBus ( ) ; if ( null == bus ) { if...
Customize the client properties .
199
6
159,235
protected void customizePortAddress ( Message message ) { String address = null ; PortComponentRefInfo portInfo = null ; if ( null != wsrInfo ) { QName portQName = getPortQName ( message ) ; if ( null != portQName ) { portInfo = wsrInfo . getPortComponentRefInfo ( portQName ) ; address = ( null != portInfo && null != p...
Customize the port address
196
5
159,236
private static String discoverClassName ( ClassLoader tccl ) { String className = null ; // First services API className = getClassNameServices ( tccl ) ; if ( className == null ) { if ( IS_SECURITY_ENABLED ) { className = AccessController . doPrivileged ( new PrivilegedAction < String > ( ) { @ Override public String ...
Discover the name of class that implements ExpressionFactory .
241
10
159,237
private static void addBundleManifestRequireCapability ( FileSystem zipSystem , Path bundle , Map < Path , String > requiresMap ) throws IOException { Path extractedJar = null ; try { // Need to extract the bundles to read their manifest, can't find a way to do this in place. extractedJar = Files . createTempFile ( "un...
Adds the Require - Capability Strings from a bundle jar to the Map of Require - Capabilities found
286
23
159,238
private static void addSubsystemManifestRequireCapability ( File esa , Map < Path , String > requiresMap ) throws IOException { String esaLocation = esa . getAbsolutePath ( ) ; ZipFile zip = null ; try { zip = new ZipFile ( esaLocation ) ; Enumeration < ? extends ZipEntry > zipEntries = zip . entries ( ) ; ZipEntry sub...
Adds the Require - Capability Strings from a SUBSYSTEM . MF to the Map of Require - Capabilities found
274
27
159,239
@ Override public void filter ( ClientRequestContext requestContext ) { // if ( requestContext == null || jwt == null || requestContext . getHeaders ( ) . containsKey ( "Authorization" ) ) { return ; } if ( header == null || header . equals ( "" ) ) { header = "Authorization" ; } final String headerValue ; if ( "Author...
Adds the JWT token to the Authorization header in the jax - rs client requests to propagate the token .
128
22
159,240
public static String urlDecode ( String value , String enc ) { return urlDecode ( value , enc , false ) ; }
Decodes using URLDecoder - use when queries or form post values are decoded
27
17
159,241
public static String pathDecode ( String value ) { return urlDecode ( value , StandardCharsets . UTF_8 . name ( ) , true ) ; }
URL path segments may contain + symbols which should not be decoded into This method replaces + with %2B and delegates to URLDecoder
35
28
159,242
public static Map < String , String > parseQueryString ( String s ) { Map < String , String > ht = new HashMap < String , String > ( ) ; StringTokenizer st = new StringTokenizer ( s , "&" ) ; while ( st . hasMoreTokens ( ) ) { String pair = st . nextToken ( ) ; int pos = pair . indexOf ( ' ' ) ; if ( pos == - 1 ) { ht ...
Create a map from String to String that represents the contents of the query portion of a URL . For each x = y x is the key and y is the value .
152
34
159,243
public static String getStem ( String baseURI ) { int idx = baseURI . lastIndexOf ( ' ' ) ; String result = baseURI ; if ( idx != - 1 ) { result = baseURI . substring ( 0 , idx ) ; } return result ; }
Return everything in the path up to the last slash in a URI .
61
14
159,244
private synchronized CacheEntryWrapper updateCacheList ( Object key ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINER ) ) { LoggingUtil . SESSION_LOGGER_CORE . entering ( methodClassName , methodNames [ UPDATE_CACHE_LIST ] , "key=...
remove the input entry from it s spot in the list and make it the mru
316
17
159,245
public SICoreConnection getSICoreConnection ( ) throws IllegalStateException { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "getSICoreConnection" ) ; } if ( _sessionClosed ) { throw new IllegalStateException ( NLS . getFormattedMessage ( ( "ILLEGAL_STATE...
A convenience method that returns the core connection associated with this session s connection .
259
15
159,246
void dissociate ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "dissociate" ) ; } _managedConnection = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , "dissociate" ) ; } }
Dissociates this session from its current managed connection .
97
12
159,247
void associate ( final JmsJcaManagedConnection managedConnection ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "associate" , managedConnection ) ; } if ( _managedConnection != null ) { _managedConnection . disassociateSession ( this ) ; } _managedConn...
Associates this session with a new managed connection .
130
11
159,248
void invalidate ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "invalidate" ) ; } _sessionInvalidated = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , "invalidate" ) ; } }
Marks this session as invalid .
98
7
159,249
void setParentConnection ( final JmsJcaConnectionImpl connection ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "setParentConnection" , connection ) ; } _connection = connection ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ...
Sets the parent connection for this session .
107
9
159,250
private void addJCDIInterceptors ( ) { // Must be in a JCDI enabled module, and not a ManagedBean JCDIHelper jcdiHelper = ivEJBModuleMetaDataImpl . ivJCDIHelper ; if ( jcdiHelper != null && ! ivBmd . isManagedBean ( ) ) // F743-34301.1 { // Obtain the interceptor to start the interceptor chain. F743-29169 J2EEName j2ee...
F743 - 15628 d649636
413
10
159,251
private List < String > addLoadedInterceptorClasses ( Class < ? > [ ] classes ) // d630717 { List < String > names = new ArrayList < String > ( ) ; for ( Class < ? > klass : classes ) { String className = klass . getName ( ) ; ivInterceptorNameToClassMap . put ( className , klass ) ; names . add ( className ) ; } retur...
Adds a class to the list of loaded classes . getInterceptorProxies relies on every interceptor class either being added via updateNamesToClassMap or this method .
96
35
159,252
private ArrayList < String > addMethodLevelInterceptors ( Method method , EJBInterceptorBinding methodBinding ) throws EJBConfigurationException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addMethodLevelInterceptors method: " + ...
d367572 . 9 updated for xml and metadata - complete .
515
14
159,253
private void updateEJBMethodInfoInterceptorProxies ( ) // d386227 throws EJBConfigurationException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "updateEJBMethodInfoInterceptorProxies: " + ivEjbName ) ; } // For each method, update...
d367572 . 9 updated for xml
484
9
159,254
private InterceptorProxy [ ] getAroundInterceptorProxies ( InterceptorMethodKind kind , Method m ) throws EJBConfigurationException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getAroundInterceptorProxies: " + kind + ", " + m ) ;...
Get the array of InterceptorProxy objects required for invoking the AroundInvoke or AroundTimeout interceptors methods when a method is invoked .
241
27
159,255
private void processBeanInterceptors ( ) // d630717 throws EJBConfigurationException { ivBeanInterceptorProxyMap = createInterceptorProxyMap ( ivEjbClass , - 1 ) ; // F743-1751 - Not all bean types collect bean methods. For those // that do, find the methods that are declared on the bean. if ( ivBeanLifecycleMethods !=...
Processes interceptor methods on the bean class .
277
10
159,256
private ArrayList < String > orderClassLevelInterceptors ( ) throws EJBConfigurationException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "orderClassLevelInterceptors" ) ; } // Create the default ordering of class level intercept...
Get an ordered list of class level interceptors to be used for this EJB .
676
17
159,257
@ Override public boolean containsCacheId ( Object cacheId ) { boolean found = false ; if ( cacheId != null ) { found = this . coreCache . containsCacheId ( cacheId ) ; } return found ; }
Returns true if memory cache contains a mapping for the specified cache ID .
47
14
159,258
@ Override public com . ibm . websphere . cache . CacheEntry getEntryFromMemory ( Object id ) { final String methodName = "getEntryFromMemory()" ; com . ibm . websphere . cache . CacheEntry ce = this . coreCache . get ( id ) ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + "...
This returns the cache entry from memory cache identified by the specified cache id . It returns null if not in the cache .
111
24
159,259
@ Override public Enumeration getAllIds ( ) { Set ids = this . coreCache . getCacheIds ( ) ; ValueSet idvs = new ValueSet ( ids . iterator ( ) ) ; return idvs . elements ( ) ; }
Returns an enumeration view of the cache IDs contained in the memory cache .
56
15
159,260
@ Override public void internalInvalidateByDepId ( Object id , int causeOfInvalidation , int source , boolean bFireIL ) { final String methodName = "internalInvalidateByDepId()" ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " id=" + id ) ; } this . invalidateExternalCache...
This invalidates all entries in this Cache having a dependency on this dependency id .
112
16
159,261
@ Override public void invalidateByTemplate ( String template , boolean waitOnInvalidation ) { final String methodName = "invalidateByTemplate()" ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " template=" + template ) ; } this . invalidateExternalCaches ( null , template ...
This invalidates all entries in this Cache having a dependency on this template .
102
15
159,262
@ Override public void addAlias ( Object key , Object [ ] aliasArray , boolean askPermission , boolean coordinate ) { final String methodName = "addAlias()" ; if ( this . featureSupport . isAliasSupported ( ) ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " ERROR because...
Adds an alias for the given key in the cache s mapping table . If the alias is already associated with another key it will be changed to associate with the new key .
132
34
159,263
@ Override public void removeAlias ( Object alias , boolean askPermission , boolean coordinate ) { final String methodName = "removeAlias()" ; if ( this . featureSupport . isAliasSupported ( ) ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " ERROR because it is not imple...
Removes an alias from the cache mapping .
126
9
159,264
@ Override public List getCacheIdsInPushPullTable ( ) { final String methodName = "getCacheIdsInPushPullTable()" ; List list = new ArrayList ( ) ; if ( this . featureSupport . isReplicationSupported ( ) ) { // TODO write code to support getCacheIdsInPushPullTable function if ( tc . isDebugEnabled ( ) ) { Tr . debug ( t...
Returns all of the cache IDs in the PushPullTable
155
11
159,265
@ Override public boolean shouldPull ( int share , Object id ) { final String methodName = "shouldPull()" ; boolean shouldPull = false ; if ( this . featureSupport . isReplicationSupported ( ) ) { // TODO write code to support shouldPull function //if (tc.isDebugEnabled()) { // Tr.debug(tc, methodName + " cacheName=" +...
Return to indicate the entry can be pulled from other remote caches which caching this value .
136
17
159,266
@ Override public int getDepIdsSizeDisk ( ) { final String methodName = "getDepIdsSizeDisk()" ; if ( this . swapToDisk ) { // TODO write code to support getDepIdsSizeDisk function if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " ERROR because it is not implemented yet" ) ; }...
Returns the current dependency IDs size for the disk cache .
201
11
159,267
@ Override public Exception getDiskCacheException ( ) { final String methodName = "getDiskCacheException()" ; Exception ex = null ; if ( this . swapToDisk ) { // TODO write code to support getDiskCacheException function if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName + " ERROR ...
Returns the exception object from the disk cache because disk cache reported the error .
200
15
159,268
@ Override public void resetPMICounters ( ) { // TODO needs to change if cache provider supports PMI counters. final String methodName = "resetPMICounters()" ; if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , methodName + " cacheName=" + cacheName ) ; } }
This method needs to change if cache provider supports PMI counters .
70
13
159,269
@ Override public void updateStatisticsForVBC ( com . ibm . websphere . cache . CacheEntry cacheEntry , boolean directive ) { // TODO needs to change if cache provider supports PMI and CacheStatisticsListener final String methodName = "updateStatisticsForVBC()" ; Object id = null ; if ( cacheEntry != null ) { id = cach...
This method needs to change if cache provider supports PMI and CacheStatisticsListener .
129
16
159,270
private static String reduceStringLiteralToken ( String image ) { // First, remove leading and trailing ' character image = image . substring ( 1 , image . length ( ) - 1 ) ; // Next, de-double any doubled occurances of the ' character for ( int i = 0 ; i < image . length ( ) ; i ++ ) if ( image . charAt ( i ) == ' ' )...
processing characters in the image
135
5
159,271
static Selector parseIntegerLiteral ( String val ) { // Determine if this is a long constant by checking the suffix char tag = val . charAt ( val . length ( ) - 1 ) ; boolean mustBeLong = false ; if ( tag == ' ' || tag == ' ' ) { val = val . substring ( 0 , val . length ( ) - 1 ) ; mustBeLong = true ; } long longVal = ...
Parse an integer literal
161
5
159,272
static Selector parseFloatingLiteral ( String val ) { // Determine if this is a float constant by checking the suffix Number value ; // was NumericValue char tag = val . charAt ( val . length ( ) - 1 ) ; if ( tag == ' ' || tag == ' ' ) value = new Float ( val ) ; else value = new Double ( val ) ; return new LiteralImpl...
Parse a floating point literal
91
6
159,273
static Selector convertSet ( Selector expr , List set ) { Selector ans = null ; for ( int i = 0 ; i < set . size ( ) ; i ++ ) { Selector comparand = ( Selector ) set . get ( i ) ; Selector comparison = new OperatorImpl ( Operator . EQ , ( Selector ) expr . clone ( ) , comparand ) ; if ( ans == null ) ans = comparison ;...
Convert a partially parsed set expression into its more primitive form as a disjunction of equalities .
112
21
159,274
static Selector convertRange ( Selector expr , Selector bound1 , Selector bound2 ) { return new OperatorImpl ( Operator . AND , new OperatorImpl ( Operator . GE , ( Selector ) expr . clone ( ) , bound1 ) , new OperatorImpl ( Operator . LE , ( Selector ) expr . clone ( ) , bound2 ) ) ; }
Convert a partially parsed BETWEEN expression into its more primitive form as a conjunction of inequalities .
76
20
159,275
static Selector convertLike ( Selector arg , String pattern , String escape ) { try { pattern = reduceStringLiteralToken ( pattern ) ; boolean escaped = false ; char esc = 0 ; if ( escape != null ) { escape = reduceStringLiteralToken ( escape ) ; if ( escape . length ( ) != 1 ) return null ; escaped = true ; esc = esca...
Convert a partially parsed LIKE expression in which the pattern and escape are in the form of token images to the proper Selector expression to represent the LIKE expression
226
31
159,276
@ Override public SecurityMetadata getSecurityMetadata ( ) { SecurityMetadata sm = super . getSecurityMetadata ( ) ; if ( sm == null ) { return getDefaultAdminSecurityMetadata ( ) ; } else { return sm ; } }
Get the effective SecurityMetadata for this application . First try to defer to the application collaborator to see if the application provides data . If so use it . Otherwise fallback to the default SecurityMetadata .
53
41
159,277
private void buildPolicyErrorMessage ( String msgKey , String defaultMessage , Object ... arg1 ) { /* The message need to be logged only for level below 'Warning' */ if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isWarningEnabled ( ) ) { String messageFromBundle = Tr . formatMessage ( tc , msgKey , arg1 ) ; Tr ....
Receives the message key like CSIv2_COMMON_AUTH_LAYER_DISABLED from this key we extract the message from the NLS message bundle which contains the message along with the CWWKS message code .
92
50
159,278
public void displaySelectionPage ( HttpServletRequest request , HttpServletResponse response , SocialTaiRequest socialTaiRequest ) throws IOException { setRequestAndConfigInformation ( request , response , socialTaiRequest ) ; if ( selectableConfigs == null || selectableConfigs . isEmpty ( ) ) { sendDisplayError ( resp...
Generates the sign in page to allow a user to select from the configured social login services . If no services are configured the user is redirected to an error page .
110
33
159,279
String createJavascript ( ) { StringBuilder html = new StringBuilder ( ) ; html . append ( "<script>\n" ) ; html . append ( "function " + createCookieFunctionName + "(value) {\n" ) ; html . append ( "document.cookie = \"" + ClientConstants . LOGIN_HINT + "=\" + value;\n" ) ; html . append ( "}\n" ) ; html . append ( "<...
Creates a JavaScript function for creating a social_login_hint cookie with the value provided to the function . Each provider button should be configured to call this function when the button is clicked allowing the login hint to be passed around in a cookie instead of a request parameter .
115
55
159,280
public boolean parseMessage ( WsByteBuffer buffer , boolean bExtractValue ) throws Exception { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; boolean rc = false ; if ( ! isFirstLineComplete ( ) ) { if ( bTrace && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Parsing First Line" ) ; } rc = parseLine ...
Parse a message from the input buffer . The input flag is whether or not to save the header value immediately or delay the extraction until the header value is queried .
196
34
159,281
public WsByteBuffer [ ] marshallMessage ( ) throws MessageSentException { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; if ( bTrace && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "marshallMessage" ) ; } preMarshallMessage ( ) ; WsByteBuffer [ ] marshalledObj = hasFirstLineChanged ( ) ? marshallLin...
Marshall a message .
160
5
159,282
public static URITemplate createTemplate ( Path path , List < Parameter > params , String classNameandPath ) { return createTemplate ( path == null ? null : path . value ( ) , params , classNameandPath ) ; }
Liberty Change start
51
4
159,283
private boolean isELReserved ( String id ) { int i = 0 ; int j = reservedWords . length ; while ( i < j ) { int k = ( i + j ) / 2 ; int result = reservedWords [ k ] . compareTo ( id ) ; if ( result == 0 ) { return true ; } if ( result < 0 ) { i = k + 1 ; } else { j = k ; } } return false ; }
Test if an id is a reserved word in EL
94
10
159,284
@ Override protected synchronized Class < ? > loadClass ( String name , boolean resolve ) throws ClassNotFoundException { synchronized ( getClassLoadingLock ( name ) ) { Class < ? > result = null ; if ( name == null || name . length ( ) == 0 ) return null ; result = findLoadedClass ( name ) ; if ( result == null ) { if...
Any changes must be made to both sources
201
8
159,285
private static List < Integer > allocateOffsets ( List < List < Integer > > offsetsStorage ) { if ( offsetsStorage . isEmpty ( ) ) { return new ArrayList < Integer > ( ) ; } else { return ( offsetsStorage . remove ( 0 ) ) ; } }
Allocate an offsets list .
58
6
159,286
private static int [ ] releaseOffsets ( List < List < Integer > > offsetsStorage , List < Integer > offsets ) { int numValues = offsets . size ( ) ; int [ ] extractedValues ; if ( numValues == 0 ) { extractedValues = EMPTY_OFFSETS_ARRAY ; } else { extractedValues = new int [ numValues ] ; for ( int valueNo = 0 ; valueN...
Release an offsets list to storage .
136
7
159,287
@ Trivial public static ZipEntryData [ ] collectZipEntries ( ZipFile zipFile ) { final List < ZipEntryData > entriesList = new ArrayList < ZipEntryData > ( ) ; final Enumeration < ? extends ZipEntry > zipEntries = zipFile . entries ( ) ; while ( zipEntries . hasMoreElements ( ) ) { entriesList . add ( createZipEntryDat...
Collect data for the entries of a zip file .
153
10
159,288
@ Trivial public static Map < String , ZipEntryData > setLocations ( ZipEntryData [ ] entryData ) { Map < String , ZipEntryData > entryDataMap = new HashMap < String , ZipEntryData > ( entryData . length ) ; for ( int entryNo = 0 ; entryNo < entryData . length ; entryNo ++ ) { ZipEntryData entry = entryData [ entryNo ]...
Create a table of entry data using the relative paths of the entries as keys . As a side effect set the offset of each entry data to its location int he entry data array .
120
36
159,289
@ Trivial public static int locatePath ( ZipEntryData [ ] entryData , final String r_path ) { ZipEntryData targetData = new SearchZipEntryData ( r_path ) ; // Given: // // 0 gp // 1 gp/p1 // 2 gp/p1/c1 // 3 gp/p2/c2 // // A search for "a" answers "-1" (inexact; insertion point is 0) // A search for "gp" answers "0" (ex...
Locate a path in a collection of entries .
211
10
159,290
@ Trivial private static String stripPath ( String path ) { int pathLen = path . length ( ) ; if ( pathLen == 0 ) { return path ; } else if ( pathLen == 1 ) { if ( path . charAt ( 0 ) == ' ' ) { return "" ; } else { return path ; } } else { if ( path . charAt ( 0 ) == ' ' ) { if ( path . charAt ( pathLen - 1 ) == ' ' )...
Paths used in the zip entry table are adjusted to never have a leading slash and to never have a trailing slash .
177
24
159,291
private static String getDeepestNestedElementName ( String configDisplayId ) { int start = configDisplayId . lastIndexOf ( "]/" ) ; if ( start > 1 ) { int end = configDisplayId . indexOf ( ' ' , start += 2 ) ; if ( end > start ) return configDisplayId . substring ( start , end ) ; } return null ; }
Returns the most deeply nested element name .
82
8
159,292
public void dump_memory ( Writer out ) throws IOException { int qlist_num ; out . write ( "First quick size: " + first_quick_size + "\n" ) ; out . write ( "Last quick size: " + last_quick_size + "\n" ) ; out . write ( "Grain size: " + grain_size + "\n" ) ; out . write ( "Acceptable waste: " + acceptable_waste + "\n" ) ...
Outputs storage information stored in main memory . Debugging interface writes interesting stuff to stdout .
327
19
159,293
protected Channel createChannel ( ChannelData config ) throws ChannelException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createChannel" , config ) ; Channel retChannel ; if ( config . isInbound ( ) ) { if ( tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "createChannel" , "inbound" ) ; try { C...
Creates a new channel . Uses channel configuration to determine if the channel should be inbound or outbound .
348
22
159,294
public Class [ ] getDeviceInterface ( ) // F177053 { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getDeviceInterface" ) ; // F177053 // Start D232185 if ( devSideInterfaceClasses == null ) { devSideInterfaceClasses = new Class [ 1 ] ; devSideInterfaceClasses [ 0 ] = com . ibm . wsspi . tcpchannel . TCPCo...
Returns the device side interfaces which our channels can work with . This is always the TCPServiceContext .
167
22
159,295
private void addRepository ( String repositoryId , RepositoryWrapper repositoryHolder ) { repositories . put ( repositoryId , repositoryHolder ) ; try { numRepos = getNumberOfRepositories ( ) ; } catch ( WIMException e ) { // okay } }
Pair adding to the repositories map and resetting the numRepos int .
58
16
159,296
protected String getRepositoryIdByUniqueName ( String uniqueName ) throws WIMException { boolean isDn = UniqueNameHelper . isDN ( uniqueName ) != null ; if ( isDn ) uniqueName = UniqueNameHelper . getValidUniqueName ( uniqueName ) . trim ( ) ; String repo = null ; int repoMatch = - 1 ; int bestMatch = - 1 ; for ( Map ....
Returns the id of the repository to which the uniqueName belongs to .
357
14
159,297
@ Override public boolean isSameExecutionZone ( FailureScope anotherScope ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isSameExecutionZone" , anotherScope ) ; boolean isSameZone = equals ( anotherScope ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isSameExecutionZone" , new Boolean ( isSameZone ) ) ; re...
Returns true if this failure scope represents the same general recovery scope as the input parameter . For instance if more than one FailureScope was created which referenced the same server they would be in the same execution zone .
95
41
159,298
public static String encodeCookie ( String string ) { if ( string == null ) { return null ; } string = string . replaceAll ( "%" , "%25" ) ; string = string . replaceAll ( ";" , "%3B" ) ; string = string . replaceAll ( "," , "%2C" ) ; return string ; }
Encodes the given string so that it can be used as an HTTP cookie value .
73
17
159,299
public static String decodeCookie ( String string ) { if ( string == null ) { return null ; } string = string . replaceAll ( "%2C" , "," ) ; string = string . replaceAll ( "%3B" , ";" ) ; string = string . replaceAll ( "%25" , "%" ) ; return string ; }
Decodes the given string from percent encoding .
73
9