signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class AWSOpsWorksClient { /** * Specifies a user ' s permissions . For more information , see < a * href = " http : / / docs . aws . amazon . com / opsworks / latest / userguide / workingsecurity . html " > Security and Permissions < / a > . * < b > Required Permissions < / b > : To use this action , an IAM ...
request = beforeClientExecution ( request ) ; return executeSetPermission ( request ) ;
public class Reflections { /** * 根据方法名称获取方法 * @ param cls * @ param methodName * @ return */ public static Method getDeclaredMethod ( final Class cls , final String methodName ) { } }
return getMethod ( cls , methodName , true ) ;
public class JSType { /** * Determines if the specified type is exempt from standard invariant templatized typing rules . */ static boolean isIThenableSubtype ( JSType type ) { } }
if ( type . isTemplatizedType ( ) ) { TemplatizedType ttype = type . toMaybeTemplatizedType ( ) ; return ttype . getTemplateTypeMap ( ) . hasTemplateKey ( ttype . registry . getThenableValueKey ( ) ) ; } return false ;
public class Neo4JGraph { /** * Executes the given statement on the current { @ link Graph } instance . WARNING : There is no * guarantee that the results are confined within the current { @ link Neo4JReadPartition } . * @ param statement The CYPHER statement . * @ return The { @ link StatementResult } with the C...
Objects . requireNonNull ( statement , "statement cannot be null" ) ; // use overloaded method return execute ( new Statement ( statement ) ) ;
public class StorePackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getAction ( ) { } }
if ( actionEClass == null ) { actionEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( StorePackage . eNS_URI ) . getEClassifiers ( ) . get ( 114 ) ; } return actionEClass ;
public class Util { /** * On Windows , error messages for IOException aren ' t very helpful . * This method generates additional user - friendly error message to the listener */ public static void displayIOException ( @ Nonnull IOException e , @ Nonnull TaskListener listener ) { } }
String msg = getWin32ErrorMessage ( e ) ; if ( msg != null ) listener . getLogger ( ) . println ( msg ) ;
public class Math { /** * Returns the minimum value of an array . */ public static float min ( float [ ] x ) { } }
float m = Float . POSITIVE_INFINITY ; for ( float n : x ) { if ( n < m ) { m = n ; } } return m ;
public class Client { /** * Deletes the specified shovel from specified virtual host . * @ param vhost virtual host from where to delete the shovel * @ param shovelname Shovel to be deleted . */ public void deleteShovel ( String vhost , String shovelname ) { } }
this . deleteIgnoring404 ( uriWithPath ( "./parameters/shovel/" + encodePathSegment ( vhost ) + "/" + encodePathSegment ( shovelname ) ) ) ;
public class SyntheticTerminalDetector { /** * Answers { @ code true } if the given terminal rule is synthetic . That is , * the tokens for this rule will not be produced by the generated Antlr lexer * but manually in a custom token source . */ public boolean isSyntheticTerminalRule ( final TerminalRule rule ) { } ...
AbstractElement _alternatives = rule . getAlternatives ( ) ; if ( ( _alternatives instanceof Keyword ) ) { AbstractElement _alternatives_1 = rule . getAlternatives ( ) ; String value = ( ( Keyword ) _alternatives_1 ) . getValue ( ) ; String _name = AntlrGrammarGenUtil . < TerminalRule > getOriginalElement ( rule ) . ge...
public class WildFilesCLA { /** * { @ inheritDoc } */ @ Override protected void exportCommandLineData ( final StringBuilder out , final int occ ) { } }
uncompileQuoter ( out , getValue ( occ ) . get ( 0 ) ) ;
public class BBossESStarter { /** * Get Special elasticsearch server ConfigFile ClientInterface * @ param elasticsearchName elasticsearch server name which defined in bboss spring boot application configfile * @ param configFile * @ return */ public ClientInterface getConfigRestClient ( String elasticsearchName ,...
return ElasticSearchHelper . getConfigRestClientUtil ( elasticsearchName , configFile ) ;
public class AbstractInstanceRegistry { /** * Updates the status of an instance . Normally happens to put an instance * between { @ link InstanceStatus # OUT _ OF _ SERVICE } and * { @ link InstanceStatus # UP } to put the instance in and out of traffic . * @ param appName the application name of the instance . ...
try { read . lock ( ) ; STATUS_UPDATE . increment ( isReplication ) ; Map < String , Lease < InstanceInfo > > gMap = registry . get ( appName ) ; Lease < InstanceInfo > lease = null ; if ( gMap != null ) { lease = gMap . get ( id ) ; } if ( lease == null ) { return false ; } else { lease . renew ( ) ; InstanceInfo info...
public class RectifyCalibrated { /** * Selects axises of new coordinate system */ private void selectAxises ( SimpleMatrix R1 , SimpleMatrix R2 , SimpleMatrix c1 , SimpleMatrix c2 ) { } }
// - - - - - Compute the new x - axis v1 . set ( c2 . get ( 0 ) - c1 . get ( 0 ) , c2 . get ( 1 ) - c1 . get ( 1 ) , c2 . get ( 2 ) - c1 . get ( 2 ) ) ; v1 . normalize ( ) ; // - - - - - Compute the new y - axis // cross product of old z axis and new x axis // According to the paper [ 1 ] this choice is arbitrary , how...
public class SystemSecurityContext { /** * The callable API throws a Exception and not a specific one */ @ SuppressWarnings ( { } }
"squid:S2221" , "squid:S00112" } ) public < T > T runAsSystemAsTenant ( final Callable < T > callable , final String tenant ) { final SecurityContext oldContext = SecurityContextHolder . getContext ( ) ; try { LOG . debug ( "entering system code execution" ) ; return tenantAware . runAsTenant ( tenant , ( ) -> { try { ...
public class Solo { /** * Enters text in an EditText matching the specified index . * @ param index the index of the { @ link EditText } . { @ code 0 } if only one is available * @ param text the text to enter in the { @ link EditText } field */ public void enterText ( int index , String text ) { } }
if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "enterText(" + index + ", \"" + text + "\")" ) ; } textEnterer . setEditText ( waiter . waitForAndGetView ( index , EditText . class ) , text ) ;
public class VorbisFile { /** * 1 ) got a packet */ int process_packet ( int readp ) { } }
Page og = new Page ( ) ; // handle one packet . Try to fetch it from current stream state // extract packets from page while ( true ) { // process a packet if we can . If the machine isn ' t loaded , // neither is a page if ( decode_ready ) { Packet op = new Packet ( ) ; int result = os . packetout ( op ) ; long granul...
public class FieldHeading { /** * Sets the property for this field set . This includes * < ul > * < li > { @ link # level } < / li > * < / ul > * @ param _ name name / key of the property * @ param _ value value of the property * @ throws CacheReloadException from called super property method */ @ Override ...
if ( "Level" . equals ( _name ) ) { this . level = Integer . parseInt ( _value ) ; } else { super . setProperty ( _name , _value ) ; }
public class StreamConfiguration { /** * Set the bits per sample . Because this is not a value that may be * guessed and corrected , the value will be set to that given even if it is * not valid . * @ param bitsPerSample number of bits per sample * @ return true if value given is within the valid range , false ...
boolean result = ( ( bitsPerSample <= MAX_BITS_PER_SAMPLE ) && ( bitsPerSample >= MIN_BITS_PER_SAMPLE ) ) ; this . bitsPerSample = bitsPerSample ; return result ;
public class DigestAuthServerBuilder { /** * A server - specified data string which should be uniquely generated each time * a 401 response is made . It is recommended that this string be base64 or * hexadecimal data . Specifically , since the string is passed in the header * lines as a quoted string , the double...
if ( ! HttpStringHelper . isQuotedTextContent ( sNonce ) ) throw new IllegalArgumentException ( "nonce is invalid: " + sNonce ) ; m_sNonce = sNonce ; return this ;
public class AccountsInner { /** * Gets the first page of Azure Storage accounts , if any , linked to the specified Data Lake Analytics account . The response includes a link to the next page , if any . * @ param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account . ...
return listStorageAccountsWithServiceResponseAsync ( resourceGroupName , accountName , filter , top , skip , expand , select , orderby , count , search , format ) . map ( new Func1 < ServiceResponse < Page < StorageAccountInfoInner > > , Page < StorageAccountInfoInner > > ( ) { @ Override public Page < StorageAccountIn...
public class FormTool { /** * Constructs a checkbox input field with the specified name and * default value . */ public String checkbox ( String name , boolean defaultValue ) { } }
String value = getParameter ( name ) ; return fixedCheckbox ( name , ( value == null ) ? defaultValue : ! value . equals ( "" ) ) ;
public class DateTime { /** * Return the proper Calendar time unit as an integer given the string * @ param units The unit to parse * @ return An integer matching a Calendar . & lt ; UNIT & gt ; enum * @ throws IllegalArgumentException if the unit is null , empty or doesn ' t * match one of the configured units...
if ( units == null || units . isEmpty ( ) ) { throw new IllegalArgumentException ( "Units cannot be null or empty" ) ; } final String lc = units . toLowerCase ( ) ; if ( lc . equals ( "ms" ) ) { return Calendar . MILLISECOND ; } else if ( lc . equals ( "s" ) ) { return Calendar . SECOND ; } else if ( lc . equals ( "m" ...
public class ModuleDeps { /** * Calls { @ link # subtract ( String , ModuleDepInfo ) } for each of the map * entries in < code > toSub < / code > * @ param toSub * The map to subtract from this map * @ return True if this map was modified */ public boolean subtractAll ( ModuleDeps toSub ) { } }
boolean modified = false ; for ( Map . Entry < String , ModuleDepInfo > entry : toSub . entrySet ( ) ) { modified |= subtract ( entry . getKey ( ) , entry . getValue ( ) ) ; } return modified ;
public class HttpRequest { /** * 设置内容主体 < br > * 请求体body参数支持两种类型 : * < pre > * 1 . 标准参数 , 例如 a = 1 & amp ; b = 2 这种格式 * 2 . Rest模式 , 此时body需要传入一个JSON或者XML字符串 , Hutool会自动绑定其对应的Content - Type * < / pre > * @ param body 请求体 * @ param contentType 请求体类型 , { @ code null } 表示自动判断类型 * @ return this */ public Ht...
body ( StrUtil . bytes ( body , this . charset ) ) ; this . form = null ; // 当使用body时 , 停止form的使用 contentLength ( ( null != body ? body . length ( ) : 0 ) ) ; if ( null != contentType ) { // Content - Type自定义设置 this . contentType ( contentType ) ; } else { // 在用户未自定义的情况下自动根据内容判断 contentType = HttpUtil . getContentTypeB...
public class DevAuth { /** * get access _ token from openapi * @ param apiKey API key from console * @ param secretKey Secret Key from console * @ param config network config settings * @ return JsonObject of response from OAuth server */ public static JSONObject oauth ( String apiKey , String secretKey , AipCl...
try { AipRequest request = new AipRequest ( ) ; request . setUri ( new URI ( AipClientConst . OAUTH_URL ) ) ; request . addBody ( "grant_type" , "client_credentials" ) ; request . addBody ( "client_id" , apiKey ) ; request . addBody ( "client_secret" , secretKey ) ; request . setConfig ( config ) ; int statusCode = 500...
public class WebFacesConfigDescriptorImpl { /** * If not already created , a new < code > lifecycle < / code > element will be created and returned . * Otherwise , the first existing < code > lifecycle < / code > element will be returned . * @ return the instance defined for the element < code > lifecycle < / code ...
List < Node > nodeList = model . get ( "lifecycle" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new FacesConfigLifecycleTypeImpl < WebFacesConfigDescriptor > ( this , "lifecycle" , model , nodeList . get ( 0 ) ) ; } return createLifecycle ( ) ;
public class FluoConfiguration { /** * Returns the value of the property { @ value # CONNECTION _ RETRY _ TIMEOUT _ MS _ PROP } if it is set , else * the default value of { @ value # CONNECTION _ RETRY _ TIMEOUT _ MS _ DEFAULT } . The integer returned * represents milliseconds and is always positive . * @ since 1...
int retval ; if ( containsKey ( CONNECTION_RETRY_TIMEOUT_MS_PROP ) ) { retval = getInt ( CONNECTION_RETRY_TIMEOUT_MS_PROP , CONNECTION_RETRY_TIMEOUT_MS_DEFAULT ) ; } else { retval = getInt ( CLIENT_RETRY_TIMEOUT_MS_PROP , CONNECTION_RETRY_TIMEOUT_MS_DEFAULT ) ; } Preconditions . checkArgument ( retval >= - 1 , CONNECTI...
public class SoapClient { /** * 设置方法参数 * @ param name 参数名 * @ param value 参数值 , 可以是字符串或Map或 { @ link SOAPElement } * @ param useMethodPrefix 是否使用方法的命名空间前缀 * @ return this */ public SoapClient setParam ( String name , Object value , boolean useMethodPrefix ) { } }
setParam ( this . methodEle , name , value , useMethodPrefix ? this . methodEle . getPrefix ( ) : null ) ; return this ;
public class DefaultAlertService { /** * Evaluates all triggers associated with the notification and updates the job history . */ private void _processNotification ( Alert alert , History history , List < Metric > metrics , Map < BigInteger , Map < Metric , Long > > triggerFiredTimesAndMetricsByTrigger , Notification n...
// refocus notifier does not need cool down logic , and every evaluation needs to send notification boolean isRefocusNotifier = SupportedNotifier . REFOCUS . getName ( ) . equals ( notification . getNotifierName ( ) ) ; for ( Trigger trigger : notification . getTriggers ( ) ) { Map < Metric , Long > triggerFiredTimesFo...
public class SlotPoolImpl { /** * Clear the internal state of the SlotPool . */ private void clear ( ) { } }
availableSlots . clear ( ) ; allocatedSlots . clear ( ) ; pendingRequests . clear ( ) ; waitingForResourceManager . clear ( ) ; registeredTaskManagers . clear ( ) ;
public class MRAsyncDiskService { /** * Move the path name on one volume to a temporary location and then * delete them . * This functions returns when the moves are done , but not necessarily all * deletions are done . This is usually good enough because applications * won ' t see the path name under the old n...
volume = normalizePath ( volume ) ; // Move the file right now , so that it can be deleted later String newPathName = format . format ( new Date ( ) ) + "_" + uniqueId . getAndIncrement ( ) ; newPathName = TOBEDELETED + Path . SEPARATOR_CHAR + newPathName ; Path source = new Path ( volume , pathName ) ; Path target = n...
import java . io . * ; import java . lang . * ; import java . util . * ; import java . math . * ; class Main { /** * Function to calculate the last digit when the factorial of first _ num divides * the factorial of second _ num . * Examples : * Main . calculateFinalDigit ( 2 , 4 ) - > 2 * Main . calculateFinalD...
int product = 1 ; if ( first_num == second_num ) { return 1 ; } else if ( second_num - first_num >= 5 ) { return 0 ; } else { for ( int factor = first_num + 1 ; factor <= second_num ; factor ++ ) { product = ( product * ( factor % 10 ) ) % 10 ; } return product % 10 ; }
public class EbeanQueryChannelService { /** * Return an query for finding a List , Set , Map or single bean . * @ return the Query . */ public static < T > Query < T > query ( Class < T > entityType , String fetchPath , Object queryObject , Pageable pageable ) { } }
return query ( db ( ) , entityType , fetchPath , queryObject , pageable ) ;
public class TimePoint { /** * / * [ deutsch ] * < p > Bestimmt das Minimum der beiden Zeitpunkte . < / p > * @ param < U > generic type of time units compatible to { @ link ChronoUnit } * @ param < T > generic type of self reference * @ param t1 first time point * @ param t2 second time point * @ return mi...
return ( t1 . compareTo ( t2 ) > 0 ) ? t2 : t1 ;
public class LocPathIterator { /** * Execute an expression in the XPath runtime context , and return the * result of the expression . * @ param xctxt The XPath runtime context . * @ param handler The target content handler . * @ return The result of the expression in the form of a < code > XObject < / code > . ...
LocPathIterator clone = ( LocPathIterator ) m_clones . getInstance ( ) ; int current = xctxt . getCurrentNode ( ) ; clone . setRoot ( current , xctxt ) ; int node = clone . nextNode ( ) ; DTM dtm = clone . getDTM ( node ) ; clone . detach ( ) ; if ( node != DTM . NULL ) { dtm . dispatchCharactersEvents ( node , handler...
public class JCGLProfiling { /** * Trim any cached internal storage . * This is primarily useful because implementations are expected to reuse a * lot of data structures internally ( because the graph of renderers and * filters being profiled rarely changes ) . */ @ Override public void trimContexts ( ) { } }
for ( int index = 0 ; index < this . frames . length ; ++ index ) { final Frame f = this . frames [ index ] ; f . trimRecursive ( ) ; } this . frame_index = 0 ;
public class SarlBehaviorImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case SarlPackage . SARL_BEHAVIOR__EXTENDS : setExtends ( ( JvmParameterizedTypeReference ) null ) ; return ; } super . eUnset ( featureID ) ;
public class Client { /** * Writes a report file including the results of the * { @ link DumpProcessingAction # getReport ( ) } methods . If there is no report * filename specified the reports will be logged . * @ throws IOException */ void writeReport ( ) throws IOException { } }
StringBuilder builder = new StringBuilder ( ) ; for ( DumpProcessingAction action : this . clientConfiguration . getActions ( ) ) { if ( this . clientConfiguration . getReportFileName ( ) != null ) { builder . append ( action . getActionName ( ) ) ; builder . append ( ": " ) ; if ( action . isReady ( ) ) { builder . ap...
public class LayerReducerUtil { /** * Compute soil layer thickness * @ param soilsData * @ return */ public static ArrayList < HashMap < String , String > > computeSoilLayerSize ( ArrayList < HashMap < String , String > > soilsData ) { } }
float deep = 0.0f ; ArrayList < HashMap < String , String > > newSoilsData ; newSoilsData = new ArrayList < HashMap < String , String > > ( ) ; for ( HashMap < String , String > currentSoil : soilsData ) { // create a new soil with reference parameters HashMap < String , String > newCurrentSoil = new HashMap < String ,...
public class HTTPInputStream { /** * subclasses should overwrite this function */ protected Socket openSocket ( String host , int port ) throws IOException { } }
return SocketFactory . getDefault ( ) . createSocket ( host , port ) ;
public class XmlUtils { /** * Converts the string value to the java object for the given primitive category * @ param value * the value * @ param primitiveCategory * the primitive category * @ return the java object */ public static Object getPrimitiveValue ( String value , PrimitiveCategory primitiveCategory...
if ( value != null ) { try { switch ( primitiveCategory ) { case BOOLEAN : return Boolean . valueOf ( value ) ; case BYTE : return Byte . valueOf ( value ) ; case DOUBLE : return Double . valueOf ( value ) ; case FLOAT : return Float . valueOf ( value ) ; case INT : return Integer . valueOf ( value ) ; case LONG : retu...
public class AbstractCxxPublicApiVisitor { /** * Find documentation node , associated documentation , identifier of a * < em > public < / em > member declarator and visit it as a public API . * @ param node the < em > public < / em > member declarator to visit */ private void visitMemberDeclarator ( AstNode node ) ...
if ( isOverriddenMethod ( node ) ) { // assume that ancestor method is documented // and do not count as public API return ; } AstNode container = node . getFirstAncestor ( CxxGrammarImpl . templateDeclaration , CxxGrammarImpl . classSpecifier ) ; AstNode docNode = node ; List < Token > comments ; if ( container == nul...
public class StyledNamingConvention { @ Override public String fromActionNameToPath ( final String actionName ) { } }
if ( ! actionName . endsWith ( actionSuffix ) ) { throw new IllegalArgumentException ( actionName ) ; } String name = actionName . substring ( 0 , actionName . length ( ) - actionSuffix . length ( ) ) ; return adjustViewRootPath ( ) + "/" + name . replace ( PACKAGE_SEPARATOR , '/' ) + viewExtension ;
public class FastProtocolRegister { /** * Tries to get a method given the id . * Returns null if no such method is registered . */ public static Method tryGetMethod ( String id ) { } }
if ( id . length ( ) != NAME_LEN ) { // we use it to fast discard the request without doing map lookup return null ; } return idToMethod . get ( id ) ;
public class JvmTypeConstraintImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public NotificationChain eInverseRemove ( InternalEObject otherEnd , int featureID , NotificationChain msgs ) { } }
switch ( featureID ) { case TypesPackage . JVM_TYPE_CONSTRAINT__TYPE_REFERENCE : return basicSetTypeReference ( null , msgs ) ; case TypesPackage . JVM_TYPE_CONSTRAINT__OWNER : return basicSetOwner ( null , msgs ) ; } return super . eInverseRemove ( otherEnd , featureID , msgs ) ;
public class DirectCompilerVisitor { /** * NOTE : technically this rule of the grammar does not have an equivalent Java expression ( or a valid FEEL expression ) per - se . * Using here as assuming if this grammar rule trigger , it is intended as a List , either to be returned , or re - used internally in this visito...
List < DirectCompilerResult > exprs = new ArrayList < > ( ) ; for ( int i = 0 ; i < ctx . getChildCount ( ) ; i ++ ) { if ( ctx . getChild ( i ) instanceof FEEL_1_1Parser . ExpressionContext ) { FEEL_1_1Parser . ExpressionContext childCtx = ( FEEL_1_1Parser . ExpressionContext ) ctx . getChild ( i ) ; DirectCompilerRes...
public class BigtableInstanceAdminClient { /** * Lists all clusters in the specified instance . * < p > This method will throw a { @ link PartialListClustersException } when any zone is unavailable . * If partial listing are ok , the exception can be caught and inspected . * < p > Sample code : * < pre > { @ co...
return ApiExceptions . callAndTranslateApiException ( listClustersAsync ( instanceId ) ) ;
public class HealthChecker { /** * Returns information about a dependency , including the result of checking its health . */ public HealthDependencyDto doDependencyAvailabilityCheck ( String name ) { } }
HealthDependency dependency = healthDependencies . get ( checkNotNull ( name ) ) ; if ( dependency == null ) { throw new WebApplicationException ( Response . status ( 404 ) . build ( ) ) ; } return checkDependencyHealth ( dependency ) ;
public class DescribeScalableTargetsRequest { /** * The identifier of the resource associated with the scalable target . This string consists of the resource type and * unique identifier . If you specify a scalable dimension , you must also specify a resource ID . * < ul > * < li > * ECS service - The resource ...
if ( this . resourceIds == null ) { setResourceIds ( new java . util . ArrayList < String > ( resourceIds . length ) ) ; } for ( String ele : resourceIds ) { this . resourceIds . add ( ele ) ; } return this ;
public class DiscordApiImpl { /** * Removes a channel from the cache . * @ param channelId The id of the channel to remove . */ public void removeChannelFromCache ( long channelId ) { } }
channels . computeIfPresent ( channelId , ( key , channel ) -> { if ( channel instanceof Cleanupable ) { ( ( Cleanupable ) channel ) . cleanup ( ) ; } return null ; } ) ;
public class ChallengeCache { /** * Gets authority of a url . * @ param url * the url to get the authority for . * @ return the authority . */ public String getAuthority ( HttpUrl url ) { } }
String scheme = url . scheme ( ) ; String host = url . host ( ) ; int port = url . port ( ) ; StringBuilder builder = new StringBuilder ( ) ; if ( scheme != null ) { builder . append ( scheme ) . append ( "://" ) ; } builder . append ( host ) ; if ( port >= 0 ) { builder . append ( ':' ) . append ( port ) ; } return bu...
public class DefaultSystemStateRestorer { /** * Reads all journals and restores all previous system mode state from them * into the given repository . Also , re - publish all events that were not sent * by the reason of failure , abortion , etc . * @ param repository into which latest state of model will be loade...
workflowContext . repository ( repository ) ; final long snapshotTransactionId = repository . getO ( SystemInfo . class , 0L ) . orElse ( new SystemInfo ( 0L ) ) . lastTransactionId ; final long [ ] transactionId = { snapshotTransactionId } ; try ( InputProcessor processor = new DefaultInputProcessor ( journalStorage )...
public class LoggerWrapper { /** * Log a DOM node at the FINER level * @ param msg The message to show with the node , or null if no message needed * @ param node * @ see Node */ public void logDomNode ( String msg , Node node ) { } }
StackTraceElement caller = StackTraceUtils . getCallerStackTraceElement ( ) ; logDomNode ( msg , node , Level . FINER , caller ) ;
public class EntryWrappingInterceptor { /** * Locks the value for the keys accessed by the command to avoid being override from a remote get . */ protected Object setSkipRemoteGetsAndInvokeNextForManyEntriesCommand ( InvocationContext ctx , WriteCommand command ) { } }
return invokeNextThenApply ( ctx , command , applyAndFixVersionForMany ) ;
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertSTCPRECSIONToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class VoiceMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Voice voice , ProtocolMarshaller protocolMarshaller ) { } }
if ( voice == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( voice . getGender ( ) , GENDER_BINDING ) ; protocolMarshaller . marshall ( voice . getId ( ) , ID_BINDING ) ; protocolMarshaller . marshall ( voice . getLanguageCode ( ) , LANGUAG...
public class JsiiEngine { /** * Given an uninitialized native object instance , reads the @ Jsii annotations to determine * the jsii module and FQN , and creates a JS object . * Any methods implemented on the native object are passed in as " overrides " , which are overridden * in the javascript side to call - ba...
Class < ? extends Object > klass = uninitializedNativeObject . getClass ( ) ; Jsii jsii = tryGetJsiiAnnotation ( klass , true ) ; String fqn = "Object" ; // if we can ' t determine FQN , we just create an empty JS object if ( jsii != null ) { fqn = jsii . fqn ( ) ; loadModule ( jsii . module ( ) ) ; } Collection < Jsii...
public class BigQuerySnippets { /** * [ VARIABLE " my _ job _ name " ] */ public Job getJobFromId ( String jobName ) { } }
// [ START ] JobId jobIdObject = JobId . of ( jobName ) ; Job job = bigquery . getJob ( jobIdObject ) ; if ( job == null ) { // job was not found } // [ END ] return job ;
public class ST_SunPosition { /** * Return the sun position for a given date * @ param point * @ param date * @ return * @ throws IllegalArgumentException */ public static Geometry sunPosition ( Geometry point , Date date ) throws IllegalArgumentException { } }
if ( point == null ) { return null ; } if ( point instanceof Point ) { Coordinate coord = point . getCoordinate ( ) ; return point . getFactory ( ) . createPoint ( SunCalc . getPosition ( date , coord . y , coord . x ) ) ; } else { throw new IllegalArgumentException ( "The sun position is computed according a point loc...
public class PEMKeyStore { /** * Load the keystore from the supplied input stream . Unlike many other * implementations of keystore ( most notably the default JKS * implementation ) , the input stream does not hold the keystore objects . * Instead , it must be a properties file defining the locations of the * k...
try { Properties properties = new Properties ( ) ; if ( inputStream != null ) { properties . load ( inputStream ) ; if ( properties . size ( ) == 0 ) { throw new CertificateException ( "Properties file for configuration was empty?" ) ; } } else { if ( chars == null ) { // keyStore . load ( null , null ) - > in memory o...
public class MultiMap { /** * Add values to multi valued entry . If the entry is single valued , it is * converted to the first value of a multi valued entry . * @ param name The entry key . * @ param values The List of multiple values . */ public void addValues ( String name , List < V > values ) { } }
List < V > lo = get ( name ) ; if ( lo == null ) { lo = new ArrayList < > ( ) ; } lo . addAll ( values ) ; put ( name , lo ) ;
public class VirtualNetworkLinksInner { /** * Updates a virtual network link to the specified Private DNS zone . * @ param resourceGroupName The name of the resource group . * @ param privateZoneName The name of the Private DNS zone ( without a terminating dot ) . * @ param virtualNetworkLinkName The name of the ...
return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , privateZoneName , virtualNetworkLinkName , parameters , ifMatch ) , serviceCallback ) ;
public class CyclicCarbohydrateRecognition { /** * Determine the turns in the polygon formed of the provided coordinates . * @ param points polygon points * @ return array of turns ( left , right ) or null if a parallel line was found */ static Turn [ ] turns ( Point2d [ ] points ) { } }
final Turn [ ] turns = new Turn [ points . length ] ; // cycle of size 6 is [ 1,2,3,4,5,6 ] not closed for ( int i = 1 ; i <= points . length ; i ++ ) { Point2d prevXy = points [ i - 1 ] ; Point2d currXy = points [ i % points . length ] ; Point2d nextXy = points [ ( i + 1 ) % points . length ] ; int parity = ( int ) Ma...
public class Settings { /** * Writes { @ code other } into this . If any setting is populated by this and * { @ code other } , the value and flags from { @ code other } will be kept . */ void merge ( Settings other ) { } }
for ( int i = 0 ; i < COUNT ; i ++ ) { if ( ! other . isSet ( i ) ) continue ; set ( i , other . flags ( i ) , other . get ( i ) ) ; }
public class QuerySources { /** * Obtain a { @ link NodeSequence } that uses the supplied index to find the node that satisfy the given constraints . * @ param index the index ; may not be null * @ param cardinalityEstimate an estimation for the cardinality of that index , as returned during the planning phase * ...
if ( ! index . isEnabled ( ) ) { return null ; } final IndexConstraints indexConstraints = new IndexConstraints ( ) { @ Override public boolean hasConstraints ( ) { return ! constraints . isEmpty ( ) ; } @ Override public Collection < Constraint > getConstraints ( ) { return constraints ; } @ Override public Map < Stri...
public class LockableEntityGroupImpl { /** * Ask the service to update this group ( in the store ) , update the back - pointers of the updated * members , and force the retrieval of containing groups in case the memberships of THIS group * have changed during the time the group has been locked . */ private void pri...
getLockableGroupService ( ) . updateGroupMembers ( this , renewLock ) ; clearPendingUpdates ( ) ; this . invalidateInParentGroupsCache ( Collections . singleton ( ( IGroupMember ) this ) ) ;
public class CmsDefaultAppButtonProvider { /** * Creates a properly styled button for the given app , without adding a click handler or checking visibility settings . < p > * @ param appCat the app category * @ param locale the locale * @ return the button component */ public static Button createAppFolderIconButt...
return createIconButton ( appCat . getName ( locale ) , appCat . getHelpText ( locale ) , appCat . getIcon ( ) , appCat . getButtonStyle ( ) ) ;
public class CouchbaseBucket { /** * START OF SUB - DOCUMENT API * */ @ Override public LookupInBuilder lookupIn ( String docId ) { } }
AsyncLookupInBuilder asyncBuilder = asyncBucket . lookupIn ( docId ) ; return new LookupInBuilder ( asyncBuilder , kvTimeout , TIMEOUT_UNIT ) ;
public class GetClientCertificatesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( GetClientCertificatesRequest getClientCertificatesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( getClientCertificatesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getClientCertificatesRequest . getPosition ( ) , POSITION_BINDING ) ; protocolMarshaller . marshall ( getClientCertificatesRequest . getLimit ( ) , LIMIT_BI...
public class Channels { /** * Sends a { @ code " shutdownOutput " } request to the last * { @ link ChannelDownstreamHandler } in the { @ link ChannelPipeline } of * the specified { @ link Channel } . * @ param channel the channel to bind * @ return the { @ link ChannelFuture } which will be notified when the ...
ChannelFuture future = future ( channel ) ; channel . getPipeline ( ) . sendDownstream ( new DownstreamShutdownOutputEvent ( channel , future ) ) ; return future ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcFlowStorageDeviceType ( ) { } }
if ( ifcFlowStorageDeviceTypeEClass == null ) { ifcFlowStorageDeviceTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 251 ) ; } return ifcFlowStorageDeviceTypeEClass ;
public class SchemaLookup { /** * Set the value of a single input . * @ param key key of input * @ param value value of input */ public void setInput ( String key , String value ) { } }
if ( getAllowedKeys ( ) != null && ! getAllowedKeys ( ) . contains ( key ) ) throw new IllegalStateException ( "The input key " + key + " is not allowed for lookups" ) ; _inputs . put ( key , value ) ;
public class AbstractServiceValidateController { /** * Handle proxy granting ticket delivery . * @ param serviceTicketId the service ticket id * @ param credential the service credential * @ return the ticket granting ticket * @ throws AuthenticationException the authentication exception * @ throws AbstractTi...
val serviceTicket = serviceValidateConfigurationContext . getCentralAuthenticationService ( ) . getTicket ( serviceTicketId , ServiceTicket . class ) ; val authenticationResult = serviceValidateConfigurationContext . getAuthenticationSystemSupport ( ) . handleAndFinalizeSingleAuthenticationTransaction ( serviceTicket ....
public class FileOperations { /** * Delete an existing directory including all child objects . * @ param aDir * The directory to be deleted . May not be < code > null < / code > . * @ return A non - < code > null < / code > error code . */ @ Nonnull public static FileIOError deleteDirRecursive ( @ Nonnull final F...
ValueEnforcer . notNull ( aDir , "Directory" ) ; // Non - existing directory ? if ( ! FileHelper . existsDir ( aDir ) ) return EFileIOErrorCode . SOURCE_DOES_NOT_EXIST . getAsIOError ( EFileIOOperation . DELETE_DIR_RECURSIVE , aDir ) ; if ( isExceptionOnDeleteRoot ( ) ) { // Check that we ' re not deleting the complete...
public class DbTableAccess { /** * Allows a user to insert new data into a table , while respecting * the schema and capabilities of the user . * @ param params Map of column names to their respective values * @ return JSON object representing the inserted object * @ throws Exception */ public JSONObject insert...
OperationAccess operationAccess = tableSchema . getInsertAccess ( ) ; if ( false == operationAccess . isAllowed ( ) ) { throw new Exception ( "Attempting to insert a record while the privilege is not allowed: " + tableSchema . getLogicalName ( ) + " (" + tableSchema . getPhysicalName ( ) + ")" ) ; } // Create a list of...
public class DefaultDocWorkUnitHandler { /** * Return the description to be used for the work unit . We need to manually strip * out any inline custom javadoc tags since we don ' t those in the summary . * @ param currentWorkUnit * @ return Description to be used or the work unit . */ protected String getDescript...
return Arrays . stream ( currentWorkUnit . getClassDoc ( ) . inlineTags ( ) ) . filter ( t -> getTagPrefix ( ) == null || ! t . name ( ) . startsWith ( getTagPrefix ( ) ) ) . map ( t -> t . text ( ) ) . collect ( Collectors . joining ( ) ) ;
public class CritBit64 { /** * Compares two values . * @ param v1 * @ param v2 * @ return Position of the differing bit , or - 1 if both values are equal */ private static int compare ( long v1 , long v2 ) { } }
int pos = 0 ; if ( v1 != v2 ) { long x = v1 ^ v2 ; pos += Long . numberOfLeadingZeros ( x ) ; return pos ; } return - 1 ;
public class MavenDependencyResolver { /** * when failing to read data from ' mvn dependency : tree ' output - trying to read directly from POM files */ private void collectDependenciesFromPomXml ( Set < String > bomFiles , Collection < AgentProjectInfo > projects ) { } }
MavenPomParser pomParser = new MavenPomParser ( ignorePomModules ) ; List < BomFile > bomFileList = new LinkedList < > ( ) ; HashMap < String , String > bomArtifactPathMap = new HashMap < > ( ) ; for ( String bomFileName : bomFiles ) { BomFile bomfile = pomParser . parseBomFile ( bomFileName ) ; bomFileList . add ( bom...
public class GrassRasterReader { /** * utility to set particular parameters */ public void setParameter ( String key , Object obj ) { } }
if ( key . equals ( "novalue" ) ) { // $ NON - NLS - 1 $ novalue = obj ; } else if ( key . equals ( "matrixtype" ) ) { // $ NON - NLS - 1 $ Integer dmtype = ( Integer ) obj ; matrixType = dmtype . intValue ( ) ; }
public class DefaultGroovyMethods { /** * Creates a spreadable map from this iterable . * @ param self an iterable * @ return a newly created SpreadMap * @ see groovy . lang . SpreadMap # SpreadMap ( java . util . List ) * @ see # toSpreadMap ( java . util . Map ) * @ since 2.4.0 */ public static SpreadMap to...
if ( self == null ) throw new GroovyRuntimeException ( "Fail to convert Iterable to SpreadMap, because it is null." ) ; else return toSpreadMap ( asList ( self ) ) ;
public class JobRun { /** * A list of predecessors to this job run . * @ param predecessorRuns * A list of predecessors to this job run . */ public void setPredecessorRuns ( java . util . Collection < Predecessor > predecessorRuns ) { } }
if ( predecessorRuns == null ) { this . predecessorRuns = null ; return ; } this . predecessorRuns = new java . util . ArrayList < Predecessor > ( predecessorRuns ) ;
public class IntStreamEx { /** * Returns a stream consisting of the elements of this stream , additionally * performing the provided action on the last stream element when it ' s * consumed from the resulting stream . * This is an < a href = " package - summary . html # StreamOps " > intermediate * operation < ...
return mapLast ( x -> { action . accept ( x ) ; return x ; } ) ;
public class KamDialect { /** * { @ inheritDoc } */ @ Override public Set < KamEdge > getEdges ( KamNode sourceNode , KamNode targetNode ) { } }
return wrapEdges ( kam . getEdges ( sourceNode , targetNode ) ) ;
public class SimpleCollector { /** * Return the Child with the given labels , creating it if needed . * Must be passed the same number of labels are were passed to { @ link # labelNames } . */ public Child labels ( String ... labelValues ) { } }
if ( labelValues . length != labelNames . size ( ) ) { throw new IllegalArgumentException ( "Incorrect number of labels." ) ; } for ( String label : labelValues ) { if ( label == null ) { throw new IllegalArgumentException ( "Label cannot be null." ) ; } } List < String > key = Arrays . asList ( labelValues ) ; Child c...
public class JdbcUtil { /** * Safely closes resources and logs errors . * @ param conn Connection to close */ public static void close ( Connection conn ) { } }
if ( conn != null ) { try { conn . close ( ) ; } catch ( SQLException ex ) { logger . error ( "" , ex ) ; } }
public class RequestContext { /** * Renders using { @ link JsonRenderer } with { " code " : int } . * @ param code the specified code * @ return this context */ public RequestContext renderJSON ( final int code ) { } }
final JsonRenderer jsonRenderer = new JsonRenderer ( ) ; final JSONObject ret = new JSONObject ( ) . put ( Keys . CODE , code ) ; jsonRenderer . setJSONObject ( ret ) ; this . renderer = jsonRenderer ; return this ;
public class JsonObject { /** * Creates a deep copy of this element and all its children * @ since 2.8.2 */ @ Override public JsonObject deepCopy ( ) { } }
JsonObject result = new JsonObject ( ) ; for ( Map . Entry < String , JsonElement > entry : members . entrySet ( ) ) { result . add ( entry . getKey ( ) , entry . getValue ( ) . deepCopy ( ) ) ; } return result ;
public class UpdateHealthCheckRequest { /** * A complex type that contains one < code > ResettableElementName < / code > element for each element that you want to * reset to the default value . Valid values for < code > ResettableElementName < / code > include the following : * < ul > * < li > * < code > ChildH...
com . amazonaws . internal . SdkInternalList < String > resetElementsCopy = new com . amazonaws . internal . SdkInternalList < String > ( resetElements . length ) ; for ( ResettableElementName value : resetElements ) { resetElementsCopy . add ( value . toString ( ) ) ; } if ( getResetElements ( ) == null ) { setResetEl...
public class TenantService { /** * Returns true if a tenant with the specified fname exists , otherwise false . * @ since 4.3 */ public boolean fnameExists ( final String fname ) { } }
boolean rslt = false ; // default try { final ITenant tenant = getTenantByFName ( fname ) ; rslt = tenant != null ; } catch ( IllegalArgumentException iae ) { // This exception is completely fine ; it simply // means there is no tenant with this fname . rslt = false ; } return rslt ;
public class VdmDebugPlugin { /** * Logging */ public static void log ( Throwable t ) { } }
Throwable top = t ; if ( t instanceof DebugException ) { Throwable throwable = ( ( DebugException ) t ) . getStatus ( ) . getException ( ) ; if ( throwable != null ) { top = throwable ; } } log ( new Status ( IStatus . ERROR , PLUGIN_ID , INTERNAL_ERROR , "internalErrorLoggedFromVdmDebugPlugin" + top . getMessage ( ) ,...
public class GeneralValidator { /** * Gets the transformers transforming the output of each data provider before they are mapped to the rules . * @ return Data provider output transformers . */ public Transformer [ ] getDataProviderOutputTransformers ( ) { } }
Transformer [ ] transformers ; if ( dataProviderOutputTransformers == null ) { transformers = null ; } else { transformers = dataProviderOutputTransformers . toArray ( new Transformer [ dataProviderOutputTransformers . size ( ) ] ) ; } return transformers ;
public class OptionalInt { /** * Invokes mapping function on inner value if present . * @ param mapper mapping function * @ return an { @ code OptionalInt } with transformed value if present , * otherwise an empty { @ code OptionalInt } * @ throws NullPointerException if value is present and * { @ code mapper...
if ( ! isPresent ( ) ) return empty ( ) ; return OptionalInt . of ( mapper . applyAsInt ( value ) ) ;
public class CmsPropertyDelete { /** * Builds a HTML list of Resources . < p > * Columns : Type , Name , Uri , Value of the property , locked by ( optional ) . < p > * @ param resourceList a list of resources * @ param lockInfo a boolean to decide if the locked info should be shown or not * @ throws CmsExceptio...
// reverse the resource list Collections . reverse ( resourceList ) ; CmsMessages messages = Messages . get ( ) . getBundle ( getLocale ( ) ) ; StringBuffer result = new StringBuffer ( ) ; result . append ( "<table border=\"0\" width=\"100%\" cellpadding=\"1\" cellspacing=\"1\">\n" ) ; result . append ( "<tr>\n" ) ; //...
public class ContextWindow { /** * Enables or disables the component . */ @ Override public void setEnabled ( boolean enabled ) { } }
context . setEnabled ( enabled ) ; thisTable . setEnabled ( enabled ) ; localsTable . setEnabled ( enabled ) ; evaluator . setEnabled ( enabled ) ; cmdLine . setEnabled ( enabled ) ;
public class GreenPepperLogo { /** * { @ inheritDoc } */ @ SuppressWarnings ( "unchecked" ) public String execute ( Map parameters , String body , RenderContext renderContext ) throws MacroException { } }
try { Map contextMap = MacroUtils . defaultVelocityContext ( ) ; return VelocityUtils . getRenderedTemplate ( "/templates/greenpepper/confluence/macros/greenPepperLogo.vm" , contextMap ) ; } catch ( Exception e ) { return getErrorView ( "greenpepper.logo.macroid" , e . getMessage ( ) ) ; }
public class AdminToolQuartzServiceImpl { /** * / * ( non - Javadoc ) * @ see de . chandre . admintool . quartz . AdminToolQuartzService # isPaused ( org . quartz . Trigger ) */ @ Override public boolean isPaused ( Trigger trigger ) throws SchedulerException { } }
return scheduler . getTriggerState ( trigger . getKey ( ) ) == TriggerState . PAUSED ;
public class Util { /** * Returns a hash set of elements */ public static < A > Set < A > set ( A ... elements ) { } }
final Set < A > set = new HashSet < A > ( elements . length ) ; for ( A element : elements ) { set . add ( element ) ; } return set ;
public class ListTriggersRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListTriggersRequest listTriggersRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listTriggersRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listTriggersRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listTriggersRequest . getDependentJobName ( ) , DEPENDENTJOBNAME_BINDI...
public class CmsConvertXmlThread { /** * Transforms and write files . < p > * @ param files2Transform Files to transform * @ param xsltFile XLST file which includes logic for transforming * @ param cmsObject Current CmsObject * @ param newXsdMainFile New xsd main file * @ param report I _ CmsReport * @ retu...
// the CmsObject to publish resources CmsObject cms1 = null ; // the CmsObject to handle resources which are not to publish CmsObject cms2 = null ; // the publish project CmsProject project2Publish = null ; // initialize the CmsObjects and the publish project try { cms1 = OpenCms . initCmsObject ( cmsObject ) ; cms2 = ...
public class PairCounter { /** * Counts the pair , increasing its total count by the specified positive amount . * @ param count a positive value for the number of times the object occurred * @ throws IllegalArgumentException if { @ code count } is not a positive value . */ public int count ( Pair < T > obj , int c...
if ( count < 1 ) throw new IllegalArgumentException ( "Count must be positive: " + count ) ; long index = getIndex ( obj ) ; int oldCount = counts . get ( index ) ; int newCount = count + oldCount ; counts . put ( index , newCount ) ; sum += count ; return newCount ;