signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ProcessContext { /** * Checks if the given attribute is known , i . e . is contained in the * attribute list . * @ param attribute Attribute to be checked . * @ throws IllegalArgumentException If the given attribute is not known . */ public void validateAttribute ( String attribute ) throws Compatibi...
try { super . validateObject ( attribute ) ; } catch ( CompatibilityException e ) { throw new CompatibilityException ( "Unknown attribute: " + attribute , e ) ; }
public class MemcachedManagerBuilder { /** * Configuration based on system properties set by the memcacheAddOn */ public static MemcachedManagerBuilder memcacheAddOn ( ) { } }
final String memcacheServers = System . getenv ( "MEMCACHE_SERVERS" ) ; return memcachedConfig ( ) . username ( System . getenv ( "MEMCACHE_USERNAME" ) ) . password ( System . getenv ( "MEMCACHE_PASSWORD" ) ) . url ( memcacheServers == null ? DEFAULT_URL : memcacheServers ) ;
public class CmsJspTagEdit { /** * Creates the String specifying where which type of resource has to be created . < p > * @ param cms the CMS context * @ param resType the resource type to create * @ param creationSitemap the creation sitemap parameter * @ return The String identifying which type of resource ha...
String contextPath = getContextRootPath ( cms , creationSitemap ) ; StringBuffer newLink = new StringBuffer ( NEW_LINK_IDENTIFIER ) ; newLink . append ( '|' ) ; newLink . append ( contextPath ) ; newLink . append ( '|' ) ; newLink . append ( resType . getTypeName ( ) ) ; return newLink . toString ( ) ;
public class SshNode { @ Override public SshNode deleteFile ( ) throws FileNotFoundException , DeleteException { } }
ChannelSftp sftp ; boolean directory ; try { sftp = alloc ( ) ; } catch ( JSchException e ) { throw new DeleteException ( this , e ) ; } try { sftp . rm ( escape ( slashPath ) ) ; } catch ( SftpException e ) { if ( e . id == ChannelSftp . SSH_FX_NO_SUCH_FILE ) { throw new FileNotFoundException ( this ) ; } try { direct...
import java . util . Arrays ; public class CalculateMinDiff { /** * This function determines the smallest difference between any two elements in a given list . * > > > calculateMinDiff ( new int [ ] { 1 , 5 , 3 , 19 , 18 , 25 } , 6) * > > > calculateMinDiff ( new int [ ] { 4 , 3 , 2 , 6 } , 4) * > > > calculateMi...
Arrays . sort ( array ) ; int minDifference = Integer . MAX_VALUE ; for ( int i = 0 ; i < size - 1 ; i ++ ) { if ( array [ i + 1 ] - array [ i ] < minDifference ) { minDifference = array [ i + 1 ] - array [ i ] ; } } return minDifference ;
public class ProjectResolver { /** * Aggregate projects to their base projects * @ param reactorProjects The current reactor projects . * @ param rulesDirectory The configured rules directory . * @ param useExecutionRootAsProjectRoot < code > true < / code > if the execution root shall be used as project root . ...
Map < MavenProject , List < MavenProject > > rootModules = new HashMap < > ( ) ; for ( MavenProject reactorProject : reactorProjects ) { MavenProject rootModule = ProjectResolver . getRootModule ( reactorProject , reactorProjects , rulesDirectory , useExecutionRootAsProjectRoot ) ; List < MavenProject > modules = rootM...
public class ApiOvhMe { /** * List of registered payment mean you can use to pay this order * REST : GET / me / order / { orderId } / availableRegisteredPaymentMean * @ param orderId [ required ] */ public ArrayList < OvhRegisteredPaymentMean > order_orderId_availableRegisteredPaymentMean_GET ( Long orderId ) throw...
String qPath = "/me/order/{orderId}/availableRegisteredPaymentMean" ; StringBuilder sb = path ( qPath , orderId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t6 ) ;
public class TagBalancingHtmlStreamEventReceiver { /** * True if text is the value of an inter - element whitespace text node as * defined by HTML5. * This is the kind of text that is often inserted by * HTML authors to nicely indent their HTML documents and which * ( modulo unconventional use of { @ code white...
int n = text . length ( ) ; for ( int i = 0 ; i < n ; ++ i ) { if ( ! Strings . isHtmlSpace ( text . charAt ( i ) ) ) { return false ; } } return true ;
public class Benchmark { /** * Expanded Scaffer ' s F6 function */ static public double EScafferF6 ( double [ ] x ) { } }
double sum = 0.0 ; for ( int i = 1 ; i < x . length ; i ++ ) { sum += ScafferF6 ( x [ i - 1 ] , x [ i ] ) ; } sum += ScafferF6 ( x [ x . length - 1 ] , x [ 0 ] ) ; return ( sum ) ;
public class ExpressRouteCrossConnectionsInner { /** * Gets the currently advertised ARP table associated with the express route cross connection in a resource group . * @ param resourceGroupName The name of the resource group . * @ param crossConnectionName The name of the ExpressRouteCrossConnection . * @ param...
return ServiceFuture . fromResponse ( listArpTableWithServiceResponseAsync ( resourceGroupName , crossConnectionName , peeringName , devicePath ) , serviceCallback ) ;
public class InitOnceFieldHandler { /** * Set this cloned listener to the same state at this listener . * @ param field The field this new listener will be added to . * @ param The new listener to sync to this . * @ param Has the init method been called ? * @ return True if I called init . */ public boolean syn...
bInitCalled = super . syncClonedListener ( field , listener , bInitCalled ) ; ( ( InitOnceFieldHandler ) listener ) . setFirstTime ( m_bFirstTime ) ; return bInitCalled ;
public class ExtendedLoggerFactory { /** * Uses the method { @ link org . slf4j . LoggerFactory # getLogger ( Class ) } to create a logger named corresponding to the * class passed as parameter . In addition , this method will configure the logging system , installing the necessary * bridges to unify logging across...
es . upv . grycap . coreutils . logging . LogManager . getLogManager ( ) . init ( ) ; return org . slf4j . LoggerFactory . getLogger ( requireNonNull ( clazz , "A non-null class expected" ) ) ;
public class XBasePanel { /** * Print the header info , such as title , keywords and meta - desc . * @ param out The http output stream . * @ param reg Local resource bundle . */ public void printXMLHeaderInfo ( PrintWriter out , ResourceBundle reg ) { } }
String strTitle = this . getProperty ( "title" ) ; // Menu page if ( ( strTitle == null ) || ( strTitle . length ( ) == 0 ) ) strTitle = ( ( BasePanel ) this . getScreenField ( ) ) . getTitle ( ) ; out . println ( Utility . startTag ( XMLTags . TITLE ) + strTitle + Utility . endTag ( XMLTags . TITLE ) ) ; String strKey...
public class Math { /** * Reverses the order of the elements in the specified array . * @ param a an array to reverse . */ public static void reverse ( int [ ] a ) { } }
int i = 0 , j = a . length - 1 ; while ( i < j ) { SortUtils . swap ( a , i ++ , j -- ) ; // code for swap not shown , but easy enough }
public class MapWidget { /** * Register a < code > WorldPaintable < / code > object to be painted on the map . By doing so , the object will be painted * immediately on the correct position , and when the user navigates around , the map will automatically make sure the * < code > WorldPaintable < / code > object is...
if ( worldPaintable != null && ! worldPaintables . containsKey ( worldPaintable . getId ( ) ) ) { worldPaintables . put ( worldPaintable . getId ( ) , worldPaintable ) ; worldPaintable . transform ( mapModel . getMapView ( ) . getWorldViewTransformer ( ) ) ; render ( worldPaintable , RenderGroup . WORLD , RenderStatus ...
public class PurgeObsoleteDataTask { /** * / * ( non - Javadoc ) * @ see java . util . TimerTask # run ( ) */ @ Override @ Transactional public void run ( ) { } }
String storedProc = "purge_obsolete_batch_data" ; boolean result = entityManager . createStoredProcedureQuery ( storedProc ) . registerStoredProcedureParameter ( 0 , Integer . class , ParameterMode . IN ) . setParameter ( 0 , 90 ) . execute ( ) ; log . info ( "executed {} : resultset ? {}" , storedProc , result ) ;
public class UpdateThingGroupsForThingRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( UpdateThingGroupsForThingRequest updateThingGroupsForThingRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( updateThingGroupsForThingRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateThingGroupsForThingRequest . getThingName ( ) , THINGNAME_BINDING ) ; protocolMarshaller . marshall ( updateThingGroupsForThingRequest . getThingG...
public class StandardDdlParser { /** * Utility method to parse a statement that can be ignored . The value returned in the generic { @ link AstNode } will contain all * text between starting token and either the terminator ( if defined ) or the next statement start token . NOTE : This method * does NOT mark and add...
CheckArg . isNotNull ( tokens , "tokens" ) ; CheckArg . isNotNull ( name , "name" ) ; CheckArg . isNotNull ( parentNode , "parentNode" ) ; CheckArg . isNotNull ( mixinType , "mixinType" ) ; AstNode node = nodeFactory ( ) . node ( name , parentNode , mixinType ) ; parseUntilTerminator ( tokens ) ; return node ;
public class KafkaMsgConsumer { /** * Commit the specified offsets for the specified list of topics and * partitions . * @ param tpoList * @ since 1.3.2 */ public void commit ( KafkaTopicPartitionOffset ... tpoList ) { } }
Map < String , Map < TopicPartition , OffsetAndMetadata > > topicOffsets = new HashMap < > ( ) ; for ( KafkaTopicPartitionOffset tpo : tpoList ) { Map < TopicPartition , OffsetAndMetadata > offsets = topicOffsets . get ( tpo . topic ) ; if ( offsets == null ) { offsets = new HashMap < > ( ) ; topicOffsets . put ( tpo ....
public class PortalHttpServletRequestWrapper { /** * / * ( non - Javadoc ) * @ see org . apereo . portal . url . AbstractHttpServletRequestWrapper # getLocales ( ) */ @ Override public Enumeration < Locale > getLocales ( ) { } }
if ( super . getSession ( false ) == null ) { return super . getLocales ( ) ; } final IUserInstance userInstance = this . userInstanceManager . getUserInstance ( this . getWrappedRequest ( ) ) ; final LocaleManager localeManager = userInstance . getLocaleManager ( ) ; final List < Locale > locales = localeManager . get...
public class S { /** * Turn an object ' s String representation into Camel Case * @ param obj * @ return the string result */ @ Transformer public static String camelCase ( Object obj ) { } }
if ( null == obj ) return "" ; String string = obj . toString ( ) ; // string = noAccents ( string ) ; // string = string . replaceAll ( " [ ^ \ \ w ] " , " " ) ; StringBuilder result = new StringBuilder ( string . length ( ) ) ; String [ ] sa = string . split ( " " ) ; int l = sa . length ; for ( int i = 0 ; i < l ; +...
public class GetContentStructureOperation { /** * Add all ' other content ' to the parent xml element */ @ Override public void processOtherContent ( Wrapper < Content > content ) { } }
if ( parentElement != null ) { parentElement . addContent ( content . getContent ( ) ) ; }
public class CmsShellCommands { /** * Creates a group . < p > * @ param name the name of the new group * @ param description the description of the new group * @ return the created group * @ throws Exception if something goes wrong * @ see CmsObject # createGroup ( String , String , int , String ) */ public C...
return m_cms . createGroup ( name , description , I_CmsPrincipal . FLAG_ENABLED , null ) ;
public class MDLV2000Writer { /** * Formats an integer to fit into the connection table and changes it * to a String . * @ param x The int to be formated * @ param n Length of the String * @ return The String to be written into the connectiontable */ protected static String formatMDLInt ( int x , int n ) { } }
char [ ] buf = new char [ n ] ; Arrays . fill ( buf , ' ' ) ; String val = Integer . toString ( x ) ; if ( val . length ( ) > n ) val = "0" ; int off = n - val . length ( ) ; for ( int i = 0 ; i < val . length ( ) ; i ++ ) buf [ off + i ] = val . charAt ( i ) ; return new String ( buf ) ;
public class ConfigRenderOptions { /** * Returns options with comments toggled . This controls human - written * comments but not the autogenerated " origin of this setting " comments , * which are controlled by { @ link ConfigRenderOptions # setOriginComments } . * @ param value * true to include comments in t...
if ( value == comments ) return this ; else return new ConfigRenderOptions ( originComments , value , formatted , json ) ;
public class PutGatewayResponseResult { /** * Response templates of the < a > GatewayResponse < / a > as a string - to - string map of key - value pairs . * @ param responseTemplates * Response templates of the < a > GatewayResponse < / a > as a string - to - string map of key - value pairs . * @ return Returns a...
setResponseTemplates ( responseTemplates ) ; return this ;
public class RandomGUID { /** * Returns a uuid / guid for a given byte array . * @ param ba * array of bytes containing the id * @ return id */ public static String fromByteArray ( byte [ ] ba ) { } }
if ( ( ba != null ) && ( ba . length == 16 ) ) { StringBuilder result = new StringBuilder ( 36 ) ; for ( int i = 0 ; i < 16 ; ++ i ) { if ( ( i == 4 ) || ( i == 6 ) || ( i == 8 ) || ( i == 10 ) ) { result . append ( '-' ) ; } result . append ( hexChars . charAt ( ( ( ba [ i ] & 0xF0 ) >>> 4 ) ) ) ; result . append ( he...
public class CommerceNotificationTemplateUserSegmentRelPersistenceImpl { /** * Caches the commerce notification template user segment rels in the entity cache if it is enabled . * @ param commerceNotificationTemplateUserSegmentRels the commerce notification template user segment rels */ @ Override public void cacheRe...
for ( CommerceNotificationTemplateUserSegmentRel commerceNotificationTemplateUserSegmentRel : commerceNotificationTemplateUserSegmentRels ) { if ( entityCache . getResult ( CommerceNotificationTemplateUserSegmentRelModelImpl . ENTITY_CACHE_ENABLED , CommerceNotificationTemplateUserSegmentRelImpl . class , commerceNotif...
public class BijectiveNsMap { /** * Method to add a new prefix - to - URI mapping for the current scope . * Note that it should NOT be used for the default namespace * declaration * @ param prefix Prefix to bind * @ param uri URI to bind to the prefix * @ return If the prefix was already bound , the URI it wa...
String [ ] strs = mNsStrings ; int phash = prefix . hashCode ( ) ; for ( int ix = mScopeStart , end = mScopeEnd ; ix < end ; ix += 2 ) { String thisP = strs [ ix ] ; if ( thisP == prefix || ( thisP . hashCode ( ) == phash && thisP . equals ( prefix ) ) ) { // Overriding an existing mapping String old = strs [ ix + 1 ] ...
public class CmsSecurityManager { /** * Replaces the rewrite aliases for a given site root . < p > * @ param requestContext the current request context * @ param siteRoot the site root for which the rewrite aliases should be replaced * @ param newAliases the new list of aliases for the given site root * @ throw...
CmsDbContext dbc = m_dbContextFactory . getDbContext ( requestContext ) ; try { // checkOfflineProject ( dbc ) ; // checkPermissions ( dbc , resource , CmsPermissionSet . ACCESS _ WRITE , true , CmsResourceFilter . ALL ) ; m_driverManager . saveRewriteAliases ( dbc , siteRoot , newAliases ) ; } catch ( Exception e ) { ...
public class PenalizedEvaluation { /** * Add a penalty expressed by a penalizing validation object . A key is * required that can be used to retrieve the validation object later . * @ param key key used to retrieve the validation object later * @ param penalizingValidation penalizing validation that indicates the...
initMapOnce ( ) ; penalties . put ( key , penalizingValidation ) ; // update penalized value if ( ! penalizingValidation . passed ( ) ) { assignedPenalties = true ; double p = penalizingValidation . getPenalty ( ) ; penalizedValue += minimizing ? p : - p ; }
public class JobTracker { /** * The periodic heartbeat mechanism between the { @ link TaskTracker } and * the { @ link JobTracker } . * The { @ link JobTracker } processes the status information sent by the * { @ link TaskTracker } and responds with instructions to start / stop * tasks or jobs , and also ' rese...
if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Got heartbeat from: " + status . getTrackerName ( ) + " (restarted: " + restarted + " initialContact: " + initialContact + " acceptNewTasks: " + acceptNewTasks + ")" + " with responseId: " + responseId ) ; } short newResponseId ; boolean shouldSchedule = false ; TaskTrac...
public class EpicsApi { /** * Updates an epic - issue association . * < pre > < code > GitLab Endpoint : PUT / groups / : id / epics / : epic _ iid / issues / : issue _ id < / code > < / pre > * @ param groupIdOrPath the group ID , path of the group , or a Group instance holding the group ID or path * @ param epi...
GitLabApiForm form = new GitLabApiForm ( ) . withParam ( "move_before_id" , moveBeforeId ) . withParam ( "move_after_id" , moveAfterId ) ; Response response = post ( Response . Status . OK , form , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "epics" , epicIid , "issues" , issueIid ) ; return ( response . readEntity...
public class CatalogUtil { /** * Load an in - memory catalog jar file from jar bytes . * @ param catalogBytes * @ param log * @ return The in - memory jar containing the loaded catalog . * @ throws IOException If the catalog cannot be loaded . */ public static InMemoryJarfile loadInMemoryJarFile ( byte [ ] cata...
assert ( catalogBytes != null ) ; InMemoryJarfile jarfile = new InMemoryJarfile ( catalogBytes ) ; if ( ! jarfile . containsKey ( CATALOG_FILENAME ) ) { throw new IOException ( "Database catalog not found - please build your application using the current version of VoltDB." ) ; } return jarfile ;
public class ReferenceElement { /** * Return a list of all reference extensions contained in a stanza . * If there are no reference elements , return an empty list . * @ param stanza stanza * @ return list of all references contained in the stanza */ public static List < ReferenceElement > getReferencesFromStanza...
List < ReferenceElement > references = new ArrayList < > ( ) ; List < ExtensionElement > extensions = stanza . getExtensions ( ReferenceElement . ELEMENT , ReferenceManager . NAMESPACE ) ; for ( ExtensionElement e : extensions ) { references . add ( ( ReferenceElement ) e ) ; } return references ;
public class RegularFile { /** * Transfers up to { @ code count } bytes from the given channel to this file starting at position * { @ code pos } . Returns the number of bytes transferred . If { @ code pos } is greater than the * current size of this file , the file is truncated up to size { @ code pos } before wri...
prepareForWrite ( pos , 0 ) ; // don ' t assume the full count bytes will be written if ( count == 0 ) { return 0 ; } long remaining = count ; int blockIndex = blockIndex ( pos ) ; byte [ ] block = blockForWrite ( blockIndex ) ; int off = offsetInBlock ( pos ) ; ByteBuffer buf = ByteBuffer . wrap ( block , off , length...
public class JPAUtils { /** * Find Joined Root of type clazz * @ param < T > * @ param query the criteria query * @ param rootClass the root class * @ param joinClass the join class * @ return the Join */ public static < T , K > Join < T , K > findJoinedType ( CriteriaQuery < T > query , Class < T > rootClass...
Root < T > root = findRoot ( query , rootClass ) ; return findJoinedType ( root , rootClass , joinClass ) ;
public class Async { /** * Resumes a paused queue * @ param queueName queue name */ public void resume ( String queueName ) { } }
try { getQueueControl ( queueName ) . resume ( ) ; } catch ( Exception e ) { throw new AsyncException ( e ) ; }
public class MESubscription { /** * Returns true if this proxy sub was from a foreign bus in a secured env . * @ return The userid . */ final boolean isForeignSecuredProxy ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isForeignSecuredProxy" ) ; SibTr . exit ( tc , "isForeignSecuredProxy" , new Boolean ( _foreignSecuredProxy ) ) ; } return _foreignSecuredProxy ;
public class AppEventsLogger { /** * Log an app event with the specified name , supplied value , and set of parameters . * @ param eventName eventName used to denote the event . Choose amongst the EVENT _ NAME _ * constants in * { @ link AppEventsConstants } when possible . Or create your own if none of the EVENT _...
logEvent ( eventName , valueToSum , parameters , false ) ;
public class EncodingBase64InputStream { /** * Fill the buffer with more data from the InputStream , if there is any . * @ throws IOException * from the inner InputStream */ private void readMoreBytesFromStream ( ) throws IOException { } }
if ( ! innerStreamHasMoreData ) { return ; } int bufferSpaceAvailable = buffer . length - bytesInBuffer ; if ( bufferSpaceAvailable <= 0 ) { return ; } int bytesRead = stream . read ( buffer , bytesInBuffer , bufferSpaceAvailable ) ; if ( bytesRead == - 1 ) { innerStreamHasMoreData = false ; } else { bytesInBuffer += b...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertTristateToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class CPDefinitionLinkPersistenceImpl { /** * Creates a new cp definition link with the primary key . Does not add the cp definition link to the database . * @ param CPDefinitionLinkId the primary key for the new cp definition link * @ return the new cp definition link */ @ Override public CPDefinitionLink c...
CPDefinitionLink cpDefinitionLink = new CPDefinitionLinkImpl ( ) ; cpDefinitionLink . setNew ( true ) ; cpDefinitionLink . setPrimaryKey ( CPDefinitionLinkId ) ; String uuid = PortalUUIDUtil . generate ( ) ; cpDefinitionLink . setUuid ( uuid ) ; cpDefinitionLink . setCompanyId ( companyProvider . getCompanyId ( ) ) ; r...
public class ExtractionUtil { /** * Extracts the file contained in a Zip archive . The extracted file is * placed in the exact same path as the file specified . * @ param file the archive file * @ throws FileNotFoundException thrown if the file does not exist * @ throws IOException thrown if there is an error e...
final String originalPath = file . getPath ( ) ; final File zip = new File ( originalPath + ".zip" ) ; if ( zip . isFile ( ) && ! zip . delete ( ) ) { LOGGER . debug ( "Failed to delete initial temporary file when extracting 'zip' {}" , zip . toString ( ) ) ; zip . deleteOnExit ( ) ; } if ( ! file . renameTo ( zip ) ) ...
public class NodeListProcessor { /** * Add a default processing that will be applied when no specific processor is found . * @ param processor * the default processor . */ public void addDefaultProcessor ( NodeProcessor processor ) { } }
if ( null == processor ) { throw new IllegalArgumentException ( "Processor should not be null." ) ; } getActionPool ( ) . put ( NODE_NAME__DEFAULT , processor ) ;
public class ExecutorServiceHelpers { /** * Executes the given task on the given Executor . * @ param task The RunnableWithException to execute . * @ param exceptionHandler A Consumer that will be invoked in case the task threw an Exception . This is not invoked if * the executor could not execute the given task ...
Preconditions . checkNotNull ( task , "task" ) ; Preconditions . checkNotNull ( exceptionHandler , "exceptionHandler" ) ; Preconditions . checkNotNull ( runFinally , "runFinally" ) ; boolean scheduledSuccess = false ; try { executor . execute ( ( ) -> { try { task . run ( ) ; } catch ( Throwable ex ) { if ( ! Exception...
public class DZcs_lsolve { /** * Solves a lower triangular system Lx = b where x and b are dense . x = b on * input , solution on output . * @ param L * column - compressed , lower triangular matrix * @ param x * size n , right hand side on input , solution on output * @ return true if successful , false on...
int p , j , n , Lp [ ] , Li [ ] ; DZcsa Lx = new DZcsa ( ) ; if ( ! CS_CSC ( L ) || x == null ) return ( false ) ; /* check inputs */ n = L . n ; Lp = L . p ; Li = L . i ; Lx . x = L . x ; for ( j = 0 ; j < n ; j ++ ) { x . set ( j , cs_cdiv ( x . get ( j ) , Lx . get ( Lp [ j ] ) ) ) ; for ( p = Lp [ j ] + 1 ; p < Lp ...
public class AbstractTranslator { /** * Translates user into user id * @ param user user * @ return user id */ protected UUID translateUserId ( User user ) { } }
if ( user == null ) { return null ; } return userController . getUserKeycloakId ( user ) ;
public class GSECOLImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . GSECOL__COLOR : setCOLOR ( ( Integer ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class MinimizeExitPoints { /** * Attempt to remove explicit exits from switch cases that also occur implicitly * after the switch . */ void tryMinimizeSwitchCaseExits ( Node n , Token exitType , @ Nullable String labelName ) { } }
checkState ( NodeUtil . isSwitchCase ( n ) ) ; checkState ( n != n . getParent ( ) . getLastChild ( ) ) ; Node block = n . getLastChild ( ) ; Node maybeBreak = block . getLastChild ( ) ; if ( maybeBreak == null || ! maybeBreak . isBreak ( ) || maybeBreak . hasChildren ( ) ) { // Can not minimize exits from a case witho...
public class ReceiveMessageBuilder { /** * Expect this message header data as model object which is mapped to a character sequence * using the default object to json mapper before validation is performed . * @ param model * @ param objectMapper * @ return */ public T headerFragment ( Object model , ObjectMapper...
try { return header ( objectMapper . writer ( ) . writeValueAsString ( model ) ) ; } catch ( JsonProcessingException e ) { throw new CitrusRuntimeException ( "Failed to map object graph for message header data" , e ) ; }
public class LibertyFeaturesToMavenRepo { /** * Find compile dependency from a zip entry in the ESA * @ param zipEntryPath The entry path in the zip * @ param groupId The group ID of the dependency to look for * @ return Maven coordinates corresponding to the entry */ private static MavenCoordinates findCompileDe...
int apiNameIndex = zipEntryPath . indexOf ( groupId ) ; int extensionIndex = zipEntryPath . lastIndexOf ( ".jar" ) ; if ( apiNameIndex >= 0 && extensionIndex >= 0 ) { String fileNameWithoutExtension = zipEntryPath . substring ( apiNameIndex , extensionIndex ) ; String artifactId = fileNameWithoutExtension . substring (...
public class CmsDriverManager { /** * Returns the date when the resource was last visited by the user . < p > * @ param dbc the database context * @ param poolName the name of the database pool to use * @ param user the user to check the date * @ param resource the resource to check the date * @ return the da...
return m_subscriptionDriver . getDateLastVisitedBy ( dbc , poolName , user , resource ) ;
public class authenticationradiusaction { /** * Use this API to fetch all the authenticationradiusaction resources that are configured on netscaler . */ public static authenticationradiusaction [ ] get ( nitro_service service ) throws Exception { } }
authenticationradiusaction obj = new authenticationradiusaction ( ) ; authenticationradiusaction [ ] response = ( authenticationradiusaction [ ] ) obj . get_resources ( service ) ; return response ;
public class DefaultConfigurationReaderInterceptor { /** * Creates a list of { @ link ResourceTypeHandler } s . Subclasses can optionally * override this method and add more handlers to the list . * @ return */ protected List < ResourceTypeHandler < ? > > getResourceTypeHandlers ( ) { } }
final List < ResourceTypeHandler < ? > > handlers = new ArrayList < ResourceTypeHandler < ? > > ( ) ; handlers . add ( new FileResourceTypeHandler ( getRelativeParentDirectory ( ) ) ) ; handlers . add ( new UrlResourceTypeHandler ( ) ) ; handlers . add ( new ClasspathResourceTypeHandler ( ) ) ; handlers . add ( new Vfs...
public class KeywordEstimateRequest { /** * Gets the maxCpc value for this KeywordEstimateRequest . * @ return maxCpc * The max CPC bid for this keyword . * In general , the { @ code maxCpc } of a { @ link KeywordEstimateRequest } * is * optional , since there is usually another { @ code * maxCpc } that can b...
return maxCpc ;
public class OrientModelGraph { /** * Tests if a transformation description has an id and adds an unique id if it hasn ' t one . */ private void checkTransformationDescriptionId ( TransformationDescription description ) { } }
if ( description . getId ( ) == null ) { description . setId ( "EKBInternal-" + counter . incrementAndGet ( ) ) ; }
public class MutableBkTree { /** * Adds all of the given elements to this tree . * @ param elements elements */ public void addAll ( Iterable < ? extends E > elements ) { } }
if ( elements == null ) throw new NullPointerException ( ) ; for ( E element : elements ) { add ( element ) ; }
public class AbstractCassandraStorage { /** * construct a map to store the mashaller type to cassandra data type mapping */ protected Map < MarshallerType , AbstractType > getDefaultMarshallers ( CfDef cfDef ) throws IOException { } }
Map < MarshallerType , AbstractType > marshallers = new EnumMap < MarshallerType , AbstractType > ( MarshallerType . class ) ; AbstractType comparator ; AbstractType subcomparator ; AbstractType default_validator ; AbstractType key_validator ; comparator = parseType ( cfDef . getComparator_type ( ) ) ; subcomparator = ...
public class DeIdentifyUtil { /** * Deidentify left . * @ param str the str * @ param size the size * @ return the string * @ since 2.0.0 */ public static String deidentifyLeft ( String str , int size ) { } }
int repeat ; if ( size > str . length ( ) ) { repeat = str . length ( ) ; } else { repeat = size ; } return StringUtils . overlay ( str , StringUtils . repeat ( '*' , repeat ) , 0 , size ) ;
public class PagedWidget { /** * Removes the specified item from the panel . If the item is currently being displayed , its * interface element will be removed as well . */ public void removeItem ( T item ) { } }
if ( _model == null ) { return ; // if we have no model , stop here } // remove the item from our data model _model . removeItem ( item ) ; // force a relayout of this page displayPage ( _page , true ) ;
public class DefaultParameterEquivalencer { /** * { @ inheritDoc } */ @ Override public SkinnyUUID getUUID ( Parameter param ) throws ResourceDownloadError , IndexingFailure , IOException { } }
String srl = param . getNamespace ( ) . getResourceLocation ( ) ; openEquivalence ( srl ) ; JDBMEquivalenceLookup lookup = openEquivalences . get ( srl ) ; return lookup . lookup ( param . getValue ( ) ) ;
public class SupplementaryMaterial { /** * Gets the value of the attribOrPermissions property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE...
if ( attribOrPermissions == null ) { attribOrPermissions = new ArrayList < Object > ( ) ; } return this . attribOrPermissions ;
public class TileBoundingBoxUtils { /** * Get the zoom level of where the web mercator bounding box fits into the * complete world * @ param webMercatorBoundingBox * web mercator bounding box * @ return zoom level */ public static int getZoomLevel ( BoundingBox webMercatorBoundingBox ) { } }
double worldLength = ProjectionConstants . WEB_MERCATOR_HALF_WORLD_WIDTH * 2 ; double longitudeDistance = webMercatorBoundingBox . getMaxLongitude ( ) - webMercatorBoundingBox . getMinLongitude ( ) ; double latitudeDistance = webMercatorBoundingBox . getMaxLatitude ( ) - webMercatorBoundingBox . getMinLatitude ( ) ; if...
public class AttributeService { /** * Sets the value of the given attribute to the given value for the given file . */ public void setAttribute ( File file , String attribute , Object value , boolean create ) { } }
String view = getViewName ( attribute ) ; String attr = getSingleAttribute ( attribute ) ; setAttributeInternal ( file , view , attr , value , create ) ;
public class HttpInboundLink { /** * @ see com . ibm . wsspi . channelfw . base . InboundProtocolLink # destroy ( java . lang . Exception ) */ @ Override public void destroy ( Exception e ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Destroying inbound link: " + this + " " + getVirtualConnection ( ) ) ; } // if this object is not active , then just return out synchronized ( this ) { if ( ! this . bIsActive ) { if ( TraceComponent . isAnyTracingEnabled ( ...
public class BigtableAsyncTable { /** * { @ inheritDoc } */ @ Override public CompletableFuture < Void > mutateRow ( RowMutations rowMutations ) { } }
return toCompletableFuture ( clientWrapper . mutateRowAsync ( hbaseAdapter . adapt ( rowMutations ) ) ) ;
public class ConfigurationSourceKey { /** * < p > setTypeIfNotDefault . < / p > * @ param defType a { @ link org . configureme . sources . ConfigurationSourceKey . Type } object . * @ param toChange a { @ link org . configureme . sources . ConfigurationSourceKey . Type } object . */ public void setTypeIfNotDefault ...
this . type = defType != Type . FILE ? defType : toChange ;
public class CPRuleAssetCategoryRelLocalServiceBaseImpl { /** * Returns a range of all the cp rule asset category rels . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in ...
return cpRuleAssetCategoryRelPersistence . findAll ( start , end ) ;
public class Pnky { /** * See { @ link # allFailingFast ( Iterable ) } */ @ SafeVarargs public static < V > PnkyPromise < List < V > > allFailingFast ( final PnkyPromise < ? extends V > ... promises ) { } }
return allFailingFast ( Lists . newArrayList ( promises ) ) ;
public class AbstractGenericType { /** * This method resolves the given { @ code typeVariable } in the context of the given { @ code declaringType } . * @ param typeVariable the { @ link TypeVariable } to resolve . * @ param declaringType the { @ link GenericType } where the given { @ code typeVariable } occurs or ...
GenericDeclaration genericDeclaration = typeVariable . getGenericDeclaration ( ) ; if ( genericDeclaration instanceof Class < ? > ) { Class < ? > declaringClass = ( Class < ? > ) genericDeclaration ; return resolveTypeVariable ( typeVariable , declaringType , declaringClass ) ; } return null ;
public class AppServiceCertificateOrdersInner { /** * Retrieve email history . * Retrieve email history . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param name Name of the certificate order . * @ throws IllegalArgumentException thrown if parameters fail the valida...
return retrieveCertificateEmailHistoryWithServiceResponseAsync ( resourceGroupName , name ) . map ( new Func1 < ServiceResponse < List < CertificateEmailInner > > , List < CertificateEmailInner > > ( ) { @ Override public List < CertificateEmailInner > call ( ServiceResponse < List < CertificateEmailInner > > response ...
public class WorkspaceQuotaRestore { /** * Backups data to define file . */ protected void doBackup ( File backupFile ) throws BackupException { } }
ZipObjectWriter out = null ; try { out = new ZipObjectWriter ( PrivilegedFileHelper . zipOutputStream ( backupFile ) ) ; quotaPersister . backupWorkspaceData ( rName , wsName , out ) ; } catch ( IOException e ) { throw new BackupException ( e ) ; } finally { if ( out != null ) { try { out . close ( ) ; } catch ( IOExce...
public class InverseDepsAnalyzer { /** * Returns all paths reachable from the given targets . */ private Set < Deque < Archive > > findPaths ( Graph < Archive > graph , Archive target ) { } }
// path is in reversed order Deque < Archive > path = new LinkedList < > ( ) ; path . push ( target ) ; Set < Edge < Archive > > visited = new HashSet < > ( ) ; Deque < Edge < Archive > > deque = new LinkedList < > ( ) ; deque . addAll ( graph . edgesFrom ( target ) ) ; if ( deque . isEmpty ( ) ) { return makePaths ( p...
public class ConfigStoreUtils { /** * Shortlist topics from config store based on whitelist / blacklist tags and * add it to { @ param whitelist } / { @ param blacklist } * If tags are not provided , blacklist and whitelist won ' t be modified */ public static void setTopicsFromConfigStore ( Properties properties ,...
Optional < String > configStoreUri = getConfigStoreUri ( properties ) ; if ( ! configStoreUri . isPresent ( ) ) { return ; } ConfigClient configClient = ConfigClient . createConfigClient ( VersionStabilityPolicy . WEAK_LOCAL_STABILITY ) ; Optional < Config > runtimeConfig = ConfigClientUtils . getOptionalRuntimeConfig ...
public class DatabaseDAODefaultImpl { public void unregisterService ( Database database , String serviceName , String instanceName , String deviceName ) throws DevFailed { } }
String [ ] services = new String [ 0 ] ; // Get service property DbDatum data = get_property ( database , TangoConst . CONTROL_SYSTEM , TangoConst . SERVICE_PROP_NAME ) ; if ( ! data . is_empty ( ) ) services = data . extractStringArray ( ) ; // Build what to be remove and searched String target = serviceName + "/" + i...
public class FreemarkerTemplate { /** * 包装Freemarker模板 * @ param beetlTemplate Beetl的模板对象 { @ link freemarker . template . Template } * @ return { @ link FreemarkerTemplate } */ public static FreemarkerTemplate wrap ( freemarker . template . Template beetlTemplate ) { } }
return ( null == beetlTemplate ) ? null : new FreemarkerTemplate ( beetlTemplate ) ;
public class CmsSecurityManager { /** * Returns a set of users that are responsible for a specific resource . < p > * @ param context the current request context * @ param resource the resource to get the responsible users from * @ return the set of users that are responsible for a specific resource * @ throws ...
Set < I_CmsPrincipal > result = null ; CmsDbContext dbc = m_dbContextFactory . getDbContext ( context ) ; try { result = m_driverManager . readResponsiblePrincipals ( dbc , resource ) ; } catch ( Exception e ) { dbc . report ( null , Messages . get ( ) . container ( Messages . ERR_READ_RESPONSIBLE_USERS_1 , resource . ...
public class VirtualMachinesInner { /** * The operation to create or update a virtual machine . * @ param resourceGroupName The name of the resource group . * @ param vmName The name of the virtual machine . * @ param parameters Parameters supplied to the Create Virtual Machine operation . * @ param serviceCall...
return ServiceFuture . fromResponse ( beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , vmName , parameters ) , serviceCallback ) ;
public class CmsShellCommands { /** * Rebuilds ( if required creates ) all configured search indexes . < p > * @ throws Exception if something goes wrong * @ see org . opencms . search . CmsSearchManager # rebuildAllIndexes ( org . opencms . report . I _ CmsReport ) */ public void rebuildAllIndexes ( ) throws Excep...
I_CmsReport report = new CmsShellReport ( m_cms . getRequestContext ( ) . getLocale ( ) ) ; OpenCms . getSearchManager ( ) . rebuildAllIndexes ( report ) ;
public class VersionableWorkspaceDataManager { /** * { @ inheritDoc } */ @ Override public List < NodeData > getChildNodesData ( final NodeData nodeData ) throws RepositoryException { } }
if ( ! this . equals ( versionDataManager ) && isSystemDescendant ( nodeData . getQPath ( ) ) ) { return versionDataManager . getChildNodesData ( nodeData ) ; } return super . getChildNodesData ( nodeData ) ;
public class DefaultProcessDiagramGenerator { /** * This method returns shape type of base element . < br > * Each element can be presented as rectangle , rhombus , or ellipse . * @ param baseElement * @ return DefaultProcessDiagramCanvas . SHAPE _ TYPE */ protected static DefaultProcessDiagramCanvas . SHAPE_TYPE...
if ( baseElement instanceof Task || baseElement instanceof Activity || baseElement instanceof TextAnnotation ) { return DefaultProcessDiagramCanvas . SHAPE_TYPE . Rectangle ; } else if ( baseElement instanceof Gateway ) { return DefaultProcessDiagramCanvas . SHAPE_TYPE . Rhombus ; } else if ( baseElement instanceof Eve...
public class FacebookRestClient { /** * Sends a message via SMS to the user identified by < code > userId < / code > , with * the expectation that the user will reply . The SMS extended permission is required for success . * The returned mobile session ID can be stored and used in { @ link # sms _ sendResponse } wh...
return extractInt ( this . callMethod ( FacebookMethod . SMS_SEND_MESSAGE , new Pair < String , CharSequence > ( "uid" , userId . toString ( ) ) , new Pair < String , CharSequence > ( "message" , message ) , new Pair < String , CharSequence > ( "req_session" , "1" ) ) ) ;
public class JDBCStorageConnection { /** * Gets an item data from database . * @ param parent * - parent QPath * @ param parentId * - parent container internal id ( depends on Multi / Single DB ) * @ param name * - item name * @ param itemType * - item type * @ return - ItemData instance * @ throws ...
checkIfOpened ( ) ; try { ResultSet item = null ; try { item = findItemByName ( parentId , name . getAsString ( ) , name . getIndex ( ) ) ; while ( item . next ( ) ) { int columnClass = item . getInt ( COLUMN_CLASS ) ; if ( itemType == ItemType . UNKNOWN || columnClass == itemType . ordinal ( ) ) { return itemData ( pa...
public class JSError { /** * Creates a JSError from a file and Node position . * @ param n Determines the line and char position and source file name * @ param type The DiagnosticType * @ param arguments Arguments to be incorporated into the message */ public static JSError make ( Node n , DiagnosticType type , S...
return new JSError ( n . getSourceFileName ( ) , n , type , arguments ) ;
public class StripeTextUtils { /** * Converts a card number that may have spaces between the numbers into one without any spaces . * Note : method does not check that all characters are digits or spaces . * @ param cardNumberWithSpaces a card number , for instance " 4242 4242 4242 4242" * @ return the input numbe...
if ( isBlank ( cardNumberWithSpaces ) ) { return null ; } return cardNumberWithSpaces . replaceAll ( "\\s|-" , "" ) ;
public class SftpSubsystemChannel { /** * Perform a synchronous read of a file from the remote file system . This * implementation waits for acknowledgement of every data packet before * requesting additional data . * @ param handle * @ param blocksize * @ param out * @ param progress * @ param position ...
if ( Log . isDebugEnabled ( ) ) { Log . debug ( this , "Performing synchronous read postion=" + position + " blocksize=" + blocksize ) ; } if ( blocksize < 1 || blocksize > 32768 ) { if ( Log . isDebugEnabled ( ) ) { Log . debug ( this , "Blocksize to large for some SFTP servers, reseting to 32K" ) ; } blocksize = 3276...
public class CmsCategoryService { /** * Deletes the category identified by the given path . < p > * Only the most global category matching the given category path for the * given resource will be affected . < p > * This method will try to lock the involved resource . < p > * @ param cms the current cms context ...
CmsCategory category = readCategory ( cms , categoryPath , referencePath ) ; String folderPath = cms . getRequestContext ( ) . removeSiteRoot ( category . getRootPath ( ) ) ; CmsLock lock = cms . getLock ( folderPath ) ; if ( lock . isNullLock ( ) ) { cms . lockResource ( folderPath ) ; } else if ( lock . isLockableBy ...
public class ContentSpecParser { /** * Processes and creates a level based on the level type . * @ param parserData * @ param lineNumber The line number the level is on . * @ param levelType The type the level will represent . ie . A Chapter or Appendix * @ param line The chapter string in the content specifica...
String splitVars [ ] = StringUtilities . split ( line , ':' , 2 ) ; // Remove the whitespace from each value in the split array splitVars = CollectionUtilities . trimStringArray ( splitVars ) ; // Create the level based on the type final Level newLvl = createEmptyLevelFromType ( lineNumber , levelType , line ) ; newLvl...
public class ApiOvhIp { /** * Add a new backend on your IP load balancing * REST : POST / ip / loadBalancing / { serviceName } / backend * @ param weight [ required ] Weight of the backend on its zone , must be between 1 and 100 * @ param probe [ required ] The type of probe used * @ param ipBackend [ required ...
String qPath = "/ip/loadBalancing/{serviceName}/backend" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "ipBackend" , ipBackend ) ; addBody ( o , "probe" , probe ) ; addBody ( o , "weight" , weight ) ; String resp = exec ( qPath , ...
public class IOGroovyMethods { /** * Overloads the leftShift operator to provide an append mechanism to add bytes to a stream . * @ param self an OutputStream * @ param value a value to append * @ return an OutputStream * @ throws IOException if an I / O error occurs . * @ since 1.0 */ public static OutputStr...
self . write ( value ) ; self . flush ( ) ; return self ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcFurnishingElement ( ) { } }
if ( ifcFurnishingElementEClass == null ) { ifcFurnishingElementEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 296 ) ; } return ifcFurnishingElementEClass ;
public class ContentPanePainter { /** * DOCUMENT ME ! * @ param type DOCUMENT ME ! * @ return DOCUMENT ME ! */ private TwoColors getRootPaneInteriorColors ( Which type ) { } }
switch ( type ) { case BACKGROUND_ENABLED_WINDOWFOCUSED : return rootPaneActive ; case BACKGROUND_ENABLED : return rootPaneInactive ; } return null ;
public class SegmentSlic { /** * initialize all the clusters at regularly spaced intervals . Their locations are perturbed a bit to reduce * the likelihood of a bad location . Initial color is set to the image color at the location */ protected void initializeClusters ( ) { } }
int offsetX = Math . max ( BORDER , ( ( input . width - 1 ) % gridInterval ) / 2 ) ; int offsetY = Math . max ( BORDER , ( ( input . height - 1 ) % gridInterval ) / 2 ) ; int clusterId = 0 ; clusters . reset ( ) ; for ( int y = offsetY ; y < input . height - BORDER ; y += gridInterval ) { for ( int x = offsetX ; x < in...
public class ClusterManagerMetrics { /** * Get all the possible end states ( non running ) of the session * @ return The list of session status that are the non - running state */ private static List < SessionStatus > getEndStates ( ) { } }
List < SessionStatus > endStatesRet = new ArrayList < SessionStatus > ( ) ; for ( SessionStatus s : SessionStatus . values ( ) ) { if ( s != SessionStatus . RUNNING ) { endStatesRet . add ( s ) ; } } return endStatesRet ;
public class EvolvingImages { /** * This method is called from within the constructor to initialize the form . * WARNING : Do NOT modify this code . The content of this method is always * regenerated by the Form Editor . */ @ SuppressWarnings ( "unchecked" ) // < editor - fold defaultstate = " collapsed " desc = " ...
java . awt . GridBagConstraints gridBagConstraints ; imagePanel = new javax . swing . JPanel ( ) ; imageSplitPane = new javax . swing . JSplitPane ( ) ; origImagePanel = new javax . swing . JPanel ( ) ; polygonImagePanel = new javax . swing . JPanel ( ) ; buttonPanel = new javax . swing . JPanel ( ) ; startButton = new...
public class TriggersInner { /** * Get a specific trigger by name . * @ param deviceName The device name . * @ param name The trigger name . * @ param resourceGroupName The resource group name . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the Trigg...
return getWithServiceResponseAsync ( deviceName , name , resourceGroupName ) . map ( new Func1 < ServiceResponse < TriggerInner > , TriggerInner > ( ) { @ Override public TriggerInner call ( ServiceResponse < TriggerInner > response ) { return response . body ( ) ; } } ) ;
public class EmbedVaadinConfig { /** * Cleans the specified context path . Adds a forward slash if one * is missing and make sure to interpret both the empty string and * ' / ' as the root context . * @ param contextPath the context path to clean * @ return the context path to use */ static String cleanContextP...
// Special handling so that / can be used for the root context as well if ( contextPath . equals ( "/" ) || contextPath . trim ( ) . equals ( "" ) ) { return "" ; } else if ( ! contextPath . startsWith ( "/" ) ) { return "/" + contextPath ; } else { return contextPath ; }
public class IntHashMap { /** * Returns the value to which this map maps the specified key . Returns * < tt > null < / tt > if the map contains no mapping for this key . A return * value of < tt > null < / tt > does not < i > necessarily < / i > indicate that the * map contains no mapping for the key ; it ' s als...
Entry < V > tab [ ] = table ; int index = ( key & 0x7fffffff ) % tab . length ; for ( Entry < V > e = tab [ index ] ; e != null ; e = e . next ) { if ( e . key == key ) { return e . value ; } } return null ;
public class NodeUtil { /** * Whether a simple name is referenced within the node tree . */ static boolean isNameReferenced ( Node node , String name , Predicate < Node > traverseChildrenPred ) { } }
return has ( node , new MatchNameNode ( name ) , traverseChildrenPred ) ;