signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PerSessionLogHandler { /** * Returns the server log for the given session id .
* @ param sessionId The session id .
* @ return The available server log entries for the session .
* @ throws IOException If there was a problem reading from file . */
public synchronized LogEntries getSessionLog ( Session... | List < LogEntry > entries = new ArrayList < > ( ) ; for ( LogRecord record : records ( sessionId ) ) { if ( record . getLevel ( ) . intValue ( ) >= serverLogLevel . intValue ( ) ) entries . add ( new LogEntry ( record . getLevel ( ) , record . getMillis ( ) , record . getMessage ( ) ) ) ; } return new LogEntries ( entr... |
public class AbstractPlugin { /** * Converts this plugin to a json object ( plugin description ) .
* @ return a json object , for example ,
* < pre >
* " oId " : " " ,
* " name " : " " ,
* " version " : " " ,
* " author " : " " ,
* " status " : " " / / Enumeration name of { @ link PluginStatus }
* < / p... | final JSONObject ret = new JSONObject ( ) ; ret . put ( Keys . OBJECT_ID , getId ( ) ) ; ret . put ( Plugin . PLUGIN_NAME , getName ( ) ) ; ret . put ( Plugin . PLUGIN_VERSION , getVersion ( ) ) ; ret . put ( Plugin . PLUGIN_AUTHOR , getAuthor ( ) ) ; ret . put ( Plugin . PLUGIN_STATUS , getStatus ( ) . name ( ) ) ; re... |
public class ImgUtil { /** * 给图片添加图片水印 < br >
* 此方法并不关闭流
* @ param srcStream 源图像流
* @ param destStream 目标图像流
* @ param pressImg 水印图片 , 可以使用 { @ link ImageIO # read ( File ) } 方法读取文件
* @ param x 修正值 。 默认在中间 , 偏移量相对于中间偏移
* @ param y 修正值 。 默认在中间 , 偏移量相对于中间偏移
* @ param alpha 透明度 : alpha 必须是范围 [ 0.0 , 1.0 ] 之内... | pressImage ( read ( srcStream ) , destStream , pressImg , x , y , alpha ) ; |
public class DefaultMonetaryRoundingsSingletonSpi { /** * Query all roundings matching the given { @ link RoundingQuery } .
* @ param query the rounding query , not null .
* @ return the collection found , not null . */
@ Override public Collection < MonetaryRounding > getRoundings ( RoundingQuery query ) { } } | List < MonetaryRounding > result = new ArrayList < > ( ) ; Collection < String > providerNames = query . getProviderNames ( ) ; if ( providerNames == null || providerNames . isEmpty ( ) ) { providerNames = getDefaultProviderChain ( ) ; } for ( String providerName : providerNames ) { Bootstrap . getServices ( RoundingPr... |
public class UnindexedFace { /** * An array of reasons that specify why a face wasn ' t indexed .
* < ul >
* < li >
* EXTREME _ POSE - The face is at a pose that can ' t be detected . For example , the head is turned too far away from
* the camera .
* < / li >
* < li >
* EXCEEDS _ MAX _ FACES - The number... | java . util . ArrayList < String > reasonsCopy = new java . util . ArrayList < String > ( reasons . length ) ; for ( Reason value : reasons ) { reasonsCopy . add ( value . toString ( ) ) ; } if ( getReasons ( ) == null ) { setReasons ( reasonsCopy ) ; } else { getReasons ( ) . addAll ( reasonsCopy ) ; } return this ; |
public class ProcessEngines { /** * Initializes all process engines that can be found on the classpath for
* resources < code > camunda . cfg . xml < / code > ( plain Activiti style configuration )
* and for resources < code > activiti - context . xml < / code > ( Spring style configuration ) . */
public synchroniz... | if ( ! isInitialized ) { if ( processEngines == null ) { // Create new map to store process - engines if current map is null
processEngines = new HashMap < String , ProcessEngine > ( ) ; } ClassLoader classLoader = ReflectUtil . getClassLoader ( ) ; Enumeration < URL > resources = null ; try { resources = classLoader .... |
public class RslAttributes { /** * Returns a list of strings for a specified attribute .
* For example for ' arguments ' attribute .
* @ param attribute the rsl attribute to return the values of .
* @ return the list of values of the relation . Each value is
* a string . Null is returned if there is no such
*... | NameOpValue nv = rslTree . getParam ( attribute ) ; if ( nv == null || nv . getOperator ( ) != NameOpValue . EQ ) return null ; List values = nv . getValues ( ) ; List list = new LinkedList ( ) ; Iterator iter = values . iterator ( ) ; Object obj ; while ( iter . hasNext ( ) ) { obj = iter . next ( ) ; if ( obj instanc... |
public class AbstractValidate { /** * Validate that the specified primitive value falls between the two inclusive values specified ; otherwise , throws an exception with the specified message .
* < pre > Validate . inclusiveBetween ( 0 , 2 , 1 , " Not in range " ) ; < / pre >
* @ param start
* the inclusive start... | if ( value < start || value > end ) { fail ( message ) ; } return value ; |
public class PhaseTwoApplication { /** * Stage three statement equivalencing .
* @ param network the { @ link ProtoNetwork network } to equivalence
* @ param pct the parameter equivalencing count to control output */
private void stage3Statement ( final ProtoNetwork network , int pct ) { } } | stageOutput ( "Equivalencing statements" ) ; int sct = p2 . stage3EquivalenceStatements ( network ) ; stageOutput ( "(" + sct + " equivalences)" ) ; |
public class SoundStore { /** * Inidicate whether music should be playing
* @ param music True if music should be played */
public void setMusicOn ( boolean music ) { } } | if ( soundWorks ) { this . music = music ; if ( music ) { restartLoop ( ) ; setMusicVolume ( musicVolume ) ; } else { pauseLoop ( ) ; } } |
public class ApiOvhDedicatedCloud { /** * Get this object properties
* REST : GET / dedicatedCloud / { serviceName } / allowedNetwork / { networkAccessId }
* @ param serviceName [ required ] Domain of the service
* @ param networkAccessId [ required ] */
public OvhAllowedNetwork serviceName_allowedNetwork_network... | String qPath = "/dedicatedCloud/{serviceName}/allowedNetwork/{networkAccessId}" ; StringBuilder sb = path ( qPath , serviceName , networkAccessId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhAllowedNetwork . class ) ; |
public class AbstractWSingleSelectList { /** * { @ inheritDoc } */
@ Override public void setData ( final Object data ) { } } | List < ? > options = getOptions ( ) ; if ( ! ( isEditable ( ) && data instanceof String ) && ( options == null || options . isEmpty ( ) ) ) { throw new IllegalStateException ( "Should not set a selection on a list component with no options." ) ; } Object validOption = findValidOption ( options , data , false ) ; super ... |
public class GridBagLayoutFormBuilder { /** * Appends a label and field to the end of the current line .
* The label will be to the left of the field , and be right - justified .
* < br / >
* The field will " grow " horizontally as space allows .
* @ param propertyName the name of the property to create the con... | return appendLabeledField ( propertyName , LabelOrientation . LEFT , colSpan ) ; |
public class MessageItem { /** * Note the existence of a persistent reference */
public void addPersistentRef ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addPersistentRef" ) ; // We have at least one durable reference so the message
// must maintain its level of persistence
maintainPersistence = 1 ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ... |
public class event { /** * Use this API to fetch filtered set of event resources .
* filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */
public static event [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } } | event obj = new event ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; event [ ] response = ( event [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class AttachedRemoteSubscriberControl { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . runtime . ControlAdapter # runtimeEventOccurred ( com . ibm . ws . sib . admin . RuntimeEvent ) */
public void runtimeEventOccurred ( RuntimeEvent event ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "runtimeEventOccurred" , event ) ; |
public class GrailsWebRequest { /** * Looks up the GrailsWebRequest from the current request .
* @ param request The current request
* @ return The GrailsWebRequest */
public static @ Nullable GrailsWebRequest lookup ( HttpServletRequest request ) { } } | GrailsWebRequest webRequest = ( GrailsWebRequest ) request . getAttribute ( GrailsApplicationAttributes . WEB_REQUEST ) ; return webRequest == null ? lookup ( ) : webRequest ; |
public class OptionSet { /** * Add a non - value option with the given key and multiplicity , and the default prefix
* @ param key The key for the option
* @ param multiplicity The multiplicity for the option
* @ return The set instance itself ( to support invocation chaining for < code > addOption ( ) < / code >... | return addOption ( key , false , Options . Separator . NONE , false , multiplicity ) ; |
public class StatefulKnowledgeSessionImpl { /** * ( This shall NOT be exposed on public API ) */
public QueryResultsImpl getQueryResultsFromRHS ( String queryName , Object ... arguments ) { } } | return internalGetQueryResult ( true , queryName , arguments ) ; |
public class BulkCommandInstructions { /** * ( non - Javadoc )
* @ see net . roboconf . core . commands . AbstractCommandInstruction # doValidate ( ) */
@ Override public List < ParsingError > doValidate ( ) { } } | List < ParsingError > result = new ArrayList < > ( ) ; if ( this . changeStateInstruction == null ) result . add ( error ( ErrorCode . CMD_UNRECOGNIZED_INSTRUCTION ) ) ; if ( this . instancePath != null && ! this . context . instanceExists ( this . instancePath ) ) result . add ( error ( ErrorCode . CMD_NO_MATCHING_INS... |
public class CheckAccessControls { /** * Determines whether a deprecation warning should be emitted . */
private boolean shouldEmitDeprecationWarning ( NodeTraversal t , PropertyReference propRef ) { } } | // In the global scope , there are only two kinds of accesses that should
// be flagged for warnings :
// 1 ) Calls of deprecated functions and methods .
// 2 ) Instantiations of deprecated classes .
// For now , we just let everything else by .
if ( t . inGlobalScope ( ) ) { if ( ! NodeUtil . isInvocationTarget ( prop... |
public class TaskResult { /** * Adds output
* @ param key output field
* @ param value value
* @ return current instance */
public TaskResult addOutputData ( String key , Object value ) { } } | this . outputData . put ( key , value ) ; return this ; |
public class MaterializedViewProcessor { /** * This function is mostly re - written for the fix of ENG - 6511 . - - yzhang */
private static Index findBestMatchIndexForMatviewMinOrMax ( MaterializedViewInfo matviewinfo , Table srcTable , List < AbstractExpression > groupbyExprs , AbstractExpression minMaxAggExpr ) { } ... | CatalogMap < Index > allIndexes = srcTable . getIndexes ( ) ; StmtTableScan tableScan = new StmtTargetTableScan ( srcTable ) ; // Candidate index . If we can find an index covering both group - by columns and aggExpr ( optimal ) then we will
// return immediately .
// If the index found covers only group - by columns (... |
public class UtilityExtensions { /** * For debugging purposes ; format the given text in the form
* aaa { bbb | ccc | ddd } eee , where the { } indicate the context start
* and limit , and the | | indicate the start and limit . */
public static StringBuffer formatInput ( StringBuffer appendTo , ReplaceableString in... | if ( 0 <= pos . contextStart && pos . contextStart <= pos . start && pos . start <= pos . limit && pos . limit <= pos . contextLimit && pos . contextLimit <= input . length ( ) ) { String b , c , d ; // a = input . substring ( 0 , pos . contextStart ) ;
b = input . substring ( pos . contextStart , pos . start ) ; c = i... |
public class ForkJoinTask { /** * Forks the given tasks , returning when { @ code isDone } holds for each task or an ( unchecked )
* exception is encountered , in which case the exception is rethrown . If more than one task
* encounters an exception , then this method throws any one of these exceptions . If any tas... | Throwable ex = null ; int last = tasks . length - 1 ; for ( int i = last ; i >= 0 ; -- i ) { ForkJoinTask < ? > t = tasks [ i ] ; if ( t == null ) { if ( ex == null ) ex = new NullPointerException ( ) ; } else if ( i != 0 ) t . fork ( ) ; else if ( t . doInvoke ( ) < NORMAL && ex == null ) ex = t . getException ( ) ; }... |
public class MonomerParser { /** * This method checks if attachment label is in the format of R # , where # is a
* number
* @ param label attachment label
* @ throws org . helm . notation2 . exception . MonomerException if label is not valid */
public static void validateAttachmentLabel ( String label ) throws Mo... | if ( label . equalsIgnoreCase ( Attachment . PAIR_ATTACHMENT ) ) { return ; } char [ ] chars = label . toCharArray ( ) ; if ( ! ( String . valueOf ( chars [ 0 ] ) ) . equals ( "R" ) ) { throw new MonomerException ( "Invalid Attachment Label format" ) ; } for ( int i = 1 ; i < chars . length ; i ++ ) { char c = chars [ ... |
public class S3Utils { /** * Method return stream of S3ObjectSummary objects , subject to < i > req < / i >
* parameters Method will perform one query for every 1000 elements ( current
* s3 limitation ) . It is lazy , so there would be no unnecesarry calls
* @ param req
* - ListObjectRequest to be used .
* @ ... | return ReactiveSeq . fromIterator ( new S3ObjectSummaryIterator ( client , req ) ) . map ( processor ) ; |
public class ST_Reverse3DLine { /** * Reverses a LineString according to the z value . The z of the first point
* must be lower than the z of the end point .
* @ param lineString
* @ return */
private static LineString reverse3D ( LineString lineString , String order ) { } } | CoordinateSequence seq = lineString . getCoordinateSequence ( ) ; double startZ = seq . getCoordinate ( 0 ) . z ; double endZ = seq . getCoordinate ( seq . size ( ) - 1 ) . z ; if ( order . equalsIgnoreCase ( "desc" ) ) { if ( ! Double . isNaN ( startZ ) && ! Double . isNaN ( endZ ) && startZ < endZ ) { CoordinateSeque... |
public class Dbi { /** * Return statistics about this database .
* @ param txn transaction handle ( not null ; not committed )
* @ return an immutable statistics object . */
public Stat stat ( final Txn < T > txn ) { } } | if ( SHOULD_CHECK ) { requireNonNull ( txn ) ; txn . checkReady ( ) ; } final MDB_stat stat = new MDB_stat ( RUNTIME ) ; checkRc ( LIB . mdb_stat ( txn . pointer ( ) , ptr , stat ) ) ; return new Stat ( stat . f0_ms_psize . intValue ( ) , stat . f1_ms_depth . intValue ( ) , stat . f2_ms_branch_pages . longValue ( ) , s... |
public class Utils { /** * Prints a state .
* @ param sb buffer for output .
* @ param bits state bits .
* @ return the buffer */
public static final void appendState ( StringBuilder sb , short bits ) { } } | // These 3 states are mutually exclusive .
if ( ( bits & TaskState . SCHEDULED . bit ) != 0 ) sb . append ( TaskState . SCHEDULED . name ( ) ) . append ( ',' ) ; if ( ( bits & TaskState . ENDED . bit ) != 0 ) sb . append ( TaskState . ENDED . name ( ) ) . append ( ',' ) ; if ( ( bits & TaskState . SUSPENDED . bit ) != ... |
public class AbstrCFMLExprTransformer { /** * Initialmethode , wird aufgerufen um den internen Zustand des Objektes zu setzten .
* @ param fld Function Libraries zum validieren der Funktionen
* @ param cfml CFML Code der transfomiert werden soll . */
protected Data init ( Data data ) { } } | if ( JSON_ARRAY == null ) JSON_ARRAY = getFLF ( data , "_literalArray" ) ; if ( JSON_STRUCT == null ) JSON_STRUCT = getFLF ( data , "_literalStruct" ) ; if ( GET_STATIC_SCOPE == null ) GET_STATIC_SCOPE = getFLF ( data , "_getStaticScope" ) ; if ( GET_SUPER_STATIC_SCOPE == null ) GET_SUPER_STATIC_SCOPE = getFLF ( data ,... |
public class clusterinstance_binding { /** * Use this API to fetch clusterinstance _ binding resource of given name . */
public static clusterinstance_binding get ( nitro_service service , Long clid ) throws Exception { } } | clusterinstance_binding obj = new clusterinstance_binding ( ) ; obj . set_clid ( clid ) ; clusterinstance_binding response = ( clusterinstance_binding ) obj . get_resource ( service ) ; return response ; |
public class Angle { /** * Gets an angle field - such as degrees , minutes , or seconds . Signs
* will be consistent .
* Throws NullPointerException if field is not provided .
* @ param field
* One of the field constants specifying the field to be
* retrieved .
* @ return Value of the specified field . */
p... | if ( sexagesimalDegreeParts == null ) { sexagesimalDegreeParts = sexagesimalSplit ( getDegrees ( ) ) ; } return sexagesimalDegreeParts [ field . ordinal ( ) ] ; |
public class ChargingStationOcpp15SoapClient { /** * { @ inheritDoc } */
@ Override public boolean startTransaction ( ChargingStationId id , IdentifyingToken identifyingToken , EvseId evseId ) { } } | LOG . info ( "Requesting remote start transaction on {}" , id ) ; ChargePointService chargePointService = this . createChargingStationService ( id ) ; RemoteStartTransactionRequest request = new RemoteStartTransactionRequest ( ) ; request . setIdTag ( identifyingToken . getToken ( ) ) ; request . setConnectorId ( evseI... |
public class Redwood { /** * Log a message . The last argument to this object is the message to log
* ( usually a String ) ; the first arguments are the channels to log to .
* For example :
* log ( Redwood . ERR , " tag " , " this message is tagged with ERROR and tag " )
* @ param args The last argument is the ... | // - - Argument Check
if ( args . length == 0 ) { return ; } if ( isClosed ) { return ; } // - - Create Record
final Object content = args [ args . length - 1 ] ; final Object [ ] tags = new Object [ args . length - 1 ] ; final StackTraceElement ste = getStackTrace ( ) ; System . arraycopy ( args , 0 , tags , 0 , args ... |
public class AVStandardWebSocketClient { /** * WebSocketClient interfaces . */
public void onOpen ( ServerHandshake var1 ) { } } | gLogger . d ( "onOpen status=" + var1 . getHttpStatus ( ) + ", statusMsg=" + var1 . getHttpStatusMessage ( ) ) ; this . heartBeatPolicy . start ( ) ; if ( null != this . socketClientMonitor ) { this . socketClientMonitor . onOpen ( ) ; } |
public class CPAttachmentFileEntryUtil { /** * Removes the cp attachment file entry with the primary key from the database . Also notifies the appropriate model listeners .
* @ param CPAttachmentFileEntryId the primary key of the cp attachment file entry
* @ return the cp attachment file entry that was removed
* ... | return getPersistence ( ) . remove ( CPAttachmentFileEntryId ) ; |
public class NS { /** * Returns an < code > AddAction < / code > for building expression that would
* append the specified values to this number set ; or if the attribute does
* not already exist , adding the new attribute and the value ( s ) to the item .
* In general , DynamoDB recommends using SET rather than ... | return append ( new LinkedHashSet < Number > ( Arrays . asList ( values ) ) ) ; |
public class FileUtil { /** * 从文件中读取每一行的UTF - 8编码数据
* @ param < T > 集合类型
* @ param path 文件路径
* @ param collection 集合
* @ return 文件中的每行内容的集合
* @ throws IORuntimeException IO异常
* @ since 3.1.1 */
public static < T extends Collection < String > > T readUtf8Lines ( String path , T collection ) throws IORuntimeE... | return readLines ( path , CharsetUtil . CHARSET_UTF_8 , collection ) ; |
public class EventTrigger { /** * getter for probability - gets probability of this trigger to be an event or relation trigger
* @ generated
* @ return value of the feature */
public String getProbability ( ) { } } | if ( EventTrigger_Type . featOkTst && ( ( EventTrigger_Type ) jcasType ) . casFeat_probability == null ) jcasType . jcas . throwFeatMissing ( "probability" , "de.julielab.jules.types.EventTrigger" ) ; return jcasType . ll_cas . ll_getStringValue ( addr , ( ( EventTrigger_Type ) jcasType ) . casFeatCode_probability ) ; |
public class ReflectionUtils { /** * Finds a field on the given type for the given name .
* @ param type The type
* @ param name The name
* @ return An { @ link Optional } contains the method or empty */
public static Field getRequiredField ( Class type , String name ) { } } | try { return type . getDeclaredField ( name ) ; } catch ( NoSuchFieldException e ) { Optional < Field > field = findField ( type , name ) ; return field . orElseThrow ( ( ) -> new NoSuchFieldError ( "No field '" + name + "' found for type: " + type . getName ( ) ) ) ; } |
public class LRSubsetSearch { /** * When the search is initialized , and no custom initial solution has been set ,
* an empty or full subset solution is created depending on whether \ ( L \ gt R \ )
* or \ ( R \ gt L \ ) , respectively . */
@ Override public void init ( ) { } } | // solution not yet set ?
// NOTE : important to set solution before calling super ,
// else super sets a random initial solution
if ( getCurrentSolution ( ) == null ) { if ( isIncreasing ( ) ) { // increasing : start with empty solution
SubsetSolution initial = getProblem ( ) . createEmptySubsetSolution ( ) ; updateCu... |
public class MapsInner { /** * Creates or updates an integration account map .
* @ param resourceGroupName The resource group name .
* @ param integrationAccountName The integration account name .
* @ param mapName The integration account map name .
* @ param map The integration account map .
* @ throws Illeg... | return createOrUpdateWithServiceResponseAsync ( resourceGroupName , integrationAccountName , mapName , map ) . map ( new Func1 < ServiceResponse < IntegrationAccountMapInner > , IntegrationAccountMapInner > ( ) { @ Override public IntegrationAccountMapInner call ( ServiceResponse < IntegrationAccountMapInner > response... |
public class TCPClientSettings { /** * Returns either the { @ link InetSocketAddress } provided to the constructor or a new instance for every invocation based on the { @ link String } provided to the constructor .
* @ return An instance of { @ link InetSocketAddress } . */
public InetSocketAddress getEndpoint ( ) { ... | return endpoint == null ? new InetSocketAddress ( uri . getHost ( ) , uri . getPort ( ) ) : endpoint ; |
public class Predicates { /** * Returns a predicate that returns to true if the incoming request is an { @ link CanFulfillIntentRequest }
* for the given intent name .
* @ param intentName intent name to evaluate against
* @ return true if the incoming request is an { @ link CanFulfillIntentRequest } for the give... | return i -> i . getRequestEnvelope ( ) . getRequest ( ) instanceof CanFulfillIntentRequest && intentName . equals ( ( ( CanFulfillIntentRequest ) i . getRequestEnvelope ( ) . getRequest ( ) ) . getIntent ( ) . getName ( ) ) ; |
public class JBBPDslBuilder { /** * Add named integer field .
* @ param name name of the field , can be null for anonymous
* @ return the builder instance , must not be null */
public JBBPDslBuilder Int ( final String name ) { } } | final Item item = new Item ( BinType . INT , name , this . byteOrder ) ; this . addItem ( item ) ; return this ; |
public class crvserver_lbvserver_binding { /** * Use this API to fetch crvserver _ lbvserver _ binding resources of given name . */
public static crvserver_lbvserver_binding [ ] get ( nitro_service service , String name ) throws Exception { } } | crvserver_lbvserver_binding obj = new crvserver_lbvserver_binding ( ) ; obj . set_name ( name ) ; crvserver_lbvserver_binding response [ ] = ( crvserver_lbvserver_binding [ ] ) obj . get_resources ( service ) ; return response ; |
public class Functions { /** * Creates a new < code > Function < / code > from the given list . < br >
* < br >
* The function will use given integer argument as the index for
* the list . If the given integer argument is not in bounds , then
* the given default value will be returned . < br >
* < br >
* Th... | return new Function < Integer , T > ( ) { @ Override public T apply ( Integer i ) { if ( i >= 0 && i < list . size ( ) ) { return list . get ( i ) ; } return defaultValue ; } } ; |
public class JavaParser { /** * src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 383:1 : methodDeclaration : type Identifier methodDeclaratorRest ; */
public final void methodDeclaration ( ) throws RecognitionException { } } | VarDecl_stack . push ( new VarDecl_scope ( ) ) ; int methodDeclaration_StartIndex = input . index ( ) ; try { if ( state . backtracking > 0 && alreadyParsedRule ( input , 25 ) ) { return ; } // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 385:5 : ( type Identifier methodDecl... |
public class OpDef { /** * < code > repeated . tensorflow . OpDef . AttrDef attr = 4 ; < / code > */
public java . util . List < ? extends org . tensorflow . framework . OpDef . AttrDefOrBuilder > getAttrOrBuilderList ( ) { } } | return attr_ ; |
public class SmbFile { /** * This method returns the free disk space in bytes of the drive this share
* represents or the drive on which the directory or file resides . Objects
* other than < tt > TYPE _ SHARE < / tt > or < tt > TYPE _ FILESYSTEM < / tt > will result
* in 0L being returned .
* @ return the free... | if ( getType ( ) == TYPE_SHARE || type == TYPE_FILESYSTEM ) { int level = Trans2QueryFSInformationResponse . SMB_FS_FULL_SIZE_INFORMATION ; try { return queryFSInformation ( level ) ; } catch ( SmbException ex ) { switch ( ex . getNtStatus ( ) ) { case NtStatus . NT_STATUS_INVALID_INFO_CLASS : case NtStatus . NT_STATUS... |
public class MathBindings { /** * Binding for { @ link java . lang . Math # toIntExact ( long ) }
* @ param value the long value
* @ return the argument as an int
* @ throws ArithmeticException if the { @ code argument } overflows an int */
public static IntegerBinding toIntExact ( final ObservableLongValue value... | return createIntegerBinding ( ( ) -> Math . toIntExact ( value . get ( ) ) , value ) ; |
public class ItemImpl { /** * { @ inheritDoc } */
public Item getAncestor ( int degree ) throws ItemNotFoundException , AccessDeniedException , RepositoryException { } } | checkValid ( ) ; try { // 6.2.8 If depth > n is specified then an ItemNotFoundException is
// thrown .
if ( degree < 0 ) { throw new ItemNotFoundException ( "Can't get ancestor with ancestor's degree < 0." ) ; } final QPath myPath = getData ( ) . getQPath ( ) ; int n = myPath . getDepth ( ) - degree ; if ( n == 0 ) { r... |
public class GuidedDecisionTableUpgradeHelper1 { /** * populated */
private void assertConditionColumnPatternGrouping ( GuidedDecisionTable model ) { } } | class ConditionColData { ConditionCol col ; String [ ] data ; } // Offset into Model ' s data array
final int metaDataColCount = ( model . metadataCols == null ? 0 : model . metadataCols . size ( ) ) ; final int attributeColCount = ( model . attributeCols == null ? 0 : model . attributeCols . size ( ) ) ; final int DAT... |
public class ImageModerationsImpl { /** * Returns the list of faces found .
* @ param imageStream The image file .
* @ param findFacesFileInputOptionalParameter the object representing the optional parameters to be set before calling this API
* @ throws IllegalArgumentException thrown if parameters fail the valid... | return findFacesFileInputWithServiceResponseAsync ( imageStream , findFacesFileInputOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class Options { /** * Parses an argument list starting at the given index , populating the bound options object with the information collected .
* Optional arguments are recognized as words starting with " - " , at least 2 characters long , and not equal to " - - " . The
* special argument " - - " is recogni... | Matcher matcher = null ; while ( index < args . length && args [ index ] . charAt ( 0 ) == '-' && args [ index ] . length ( ) > 1 ) { if ( args [ index ] . equals ( STOPPER ) ) { ++ index ; break ; } else { if ( ( matcher = SOPTION . matcher ( args [ index ] ) ) . matches ( ) ) { for ( char letter : matcher . group ( 1... |
public class JossAccount { /** * Get authenticated URL
* @ return access URL , public or internal */
public String getAccessURL ( ) { } } | if ( mUsePublicURL ) { LOG . trace ( "Using public URL: " + mAccess . getPublicURL ( ) ) ; return mAccess . getPublicURL ( ) ; } LOG . trace ( "Using internal URL: " + mAccess . getInternalURL ( ) ) ; return mAccess . getInternalURL ( ) ; |
public class Token { /** * indexed getter for posTag - gets an indexed value - List contains part - of - speech tags of different part - of - speech tagsets ( see also POSTag and subtypes ) , O
* @ generated
* @ param i index in the array to get
* @ return value of the element at index i */
public POSTag getPosTa... | if ( Token_Type . featOkTst && ( ( Token_Type ) jcasType ) . casFeat_posTag == null ) jcasType . jcas . throwFeatMissing ( "posTag" , "de.julielab.jules.types.Token" ) ; jcasType . jcas . checkArrayBounds ( jcasType . ll_cas . ll_getRefValue ( addr , ( ( Token_Type ) jcasType ) . casFeatCode_posTag ) , i ) ; return ( P... |
public class IOUtil { /** * Copies bytes from the URL < code > source < / code > to a file
* < code > destination < / code > . The directories up to < code > destination < / code >
* will be created if they don ' t already exist . < code > destination < / code >
* will be overwritten if it already exists .
* @ ... | InputStream is = null ; try { final URLConnection connection = source . openConnection ( ) ; connection . setConnectTimeout ( connectionTimeout ) ; connection . setReadTimeout ( readTimeout ) ; is = connection . getInputStream ( ) ; write ( destination , is ) ; } catch ( IOException e ) { throw new UncheckedIOException... |
public class OpenIabHelper { /** * Connects to Billing Service of each store and request list of user purchases ( inventory ) .
* Can be used as a factor when looking for best fitting store .
* @ param availableStores - list of stores to check
* @ return first found store with not empty inventory , null otherwise... | if ( Utils . uiThread ( ) ) { throw new IllegalStateException ( "Must not be called from UI thread" ) ; } final Semaphore inventorySemaphore = new Semaphore ( 0 ) ; final Appstore [ ] inventoryAppstore = new Appstore [ 1 ] ; for ( final Appstore appstore : availableStores ) { final AppstoreInAppBillingService billingSe... |
public class Status { /** * Extract an error { @ link Status } from the causal chain of a { @ link Throwable } .
* If no status can be found , a status is created with { @ link Code # UNKNOWN } as its code and
* { @ code t } as its cause .
* @ return non - { @ code null } status */
public static Status fromThrowa... | Throwable cause = checkNotNull ( t , "t" ) ; while ( cause != null ) { if ( cause instanceof StatusException ) { return ( ( StatusException ) cause ) . getStatus ( ) ; } else if ( cause instanceof StatusRuntimeException ) { return ( ( StatusRuntimeException ) cause ) . getStatus ( ) ; } cause = cause . getCause ( ) ; }... |
public class ConfigurationCheck { /** * In case of JOINED inheritance we may have added some columns that are in the table but that are not in the entityConfigs . We check here that we have not
* added a version column in a child .
* @ param errors
* @ param config */
private void checkVersionOnJoinedInheritance ... | for ( Entity entity : config . getProject ( ) . getRootEntities ( ) . getList ( ) ) { if ( entity . hasInheritance ( ) && entity . getInheritance ( ) . is ( JOINED ) ) { for ( Entity child : entity . getAllChildrenRecursive ( ) ) { for ( Attribute attribute : child . getAttributes ( ) . getList ( ) ) { if ( attribute .... |
public class LogHandle { /** * Resize the underlying recovery log .
* This method it invoked when a keypoint operation detects that there is
* insufficient room in a recovery log file to form a persistent record
* of all the active data .
* @ exception InternalLogException An unexpected error has occured . */
v... | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resizeLog" , new Object [ ] { this , targetSize } ) ; // Check that both files are actually open
if ( _activeFile == null || _inactiveFile == null ) { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resizeLog" , "InternalLogException" ) ; throw new InternalLogException... |
public class HttpURLConnectionImpl { /** * Aggressively tries to get the final HTTP response , potentially making
* many HTTP requests in the process in order to cope with redirects and
* authentication . */
private HttpEngine getResponse ( ) throws IOException { } } | initHttpEngine ( ) ; if ( httpEngine . hasResponse ( ) ) { return httpEngine ; } while ( true ) { if ( ! execute ( true ) ) { continue ; } Response response = httpEngine . getResponse ( ) ; Request followUp = httpEngine . followUpRequest ( ) ; if ( followUp == null ) { httpEngine . releaseConnection ( ) ; return httpEn... |
public class BufferMgr { /** * Pins a buffer to the specified block , potentially waiting until a buffer
* becomes available . If no buffer becomes available within a fixed time
* period , then repins all currently holding blocks .
* @ param blk
* a block ID
* @ return the buffer pinned to that block */
publi... | // Try to find out if this block has been pinned by this transaction
PinnedBuffer pinnedBuff = pinnedBuffers . get ( blk ) ; if ( pinnedBuff != null ) { pinnedBuff . pinnedCount ++ ; return pinnedBuff . buffer ; } // This transaction has pinned too many buffers
if ( pinnedBuffers . size ( ) == BUFFER_POOL_SIZE ) throw ... |
public class DevicesManagementApi { /** * Create a new task for one or more devices ( asynchronously )
* Create a new task for one or more devices
* @ param taskPayload Task object to be created ( required )
* @ param callback The callback to be executed when the API call finishes
* @ return The request call
... | ProgressResponseBody . ProgressListener progressListener = null ; ProgressRequestBody . ProgressRequestListener progressRequestListener = null ; if ( callback != null ) { progressListener = new ProgressResponseBody . ProgressListener ( ) { @ Override public void update ( long bytesRead , long contentLength , boolean do... |
public class RoutesInner { /** * Creates or updates a route in the specified route table .
* @ param resourceGroupName The name of the resource group .
* @ param routeTableName The name of the route table .
* @ param routeName The name of the route .
* @ param routeParameters Parameters supplied to the create o... | return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , routeTableName , routeName , routeParameters ) , serviceCallback ) ; |
public class GcsDelegationTokens { /** * From a token , get the session token identifier .
* @ param token token to process
* @ return the session token identifier
* @ throws IOException failure to validate / read data encoded in identifier .
* @ throws IllegalArgumentException if the token isn ' t an GCP sessi... | checkArgument ( token != null , "null token" ) ; DelegationTokenIdentifier identifier ; // harden up decode beyond what Token does itself
try { identifier = token . decodeIdentifier ( ) ; } catch ( RuntimeException e ) { Throwable cause = e . getCause ( ) ; if ( cause != null ) { // its a wrapping around class instanti... |
public class Dbi { /** * Store a key / value pair in the database .
* This function stores key / data pairs in the database . The default behavior
* is to enter the new key / data pair , replacing any previously existing key if
* duplicates are disallowed , or adding a duplicate data item if duplicates
* are al... | if ( SHOULD_CHECK ) { requireNonNull ( txn ) ; requireNonNull ( key ) ; requireNonNull ( val ) ; txn . checkReady ( ) ; txn . checkWritesAllowed ( ) ; } txn . kv ( ) . keyIn ( key ) ; txn . kv ( ) . valIn ( val ) ; final int mask = mask ( flags ) ; final int rc = LIB . mdb_put ( txn . pointer ( ) , ptr , txn . kv ( ) .... |
public class KeenClient { /** * Validates an event and inserts global properties , producing a new event object which is
* ready to be published to the Keen service .
* @ param project The project in which the event will be published .
* @ param eventCollection The name of the collection in which the event will b... | if ( project . getWriteKey ( ) == null ) { throw new NoWriteKeyException ( "You can't send events to Keen if you haven't set a write key." ) ; } validateEventCollection ( eventCollection ) ; validateEvent ( event ) ; KeenLogging . log ( String . format ( Locale . US , "Adding event to collection: %s" , eventCollection ... |
public class Comment { /** * Check if this comment looks like an XML Declaration .
* @ return true if it looks like , maybe , it ' s an XML Declaration . */
public boolean isXmlDeclaration ( ) { } } | String data = getData ( ) ; return ( data . length ( ) > 1 && ( data . startsWith ( "!" ) || data . startsWith ( "?" ) ) ) ; |
public class ClassPathResolver { /** * Gets all URLs ( resources ) under the pattern .
* @ param locationPattern the pattern of classPath ( a ant - style string )
* @ return all URLS */
public static Set < URL > getResources ( final String locationPattern ) { } } | final Set < URL > result = new HashSet < URL > ( ) ; final String scanRootPath = getRootPath ( locationPattern ) ; final String subPattern = locationPattern . substring ( scanRootPath . length ( ) ) ; final Set < URL > rootDirResources = getResourcesFromRoot ( scanRootPath ) ; for ( final URL rootDirResource : rootDirR... |
public class CommandOption { /** * Sets command option default value
* @ param aDefault value */
public CommandOption < T > defaultsTo ( Object aDefault ) { } } | if ( aDefault == null ) { defaultValue = null ; return this ; } boolean isCorrectType ; if ( type instanceof ParameterizedType ) { isCorrectType = ( ( Class ) ( ( ParameterizedType ) type ) . getRawType ( ) ) . isInstance ( aDefault ) ; } else { isCorrectType = ( ( Class ) type ) . isInstance ( aDefault ) ; } if ( ! is... |
public class Sample { /** * does cubic interpolation with the next sample
* @ since 06.06.2006
* @ param currentTuningPos
* @ return */
private int getCubicInterpolated ( final int currentSamplePos , final int currentTuningPos ) { } } | final int poslo = ( currentTuningPos >> CubicSpline . SPLINE_FRACSHIFT ) & CubicSpline . SPLINE_FRACMASK ; final long v1 = ( ( ( currentSamplePos - 1 ) < 0 ) ? 0L : ( long ) CubicSpline . lut [ poslo ] * ( long ) sample [ currentSamplePos - 1 ] ) + ( ( long ) CubicSpline . lut [ poslo + 1 ] * ( long ) sample [ currentS... |
public class ListTemplatesResult { /** * An array the contains the name and creation time stamp for each template in your Amazon SES account .
* @ param templatesMetadata
* An array the contains the name and creation time stamp for each template in your Amazon SES account . */
public void setTemplatesMetadata ( jav... | if ( templatesMetadata == null ) { this . templatesMetadata = null ; return ; } this . templatesMetadata = new com . amazonaws . internal . SdkInternalList < TemplateMetadata > ( templatesMetadata ) ; |
public class PropertyAdapter { /** * Retrieves the minLength of a property
* @ return the minLength of the property */
public Optional < Integer > getMinlength ( ) { } } | if ( property instanceof StringProperty ) { StringProperty stringProperty = ( StringProperty ) property ; return Optional . ofNullable ( stringProperty . getMinLength ( ) ) ; } else if ( property instanceof UUIDProperty ) { UUIDProperty uuidProperty = ( UUIDProperty ) property ; return Optional . ofNullable ( uuidPrope... |
public class ExceptionWindow { /** * Toggle the visibility of the exception details .
* @ param detailsVisible should details be visible */
private void setDetailsVisible ( boolean detailsVisible ) { } } | detailsLayout . setVisible ( detailsVisible ) ; if ( detailsVisible ) { setAutoSize ( false ) ; expandButton . setTitle ( MESSAGES . exceptionDetailsHide ( ) ) ; setHeight ( WidgetLayout . exceptionWindowHeightDetails ) ; } else { expandButton . setTitle ( MESSAGES . exceptionDetailsView ( ) ) ; setHeight ( WidgetLayou... |
public class CachedResource { /** * Rename the given resource */
public synchronized boolean renameTo ( Resource dest ) throws SecurityException { } } | if ( _resource . renameTo ( dest ) ) { clear ( ) ; return true ; } return false ; |
public class MailService { /** * / / / / / Private Methods */
private String getStoragePath ( final String lastPathPart ) { } } | final Calendar cal = Calendar . getInstance ( ) ; return ( attachmentBasePath . getValue ( ) + "/" + Integer . toString ( cal . get ( Calendar . YEAR ) ) + "/" + Integer . toString ( cal . get ( Calendar . MONTH ) ) + "/" + Integer . toString ( cal . get ( Calendar . DAY_OF_MONTH ) ) + "/" + lastPathPart ) ; |
public class DefaultStreamDownloader { /** * Returns the file name by path .
* @ param file _ name */
protected static String getFileName ( String file_name ) { } } | if ( file_name == null ) return "" ; file_name = file_name . trim ( ) ; int iPos = 0 ; iPos = file_name . lastIndexOf ( "\\" ) ; if ( iPos > - 1 ) file_name = file_name . substring ( iPos + 1 ) ; iPos = file_name . lastIndexOf ( "/" ) ; if ( iPos > - 1 ) file_name = file_name . substring ( iPos + 1 ) ; iPos = file_name... |
public class BitmapUtils { /** * Store the bitmap as a file .
* @ param bitmap to store .
* @ param format bitmap format .
* @ param quality the quality of the compressed bitmap .
* @ return the compressed bitmap file . */
public static boolean storeAsFile ( Bitmap bitmap , File file , Bitmap . CompressFormat f... | OutputStream out = null ; try { out = new BufferedOutputStream ( new FileOutputStream ( file ) ) ; return bitmap . compress ( format , quality , out ) ; } catch ( FileNotFoundException e ) { Log . e ( TAG , "no such file for saving bitmap: " , e ) ; return false ; } finally { CloseableUtils . close ( out ) ; } |
public class CommerceNotificationAttachmentPersistenceImpl { /** * Returns a range of all the commerce notification attachments where uuid = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not prim... | return findByUuid ( uuid , start , end , null ) ; |
public class HtmlFormRenderer { /** * private static final Log log = LogFactory . getLog ( HtmlFormRenderer . class ) ; */
@ Override protected void afterFormElementsEnd ( FacesContext facesContext , UIComponent component ) throws IOException { } } | super . afterFormElementsEnd ( facesContext , component ) ; |
public class Buffer { /** * Returns a tail segment that we can write at least { @ code minimumCapacity }
* bytes to , creating it if necessary . */
Segment writableSegment ( int minimumCapacity ) { } } | if ( minimumCapacity < 1 || minimumCapacity > Segment . SIZE ) throw new IllegalArgumentException ( ) ; if ( head == null ) { head = SegmentPool . take ( ) ; // Acquire a first segment .
return head . next = head . prev = head ; } Segment tail = head . prev ; if ( tail . limit + minimumCapacity > Segment . SIZE || ! ta... |
public class AmazonSQSExtendedClientBase { /** * Delivers a message to the specified queue . With Amazon SQS , you now have
* the ability to send large payload messages that are up to 256KB ( 262,144
* bytes ) in size . To send large payloads , you must use an AWS SDK that
* supports SigV4 signing . To verify whe... | return amazonSqsToBeExtended . sendMessage ( queueUrl , messageBody ) ; |
public class JawrSassResolver { /** * Finds and and normalized the content of the resource
* @ param path
* the resource path
* @ return the normalized resource content
* @ throws ResourceNotFoundException
* if the resource is not found
* @ throws IOException
* if an IOException occurs */
protected String... | List < Class < ? > > excluded = new ArrayList < > ( ) ; excluded . add ( ISassResourceGenerator . class ) ; Reader rd = null ; try { rd = rsHandler . getResource ( bundle , path , false , excluded ) ; addLinkedResource ( path ) ; } catch ( ResourceNotFoundException e ) { // Do nothing
} String content = null ; if ( rd ... |
public class UserRegistryServiceImpl { /** * Method will be called for each UserRegistryConfiguration that is
* registered in the OSGi service registry . We maintain an internal
* map of these for easy access .
* Since id values are NOT guaranteed to be unique across types ,
* it is possible to have a config li... | String configId = ( String ) ref . getProperty ( KEY_CONFIG_ID ) ; String type = ( String ) ref . getProperty ( KEY_TYPE ) ; if ( configId != null && type != null ) { configId = parseIdFromConfigID ( configId ) ; userRegistries . putReference ( configId , ref ) ; } else { if ( type == null ) { Tr . error ( tc , "USER_R... |
public class PreferencesFxUtils { /** * Filters a list of { @ code settings } by a given { @ code description } .
* @ param settings the list of settings to be filtered
* @ param description to be searched for
* @ return a list of { @ code settings } , containing ( ignoring case ) the given { @ code description }... | return settings . stream ( ) . filter ( setting -> containsIgnoreCase ( setting . getDescription ( ) , description ) ) . collect ( Collectors . toList ( ) ) ; |
public class SessionMgrCoordinator { /** * Unregisters the SessionManager service ( if one is registered ) ,
* and registers a new SessionManager service based on the current
* configuration / SessionStoreService .
* We must stop applications before unregistering the SessionManager
* service because application... | if ( TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINER ) ) { LoggingUtil . SESSION_LOGGER_CORE . entering ( CLASS_NAME , "registerSessionManager" ) ; } // If we haven ' t activated yet , don ' t try to register
if ( this . context == null ) { if ( TraceComponent ... |
public class Person { /** * Method to get the Timezone of this Person . Default is the " UTC " Timezone .
* @ return Timezone of this Person */
public DateTimeZone getTimeZone ( ) { } } | return this . attrValues . get ( Person . AttrName . TIMZONE ) != null ? DateTimeZone . forID ( this . attrValues . get ( Person . AttrName . TIMZONE ) ) : DateTimeZone . UTC ; |
public class StopChannelResult { /** * A collection of key - value pairs .
* @ param tags
* A collection of key - value pairs .
* @ return Returns a reference to this object so that method calls can be chained together . */
public StopChannelResult withTags ( java . util . Map < String , String > tags ) { } } | setTags ( tags ) ; return this ; |
public class Translate { /** * Translate { @ link Vertex } values using the given { @ link TranslateFunction } .
* @ param vertices input vertices
* @ param translator implements conversion from { @ code OLD } to { @ code NEW }
* @ param parallelism operator parallelism
* @ param < K > vertex ID type
* @ para... | Preconditions . checkNotNull ( vertices ) ; Preconditions . checkNotNull ( translator ) ; Class < Vertex < K , NEW > > vertexClass = ( Class < Vertex < K , NEW > > ) ( Class < ? extends Vertex > ) Vertex . class ; TypeInformation < K > idType = ( ( TupleTypeInfo < Vertex < K , OLD > > ) vertices . getType ( ) ) . getTy... |
public class AbstractOAuth1ApiBinding { /** * Returns a { @ link ByteArrayHttpMessageConverter } to be used by the internal { @ link RestTemplate } when consuming image or other binary resources .
* By default , the message converter supports " image / jpeg " , " image / gif " , and " image / png " media types .
* ... | ByteArrayHttpMessageConverter converter = new ByteArrayHttpMessageConverter ( ) ; converter . setSupportedMediaTypes ( Arrays . asList ( MediaType . IMAGE_JPEG , MediaType . IMAGE_GIF , MediaType . IMAGE_PNG ) ) ; return converter ; |
public class CreateNewNoteIntentBuilder { /** * Set the tags for the new note . < b > Caution : < / b > Any existing tags are overwritten . Use
* { @ link # addTags ( ArrayList ) } to keep the already set tags in this builder .
* @ param tags The tags which should be added to the new note . If { @ code null } then ... | return putStringArrayList ( EvernoteIntent . EXTRA_TAG_NAME_LIST , tags ) ; |
public class IonBinary { /** * TODO maybe add lenInt ( int ) to micro - optimize , or ? */
public static int lenInt ( long longVal ) { } } | if ( longVal != 0 ) { return 0 ; } if ( longVal < 0 ) longVal = - longVal ; if ( longVal < ( 1L << ( 8 * 1 - 1 ) ) ) return 1 ; // 7 bits
if ( longVal < ( 1L << ( 8 * 2 - 1 ) ) ) return 2 ; // 15 bits
if ( longVal < ( 1L << ( 8 * 3 - 1 ) ) ) return 3 ; // 23 bits
if ( longVal < ( 1L << ( 8 * 4 - 1 ) ) ) return 4 ; // 3... |
public class ModelResourceStructure { /** * Insert a model .
* success status 201
* @ param model the model to insert
* @ return a { @ link javax . ws . rs . core . Response } object .
* @ throws java . lang . Exception if any .
* @ see javax . ws . rs . POST
* @ see AbstractModelResource # insert */
@ Supp... | matchedInsert ( model ) ; setForInsertId ( model ) ; executeTx ( t -> { preInsertModel ( model ) ; insertModel ( model ) ; postInsertModel ( model ) ; } ) ; MODEL_ID id = ( MODEL_ID ) this . server . getBeanId ( model ) ; return Response . created ( buildLocationUri ( id ) ) . build ( ) ; |
public class HashTreeBuilder { /** * Calculates the height of the hash tree in case a new node would be added .
* @ param node
* a leaf to be added to the tree , must not be null .
* @ return Height of the hash tree .
* @ throws HashException */
public long calculateHeight ( ImprintNode node ) throws HashExcept... | LinkedList < ImprintNode > tmpHeads = new LinkedList < > ( ) ; for ( ImprintNode in : heads ) { tmpHeads . add ( new ImprintNode ( in ) ) ; } addToHeads ( tmpHeads , new ImprintNode ( node ) ) ; ImprintNode root = getRootNode ( tmpHeads ) ; logger . debug ( "Adding node with hash {} and height {}, the hash tree height ... |
public class TrainingJobDefinitionMarshaller { /** * Marshall the given parameter object . */
public void marshall ( TrainingJobDefinition trainingJobDefinition , ProtocolMarshaller protocolMarshaller ) { } } | if ( trainingJobDefinition == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( trainingJobDefinition . getTrainingInputMode ( ) , TRAININGINPUTMODE_BINDING ) ; protocolMarshaller . marshall ( trainingJobDefinition . getHyperParameters ( ) , H... |
public class ReceiveMessageAction { /** * Create control message that is expected .
* @ param context
* @ param messageType
* @ return */
protected Message createControlMessage ( TestContext context , String messageType ) { } } | if ( dataDictionary != null ) { messageBuilder . setDataDictionary ( dataDictionary ) ; } return messageBuilder . buildMessageContent ( context , messageType , MessageDirection . INBOUND ) ; |
public class TrainingsImpl { /** * Create a tag for the project .
* @ param projectId The project id
* @ param name The tag name
* @ param description Optional description for the tag
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the Tag object */
pu... | if ( projectId == null ) { throw new IllegalArgumentException ( "Parameter projectId is required and cannot be null." ) ; } if ( name == null ) { throw new IllegalArgumentException ( "Parameter name is required and cannot be null." ) ; } if ( this . client . apiKey ( ) == null ) { throw new IllegalArgumentException ( "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.