idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
160,600 | private synchronized void parseParameters ( ) { if ( null != this . queryParams ) { // already parsed return ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "parseParameters for " + this ) ; } String encoding = getCharset ( ) . name ( ) ; // PQ99481... non-English envi... | Parse the query parameters out of this message . This will check just the URL query data of the request . | 332 | 22 |
160,601 | protected void setDataSourceFactory ( ServiceReference < ResourceFactory > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "setDataSourceFactory" , "setting " + ref ) ; ... | Declarative Services method for setting the data source service reference | 108 | 12 |
160,602 | protected void unsetDataSourceFactory ( ServiceReference < ResourceFactory > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "unsetDataSourceFactory" , "unsetting " + re... | Declarative Services method for unsetting the data source service reference | 112 | 13 |
160,603 | protected void setResourceConfigFactory ( ServiceReference < ResourceConfigFactory > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "setResourceConfigFactory" , "settin... | Declarative Services method for setting the ResourceConfigFactory service reference | 109 | 13 |
160,604 | protected void unsetResourceConfigFactory ( ServiceReference < ResourceConfigFactory > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "unsetResourceConfigFactory" , "un... | Declarative Services method for unsetting the ResourceConfigFactory service reference | 113 | 14 |
160,605 | protected void setLocalTransactionCurrent ( ServiceReference < LocalTransactionCurrent > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "setLocalTransactionCurrent" , "... | Declarative Services method for setting the LocalTransactionCurrent service reference | 109 | 13 |
160,606 | protected void unsetLocalTransactionCurrent ( ServiceReference < LocalTransactionCurrent > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "unsetLocalTransactionCurrent"... | Declarative Services method for unsetting the LocalTransactionCurrent service reference | 113 | 14 |
160,607 | protected void setEmbeddableWebSphereTransactionManager ( ServiceReference < EmbeddableWebSphereTransactionManager > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "set... | Declarative Services method for setting the EmbeddableWebSphereTransactionManager service reference | 125 | 17 |
160,608 | protected void unsetEmbeddableWebSphereTransactionManager ( ServiceReference < EmbeddableWebSphereTransactionManager > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "u... | Declarative Services method for unsetting the EmbeddableWebSphereTransactionManager service reference | 129 | 18 |
160,609 | protected void setUowCurrent ( ServiceReference < UOWCurrent > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "setUowCurrent" , "setting " + ref ) ; } uowCurrentRef . s... | Declarative Services method for setting the UOWCurrent service reference | 109 | 13 |
160,610 | protected void unsetUowCurrent ( ServiceReference < UOWCurrent > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "unsetUowCurrent" , "unsetting " + ref ) ; } uowCurrentR... | Declarative Services method for unsetting the UOWCurrent service reference | 113 | 14 |
160,611 | protected void setUserTransaction ( ServiceReference < UserTransaction > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "setUserTransaction" , "setting " + ref ) ; } us... | Declarative Services method for setting the UserTransaction service reference | 105 | 12 |
160,612 | protected void unsetUserTransaction ( ServiceReference < UserTransaction > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "unsetUserTransaction" , "unsetting " + ref ) ... | Declarative Services method for unsetting the UserTransaction service reference | 109 | 13 |
160,613 | protected void setSerializationService ( ServiceReference < SerializationService > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "setSerializationService" , "setting "... | Declarative Services method for setting the SerializationService service reference | 109 | 13 |
160,614 | protected void unsetSerializationService ( ServiceReference < SerializationService > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . logp ( Level . FINE , methodClassName , "unsetSerializationService" , "unset... | Declarative Services method for unsetting the SerializationService service reference | 113 | 14 |
160,615 | private Connection getJdbcConnection ( ) throws JspCoreException , SQLException { Connection conn = null ; String url = getConnProperties ( ) . getUrl ( ) ; String user = getConnProperties ( ) . getLoginUser ( ) ; String passwd = getConnProperties ( ) . getLoginPasswd ( ) ; String jndiName = getConnProperties ( ) . get... | Return a valid jdbc connection . if jndiName is specified then assume that we need to use a datasource else use a drivermanager | 415 | 30 |
160,616 | public static boolean isAbsolutePath ( String uri ) { boolean absolute = false ; if ( uri != null ) { if ( uri . indexOf ( ":/" ) != - 1 ) { absolute = true ; } else if ( uri . indexOf ( ":\\" ) != - 1 ) { absolute = true ; } } return absolute ; } | Checks to see if URI is absolute or relative . | 77 | 11 |
160,617 | private static boolean equalsHashes ( File fileToHash , String hashToCompare ) throws IOException { boolean result = false ; // Now calculate the new hash and compare the 2. If they are NOT the same the ifix needs to be re-applied. String fileHash = MD5Utils . getFileMD5String ( fileToHash ) ; if ( fileHash . equals ( ... | This method calculates a hash of the required file and compares it against the supplied hash . It then returns true if both hashes are equals . | 94 | 27 |
160,618 | private static Map < String , IFixInfo > processIFixXmls ( File wlpInstallationDirectory , Map < String , BundleFile > bundleFiles , CommandConsole console ) { // A map of update file names and the IfixInfo objects that contain the latest versions of these files. Map < String , IFixInfo > filteredIfixInfos = new HashMa... | This method processes all of the ifix xml s and stores the latest version of each file found in a map . The comparisons on each file are based on the date associated with the file . The latest date means the latest update . | 819 | 46 |
160,619 | private static String getExistingMatchingIfixID ( BundleFile bundleFile , Set < String > existingIDs , Map < String , BundleFile > bundleFiles ) { String existingIfixKey = null ; // Iterate over the known ids. for ( String existingID : existingIDs ) { // If we have a corresponding BundleFile for the existing ID, we nee... | This method takes a ifix ID finds any existing IFix IDs that refer to the same base bundle . Because the ifix jars will have different qualifiers we need to be able to work out which ids are related . | 307 | 44 |
160,620 | private static Map < String , BundleFile > processLPMFXmls ( File wlpInstallationDirectory , CommandConsole console ) { // A map of update file names and the IfixInfo objects that contain the latest versions of these files. Map < String , BundleFile > bundleFiles = new HashMap < String , BundleFile > ( ) ; // Iterate o... | This method processes all of the Liberty profile Metadata files stores the BundleFile objects containing the BundleSymbolic name and version of each bundle against the id of the file that matches the corresponding entry in the ifix . xml . | 275 | 46 |
160,621 | public static String getEntityType ( String accessId ) { Matcher m = matcher ( accessId ) ; if ( m != null ) { return m . group ( 1 ) ; } return null ; } | Given an accessId extract the entity type . | 43 | 9 |
160,622 | public static String getRealm ( String accessId ) { Matcher m = matcher ( accessId ) ; if ( m != null ) { return m . group ( 2 ) ; } return null ; } | Given an accessId extract the realm . | 43 | 8 |
160,623 | public static String getUniqueId ( String accessId ) { Matcher m = matcher ( accessId ) ; if ( m != null ) { return m . group ( 3 ) ; } return null ; } | Given an accessId extract the uniqueId . | 43 | 9 |
160,624 | public static String getUniqueId ( String accessId , String realm ) { if ( realm != null ) { Pattern pattern = Pattern . compile ( "([^:]+):(" + Pattern . quote ( realm ) + ")/(.*)" ) ; Matcher m = pattern . matcher ( accessId ) ; if ( m . matches ( ) ) { if ( m . group ( 3 ) . length ( ) > 0 ) { return m . group ( 3 )... | Given an accessId and realm name extract the uniqueId . | 120 | 12 |
160,625 | private String replaceNonAlpha ( String name ) { String modifiedName = null ; if ( p != null ) modifiedName = p . matcher ( name ) . replaceAll ( "_" ) ; return modifiedName ; } | Replace non - alphanumeric characters in a string with underscores . | 45 | 14 |
160,626 | public void setConsumerDispatcher ( ConsumerDispatcher consumerDispatcher ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setConsumerDispatcher" , consumerDispatcher ) ; this . consumerDispatcher = consumerDispatcher ; if ( TraceComponent . isAnyTracingEnabled ( ) &&... | Set the consumerDispatcher object to which this itemstream belongs | 112 | 13 |
160,627 | @ Override public void xmlWriteOn ( FormattedWriter writer ) throws IOException { if ( consumerDispatcher != null ) { writer . newLine ( ) ; writer . taggedValue ( "consumerDispatcher" , consumerDispatcher . toString ( ) ) ; } } | Prints debug information to the XML writer | 60 | 8 |
160,628 | public void markAsToBeDeleted ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "markAsToBeDeleted" ) ; toBeDeleted = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "markAsToBeDeleted" ) ; } | Mark this itemstream as awaiting deletion | 97 | 7 |
160,629 | public LockManager getSubscriptionLockManager ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getSubscriptionLockManager" ) ; SibTr . exit ( tc , "getSubscriptionLockManager" , _subscriptionLockManager ) ; } return _subscriptionLockManager ; } | Returns the lock manager associated with this subscription | 82 | 8 |
160,630 | @ Trivial private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { GetField fields = in . readFields ( ) ; failure = ( Throwable ) fields . get ( FAILURE , null ) ; previousResult = ( byte [ ] ) fields . get ( PREVIOUS_RESULT , null ) ; } | Deserialize information about the skipped execution . | 75 | 9 |
160,631 | @ Trivial private void writeObject ( ObjectOutputStream out ) throws IOException { PutField fields = out . putFields ( ) ; fields . put ( FAILURE , failure ) ; fields . put ( PREVIOUS_RESULT , previousResult ) ; out . writeFields ( ) ; } | Serialize information about the skipped execution . | 65 | 8 |
160,632 | public static < T > StaticValue < T > mutateStaticValue ( StaticValue < T > staticValue , Callable < T > initializer ) { if ( multiplex ) { // Multiplexing case; must check for existing StaticValue if ( staticValue == null ) { // no existing value; create new one with no constructor initializer staticValue = StaticValu... | Mutates a static value . Note that if not multiplexing then this method returns a new StaticValue object with the value as obtained by the initializer . | 139 | 32 |
160,633 | public static Object concat ( Object [ ] arrs ) { int totalLen = 0 ; Class commonComponentType = null ; for ( int i = 0 , len = arrs . length ; i < len ; i ++ ) { // skip all null arrays if ( arrs [ i ] == null ) { continue ; } int arrayLen = Array . getLength ( arrs [ i ] ) ; // skip all empty arrays if ( arrayLen == ... | Concatenates arrays into one . Any null or empty arrays are ignored . If all arrays are null or empty returns null . Elements will be ordered in the order in which the arrays are supplied . | 191 | 40 |
160,634 | @ Override public int compare ( T entity1 , T entity2 ) { SortHandler shandler = new SortHandler ( sortControl ) ; return shandler . compareEntitysWithRespectToProperties ( ( Entity ) entity1 , ( Entity ) entity2 ) ; } | Compares its two objects for order . Returns a negative integer zero or a positive integer as the first argument is less than equal to or greater than the second . | 59 | 32 |
160,635 | public void dump ( ) { if ( ! tc . isDumpEnabled ( ) ) { return ; } Enumeration vEnum = lockTable . keys ( ) ; Tr . dump ( tc , "-- Lock Manager Dump --" ) ; while ( vEnum . hasMoreElements ( ) ) { Object key = vEnum . nextElement ( ) ; Tr . dump ( tc , "lock table entry" , new Object [ ] { key , lockTable . get ( key ... | Dump internal state of lock manager . | 109 | 8 |
160,636 | protected Commandline getCommandline ( ) { Commandline cmdl = new Commandline ( ) ; if ( configFile != null ) { cmdl . createArgument ( ) . setValue ( "--config" ) ; cmdl . createArgument ( ) . setFile ( configFile ) ; } if ( debug ) { cmdl . createArgument ( ) . setValue ( "--debug" ) ; } return cmdl ; } | Get the command line configuration arguments for the StaticTraceInstrumentation invocations . | 92 | 17 |
160,637 | @ Override public void execute ( ) { List < File > flist = new ArrayList < File > ( ) ; if ( file != null ) { flist . add ( file ) ; } for ( int i = 0 ; i < filesets . size ( ) ; i ++ ) { FileSet fs = filesets . elementAt ( i ) ; DirectoryScanner ds = fs . getDirectoryScanner ( getProject ( ) ) ; File dir = fs . getDir... | Execute the build task . | 681 | 6 |
160,638 | private ReturnCode write ( String command , ReturnCode notStartedRC , ReturnCode errorRC ) { SocketChannel channel = null ; try { ServerCommandID commandID = createServerCommand ( command ) ; if ( commandID . getPort ( ) > 0 ) { channel = SelectorProvider . provider ( ) . openSocketChannel ( ) ; channel . connect ( new... | Write a command to the server process . | 560 | 8 |
160,639 | public ReturnCode startStatus ( ServerLock lock ) { // The server process might not have created the command file yet. // Wait for it to appear. while ( ! isValid ( ) ) { ReturnCode rc = startStatusWait ( lock ) ; if ( rc != ReturnCode . START_STATUS_ACTION ) { return rc ; } } for ( int i = 0 ; i < BootstrapConstants .... | Waits for the server to be fully started . | 272 | 10 |
160,640 | private ReturnCode startStatusWait ( ServerLock lock ) { try { Thread . sleep ( BootstrapConstants . POLL_INTERVAL_MS ) ; } catch ( InterruptedException ex ) { Debug . printStackTrace ( ex ) ; return ReturnCode . ERROR_SERVER_START ; } // This method is only called if the server process was holding // the server lock. ... | Wait a bit because the server process could not be contacted and then verify that the server process is still running . | 139 | 22 |
160,641 | public ReturnCode stopServer ( boolean force ) { return write ( force ? FORCE_STOP_COMMAND : STOP_COMMAND , ReturnCode . REDUNDANT_ACTION_STATUS , ReturnCode . ERROR_SERVER_STOP ) ; } | Stop the server by issuing a stop instruction to the server listener | 57 | 12 |
160,642 | public ReturnCode introspectServer ( String dumpTimestamp , Set < JavaDumpAction > javaDumpActions ) { // Since "server dump" is used for diagnostics, we go out of our way to // not send an unrecognized command to the server even if the user has // broken their environment such that the client process supports java // ... | Dump the server by issuing a introspect instruction to the server listener | 235 | 14 |
160,643 | public ReturnCode javaDump ( Set < JavaDumpAction > javaDumpActions ) { StringBuilder commandBuilder = new StringBuilder ( JAVADUMP_COMMAND ) ; char sep = DELIM ; for ( JavaDumpAction javaDumpAction : javaDumpActions ) { commandBuilder . append ( sep ) . append ( javaDumpAction . toString ( ) ) ; sep = ' ' ; } return w... | Create a java dump of the server JVM by issuing a javadump instruction to the server listener | 128 | 21 |
160,644 | public ReturnCode pause ( String targetArg ) { StringBuilder commandBuilder = new StringBuilder ( PAUSE_COMMAND ) ; char sep = DELIM ; if ( targetArg != null ) { commandBuilder . append ( sep ) . append ( targetArg ) ; } return write ( commandBuilder . toString ( ) , ReturnCode . SERVER_INACTIVE_STATUS , ReturnCode . E... | Attempt to Stop the inbound work to a server by issuing a pause request to the server . | 93 | 19 |
160,645 | public ReturnCode resume ( String targetArg ) { StringBuilder commandBuilder = new StringBuilder ( RESUME_COMMAND ) ; char sep = DELIM ; if ( targetArg != null ) { commandBuilder . append ( sep ) . append ( targetArg ) ; } return write ( commandBuilder . toString ( ) , ReturnCode . SERVER_INACTIVE_STATUS , ReturnCode .... | Resume Inbound work to a server by issuing a resume request to the server . | 93 | 17 |
160,646 | public boolean contain ( OidcTokenImplBase token ) { //(IdToken token) { String key = token . getJwtId ( ) ; if ( key == null ) { return false ; } key = getCacheKey ( token ) ; long currentTimeMilliseconds = ( new Date ( ) ) . getTime ( ) ; synchronized ( primaryTable ) { Long exp = ( Long ) primaryTable . get ( key ) ... | Find and return the object associated with the specified key . Add it if not already present . | 225 | 18 |
160,647 | public final ResourceException isValid ( int newAction ) { try { setState ( newAction , true ) ; } catch ( TransactionException exp ) { FFDCFilter . processException ( exp , "com.ibm.ws.rsadapter.spi.WSStateManager.isValid" , "385" , this ) ; return exp ; } return null ; } | If the action is valid return null . Otherwise return a TransactionException with the cause . | 78 | 17 |
160,648 | public boolean containsValue ( Object value ) throws ObjectManagerException { if ( getRoot ( ) != null ) return containsValue ( getRoot ( ) , value ) ; return false ; } | Searches this TreeMap for the specified value . | 38 | 11 |
160,649 | public Set entrySet ( ) throws ObjectManagerException { return new AbstractSetView ( ) { public long size ( ) { return size ; } public boolean contains ( Object object ) throws ObjectManagerException { if ( object instanceof Map . Entry ) { Map . Entry entry = ( Map . Entry ) object ; Object v1 = get ( entry . getKey (... | Answers a Set of the mappings contained in this TreeMap . Each element in the set is a Map . Entry . The set is backed by this TreeMap so changes to one are relected by the other . The set does not support adding . | 159 | 51 |
160,650 | public Object get ( Object key ) throws ObjectManagerException { Entry node = find ( key ) ; if ( node != null ) return node . value ; return null ; } | Answers the value of the mapping with the specified key . | 35 | 12 |
160,651 | public SortedMap headMap ( Object endKey ) { // Check for errors if ( comparator == null ) ( ( Comparable ) endKey ) . compareTo ( endKey ) ; else comparator . compare ( endKey , endKey ) ; return makeSubMap ( null , endKey ) ; } | Answers a SortedMap of the specified portion of this TreeMap which contains keys less than the end key . The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other . | 64 | 44 |
160,652 | public Collection keyCollection ( ) { if ( keyCollection == null ) { keyCollection = new AbstractCollectionView ( ) { public long size ( ) throws ObjectManagerException { return AbstractTreeMap . this . size ( ) ; } public Iterator iterator ( ) throws ObjectManagerException { return makeTreeMapIterator ( new AbstractMa... | Answers a Collection of the keys contained in this TreeMap . The set is backed by this TreeMap so changes to one are relected by the other . The Collection does not support adding . | 101 | 39 |
160,653 | public Object remove ( Object key ) throws ObjectManagerException { Entry node = find ( key ) ; if ( node == null ) return null ; Object result = node . value ; rbDelete ( node ) ; return result ; } | Removes a mapping with the specified key from this TreeMap . | 47 | 13 |
160,654 | public SortedMap subMap ( Object startKey , Object endKey ) { if ( comparator == null ) { if ( ( ( Comparable ) startKey ) . compareTo ( endKey ) <= 0 ) return makeSubMap ( startKey , endKey ) ; } else { if ( comparator . compare ( startKey , endKey ) <= 0 ) return makeSubMap ( startKey , endKey ) ; } throw new Illegal... | Answers a SortedMap of the specified portion of this TreeMap which contains keys greater or equal to the start key but less than the end key . The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other . | 98 | 52 |
160,655 | public SortedMap tailMap ( Object startKey ) { // Check for errors if ( comparator == null ) ( ( Comparable ) startKey ) . compareTo ( startKey ) ; else comparator . compare ( startKey , startKey ) ; return makeSubMap ( startKey , null ) ; } | Answers a SortedMap of the specified portion of this TreeMap which contains keys greater or equal to the start key . The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other . | 64 | 46 |
160,656 | public Collection values ( ) { if ( values == null ) { values = new AbstractCollectionView ( ) { public long size ( ) throws ObjectManagerException { return AbstractTreeMap . this . size ( ) ; } public Iterator iterator ( ) throws ObjectManagerException { return makeTreeMapIterator ( new AbstractMapEntry . Type ( ) { p... | Answers a Collection of the values contained in this TreeMap . The collection is backed by this TreeMap so changes to one are relected by the other . The collection does not support adding . | 100 | 39 |
160,657 | public static void assignMongoServers ( LibertyServer libertyServer ) throws Exception { MongoServerSelector mongoServerSelector = new MongoServerSelector ( libertyServer ) ; mongoServerSelector . updateLibertyServerMongos ( ) ; } | Reads a server configuration and replaces the placeholder values with an available host and port as specified in the mongo . properties file | 54 | 25 |
160,658 | private Map < String , List < MongoElement > > getMongoElements ( ) throws Exception { for ( MongoElement mongo : serverConfig . getMongos ( ) ) { addMongoElementToMap ( mongo ) ; } for ( MongoDBElement mongoDB : serverConfig . getMongoDBs ( ) ) { if ( mongoDB . getMongo ( ) != null ) { addMongoElementToMap ( mongoDB .... | Creates a mapping of a Mongo server placeholder value to the one or more mongo elements in the server . xml containing that placeholder | 114 | 26 |
160,659 | private void updateMongoElements ( String serverPlaceholder , ExternalTestService mongoService ) { Integer [ ] port = { Integer . valueOf ( mongoService . getPort ( ) ) } ; for ( MongoElement mongo : mongoElements . get ( serverPlaceholder ) ) { mongo . setHostNames ( mongoService . getAddress ( ) ) ; mongo . setPorts ... | For the mongo elements containing the given placeholder value the host and port placeholder values in the mongo element are replaced with an actual host and port of an available mongo server . | 153 | 36 |
160,660 | private static boolean validateMongoConnection ( ExternalTestService mongoService ) { String method = "validateMongoConnection" ; MongoClient mongoClient = null ; String host = mongoService . getAddress ( ) ; int port = mongoService . getPort ( ) ; File trustStore = null ; MongoClientOptions . Builder optionsBuilder = ... | Creates a connection to the mongo server at the given location using the mongo java client . | 592 | 20 |
160,661 | private static SSLSocketFactory getSocketFactory ( File trustStore ) throws KeyStoreException , FileNotFoundException , IOException , NoSuchAlgorithmException , CertificateException , KeyManagementException { KeyStore keystore = KeyStore . getInstance ( "JKS" ) ; InputStream truststoreInputStream = null ; try { trustst... | Returns an SSLSocketFactory needed to connect to an SSL mongo server . The socket factory is created using the testTruststore . jks . | 232 | 30 |
160,662 | public static Locale converterTagLocaleFromString ( String name ) { try { Locale locale ; StringTokenizer st = new StringTokenizer ( name , "_" ) ; String language = st . nextToken ( ) ; if ( st . hasMoreTokens ( ) ) { String country = st . nextToken ( ) ; if ( st . hasMoreTokens ( ) ) { String variant = st . nextToken... | Convert locale string used by converter tags to locale . | 171 | 11 |
160,663 | public void incrementHeadSequenceNumber ( ConcurrentSubList . Link link ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "incrementheadSequenceNumber" , new Object [ ] { link } ) ; if ( link . next == null ) { // This subList is now... | Increment the headSequenceNumber after removal of a link in a subList . Caller must already be synchronized on headSequenceNumberLock . | 250 | 29 |
160,664 | private void resetTailSequenceNumber ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "resetTailSequenceNumber" ) ; for ( int i = 0 ; i < subListTokens . length ; i ++ ) { subLists [ i ] = ( ( ConcurrentSubList ) subListTokens [ i... | Reset the tailSequenceNumber . Caller must be synchronized on tailSequenceNumberLock . | 260 | 19 |
160,665 | protected ConcurrentSubList . Link insert ( Token token , ConcurrentSubList . Link insertPoint , Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "insert" , new Object [ ] { token , insertPoint , transaction ... | Insert before the given link . | 304 | 6 |
160,666 | public void activate ( ComponentContext compcontext , Map < String , Object > properties ) { String methodName = "activate" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Activating the WebContainer bundle" ) ; } WebContainer . instance . set ( this ) ; this . context ... | Activate the web container as a DS component . | 621 | 10 |
160,667 | @ FFDCIgnore ( Exception . class ) public void deactivate ( ComponentContext componentContext ) { String methodName = "deactivate" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Deactivating the WebContainer bundle" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) &... | Deactivate the web container as a DS component . | 409 | 10 |
160,668 | @ Reference ( service = ClassLoadingService . class , name = "classLoadingService" ) protected void setClassLoadingService ( ServiceReference < ClassLoadingService > ref ) { classLoadingSRRef . setReference ( ref ) ; } | DS method for setting the class loading service reference . | 48 | 10 |
160,669 | @ Reference ( policy = ReferencePolicy . DYNAMIC ) protected void setEncodingService ( EncodingUtils encUtils ) { encodingServiceRef . set ( encUtils ) ; } | DS method for setting the Encoding service . | 41 | 9 |
160,670 | @ Reference ( service = SessionHelper . class , name = "sessionHelper" ) protected void setSessionHelper ( ServiceReference < SessionHelper > ref ) { sessionHelperSRRef . setReference ( ref ) ; } | Set the reference to the session helper service . | 44 | 9 |
160,671 | @ Override public ModuleMetaData createModuleMetaData ( ExtendedModuleInfo moduleInfo ) throws MetaDataException { WebModuleInfo webModule = ( WebModuleInfo ) moduleInfo ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "createModuleMetaData: " + webModule . getName ( ) + ... | This will create the metadata for a web module in the web container | 438 | 13 |
160,672 | protected void registerMBeans ( WebModuleMetaDataImpl webModule , com . ibm . wsspi . adaptable . module . Container container ) { String methodName = "registerMBeans" ; String appName = webModule . getApplicationMetaData ( ) . getName ( ) ; String webAppName = webModule . getName ( ) ; String debugName ; if ( TraceCom... | Check for the JSR77 runtime and if available use it to register module and servlet mbeans . As a side effect assign the mbean registration to the web module metadata and to the servlet metadata . | 683 | 42 |
160,673 | public void stopModule ( ExtendedModuleInfo moduleInfo ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "stopModule()" , ( ( WebModuleInfo ) moduleInfo ) . getName ( ) ) ; } WebModuleInfo webModule = ( WebModuleInfo ) moduleInfo ; try { DeployedModule dMod = this . depl... | This will stop a web module in the web container | 573 | 10 |
160,674 | @ Reference ( cardinality = ReferenceCardinality . MANDATORY , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY ) protected void setConnContextPool ( SRTConnectionContextPool pool ) { this . connContextPool = pool ; } | Only DS should invoke this method | 61 | 6 |
160,675 | public void refreshEntry ( com . ibm . wsspi . cache . CacheEntry ce ) { cacheInstance . refreshEntry ( ce . cacheEntry ) ; } | This method moves the specified entry to the end of the LRU queue . | 34 | 15 |
160,676 | public CacheEntry getEntryDisk ( Object cacheId ) { CacheEntry cacheEntry = new CacheEntry ( cacheInstance . getEntryDisk ( cacheId ) ) ; return cacheEntry ; } | This method returns the cache entry specified by cache ID from the disk cache . | 38 | 15 |
160,677 | public com . ibm . wsspi . cache . CacheEntry getEntry ( Object cacheId ) { CacheEntry cacheEntry = new CacheEntry ( cacheInstance . getEntry ( cacheId ) ) ; return cacheEntry ; } | This method returns an instance of CacheEntry specified cache ID . | 47 | 12 |
160,678 | public static Object [ ] getEncoding ( JspInputSource inputSource ) throws IOException , JspCoreException { InputStream inStream = XMLEncodingDetector . getInputStream ( inputSource ) ; //InputStream inStream = JspUtil.getInputStream(fname, jarFile, ctxt, // err); XMLEncodingDetector detector = new XMLEncodingDetector ... | Autodetects the encoding of the XML document supplied by the given input stream . | 119 | 18 |
160,679 | private Reader createReader ( InputStream inputStream , String encoding , Boolean isBigEndian ) throws IOException , JspCoreException { // normalize encoding name if ( encoding == null ) { encoding = "UTF-8" ; } // try to use an optimized reader String ENCODING = encoding . toUpperCase ( Locale . ENGLISH ) ; if ( ENCOD... | Creates a reader capable of reading the given input stream in the specified encoding . | 810 | 16 |
160,680 | final boolean load ( int offset , boolean changeEntity ) throws IOException { // read characters int length = fCurrentEntity . mayReadChunks ? ( fCurrentEntity . ch . length - offset ) : ( DEFAULT_XMLDECL_BUFFER_SIZE ) ; int count = fCurrentEntity . reader . read ( fCurrentEntity . ch , offset , length ) ; // reset cou... | Loads a chunk of text . | 217 | 7 |
160,681 | public String scanPseudoAttribute ( boolean scanningTextDecl , XMLString value ) throws IOException , JspCoreException { String name = scanName ( ) ; if ( name == null ) { throw new JspCoreException ( "jsp.error.xml.pseudoAttrNameExpected" ) ; //err.jspError("jsp.error.xml.pseudoAttrNameExpected"); } skipSpaces ( ) ; i... | Scans a pseudo attribute . | 525 | 6 |
160,682 | private void reportFatalError ( String msgId , String arg ) throws JspCoreException { throw new JspCoreException ( msgId , new Object [ ] { arg } ) ; //err.jspError(msgId, arg); } | Convenience function used in all XML scanners . | 52 | 10 |
160,683 | @ SuppressWarnings ( "unchecked" ) public static < T > T coerceToType ( FacesContext facesContext , Object value , Class < ? extends T > desiredClass ) { if ( value == null ) { return null ; } try { ExpressionFactory expFactory = facesContext . getApplication ( ) . getExpressionFactory ( ) ; // Use coersion implemented... | to unified EL in JSF 1 . 2 | 189 | 9 |
160,684 | private String getNarrowestScope ( FacesContext facesContext , String valueExpression ) { List < String > expressions = extractExpressions ( valueExpression ) ; // exclude NONE scope, if there are more than one ValueExpressions (see Spec for details) String narrowestScope = expressions . size ( ) == 1 ? NONE : APPLICAT... | Gets the narrowest scope to which the ValueExpression points . | 171 | 14 |
160,685 | private String getFirstSegment ( String expression ) { int indexDot = expression . indexOf ( ' ' ) ; int indexBracket = expression . indexOf ( ' ' ) ; if ( indexBracket < 0 ) { return indexDot < 0 ? expression : expression . substring ( 0 , indexDot ) ; } if ( indexDot < 0 ) { return expression . substring ( 0 , indexB... | Extract the first expression segment that is the substring up to the first . or [ | 116 | 18 |
160,686 | @ SuppressWarnings ( "unchecked" ) public < T > T get ( EventLocal < T > key ) { EventLocalMap < EventLocal < ? > , Object > map = getMap ( key ) ; if ( null == map ) { return key . initialValue ( ) ; } return ( T ) map . get ( key ) ; } | Query the possible value for the provided EventLocal . | 75 | 10 |
160,687 | public < T > void set ( EventLocal < T > key , Object value ) { EventLocalMap < EventLocal < ? > , Object > map = getMap ( key ) ; if ( null == map ) { // the call to getMap would have created the inheritable map // if appropriate, thus always create a disconnected map here map = new EventLocalMap < EventLocal < ? > , ... | Set the value for the provided EventLocal on this event . | 129 | 12 |
160,688 | @ SuppressWarnings ( "unchecked" ) public < T > T remove ( EventLocal < T > key ) { EventLocalMap < EventLocal < ? > , Object > map = getMap ( key ) ; if ( null != map ) { return ( T ) map . remove ( key ) ; } return null ; } | Remove any existing value for the provided EventLocal . | 70 | 10 |
160,689 | @ SuppressWarnings ( "unchecked" ) public < T > T getContextData ( String name ) { T rc = null ; if ( null != this . inheritableLocals ) { rc = ( T ) this . inheritableLocals . get ( name ) ; } if ( null == rc && null != this . locals ) { rc = ( T ) this . locals . get ( name ) ; } return rc ; } | Look for the EventLocal of the given name in this particular Event instance . | 92 | 15 |
160,690 | private static void setSystemProperties ( ) { // KernelBootstrap also sets these properties in case the bootstrap // agent wasn't used for some reason. String loggingManager = System . getProperty ( "java.util.logging.manager" ) ; //if (loggingManager == null) // System.setProperty("java.util.logging.manager", "com.ibm... | Set system properties for JVM singletons . | 171 | 10 |
160,691 | final void setBodyType ( JmsBodyType value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setBodyType" , value ) ; setSubtype ( value . toByte ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setBo... | Set the type of the message body . This method is only used by message constructors . | 104 | 18 |
160,692 | private final Set < String > getNonSmokeAndMirrorsPropertyNameSet ( ) { /* Get the names of all the properties in the JMS Property Maps */ /* We need a copy so that we can add extra items, and so can the caller */ Set < String > names = new HashSet < String > ( ) ; // Add the names for the two flavours of properties, w... | Return a Set of just the non - smoke - and - mirrors property names | 237 | 15 |
160,693 | @ Override public Object getJMSXGroupSeq ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getJMSXGroupSeq" ) ; Object result = null ; if ( mayHaveMappedJmsSystemProperties ( ) ) { result = getObjectProperty ( SIProperties . JMSXGroupSeq ) ; } if ( TraceCompon... | getJMSXGroupSeq Return the value of the JMSXGroupSeq property if it exists . We can return it as object as that is all JMS API wants . Actually it only really cares whether it exists but we ll return Object rather than changing the callng code unnecessarily . | 144 | 60 |
160,694 | private void processSpecialSubjects ( ConfigurationAdmin configAdmin , String roleName , Dictionary < String , Object > roleProps , Set < String > pids ) { String [ ] specialSubjectPids = ( String [ ] ) roleProps . get ( CFG_KEY_SPECIAL_SUBJECT ) ; if ( specialSubjectPids == null || specialSubjectPids . length == 0 ) {... | Read and process all the specialSubject elements | 634 | 8 |
160,695 | @ Override public TxCollaboratorConfig preInvoke ( final HttpServletRequest request , final boolean isServlet23 ) throws ServletException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Calling preInvoke. Request=" + request + " | isServlet23=" + isServlet23 ) ; } //Fir... | Collaborator preInvoke . | 786 | 7 |
160,696 | private void resumeSuspendedLTC ( LocalTransactionCurrent ltCurrent , Object txConfig ) throws ServletException { //Check for any suspended LTC that needs to be resumed if ( txConfig instanceof TxCollaboratorConfig ) { Object suspended = ( ( TxCollaboratorConfig ) txConfig ) . getSuspendTx ( ) ; if ( suspended instance... | Resumes the LTC that was suspended during preInvoke if one was suspended . | 384 | 17 |
160,697 | public SerializationObject getSerializationObject ( ) { SerializationObject object ; synchronized ( ivListOfObjects ) { if ( ivListOfObjects . isEmpty ( ) ) { object = createNewObject ( ) ; } else { object = ivListOfObjects . remove ( ivListOfObjects . size ( ) - 1 ) ; } } return object ; } | Gets the next avaialable serialization object . | 79 | 12 |
160,698 | public void returnSerializationObject ( SerializationObject object ) { synchronized ( ivListOfObjects ) { if ( ivListOfObjects . size ( ) < MAXIMUM_NUM_OF_OBJECTS ) { ivListOfObjects . add ( object ) ; } } } | Returns a serialization object back into the pool . | 62 | 10 |
160,699 | public void add ( Object dependency , ValueSet valueSet ) { if ( dependency == null ) { throw new IllegalArgumentException ( "dependency cannot be null" ) ; } if ( valueSet != null ) { dependencyToEntryTable . put ( dependency , valueSet ) ; } } | This adds a valueSet for the specified dependency . | 60 | 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.