idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
164,100 | private String replaceSpecialsWithSub ( String inString ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "replaceSpecialsWithSub" , "inString: " + inString ) ; String outString = null ; StringBuffer sb = null ; // First of all look for ampersands int posAmpersand = in... | Replace special characters in the string with substitutions . | 855 | 11 |
164,101 | private String replaceSubForSpecials ( String inString ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "replaceSubForSpecials" , "inString: " + inString ) ; String outString = null ; StringBuffer sb = null ; // First deal with ampersands int posAmpersand = inString .... | Replace substitutions in the string with the original special characters . | 715 | 13 |
164,102 | private void wrapLocationStep ( String selector , int start , int stepEnd ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "wrapLocationStep" , "selector: " + selector + ", start: " + start + ", stepEnd: " + stepEnd ) ; String step =... | Wrap a location step in an Identifier . | 188 | 10 |
164,103 | private void wrapLastLocationStep ( String selector , int start , boolean bumpLocationStep ) throws InvalidXPathSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "wrapLastLocationStep" , "selector: " + selector + ", start: " + start + ", bumpLocationStep:... | Wrap the last location step in an Identifier . | 210 | 11 |
164,104 | public void addChain ( ChainData newChain ) throws ChainException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addChain: " + newChain . getName ( ) ) ; } if ( containsChain ( newChain . getName ( ) ) ) { ChainException e = new ChainException ( "Chain already exists: ... | Adds the input chain to the group . All chain event listeners associated with the group are also added to the chain . | 350 | 23 |
164,105 | public void removeChain ( ChainData inputChain ) throws ChainException { String chainname = inputChain . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "removeChain: " + chainname ) ; } if ( ! containsChain ( chainname ) ) { ChainException e = new ChainExcep... | Removes the input chain from the group . All group chain event listeners all also removed from the chain unless the chain is in another group which is associated with the listener . | 356 | 34 |
164,106 | public void updateChain ( ChainData inputChain ) { String chainname = inputChain . getName ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "updateChain: " + chainname ) ; } // Find the chain in the group. for ( int i = 0 ; i < this . chainArray . length ; i ++ ) { if... | Search the group for the input chain . If found update it . Otherwise do nothing . | 190 | 17 |
164,107 | private void removeListenerFromChain ( ChainEventListener listener , ChainData chainData ) { ChainGroupData [ ] otherGroups = null ; boolean foundOtherGroupWithListener = false ; // Extract the groups that this chain is involved in. try { otherGroups = this . framework . getAllChainGroups ( chainData . getName ( ) ) ; ... | Remove the listener from the chain but only if the chain is not associated with the listener through another group . | 429 | 21 |
164,108 | public final void addChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "addChainEventListener: " + listener ) ; } if ( ( null != listener ) && ( ! getChainEventListeners ( ) . contains ( listener ) ) ) { // Add the listene... | Method addChainEventListener . Enables external entities to be notified of chain events on each of the chains in the group described in ChainEventListener interface . | 206 | 31 |
164,109 | public final void removeChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "removeChainEventListener: " + listener ) ; } if ( null != listener ) { // Remove the listener from the list monitored by this group. if ( ! getChai... | Method removeChainEventListener . Removes a listener from the list of those being informed of chain events on this chain . The listener is also removed from each chain in the group unless the chain is in another group which is associated with the listener . | 182 | 49 |
164,110 | public void addJSONObject ( JSONObject obj ) { if ( logger . isLoggable ( Level . FINER ) ) logger . entering ( className , "addJSONObject(JSONObject)" ) ; Vector vect = ( Vector ) this . jsonObjects . get ( obj . objectName ) ; if ( vect != null ) { vect . add ( obj ) ; } else { vect = new Vector ( ) ; vect . add ( ob... | Method to add a JSON child object to this JSON object . | 150 | 12 |
164,111 | public void writeObject ( Writer writer , int indentDepth , boolean contentOnly , boolean compact ) throws IOException { if ( logger . isLoggable ( Level . FINER ) ) logger . entering ( className , "writeObject(Writer, int, boolean, boolean)" ) ; if ( writer != null ) { try { if ( isEmptyObject ( ) ) { writeEmptyObject... | Method to write out the JSON formatted object . | 237 | 9 |
164,112 | private void writeIndention ( Writer writer , int indentDepth ) throws IOException { if ( logger . isLoggable ( Level . FINER ) ) logger . entering ( className , "writeIndention(Writer, int)" ) ; try { for ( int i = 0 ; i < indentDepth ; i ++ ) { writer . write ( indent ) ; } } catch ( Exception ex ) { IOException iox ... | Internal method for doing a simple indention write . | 152 | 10 |
164,113 | public void setAttributes ( FaceletContext ctx , Object obj ) { DateTimeConverter c = ( DateTimeConverter ) obj ; if ( this . locale != null ) { c . setLocale ( ComponentSupport . getLocale ( ctx , this . locale ) ) ; } if ( this . pattern != null ) { c . setPattern ( this . pattern . getValue ( ctx ) ) ; } else { if (... | Implements tag spec see taglib documentation . | 327 | 10 |
164,114 | public void createShellStreamSet ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createShellStreamSet" ) ; StreamSet streamSet = null ; synchronized ( streamSets ) { streamSet = new StreamSet ( null , targetMEUuid , 0 , isLink ? StreamSet . Type . LINK_INTERNAL_OUT... | This method will create a StreamSet with null StreamId . | 162 | 12 |
164,115 | public void processAckExpected ( long stamp , int priority , Reliability reliability , SIBUuid12 streamID ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processAckExpected" , new Object [ ] { Long . valueOf ( stamp ) , Integer . valueOf ( ... | needs to send an AckExpected downstream . | 476 | 9 |
164,116 | public void forceFlush ( SIBUuid12 streamID ) throws SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "forceFlush" , streamID ) ; StreamSet streamSet = streamSets . get ( streamID ) ; streamSet . dereferenceControlAdapter ( ) ; // Send out a flushed mess... | This method will be called to force flush of streamSet | 320 | 11 |
164,117 | public ControlNotFlushed stampNotFlushed ( ControlNotFlushed msg , SIBUuid12 streamID ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stampNotFlushed" , new Object [ ] { msg } ) ; int count = 0 ; //the maximum possible number of streams in ... | Attach the appropriate completed and duplicate prefixes for the stream stored in this array to a ControlNotFlushed message . | 552 | 23 |
164,118 | public StatisticImpl getStatistic ( ) { if ( enabled ) { if ( proxy == null ) { System . out . println ( "[SpdStatisticExternal] null proxy" ) ; return null ; } proxy . updateStatisticOnRequest ( dataId ) ; // onReqStatistic will be updated by the component // the reference is kept in this class return onReqStatistic ;... | return a wire level data using given time as snapshotTime | 89 | 11 |
164,119 | static String [ ] uniquify ( String [ ] arr , boolean alwaysClone ) { int numUnique = uniquifyCountAndCopy ( arr , null ) ; if ( numUnique == 0 ) return EMPTY_STRING_ARRAY ; if ( numUnique == arr . length ) return alwaysClone ? arr . clone ( ) : arr ; String [ ] out = new String [ numUnique ] ; uniquifyCountAndCopy ( a... | Remove null and duplicate elements from an array . | 102 | 9 |
164,120 | private static int uniquifyCountAndCopy ( String [ ] in , String [ ] out ) { int count = 0 ; outer : for ( int i = 0 ; i < in . length ; i ++ ) { if ( in [ i ] != null ) { for ( int j = 0 ; j < i ; j ++ ) if ( in [ i ] . equals ( in [ j ] ) ) continue outer ; if ( out != null ) out [ count ] = in [ i ] ; count ++ ; } }... | Count the number of non - null non - duplicate elements in an array and copy those elements to an output array if provided . | 112 | 25 |
164,121 | private Integer findMinimumSafeLevel ( PackageIndex < Integer > index ) { if ( index == null ) { return null ; } Integer minimumLevel = index . find ( name ) ; if ( minimumLevel == null ) { // Find by groups for ( String group : groups ) { minimumLevel = index . find ( group ) ; if ( minimumLevel != null ) { break ; } ... | Search by name first and if not found then search by groups . | 85 | 13 |
164,122 | private TranLogConfiguration createCustomTranLogConfiguration ( String recoveredServerIdentity , String logDir , boolean isPeerRecoverySupported ) throws URISyntaxException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createCustomTranLogConfiguration" , new java . lang . Object [ ] { recoveredServerIdentity , lo... | Creates a custom TranLogConfiguration object appropriate for storing transaction logs in an RDBMS or other custom repository . | 446 | 24 |
164,123 | private TranLogConfiguration createFileTranLogConfiguration ( String recoveredServerIdentity , FailureScope fs , String logDir , int logSize , boolean isPeerRecoverySupported ) throws URISyntaxException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "createFileTranLogConfiguration" , new java . lang . Object [ ] { ... | Creates a Filesystem TranLogConfiguration object appropriate for storing transaction logs in a filesystem . | 371 | 19 |
164,124 | private int getPeerLeaseCheckInterval ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getPeerLeaseCheckInterval" ) ; int intToReturn ; Integer peerLeaseCheckInterval = null ; try { peerLeaseCheckInterval = AccessController . doPrivileged ( new PrivilegedExceptionAction < Integer > ( ) { @ Override public Intege... | This method retrieves a system property named com . ibm . tx . jta . impl . PeerLeaseCheckInterval which allows a value to be specified for the time we should wait between peer server status checks . | 261 | 45 |
164,125 | private boolean doNotShutdownOnRecoveryFailure ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "doNotShutdownOnRecoveryFailure" ) ; boolean doCheck = true ; Boolean doNotShutdownOnRecoveryFailure = null ; try { doNotShutdownOnRecoveryFailure = AccessController . doPrivileged ( new PrivilegedExceptionAction < Boo... | This method retrieves a system property named com . ibm . ws . recoverylog . spi . DoNotShutdownOnRecoveryFailure which allows the server to start with failed recovery logs - non 2PC work may still be performed by the server . | 312 | 53 |
164,126 | private static String getStringKey ( String propertyKey ) { if ( WCCustomProperties . FullyQualifiedPropertiesMap . containsKey ( propertyKey ) ) { return WCCustomProperties . FullyQualifiedPropertiesMap . get ( propertyKey ) . toLowerCase ( ) ; } else { return propertyKey ; } } | propertyKey is lowerCase value | 70 | 6 |
164,127 | protected void createLockFile ( String pid , String label ) throws IOException { if ( ! AccessHelper . isDirectory ( repositoryLocation ) ) { AccessHelper . makeDirectories ( repositoryLocation ) ; } // Remove stale lock files if any. for ( File lock : listFiles ( LOCKFILE_FILTER ) ) { AccessHelper . deleteFile ( lock ... | Creates lock file to be used as a pattern for instance repository . Should be called only by parent s manager on start up . | 159 | 26 |
164,128 | protected File getLogFile ( File parentLocation , long timestamp ) { if ( timestamp < 0 ) { throw new IllegalArgumentException ( "timestamp cannot be negative" ) ; } StringBuilder sb = new StringBuilder ( ) ; sb . append ( timestamp ) . append ( EXTENSION ) ; return new File ( parentLocation , sb . toString ( ) ) ; } | calculates repository file name . | 81 | 7 |
164,129 | public long getLogFileTimestamp ( File file ) { if ( file == null ) { return - 1L ; } String name = file . getName ( ) ; // Check name for extension if ( name == null || name . length ( ) == 0 || ! name . endsWith ( EXTENSION ) ) { return - 1L ; } try { return Long . parseLong ( name . substring ( 0 , name . indexOf ( ... | Retrieves the timestamp from the name of the file . | 115 | 12 |
164,130 | public String getLogDirectoryName ( long timestamp , String pid , String label ) { if ( pid == null || pid . isEmpty ( ) ) { throw new IllegalArgumentException ( "pid cannot be empty" ) ; } StringBuilder sb = new StringBuilder ( ) ; if ( timestamp > 0 ) { sb . append ( timestamp ) . append ( TIMESEPARATOR ) ; } sb . ap... | returns sub - directory name to be used for instances and sub - processes | 139 | 15 |
164,131 | public static long parseTimeStamp ( String fileName ) { if ( fileName == null || fileName . isEmpty ( ) ) { return - 1L ; } int pidIndex = fileName . indexOf ( TIMESEPARATOR ) ; int labelIndex = fileName . indexOf ( LABELSEPARATOR ) ; // If no time separator or it's a part of the label there's no timestamp if ( pidInde... | Retrieves the timestamp out of the directory name . | 152 | 11 |
164,132 | public static String parsePIDandLabel ( String fileName ) { if ( fileName == null || fileName . isEmpty ( ) ) { return null ; } int pidIndex = fileName . indexOf ( TIMESEPARATOR ) ; int labelIndex = fileName . indexOf ( LABELSEPARATOR ) ; // If no time separator or it's a part of the label the full name is the result i... | Retrieves the PID and label combined out of the directory name . | 129 | 14 |
164,133 | public static String getFormattedMessageFromLocalizedMessage ( String localizedMessage , Object [ ] args , boolean quiet ) { return TraceNLSResolver . getInstance ( ) . getFormattedMessage ( localizedMessage , args ) ; } | Return the formatted message obtained by substituting parameters passed into a message | 49 | 13 |
164,134 | public void resolveBundles ( BundleContext bContext , List < Bundle > bundlesToResolve ) { if ( bundlesToResolve == null || bundlesToResolve . size ( ) == 0 ) { return ; } FrameworkWiring wiring = adaptSystemBundle ( bContext , FrameworkWiring . class ) ; if ( wiring != null ) { ResolutionReportHelper rrh = null ; if (... | Utility for resolving bundles | 182 | 5 |
164,135 | public static String getBundleLocation ( String urlString , String productName ) { String productNameInfo = ( productName != null && ! productName . isEmpty ( ) ) ? ( BUNDLE_LOC_PROD_EXT_TAG + productName + ":" ) : "" ; return BUNDLE_LOC_FEATURE_TAG + productNameInfo + urlString ; } | Gets the bundle location . The location format is consistent with what SchemaBundle and BundleList . | 83 | 21 |
164,136 | private String getRegionName ( String productName ) { if ( productName == null || productName . isEmpty ( ) ) { return kernelRegion . getName ( ) ; } return REGION_EXTENSION_PREFIX + INVALID_REGION_CHARS . matcher ( productName ) . replaceAll ( "-" ) ; } | Gets the region name according to the product name . | 74 | 11 |
164,137 | public static String getESIDependencies ( Enumeration e1 , Enumeration e2 ) { if ( ( e1 == null || ! e1 . hasMoreElements ( ) ) ) if ( ( e2 == null || ! e2 . hasMoreElements ( ) ) ) return null ; StringBuffer sb = new StringBuffer ( "dependencies=\"" ) ; if ( e1 != null ) while ( e1 . hasMoreElements ( ) ) { sb . appen... | expects an enumeration of data ids and an enumeration of templates | 203 | 15 |
164,138 | public E getBy ( String attributeName , String attributeValue ) { String methodName = "get" + Character . toUpperCase ( attributeName . charAt ( 0 ) ) + attributeName . substring ( 1 ) ; for ( E element : this ) if ( element != null ) try { Object value = element . getClass ( ) . getMethod ( methodName ) . invoke ( ele... | Returns the first element in this list with a matching attribute value . | 119 | 13 |
164,139 | public E getById ( String id ) { if ( id == null ) { for ( E element : this ) { if ( element != null && element . getId ( ) == null ) { return element ; } } } else { for ( E element : this ) { if ( element != null && id . equals ( element . getId ( ) ) ) { return element ; } } } return null ; } | Returns the first element in this list with a matching identifier | 85 | 11 |
164,140 | public E removeById ( String id ) { // traverses the list twice, but reuse code E element = this . getById ( id ) ; if ( element != null ) { this . remove ( element ) ; // this should always return true since we already found the element } return element ; } | Removes the first element in this list with a matching identifier | 61 | 12 |
164,141 | public E getOrCreateById ( String id , Class < E > type ) throws IllegalAccessException , InstantiationException { E element = this . getById ( id ) ; if ( element == null ) { element = type . newInstance ( ) ; element . setId ( id ) ; this . add ( element ) ; } return element ; } | Returns the first element in this list with a matching identifier or adds a new element to the end of this list and sets the identifier | 72 | 26 |
164,142 | public final static TrmMessageType getTrmMessageType ( int aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Value = " + aValue ) ; return set [ aValue ] ; } | Returns the corresponding TrmMessageType for a given integer . This method should NOT be called by any code outside the MFP component . It is only public so that it can be accessed by sub - packages . | 64 | 42 |
164,143 | public V getService ( K key ) { ComponentContext ctx = context ; if ( ctx == null || key == null ) return null ; ConcurrentServiceReferenceElement < V > e = elementMap . get ( key ) ; if ( e == null ) { return null ; } else { return e . getService ( ctx ) ; } } | Retrieve the service associated with key . | 73 | 8 |
164,144 | public ServiceReference < V > getReference ( K key ) { if ( key == null ) return null ; ConcurrentServiceReferenceElement < V > e = elementMap . get ( key ) ; if ( e == null ) { return null ; } else { return e . getReference ( ) ; } } | Returns the ServiceReference associated with key | 63 | 7 |
164,145 | public static List < ProductExtensionInfo > getProductExtensions ( File installDir ) { ArrayList < ProductExtensionInfo > productList = new ArrayList < ProductExtensionInfo > ( ) ; Set < String > extensionsSoFar = new HashSet < String > ( ) ; // Get the embedder SPI product extensions HashMap < String , Properties > em... | Get a list of configured product extensions . | 599 | 8 |
164,146 | public static ProductExtensionInfo getProductExtension ( String extensionName ) throws IOException { ProductExtensionInfo productExtensionInfo = null ; List < ProductExtensionInfo > productExtensionList = getProductExtensions ( Utils . getInstallDir ( ) ) ; for ( ProductExtensionInfo currentProductExtension : productEx... | Find and return a particular configured product extension . | 117 | 9 |
164,147 | @ Override public void start ( BundleContext context ) { initialContextFactories = initServiceTracker ( context , InitialContextFactory . class , ServiceTrackerCustomizers . ICF_CACHE ) ; objectFactories = initServiceTracker ( context , ObjectFactory . class , ServiceTrackerCustomizers . URL_FACTORY_CACHE ) ; icfBuilde... | private BundleTracker bt = null ; | 749 | 8 |
164,148 | public void initialize ( Map < String , Object > configProps ) throws WIMException { try { reposId = ( String ) configProps . get ( KEY_ID ) ; setCustomProperties ( ( List < Map < String , String > > ) configProps . get ( ConfigConstants . CONFIG_DO_CUSTOM_PROPERTIES ) ) ; setMapping ( ) ; setBaseEntry ( configProps ) ... | Initializes the user registry for use by the adapter . | 765 | 11 |
164,149 | private void setBaseEntry ( Map < String , Object > configProps ) throws WIMException { /* * Map<String, List<Map<String, Object>>> configMap = Nester.nest(configProps, BASE_ENTRY); * * for (Map<String, Object> entry : configMap.get(BASE_ENTRY)) { * baseEntryName = (String) entry.get(BASE_ENTRY_NAME); * } */ baseEntryN... | Set the baseEntryname from the configuration . The configuration should have only 1 baseEntry | 189 | 17 |
164,150 | private void setCustomProperties ( List < Map < String , String > > propList ) throws WIMException { final String METHODNAME = "setCustomProperties" ; customPropertyMap = new HashMap < String , String > ( ) ; if ( propList == null ) { return ; } Iterator < Map < String , String > > itr = propList . iterator ( ) ; while... | Set Custom UR Bridge properties . | 224 | 6 |
164,151 | private void setConfigEntityMapping ( Map < String , Object > configProps ) throws WIMException { List < String > entityTypes = getSupportedEntityTypes ( ) ; String rdnProp ; String type = null ; entityConfigMap = new HashMap < String , String > ( ) ; for ( int i = 0 ; i < entityTypes . size ( ) ; i ++ ) { type = entit... | Set the mapping of RDN properties for each entity type . A map is created with the key as the entity type and the value as the RDN property to be used . This information is taken from the configuration . | 232 | 43 |
164,152 | private String validateEntity ( Entity entity ) throws WIMException { String METHODNAME = "validateEntity" ; String type = null ; String secName = null ; String uniqueId = null ; String uniqueName = null ; if ( entity . getIdentifier ( ) . isSet ( SchemaConstants . PROP_UNIQUE_NAME ) ) { uniqueName = entity . getIdenti... | if type is null throw ENFE to be handled by get API . | 675 | 14 |
164,153 | private String getSecNameFromUniqueID ( String uniqueId ) throws WIMException { String METHODNAME = "getSecNameFromUniqueID" ; String secName = null ; try { secName = getUserSecurityName ( uniqueId ) ; } catch ( EntryNotFoundException e ) { try { secName = getGroupSecurityName ( uniqueId ) ; } catch ( com . ibm . ws . ... | Since UserRegistry throws CustomRegistryException in case of secName not found modify code to handle CustomRegistryException similar to EntryNotFoundException . | 330 | 31 |
164,154 | private String getRDN ( String name ) { if ( name == null ) { return name ; } int indexOfEqual = name . indexOf ( ' ' ) ; if ( indexOfEqual < 0 ) { return name ; } String rdnValue = name . substring ( 0 , indexOfEqual ) ; return rdnValue ; } | The method reads the uniqueName of the user and returns the rdn property | 74 | 15 |
164,155 | @ FFDCIgnore ( Exception . class ) public boolean isEntityInRealm ( String uniqueName ) { if ( isSafRegistry ( ) ) { try { return userRegistry . isValidUser ( uniqueName ) ; } catch ( Exception e ) { /* Ignore. */ } try { return userRegistry . isValidGroup ( uniqueName ) ; } catch ( Exception e ) { /* Ignore. */ } } el... | Is the entity in this realm? | 203 | 7 |
164,156 | private void setFields ( Connection connection , JFapByteBuffer buffer , int priority , boolean isPooled , boolean isExchange , int segmentType , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener , boolean isTerminal , int size ) { this . connection = connection ; this . buf... | Helper method which sets up fields in this class . | 157 | 10 |
164,157 | private void reset ( Connection connection , JFapByteBuffer buffer , int priority , boolean isPooled , boolean isExchange , int segmentType , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener , boolean isTerminal , int size ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( ... | Resets the iterator so it is read for use with a new piece of user data . | 338 | 18 |
164,158 | public boolean hasNext ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "hasNext" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "hasNext" , "" + transmissionsRemaining ) ; return transmissionsRemaining ; } | Returns true if this iterator contains more transmission data objects . | 71 | 11 |
164,159 | protected static TransmissionDataIterator allocateFromPool ( Connection connection , JFapByteBuffer buffer , int priority , boolean isPooled , boolean isExchange , int segmentType , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener , boolean isTerminal , int size ) { if ( tc... | Allocates an instance of this class from a pool | 195 | 11 |
164,160 | protected void release ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "release" ) ; if ( ! transmissionsRemaining ) { if ( tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "no more transmissions remaining - repooling" ) ; // Ensure we release the byte buffers back into the pool if ( buffer != nul... | Returns a previously allocated instance of this class to the pool | 147 | 11 |
164,161 | protected int getPriority ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getPriority" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPriority" , "" + priority ) ; return priority ; } | Returns the priority for data transmissions in this iterator | 70 | 9 |
164,162 | protected void setPriority ( int priority ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setPriority" , "" + priority ) ; this . priority = priority ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setPriority" ) ; } | Sets the priority for data transmissions in this iterator . This is used when data is enqueued to the priority queue with the lowest available option set - and we need to assigne it a hard priority | 75 | 41 |
164,163 | protected int getSize ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSize" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getSize" , "" + size ) ; return size ; } | Returns the size of the payload data the user requested tranmitted . | 67 | 14 |
164,164 | public static boolean isDebugEnabled ( ) { String value = System . getProperty ( DEBUG_PROPERTY ) ; if ( value != null && "true" . equalsIgnoreCase ( value ) ) { return true ; } return false ; } | Since logger is not activated while processing premain the trace data needs to be logged by using System . out . | 51 | 22 |
164,165 | private String getDefaultPackageExtension ( ) { // Default package format on z/OS is a pax if ( "z/OS" . equalsIgnoreCase ( bootProps . get ( "os.name" ) ) ) { return "pax" ; } if ( PackageProcessor . IncludeOption . RUNNABLE . matches ( includeOption ) ) { return "jar" ; } return "zip" ; } | Determine the default package format for the current operating system . | 89 | 13 |
164,166 | public static ASN1Set getInstance ( Object obj ) { if ( obj == null || obj instanceof ASN1Set ) { return ( ASN1Set ) obj ; } throw new IllegalArgumentException ( "unknown object in getInstance" ) ; } | return an ASN1Set from the given object . | 55 | 11 |
164,167 | @ Override public Conduit getConduit ( EndpointInfo endpointInfo , EndpointReferenceType target ) throws IOException { //create our LibertyHTTPConduit so that we can set the TCCL when run the handleResponseInternal asynchronously LibertyHTTPConduit conduit = new LibertyHTTPConduit ( bus , endpointInfo , target ) ; //fo... | set the auto - redirect to true | 447 | 7 |
164,168 | protected static final void setRSAKey ( byte [ ] [ ] key ) { BigInteger [ ] k = new BigInteger [ 8 ] ; for ( int i = 0 ; i < 8 ; i ++ ) { if ( key [ i ] != null ) { k [ i ] = new BigInteger ( 1 , key [ i ] ) ; } } if ( k [ 3 ] . compareTo ( k [ 4 ] ) < 0 ) { BigInteger tmp ; tmp = k [ 3 ] ; k [ 3 ] = k [ 4 ] ; k [ 4 ] ... | Set the key for RSA algorithms . | 391 | 7 |
164,169 | protected static final byte [ ] encrypt ( byte [ ] data , byte [ ] key , String cipher ) throws Exception { SecretKey sKey = constructSecretKey ( key , cipher ) ; Cipher ci = createCipher ( Cipher . ENCRYPT_MODE , key , cipher , sKey ) ; return ci . doFinal ( data ) ; } | Encrypt the data . | 74 | 5 |
164,170 | protected static final byte [ ] decrypt ( byte [ ] msg , byte [ ] key , String cipher ) throws Exception { SecretKey sKey = constructSecretKey ( key , cipher ) ; Cipher ci = createCipher ( Cipher . DECRYPT_MODE , key , cipher , sKey ) ; return ci . doFinal ( msg ) ; } | Decrypt the specified msg . | 73 | 6 |
164,171 | public void populatePrefixTable ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( TRACE , "populatePrefixTable" ) ; } // Create the storage. prefixTable = new HashMap < Class , String > ( ) ; // Populate with the supported (non-null) data types. prefixTable . put ( Bo... | Populates the prefix table for use when creating a Reference to a ConnFactory . Creates a map between supported data types for properties and the prefix used to store them . | 280 | 34 |
164,172 | public Map getMapFromReference ( final Reference ref , final Map defaults ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "getMapFromReference" , new Object [ ] { ref , defaults } ) ; } Map extractedProps = null ; // Extract a Map of the properties from... | Uses the reference passed in to extract a map of properties which have been stored in this Reference . | 351 | 20 |
164,173 | public void populateReference ( final Reference reference , final Map properties , final Map defaults ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "populateReference" , new Object [ ] { reference , properties , defaults } ) ; } // Make sure no-one ca... | Dynamically populates the reference that it has been given using the properties currently stored in this ConnectionFactory . Note that this way of doing things automatically handles the adding of extra properties without the need to change this code . | 237 | 44 |
164,174 | @ Override protected void setCommsConnection ( CommsConnection cc ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setCommsConnection" ) ; // Retrieve Client Conversation State if necessary validateConversationState ( ) ; sConState . setCommsConnection ( cc ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit... | Sets the CommsConnection associated with this Conversation | 101 | 10 |
164,175 | public ConversationReceiveListener acceptConnection ( Conversation cfConversation ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "acceptConnection" ) ; // Return new instance of a GenericTransportReceiveListener. This listener // determines whether data has been received from a client or ME and routes it // ac... | Notified when a new conversation is accepted by a listening socket . | 128 | 13 |
164,176 | public static QueuedMessage createSIBQueuedMessage ( SIMPQueuedMessageControllable qmc ) { String id = null ; int jsApproximateLength = 0 ; String name = null ; String state = null ; String transactionId = null ; String type = null ; String busSystemMessageId = null ; id = qmc . getId ( ) ; name = qmc . getName ( ) ; s... | Create a SIBQueuedMessageImpl instance from the supplied SIMPQueuedMessageControllable . | 287 | 21 |
164,177 | public static MessagingSubscription createSIBSubscription ( SIMPLocalSubscriptionControllable ls ) { long depth = 0 ; String id = null ; int maxMsgs = 0 ; String name = null ; String selector = null ; String subscriberId = null ; String [ ] topics = null ; depth = ls . getNumberOfQueuedMessages ( ) ; id = ls . getId ( ... | Create a MessagingSubscription instance from the supplied SIMPLocalSubscriptionControllable . | 153 | 19 |
164,178 | private static NLS getNLS ( Locale l , String resourceBundle , String statsType ) { // init Locale boolean bDefaultLocale = false ; if ( l == null || l == Locale . getDefault ( ) ) { bDefaultLocale = true ; l = Locale . getDefault ( ) ; } NLS aNLS = null ; if ( resourceBundle == null ) { // resourceBundle is NULL // tr... | in which case we dont cache | 755 | 6 |
164,179 | public static PmiModuleConfig getStatsConfig ( String statsType ) { PmiModuleConfig cfg = ( PmiModuleConfig ) rawConfigMap . get ( statsType ) ; if ( cfg == null ) cfg = _getStatsConfig ( statsType , false , null ) ; return cfg ; } | No translation . | 66 | 3 |
164,180 | public static PmiModuleConfig getTranslatedStatsConfig ( String statsType , Locale locale ) { PmiModuleConfig aCfg = getConfig ( locale , statsType ) ; if ( aCfg == null ) aCfg = _getStatsConfig ( statsType , true , locale ) ; return aCfg ; } | Translated based on the server locale | 69 | 7 |
164,181 | public static void translateAndCache ( PmiModuleConfig cfg , Locale l ) { PmiModuleConfig aCfg = getConfig ( l , cfg . getUID ( ) ) ; if ( aCfg == null ) { aCfg = cfg . copy ( ) ; // create a copy before translating // filter sub-module entry if ( aCfg != null ) { PmiDataInfo [ ] data = aCfg . listData ( null ) ; for (... | called by PmiRegistry . | 212 | 7 |
164,182 | public String [ ] getPath ( ) { if ( path != null ) return path ; else if ( instanceName == null && type == TYPE_SUBMODULE ) return new String [ ] { moduleID , submoduleName } ; else return super . getPath ( ) ; } | overwrite getPath method | 59 | 5 |
164,183 | public final static SubscriptionMessageType getSubscriptionMessageType ( int aValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Value = " + aValue ) ; return set [ aValue ] ; } | Returns the corresponding SubscriptionMessageType for a given integer . This method should NOT be called by any code outside the MFP component . It is only public so that it can be accessed by sub - packages . | 64 | 42 |
164,184 | private void fail ( final K key ) { final String methodName = "fail(): " ; stateLock . writeLock ( ) . lock ( ) ; try { Integer index = actualIndices . remove ( key ) ; if ( index == null ) throw new IllegalArgumentException ( "unknown key: " + key ) ; elements [ index ] = FAILED ; // register that this key failed ( fa... | Permanently fail to retrieve the element associated with the key independently of any timeout . | 180 | 17 |
164,185 | private void checkForCompletion ( ) { final String methodName = "checkForCompletion(): " ; // mark the list complete if that was the last awaited key if ( actualIndices . isEmpty ( ) ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , methodName + "setting state=COMPLETE" ) ; state = failedKeys == null ? COMPLETE : CO... | if all the keys have been satisfied or permanently failed mark this list as being complete | 103 | 16 |
164,186 | @ Override public int size ( ) { stateLock . readLock ( ) . lock ( ) ; try { switch ( state ) { default : // This list might be empty or full or somewhere in between: // we don't know until we look! preFetchAll ( ) ; // The list is now either complete or timed out - recurse to find the result. return size ( ) ; case TI... | Find the size of this list attempting to retrieve all elements if necessary . | 144 | 14 |
164,187 | @ FFDCIgnore ( IndexOutOfBoundsException . class ) private boolean ensureElement ( int index ) { try { get ( index ) ; return true ; } catch ( IndexOutOfBoundsException e ) { return false ; } } | Blocking call to ensure an element is available | 51 | 9 |
164,188 | public Set < K > getUnmatchedKeys ( ) { stateLock . readLock ( ) . lock ( ) ; try { return new HashSet < K > ( this . actualIndices . keySet ( ) ) ; } finally { stateLock . readLock ( ) . unlock ( ) ; } } | Get a point - in - time view of the unmatched keys . This may be immediately out of date unless additional synchronization is performed to prevent concurrent updates . | 63 | 30 |
164,189 | private String getTopic ( FrameworkEvent frameworkEvent ) { StringBuilder topic = new StringBuilder ( FRAMEWORK_EVENT_TOPIC_PREFIX ) ; switch ( frameworkEvent . getType ( ) ) { case FrameworkEvent . STARTED : topic . append ( "STARTED" ) ; break ; case FrameworkEvent . ERROR : topic . append ( "ERROR" ) ; break ; case ... | Determine the appropriate topic to use for the Framework Event . | 192 | 13 |
164,190 | void resetStatistics ( boolean clearHistory ) { lastTimerPop = System . currentTimeMillis ( ) ; previousCompleted = threadPool == null ? 0 : threadPool . getCompletedTaskCount ( ) ; previousThroughput = 0 ; consecutiveQueueEmptyCount = 0 ; consecutiveNoAdjustment = 0 ; consecutiveOutlierAfterAdjustment = 0 ; consecutiv... | Reset all statistics associated with the target thread pool . | 112 | 11 |
164,191 | void resetThreadPool ( ) { if ( threadPool == null ) return ; // if no pool (during shutdown), nothing to retune/reset // 8/22/2012: Introduced factor - was hard coded at 2 final int availableProcessors = NUMBER_CPUS ; int factor = 2500 * availableProcessors / Math . max ( 1 , ( int ) previousThroughput ) ; factor = Ma... | Reset all statistics associated with the thread pool and reset the pool size to a value that s based on the number of hardware threads available to the JVM . | 163 | 32 |
164,192 | synchronized void deactivate ( ) { paused = false ; if ( activeTask != null ) { activeTask . cancel ( ) ; activeTask = null ; } this . threadPool = null ; } | Deactivate the controller . Any scheduled tasks will be canceled . | 42 | 12 |
164,193 | synchronized void resume ( ) { paused = false ; if ( activeTask == null ) { activeTask = new IntervalTask ( this ) ; timer . schedule ( activeTask , interval , interval ) ; } } | Resume monitoring and control of the associated thread pool . | 45 | 11 |
164,194 | ThroughputDistribution getThroughputDistribution ( int activeThreads , boolean create ) { if ( activeThreads < coreThreads ) activeThreads = coreThreads ; Integer threads = Integer . valueOf ( activeThreads ) ; ThroughputDistribution throughput = threadStats . get ( threads ) ; if ( ( throughput == null ) && create ) {... | Get the throughput distribution data associated with the specified number of active threads . | 111 | 14 |
164,195 | boolean manageIdlePool ( ThreadPoolExecutor threadPool , long intervalCompleted ) { // Manage the intervalCompleted count if ( intervalCompleted == 0 && threadPool . getActiveCount ( ) == 0 ) { consecutiveIdleCount ++ ; } else { consecutiveIdleCount = 0 ; } if ( consecutiveIdleCount >= IDLE_INTERVALS_BEFORE_PAUSE ) { p... | Determine whether or not the thread pool has been idle long enough to pause the monitoring task . | 104 | 20 |
164,196 | boolean handleOutliers ( ThroughputDistribution distribution , double throughput ) { if ( throughput < 0.0 ) { resetStatistics ( false ) ; return true ; } else if ( throughput == 0.0 ) { return false ; } double zScore = distribution . getZScore ( throughput ) ; boolean currentIsOutlier = zScore <= - 3.0 || zScore >= 3.... | Detect and handle aberrant data points by resetting the statistics in the throughput distribution . | 751 | 17 |
164,197 | int adjustPoolSize ( int poolSize , int poolAdjustment ) { if ( threadPool == null ) return poolSize ; // arguably should return 0, but "least change" is safer... This happens during shutdown. int newPoolSize = poolSize + poolAdjustment ; lastAction = LastAction . NONE ; if ( poolAdjustment != 0 ) { // don't shrink bel... | Adjust the size of the thread pool . | 175 | 8 |
164,198 | private String poolTputRatioData ( double poolTputRatio , double poolRatio , double tputRatio , double smallerPoolTput , double largerPoolTput , int smallerPoolSize , int largerPoolSize ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "\n " ) ; sb . append ( String . format ( " poolTputRatio: %.3f" , Double... | Utility method to format pool tput ratio data | 321 | 10 |
164,199 | private boolean resolveHang ( long tasksCompleted , boolean queueEmpty , int poolSize ) { boolean actionTaken = false ; if ( tasksCompleted == 0 && ! queueEmpty ) { /** * When a hang is detected the controller enters hang resolution mode. * The controller will run on a shorter-than-usual cycle for hangResolutionCycles ... | Detects a hang in the underlying executor . When a hang is detected increases the poolSize in hopes of relieving the hang unless poolSize has reached maxThreads . | 790 | 35 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.