idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
160,900
void balance ( NodeStack stack , GBSNode q ) { GBSNode p ; int bpidx = stack . balancePointIndex ( ) ; int x = bpidx ; GBSNode bpoint = stack . node ( x ) ; GBSNode bfather = stack . node ( x - 1 ) ; /* Adjust balance factors in intervening nodes */ if ( bpoint . leftChild ( ) == stack . node ( x + 1 ) ) p = bpoint . l...
Restore the height balance of a tree following an insert .
459
12
160,901
private void rotateLeft ( GBSNode bfather , GBSNode bpoint ) { GBSNode bson = bpoint . leftChild ( ) ; if ( bson . balance ( ) == - 1 ) /* Single LL rotation */ { bpoint . setLeftChild ( bson . rightChild ( ) ) ; bson . setRightChild ( bpoint ) ; if ( bfather . rightChild ( ) == bpoint ) bfather . setRightChild ( bson ...
Do an LL or LR rotation .
293
7
160,902
public Entry getPrevious ( ) { checkEntryParent ( ) ; Entry entry = null ; if ( ! isFirst ( ) ) { entry = previous ; } return entry ; }
Unsynchronized . Get the previous entry in the list .
36
13
160,903
@ Override public boolean analyzeJar ( Analyzer analyzer ) throws Exception { try { if ( scanAgain ) { //this will only have an effect on the first scan, because subsequent scanAgain //will use the errorMarker to decide if to scan again resetErrorMarker ( ) ; List < String > newlyAddedPackages = new ArrayList < String ...
all class types that need to be exported
791
8
160,904
private void collectClassDependencies ( Clazz classInstance , Analyzer analyzer ) throws Exception { // retrieve the imports from the known class path Set < TypeRef > importedClasses = classInstance . parseClassFile ( ) ; for ( TypeRef importedClass : importedClasses ) { if ( canBeSkipped ( importedClass ) ) // validat...
Collect the imports from a class and add the imported classes to the map of all known classes importedReferencedTypes is updated to contain newly added imports allReferencedTypes is updated to avoid the duplicated process
208
43
160,905
private boolean canBeSkipped ( TypeRef importedClass ) { // skip known imported classes and the ones in JRE if ( allReferencedTypes . contains ( importedClass ) || importedReferencedTypes . contains ( importedClass ) || importedClass . isJava ( ) ) return true ; // Skip the imported classes which are excluded String cl...
check whether a imported class should be considered in further dependency check
163
12
160,906
private Set < PackageRef > collectPackageDependencies ( ) { Set < PackageRef > referencedPackages = new HashSet < PackageRef > ( ) ; for ( TypeRef newReferencedType : importedReferencedTypes ) { PackageRef packageRef = newReferencedType . getPackageRef ( ) ; if ( referencedPackages . contains ( packageRef ) ) // packag...
Collect the referenced packages information from the referenced classes information
125
10
160,907
public boolean addMetatypeAd ( MetatypeAd metatypeAd ) { if ( this . metatypeAds == null ) this . metatypeAds = new LinkedList < MetatypeAd > ( ) ; for ( MetatypeAd ad : metatypeAds ) if ( ad . getID ( ) . equals ( metatypeAd . getID ( ) ) ) return false ; this . metatypeAds . add ( metatypeAd ) ; return true ; }
Adds a metatype AD .
110
7
160,908
public synchronized void prepareSocket ( ) throws IOException { if ( ! prepared ) { final long fd = getFileDescriptor ( ) ; if ( fd == INVALID_SOCKET ) { throw new AsyncException ( AsyncProperties . aio_handle_unavailable ) ; } channelIdentifier = provider . prepare2 ( fd , asyncChannelGroup . getCompletionPort ( ) ) ;...
Perform initialization steps for this new connection .
419
9
160,909
public String getParameterClassName ( String attributeName , JspCoreContext context ) throws JspCoreException { String parameterClassName = null ; if ( parameterClassNameMap == null ) { parameterClassNameMap = new HashMap ( ) ; } parameterClassName = ( String ) parameterClassNameMap . get ( attributeName ) ; if ( param...
PK36246 && 417178 override method in TagClassInfo but since we aren t loading a class right now we don t have to worry about the classpath in the context
229
35
160,910
public ReturnCode rollback ( ) { while ( ! history . isEmpty ( ) ) { final Action action = ( Action ) history . pop ( ) ; final ReturnCode ret = action . execute ( ) ; if ( ret . getCode ( ) != 0 ) { return ret ; } } return ReturnCode . OK ; }
Attempts to undo changes in reverse order of actions taken ;
67
11
160,911
public void updateState ( SSLContext context , SSLEngine engine , SSLEngineResult result , WsByteBuffer decNetBuf , int position , int limit ) { this . sslContext = context ; this . sslEngine = engine ; this . sslEngineResult = result ; this . decryptedNetBuffer = decNetBuf ; this . netBufferPosition = position ; this ...
Update this state object with current information . This is called when a YES response comes from the discriminator . The position and limit must be saved here so the ready method can adjust them right away .
92
39
160,912
private void setXMLBeanInterface ( String homeInterfaceName , String interfaceName ) // F743-32443 throws InjectionException { // If a home or business interface was specified in XML, then set that as // the injection type. Both may be null if the XML just provides an // override of an annotation to add <ejb-link>... i...
Sets the beanInterface as specified by XML .
348
10
160,913
private void setBindingName ( ) // d681743 throws InjectionException { Map < String , String > ejbRefBindings = ivNameSpaceConfig . getEJBRefBindings ( ) ; if ( ejbRefBindings != null ) { ivBindingName = ejbRefBindings . get ( getJndiName ( ) ) ; if ( ivBindingName != null && ivBindingName . equals ( "" ) ) { ivBinding...
Returns true if the user has configured a binding for this reference .
278
13
160,914
@ Override public void addInjectionTarget ( Member member ) throws InjectionException { // If the beanName attribute was found in the constructor or merge // method, then save the class of where it was located. if ( ivBeanName != null && ivBeanNameClass == null ) { ivBeanNameClass = member . getDeclaringClass ( ) ; } s...
d638111 . 1
89
6
160,915
@ Override public void visitInsn ( int opcode ) { if ( opcode == ATHROW && ! enabledListeners . isEmpty ( ) ) { String key = createKey ( ) ; ProbeImpl probe = getProbe ( key ) ; long probeId = probe . getIdentifier ( ) ; setProbeInProgress ( true ) ; visitInsn ( DUP ) ; // throwable throwable visitLdcInsn ( Long . valu...
Inject code to fire a probe before any throw instruction .
312
12
160,916
public void addData ( int index , byte [ ] data ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addData" , new java . lang . Object [ ] { new Integer ( index ) , RLSUtils . toHexString ( data , RLSUtils . MAX_DISPLAY_BYTES ) , this } ) ; // If the parent recovery log instance has exper...
recovery method to add data directly to _writtenData array
507
13
160,917
public int identity ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "identity" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "identity" , new Integer ( _identity ) ) ; return _identity ; }
Returns the identity of the recoverable unit section .
66
10
160,918
public static int decode ( WsByteBuffer headerBlock , int N ) { // if (!headerBlock.hasRemaining()) { // throw new HeaderFieldDecodingException("No length to decode"); // } int I = HpackUtils . getLSB ( headerBlock . get ( ) , N ) ; if ( I < HpackUtils . ipow ( 2 , N ) - 1 ) { return I ; } else { int M = 0 ; boolean do...
Decodes a provided byte array that was encoded using an N - bit prefix .
235
16
160,919
static protected int getPadBits ( int bitString ) { int val = 0 ; for ( int i = 3 ; i >= 0 ; i -- ) { // // this may look a little odd, but if it isn't done like this pre jdk1.2 // JVM's break! // if ( i != 0 ) { if ( ( bitString >> ( i * 8 ) ) != 0 ) { val = ( bitString >> ( i * 8 ) ) & 0xFF ; break ; } } else { if ( ...
return the correct number of pad bits for a bit string defined in a 32 bit constant
175
17
160,920
static protected byte [ ] getBytes ( int bitString ) { int bytes = 4 ; for ( int i = 3 ; i >= 1 ; i -- ) { if ( ( bitString & ( 0xFF << ( i * 8 ) ) ) != 0 ) { break ; } bytes -- ; } byte [ ] result = new byte [ bytes ] ; for ( int i = 0 ; i < bytes ; i ++ ) { result [ i ] = ( byte ) ( ( bitString >> ( i * 8 ) ) & 0xFF ...
return the correct number of bytes for a bit string defined in a 32 bit constant
118
16
160,921
public static DERBitString getInstance ( Object obj ) { if ( obj == null || obj instanceof DERBitString ) { return ( DERBitString ) obj ; } if ( obj instanceof ASN1OctetString ) { byte [ ] bytes = ( ( ASN1OctetString ) obj ) . getOctets ( ) ; int padBits = bytes [ 0 ] ; byte [ ] data = new byte [ bytes . length - 1 ] ;...
return a Bit String from the passed in object
200
9
160,922
private AuthenticationResult handleBasicAuth ( String inRealm , HttpServletRequest req , HttpServletResponse res ) { AuthenticationResult result = null ; String hdrValue = req . getHeader ( BASIC_AUTH_HEADER_NAME ) ; if ( hdrValue == null || ! hdrValue . startsWith ( "Basic " ) ) { result = new AuthenticationResult ( A...
handleBasicAuth generates AuthenticationResult This routine invokes basicAuthenticate which also generates AuthenticationResult .
298
19
160,923
protected String getBasicAuthRealmName ( WebRequest webRequest ) { SecurityMetadata securityMetadata = webRequest . getSecurityMetadata ( ) ; if ( securityMetadata != null ) { LoginConfiguration loginConfig = securityMetadata . getLoginConfiguration ( ) ; if ( loginConfig != null && loginConfig . getRealmName ( ) != nu...
Return a realm name if it s defined in the web . xml file . If it s not defined in the web . xml and displayAuthenticationRealm is set to true then return the userRegistry realm . Otherwise return the realm as Default Realm .
128
51
160,924
@ Sensitive protected String decodeBasicAuth ( String data , String encoding ) { String output = "" ; byte decodedByte [ ] = null ; decodedByte = Base64Coder . base64DecodeString ( data ) ; if ( decodedByte != null && decodedByte . length > 0 ) { boolean decoded = false ; if ( encoding != null ) { try { output = new St...
2 . This method intentionally returns empty string in case of error . With that a caller doesn t need to check null object prior to introspect it .
195
30
160,925
public static boolean isUninstallable ( Set < IFixInfo > installedFixes , IFixInfo fixToBeUninstalled ) { if ( Boolean . valueOf ( System . getenv ( S_DISABLE ) ) . booleanValue ( ) ) { return true ; } if ( fixToBeUninstalled != null ) { for ( IFixInfo fix : installedFixes ) { if ( ! ( fixToBeUninstalled . getId ( ) . ...
Return true if fixToBeUninstalled can be uninstalled . fixToBeUninstalled can only be uninstalled if there are no file conflicts with other fixes in the installedFixes Set that supersedes fixToBeUninstalled
202
47
160,926
public boolean isUninstallable ( UninstallAsset uninstallAsset , Set < IFixInfo > installedFixes , List < UninstallAsset > uninstallAssets ) { if ( Boolean . valueOf ( System . getenv ( S_DISABLE ) ) . booleanValue ( ) ) { return true ; } IFixInfo fixToBeUninstalled = uninstallAsset . getIFixInfo ( ) ; for ( IFixInfo f...
Verfiy whether the fix is uninstallable and there is no other installed fix still require this feature .
235
21
160,927
public static ArrayList < String > fixRequiredByFeature ( String fixApar , Map < String , ProvisioningFeatureDefinition > installedFeatures ) { ArrayList < String > dependencies = new ArrayList < String > ( ) ; for ( ProvisioningFeatureDefinition fd : installedFeatures . values ( ) ) { String requireFixes = fd . getHea...
Determine the fix apar is required by one of the installed features
179
15
160,928
public List < UninstallAsset > determineOrder ( List < UninstallAsset > list ) { if ( list != null ) { List < FixDependencyComparator > fixCompareList = new ArrayList < FixDependencyComparator > ( ) ; // Initialize the feature comparator for ( UninstallAsset asset : list ) { fixCompareList . add ( new FixDependencyComp...
Determine the order of the fixes according to their dependency
186
12
160,929
private static boolean isSupersededBy ( List < Problem > apars1 , List < Problem > apars2 ) { boolean result = true ; // Now iterate over the current list of problems, and see if the incoming IFixInfo contains all of the problems from this IfixInfo. // If it does then return true, to indicate that this IFixInfo object ...
Returns if the apars list apars1 is superseded by apars2 . Apars1 is superseded by apars2 if all the apars in apars1 is also included in apars2
233
43
160,930
private static boolean confirmNoFileConflicts ( Set < UpdatedFile > updatedFiles1 , Set < UpdatedFile > updatedFiles2 ) { for ( Iterator < UpdatedFile > iter1 = updatedFiles1 . iterator ( ) ; iter1 . hasNext ( ) ; ) { UpdatedFile currFile1 = iter1 . next ( ) ; for ( Iterator < UpdatedFile > iter2 = updatedFiles2 . iter...
Confirms that UpdatedFile lists does not contain any common files
150
12
160,931
@ Override public void close ( boolean deleteProgressFile ) { final String methodName = "close()" ; traceDebug ( methodName , "cacheName=" + this . cacheName + " deleteProgressFile=" + deleteProgressFile ) ; if ( deleteProgressFile ) { // 316654 // remove the InProgress (dummy) file when close deleteInProgressFile ( ) ...
Call this method to close the disk file manager and operation .
180
12
160,932
@ Override public int writeAuxiliaryDepTables ( ) { int returnCode = htod . writeAuxiliaryDepTables ( ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } else { updatePropertyFile ( ) ; } return returnCode ; }
Call this method to offload auxiliary dependency tables to the disk and update property file .
83
17
160,933
private void readLastScanFile ( ) { final String methodName = "readLastScanFile()" ; final File f = new File ( lastScanFileName ) ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; if ( f . exists ( ) ) { final CacheOnDisk cod = this ; AccessController . doPrivileged ( new PrivilegedAction ( ) { @ Override...
Call this method to read the timestamp of the last scan in Last Scan file .
379
16
160,934
protected void updateLastScanFile ( ) { final String methodName = "updateLastScanFile()" ; final File f = new File ( lastScanFileName ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; AccessController . doPrivileged ( new PrivilegedAction ( ) { @ Override public Object run...
Call this method to update the timestamp of the last scan in Last Scan file .
369
16
160,935
private void deletePropertyFile ( ) { final String methodName = "deletePropertyFile()" ; final File f = new File ( htodPropertyFileName ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; AccessController . doPrivileged ( new PrivilegedAction ( ) { public Object run ( ) { tr...
Call this method to delete the HTOD property file .
187
11
160,936
public void deleteDiskCacheFiles ( ) { final String methodName = "deleteDiskCacheFiles()" ; final File f = new File ( swapDirPath ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; AccessController . doPrivileged ( new PrivilegedAction ( ) { public Object run ( ) { // delet...
Call this method to delete all disk cache files per cache instance .
224
13
160,937
protected ValueSet readAndDeleteInvalidationFile ( ) { final String methodName = "readAndDeleteInvalidationFile()" ; final File f = new File ( invalidationFileName ) ; final CacheOnDisk cod = this ; this . valueSet = new ValueSet ( 1 ) ; if ( f . exists ( ) ) { AccessController . doPrivileged ( new PrivilegedAction ( )...
Call this method to read in all invalidation cache ids if the invalidation file exists . and then delete the invalidation file .
476
27
160,938
protected void createInvalidationFile ( ) { final String methodName = "createInvalidationFile()" ; final File f = new File ( invalidationFileName ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName + " valueSet=" + cod . valueSet . size ( ) ) ; AccessController . doPrivileged ( ...
Call this method to create invalidation file to offload the invalidation cache ids . When the server is restarted the invalidation cache ids are read back . The LPBT will be called to remove these cache ids from the disk .
412
50
160,939
public void alarm ( final Object alarmContext ) { final String methodName = "alarm()" ; synchronized ( this ) { if ( ! stopping && ! this . htod . invalidationBuffer . isDiskClearInProgress ( ) ) { this . htod . invalidationBuffer . invokeBackgroundInvalidation ( HTODInvalidationBuffer . SCAN ) ; } else if ( stopping )...
Call this method when the alarm is triggered . It is being checked to see whether a disk cleanup is scheduled to run .
214
24
160,940
public void clearDiskCache ( ) { if ( htod . clearDiskCache ( ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } else { updateLastScanFile ( ) ; updatePropertyFile ( ) ; createInProgressFile ( ) ; } }
Call this method to clear the disk cache per cache instance .
75
12
160,941
public int writeCacheEntry ( CacheEntry ce ) { // @A5C int returnCode = htod . writeCacheEntry ( ce ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to write a cache entry to the disk .
72
12
160,942
public CacheEntry readCacheEntry ( Object id ) { // SKS-O Result result = htod . readCacheEntry ( id ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return null ; } CacheEntry cacheEntry = ( CacheEntry ) result . d...
Call this method to read a cache entry from the disk .
112
12
160,943
public void delCacheEntry ( CacheEntry ce , int cause , int source , boolean fromDepIdTemplateInvalidation ) { htod . delCacheEntry ( ce , cause , source , fromDepIdTemplateInvalidation ) ; }
Call this method to a cache entry from the disk .
48
11
160,944
public void delCacheEntry ( ValueSet removeList , int cause , int source , boolean fromDepIdTemplateInvalidation , boolean fireEvent ) { htod . delCacheEntry ( removeList , cause , source , fromDepIdTemplateInvalidation , fireEvent ) ; }
Call this method to remove multiple of cache ids from the disk .
57
14
160,945
public ValueSet readDependency ( Object id , boolean delete ) { // SKS-O Result result = htod . readDependency ( id , delete ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return HTODDynacache . EMPTY_VS ; } Value...
Call this method to read a specified dependency id which contains the cache ids from the disk .
153
19
160,946
public ValueSet readTemplate ( String template , boolean delete ) { Result result = htod . readTemplate ( template , delete ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return HTODDynacache . EMPTY_VS ; } ValueS...
Call this method to read a specified template which contains the cache ids from the disk .
144
18
160,947
public ValueSet readTemplatesByRange ( int index , int length ) { Result result = htod . readTemplatesByRange ( index , length ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return HTODDynacache . EMPTY_VS ; } Val...
Call this method to get the template ids based on the index and the length from the disk .
150
20
160,948
public int getCacheIdsSize ( boolean filter ) { if ( filter == CacheOnDisk . FILTER ) { return htod . getCacheIdsSize ( filter ) - htod . invalidationBuffer . size ( ) ; } else { return htod . getCacheIdsSize ( filter ) ; } }
Call this method to get the number of the cache ids in the disk .
69
16
160,949
public void delDependencyEntry ( Object id , Object entry ) { // SKS-O if ( htod . delDependencyEntry ( id , entry ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete a cache id from a specified dependency in the disk .
69
16
160,950
public void delTemplateEntry ( String template , Object entry ) { if ( htod . delTemplateEntry ( template , entry ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete a cache id from a specified template in the disk .
60
16
160,951
public void delDependency ( Object id ) { // SKS-O if ( htod . delDependency ( id ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete speciifed dependency id from the disk .
62
15
160,952
public void delTemplate ( String template ) { if ( htod . delTemplate ( template ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete speciifed template from the disk .
53
14
160,953
public int writeDependency ( Object id , ValueSet vs ) { // SKS-O int returnCode = htod . writeDependency ( id , vs ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to write a dependency id with a collection of cache ids to the disk .
79
19
160,954
public int writeTemplate ( String template , ValueSet vs ) { int returnCode = htod . writeTemplate ( template , vs ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to write a template with a collection of cache ids to the disk .
70
18
160,955
public int writeDependencyEntry ( Object id , Object entry ) { // SKS-O int returnCode = htod . writeDependencyEntry ( id , entry ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to add a cache id for a specified dependency id to the disk .
80
17
160,956
public int writeTemplateEntry ( String template , Object entry ) { int returnCode = htod . writeTemplateEntry ( template , entry ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to add a cache id for a specified template to the disk .
71
16
160,957
protected long calculateSleepTime ( ) { Calendar c = new GregorianCalendar ( ) ; int currentHour = c . get ( Calendar . HOUR_OF_DAY ) ; int currentMin = c . get ( Calendar . MINUTE ) ; int currentSec = c . get ( Calendar . SECOND ) ; long stime = SECONDS_FOR_24_HOURS - ( ( currentHour * 60 + currentMin ) * 60 + current...
return the sleep time in msec
170
6
160,958
public void clearInvalidationBuffers ( ) { this . htod . invalidationBuffer . clear ( HTODInvalidationBuffer . EXPLICIT_BUFFER ) ; // 3821 NK begin this . htod . invalidationBuffer . clear ( HTODInvalidationBuffer . SCAN_BUFFER ) ; if ( this . evictionPolicy != CacheConfig . EVICTION_NONE ) { this . htod . invalidation...
This method clears invalidaiton buffers in HTODDynacache
115
14
160,959
public Result readHashcodeByRange ( int index , int length , boolean debug , boolean useValue ) { // LI4337-17 Result result = this . htod . readHashcodeByRange ( index , length , debug , useValue ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; } return result...
This method find the hashcode based on index and length .
90
12
160,960
public int updateExpirationTime ( Object id , long oldExpirationTime , int size , long newExpirationTime , long newValidatorExpirationTime ) { int returnCode = this . htod . updateExpirationTime ( id , oldExpirationTime , size , newExpirationTime , newValidatorExpirationTime ) ; if ( returnCode == HTODDynacache . DISK_...
This method is used to update expiration times in GC and disk emtry header
112
15
160,961
protected int checkDirectoryWriteable ( String location ) { final String methodName = "checkDirectoryWriteable()" ; int rc = CacheOnDisk . LOCATION_OK ; if ( location . equals ( "" ) ) { rc = CacheOnDisk . LOCATION_NOT_DEFINED ; } else if ( location . startsWith ( "${" ) && location . indexOf ( "}" ) > 0 ) { rc = Cache...
Check the location whether it is writable or not
359
10
160,962
public static String getRepositorySubpath ( MavenCoordinates artifact ) { StringBuffer buf = new StringBuffer ( ) ; String [ ] groupDirs = artifact . getGroupId ( ) . split ( "\\." ) ; for ( String dir : groupDirs ) { buf . append ( dir ) . append ( "/" ) ; } buf . append ( artifact . getArtifactId ( ) ) . append ( "/"...
Gets the expected path within a Maven repository for the given Maven artifact based on its Maven coordinates .
112
23
160,963
public static String getFileName ( MavenCoordinates artifact , Constants . ArtifactType type ) { return artifact . getArtifactId ( ) + "-" + artifact . getVersion ( ) + type . getMavenFileExtension ( ) ; }
Gets the expected file name for a Maven artifact based on its Maven coordinates .
54
18
160,964
@ Override public void clearBody ( ) throws javax . jms . JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "clearBody" ) ; // Set the message into write-only mode, handle generic actions super . clearBody ( ) ; // Clear the locally stored reference to...
Clear out the message body . All other parts of the message are left untouched .
752
16
160,965
@ Override public byte readByte ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readByte" ) ; try { // Check that we are in read mode checkBodyReadable ( "readByte" ) ; if ( requiresInit ) lazyInitForReading ( ) ; // Read the byte from th...
Read a signed 8 - bit value from the stream message .
229
12
160,966
@ Override public int readBytes ( byte [ ] value , int length ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readBytes" , new Object [ ] { value , length } ) ; try { // Check that we are in read mode checkBodyReadable ( "readBytes" ) ; if ...
Read a portion of the bytes message stream .
324
9
160,967
@ Override public char readChar ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readChar" ) ; try { // Check that we are in read mode checkBodyReadable ( "readChar" ) ; if ( requiresInit ) lazyInitForReading ( ) ; // Mark the current posi...
Read a Unicode character value from the stream message .
307
10
160,968
@ Override public long readLong ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readLong" ) ; try { // Check that we are in read mode checkBodyReadable ( "readLong" ) ; if ( requiresInit ) lazyInitForReading ( ) ; // Mark the current posi...
Read a signed 64 - bit integer from the stream message .
319
12
160,969
@ Override public String readUTF ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readUTF" ) ; String result ; try { // Check that we are in read mode checkBodyReadable ( "readUTF" ) ; if ( requiresInit ) lazyInitForReading ( ) ; // Mark t...
Read in a string that has been encoded using a modified UTF - 8 format from the stream message .
273
20
160,970
@ Override public void reset ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reset" ) ; // After reset has been called, the message body is immutable (the only way of changing it is to // call clearBody and start again). If we're in Write...
Put the message in read - only mode and reposition the stream of bytes to the beginning .
591
19
160,971
@ Override public void writeBytes ( byte [ ] value ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "writeBytes" , value ) ; try { // Check that we are in write mode checkBodyWriteable ( "writeBytes" ) ; // This method has different behaviour...
Write a byte array to the stream message .
783
9
160,972
@ Override public void writeBytes ( byte [ ] value , int offset , int length ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "writeBytes" , new Object [ ] { value , offset , length } ) ; try { // Check if the producer has promised not to mod...
Write a portion of a byte array to the stream message .
370
12
160,973
@ Override public void writeObject ( Object value ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeObject" ) ; // Check if the producer has promised not to modify the payload after it's been set checkProducerPromise ( "writeObject(Object)" , "...
Write a Java object to the stream message .
581
9
160,974
@ Override protected JsJmsMessage getMsgReference ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getMsgReference" ) ; // If the body is read only, the contents should already be in the // JS message, so only do the copy over if we are in...
override the getMsgReference method of the parent class . We need to ensure that the message body is written into the JS message before returning the reference to it .
535
33
160,975
private void recordInteger ( int offset , int length ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "recordInteger" , new Object [ ] { offset , length } ) ; // If the current arrays are full, save them in the vector and allocate some new ones if ( integer_coun...
Records the presence of an integer - style item in the bytes message stream . This method is called by the writeXXX methods to keep a track of where the integer items are so they can be byteswapped if necessary at send time .
236
48
160,976
private void reverse ( byte [ ] buffer , int offset , int length ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reverse" , new Object [ ] { buffer , offset , length } ) ; byte temp ; for ( int i = 0 ; i < length / 2 ; i ++ ) { temp = buffer [ offset + i ] ; b...
This method reverses a sequence of bytes within a byte array . It is used for byte swapping numeric values
166
21
160,977
private void checkProducerPromise ( String jmsMethod , String ffdcProbeID ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "checkProducerPromise" , new Object [ ] { jmsMethod , ffdcProbeID } ) ; // Only proceed if the producer hasn't promised...
Checks to see if the producer has promised not to modify the payload after it s been set . If they have then throw a JMS exception based on the parameters
255
33
160,978
public void stopConsumer ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "stopConsumer" ) ; try { // lock the consumerSession to ensure visibility of update to started. synchronized ( consumerSession ) { consumerSession . getConsumerSession ( ) . stop ( ) ; c...
Safely stop the consumer
226
5
160,979
public boolean setClassifications ( Flow [ ] newFlows ) throws InvalidFlowsException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setClassifications" , newFlows ) ; boolean noClassChange = true ; // Do we have the same set of flows but with different weightings only...
Supports the setting of a new set of classifications based on a set of Flows provided by the caller .
635
23
160,980
public int getNumberOfClasses ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getNumberOfClasses" ) ; SibTr . exit ( tc , "getNumberOfClasses" , Integer . valueOf ( numberOfClasses ) ) ; } return numberOfClasses ; }
Retrieve the number of classifications specified in the current set .
85
13
160,981
public int getPosition ( String classificationName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getPosition" , classificationName ) ; int classPos = 0 ; // Get the position of the classification ClassWeight cw = messageClasses . get ( classificationName ) ; if ( c...
Get the index of a named classification .
143
8
160,982
public int getWeight ( String classificationName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getWeight" , classificationName ) ; int weight = 0 ; // Get the weight of the classification ClassWeight cw = messageClasses . get ( classificationName ) ; if ( cw != nul...
Get the weight of a named classification .
139
8
160,983
public int findClassIndex ( HashMap < Integer , Integer > weightMap ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "findClassIndex" ) ; int classPos = 0 ; int randWeight = 0 ; // First of all determine total weight int totalWeight = 0 ; Iterator < Integer > iter = we...
Find a pseudo random classification index based on the weightings table .
512
13
160,984
public Flow [ ] getFlows ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getFlows" ) ; } Flow [ ] clonedFlows = flows . clone ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "getFlows" , clonedFlows ) ; } ret...
Returns the array of flows defined in this classification specified by XD .
112
13
160,985
public Map < Object , Object > getPropertyBag ( ) { if ( this . properties == null ) { this . properties = new HashMap < Object , Object > ( ) ; } return this . properties ; }
Fetch the property bag associated with this Chain .
45
10
160,986
public ChainDataImpl getExternalChainData ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "getExternalChainData" ) ; } // Create the list of the parents of the child data objects. ChannelData [ ] parents = new ChannelData [ this . channelDataArray . length ] ;...
Create a cloned representation of this chain data which only includes references to parent channel data objects . It hides the children and their names .
280
27
160,987
public final void addChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "addChainEventListener: " + listener ) ; } if ( null != listener ) { this . chainEventListeners . add ( listener ) ; } }
Enables external entities to be notified of chain events described in ChainEventListener interface .
77
17
160,988
public final void removeChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "removeChainEventListener: " + listener ) ; } if ( null != listener ) { if ( ! this . chainEventListeners . remove ( listener ) ) { if ( Trac...
Removes a listener from the list of those being informed of chain events on this chain .
124
18
160,989
public Set < ChainEventListener > removeAllChainEventListeners ( ) { Set < ChainEventListener > returnListeners = new HashSet < ChainEventListener > ( this . chainEventListeners ) ; this . chainEventListeners . clear ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , ...
Remove the chain event listeners from this configuration and return them in a new hash set . This method is called during the updateChain in order to move the event listeners from the old config to the new one .
105
41
160,990
public void setChainEventListeners ( Set < ChainEventListener > newListeners ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "removeAllChainEventListeners" , newListeners ) ; } chainEventListeners . clear ( ) ; chainEventListeners . addAll ( newListeners ) ; }
Set the list of chain event listeners for this chain configuration . This method was originally created to pass along chain event listeners from one chain config to another chain config during the updateChain method .
87
37
160,991
public final void chainInitialized ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "chainInitialized, chain: " + this . name ) ; } // Clone the list in case one of the event listeners modifies // the chain during this iteration. for ( ChainEventListener listen...
This method is called when the chain has been initialized . It informs each of the chain event listeners .
132
20
160,992
public final void chainStartFailed ( int attemptsMade , int attemptsLeft ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "chainStartFailed, chain: " + this . name ) ; } // Clone the list in case one of the event listeners modifies // the chain during this iterat...
This method is called when the chain start fails . It informs each of the chain event listeners .
218
19
160,993
public CFEndPoint getEndPoint ( ) throws ChannelFrameworkException { if ( null == this . endPoint ) { if ( FlowType . INBOUND . equals ( this . type ) ) { this . endPoint = new CFEndPointImpl ( this ) ; } else { throw new ChannelFrameworkException ( this . name + " is not inbound chain" ) ; } } return this . endPoint ;...
Access the possible endpoint representation of this chain . This will throw an exception if the chain is not inbound .
88
22
160,994
@ Trivial protected String getRawProperty ( String key ) { String rawValue = source . getValue ( key ) ; if ( rawValue != null ) { current . put ( key , rawValue ) ; } return rawValue ; }
Return the raw unconverted String associated with a key .
50
11
160,995
protected final TagAttribute getRequiredAttribute ( String localName ) throws TagException { TagAttribute attr = this . getAttribute ( localName ) ; if ( attr == null ) { throw new TagException ( this . tag , "Attribute '" + localName + "' is required" ) ; } return attr ; }
Utility method for fetching a required TagAttribute
67
10
160,996
public void setInputHandler ( ProducerInputHandler inputHandler ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setInputHandler" , inputHandler ) ; this . inputHandler = inputHandler ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr ....
Sets the inputHandler for this destination .
97
9
160,997
void setBus ( String busName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setBus" , busName ) ; this . busName = busName ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setBus" ) ; }
Sets the bus name for this destination .
91
9
160,998
public void setForeignBusSendAllowed ( boolean sendAllowed ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "setForeignBusSendAllowed" , Boolean . valueOf ( sendAllowed ) ) ; } // Set the flag on this handler _sendAllowedOnTargetForeignBus = Boolean . valueOf ( sendA...
Set the Foreign Bus Level sendAllowed flag
239
9
160,999
@ Trivial public static < U > CompletableFuture < U > failedFuture ( Throwable x ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.failedFuture" ) ) ; }
Because CompletableFuture . failedFuture is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static failedFuture method on that .
63
53