idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
161,300 | @ Override protected MatchResponse getMatchResponse ( SecurityConstraint securityConstraint , String resourceName , String method ) { CollectionMatch collectionMatch = getCollectionMatch ( securityConstraint . getWebResourceCollections ( ) , resourceName , method ) ; if ( CollectionMatch . RESPONSE_NO_MATCH . equals ( ... | Gets the response object that contains the roles the SSL required and access precluded indicators . Gets the response using the standard method algorithm . | 257 | 27 |
161,301 | public void purge ( ) { synchronized ( this ) { // Clear all references to VirtualHost objects for ( DynamicVirtualHost host : hostMap . values ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Purge host : " + host . hashCode ( ) + ", this : " + this ) ; } host . g... | Called when the webcontainer is deactivated . This will clean up all maps within the host manager to facilitate garbage collection and clean up . | 140 | 28 |
161,302 | private void setSsoTokenCredential ( Subject subject , String principalAccessId ) throws CredentialException { try { TokenManager tokenManager = tokenManagerRef . getService ( ) ; SingleSignonToken ssoToken = null ; Set < Token > tokens = subject . getPrivateCredentials ( Token . class ) ; if ( tokens . isEmpty ( ) == ... | Create an SSO token for the specified accessId . | 240 | 11 |
161,303 | public ManagedObject get ( Token token ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) { trace . entry ( this , cclass , "get" , token ) ; trace . exit ( this , cclass , "get returns null" ) ; } return null ; // TODO If the memory object store has been restarted after a restart of the ObjectM... | Retrieve an object in the store . For MemoryObjectStores this should only be called for a ManagedObject that was lost over a restart so null is returned . | 233 | 34 |
161,304 | public synchronized void flush ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) { trace . entry ( this , cclass , "flush" ) ; trace . exit ( this , cclass , "flush" ) ; } } | For MemoryObjectstore there is nothing to do . | 63 | 10 |
161,305 | static void buildEjbWebServiceEndpointInfos ( EndpointInfoBuilder endpointInfoBuilder , EndpointInfoBuilderContext ctx , JaxWsServerMetaData jaxWsServerMetaData , List < EJBEndpoint > ejbEndpoints , JaxWsModuleInfo jaxWsModuleInfo ) throws UnableToAdaptException { Set < String > presentedServices = jaxWsModuleInfo . ge... | build Web Service endpoint infos | 336 | 6 |
161,306 | public static Jose4jRsaJWK getInstance ( int size , String alg , String use , String type ) { String kid = RandomUtils . getRandomAlphaNumeric ( KID_LENGTH ) ; KeyPairGenerator keyGenerator = null ; try { keyGenerator = KeyPairGenerator . getInstance ( "RSA" ) ; } catch ( NoSuchAlgorithmException e ) { // This should n... | generate a new JWK with the specified parameters | 301 | 11 |
161,307 | public static Jose4jRsaJWK getInstance ( String alg , String use , PublicKey publicKey , PrivateKey privateKey , String kid ) { //String kid = RandomUtils.getRandomAlphaNumeric(KID_LENGTH); RSAPublicKey pubKey = ( RSAPublicKey ) publicKey ; RSAPrivateKey priKey = ( RSAPrivateKey ) privateKey ; Jose4jRsaJWK jwk = new Jo... | alg use publicKey privateKey | 170 | 6 |
161,308 | private List < Object > reprocessFormParams ( Method method , List < Object > origParams , Message m ) { Form form = null ; boolean hasFormParamAnnotations = false ; Object [ ] newValues = new Object [ origParams . size ( ) ] ; java . lang . reflect . Parameter [ ] methodParams = method . getParameters ( ) ; for ( int ... | Liberty change start - CXF - 7860 | 437 | 11 |
161,309 | private Collection < LibertyVersion > filterVersions ( Collection < LibertyVersion > minimumVersions , String version ) { LibertyVersion versionToMatch = LibertyVersion . valueOf ( version ) ; if ( versionToMatch == null ) { return minimumVersions ; } Collection < LibertyVersion > filteredVersions = new HashSet < Liber... | This will filter the supplied versions to make sure they all have the same major minor and micro parts as the supplied version . This may return the original collection . | 114 | 31 |
161,310 | Map < Object , Object > createOrRestoreMap ( FacesContext context , String prefix , boolean create ) { ExternalContext external = context . getExternalContext ( ) ; Map < String , Object > sessionMap = external . getSessionMap ( ) ; Map < Object , Object > map = ( Map < Object , Object > ) sessionMap . get ( prefix ) ;... | Create a new subkey - wrapper of the session map with the given prefix . This wrapper is used to implement the maps for the flash scope . For more information see the SubKeyMap doc . | 115 | 39 |
161,311 | public static TSSConfig getTSSConfig ( Map < String , Object > props , Map < OptionsKey , List < TransportAddress > > addrMap , Bundle bundle ) throws Exception { TSSConfig tssConfig = new TSSConfig ( ) ; List < Map < String , Object > > tssConfigs = Nester . nest ( CSIV2_CONFIGURATION , props ) ; if ( ! tssConfigs . i... | Returns a TSSConfig object initialized with the input object as an XML string . | 614 | 16 |
161,312 | public ZipFileData addFirst ( ZipFileData newFirstData ) { String newFirstPath = newFirstData . path ; Cell dupCell = cells . get ( newFirstPath ) ; if ( dupCell != null ) { throw new IllegalArgumentException ( "Path [ " + newFirstPath + " ] is already stored" ) ; } Cell oldFirstCell = anchor . next ; Cell newFirstCell... | Add data as new first data . | 129 | 7 |
161,313 | public ZipFileData addLast ( ZipFileData newLastData ) { String newLastPath = newLastData . path ; Cell dupCell = cells . get ( newLastPath ) ; if ( dupCell != null ) { throw new IllegalArgumentException ( "Path [ " + newLastPath + " ] is already stored" ) ; } Cell oldLastCell = anchor . prev ; Cell newLastCell = new C... | Add data as new last data . | 129 | 7 |
161,314 | public ZipFileData addLast ( ZipFileData newLastData , int maximumSize ) { String newLastPath = newLastData . path ; Cell dupCell = cells . get ( newLastPath ) ; if ( dupCell != null ) { throw new IllegalArgumentException ( "Path [ " + newLastPath + " ] is already stored" ) ; } int size = size ( ) ; if ( ( maximumSize ... | Add data as the last data of the store . If the addition pushes a cell out of the list answer the data of the cell which was removed . | 265 | 30 |
161,315 | public void refresh ( ApplicationMonitorConfig config ) { _config . set ( config ) ; UpdateTrigger trigger = config . getUpdateTrigger ( ) ; if ( trigger != UpdateTrigger . DISABLED ) { // Start all existing listeners for ( ApplicationListeners listeners : _appListeners . values ( ) ) { listeners . startListeners ( con... | Starts the service with properties | 133 | 6 |
161,316 | @ FFDCIgnore ( value = UnableToAdaptException . class ) public void addApplication ( ApplicationInstallInfo installInfo ) { // ...and now create the new... start by asking the handler what needs monitoring final Collection < Notification > notificationsToMonitor ; final boolean listenForRootStructuralChanges ; Applicat... | adds an application s information to the update monitor | 617 | 10 |
161,317 | public void removeApplication ( String pid ) { // remove the application listener from the set we know about and stop it ApplicationListeners listeners = _appListeners . remove ( pid ) ; //check that the app is known, this can be run after the app is already removed. if ( listeners != null ) { listeners . stopListeners... | Removes an application from the update monitor | 75 | 8 |
161,318 | public static void traceEJBCallEntry ( String methodDesc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { StringBuffer sbuf = new StringBuffer ( ) ; sbuf . append ( BeanLifeCycle_EJBCallEntry_Type_Str ) . append ( DataDelimiter ) . append ( BeanLifeCycle_EJBCallEntry_Type ) . append ( Da... | This is called by the EJB container server code to write a ejb method callback entry record to the trace log if enabled . | 124 | 27 |
161,319 | public static void traceEJBCallExit ( String methodDesc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { StringBuffer sbuf = new StringBuffer ( ) ; sbuf . append ( BeanLifeCycle_EJBCallExit_Type_Str ) . append ( DataDelimiter ) . append ( BeanLifeCycle_EJBCallExit_Type ) . append ( DataD... | This is called by the EJB container server code to write a ejb method callback exit record to the trace log if enabled . | 124 | 27 |
161,320 | public static void traceBeanState ( int oldState , String oldString , int newState , String newString ) // d167264 { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { StringBuffer sbuf = new StringBuffer ( ) ; sbuf . append ( BeanLifeCycle_State_Type_Str ) . append ( DataDelimiter ) . append ... | This is called by the EJB container server code to write a ejb bean state record to the trace log if enabled . | 196 | 26 |
161,321 | protected synchronized void add ( Object id , int bufferType , int cause , int source , boolean fromDepIdTemplateInvalidation , boolean fireEvent , boolean isAlias ) { final String methodName = "add(Object)" ; if ( id == null ) { return ; } if ( bufferType == EXPLICIT_BUFFER ) { byte info = 0 ; if ( cause != 0 && sourc... | Call this method to store a cache id in the one of invalidation buffers . The entry is going to remove from the disk using LPBT . | 424 | 29 |
161,322 | protected synchronized void add ( ValueSet idSet , int bufferType , int cause , int source , boolean fromDepIdTemplateInvalidation , boolean fireEvent , boolean checkFull ) { final String methodName = "add(ValueSet)" ; if ( idSet == null || idSet . isEmpty ( ) ) { return ; } int size = idSet . size ( ) ; if ( bufferTyp... | Call this method to store a collection of cache ids in the one of invalidation buffers . The entries are going to remove from the disk using LPBT . | 494 | 32 |
161,323 | protected synchronized Object get ( int bufferType ) { // final String methodName = "get(boolean)"; Object id = null ; if ( bufferType == this . EXPLICIT_BUFFER ) { if ( ! this . explicitBuffer . isEmpty ( ) ) { Set s = this . explicitBuffer . keySet ( ) ; Iterator it = s . iterator ( ) ; ExplicitIdData idData = new Ex... | Call this method when a cache id is retrieved from one of invalidation buffers . The entry is being used to remove from the disk using LPBT . | 322 | 30 |
161,324 | protected synchronized void remove ( Object id , int bufferType , boolean returnToPool ) { // final String methodName = "remove(Object,bufferType)"; if ( id == null ) { return ; } if ( bufferType == this . EXPLICIT_BUFFER ) { this . explicitBuffer . remove ( id ) ; } else if ( bufferType == this . SCAN_BUFFER ) { this ... | returnToPool boolean is used by GC buffer only | 279 | 10 |
161,325 | protected synchronized void remove ( Object id ) { // final String methodName = "remove(Object)"; if ( id == null ) { return ; } this . explicitBuffer . remove ( id ) ; this . scanBuffer . remove ( id ) ; // this.garbageCollectorBuffer.remove(id); // if (id instanceof HTODDynacache.EvictionTableEntry) // cod.htod.evict... | Call this method to remove a specified cache id from invalidation buffers excluding garbage collector buffers . | 111 | 18 |
161,326 | protected synchronized ValueSet getAndRemoveFromExplicitBuffer ( ) { final String methodName = "getAndRemoveFromExplicitBuffer()" ; ValueSet valueSet = null ; if ( this . explicitBuffer . size ( ) == 0 ) { valueSet = new ValueSet ( 1 ) ; } else { valueSet = new ValueSet ( this . explicitBuffer . size ( ) ) ; Iterator i... | Call this method to get and remove all the cache ids from explicit buffer . | 218 | 16 |
161,327 | protected synchronized boolean findAndRemoveFromGCBuffer ( long expirationTime , int hashcode , int size ) { EvictionTableEntry evt = null ; int i ; for ( i = 0 ; i < garbageCollectorBuffer . size ( ) ; i ++ ) { evt = ( EvictionTableEntry ) garbageCollectorBuffer . get ( i ) ; if ( evt . expirationTime == expirationTim... | Call this method to get and remove the EVT from GC buffer . | 165 | 14 |
161,328 | protected synchronized void clear ( int bufferType ) { final String methodName = "clear()" ; if ( bufferType == HTODInvalidationBuffer . EXPLICIT_BUFFER ) { this . explicitBuffer . clear ( ) ; } else if ( bufferType == HTODInvalidationBuffer . SCAN_BUFFER ) { this . scanBuffer . clear ( ) ; } else if ( bufferType == HT... | Call this method to clear the invalidation buffers . | 207 | 10 |
161,329 | protected synchronized void invokeBackgroundInvalidation ( boolean scan ) { final String methodName = "invokeBackgroundInvalidation()" ; if ( ! stopping ) { synchronized ( cod . diskCleanupThread . dcMonitor ) { if ( cod . diskCleanupThread . currentThread != null ) { this . cod . invokeDiskCleanup ( scan ) ; } else { ... | Call this method to invoke LPBT . | 125 | 8 |
161,330 | protected synchronized boolean contains ( Object id ) { boolean found = false ; if ( this . explicitBuffer . containsKey ( id ) || this . scanBuffer . contains ( id ) ) { found = true ; } return found ; } | Call this method to check whether a specified id exists in the invalidation explicit or scan buffer . | 47 | 19 |
161,331 | @ Trivial public synchronized boolean isFull ( ) { // final String methodName = "isFull()"; boolean isFull = false ; int size = this . explicitBuffer . size ( ) + this . scanBuffer . size ( ) + this . garbageCollectorBuffer . size ( ) ; if ( size > this . maxInvalidationBufferSize || ( System . currentTimeMillis ( ) - ... | Call this method to check whether a full condition is met to start LPBT . | 177 | 16 |
161,332 | protected synchronized void filter ( ValueSet filterValueSet ) { boolean explicitBufferEmpty = this . explicitBuffer . isEmpty ( ) ; boolean scanBufferEmpty = this . scanBuffer . isEmpty ( ) ; if ( filterValueSet != null && ! filterValueSet . isEmpty ( ) && ( ! explicitBufferEmpty || ! scanBufferEmpty ) ) { Iterator it... | Call this method to filter out the specified collection of cache ids based on invalidation buffers . | 159 | 19 |
161,333 | @ Trivial protected synchronized int size ( int bufferType ) { if ( bufferType == EXPLICIT_BUFFER ) { return this . explicitBuffer . size ( ) ; } else if ( bufferType == SCAN_BUFFER ) { return this . scanBuffer . size ( ) ; } else if ( bufferType == GC_BUFFER ) { return this . garbageCollectorBuffer . size ( ) ; } retu... | Call this method to get the size from one of invalidation buffers . | 91 | 14 |
161,334 | protected synchronized boolean isBackgroundInvalidationInProgress ( ) { boolean cleanupThreadRunning = false ; if ( this . cod . diskCleanupThread != null ) { synchronized ( cod . diskCleanupThread . dcMonitor ) { cleanupThreadRunning = this . cod . diskCleanupThread . currentThread != null ; } } boolean garbageCollect... | Call this method to check the state of LPBT in Progress . | 140 | 13 |
161,335 | protected synchronized boolean isLoopOnce ( ) { final String methodName = "isLoopOnce()" ; if ( loopOnce ) { traceDebug ( methodName , "cacheName=" + this . cod . cacheName + " isLoopOnce=" + loopOnce + " explicitBuffer=" + explicitBuffer . size ( ) + " scanBuffer=" + this . scanBuffer . size ( ) ) ; } return this . lo... | Call this method to check the state of Loop Once . | 89 | 11 |
161,336 | protected synchronized void setStopping ( boolean stopping ) { final String methodName = "setStopping()" ; this . stopping = stopping ; traceDebug ( methodName , "cacheName=" + this . cod . cacheName + " stopping=" + this . stopping ) ; } | Call this method to set the state of Stopping . No more invoking the LPBT . | 57 | 18 |
161,337 | @ Override public void updateProperties ( Dictionary < String , Object > properties ) throws IOException { lock . lock ( ) ; try { doUpdateProperties ( properties ) ; } finally { lock . unlock ( ) ; } } | without other guards separating updating the properties and sending configuration events can result in missing and duplicate update events even if every update is eventually associated with an event . | 48 | 30 |
161,338 | @ Override public void updateCache ( Dictionary < String , Object > properties , Set < ConfigID > references , Set < String > newUniques ) throws IOException { lock . lock ( ) ; try { removeReferences ( ) ; setProperties ( properties ) ; this . references = references ; this . uniqueVariables = newUniques ; caFactory .... | Updates ConfigurationAdmin s cache with current config properties . If replaceProp is set to true current config properties is replace with the given properties before caching and the internal pid - to - config table is updated to reflect the new config properties . | 118 | 47 |
161,339 | private void setProperties ( Dictionary < String , ? > d ) { if ( d == null ) { this . properties = null ; return ; } ConfigurationDictionary newDictionary = new ConfigurationDictionary ( ) ; Enumeration < String > keys = d . keys ( ) ; while ( keys . hasMoreElements ( ) ) { String key = keys . nextElement ( ) ; if ( n... | This is not part of Configuration interface . It sets configuration dictionary with specified dictionary and updates configuration attributes if they are not set and found in given dictionary . | 399 | 30 |
161,340 | @ SuppressWarnings ( "unchecked" ) public static Object proprietaryEvaluate ( final String expression , final Class expectedType , final PageContext pageContext , final ProtectedFunctionMapper functionMap , final boolean escape ) throws ELException { Object retValue ; ExpressionFactory exprFactorySetInPageContext = ( E... | Proprietary method to evaluate EL expressions . XXX - This method should go away once the EL interpreter moves out of JSTL and into its own project . For now this is necessary because the standard machinery is too slow . | 281 | 45 |
161,341 | public void addListener ( InstallEventListener listener , String notificationType ) { if ( listener == null || notificationType == null ) return ; if ( notificationType . isEmpty ( ) ) return ; if ( listenersMap == null ) { listenersMap = new HashMap < String , Collection < InstallEventListener > > ( ) ; } Collection <... | Adds an install event listener to the listenersMap with a specified notification type | 126 | 14 |
161,342 | public void removeListener ( InstallEventListener listener ) { if ( listenersMap != null ) { for ( Collection < InstallEventListener > listeners : listenersMap . values ( ) ) { listeners . remove ( listener ) ; } } } | Removes a listener from listenersMap | 47 | 7 |
161,343 | public void fireProgressEvent ( int state , int progress , String message ) throws Exception { if ( listenersMap != null ) { Collection < InstallEventListener > listeners = listenersMap . get ( InstallConstants . EVENT_TYPE_PROGRESS ) ; if ( listeners != null ) { for ( InstallEventListener listener : listeners ) { list... | Fires progress event messages | 92 | 5 |
161,344 | public void putToFront ( QueueData queueData , short msgBatch ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putToFront" , new Object [ ] { queueData , msgBatch } ) ; _put ( queueData , msgBatch , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc ... | Places a message on to the front of the proxy queue so that the next get operation will consume it . | 121 | 22 |
161,345 | public synchronized JsMessage [ ] getBatch ( int batchSize , short id ) throws SIResourceException , SIConnectionDroppedException , SIConnectionLostException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getBatch" , "" + batchSize ) ; int size ; synchronized (... | Gets a batch of several messages from the queue . | 204 | 11 |
161,346 | public synchronized void setTrackBytes ( boolean trackBytes ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setTrackBytes" , trackBytes ) ; this . trackBytes = trackBytes ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit... | Sets the trackBytes parameter . This flag is used to indicate whether this queue should keep track of the bytes on the queue and request more from the server when it is running low . | 100 | 37 |
161,347 | public void reset ( ) { current = null ; _hasWritten = false ; byteBuffersRetrieved = false ; limit = - 1 ; total = 0 ; if ( ! byteBuffersRetrieved ) { ListIterator < WsByteBuffer > it = bbList . listIterator ( ) ; while ( it . hasNext ( ) ) { WsByteBuffer next = it . next ( ) ; next . release ( ) ; it . remove ( ) ; }... | clean up ... | 99 | 3 |
161,348 | public void write ( byte [ ] buf , int offset , int len ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { // 306998.15 Tr . debug ( tc , "write len --> " + len + ", limit->" + limit ) ; } if ( len < 0 ) { if ( tc . isErrorEnabled ( ) ) Tr . error ( tc , "Illegal.Argumen... | Writes a byte array | 317 | 5 |
161,349 | @ Override public void doWork ( Work work , long startTimeout , ExecutionContext execContext , WorkListener workListener ) throws WorkException { try { beforeRunCheck ( work , workListener , startTimeout ) ; new WorkProxy ( work , startTimeout , execContext , workListener , bootstrapContext , runningWork , false ) . ca... | This method does not return until the work is completed as the caller expects to wait until the work is completed before getting control back . This method accomplishes this by NOT spinning a thread . | 165 | 37 |
161,350 | @ Override public void scheduleWork ( Work work , long startTimeout , ExecutionContext execContext , WorkListener workListener ) throws WorkException { try { beforeRunCheck ( work , workListener , startTimeout ) ; WorkProxy workProxy = new WorkProxy ( work , startTimeout , execContext , workListener , bootstrapContext ... | This method puts the work on a queue that is later processed by the scheduler thread . This allows the method to return to the caller without having to wait for the thread to start . | 236 | 37 |
161,351 | @ Trivial private void beforeRunCheck ( Work work , WorkListener workListener , long startTimeout ) throws WorkRejectedException { WorkRejectedException wrex = null ; if ( work == null ) { wrex = new WorkRejectedException ( new NullPointerException ( "work" ) ) ; wrex . setErrorCode ( WorkException . UNDEFINED ) ; } el... | Input parameter checks that can be done before calling run . | 218 | 11 |
161,352 | public void stop ( ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; // Stop accepting work stopped = true ; // Cancel futures for submitted work for ( Future < Void > future = futures . poll ( ) ; future != null ; future = futures . poll ( ) ) if ( ! future . isDone ( ) && future . cancel ( true ) )... | Provides a way to stop the WorkManager . | 172 | 10 |
161,353 | public void close ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" ) ; // begin F177053 ChannelFramework framework = ChannelFrameworkFactory . getChannelFramework ( ) ; // F196678.10 try { framework . stopChain ( chainInbound , CHAIN_STOP_TIME ) ; } catch ( ChainException e ) { FFDCFilter . proc... | Stops the listener port listening . | 313 | 7 |
161,354 | public AcceptListener getAcceptListener ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getAcceptListener" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getAcceptListener" , acceptListener ) ; return acceptListener ; } | Returns the accept listener associated with this listener port . | 71 | 10 |
161,355 | public int getPortNumber ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getPortNumber" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPortNumber" , "" + portNumber ) ; return portNumber ; } | Returns the port number associated with this listener port . | 72 | 10 |
161,356 | public static boolean containsRoutingContext ( RESTRequest request ) { if ( request . getHeader ( RESTHandlerContainer . COLLECTIVE_HOST_NAMES ) != null ) { return true ; } //No routing header found, so check query strings return getQueryParameterValue ( request , RESTHandlerContainer . COLLECTIVE_HOST_NAMES ) != null ... | Quick check for multiple routing context without actually fetching all pieces | 82 | 12 |
161,357 | private PersistenceServiceUnit createPsu ( int jobInstanceVersion , int jobExecutionVersion ) throws Exception { return databaseStore . createPersistenceServiceUnit ( getJobInstanceEntityClass ( jobInstanceVersion ) . getClassLoader ( ) , getJobExecutionEntityClass ( jobExecutionVersion ) . getName ( ) , getJobInstance... | Creates a PersistenceServiceUnit using the specified entity versions . | 138 | 13 |
161,358 | public JobExecution updateJobExecutionAndInstanceFinalStatus ( PersistenceServiceUnit psu , final long jobExecutionId , final BatchStatus finalBatchStatus , final String finalExitStatus , final Date endTime ) throws NoSuchJobExecutionException { EntityManager em = psu . createEntityManager ( ) ; try { return new TranRe... | This method is called during recovery as well as during normal operation . | 437 | 13 |
161,359 | @ Override public List < StepExecution > getStepExecutionsTopLevelFromJobExecutionId ( final long jobExecutionId ) throws NoSuchJobExecutionException { final EntityManager em = getPsu ( ) . createEntityManager ( ) ; try { List < StepExecution > exec = new TranRequest < List < StepExecution > > ( em ) { @ Override publi... | order by start time ascending | 289 | 5 |
161,360 | public RemotablePartitionEntity updateRemotablePartitionOnRecovery ( PersistenceServiceUnit psu , final RemotablePartitionEntity partition ) { // TODO Auto-generated method stub EntityManager em = psu . createEntityManager ( ) ; try { return new TranRequest < RemotablePartitionEntity > ( em ) { @ Override public Remota... | This method is called during recovery | 186 | 6 |
161,361 | public < T > void addMessageHandler ( Class < T > clazz , Whole < T > handler ) { connLink . addMessageHandler ( clazz , handler ) ; } | websocket 1 . 1 methods | 37 | 7 |
161,362 | public String promptForUser ( String arg ) { String user = console . readLine ( CommandUtils . getMessage ( "user.enterText" , arg ) + " " ) ; return user ; } | Prompt the user to enter text . | 43 | 8 |
161,363 | public void end ( Xid xid , int flags ) throws XAException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "end" , new Object [ ] { ivManagedConnection , AdapterUtil . toString ( xid ) , AdapterUtil . getXAResourceEndFlagString ( flags ) } ) ; try { if ( flags == XA... | XAException with return code XA_RBROLLBACK | 377 | 14 |
161,364 | public void rollback ( Xid xid ) throws XAException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "rollback" , new Object [ ] { ivManagedConnection , AdapterUtil . toString ( xid ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { ... | XAER_RMERR return code in XAException | 819 | 13 |
161,365 | private static BundleContext getBundleContext ( final Bundle bundle ) { if ( System . getSecurityManager ( ) == null ) return bundle . getBundleContext ( ) ; else return AccessController . doPrivileged ( new PrivilegedAction < BundleContext > ( ) { @ Override public BundleContext run ( ) { return bundle . getBundleCont... | no need for an updatedJdbcDriver because changes will not impact the mbean | 81 | 17 |
161,366 | public static void debugHtml ( Writer writer , FacesContext faces , Throwable e ) throws IOException { debugHtml ( writer , faces , faces . getViewRoot ( ) , null , e ) ; } | Generates the HTML error page for the given Throwable and writes it to the given writer . | 44 | 19 |
161,367 | public static void debugHtml ( Writer writer , FacesContext faces ) throws IOException { _init ( faces ) ; Date now = new Date ( ) ; for ( int i = 0 ; i < debugParts . length ; i ++ ) { if ( "message" . equals ( debugParts [ i ] ) ) { writer . write ( faces . getViewRoot ( ) . getViewId ( ) ) ; } else if ( "now" . equa... | Generates the HTML debug page for the current view and writes it to the given writer . | 248 | 18 |
161,368 | private int hashToTable ( Long id , Entry [ ] table ) { int posVal = id . intValue ( ) & Integer . MAX_VALUE ; return ( posVal % table . length ) ; } | The Long Id is already effectively a hashcode for the Schema and should be unique . All we should need to do is get a positive integer version of it & divide by the table size . | 43 | 39 |
161,369 | private void resize ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "resize" , table . length ) ; Entry [ ] newTable = new Entry [ table . length + ( table . length / 2 ) ] ; /* We have to walk the entire SchemaSet, rehashing each Entry and putting */ /* it i... | Resize the SchemaSet adding 50% to the size . | 268 | 13 |
161,370 | public String toVerboseString ( ) { /* Take a local reference to the table in case a resize happens. */ Entry [ ] tempTable = table ; StringBuffer buf = new StringBuffer ( ) ; /* Include the SchemaSet hashcode just in case we need to distinguish them */ buf . append ( "SchemaSet " ) ; buf . append ( this . hashCode ( )... | Returns a printable view of the SchemaSet and contents for use in debugging and Unit Tests . | 225 | 20 |
161,371 | private static final String debugId ( Object o ) { Long id = ( Long ) o ; byte [ ] buf = new byte [ 8 ] ; ArrayUtil . writeLong ( buf , 0 , id . longValue ( ) ) ; return HexUtil . toString ( buf ) ; } | Write a Schema Id out as a hex string . | 61 | 11 |
161,372 | @ XmlElement ( name = "authentication-mechanism-type" , required = true ) public void setAuthenticationMechanismType ( String authMech ) { AuthenticationMechanismType type = AuthenticationMechanismType . valueOf ( authMech ) ; authenticationMechanismType = type . name ( ) ; } | Set the authentication mechanism type | 66 | 5 |
161,373 | @ FFDCIgnore ( ClassCastException . class ) void autoBind ( WSName subname , Object obj ) throws InvalidNameException , NotContextException , NameAlreadyBoundException { ContextNode target = this , parent = this ; int i = 0 ; try { for ( /* int i = 0 */ ; i < subname . size ( ) - 1 ; i ++ ) { String elem = subname . ge... | Works like bind but automatically creates intermediate contexts if they do not exist . Any automatically created contexts will be cleaned up automatically when their last child is unbound . | 465 | 31 |
161,374 | @ Override protected void onMethodEntry ( ) { if ( enabledListeners . isEmpty ( ) ) return ; String probeKey = createKey ( ) ; ProbeImpl probe = getProbe ( probeKey ) ; long probeId = probe . getIdentifier ( ) ; setProbeInProgress ( true ) ; visitLdcInsn ( Long . valueOf ( probeId ) ) ; // long1 long2 if ( isStatic ( )... | Inject the byte code required to fire a method entry probe . | 203 | 13 |
161,375 | static long getBufAddress ( ByteBuffer theBuffer ) { /* * This only works for DIRECT byte buffers. Direct ByteBuffers have a field called "address" which * holds the physical address of the start of the buffer contents in native memory. * This method obtains the value of the address field through reflection. */ if ( ! ... | Returns the address of the start of the given direct byte buffer in OS memory . | 217 | 16 |
161,376 | public AsyncFuture getFutureFromIndex ( int theIndex ) { if ( theIndex == READ_FUTURE_INDEX || theIndex == SYNC_READ_FUTURE_INDEX ) { return this . readFuture ; } if ( theIndex == WRITE_FUTURE_INDEX || theIndex == SYNC_WRITE_FUTURE_INDEX ) { return this . writeFuture ; } return null ; } | Gets the Future corresponding to a supplied index value . | 93 | 11 |
161,377 | void cancel ( AsyncChannelFuture future , Exception reason ) throws ClosedChannelException , IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "cancel" ) ; } if ( ! isOpen ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr .... | Package private version of cancel which takes an exception as an additional parameter . The exception is applied to the future on cancellation . | 478 | 24 |
161,378 | public void enable ( int level ) { if ( level >= PmiConstants . LEVEL_HIGH ) sync = true ; else sync = false ; if ( ! enabled ) { enabled = true ; reset ( ) ; } } | mark the data enabled and reset the value and createTime | 47 | 11 |
161,379 | protected final Bucket < K , V > getBucketForKey ( K key ) { int bucket_index = ( key . hashCode ( ) & 0x7FFFFFFF ) % buckets . length ; Bucket < K , V > thebucket = buckets [ bucket_index ] ; if ( thebucket == null ) { synchronized ( this ) { thebucket = buckets [ bucket_index ] ; if ( thebucket == null ) { thebucket ... | Returns the bucket which the specified key hashes to | 134 | 9 |
161,380 | protected void introspect ( ObjectName objectName , QueryExp query , PrintWriter writer ) { // Iterate over the mbean servers, query for the beans, introspect for ( MBeanServer mbeanServer : getMBeanServers ( ) ) { for ( ObjectName mbean : mbeanServer . queryNames ( objectName , query ) ) { introspectMBeanAttributes ( ... | GIven a JMX object name and a filter introspect all matching MBeans that are found associated with registered MBean servers . | 96 | 28 |
161,381 | String getFormattedArray ( Object attribute , String indent ) { int arrayLength = Array . getLength ( attribute ) ; if ( arrayLength == 0 ) { return "[]" ; } Class < ? > componentType = attribute . getClass ( ) . getComponentType ( ) ; // For the 8 primitive types, a cast is necessary when invoking // Arrays.toString. ... | Format an array . | 520 | 4 |
161,382 | String getFormattedCompositeData ( CompositeData cd , String indent ) { StringBuilder sb = new StringBuilder ( ) ; indent += INDENT ; CompositeType type = cd . getCompositeType ( ) ; for ( String key : type . keySet ( ) ) { sb . append ( "\n" ) . append ( indent ) ; sb . append ( key ) . append ( ": " ) ; OpenType < ? ... | Format an open MBean composite data attribute . | 232 | 10 |
161,383 | @ SuppressWarnings ( "unchecked" ) String getFormattedTabularData ( TabularData td , String indent ) { StringBuilder sb = new StringBuilder ( ) ; indent += INDENT ; sb . append ( "{" ) ; Collection < CompositeData > values = ( Collection < CompositeData > ) td . values ( ) ; int valuesRemaining = values . size ( ) ; fo... | Format an open MBean tabular data attribute . | 167 | 11 |
161,384 | @ Override public void handle ( Callback [ ] callbacks ) throws IOException , UnsupportedCallbackException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "handle" ) ; } if ( callbacks == null || callbacks . length == 0 ) { if ( TraceComponent . isAnyTracingEnabled ( ) &... | This method is invoked by the resource adapter after passing the list of callbacks that it needs the application server to handle . The behaviour of the handler for each of the callbacks is given below | 708 | 38 |
161,385 | private void arrangeCallbacks ( Callback [ ] callbacks ) { if ( callbacks [ 0 ] instanceof CallerPrincipalCallback ) return ; int length = callbacks . length ; for ( int i = 0 ; i < length ; i ++ ) { if ( callbacks [ i ] instanceof CallerPrincipalCallback ) { Callback callback = callbacks [ 0 ] ; callbacks [ 0 ] = call... | This method is called to ensure that the first callback is always a CallerPrincipalCallback irrespective of the order in which the callbacks are passed in by the resource adapter . If we need to return false to the PasswordValidationCallback when the name passed in by the CallerPrincipalCallback is different from the o... | 103 | 85 |
161,386 | public final void makeEmptyAndClean ( ) { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "makeEmptyAndClean"); makeEmpty ( ) ; for ( int i = 0 ; i < m_array . length ; ++ i ) m_array [ i ] = null ; // if (tc.isEntryEnabled()) // SibTr.entry(tc, "makeEmptyAndClean"); } | Empty the queue and also set every element of the internal array to null so that the removed elements can be GC d . | 91 | 24 |
161,387 | public final int size ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "size" ) ; int result = ( m_tail >= m_head ) ? ( m_tail - m_head ) : ( m_array . length - m_head + m_tail ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "size" , new Integer ( result ) ) ; return result ; } | Return the number of elements in the queue . | 102 | 9 |
161,388 | public final void enqueue ( Object obj ) { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "enqueue", obj); // m_array has at least one position in it that is free. m_array [ m_tail ++ ] = obj ; if ( m_tail == m_array . length ) m_tail = 0 ; if ( m_head == m_tail ) expand_array ( ) ; // if (tc.isEntryEnabled()) // SibTr... | Store an object in the queue . | 118 | 7 |
161,389 | public final Object dequeue ( ) throws NoSuchElementException { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "dequeue"); if ( m_head == m_tail ) throw new NoSuchElementException ( ) ; Object obj = m_array [ m_head ] ; m_array [ m_head ++ ] = null ; if ( m_head == m_array . length ) m_head = 0 ; // if (tc.isEntryEnabl... | Return the first element on the queue . | 124 | 8 |
161,390 | private final void expand_array ( ) { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "expand_array"); int length = m_array . length ; Object [ ] m_new = new Object [ length * 2 ] ; System . arraycopy ( m_array , m_head , m_new , m_head , length - m_head ) ; System . arraycopy ( m_array , 0 , m_new , length , m_tail ) ;... | Increase the size of the internal array to accomodate more queue elements . | 146 | 16 |
161,391 | @ Override public LinkedHashMap < String , Object > getConfigDump ( String aLocalId , boolean aRegisteredOnly ) { // 327843 removed unused parameter if ( TC . isEntryEnabled ( ) ) { Tr . entry ( this , TC , "getConfigDump" ) ; } LinkedHashMap < String , Object > cp = new LinkedHashMap < String , Object > ( ) ; if ( TC ... | Generate a config dump containing all the attributes which match the regular expression . | 120 | 15 |
161,392 | private Transactional findInterceptorFromStereotype ( Annotation [ ] anns ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "findInterceptorFromStereotype" , new Object [ ] { anns , this } ) ; Transactional ret = null ; for ( Annotation ann : anns ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Examining annot... | it here . | 253 | 3 |
161,393 | private void writeObject ( java . io . ObjectOutputStream out ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "writeObject : " + this ) ; // d468174 out . writeObject ( ivPuRefId ) ; out . writeObject ( ivJ2eeName ) ; // d510184 out . writeObject ( ivR... | Instance serialization . | 162 | 4 |
161,394 | protected void registerEmInvocation ( UOWCoordinator uowCoord , Synchronization emInvocation ) { try { ivAbstractJPAComponent . getEmbeddableWebSphereTransactionManager ( ) . registerSynchronization ( uowCoord , emInvocation , SYNC_TIER_OUTER ) ; //d638095.4 } catch ( Exception e ) { if ( TraceComponent . isAnyTracingE... | d638095 . 4 | 176 | 6 |
161,395 | private void buildDiscriminatorNodes ( DiscriminatorNode node ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "buildDiscriminatorNodes: " + node ) ; } DiscriminatorNode dn = node ; if ( dn == null ) { return ; } DiscriminatorNode newDN = null , lastDN = null ; discrimi... | Copy this DiscriminatorNode list . | 250 | 8 |
161,396 | @ Override public void addDiscriminator ( Discriminator d , int weight ) throws DiscriminationProcessException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "addDiscriminator: " + d + " weight=" + weight ) ; } if ( status == STARTED ) { DiscriminationProcessException e... | Adds a discriminator to the group . Attempts to add the same discriminator more than once are ignored . It is an error to attempt to add a discriminator which is not able to deal with the groups type of discriminatory data . A class cast exception is thrown if this is attempted . | 560 | 58 |
161,397 | private void addDiscriminatorNode ( DiscriminatorNode dn ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addDiscriminatorNode, weight=" + dn . weight ) ; } if ( discriminators == null ) { // add it as the first node discriminators = dn ; if ( TraceComponent . isAnyTra... | add a discriminatorNode to the linked list . | 498 | 10 |
161,398 | private void removeDiscriminatorNode ( Discriminator d ) throws DiscriminationProcessException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "removeDiscriminatorNode: " + d ) ; } if ( d == null ) { DiscriminationProcessException e = new DiscriminationProcessException (... | remove the discriminatorNode from the linkedList . | 498 | 10 |
161,399 | @ Override public void start ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Started discriminator list " + discAL + "with size" + discAL . size ( ) ) ; } if ( discAL . size ( ) > 1 ) { rebuildDiscriminatorList ( ) ; discriminationAlgorithm = new MultiDiscriminatorA... | Start this DiscriminatorProcess . | 150 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.