signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class AmazonConnectClient { /** * Returns a < code > UserSummaryList < / code > , which is an array of < code > UserSummary < / code > objects .
* @ param listUsersRequest
* @ return Result of the ListUsers operation returned by the service .
* @ throws InvalidRequestException
* The request is not valid ... | request = beforeClientExecution ( request ) ; return executeListUsers ( request ) ; |
public class BiConsumerCallbackManager { /** * Register a new callback
* @ param symbol
* @ param callback
* @ throws BitfinexClientException */
public void registerCallback ( final S symbol , final BiConsumer < S , T > callback ) throws BitfinexClientException { } } | final List < BiConsumer < S , T > > callbackList = callbacks . computeIfAbsent ( symbol , ( k ) -> new CopyOnWriteArrayList < > ( ) ) ; callbackList . add ( callback ) ; |
public class OfferService { /** * This methods arranges for the data node to send the block report at the next heartbeat . */
public void scheduleBlockReport ( long delay ) { } } | if ( delay > 0 ) { // send BR after random delay
lastBlockReport = System . currentTimeMillis ( ) - ( anode . blockReportInterval - R . nextInt ( ( int ) ( delay ) ) ) ; } else { // send at next heartbeat
lastBlockReport = lastHeartbeat - anode . blockReportInterval ; } resetBlockReportTime = true ; // reset future BRs... |
public class SSECustomerKey { /** * Constructs a new SSECustomerKey that can be used for generating the
* presigned URL ' s .
* Currently , " AES256 " is the only supported algorithm .
* @ see SSEAlgorithm # AES256
* @ param algorithm
* The server - side encryption algorithm to use with this
* customer - pr... | if ( algorithm == null ) throw new IllegalArgumentException ( ) ; return new SSECustomerKey ( ) . withAlgorithm ( algorithm ) ; |
public class InfoList { /** * Get the String representations of all items in this list , by calling { @ code toString ( ) } on each item in the
* list .
* @ return The String representations of all items in this list , by calling { @ code toString ( ) } on each item in
* the list . */
public List < String > getAs... | if ( this . isEmpty ( ) ) { return Collections . emptyList ( ) ; } else { final List < String > toStringVals = new ArrayList < > ( this . size ( ) ) ; for ( final T i : this ) { toStringVals . add ( i == null ? "null" : i . toString ( ) ) ; } return toStringVals ; } |
public class NumFailedJobMetric { /** * Listen for events to maintain correct value of number of failed jobs { @ inheritDoc }
* @ see azkaban . event . EventListener # handleEvent ( azkaban . event . Event ) */
@ Override public synchronized void handleEvent ( final Event event ) { } } | if ( event . getType ( ) == EventType . JOB_FINISHED && Status . FAILED . equals ( event . getData ( ) . getStatus ( ) ) ) { this . value = this . value + 1 ; } |
public class ContextualStoreImpl { /** * Given a particular id , return the correct contextual . For contextuals
* which aren ' t passivation capable , the contextual can ' t be found in another
* container , and null will be returned .
* @ param id An identifier for the contextual
* @ return the contextual */
... | return this . < C , I > getContextual ( new StringBeanIdentifier ( id ) ) ; |
public class ListFacesResult { /** * An array of < code > Face < / code > objects .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setFaces ( java . util . Collection ) } or { @ link # withFaces ( java . util . Collection ) } if you want to override the
* ... | if ( this . faces == null ) { setFaces ( new java . util . ArrayList < Face > ( faces . length ) ) ; } for ( Face ele : faces ) { this . faces . add ( ele ) ; } return this ; |
public class AbstractSingleton { /** * Set all internal status variables to the values read from the specified
* { @ link ObjectInputStream } . This can be used to make singletons
* serializable .
* @ param aOIS
* The input stream to read from . May not be < code > null < / code > .
* @ throws IOException
*... | m_aStatus = ( BitSet ) aOIS . readObject ( ) ; |
public class Numeraire { /** * This method returns the value random variable of the product within the specified model , evaluated at a given evalutationTime .
* Note : For a lattice this is often the value conditional to evalutationTime , for a Monte - Carlo simulation this is the ( sum of ) value discounted to eval... | return model . getNumeraire ( evaluationTime ) ; |
public class CATSyncAsynchReader { /** * This method will send a JsMessage back to the client in response to a synchronous receive .
* If the FAP level is 9 or above the message can be sent back to the client in chunks ( rather
* than as a single large message ) if the message is big enough to make this worthwhile ... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "sendMessageToClient" , jsMessage ) ; setCurrentlyDoingReceiveWithWait ( false ) ; try { // If we are at FAP9 or above we can do a ' chunked ' send of the message in seperate
// slices to make life easier on the Java ... |
public class AbstractPropertyEditor { /** * Checks if the < em > bean < / em > and the < em > value < / em > are consistent with the cardinality rules of
* the model . This method is important for validations .
* @ param value Value that is related to the object
* @ param bean Object that is related to the value ... | Integer max = this . maxCardinalities . get ( value . getClass ( ) ) ; if ( max != null ) { if ( max == 0 ) { throw new IllegalBioPAXArgumentException ( "Cardinality 0 restriction violated" ) ; } else { assert multipleCardinality ; Set values = this . getValueFromBean ( bean ) ; if ( values . size ( ) >= max ) { throw ... |
public class Util { /** * Check whether a particular request is expecting continue .
* @ param inboundRequestMsg in question
* @ return true if the request expects 100 - continue response */
public static boolean is100ContinueRequest ( HttpCarbonMessage inboundRequestMsg ) { } } | return HEADER_VAL_100_CONTINUE . equalsIgnoreCase ( inboundRequestMsg . getHeader ( HttpHeaderNames . EXPECT . toString ( ) ) ) ; |
public class IdemixSignature { /** * Verify this signature
* @ param disclosure an array indicating which attributes it expects to be disclosed
* @ param ipk the issuer public key
* @ param msg the message that should be signed in this signature
* @ param attributeValues BIG array where attributeValues [ i ] co... | if ( disclosure == null || ipk == null || msg == null || attributeValues == null || attributeValues . length != ipk . getAttributeNames ( ) . length || disclosure . length != ipk . getAttributeNames ( ) . length ) { return false ; } for ( int i = 0 ; i < ipk . getAttributeNames ( ) . length ; i ++ ) { if ( disclosure [... |
public class CommandLine { /** * Sets whether options for single - value fields can be specified multiple times on the command line without a { @ link OverwrittenOptionException } being thrown .
* The default is { @ code false } .
* < p > The specified setting will be registered with this { @ code CommandLine } and... | getCommandSpec ( ) . parser ( ) . overwrittenOptionsAllowed ( newValue ) ; for ( CommandLine command : getCommandSpec ( ) . subcommands ( ) . values ( ) ) { command . setOverwrittenOptionsAllowed ( newValue ) ; } return this ; |
public class AliPayApi { /** * 地铁购票发码退款
* @ param model
* { AlipayCommerceCityfacilitatorVoucherRefundModel }
* @ return { AlipayCommerceCityfacilitatorVoucherRefundResponse }
* @ throws { AlipayApiException } */
public static AlipayCommerceCityfacilitatorVoucherRefundResponse metroRefundToResponse ( AlipayComm... | AlipayCommerceCityfacilitatorVoucherRefundRequest request = new AlipayCommerceCityfacilitatorVoucherRefundRequest ( ) ; request . setBizModel ( model ) ; return AliPayApiConfigKit . getAliPayApiConfig ( ) . getAlipayClient ( ) . execute ( request ) ; |
public class PropertyHelper { /** * Replaces Ant - style property references if the corresponding keys exist in the provided { @ link Properties } .
* @ param props contains possible replacements
* @ param original may contain Ant - style templates
* @ return the original string with replaced properties or the un... | Matcher matcher = PROPERTY_TEMPLATE . matcher ( original ) ; StringBuilder buffer = new StringBuilder ( ) ; boolean found = false ; while ( matcher . find ( ) ) { found = true ; String propertyName = matcher . group ( 2 ) . trim ( ) ; buffer . append ( matcher . group ( 1 ) ) . append ( props . containsKey ( propertyNa... |
public class AmazonRedshiftClient { /** * Deletes the specified snapshot copy grant .
* @ param deleteSnapshotCopyGrantRequest
* The result of the < code > DeleteSnapshotCopyGrant < / code > action .
* @ return Result of the DeleteSnapshotCopyGrant operation returned by the service .
* @ throws InvalidSnapshotC... | request = beforeClientExecution ( request ) ; return executeDeleteSnapshotCopyGrant ( request ) ; |
public class S2SProposalPersonServiceImpl { /** * Finds all the key Person associated with the provided pdDoc . */
@ Override public List < ProposalPersonContract > getKeyPersons ( ProposalDevelopmentDocumentContract pdDoc ) { } } | List < ProposalPersonContract > keyPersons = new ArrayList < > ( ) ; if ( pdDoc != null ) { for ( ProposalPersonContract person : pdDoc . getDevelopmentProposal ( ) . getProposalPersons ( ) ) { if ( person . isKeyPerson ( ) ) { keyPersons . add ( person ) ; } } } return keyPersons ; |
public class SignedJarBuilder { /** * Writes a . SF file with a digest to the manifest . */
private byte [ ] getSignature ( final Manifest forManifest ) throws IOException , GeneralSecurityException { } } | final ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; final Manifest signatureFile = new Manifest ( ) ; final Attributes main = signatureFile . getMainAttributes ( ) ; final MessageDigest md = MessageDigest . getInstance ( "SHA1" ) ; final PrintStream print = new PrintStream ( new DigestOutputStream ( new B... |
public class CeylonRepoReader { /** * / * ( non - Javadoc )
* @ see org . eclipse . aether . repository . WorkspaceReader # findArtifact ( org . eclipse . aether . artifact . Artifact ) */
@ Override public File findArtifact ( final Artifact artifact ) { } } | String type = artifact . getProperty ( "type" , "jar" ) ; if ( "ceylon-jar" . equals ( type ) || "car" . equals ( type ) ) { if ( "ceylon-jar" . equals ( type ) ) { type = "jar" ; } File art = new File ( CeylonUtil . ceylonSystemFullPath ( artifact , type ) ) ; if ( art . isFile ( ) ) { if ( logger != null ) { logger .... |
public class cachecontentgroup { /** * Use this API to add cachecontentgroup resources . */
public static base_responses add ( nitro_service client , cachecontentgroup resources [ ] ) throws Exception { } } | base_responses result = null ; if ( resources != null && resources . length > 0 ) { cachecontentgroup addresources [ ] = new cachecontentgroup [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new cachecontentgroup ( ) ; addresources [ i ] . name = resources [ i ] . name ... |
public class CmsImageFormatHandler { /** * Execute on format change . < p >
* @ param formatKey the new format value */
public void onFormatChange ( String formatKey ) { } } | // setting the selected format restriction
m_currentFormat = m_formats . get ( formatKey ) ; m_currentFormat . adjustCroppingParam ( m_croppingParam ) ; adjustToCurrentFormat ( ) ; if ( m_initialized ) { // fire change only if initialized
fireValueChangedEvent ( ) ; } |
public class Topics { /** * Subscribes an existing Amazon SQS queue to an existing Amazon SNS topic .
* The specified Amazon SNS client will be used to send the subscription
* request , and the Amazon SQS client will be used to modify the policy on
* the queue to allow it to receive messages from the SNS topic . ... | List < String > sqsAttrNames = Arrays . asList ( QueueAttributeName . QueueArn . toString ( ) , QueueAttributeName . Policy . toString ( ) ) ; Map < String , String > sqsAttrs = sqs . getQueueAttributes ( sqsQueueUrl , sqsAttrNames ) . getAttributes ( ) ; String sqsQueueArn = sqsAttrs . get ( QueueAttributeName . Queue... |
public class P3 { /** * The processor for extracting directives .
* @ param name
* property name , unused .
* @ param source
* the directives .
* @ throws Exception
* when there is a problem . */
@ SuppressWarnings ( "unused" ) private void executeProgram ( String name , String [ ] source ) throws Exception... | String _singleStringSource = executeProgram__makeSingleStringSource ( source ) ; executeProgram ( name , _singleStringSource ) ; |
public class SyncAgentsInner { /** * Lists sync agents in a server .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param serverName The name of the server on which the sync agent is hosted .
... | return listByServerWithServiceResponseAsync ( resourceGroupName , serverName ) . map ( new Func1 < ServiceResponse < Page < SyncAgentInner > > , Page < SyncAgentInner > > ( ) { @ Override public Page < SyncAgentInner > call ( ServiceResponse < Page < SyncAgentInner > > response ) { return response . body ( ) ; } } ) ; |
public class InChINumbersTools { /** * Parse the atom numbering from the auxinfo .
* @ param aux InChI AuxInfo
* @ param numbers the atom numbers */
public static void parseAuxInfo ( String aux , long [ ] numbers ) { } } | aux = aux . substring ( aux . indexOf ( "/N:" ) + 3 ) ; String numberStringAux = aux . substring ( 0 , aux . indexOf ( '/' ) ) ; int i = 1 ; for ( String numberString : numberStringAux . split ( "[,;]" ) ) numbers [ Integer . valueOf ( numberString ) - 1 ] = i ++ ; |
public class FaceListsImpl { /** * Add a face to a face list . The input face is specified as an image with a targetFace rectangle . It returns a persistedFaceId representing the added face , and persistedFaceId will not expire .
* @ param faceListId Id referencing a particular face list .
* @ param image An image ... | if ( this . client . azureRegion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.azureRegion() is required and cannot be null." ) ; } if ( faceListId == null ) { throw new IllegalArgumentException ( "Parameter faceListId is required and cannot be null." ) ; } if ( image == null ) { throw new... |
public class JKCompileUtil { /** * Compile java class .
* @ param sourceCode the source code
* @ throws IOException */
public static boolean compileJavaClass ( String sourceCode ) { } } | try { String fileName = getClassName ( sourceCode ) . concat ( ".java" ) ; logger . info ( "Compiling Java Class ({})" , fileName ) ; File rootDir = JKIOUtil . createTempDirectory ( ) ; String packageDir = getPackageDir ( sourceCode ) ; File sourceFile ; if ( packageDir != null ) { File file = new File ( rootDir , pack... |
public class BuiltinIntentMetadataMarshaller { /** * Marshall the given parameter object . */
public void marshall ( BuiltinIntentMetadata builtinIntentMetadata , ProtocolMarshaller protocolMarshaller ) { } } | if ( builtinIntentMetadata == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( builtinIntentMetadata . getSignature ( ) , SIGNATURE_BINDING ) ; protocolMarshaller . marshall ( builtinIntentMetadata . getSupportedLocales ( ) , SUPPORTEDLOCALES... |
public class LocalQueue { /** * ( non - Javadoc )
* @ see net . timewalker . ffmq4 . local . destination . LocalDestinationMBean # resetStats ( ) */
@ Override public void resetStats ( ) { } } | super . resetStats ( ) ; sentToQueueCount . set ( 0 ) ; receivedFromQueueCount . set ( 0 ) ; acknowledgedGetCount . set ( 0 ) ; rollbackedGetCount . set ( 0 ) ; expiredCount . set ( 0 ) ; |
public class QueryLexer { /** * $ ANTLR start " T _ _ 36" */
public final void mT__36 ( ) throws RecognitionException { } } | try { int _type = T__36 ; int _channel = DEFAULT_TOKEN_CHANNEL ; // src / riemann / Query . g : 28:7 : ( ' metric ' )
// src / riemann / Query . g : 28:9 : ' metric '
{ match ( "metric" ) ; } state . type = _type ; state . channel = _channel ; } finally { } |
public class Element { /** * Executes JavaScript code on the current element in the current frame or
* window .
* @ param javascript
* the javascript code to be executed */
@ Override public void eval ( String javascript ) throws WidgetException { } } | WebElement element = findElement ( false ) ; WebDriver wd = getGUIDriver ( ) . getWrappedDriver ( ) ; try { ( ( JavascriptExecutor ) wd ) . executeScript ( javascript , element ) ; } catch ( Exception e ) { long time = System . currentTimeMillis ( ) + 2000 ; boolean success = false ; while ( ! success && System . curre... |
public class AWSSimpleSystemsManagementClient { /** * Use this API action to view all executions for a specific association ID .
* @ param describeAssociationExecutionsRequest
* @ return Result of the DescribeAssociationExecutions operation returned by the service .
* @ throws InternalServerErrorException
* An ... | request = beforeClientExecution ( request ) ; return executeDescribeAssociationExecutions ( request ) ; |
public class HadoopInputs { /** * Creates a Flink { @ link InputFormat } that wraps the given Hadoop { @ link org . apache . hadoop . mapred . InputFormat } .
* @ return A Flink InputFormat that wraps the Hadoop InputFormat . */
public static < K , V > HadoopInputFormat < K , V > createHadoopInput ( org . apache . ha... | return new HadoopInputFormat < > ( mapredInputFormat , key , value , job ) ; |
public class StreamsUtils { /** * < p > Generates a stream identical to the provided stream until the interruptor predicate is false for one element .
* At that time , the returned stream stops . < / p >
* < p > A < code > NullPointerException < / code > will be thrown if the provided stream of the interruptor pred... | Objects . requireNonNull ( stream ) ; Objects . requireNonNull ( interruptor ) ; InterruptingSpliterator < E > spliterator = InterruptingSpliterator . of ( stream . spliterator ( ) , interruptor ) ; return StreamSupport . stream ( spliterator , stream . isParallel ( ) ) . onClose ( stream :: close ) ; |
public class SourceCode { /** * Gibt zurueck ob ein Wert folgt und vor und hinterher Leerzeichen folgen .
* @ param before Definition der Leerzeichen vorher .
* @ param val Gefolgter Wert der erartet wird .
* @ param after Definition der Leerzeichen nach dem Wert .
* @ return Gibt zurueck ob der Zeiger vorwaert... | int start = pos ; // space before
if ( before == AT_LEAST_ONE_SPACE ) { if ( ! removeSpace ( ) ) return false ; } else removeSpace ( ) ; // value
if ( ! forwardIfCurrent ( val ) ) { setPos ( start ) ; return false ; } // space after
if ( after == AT_LEAST_ONE_SPACE ) { if ( ! removeSpace ( ) ) { setPos ( start ) ; retu... |
public class ClassUtils { /** * < p > Gets the class name minus the package name from a { @ code Class } . < / p >
* < p > Consider using the Java 5 API { @ link Class # getSimpleName ( ) } instead .
* The one known difference is that this code will return { @ code " Map . Entry " } while
* the { @ code java . la... | if ( cls == null ) { return StringUtils . EMPTY ; } return getShortClassName ( cls . getName ( ) ) ; |
public class DescribeNatGatewaysRequest { /** * One or more NAT gateway IDs .
* @ return One or more NAT gateway IDs . */
public java . util . List < String > getNatGatewayIds ( ) { } } | if ( natGatewayIds == null ) { natGatewayIds = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return natGatewayIds ; |
public class CmsResourceTypeStatResultList { /** * Sets the layout . < p >
* @ param layout to display the result in
* @ param addAll indicates if the whole list should be added or just the last item */
public void setVerticalLayout ( VerticalLayout layout , boolean addAll ) { } } | if ( m_results . size ( ) > 0 ) { if ( addAll ) { for ( CmsResourceTypeStatResult result : m_results ) { layout . addComponent ( getLayoutFromResult ( result ) , 0 ) ; } } else { CmsResourceTypeStatResult statResult = m_results . get ( m_results . size ( ) - 1 ) ; if ( m_updated ) { removeRow ( layout , statResult ) ; ... |
public class SerTypeMapper { /** * Encodes a basic class .
* This handles known simple types , like String , Integer or File , and prefixing .
* It also allows a map of message specific shorter forms .
* @ param cls the class to encode , not null
* @ param settings the settings object , not null
* @ param bas... | // basic type
String result = BASIC_TYPES . get ( cls ) ; if ( result != null ) { return result ; } // handle enum subclasses
Class < ? > supr1 = cls . getSuperclass ( ) ; if ( supr1 != null ) { Class < ? > supr2 = supr1 . getSuperclass ( ) ; if ( supr2 == Enum . class ) { cls = supr1 ; } } // calculate
if ( settings .... |
public class StopDataCollectionByAgentIdsResult { /** * Information about the agents or connector that were instructed to stop collecting data . Information includes the
* agent / connector ID , a description of the operation performed , and whether the agent / connector configuration was
* updated .
* < b > NOTE... | if ( this . agentsConfigurationStatus == null ) { setAgentsConfigurationStatus ( new java . util . ArrayList < AgentConfigurationStatus > ( agentsConfigurationStatus . length ) ) ; } for ( AgentConfigurationStatus ele : agentsConfigurationStatus ) { this . agentsConfigurationStatus . add ( ele ) ; } return this ; |
public class Vector2d { /** * Read this vector from the supplied { @ link DoubleBuffer } starting at the specified
* absolute buffer position / index .
* This method will not increment the position of the given DoubleBuffer .
* @ param index
* the absolute position into the DoubleBuffer
* @ param buffer
* v... | MemUtil . INSTANCE . get ( this , index , buffer ) ; return this ; |
public class PrcCheckOut { /** * < p > It makes order line . < / p >
* @ param pRqVs Request scoped Vars
* @ param pOrders Orders
* @ param pItPl item place
* @ param pCartLn Cart Line
* @ param pTs trading settings
* @ throws Exception an Exception */
public final void makeOrdLn ( final Map < String , Obje... | CustOrder cuOr = null ; boolean isNdOrInit = true ; for ( CustOrder co : pOrders ) { if ( co . getCurr ( ) != null ) { cuOr = co ; isNdOrInit = false ; break ; } } if ( cuOr == null ) { cuOr = new CustOrder ( ) ; cuOr . setIsNew ( true ) ; cuOr . setTaxes ( new ArrayList < CustOrderTxLn > ( ) ) ; cuOr . setGoods ( new ... |
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertIOBObjTypeToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class Goro { /** * Creates a Goro implementation that binds to { @ link com . stanfy . enroscar . goro . GoroService }
* in order to run scheduled tasks in service context .
* This method is functionally identical to
* < pre >
* BoundGoro goro = Goro . bindWith ( context , new BoundGoro . OnUnexpectedDis... | if ( context == null ) { throw new IllegalArgumentException ( "Context cannot be null" ) ; } return new BoundGoroImpl ( context , null ) ; |
public class ScenarioImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EList < ElementParameters > getElementParameters ( ) { } } | if ( elementParameters == null ) { elementParameters = new EObjectContainmentEList < ElementParameters > ( ElementParameters . class , this , BpsimPackage . SCENARIO__ELEMENT_PARAMETERS ) ; } return elementParameters ; |
public class AbstractResourceAdapterDeployer { /** * print Failures into Log files .
* @ param validator validator validator validator instance used to run validation rules
* @ param failures failures failures the list of Failures to be printed
* @ param fhInput fhInput fhInput optional parameter . Normally used ... | String errorText = "" ; FailureHelper fh = null ; if ( fhInput . length == 0 ) fh = new FailureHelper ( failures ) ; else fh = fhInput [ 0 ] ; if ( failures != null && failures . size ( ) > 0 ) { errorText = fh . asText ( validator . getResourceBundle ( ) ) ; } return errorText ; |
public class AntlrCodeQualityHelper { /** * Remove duplicate bitset declarations to reduce the size of the static initializer but keep the bitsets
* that match the given pattern with a normalized name . */
public String removeDuplicateBitsets ( String javaContent , AntlrOptions options ) { } } | if ( ! options . isOptimizeCodeQuality ( ) ) { return javaContent ; } return removeDuplicateFields ( javaContent , followsetPattern , 1 , 2 , "\\bFOLLOW_\\w+\\b" , "FOLLOW_%d" , options . getKeptBitSetsPattern ( ) , options . getKeptBitSetName ( ) ) ; |
public class VoiceApi { /** * Place a call on hold
* Place the specified call on hold .
* @ param id The connection ID of the call . ( required )
* @ param holdData Request parameters . ( optional )
* @ return ApiResponse & lt ; ApiSuccessResponse & gt ;
* @ throws ApiException If fail to call the API , e . g... | com . squareup . okhttp . Call call = holdValidateBeforeCall ( id , holdData , null , null ) ; Type localVarReturnType = new TypeToken < ApiSuccessResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class SuppressionInfo { /** * Returns true if this checker should be considered suppressed given the signals present in this
* object .
* @ param suppressible Holds information about the suppressibilty of a checker
* @ param suppressedInGeneratedCode true if this checker instance should be considered suppr... | if ( inGeneratedCode && suppressedInGeneratedCode ) { return SuppressedState . SUPPRESSED ; } if ( suppressible . supportsSuppressWarnings ( ) && ! Collections . disjoint ( suppressible . allNames ( ) , suppressWarningsStrings ) ) { return SuppressedState . SUPPRESSED ; } if ( ! Collections . disjoint ( suppressible . ... |
public class SpanOfWeekdays { /** * / * [ deutsch ]
* < p > Erzeugt eine neue Spanne von Wochentagen . < / p >
* < p > Es ist m & ouml ; glich , denselben Wochentag f & uuml ; r Start und Ende zu w & auml ; hlen . In diesem
* Fall besteht die Spanne aus genau einem Wochentag . < / p >
* @ param start the starti... | if ( start == null || end == null ) { throw new NullPointerException ( "Missing day of week." ) ; } return new SpanOfWeekdays ( start , end ) ; |
public class MPDAdmin { /** * Sends the appropriate { @ link org . bff . javampd . playlist . PlaylistChangeEvent } to all registered
* { @ link org . bff . javampd . playlist . PlaylistChangeListener } .
* @ param event the event id to send */
protected synchronized void fireOutputChangeEvent ( OUTPUT_EVENT event ... | OutputChangeEvent oce = new OutputChangeEvent ( this , event ) ; for ( OutputChangeListener pcl : outputListeners ) { pcl . outputChanged ( oce ) ; } |
public class ServiceGraphModule { /** * Creates a service graph with default configuration , which is able to
* handle { @ code Service , BlockingService , Closeable , ExecutorService ,
* Timer , DataSource , EventloopService , EventloopServer } and
* { @ code Eventloop } as services .
* @ return default servic... | return newInstance ( ) . register ( Service . class , forService ( ) ) . register ( BlockingService . class , forBlockingService ( ) ) . register ( BlockingSocketServer . class , forBlockingSocketServer ( ) ) . register ( Closeable . class , forCloseable ( ) ) . register ( ExecutorService . class , forExecutorService (... |
public class LoggingScopeImpl { /** * Log message .
* @ param message */
private void log ( final String message ) { } } | if ( this . optionalParams . isPresent ( ) ) { logger . log ( logLevel , message , params ) ; } else { logger . log ( logLevel , message ) ; } |
public class AdapterUtil { /** * Display the javax . xa . XAResource start flag constant corresponding to the
* value supplied .
* @ param level a valid javax . xa . XAResource start flag constant .
* @ return the name of the constant , or a string indicating the constant is unknown . */
public static String getX... | switch ( flag ) { case XAResource . TMJOIN : return "TMJOIN (" + flag + ')' ; case XAResource . TMNOFLAGS : return "TMNOFLAGS (" + flag + ')' ; case XAResource . TMRESUME : return "TMRESUME (" + flag + ')' ; } return "UNKNOWN XA RESOURCE START FLAG (" + flag + ')' ; |
public class PathTrie { /** * add a path to the path trie
* @ param path */
public void addPath ( String path ) { } } | if ( path == null ) { return ; } String [ ] pathComponents = path . split ( "/" ) ; TrieNode parent = rootNode ; String part = null ; if ( pathComponents . length <= 1 ) { throw new IllegalArgumentException ( "Invalid path " + path ) ; } for ( int i = 1 ; i < pathComponents . length ; i ++ ) { part = pathComponents [ i... |
public class MessagePack { /** * Creates an unpacker that deserializes objects from subarray of a specified byte array .
* This method provides an optimized implementation of < code > newDefaultUnpacker ( new ByteArrayInputStream ( contents , offset , length ) ) < / code > .
* This method is equivalent to < code > ... | return DEFAULT_UNPACKER_CONFIG . newUnpacker ( contents , offset , length ) ; |
public class SendAutomationSignalRequest { /** * The data sent with the signal . The data schema depends on the type of signal used in the request .
* @ return The data sent with the signal . The data schema depends on the type of signal used in the request . */
public java . util . Map < String , java . util . List ... | return payload ; |
public class Generic1AggPooledTopNScannerPrototype { /** * Any changes to this method should be coordinated with { @ link TopNUtils } , { @ link
* PooledTopNAlgorithm # computeSpecializedScanAndAggregateImplementations } and downstream methods .
* It should be checked with a tool like https : / / github . com / Ado... | long processedRows = 0 ; int positionToAllocate = 0 ; while ( ! cursor . isDoneOrInterrupted ( ) ) { final IndexedInts dimValues = dimensionSelector . getRow ( ) ; final int dimSize = dimValues . size ( ) ; for ( int i = 0 ; i < dimSize ; i ++ ) { int dimIndex = dimValues . get ( i ) ; int position = positions [ dimInd... |
public class ExtractorMojo { /** * Prepare and initialize necessary internal values before actually accessing Sonar - HLA . */
void prepare ( ) { } } | if ( getMeasures ( ) == null || getMeasures ( ) . isEmpty ( ) ) setMeasureObjects ( Arrays . asList ( HLAMeasure . values ( ) ) ) ; else setMeasureObjects ( HLAMeasure . convert ( getMeasures ( ) ) ) ; if ( getUserName ( ) != null && ! getUserName ( ) . isEmpty ( ) ) setExtractor ( SonarHLAFactory . getExtractor ( getH... |
public class FacesConfigMapEntriesTypeImpl { /** * If not already created , a new < code > map - entry < / code > element will be created and returned .
* Otherwise , the first existing < code > map - entry < / code > element will be returned .
* @ return the instance defined for the element < code > map - entry < ... | List < Node > nodeList = childNode . get ( "map-entry" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new FacesConfigMapEntryTypeImpl < FacesConfigMapEntriesType < T > > ( this , "map-entry" , childNode , nodeList . get ( 0 ) ) ; } return createMapEntry ( ) ; |
public class PropertyController { /** * Gets the list of properties for a given entity and for the current user .
* @ param entityType Entity type
* @ param id Entity ID
* @ return List of properties */
@ RequestMapping ( value = "{entityType}/{id}" , method = RequestMethod . GET ) public Resources < Resource < P... | ProjectEntity entity = getEntity ( entityType , id ) ; List < Property < ? > > properties = propertyService . getProperties ( entity ) ; List < Resource < Property < ? > > > resources = new ArrayList < > ( ) ; for ( Property < ? > property : properties ) { Resource < Property < ? > > resource = Resource . of ( property... |
public class FlowController { /** * Add a property - related message that will be shown with the Errors and Error tags .
* @ param propertyName the name of the property with which to associate this error .
* @ param messageKey the message - resources key for the message .
* @ param messageArgs zero or more argume... | InternalUtils . addActionError ( propertyName , new ActionMessage ( messageKey , messageArgs ) , getRequest ( ) ) ; |
public class MultiLayerNetwork { /** * Sets the input and labels and returns the F1 score for the prediction with respect to the true labels
* @ param data the data to score
* @ return the score for the given input , label pairs */
@ Override public double f1Score ( org . nd4j . linalg . dataset . api . DataSet dat... | return f1Score ( data . getFeatures ( ) , data . getLabels ( ) ) ; |
public class NumberExpression { /** * Create a { @ code this > = right } expression
* @ param < A >
* @ param right rhs of the comparison
* @ return { @ code this > = right }
* @ see java . lang . Comparable # compareTo ( Object ) */
public final < A extends Number & Comparable < ? > > BooleanExpression goe ( A... | return goe ( ConstantImpl . create ( cast ( right ) ) ) ; |
public class Mailer { /** * Validates an { @ link Email } instance . Validation fails if the subject is missing , content is missing , or no recipients are defined .
* @ param email The email that needs to be configured correctly .
* @ return Always < code > true < / code > ( throws a { @ link MailException } excep... | if ( email . getText ( ) == null && email . getTextHTML ( ) == null ) { throw new MailException ( MailException . MISSING_CONTENT ) ; } else if ( email . getSubject ( ) == null || email . getSubject ( ) . equals ( "" ) ) { throw new MailException ( MailException . MISSING_SUBJECT ) ; } else if ( email . getRecipients (... |
public class AbstractJdbcStoreConfigurationBuilder { /** * Use the specified { @ link ConnectionFactoryConfigurationBuilder } to configure connections to
* the database */
@ Override public < C extends ConnectionFactoryConfigurationBuilder < ? > > C connectionFactory ( C builder ) { } } | if ( connectionFactory != null ) { throw new IllegalStateException ( "A ConnectionFactory has already been configured for this store" ) ; } this . connectionFactory = ( ConnectionFactoryConfigurationBuilder < ConnectionFactoryConfiguration > ) builder ; return builder ; |
public class CacheableWorkspaceDataManager { /** * Unregister remote commands . */
private void unregisterRemoteCommands ( ) { } } | if ( rpcService != null ) { rpcService . unregisterCommand ( suspend ) ; rpcService . unregisterCommand ( resume ) ; rpcService . unregisterCommand ( requestForResponsibleForResuming ) ; } |
public class StringUtils { /** * Determines whether the String value contains any whitespace , guarding against null values .
* @ param value the String value being evaluated for whitespace containment .
* @ return a boolean value indicating whether the String value contains any whitespace .
* @ see # toCharArray... | for ( char chr : toCharArray ( value ) ) { if ( Character . isWhitespace ( chr ) ) { return true ; } } return false ; |
public class DomUtil { /** * Allows to apply a { @ link NodeListFilter } to a { @ link NodeList } . This allows to remove all elements from a node list which do not match the Filter .
* @ param nodeList the { @ link NodeList } to filter
* @ param filter the { @ link NodeListFilter } to apply to the { @ link NodeLis... | List < DomElement > filteredList = new ArrayList < DomElement > ( ) ; for ( int i = 0 ; i < nodeList . getLength ( ) ; i ++ ) { Node node = nodeList . item ( i ) ; if ( filter . matches ( node ) ) { filteredList . add ( new DomElementImpl ( ( Element ) node ) ) ; } } return filteredList ; |
public class WebSocketChunkedInput { /** * Fetches a chunked data from the stream . Once this method returns the last chunk
* and thus the stream has reached at its end , any subsequent { @ link # isEndOfInput ( ) }
* call must return { @ code true } .
* @ param allocator { @ link ByteBufAllocator }
* @ return ... | ByteBuf buf = input . readChunk ( allocator ) ; if ( buf == null ) { return null ; } return new ContinuationWebSocketFrame ( input . isEndOfInput ( ) , rsv , buf ) ; |
public class SharedInformerFactory { /** * Start all registered informers . */
public synchronized void startAllRegisteredInformers ( ) { } } | if ( Collections . isEmptyMap ( informers ) ) { return ; } informers . forEach ( ( informerType , informer ) -> { if ( ! startedInformers . containsKey ( informerType ) ) { startedInformers . put ( informerType , informerExecutor . submit ( informer :: run ) ) ; } } ) ; |
public class Tuple10 { /** * Skip 4 degrees from this tuple . */
public final Tuple6 < T5 , T6 , T7 , T8 , T9 , T10 > skip4 ( ) { } } | return new Tuple6 < > ( v5 , v6 , v7 , v8 , v9 , v10 ) ; |
public class OrcFile { /** * Create an ORC file reader .
* @ param fs file system
* @ param path file name to read from
* @ return a new ORC file reader .
* @ throws IOException */
public static Reader createReader ( FileSystem fs , Path path , Configuration conf ) throws IOException { } } | return new ReaderImpl ( fs , path , conf ) ; |
public class SerializedFormBuilder { /** * Build the information for the method .
* @ param node the XML element that specifies which components to document
* @ param methodsContentTree content tree to which the documentation will be added
* @ throws DocletException if there is a problem while building the docume... | if ( configuration . nocomment ) { return ; } buildChildren ( node , methodsContentTree ) ; |
public class Discovery { /** * Add query to training data .
* Adds a query to the training data for this collection . The query can contain a filter and natural language query .
* @ param addTrainingDataOptions the { @ link AddTrainingDataOptions } containing the options for the call
* @ return a { @ link Service... | Validator . notNull ( addTrainingDataOptions , "addTrainingDataOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "collections" , "training_data" } ; String [ ] pathParameters = { addTrainingDataOptions . environmentId ( ) , addTrainingDataOptions . collectionId ( ) } ; RequestBuilder builder =... |
public class DisconnectCustomKeyStoreRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DisconnectCustomKeyStoreRequest disconnectCustomKeyStoreRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( disconnectCustomKeyStoreRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( disconnectCustomKeyStoreRequest . getCustomKeyStoreId ( ) , CUSTOMKEYSTOREID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable... |
public class RandomNumberUtils { /** * Returns a random int that is less than the given int .
* @ param maxExclusive the value that returned int must be less than
* @ return the random int
* @ throws IllegalArgumentException if maxExclusive is less than or equal to { @ link
* Integer # MIN _ VALUE } */
public s... | checkArgument ( maxExclusive > Integer . MIN_VALUE , "Cannot produce int less than %s" , Integer . MIN_VALUE ) ; return randomInt ( Integer . MIN_VALUE , maxExclusive ) ; |
public class nsacl6 { /** * Use this API to disable nsacl6. */
public static base_response disable ( nitro_service client , nsacl6 resource ) throws Exception { } } | nsacl6 disableresource = new nsacl6 ( ) ; disableresource . acl6name = resource . acl6name ; return disableresource . perform_operation ( client , "disable" ) ; |
public class AmazonRoute53ResolverClient { /** * For DNS queries that originate in your VPCs , specifies which resolver endpoint the queries pass through , one
* domain name that you want to forward to your network , and the IP addresses of the DNS resolvers in your network .
* @ param createResolverRuleRequest
*... | request = beforeClientExecution ( request ) ; return executeCreateResolverRule ( request ) ; |
public class CmsXmlInheritGroupContainerHandler { /** * Returns the elements of the given inheritance group for the request context URI . < p >
* @ param cms the current cms context
* @ param resource the inheritance group resource
* @ return the elements */
public static List < CmsContainerElementBean > loadInhe... | CmsInheritanceReferenceParser parser = new CmsInheritanceReferenceParser ( cms ) ; try { parser . parse ( resource ) ; CmsInheritanceReference ref = parser . getReference ( cms . getRequestContext ( ) . getLocale ( ) ) ; if ( ref != null ) { String name = ref . getName ( ) ; CmsADEManager adeManager = OpenCms . getADEM... |
public class PBufferGraphics { /** * Initialise the PBuffer that will be used to render to
* @ throws SlickException */
private void init ( ) throws SlickException { } } | try { Texture tex = InternalTextureLoader . get ( ) . createTexture ( image . getWidth ( ) , image . getHeight ( ) , image . getFilter ( ) ) ; final RenderTexture rt = new RenderTexture ( false , true , false , false , RenderTexture . RENDER_TEXTURE_2D , 0 ) ; pbuffer = new Pbuffer ( screenWidth , screenHeight , new Pi... |
public class SeaGlassTextFieldUI { /** * DOCUMENT ME !
* @ return DOCUMENT ME ! */
protected Rectangle getCancelButtonBounds ( ) { } } | JTextComponent c = getComponent ( ) ; final int x = c . getWidth ( ) - c . getHeight ( ) / 2 - 9 ; final int y = c . getHeight ( ) / 2 - 8 ; return new Rectangle ( x , y , 17 , 17 ) ; |
public class CleanableHiveDataset { /** * Drops the partitions selected by { @ link # hiveSelectionPolicy } . Also deletes the data associated with it .
* If an { @ link Exception } occurs while processing a { @ link Partition } , other { @ link Partition } s will still be deleted .
* However , a { @ link RuntimeEx... | List versions = Lists . newArrayList ( this . hiveDatasetVersionFinder . findDatasetVersions ( this ) ) ; if ( versions . isEmpty ( ) ) { log . warn ( String . format ( "No dataset version can be found. Ignoring %s" , this . getTable ( ) . getCompleteName ( ) ) ) ; return ; } Collections . sort ( versions , Collections... |
public class APSPSolver { /** * Remove a constraint ( SimpleDistanceConstraint ) */
@ Override protected void removeConstraintsSub ( Constraint [ ] con ) { } } | logger . finest ( "Trying to remove constraints " + Arrays . toString ( con ) + "..." ) ; if ( con != null && con . length != 0 ) { Bounds [ ] tot = new Bounds [ con . length ] ; int [ ] from = new int [ con . length ] ; int [ ] to = new int [ con . length ] ; for ( int i = 0 ; i < con . length ; i ++ ) { if ( con [ i ... |
public class ModelDef { /** * Checks constraints on this model .
* @ param checkLevel The amount of checks to perform
* @ throws ConstraintException If a constraint has been violated */
public void checkConstraints ( String checkLevel ) throws ConstraintException { } } | // check constraints now after all classes have been processed
for ( Iterator it = getClasses ( ) ; it . hasNext ( ) ; ) { ( ( ClassDescriptorDef ) it . next ( ) ) . checkConstraints ( checkLevel ) ; } // additional model constraints that either deal with bigger parts of the model or
// can only be checked after the in... |
public class LoggingConfigUtils { /** * Find , create , and validate the log directory .
* @ param newValue
* New parameter value to parse / evaluate
* @ param defaultValue
* Starting / Previous log directory - - this value might * also * be null .
* @ return defaultValue if the newValue is null or is was bad... | File newDirectory = defaultDirectory ; // If a value was specified , try creating a file with it
if ( newValue != null && newValue instanceof String ) { newDirectory = new File ( ( String ) newValue ) ; } if ( newDirectory == null ) { String value = "." ; try { value = AccessController . doPrivileged ( new java . secur... |
public class MethodUtils { /** * < p > Given an arguments array passed to a varargs method , return an array of arguments in the canonical form ,
* i . e . an array with the declared number of parameters , and whose last parameter is an array of the varargs type .
* @ param args the array of arguments passed to the... | if ( args . length == methodParameterTypes . length && args [ args . length - 1 ] . getClass ( ) . equals ( methodParameterTypes [ methodParameterTypes . length - 1 ] ) ) { // The args array is already in the canonical form for the method .
return args ; } // Construct a new array matching the method ' s declared param... |
public class LinearClassifier { /** * Print all features active for a particular datum and the weight that
* the classifier assigns to each class for those features . */
public void justificationOf ( Datum < L , F > example , PrintWriter pw ) { } } | justificationOf ( example , pw , null ) ; |
public class InProcessVoltDBServer { /** * Create and connect a client to the in - process VoltDB server .
* Note , client will be automatically closed when the in - process server
* is shut down .
* Must be called after { @ link # start ( ) } .
* @ return Connected client .
* @ throws Exception on failure to... | ClientConfig config = new ClientConfig ( ) ; // turn off the timeout for debugging
config . setProcedureCallTimeout ( 0 ) ; Client client = ClientFactory . createClient ( config ) ; // track this client so it can be closed at shutdown
trackedClients . add ( client ) ; client . createConnection ( "localhost" ) ; return ... |
public class CPInstancePersistenceImpl { /** * Returns the cp instance where uuid = & # 63 ; and groupId = & # 63 ; or returns < code > null < / code > if it could not be found . Uses the finder cache .
* @ param uuid the uuid
* @ param groupId the group ID
* @ return the matching cp instance , or < code > null <... | return fetchByUUID_G ( uuid , groupId , true ) ; |
public class Groups { /** * Groups elements from an iterator in the key evaluated from the passed
* function . E . g :
* < code > groupBy ( [ 1 , 2 , 3 , 1 ] , id ) - > { 1 : [ 1,1 ] , 2 : [ 2 ] , 3 : [ 3 ] } < / code >
* @ param < K > the grouped key type
* @ param < V > the grouped value type
* @ param < C ... | return new GroupBy < > ( grouper , collectionProvider , new HashMapFactory < > ( ) ) . apply ( groupies ) ; |
public class FilePickerFragment { /** * Request permission to write to the SD - card . */
@ Override protected void handlePermission ( @ NonNull File path ) { } } | // Should we show an explanation ?
// if ( shouldShowRequestPermissionRationale (
// Manifest . permission . WRITE _ EXTERNAL _ STORAGE ) ) {
// Explain to the user why we need permission
mRequestedPath = path ; requestPermissions ( new String [ ] { Manifest . permission . WRITE_EXTERNAL_STORAGE } , PERMISSIONS_REQUEST... |
public class LocalisationManager { /** * Method getTRMFacade
* @ return _ _ trmFacade */
public TRMFacade getTRMFacade ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTRMFacade" , this ) ; // Instantiate DA manager to interface to WLM
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getTRMFacade" , _trmFacade ) ; return _trmFacade ; |
public class Handler { /** * Compares the host components of two URLs .
* @ param u1 the URL of the first host to compare
* @ param u2 the URL of the second host to compare
* @ return < tt > true < / tt > if and only if they
* are equal , < tt > false < / tt > otherwise . */
protected boolean hostsEqual ( URL u... | /* * Special case for file : URLs
* per RFC 1738 no hostname is equivalent to ' localhost '
* i . e . file : / / / path is equal to file : / / localhost / path */
String s1 = u1 . getHost ( ) ; String s2 = u2 . getHost ( ) ; if ( "localhost" . equalsIgnoreCase ( s1 ) && ( s2 == null || "" . equals ( s2 ) ) ) return... |
public class SessionManager { /** * Binds the specified Session object into this SessionManager ' s active
* Session registry . This method is typically called internally as
* the final step , when a successful connection has been made .
* @ param db the database to which the new Session is initially connected
... | Session s = new Session ( db , user , ! forLog , ! forLog , readonly , sessionIdCount , timeZoneSeconds ) ; s . isProcessingLog = forLog ; sessionMap . put ( sessionIdCount , s ) ; sessionIdCount ++ ; return s ; |
public class FragmentMvpViewStateDelegateImpl { /** * Creates the presenter instance if not able to reuse presenter from PresenterManager */
private P restorePresenterOrRecreateNewPresenterAfterProcessDeath ( ) { } } | P presenter ; if ( keepPresenterInstanceDuringScreenOrientationChanges ) { if ( mosbyViewId != null && ( presenter = PresenterManager . getPresenter ( getActivity ( ) , mosbyViewId ) ) != null ) { // Presenter restored from cache
if ( DEBUG ) { Log . d ( DEBUG_TAG , "Reused presenter " + presenter + " for view " + dele... |
public class Jwts { /** * Returns a new { @ link Claims } instance populated with the specified name / value pairs .
* @ param claims the name / value pairs to populate the new Claims instance .
* @ return a new { @ link Claims } instance populated with the specified name / value pairs . */
public static Claims cla... | return Classes . newInstance ( "io.jsonwebtoken.impl.DefaultClaims" , MAP_ARG , claims ) ; |
public class Completable { /** * Returns a Completable that first runs this Completable
* and then the other completable .
* < img width = " 640 " height = " 437 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / Completable . andThen . c . png " alt = " " >
* This is... | return concatWith ( next ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.