idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
161,900 | private boolean equivFields ( JSField one , JSField two ) { if ( one instanceof JSDynamic ) { return two instanceof JSDynamic ; } else if ( one instanceof JSEnum ) { return two instanceof JSEnum ; } else if ( one instanceof JSPrimitive ) { return ( two instanceof JSPrimitive ) && ( ( JSPrimitive ) one ) . getTypeCode (... | here is too specialized . | 193 | 5 |
161,901 | int reallocate ( int fieldOffset ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "reallocate" , new Object [ ] { Integer . valueOf ( offset ) } ) ; byte [ ] oldContents = contents ; int oldOffset = offset ; contents = new byte [ length ] ; System . arraycopy ( ... | Reallocate the entire contents buffer | 166 | 7 |
161,902 | void reallocated ( byte [ ] newContents , int newOffset ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "reallocated" , new Object [ ] { newContents , Integer . valueOf ( newOffset ) } ) ; if ( contents != null ) { contents = newContents ; offset = newOffset + ... | JSMessageData items currently in the cache . | 309 | 10 |
161,903 | static int getSize ( Object agg ) throws JMFSchemaViolationException { if ( agg == null ) { return 0 ; } else if ( agg instanceof Collection ) { return ( ( Collection ) agg ) . size ( ) ; } else if ( agg . getClass ( ) . isArray ( ) ) { return Array . getLength ( agg ) ; } else { throw new JMFSchemaViolationException (... | Get the size of an aggregate that may be either an array or a Collection | 103 | 15 |
161,904 | static Iterator getIterator ( Object agg ) throws JMFSchemaViolationException { if ( agg instanceof Collection ) { return ( ( Collection ) agg ) . iterator ( ) ; } else if ( agg . getClass ( ) . isArray ( ) ) { return new LiteIterator ( agg ) ; } else { throw new JMFSchemaViolationException ( agg . getClass ( ) . getNa... | Get an Iterator over an aggregate that may be either an array or a Collection | 91 | 16 |
161,905 | public AppValidator failsWith ( String expectedFailure ) { stringsToFind . add ( expectedFailure ) ; stringsToFind . add ( APP_FAIL_CODE ) ; server . addIgnoredErrors ( Collections . singletonList ( expectedFailure ) ) ; return this ; } | Specify that the app should fail to start and that the given failure message should be seen during app startup | 60 | 21 |
161,906 | private int acquireExpedite ( ) { int a ; while ( ( a = expeditesAvailable . get ( ) ) > 0 && ! expeditesAvailable . compareAndSet ( a , a - 1 ) ) ; return a ; // returning the value rather than true/false will enable better debug } | Attempt to acquire a permit to expedite which involves decrementing the available expedites . Only allow decrement of a positive value and otherwise indicate there are no available expedites . | 62 | 36 |
161,907 | @ Trivial private void decrementWithheldConcurrency ( ) { int w ; while ( ( w = withheldConcurrency . get ( ) ) > 0 && ! withheldConcurrency . compareAndSet ( w , w - 1 ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "withheld concurrency " + w + " --> " + ( w =... | Decrement the counter of withheld concurrency only if positive . This method should only ever be invoked if the caller is about to enqueue a task to the global executor . Otherwise there is a risk of a race condition where withheldConcurrency decrements to 0 with a task still on the queue . | 109 | 60 |
161,908 | @ Override @ FFDCIgnore ( value = { RejectedExecutionException . class } ) public < T > T invokeAny ( Collection < ? extends Callable < T > > tasks , PolicyTaskCallback [ ] callbacks ) throws InterruptedException , ExecutionException { int taskCount = tasks . size ( ) ; // Special case to run a single task on the curre... | Because this method is not timed we allow an optimization where if only a single task is submitted it can run on the current thread . | 702 | 26 |
161,909 | void runTask ( PolicyTaskFutureImpl < ? > future ) { running . add ( future ) ; // intentionally done before checking state to avoid missing cancels on shutdownNow int runCount = runningCount . incrementAndGet ( ) ; try { Callback callback = cbLateStart . get ( ) ; if ( callback != null ) { long delay = future . nsQueu... | Invoked by the policy executor thread to run a task . | 453 | 13 |
161,910 | @ Trivial private void transferOrReleasePermit ( ) { maxConcurrencyConstraint . release ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "expedites/maxConcurrency available" , expeditesAvailable , maxConcurrencyConstraint . availablePermits ( ) ) ; // The permit ... | Releases a permit against maxConcurrency or transfers it to a worker task that runs on the global thread pool . | 179 | 23 |
161,911 | public void closeConnection ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "closeConnection" ) ; try { if ( _XAResourceFactory != null && _XARes != null ) { ( ( XAResourceFactory ) _XAResourceFactory ) . destroyXAResource ( _XARes ) ; } } catch ( Throwable t ) { FFDCFilter . processException ( t , "com.ibm.ws.T... | Close the XAConnection with the XAResource . | 179 | 14 |
161,912 | protected VirtualConnection readInternal ( long numBytes , TCPReadCompletedCallback readCallback , boolean forceQueue , int timeout ) { if ( timeout == IMMED_TIMEOUT ) { immediateTimeout ( ) ; return null ; } if ( timeout == ABORT_TIMEOUT ) { abort ( ) ; immediateTimeout ( ) ; return null ; } setIOAmount ( numBytes ) ;... | internal async read entry point | 149 | 5 |
161,913 | public boolean isFileServingEnabled ( ) { // PK54499 START disallowAllFileServingProp = WCCustomProperties . DISALLOW_ALL_FILE_SERVING ; if ( disallowAllFileServingProp != null && ! this . getApplicationName ( ) . equalsIgnoreCase ( "isclite" ) ) { try { if ( Boolean . valueOf ( disallowAllFileServingProp ) . booleanVa... | Returns the fileServingEnabled . | 313 | 7 |
161,914 | public Map < String , String > getJspAttributes ( ) { if ( null == this . jspAttributes ) { this . jspAttributes = new HashMap < String , String > ( ) ; } return this . jspAttributes ; } | Returns the jspAttributes . | 51 | 6 |
161,915 | public IServletConfig getServletInfo ( String string ) { if ( string == null || string . isEmpty ( ) ) { Tr . debug ( tc , "getServletInfo" , "servlet name is null/empty. Use internal servlet name " + NULLSERVLETNAME ) ; string = NULLSERVLETNAME ; } return ( IServletConfig ) this . servletInfo . get ( string ) ; } | Method getServletInfo . | 92 | 6 |
161,916 | public boolean isServeServletsByClassnameEnabled ( ) { // PK52059 START disallowServeServletsByClassnameProp = WCCustomProperties . DISALLOW_SERVE_SERVLETS_BY_CLASSNAME_PROP ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE ,... | Returns the serveServletsByClassname . | 562 | 9 |
161,917 | public void setMimeFilters ( HashMap mimeFilters ) { if ( mimeFilters != null && mimeFilters . size ( ) > 0 ) { this . isMimeFilteringEnabled = true ; } this . mimeFilters = mimeFilters ; } | Sets the mimeFilters . | 62 | 8 |
161,918 | public String getApplicationName ( ) { if ( this . applicationName != null ) return this . applicationName ; else if ( webApp != null ) return this . webApp . getApplicationName ( ) ; else return null ; } | Return the applicationName . | 48 | 5 |
161,919 | public void setDisableStaticMappingCache ( ) { if ( this . contextParams != null ) { String value = ( String ) this . contextParams . get ( "com.ibm.ws.webcontainer.DISABLE_STATIC_MAPPING_CACHE" ) ; if ( value != null ) { if ( value . equalsIgnoreCase ( "true" ) ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTr... | PM84305 - start | 493 | 5 |
161,920 | public final void insertNullElementsAt ( int index , int count ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "insertNullElementsAt" , new Object [ ] { new Integer ( index ) , new Integer ( count ) } ) ; for ( int i = index ; i < index + count ; i ++ ) add ( i , null ) ; if ( tc . isEntryEnabled ( ) ) SibTr . ... | Inserts count null values at index moving up all the components at index and greater . | 112 | 17 |
161,921 | protected void validatePattern ( ) { if ( pattern . length ( ) == 0 ) { throw new IllegalArgumentException ( Tr . formatMessage ( tc , "OPENTRACING_FILTER_PATTERN_BLANK" ) ) ; } if ( ! regex ) { try { URI . create ( pattern ) ; } catch ( IllegalArgumentException e ) { throw new IllegalArgumentException ( Tr . formatMes... | Throw exceptions if the pattern is invalid . | 120 | 8 |
161,922 | protected final String prepareUri ( final URI uri ) { if ( compareRelative ) { final String path = uri . getRawPath ( ) ; final String query = uri . getRawQuery ( ) ; final String fragment = uri . getRawFragment ( ) ; if ( query != null && fragment != null ) { return path + "?" + query + "#" + fragment ; } else if ( qu... | Prepare the URI for matching . | 139 | 7 |
161,923 | public String readText ( String prompt ) { if ( ! isInputStreamAvailable ( ) ) { return null ; } try { return console . readLine ( prompt ) ; } catch ( IOError e ) { stderr . println ( "Exception while reading stdin: " + e . getMessage ( ) ) ; e . printStackTrace ( stderr ) ; } return null ; } | Reads text from the input String prompting with the given String . | 83 | 13 |
161,924 | public synchronized int add ( E object ) { if ( object == null ) throw new NullPointerException ( "FastList add called with null" ) ; if ( ( count + 1 ) >= maxCount ) resize ( capacity * 2 ) ; int initialAddIndex = addIndex ; // find right spot to add to - start with addIndex and look // for first open spot. give up if... | Adds specified object to the list and increments size | 177 | 9 |
161,925 | public synchronized List < E > getAll ( ) { ArrayList < E > list = new ArrayList < E > ( ) ; for ( E element : listElements ) { if ( element != null ) { list . add ( element ) ; } } return list ; } | Provides a shallow copy of the list | 57 | 8 |
161,926 | public Object [ ] addAll ( CacheMap c ) { LinkedList < Object > discards = new LinkedList < Object > ( ) ; Object discard ; for ( int bucketIndex = c . next [ c . BEFORE_LRU ] ; bucketIndex != c . AFTER_MRU ; bucketIndex = c . next [ bucketIndex ] ) for ( int i = 0 ; i < c . bucketSizes [ bucketIndex ] ; i ++ ) if ( ( ... | Inserts into this CacheMap all entries from the specified CacheMap returning a list of any values that do not fit . | 146 | 24 |
161,927 | private Object discardFromBucket ( int bucketIndex , int entryIndex ) { numDiscards ++ ; bucketSizes [ bucketIndex ] -- ; numEntries -- ; return values [ bucketIndex ] [ entryIndex ] ; } | Discard an entry from the specified bucket . The actual entry is not nulled out because it will later be overwritten . | 47 | 25 |
161,928 | int addRef ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addRef" ) ; int ret = NOP ; // If this is a new subscription, then the operation is to subscribe. if ( _refCount ++ == 0 ) ret = SUBSCRIBE ; checkRefCount ( ) ; if ( TraceComponent . isAnyTracingEnabled ( )... | Adds a reference to the subscription . | 145 | 7 |
161,929 | int removeRef ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeRef" ) ; int ret = NOP ; // If this is the last reference, then the operation is unsubscribe. if ( -- _refCount == 0 ) ret = UNSUBSCRIBE ; checkRefCount ( ) ; if ( TraceComponent . isAnyTracingEnab... | Removes a reference to the subscription . | 146 | 8 |
161,930 | final String getTopic ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getTopic" ) ; SibTr . exit ( tc , "getTopic" , _topic ) ; } return _topic ; } | Returns the value of the topic . | 66 | 7 |
161,931 | final SIBUuid12 getTopicSpaceUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getTopicSpaceUuid" ) ; SibTr . exit ( tc , "getTopicSpaceUuid" , _topicSpaceUuid ) ; } return _topicSpaceUuid ; } | Returns the value of the topic space uuid . | 85 | 10 |
161,932 | final String getTopicSpaceName ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getTopicSpaceName" ) ; SibTr . exit ( tc , "getTopicSpaceName" , _topicSpaceName ) ; } return _topicSpaceName ; } | Returns the value of the topic space name . | 76 | 9 |
161,933 | final String getMESubUserId ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getMESubUserId" ) ; SibTr . exit ( tc , "getMESubUserId" , _meSubUserId ) ; } return _meSubUserId ; } | Returns the value of the userid associated with the subscription . | 84 | 12 |
161,934 | final boolean isForeignSecuredProxy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isForeignSecuredProxy" ) ; SibTr . exit ( tc , "isForeignSecuredProxy" , new Boolean ( _foreignSecuredProxy ) ) ; } return _foreignSecuredProxy ; } | Returns true if this proxy sub was from a foreign bus in a secured env . | 85 | 16 |
161,935 | void mark ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "mark" ) ; SibTr . exit ( tc , "mark" ) ; } _marked = true ; } | Marks this object . | 60 | 5 |
161,936 | void unmark ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "unmark" ) ; SibTr . exit ( tc , "unmark" ) ; } _marked = false ; } | Unmarks this object . | 63 | 5 |
161,937 | boolean isMarked ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isMarked" ) ; SibTr . exit ( tc , "isMarked" , new Boolean ( _marked ) ) ; } return _marked ; } | Is Marked indicates if this object is still marked . If it is then it can be removed . | 73 | 20 |
161,938 | protected void registerForPostCommit ( MultiMEProxyHandler proxyHandler , DestinationHandler destination , PubSubOutputHandler handler , Neighbour neighbour ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerForPostCommit" , new Object [ ] { proxyHandler , desti... | Sets the information in the subscription so that when a commit is called it can resolve the correct objects to add items to the MatchSpace . | 147 | 28 |
161,939 | protected void registerForPostCommit ( Neighbour neighbour , Neighbours neighbours ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerForPostCommit" , new Object [ ] { neighbour , neighbours } ) ; _proxyHandler = null ; _destination = null ; _handler = null ; _n... | Used only for rollback - if the transaction is rolled back and there is a neighbour set then rmeove the proxy reference . | 137 | 26 |
161,940 | public void eventPostRollbackAdd ( Transaction transaction ) throws SevereMessageStoreException { super . eventPostRollbackAdd ( transaction ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "eventPostRollbackAdd" , transaction ) ; if ( _handler != null ) { _handler . r... | When the add rollback is made need to remove the topic . Or the topicSpace reference needs to be removed . | 308 | 23 |
161,941 | public void eventPostCommitUpdate ( Transaction transaction ) throws SevereMessageStoreException { super . eventPostCommitAdd ( transaction ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "eventPostCommitUpdate" , transaction ) ; // Remove the current CPS from the Mat... | Updates the ControllableProxySubscription . | 543 | 10 |
161,942 | public void setMatchspaceSub ( ControllableProxySubscription sub ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setMatchspaceSub" , sub ) ; _controllableProxySubscription = sub ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit... | This sets the field in the MESubscription for the object that was stored in the Matchspace | 103 | 20 |
161,943 | public ControllableProxySubscription getMatchspaceSub ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getMatchspaceSub" ) ; SibTr . exit ( tc , "getMatchspaceSub" , _controllableProxySubscription ) ; } return _controllableProxySubscription ; } | Gets the object that was stored in the Matchspace | 87 | 11 |
161,944 | public final AbstractItem findById ( long itemId ) throws SevereMessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findById" , Long . valueOf ( itemId ) ) ; AbstractItem item = null ; ReferenceCollection ic = ( ( ReferenceCollection ) _getMemb... | Reply the item in the receiver with a matching ID . The item returned stream is neither removed from the message store nor locked for exclusive use of the caller . | 201 | 31 |
161,945 | public final ItemReference findOldestReference ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findOldestReference" ) ; ReferenceCollection ic = ( ( ReferenceCollection ) _getMembership ( ) ) ; if ( null == ic ) { if ( TraceCompo... | Find the reference that has been known to the stream for longest . The reference returned may be in any of the states defined in the state model . The caller should not assume that the reference can be used for any particular purpose . | 201 | 45 |
161,946 | private void publishEvent ( WSJobExecution jobEx , String topicToPublish , String correlationId ) { if ( eventsPublisher != null ) { eventsPublisher . publishJobExecutionEvent ( jobEx , topicToPublish , correlationId ) ; } } | Helper method to publish event | 54 | 5 |
161,947 | private void publishEvent ( WSJobInstance jobInst , String topicToPublish , String correlationId ) { if ( eventsPublisher != null ) { eventsPublisher . publishJobInstanceEvent ( jobInst , topicToPublish , correlationId ) ; } } | Helper method to publish event with correlationId | 52 | 8 |
161,948 | private long restartInternal ( long oldExecutionId , Properties restartParameters ) throws JobExecutionAlreadyCompleteException , NoSuchJobExecutionException , JobExecutionNotMostRecentException , JobRestartException , JobSecurityException { if ( authService != null ) { authService . authorizedJobRestartByExecution ( o... | Restart the given execution using the given jobparams . | 352 | 11 |
161,949 | private void getMessageDigestMD5 ( ) throws AttributeNotFoundException { if ( MBeans . messageDigestMD5 == null ) { try { MBeans . messageDigestMD5 = MessageDigestUtility . createMessageDigest ( "MD5" ) ; } catch ( NoSuchAlgorithmException e ) { Tr . error ( tc , "DYNA1044E" , new Object [ ] { e . getMessage ( ) } ) ; ... | create messageDigest for MD5 algoritm if it is not created . | 132 | 17 |
161,950 | @ Override @ Trivial public Map < String , ExtendedAttributeDefinition > getAttributeMap ( ) { Map < String , ExtendedAttributeDefinition > map = null ; AttributeDefinition [ ] attrDefs = getAttributeDefinitions ( ObjectClassDefinition . ALL ) ; if ( attrDefs != null ) { map = new HashMap < String , ExtendedAttributeDe... | ONLY USED BY SCHEMA WRITER | 139 | 10 |
161,951 | private static String getAliasName ( String alias , String bundleLocation ) { String newAlias = alias ; if ( alias != null && ! alias . isEmpty ( ) ) { try { if ( bundleLocation != null && ! bundleLocation . isEmpty ( ) ) { if ( bundleLocation . startsWith ( XMLConfigConstants . BUNDLE_LOC_KERNEL_TAG ) ) { // nothing t... | Prefixes the alias with the product extension name if there is a product extension associated to this OCD . | 347 | 21 |
161,952 | @ Trivial private static byte [ ] getBytes ( InputStream stream , int knownSize ) throws IOException { try { if ( knownSize == - 1 ) { ByteArrayOutputStream byteOut = new ByteArrayOutputStream ( ) ; try { byte [ ] bytes = new byte [ 1024 ] ; int read ; while ( 0 <= ( read = stream . read ( bytes ) ) ) byteOut . write (... | Util method to totally read an input stream into a byte array . Used for class definition . | 196 | 19 |
161,953 | static URL getSharedClassCacheURL ( URL resourceURL , String resourceName ) { URL sharedClassCacheURL ; if ( resourceURL == null ) { sharedClassCacheURL = null ; } else { String protocol = resourceURL . getProtocol ( ) ; if ( "jar" . equals ( protocol ) ) { sharedClassCacheURL = resourceURL ; } else if ( "wsjar" . equa... | Computes the shared class cache URL from the resource URL . | 260 | 12 |
161,954 | public Package definePackage ( String name , Manifest manifest , URL sealBase ) throws IllegalArgumentException { Attributes mA = manifest . getMainAttributes ( ) ; String specTitle = mA . getValue ( Name . SPECIFICATION_TITLE ) ; String specVersion = mA . getValue ( Name . SPECIFICATION_VERSION ) ; String specVendor =... | to set vars passed up to ClassLoader . definePackage . | 518 | 13 |
161,955 | protected void addToClassPath ( Iterable < ArtifactContainer > artifacts ) { for ( ArtifactContainer art : artifacts ) { smartClassPath . addArtifactContainer ( art ) ; } } | Add all the artifact containers to the class path | 39 | 9 |
161,956 | @ FFDCIgnore ( NullPointerException . class ) protected void addLibraryFile ( File f ) { if ( ! ! ! f . exists ( ) ) { if ( tc . isWarningEnabled ( ) ) { Tr . warning ( tc , "cls.library.archive" , f , new FileNotFoundException ( f . getName ( ) ) ) ; } return ; } // Skip files that are not archives of some sort. if ( ... | Method to allow adding shared libraries to this classloader currently using File . | 404 | 14 |
161,957 | @ FFDCIgnore ( PrivilegedActionException . class ) private boolean isArchive ( File f ) { final File target = f ; try { AccessController . doPrivileged ( new PrivilegedExceptionAction < Void > ( ) { @ Override public Void run ( ) throws IOException { new ZipFile ( target ) . close ( ) ; return null ; } } ) ; } catch ( ... | Check that a file is an archive | 152 | 7 |
161,958 | public static ComponentMetaData getComponentMetaData ( JavaColonNamespace namespace , String name ) throws NamingException { ComponentMetaData cmd = ComponentMetaDataAccessorImpl . getComponentMetaDataAccessor ( ) . getComponentMetaData ( ) ; if ( cmd == null ) { String fullName = name . isEmpty ( ) ? namespace . toStr... | Helper method to get the component metadata from the thread context . | 143 | 12 |
161,959 | @ Reference ( policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . MULTIPLE ) protected Map < String , Object > setConfiguration ( ServiceReference < SecurityConfiguration > ref ) { String id = ( String ) ref . getProperty ( KEY_ID ) ; if ( id != null ) { configs . putReference ( id , ref ) ; } els... | Method will be called for each SecurityConfiguration that is registered in the OSGi service registry . We maintain an internal map of these for easy access . | 126 | 29 |
161,960 | protected Map < String , Object > unsetConfiguration ( ServiceReference < SecurityConfiguration > ref ) { configs . removeReference ( ( String ) ref . getProperty ( KEY_ID ) , ref ) ; return getServiceProperties ( ) ; } | Method will be called for each SecurityConfiguration that is unregistered in the OSGi service registry . We must remove this instance from our internal map . | 51 | 29 |
161,961 | @ Reference ( policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . MULTIPLE ) protected Map < String , Object > setAuthentication ( ServiceReference < AuthenticationService > ref ) { if ( hasPropertiesFromFile ( ref ) ) { String id = ( String ) ref . getProperty ( KEY_ID ) ; if ( id != null ) { aut... | Method will be called for each AuthenticationService that is registered in the OSGi service registry . We maintain an internal map of these for easy access . | 187 | 29 |
161,962 | protected Map < String , Object > unsetAuthentication ( ServiceReference < AuthenticationService > ref ) { authentication . removeReference ( ( String ) ref . getProperty ( KEY_ID ) , ref ) ; authentication . removeReference ( String . valueOf ( ref . getProperty ( KEY_SERVICE_ID ) ) , ref ) ; // determine a new authen... | Method will be called for each AuthenticationService that is unregistered in the OSGi service registry . We must remove this instance from our internal map . | 93 | 29 |
161,963 | @ Reference ( policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . MULTIPLE ) protected Map < String , Object > setAuthorization ( ServiceReference < AuthorizationService > ref ) { if ( hasPropertiesFromFile ( ref ) ) { String id = ( String ) ref . getProperty ( KEY_ID ) ; if ( id != null ) { autho... | Method will be called for each AuthorizationService that is registered in the OSGi service registry . We maintain an internal map of these for easy access . | 187 | 29 |
161,964 | protected Map < String , Object > unsetAuthorization ( ServiceReference < AuthorizationService > ref ) { authorization . removeReference ( ( String ) ref . getProperty ( KEY_ID ) , ref ) ; authorization . removeReference ( String . valueOf ( ref . getProperty ( KEY_SERVICE_ID ) ) , ref ) ; // determine a new authorizat... | Method will be called for each AuthorizationService that is unregistered in the OSGi service registry . We must remove this instance from our internal map . | 93 | 29 |
161,965 | @ Reference ( policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . MULTIPLE , target = "(config.displayId=*)" ) protected Map < String , Object > setUserRegistry ( ServiceReference < UserRegistryService > ref ) { adjustUserRegistryServiceRef ( ref ) ; // determine a new user registry service userRe... | Method will be called for each UserRegistryService that is registered in the OSGi service registry . We maintain an internal map of these for easy access . | 96 | 31 |
161,966 | protected Map < String , Object > unsetUserRegistry ( ServiceReference < UserRegistryService > ref ) { userRegistry . removeReference ( ( String ) ref . getProperty ( KEY_ID ) , ref ) ; userRegistry . removeReference ( String . valueOf ( ref . getProperty ( KEY_SERVICE_ID ) ) , ref ) ; // determine a new user registry ... | Method will be called for each UserRegistryService that is unregistered in the OSGi service registry . We must remove this instance from our internal map . | 102 | 31 |
161,967 | private SecurityConfiguration getEffectiveSecurityConfiguration ( ) { SecurityConfiguration effectiveConfig = configs . getService ( cfgSystemDomain ) ; if ( effectiveConfig == null ) { Tr . error ( tc , "SECURITY_SERVICE_ERROR_BAD_DOMAIN" , cfgSystemDomain , CFG_KEY_SYSTEM_DOMAIN ) ; throw new IllegalArgumentException... | Eventually this will be execution context aware and pick the right domain . Till then we re only accessing the system domain configuration . | 130 | 24 |
161,968 | private < V > V autoDetectService ( String serviceName , ConcurrentServiceReferenceMap < String , V > map ) { Iterator < V > services = map . getServices ( ) ; if ( services . hasNext ( ) == false ) { Tr . error ( tc , "SECURITY_SERVICE_NO_SERVICE_AVAILABLE" , serviceName ) ; throw new IllegalStateException ( Tr . form... | When the configuration element is not defined use some auto - detect logic to try and return the single Service of a specified field . If there is no service or multiple services that is considered an error case which auto - detect can not resolve . | 215 | 47 |
161,969 | private AuthenticationService getAuthenticationService ( String id ) { AuthenticationService service = authentication . getService ( id ) ; if ( service == null ) { throwIllegalArgumentExceptionInvalidAttributeValue ( SecurityConfiguration . CFG_KEY_AUTHENTICATION_REF , id ) ; } return service ; } | Retrieve the AuthenticationService for the specified id . | 65 | 10 |
161,970 | private AuthorizationService getAuthorizationService ( String id ) { AuthorizationService service = authorization . getService ( id ) ; if ( service == null ) { throwIllegalArgumentExceptionInvalidAttributeValue ( SecurityConfiguration . CFG_KEY_AUTHORIZATION_REF , id ) ; } return service ; } | Retrieve the AuthorizationService for the specified id . | 65 | 10 |
161,971 | private UserRegistryService getUserRegistryService ( String id ) { UserRegistryService service = userRegistry . getService ( id ) ; if ( service == null ) { throwIllegalArgumentExceptionInvalidAttributeValue ( SecurityConfiguration . CFG_KEY_USERREGISTRY_REF , id ) ; } return service ; } | Retrieve the UserRegistryService for the specified id . | 71 | 12 |
161,972 | protected final String getFacetName ( FaceletContext ctx , UIComponent parent ) { // TODO: REFACTOR - "facelets.FACET_NAME" should be a constant somewhere, used to be in FacetHandler // from real Facelets return ( String ) parent . getAttributes ( ) . get ( "facelets.FACET_NAME" ) ; } | Return the Facet name we are scoped in otherwise null | 84 | 12 |
161,973 | public void completeTxTimeout ( ) throws TransactionRolledbackException { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "completeTxTimeout" ) ; if ( tx != null && tx . isTimedOut ( ) ) { if ( traceOn && tc . isEventEnabled ( ) ) Tr . event... | Complete processing of passive transaction timeout . | 291 | 7 |
161,974 | public void addConsumer ( DispatchableConsumerPoint lcp ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addConsumer" , lcp ) ; // WARNING: We mustn't hold the LCP lock of the consumer at this point synchronized ( consumerList ) { consumerList . add ( lcp ) ; } if ( T... | Add a new consumer to this set . | 121 | 8 |
161,975 | public void removeConsumer ( DispatchableConsumerPoint lcp ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeConsumer" , lcp ) ; // WARNING: We mustn't hold the LCP lock of the consumer at this point synchronized ( consumerList ) { consumerList . remove ( lcp ) ;... | Remove a consumer from the set . | 121 | 7 |
161,976 | public int getGetCursorIndex ( SIMPMessage msg ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getGetCursorIndex" ) ; // The zeroth index is reserved for non-classified messages int classPos = 0 ; synchronized ( classifications ) { if ( classifications . getNumberOfC... | Determine the index of the getCursor to use based on the classification of a message . | 233 | 20 |
161,977 | public synchronized int chooseGetCursorIndex ( int previous ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "chooseGetCursorIndex" , new Object [ ] { Integer . valueOf ( previous ) } ) ; // The zeroth index represents the default cursor for non-classified messages. in... | Determine the index of the getCursor to use based on the classifications defined for the ConsumerSet that this consumer belongs to . | 388 | 28 |
161,978 | public JSConsumerClassifications getClassifications ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getClassifications" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getClassifications" , classifications ) ; // ... | Returns a reference to the Classifications object that wraps the classifications specified by XD . | 99 | 17 |
161,979 | public void takeClassificationReadLock ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "takeClassificationReadLock" ) ; classificationReadLock . lock ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "takeClassifica... | Take a classification readlock | 95 | 5 |
161,980 | public void freeClassificationReadLock ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "freeClassificationReadLock" ) ; classificationReadLock . unlock ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "freeClassifi... | Free a classification readlock | 95 | 5 |
161,981 | public void registerSynchronization ( Synchronization s ) throws CPIException { try { ivContainer . uowCtrl . enlistWithSession ( s ) ; // enlistSession(s) } catch ( CSIException e ) { throw new CPIException ( e . toString ( ) ) ; } } | Register the synchronization object with this activity session | 61 | 8 |
161,982 | private EJBKey [ ] getEJBKeys ( BeanO [ ] beans ) { EJBKey result [ ] = null ; if ( beans != null ) { result = new EJBKey [ beans . length ] ; for ( int i = 0 ; i < beans . length ; ++ i ) { result [ i ] = beans [ i ] . getId ( ) ; } } return result ; } | Get snapshot of all EJBKeys associated with the beans involved in current activity session | 84 | 16 |
161,983 | private BeanO [ ] getBeanOs ( ) { BeanO result [ ] ; result = new BeanO [ ivBeanOs . size ( ) ] ; Iterator < BeanO > iter = ivBeanOs . values ( ) . iterator ( ) ; int i = 0 ; while ( iter . hasNext ( ) ) { result [ i ++ ] = iter . next ( ) ; } return result ; } | Get snapshot of all beans involved in current activity session | 87 | 10 |
161,984 | @ Override public void scanClasses ( ClassSource_Streamer streamer , Set < String > i_seedClassNamesSet , ScanPolicy scanPolicy ) { throw new UnsupportedOperationException ( ) ; } | scan policy and external regions are never scanned iteratively . | 43 | 11 |
161,985 | public List < com . ibm . wsspi . security . wim . model . PartyRole > getPartyRoles ( ) { if ( partyRoles == null ) { partyRoles = new ArrayList < com . ibm . wsspi . security . wim . model . PartyRole > ( ) ; } return this . partyRoles ; } | Gets the value of the partyRoles property . | 77 | 11 |
161,986 | public JSchema getExpectedSchema ( Map context ) { if ( expectedSchema != null ) return expectedSchema ; if ( expectedType == null ) return null ; expectedSchema = ( JSchema ) context . get ( expectedType ) ; if ( expectedSchema != null ) return expectedSchema ; expectedSchema = new JSchema ( expectedType , context ) ;... | Retrieve the subschema corresponding to the expected type ( will be null iff expected type is null . Constructs the subschema if it doesn t already exist . The context argument guards against duplicate construction of schemas in the event that the definition is recursive . | 88 | 54 |
161,987 | @ Override public void taskStarting ( ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; prevInvocationSubject = subjectManager . getInvocationSubject ( ) ; prevCallerSubject = subjectManager . getCallerSubject ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "taskStarting" , "pr... | Push the subjects associated with this security context onto the thread . | 173 | 12 |
161,988 | @ Override public void taskStopping ( ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "taskStopping" , "restore caller/invocation subjects" , prevCallerSubject , prevInvocationSubject ) ; subjectManager . setCallerSubject ( prevCaller... | Restore the subjects that were previously on the thread prior to applying this security context . | 129 | 17 |
161,989 | private void readState ( GetField fields ) throws IOException { //get caller principal callerPrincipal = ( WSPrincipal ) fields . get ( CALLER_PRINCIPAL , null ) ; //get boolean marking if subjects are equal subjectsAreEqual = fields . get ( SUBJECTS_ARE_EQUAL , false ) ; //only deserialize invocation principal if it's... | Read the security context | 223 | 4 |
161,990 | @ FFDCIgnore ( AuthenticationException . class ) protected Subject recreateFullSubject ( WSPrincipal wsPrincipal , SecurityService securityService , AtomicServiceReference < UnauthenticatedSubjectService > unauthenticatedSubjectServiceRef , String customCacheKey ) { Subject subject = null ; if ( wsPrincipal != null ) {... | Perform a login to recreate the full subject given a WSPrincipal | 249 | 16 |
161,991 | protected WSPrincipal getWSPrincipal ( Subject subject ) throws IOException { WSPrincipal wsPrincipal = null ; Set < WSPrincipal > principals = ( subject != null ) ? subject . getPrincipals ( WSPrincipal . class ) : null ; if ( principals != null && ! principals . isEmpty ( ) ) { if ( principals . size ( ) > 1 ) { // E... | Get the WSPrincipal from the subject | 218 | 10 |
161,992 | public void clear ( ) throws IOException { if ( writer != null ) { throw new IOException ( ) ; } else { nextChar = 0 ; if ( limitBuffer && ( strBuffer . length ( ) > this . bodyContentBuffSize ) ) { //PK95332 - starts if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level .... | Clear the contents of the buffer . If the buffer has been already been flushed then the clear operation shall throw an IOException to signal the fact that some data has already been irrevocably written to the client response stream . | 196 | 44 |
161,993 | public void writeOut ( Writer out ) throws IOException { if ( writer == null ) { out . write ( strBuffer . toString ( ) ) ; // PK33136 // Flush not called as the writer passed could be a BodyContent and // it doesn't allow to flush. } } | Write the contents of this BodyJspWriter into a Writer . Subclasses are likely to do interesting things with the implementation so some things are extra efficient . | 61 | 31 |
161,994 | void setWriter ( Writer writer ) { // PM12137 - starts if ( closed ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) { logger . logp ( Level . FINE , CLASS_NAME , "setWriter" , "resetting closed to false for this=[" + this + "]" ) ; } closed = false ; st... | Sets the writer to which all output is written . | 474 | 11 |
161,995 | @ Trivial public final Map < String , String > getExecutionProperties ( ) { TreeMap < String , String > copy = null ; if ( internalPropNames != null ) { copy = new TreeMap < String , String > ( threadContextDescriptor . getExecutionProperties ( ) ) ; for ( String name : internalPropNames ) copy . remove ( name ) ; } re... | Returns a copy of execution properties . | 87 | 7 |
161,996 | public TimerWorkItem createTimeoutRequest ( long timeoutTime , TimerCallback _callback , IAbstractAsyncFuture _future ) { TimerWorkItem wi = new TimerWorkItem ( timeoutTime , _callback , _future , _future . getReuseCount ( ) ) ; _future . setTimeoutWorkItem ( wi ) ; // put this to the Timer's work queue. Use the queue ... | Creates a work item and puts it on the work queue for requesting a timeout to be started . | 185 | 20 |
161,997 | public void timeSlotPruning ( long curTime ) { // if a bucket has not been accessed in a while, and it only has // dead entries then get rid of it TimeSlot slotEntry = this . firstSlot ; TimeSlot nextSlot = null ; int endIndex = 0 ; int i ; while ( slotEntry != null ) { nextSlot = slotEntry . nextEntry ; if ( curTime -... | Remove slots which have no active requests and no new requests have been added in a set amount of time . | 209 | 21 |
161,998 | public void insertWorkItem ( TimerWorkItem work , long curTime ) { // find the time slot, or create a new one long insertTime = work . timeoutTime ; TimeSlot nextSlot = this . firstSlot ; while ( nextSlot != null ) { if ( ( insertTime == nextSlot . timeoutTime ) && ( nextSlot . lastEntryIndex != TimeSlot . TIMESLOT_LAS... | Put a work item into an existing time slot or create a new time slot and put the work item into that time slot . | 195 | 25 |
161,999 | public TimeSlot insertSlot ( long newSlotTimeout , TimeSlot slot ) { // this routine assumes the list is not empty TimeSlot retSlot = new TimeSlot ( newSlotTimeout ) ; retSlot . nextEntry = slot ; retSlot . prevEntry = slot . prevEntry ; if ( retSlot . prevEntry != null ) { retSlot . prevEntry . nextEntry = retSlot ; }... | Create a new time slot with a given timeout time and add this new time slot in front of an existing time slot in the list . | 117 | 27 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.