idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
160,700 | public boolean removeEntry ( Object dependency , Object entry ) { //SKS-O boolean found = false ; ValueSet valueSet = ( ValueSet ) dependencyToEntryTable . get ( dependency ) ; if ( valueSet == null ) { return found ; } found = valueSet . remove ( entry ) ; if ( valueSet . size ( ) == 0 ) removeDependency ( dependency ... | SKS - O | 86 | 4 |
160,701 | protected void modified ( String id , Map < String , Object > properties ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "modified " + id , properties ) ; } config = properties ; myProps = null ; } | DS method to modify this component . | 67 | 7 |
160,702 | protected ReadableLogRecord getReadableLogRecord ( long expectedSequenceNumber ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getReadableLogRecord" , new java . lang . Object [ ] { this , new Long ( expectedSequenceNumber ) } ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Creating readable log record to r... | Read a composite record from the disk . The caller supplies the expected sequence number of the record and this method confirms that this matches the next record recovered . | 170 | 30 |
160,703 | void fileClose ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fileClose" , this ) ; if ( _fileChannel != null ) { try { // Don't close channel as it will free a lock - wait until file close if ( _outstandingWritableLogRecords . get ( ) == 0 && ! _exceptionInForce ) { force ( ) ; // ... | Close the file managed by this LogFileHandle instance . | 305 | 11 |
160,704 | public WriteableLogRecord getWriteableLogRecord ( int recordLength , long sequenceNumber ) throws InternalLogException { if ( ! _headerFlushedFollowingRestart ) { // ensure header is updated now we start to write records for the first time // synchronization is assured through locks in LogHandle.getWriteableLogRecord w... | Get a new WritableLogRecord for the log file managed by this LogFileHandleInstance . The size of the record must be specified along with the record s sequence number . It is the caller s responsbility to ensure that both the sequence number is correct and that the record written using the returned WritableLogRecord is ... | 348 | 70 |
160,705 | private void writeFileHeader ( boolean maintainPosition ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "writeFileHeader" , new java . lang . Object [ ] { this , new Boolean ( maintainPosition ) } ) ; // Build the buffer that forms the major part of the file header and // then convert t... | Writes the file header stored in _logFileHeader to the file managed by this LogFileHandle instance . | 320 | 22 |
160,706 | private void writeFileStatus ( boolean maintainPosition ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "writeFileStatus" , new java . lang . Object [ ] { this , new Boolean ( maintainPosition ) } ) ; if ( _logFileHeader . status ( ) == LogFileHeader . STATUS_INVALID ) { if ( tc . isEnt... | Updates the status field of the file managed by this LogFileHandle instance . The status field is stored in _logFileHeader . | 391 | 27 |
160,707 | protected LogFileHeader logFileHeader ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "logFileHeader" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "logFileHeader" , _logFileHeader ) ; return _logFileHeader ; } | Accessor for the log file header object assoicated with this LogFileHandle instance . | 70 | 18 |
160,708 | public byte [ ] getServiceData ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getServiceData" , this ) ; byte [ ] serviceData = null ; if ( _logFileHeader != null ) { serviceData = _logFileHeader . getServiceData ( ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getServiceData" , RLSUtils . toHexString ... | Accessor for the service data assoicated with this LogFileHandle instance . | 124 | 16 |
160,709 | public int freeBytes ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "freeBytes" , this ) ; int freeBytes = 0 ; try { int currentCursorPosition = _fileBuffer . position ( ) ; int fileLength = _fileBuffer . capacity ( ) ; freeBytes = fileLength - currentCursorPosition ; if ( freeBytes < 0 ) { freeBytes = 0 ; } } ... | Returns the number of free bytes remaining in the file associated with this LogFileHandle instance . | 178 | 18 |
160,710 | public String fileName ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fileName" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "fileName" , _fileName ) ; return _fileName ; } | Returns the name of the file associated with this LogFileHandle instance | 63 | 13 |
160,711 | void keypointStarting ( long nextRecordSequenceNumber ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "keypointStarting" , new Object [ ] { new Long ( nextRecordSequenceNumber ) , this } ) ; // Set the header to indicate a keypoint operation. This also marks the header // as valid. _log... | Informs the LogFileHandle instance that a keypoint operation is about begin into the file associated with this LogFileHandle instance . The status of the log file is updated to KEYPOINTING and written to disk . | 295 | 44 |
160,712 | void keypointComplete ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "keypointComplete" , this ) ; _logFileHeader . keypointComplete ( ) ; try { writeFileStatus ( true ) ; } catch ( InternalLogException exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.recoverylog.spi.LogFile... | Informs the LogFileHandle instance that a keypoint operation into the file has completed . The status of the log file is updated to ACTIVE and written to disk . | 248 | 34 |
160,713 | void becomeInactive ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "becomeInactive" , this ) ; _logFileHeader . changeStatus ( LogFileHeader . STATUS_INACTIVE ) ; try { writeFileStatus ( false ) ; } catch ( InternalLogException exc ) { FFDCFilter . processException ( exc , "com.ibm.w... | This method is invoked to inform the LogFileHandle instance that the file it manages is no longer required by the recovery log serivce . The status field stored in the header is updated to INACTIVE . | 265 | 42 |
160,714 | public void fileExtend ( int newFileSize ) throws LogAllocationException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fileExtend" , new Object [ ] { new Integer ( newFileSize ) , this } ) ; final int fileLength = _fileBuffer . capacity ( ) ; if ( fileLength < newFileSize ) { try { // Expand the file to the new s... | Extend the physical log file . If newFileSize is larger than the current file size the log file will extended so that it is newFileSize kilobytes long . If newFileSize is equal to or less than the current file size the current log file will be unchanged . | 524 | 57 |
160,715 | protected void force ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "force" , this ) ; try { if ( _isMapped ) { // Note: on Win2K we can get an IOException from this even though it is not declared ( ( MappedByteBuffer ) _fileBuffer ) . force ( ) ; } else { // Write the "pending" Writ... | Forces the contents of the memory - mapped view of the log file to disk . Having invoked this method the caller can be certain that any data added to the log as part of a prior log write is now stored persistently on disk . | 527 | 48 |
160,716 | private String normalize ( String alias ) { // replace all the '.'s to '\.'s String regExp = alias . replaceAll ( "[\\.]" , "\\\\\\." ) ; // replace all the '*'s to '.*'s regExp = regExp . replaceAll ( "[*]" , "\\.\\*" ) ; // System.out.println("Normalized "+alias+" to "+regExp); return regExp ; } | This method normalizes the alias into a valid regular expression | 98 | 11 |
160,717 | public Iterator targetMappings ( ) { // System.out.println("TargetMappings called"); // return vHostTable.values().iterator(); 316624 Collection vHosts = vHostTable . values ( ) ; // 316624 List l = new ArrayList ( ) ; // 316624 l . addAll ( vHosts ) ; // 316624 return l . listIterator ( ) ; // 316624 } | Returns an enumeration of all the target mappings added to this mapper | 91 | 15 |
160,718 | public final BehindRef insert ( final AbstractItemLink insertAil ) { final long insertPosition = insertAil . getPosition ( ) ; boolean inserted = false ; BehindRef addref = null ; // Loop backwards through the list in order of decreasing sequence number // (addition usually near the end) until we have inserted the entr... | Inserts a reference to an AIL in the list of AILs behind the curent position of the cursor . The insertion is performed in position order . The list is composed of weak references and any which are discovered to refer to objects no longer on the heap are removed as we go . | 440 | 59 |
160,719 | private final void _remove ( final BehindRef removeref ) { if ( _firstLinkBehind != null ) { if ( removeref == _firstLinkBehind ) { // It's the first in the list ... if ( removeref == _lastLinkBehind ) { // ... and the only entry, the list is now empty _firstLinkBehind = null ; _lastLinkBehind = null ; } else { // ... ... | Removes the first AIL in the list of AILs behind the current position of the cursor . The list may empty completely as a result . | 268 | 30 |
160,720 | protected boolean invokeTraceRouters ( RoutedMessage routedTrace ) { boolean retMe = true ; LogRecord logRecord = routedTrace . getLogRecord ( ) ; /* * Avoid any feedback traces that are emitted after this point. * The first time the counter increments is the first pass-through. * The second time the counter increments... | Route only trace log records . Messages including Systemout err will not be routed to trace source to avoid duplicate entries | 323 | 22 |
160,721 | protected void publishTraceLogRecord ( TraceWriter detailLog , LogRecord logRecord , Object id , String formattedMsg , String formattedVerboseMsg ) { //check if tracefilename is stdout if ( formattedVerboseMsg == null ) { formattedVerboseMsg = formatter . formatVerboseMessage ( logRecord , formattedMsg , false ) ; } Ro... | Publish a trace log record . | 423 | 7 |
160,722 | @ Override public void setMessageRouter ( MessageRouter msgRouter ) { externalMessageRouter . set ( msgRouter ) ; if ( msgRouter instanceof WsMessageRouter ) { setWsMessageRouter ( ( WsMessageRouter ) msgRouter ) ; } } | Inject the SPI MessageRouter . | 64 | 8 |
160,723 | @ Override public void unsetMessageRouter ( MessageRouter msgRouter ) { externalMessageRouter . compareAndSet ( msgRouter , null ) ; if ( msgRouter instanceof WsMessageRouter ) { unsetWsMessageRouter ( ( WsMessageRouter ) msgRouter ) ; } } | Un - inject . | 70 | 4 |
160,724 | protected void initializeWriters ( LogProviderConfigImpl config ) { // createFileLog may or may not return the original log holder.. messagesLog = FileLogHolder . createFileLogHolder ( messagesLog , newFileLogHeader ( false , config ) , config . getLogDirectory ( ) , config . getMessageFileName ( ) , config . getMaxFil... | Initialize the log holders for messages and trace . If the TrService is configured at bootstrap time to use JSR - 47 logging the traceLog will not be created here as the LogRecord should be routed to logger rather than being formatted for the trace file . | 300 | 53 |
160,725 | @ Override public Object load ( String batchId ) { Object loadedArtifact ; loadedArtifact = getArtifactById ( batchId ) ; if ( loadedArtifact != null ) { if ( logger . isLoggable ( Level . FINEST ) ) { logger . finest ( "load: batchId: " + batchId + ", artifact: " + loadedArtifact + ", artifact class: " + loadedArtifac... | Use CDI to load the artifact with the given ID . | 111 | 12 |
160,726 | protected Bean < ? > getUniqueBeanByBeanName ( BeanManager bm , String batchId ) { Bean < ? > match = null ; // Get all beans with the given EL name (id). EL names are applied via @Named. // If the bean is not annotated with @Named, then it does not have an EL name // and therefore can't be looked up that way. Set < Be... | Use the given BeanManager to lookup a unique CDI - registered bean with bean name equal to batchId using EL matching rules . | 136 | 26 |
160,727 | @ FFDCIgnore ( BatchCDIAmbiguousResolutionCheckedException . class ) protected Bean < ? > getUniqueBeanForBatchXMLEntry ( BeanManager bm , String batchId ) { ClassLoader loader = getContextClassLoader ( ) ; BatchXMLMapper batchXMLMapper = new BatchXMLMapper ( loader ) ; Class < ? > clazz = batchXMLMapper . getArtifactB... | Use the given BeanManager to lookup a unique CDI - registered bean with bean class equal to the batch . xml entry mapped to be the batchId parameter | 210 | 31 |
160,728 | @ FFDCIgnore ( { ClassNotFoundException . class , BatchCDIAmbiguousResolutionCheckedException . class } ) protected Bean < ? > getUniqueBeanForClassName ( BeanManager bm , String className ) { // Ignore exceptions since will just failover to another loading mechanism try { Class < ? > clazz = getContextClassLoader ( ) ... | Use the given BeanManager to lookup the set of CDI - registered beans with the given class name . | 238 | 21 |
160,729 | private synchronized void createExecutor ( ) { if ( componentConfig == null ) { // this is a completely normal occurrence and can happen if a ThreadFactory is bound prior to // component activation... the proper thing to do is to do nothing and wait for activation return ; } if ( threadPoolController != null ) threadPo... | Create a thread pool executor with the configured attributes from this component config . | 453 | 15 |
160,730 | private < T > Collection < ? extends Callable < T > > wrap ( Collection < ? extends Callable < T > > tasks ) { List < Callable < T >> wrappedTasks = new ArrayList < Callable < T > > ( ) ; Iterator < ? extends Callable < T > > i = tasks . iterator ( ) ; while ( i . hasNext ( ) ) { Callable < T > c = wrap ( i . next ( ) ... | This is private so handling both interceptors and wrapping in this method for simplicity | 140 | 15 |
160,731 | public JsMessage next ( ) throws MessageDecodeFailedException , SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException , SINotAuthorizedException { if ( TraceComponent . isAnyTracing... | Returns the next message for a browse . | 209 | 8 |
160,732 | public void close ( ) throws SIResourceException , SIConnectionLostException , SIErrorException , SIConnectionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "close" ) ; if ( ! closed ) { // begin D249096 convHelper . closeSession ( ) ; queue . purge ( ... | Closes the proxy queue . | 151 | 6 |
160,733 | public void put ( CommsByteBuffer msgBuffer , short msgBatch , boolean lastInBatch , boolean chunk ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , new Object [ ] { msgBuffer , msgBatch , lastInBatch , chunk } ) ; QueueData queueData = null ; // If this ... | Places a browse message on the queue . | 682 | 9 |
160,734 | public void setBrowserSession ( BrowserSessionProxy browserSession ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setBrowserSession" , browserSession ) ; if ( this . browserSession != null ) { // We are flagging this here as we should never call setBrowserSession() ... | Sets the browser session this proxy queue is being used in conjunction with . | 359 | 15 |
160,735 | private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { GetField fields = in . readFields ( ) ; principal = ( String ) fields . get ( PRINCIPAL , null ) ; jwt = ( String ) fields . get ( JWT , null ) ; type = ( String ) fields . get ( TYPE , null ) ; handleClaims ( jwt ) ; } | Deserialize json web token . | 87 | 7 |
160,736 | private void writeObject ( ObjectOutputStream out ) throws IOException { PutField fields = out . putFields ( ) ; fields . put ( PRINCIPAL , principal ) ; fields . put ( JWT , jwt ) ; fields . put ( TYPE , type ) ; out . writeFields ( ) ; } | Serialize json web token . | 67 | 6 |
160,737 | private static JarFile _getAlternativeJarFile ( URL url ) throws IOException { String urlFile = url . getFile ( ) ; // Trim off any suffix - which is prefixed by "!/" on Weblogic int separatorIndex = urlFile . indexOf ( "!/" ) ; // OK, didn't find that. Try the less safe "!", used on OC4J if ( separatorIndex == - 1 ) {... | taken from org . apache . myfaces . view . facelets . util . Classpath | 196 | 20 |
160,738 | private void requestProcessed ( FacesContext facesContext ) { if ( ! _firstRequestProcessed ) { // The order here is important. First it is necessary to put // the value on application map before change the value here. // If multiple threads reach this point concurrently, the // variable will be written on the applicat... | This method places an attribute on the application map to indicate that the first request has been processed . This attribute is used by several methods in ApplicationImpl to determine whether or not to throw an IllegalStateException | 123 | 40 |
160,739 | @ Generated ( value = "com.ibm.jtc.jax.tools.xjc.Driver" , date = "2014-06-11T05:49:00-04:00" , comments = "JAXB RI v2.2.3-11/28/2011 06:21 AM(foreman)-" ) public List < Property > getPropertyList ( ) { if ( propertyList == null ) { propertyList = new ArrayList < Property > ( ) ; } return this . propertyList ; } | Gets the value of the propertyList property . | 114 | 10 |
160,740 | protected Token current ( ) { final String methodName = "current" ; Token currentToken ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName + toString ( ) ) ; currentToken = objectStore . like ( this ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isE... | Give back the current token if there is already one known to the Object Store for the same ManagedObject . | 133 | 22 |
160,741 | public final ManagedObject getManagedObject ( ) throws ObjectManagerException { // final String methodName = "getManagedObject"; // if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) // trace.entry(this, // cclass, // methodName); // Get the object if is already in memory. ManagedObject managedObject = null ;... | Find the ManagedObject handled by this token . | 293 | 10 |
160,742 | protected synchronized ManagedObject setManagedObject ( ManagedObject managedObject ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setManagedObject" + "managedObject=" + managedObject + "(ManagedObject)" + toString ( ) ) ; Manage... | Associate a new ManagedObject with this token . If there is already a managedObject associated with the Token it is replaced by making it a clone of the new ManagedObject so that existing references to the old ManagedObject becone refrences to the new one . | 387 | 55 |
160,743 | void invalidate ( ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "invalidate" ) ; // Prevent any attempt to load the object. objectStore = null ; // If the ManagedObject is already in memory access it, otherwise there is nothing // we need to do to it. if ( ma... | Make the token and any ManagedObject it refers to invalid . Used at shutdown to prevent accidental use of a ManagedObject in the ObjectManager that instantiated it or any other Object Manager . | 177 | 39 |
160,744 | public static final Token restore ( java . io . DataInputStream dataInputStream , ObjectManagerState objectManagerState ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( cclass , "restore" , new Object [ ] { dataInputStream , objectManagerState } ) ... | Recover the token described by a dataInputStream and resolve it ot the definitive token . | 421 | 18 |
160,745 | public static HttpEndpointImpl findEndpoint ( String endpointId ) { for ( HttpEndpointImpl i : instance . get ( ) ) { if ( i . getName ( ) . equals ( endpointId ) ) return i ; } return null ; } | Return the endpoint for the given id . | 55 | 8 |
160,746 | public synchronized List < Long > getTicksOnStream ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTicksOnStream" ) ; List < Long > msgs = new ArrayList < Long > ( ) ; StateStream stateStream = getStateStream ( ) ; // Initial range in stream is always completed ... | Gets a list of all tick values on the state stream | 256 | 12 |
160,747 | public void quit ( ) { try { this . keepOn = false ; if ( this . serverSocket != null && ! this . serverSocket . isClosed ( ) ) { this . serverSocket . close ( ) ; this . serverSocket = null ; } } catch ( final IOException e ) { throw new RuntimeException ( e ) ; } } | Exit POP3 server . | 73 | 5 |
160,748 | boolean contains ( String normalizedPath ) { if ( normalizedPath == null ) return false ; if ( normalizedPath . length ( ) < normalizedRoot . length ( ) ) return false ; return normalizedPath . regionMatches ( 0 , normalizedRoot , 0 , normalizedRoot . length ( ) ) ; } | Check if the provided path is contained within this root s hierarchy . | 62 | 13 |
160,749 | private static String getIPAddress ( ) { String rc ; try { rc = InetAddress . getLocalHost ( ) . getHostAddress ( ) ; } catch ( Exception e ) { // No FFDC code needed rc = Long . valueOf ( new Random ( ) . nextLong ( ) ) . toString ( ) ; } return rc ; } | InetAddress is compatible with both IPv4 & IPv6 | 73 | 12 |
160,750 | private SecurityMetadata getSecurityMetadata ( WebAppConfig webAppConfig ) { WebModuleMetaData wmmd = ( ( WebAppConfigExtended ) webAppConfig ) . getMetaData ( ) ; return ( SecurityMetadata ) wmmd . getSecurityMetaData ( ) ; } | Gets the security metadata from the web app config | 62 | 10 |
160,751 | private boolean isDenyUncoveredHttpMethods ( List < SecurityConstraint > scList ) { for ( SecurityConstraint sc : scList ) { List < WebResourceCollection > wrcList = sc . getWebResourceCollections ( ) ; for ( WebResourceCollection wrc : wrcList ) { if ( wrc . getDenyUncoveredHttpMethods ( ) ) { return true ; } } } retu... | Returns whether deny - uncovered - http - methods attribute is set . In order to check this value entire WebResourceCollection objects need to be examined since it only set properly when web . xml is processed . | 92 | 40 |
160,752 | @ Override public final DataSource createConnectionFactory ( ConnectionManager connMgr ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "createConnectionFactory" , connMgr ) ; DataSource connFactory = jdbcRuntime . newDataSourc... | Creates a javax . sql . DataSource that uses the application server provided connection manager to manage its connections . | 129 | 24 |
160,753 | private Connection getConnection ( PooledConnection pconn , WSConnectionRequestInfoImpl cri , String userName ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getConnection" , AdapterUtil . toString ( ... | Gets a java . sql . Connection from a PooledConnection use the cri to extract certain information if needed if trused context is supported ... | 343 | 30 |
160,754 | @ Override public Set < ManagedConnection > getInvalidConnections ( @ SuppressWarnings ( "rawtypes" ) Set connectionSet ) throws ResourceException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "getInvalidConnections" , connect... | The spec interface is defined with raw types so we have no choice but to declare it that way too | 265 | 20 |
160,755 | private Object getTraceable ( Object d ) throws ResourceException { WSJdbcTracer tracer = new WSJdbcTracer ( helper . getTracer ( ) , helper . getPrintWriter ( ) , d , type , null , true ) ; Set < Class < ? > > classes = new HashSet < Class < ? > > ( ) ; for ( Class < ? > cl = d . getClass ( ) ; cl != null ; cl = cl . ... | Enable supplemental tracing for the underlying data source or java . sql . Driver . | 161 | 15 |
160,756 | private void onConnect ( Connection con , String [ ] sqlCommands ) throws SQLException { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; TransactionManager tm = connectorSvc . getTransactionManager ( ) ; Transaction suspendedTx = null ; String currentSQL = null ; Throwable failure = null ; try { UOWCoo... | Execute the onConnect SQL commands . The connection won t be enlisted in a WAS transaction yet but it s necessary to suspend and WAS global transaction in order to avoid confusing the DB2 type 2 JDBC driver . | 345 | 43 |
160,757 | private void postGetConnectionHandling ( Connection conn ) throws SQLException { helper . doConnectionSetup ( conn ) ; String [ ] sqlCommands = dsConfig . get ( ) . onConnect ; if ( sqlCommands != null && sqlCommands . length > 0 ) onConnect ( conn , sqlCommands ) ; // Log the database and driver versions on first getC... | utility used to gather metadata info and issue doConnectionSetup . | 161 | 13 |
160,758 | final void reallySetLogWriter ( final PrintWriter out ) throws ResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setting the logWriter to:" , out ) ; if ( dataSourceOrDriver != null ) { try { AccessController . doPrivileged ( new PrivilegedException... | This method is to be used by RRA code to set logwriter when needed | 283 | 16 |
160,759 | public final int getLoginTimeout ( ) throws SQLException { try { if ( ! Driver . class . equals ( type ) ) { return ( ( CommonDataSource ) dataSourceOrDriver ) . getLoginTimeout ( ) ; } //Return that the default value is being used when using the Driver type return 0 ; } catch ( SQLException sqlX ) { FFDCFilter . proce... | Retrieves the login timeout for the DataSource . | 125 | 11 |
160,760 | @ Override public String formatRecord ( RepositoryLogRecord record , Locale locale ) { if ( null == record ) { throw new IllegalArgumentException ( "Record cannot be null" ) ; } StringBuilder sb = new StringBuilder ( 300 ) ; String lineSeparatorPlusPadding = "" ; // Use basic format createEventHeader ( record , sb ) ; ... | Formats a RepositoryLogRecord into a localized basic format output String . | 185 | 15 |
160,761 | public void addGlobalTagLibConfig ( GlobalTagLibConfig globalTagLibConfig ) { try { TldParser tldParser = new TldParser ( this , configManager , false , globalTagLibConfig . getClassloader ( ) ) ; if ( globalTagLibConfig . getClassloader ( ) == null ) loadTldFromJarInputStream ( globalTagLibConfig , tldParser ) ; else ... | add some GlobalTabLibConfig to the global tag libs we know about . If the provided config provides a classloader we will load the TLDs via that class loaders otherwise the JAR URL will be used to find the TLDs . | 203 | 51 |
160,762 | public static synchronized ClientConnectionManager getRef ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRef" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getRef" , instance ) ; return instance ; } | Returns a reference to the single instance of this class in existence . The class must have been previously initilised by a call to the initialise method - otherwise invoking this method will generate a runtime exception . This class implements the singleton design pattern . | 87 | 50 |
160,763 | @ Override public WSStatistic getStatistic ( int dataId ) { ArrayList members = copyStatistics ( ) ; if ( members == null || members . size ( ) <= 0 ) return null ; int sz = members . size ( ) ; for ( int i = 0 ; i < sz ; i ++ ) { StatisticImpl data = ( StatisticImpl ) members . get ( i ) ; if ( data != null && data . ... | get Statistic by data id | 111 | 6 |
160,764 | private synchronized void myupdate ( WSStats newStats , boolean keepOld , boolean recursiveUpdate ) { if ( newStats == null ) return ; StatsImpl newStats1 = ( StatsImpl ) newStats ; // update the level and description of this collection this . instrumentationLevel = newStats1 . getLevel ( ) ; // update data updateMembe... | Assume we have verified newStats is the same PMI module as this Stats | 104 | 16 |
160,765 | public void insert ( SimpleTest test , Object target ) { if ( size == ranges . length ) { RangeEntry [ ] tmp = new RangeEntry [ 2 * size ] ; System . arraycopy ( ranges , 0 , tmp , 0 , size ) ; ranges = tmp ; } ranges [ size ] = new RangeEntry ( test , target ) ; size ++ ; } | Insert a range and an associated target into the table . | 75 | 11 |
160,766 | public Object getExact ( SimpleTest test ) { for ( int i = 0 ; i < size ; i ++ ) { if ( ranges [ i ] . correspondsTo ( test ) ) return ranges [ i ] . target ; } return null ; } | Retrieve the Object associated with an exactly defined range | 52 | 10 |
160,767 | public void replace ( SimpleTest test , Object target ) { for ( int i = 0 ; i < size ; i ++ ) if ( ranges [ i ] . correspondsTo ( test ) ) { ranges [ i ] . target = target ; return ; } throw new IllegalStateException ( ) ; } | Replace the Object in a range that is known to exist | 61 | 12 |
160,768 | public List find ( Number value ) { // was NumericValue List targets = new ArrayList ( 1 ) ; for ( int i = 0 ; i < size ; i ++ ) { if ( ranges [ i ] . contains ( value ) ) targets . add ( ranges [ i ] . target ) ; } return targets ; } | Find targets associated with all ranges including this value . | 67 | 10 |
160,769 | @ FFDCIgnore ( XMLStreamException . class ) public boolean parseServerConfiguration ( InputStream in , String docLocation , BaseConfiguration config , MergeBehavior mergeBehavior ) throws ConfigParserException , ConfigValidationException { XMLStreamReader parser = null ; try { parser = getXMLInputFactory ( ) . createXM... | private if not for tests | 163 | 5 |
160,770 | public void start ( QueuedFuture < ? > queuedFuture ) { Runnable timeoutTask = ( ) -> { queuedFuture . abort ( new TimeoutException ( ) ) ; } ; start ( timeoutTask ) ; } | start timer and cancel given future | 48 | 6 |
160,771 | private void timeout ( ) { lock . writeLock ( ) . lock ( ) ; try { //if already stopped, do nothing, otherwise check times and run the timeout task if ( ! this . stopped ) { long now = System . nanoTime ( ) ; long remaining = this . targetEnd - now ; this . timedout = remaining <= FTConstants . MIN_TIMEOUT_NANO ; if ( ... | This method is run when the timer pops | 263 | 8 |
160,772 | private void start ( Runnable timeoutTask ) { long timeout = timeoutPolicy . getTimeout ( ) . toNanos ( ) ; start ( timeoutTask , timeout ) ; } | Get the timeout from the policy and start the timer | 37 | 10 |
160,773 | private void start ( Runnable timeoutTask , long remainingNanos ) { lock . writeLock ( ) . lock ( ) ; try { this . timeoutTask = timeoutTask ; this . start = System . nanoTime ( ) ; this . targetEnd = start + remainingNanos ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { debugTime ( ">Sta... | This is the method which actually starts the timer | 233 | 9 |
160,774 | public void stop ( ) { lock . writeLock ( ) . lock ( ) ; try { debugRelativeTime ( "Stop!" ) ; this . stopped = true ; if ( this . future != null && ! this . future . isDone ( ) ) { debugRelativeTime ( "Cancelling" ) ; this . future . cancel ( true ) ; } this . future = null ; } finally { lock . writeLock ( ) . unlock ... | Stop the timeout ... mark it as stopped and cancel the scheduled future task if required | 98 | 16 |
160,775 | public void restart ( ) { lock . writeLock ( ) . lock ( ) ; try { if ( this . timeoutTask == null ) { throw new IllegalStateException ( Tr . formatMessage ( tc , "internal.error.CWMFT4999E" ) ) ; } stop ( ) ; this . stopped = false ; start ( this . timeoutTask ) ; } finally { lock . writeLock ( ) . unlock ( ) ; } } | Restart the timer ... stop the timer reset the stopped flag and then start again with the same timeout policy | 92 | 21 |
160,776 | public long check ( ) { long remaining = 0 ; lock . readLock ( ) . lock ( ) ; try { if ( this . timedout ) { // Note: this clears the interrupted flag if it was set // Assumption is that the interruption was caused by the Timeout boolean wasInterrupted = Thread . interrupted ( ) ; if ( TraceComponent . isAnyTracingEnab... | Check if the timedout flag was previously set and throw an exception if it was . Otherwise return the remaining timeout time in nanoseconds . | 292 | 29 |
160,777 | @ Trivial private void debugTime ( String message , long nanos ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { FTDebug . debugTime ( tc , getDescriptor ( ) , message , nanos ) ; } } | Output a debug message showing a given relative time converted from nanos to seconds | 62 | 15 |
160,778 | public static String createPropertyFilter ( String name , String value ) { assert name . matches ( "[^=><~()]+" ) ; StringBuilder builder = new StringBuilder ( name . length ( ) + 3 + ( value == null ? 0 : value . length ( ) * 2 ) ) ; builder . append ( ' ' ) . append ( name ) . append ( ' ' ) ; int begin = 0 ; if ( va... | Creates a filter string that matches an attribute value exactly . Characters in the value with special meaning will be escaped . | 205 | 23 |
160,779 | public static void delete ( final File f ) { if ( f != null && f . exists ( ) ) { // Why do we have to specify a return type for the run method and paramatize // PrivilegedExceptionAction to it, this method should have a void return type ideally. AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { @... | Java 2 security APIs for deleteOnExit | 163 | 8 |
160,780 | public static FileInputStream getFileIputStream ( final File file ) throws FileNotFoundException { try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < FileInputStream > ( ) { @ Override public FileInputStream run ( ) throws FileNotFoundException { return new FileInputStream ( file ) ; } } ) ;... | Java 2 security APIs for FileInputStream | 113 | 8 |
160,781 | public static long getFileLength ( final File file ) throws FileNotFoundException { try { return AccessController . doPrivileged ( new PrivilegedExceptionAction < Long > ( ) { @ Override public Long run ( ) throws FileNotFoundException { return file . length ( ) ; } } ) ; } catch ( PrivilegedActionException e ) { // Cr... | Java 2 security APIs for file length | 103 | 7 |
160,782 | JavaURLContext createJavaURLContext ( Hashtable < ? , ? > envmt , Name name ) { return new JavaURLContext ( envmt , helperServices , name ) ; } | This method should only be called by the JavaURLContextReplacer class for de - serializing an instance of JavaURLContext . The name parameter can be null . | 40 | 33 |
160,783 | public String encodeURL ( HttpSession session , String url ) { return encodeURL ( session , null , url , null ) ; } | called from ConvergedHttpSession . encodeURL path | 28 | 10 |
160,784 | public void complete ( VirtualConnection vc , TCPReadRequestContext rsc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "complete() called: vc=" + vc ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStateMap ( ) . get ( CallbackIDs... | Called by the channel below us when a read has finished . | 111 | 13 |
160,785 | public void error ( VirtualConnection vc , TCPReadRequestContext rsc , IOException ioe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "error() called: vc=" + vc + " ioe=" + ioe ) ; } HttpOutboundServiceContextImpl mySC = ( HttpOutboundServiceContextImpl ) vc . getStat... | Called by the channel below us when an error occurs during a read . | 350 | 15 |
160,786 | public static void logLoudAndClear ( String textToLog , String callingClass , String callingMethod ) { final String methodName = "logLoudAndClear" ; final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; final String cClass = ( callingClass != null && ! callingClass . isEmpty ( ) ) ? callingClass : "callingCl... | logLoudAndClear Log the provided text in a very distinct way making it easy to find it in the trace . log This method should be used for testing and debugging proposes only . This method should not be used in shipped code . | 433 | 47 |
160,787 | private MessagingEngine createMessageEngine ( JsMEConfig me ) throws Exception { String thisMethodName = CLASS_NAME + ".createMessageEngine(JsMEConfig)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , "replace ME name here" ) ; } JsMessagingEngine eng... | Create a single Message Engine admin object using suppled config object . | 226 | 13 |
160,788 | private JsBusImpl getBusProxy ( JsMEConfig me ) { String thisMethodName = CLASS_NAME + ".getBusProxy(ConfigObject)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , "ME Name" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ... | Returns the runtime configuration of the bus to which the supplied messaging engine belongs . If the bus runtime configuration does not yet exist it is created . In liberty this is default bus configuration | 119 | 35 |
160,789 | private JsBusImpl getBusProxy ( String name ) throws SIBExceptionBusNotFound { String thisMethodName = CLASS_NAME + ".getBusProxy(String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , name ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc .... | Returns the runtime configuration of the bus to which the named messaging engine belongs . If the bus runtime configuration does not yet exist it is created . | 117 | 28 |
160,790 | public JsBus getBus ( String busName ) throws SIBExceptionBusNotFound { String thisMethodName = CLASS_NAME + ".getBus(String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , busName ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryE... | Returns the runtime configuration of the named bus . For liberty is always default bus | 116 | 15 |
160,791 | public Set getMessagingEngineSet ( String busName ) { String thisMethodName = CLASS_NAME + ".getMessagingEngineSet(String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , busName ) ; } Set retSet = new HashSet ( ) ; if ( meConfig != null ) { String m... | Returns the set of messaging engines on the named bus . | 208 | 11 |
160,792 | public String [ ] showMessagingEngines ( ) { String thisMethodName = CLASS_NAME + ".showMessagingEngines()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } final String [ ] list = new String [ _messagingEngines . size ( ) ] ; Enumeration e ... | Return a readable string of messaging engines in the process | 230 | 10 |
160,793 | public void startMessagingEngine ( String busName , String name ) throws Exception { String thisMethodName = CLASS_NAME + ".startMessagingEngine(String, String)" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , new Object [ ] { busName , name } ) ; } B... | Start a messaging engine | 246 | 4 |
160,794 | public boolean isServerStarted ( ) { String thisMethodName = CLASS_NAME + ".isServerStarted()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , ... | Has the WAS server in which we are contained now started? | 116 | 12 |
160,795 | public boolean isServerStopping ( ) { String thisMethodName = CLASS_NAME + ".isServerStopping()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc ... | Is the WAS server in which we are contained stopping? | 116 | 11 |
160,796 | public boolean isServerInRecoveryMode ( ) { String thisMethodName = CLASS_NAME + ".isServerInRecoveryMode()" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } boolean ret = false ; // (_serverMode == Server.RECOVERY_MODE); TBD if ( TraceCompo... | 250606 . 3 recovery mode support | 134 | 7 |
160,797 | public List < String > listDefinedBuses ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "listDefinedBuses" , this ) ; } List buses = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "listDefinedBuses" , buses ... | Returns a list of configured buses in this cell . For liberty this method will return the null value because no directory structure is maintained in liberty for a bus . | 106 | 31 |
160,798 | public static final String base64Decode ( String str , String enc ) throws UnsupportedEncodingException { if ( str == null ) { return null ; } else { byte data [ ] = getBytes ( str ) ; return base64Decode ( new String ( data , enc ) ) ; } } | Converts a String with the given encoding to a base64 encoded String . | 63 | 15 |
160,799 | public static final String base64Decode ( String str ) { if ( str == null ) { return null ; } else { byte data [ ] = getBytes ( str ) ; return toString ( base64Decode ( data ) ) ; } } | Converts a base64 encoded String to a decoded String . | 52 | 13 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.