signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Es6ExtractClasses { /** * Add at - constructor to the JSDoc of the given node .
* @ param node */
private void addAtConstructor ( Node node ) { } } | JSDocInfoBuilder builder = JSDocInfoBuilder . maybeCopyFrom ( node . getJSDocInfo ( ) ) ; builder . recordConstructor ( ) ; node . setJSDocInfo ( builder . build ( ) ) ; |
public class PrimaryBackupServerContext { /** * Returns the service context for the given request . */
private CompletableFuture < PrimaryBackupServiceContext > getService ( PrimitiveRequest request ) { } } | return services . computeIfAbsent ( request . primitive ( ) . name ( ) , n -> { PrimitiveType primitiveType = primitiveTypes . getPrimitiveType ( request . primitive ( ) . type ( ) ) ; PrimaryBackupServiceContext service = new PrimaryBackupServiceContext ( serverName , PrimitiveId . from ( request . primitive ( ) . nam... |
public class TreeTaggerWrapper { /** * tokenizes a given JCas object ' s document text using the chinese tokenization
* script and adds the recognized tokens to the JCas object .
* @ param jcas JCas object supplied by the pipeline */
private void tokenizeChinese ( JCas jcas ) { } } | try { // read tokenized text to add tokens to the jcas
Process proc = ttprops . getChineseTokenizationProcess ( ) ; Logger . printDetail ( component , "Chinese tokenization: " + ttprops . chineseTokenizerPath ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( proc . getInputStream ( ) , "UTF-8" ) ) ; ... |
public class ChannelUtils { /** * Define a new endpoint definition using the input name and list of
* properties .
* @ param name
* @ param config
* @ return EndPointInfo
* @ throws IllegalArgumentException if input values are incorrect */
private static EndPointInfo defineEndPoint ( EndPointMgr epm , String ... | String host = null ; String port = null ; for ( int i = 0 ; i < config . length ; i ++ ) { String key = ChannelUtils . extractKey ( config [ i ] ) ; if ( "host" . equalsIgnoreCase ( key ) ) { host = ChannelUtils . extractValue ( config [ i ] ) ; } else if ( "port" . equalsIgnoreCase ( key ) ) { port = ChannelUtils . ex... |
public class JsonConfig { /** * Removes a JsonValueProcessor . < br >
* [ Java - & gt ; JSON ]
* @ param beanClass the class to which the property may belong
* @ param propertyType the type of the property */
public void unregisterJsonValueProcessor ( Class beanClass , Class propertyType ) { } } | if ( beanClass != null && propertyType != null ) { beanTypeMap . remove ( beanClass , propertyType ) ; } |
public class MainFrame { /** * GEN - LAST : event _ btExitActionPerformed */
private void btLaunchMouseEntered ( java . awt . event . MouseEvent evt ) // GEN - FIRST : event _ btLaunchMouseEntered
{ } } | // GEN - HEADEREND : event _ btLaunchMouseEntered
this . setCursor ( new Cursor ( Cursor . HAND_CURSOR ) ) ; |
public class ProductPartitionNode { /** * Puts the specified key / value pair in the map of custom parameters .
* @ throws IllegalStateException if this node is not a biddable UNIT node */
public ProductPartitionNode putCustomParameter ( String key , String value ) { } } | if ( ! nodeState . supportsCustomParameters ( ) ) { throw new IllegalStateException ( String . format ( "Cannot set custom parameters on a %s node" , nodeState . getNodeType ( ) ) ) ; } this . nodeState . getCustomParams ( ) . put ( key , value ) ; return this ; |
public class SeleniumSpec { /** * Searchs for two webelements dragging the first one to the second
* @ param source
* @ param destination
* @ throws IllegalAccessException
* @ throws IllegalArgumentException
* @ throws SecurityException
* @ throws NoSuchFieldException
* @ throws ClassNotFoundException */
... | Actions builder = new Actions ( commonspec . getDriver ( ) ) ; List < WebElement > sourceElement = commonspec . locateElement ( smethod , source , 1 ) ; List < WebElement > destinationElement = commonspec . locateElement ( dmethod , destination , 1 ) ; builder . dragAndDrop ( sourceElement . get ( 0 ) , destinationElem... |
public class DependencyResolver { /** * Configures the component with specified parameters .
* @ param config configuration parameters to set .
* @ throws ConfigException when configuration is wrong .
* @ see ConfigParams */
@ Override public void configure ( ConfigParams config ) throws ConfigException { } } | ConfigParams dependencies = config . getSection ( "dependencies" ) ; for ( String name : dependencies . keySet ( ) ) { String locator = dependencies . get ( name ) ; if ( locator == null ) continue ; try { Descriptor descriptor = Descriptor . fromString ( locator ) ; if ( descriptor != null ) _dependencies . put ( name... |
public class ListRestoreJobsResult { /** * An array of objects that contain detailed information about jobs to restore saved resources .
* @ param restoreJobs
* An array of objects that contain detailed information about jobs to restore saved resources . */
public void setRestoreJobs ( java . util . Collection < Re... | if ( restoreJobs == null ) { this . restoreJobs = null ; return ; } this . restoreJobs = new java . util . ArrayList < RestoreJobsListMember > ( restoreJobs ) ; |
public class KXmlParser { /** * Read an element declaration . This contains a name and a content spec .
* < ! ELEMENT foo EMPTY >
* < ! ELEMENT foo ( bar ? , ( baz | quux ) ) >
* < ! ELEMENT foo ( # PCDATA | bar ) * > */
private void readElementDeclaration ( ) throws IOException , XmlPullParserException { } } | read ( START_ELEMENT ) ; skip ( ) ; readName ( ) ; readContentSpec ( ) ; skip ( ) ; read ( '>' ) ; |
public class SpiExample { /** * Read data via SPI bus from MCP3002 chip .
* @ throws IOException */
public static void read ( ) throws IOException , InterruptedException { } } | for ( short channel = 0 ; channel < ADC_CHANNEL_COUNT ; channel ++ ) { int conversion_value = getConversionValue ( channel ) ; console . print ( String . format ( " | %04d" , conversion_value ) ) ; // print 4 digits with leading zeros
} console . print ( " |\r" ) ; Thread . sleep ( 250 ) ; |
public class AbstractSEPAGV { /** * This is needed for verifyConstraints ( ) . Because verifyConstraints ( ) tries
* to read the lowlevel - values for each constraint , the lowlevel - values for
* sepa . xxx would always be empty ( because they do not exist in hbci
* messages ) . So we read the sepa lowlevel - va... | String result ; String intern = getName ( ) + ".sepa." ; if ( key . startsWith ( intern ) ) { String realKey = key . substring ( intern . length ( ) ) ; result = getPainParam ( realKey ) ; } else { result = super . getLowlevelParam ( key ) ; } return result ; |
public class ServiceSpecification { /** * Generates a new { @ link ServiceSpecification } from the specified { @ link ServiceInfo } s and
* the factory { @ link Function } that creates { @ link NamedTypeInfo } s for the enum , struct or exception types
* referred by the specified { @ link ServiceInfo } s . */
publi... | if ( Iterables . isEmpty ( services ) ) { return emptyServiceSpecification ; } // Collect all named types referred by the services .
final Set < TypeSignature > namedTypes = Streams . stream ( services ) . flatMap ( s -> s . findNamedTypes ( ) . stream ( ) ) . collect ( toImmutableSortedSet ( comparing ( TypeSignature ... |
public class ConcurrentLinkedList { /** * ( non - Javadoc )
* @ see ws . sib . objectManager . List # listIterator ( ) */
public ListIterator listIterator ( ) throws ObjectManagerException { } } | if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "listIterator" ) ; ListIterator listIterator = subList ( null , null ) . listIterator ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "listIterator" , new Ob... |
public class RtcpPacketFactory { /** * Builds a packet containing an RTCP Sender Report .
* @ param statistics
* The statistics of the RTP session
* @ return The RTCP packet */
private static RtcpSenderReport buildSenderReport ( RtpStatistics statistics , boolean padding ) { } } | /* * 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* header | V = 2 | P | RC | PT = SR = 200 | length |
* | SSRC of sender |
* sender | NTP timestamp , most significant word |
* info + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + -... |
public class HashCodeBuilder { /** * Uses reflection to build a valid hash code from the fields of { @ code object } .
* It uses < code > AccessibleObject . setAccessible < / code > to gain access to private fields . This means that it will
* throw a security exception if run under a security manager , if the permi... | return reflectionHashCode ( initialNonZeroOddNumber , multiplierNonZeroOddNumber , object , false , null ) ; |
public class JDBCStorableGenerator { /** * Generates code to call a PreparedStatement . setXxx ( int , Xxx ) method , with
* the value of the given property . Assumes that PreparedStatement and int
* index are on the stack .
* If the property is a Lob , then pass in the optional lobTooLargeVar to
* track if it ... | Class psClass = property . getPreparedStatementSetMethod ( ) . getParameterTypes ( ) [ 1 ] ; TypeDesc psType = TypeDesc . forClass ( psClass ) ; TypeDesc propertyType = TypeDesc . forClass ( property . getType ( ) ) ; StorablePropertyAdapter adapter = property . getAppliedAdapter ( ) ; if ( mode != INITIAL_VERSION ) { ... |
public class GroovyMain { /** * Parse the command line .
* @ param options the options parser .
* @ param args the command line args .
* @ return parsed command line .
* @ throws ParseException if there was a problem . */
private static CommandLine parseCommandLine ( Options options , String [ ] args ) throws P... | CommandLineParser parser = new GroovyInternalPosixParser ( ) ; return parser . parse ( options , args , true ) ; |
public class CoverageUtilities { /** * Transforms an array of values into a { @ link WritableRaster } .
* @ param array the values to transform .
* @ param divide the factor by which to divide the values .
* @ param width the width of the resulting image .
* @ param height the height of the resulting image .
... | WritableRaster writableRaster = createWritableRaster ( width , height , null , null , null ) ; int index = 0 ; ; for ( int x = 0 ; x < width ; x ++ ) { for ( int y = 0 ; y < height ; y ++ ) { writableRaster . setSample ( x , y , 0 , array [ index ++ ] ) ; } } return writableRaster ; |
public class physical_disk { /** * < pre >
* Performs generic data validation for the operation to be performed
* < / pre > */
protected void validate ( String operationType ) throws Exception { } } | super . validate ( operationType ) ; MPSString id_validator = new MPSString ( ) ; id_validator . validate ( operationType , id , "\"id\"" ) ; MPSInt adapter_id_validator = new MPSInt ( ) ; adapter_id_validator . validate ( operationType , adapter_id , "\"adapter_id\"" ) ; MPSInt enclosure_validator = new MPSInt ( ) ; e... |
public class MaterializedViewSupervisor { /** * Find intervals in which derived dataSource should rebuild the segments .
* Choose the latest intervals to create new HadoopIndexTask and submit it . */
@ VisibleForTesting void checkSegmentsAndSubmitTasks ( ) { } } | synchronized ( taskLock ) { List < Interval > intervalsToRemove = new ArrayList < > ( ) ; for ( Map . Entry < Interval , HadoopIndexTask > entry : runningTasks . entrySet ( ) ) { Optional < TaskStatus > taskStatus = taskStorage . getStatus ( entry . getValue ( ) . getId ( ) ) ; if ( ! taskStatus . isPresent ( ) || ! ta... |
public class GIMDImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eUnset ( int featureID ) { } } | switch ( featureID ) { case AfplibPackage . GIMD__DATA : setDATA ( DATA_EDEFAULT ) ; return ; } super . eUnset ( featureID ) ; |
public class SftpFileAttributes { /** * Set the UID of the owner .
* @ param uid */
public void setUID ( String uid ) { } } | if ( version > 3 ) { flags |= SSH_FILEXFER_ATTR_OWNERGROUP ; } else flags |= SSH_FILEXFER_ATTR_UIDGID ; this . uid = uid ; |
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link AbstractTimeReferenceSystemType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link AbstractTimeRefe... | return new JAXBElement < AbstractTimeReferenceSystemType > ( __TimeReferenceSystem_QNAME , AbstractTimeReferenceSystemType . class , null , value ) ; |
public class JSConsumerSet { /** * Determine the index of the getCursor to use based on the classification of a
* message .
* @ param msg
* @ return */
public int getGetCursorIndex ( SIMPMessage msg ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getGetCursorIndex" ) ; // The zeroth index is reserved for non - classified messages
int classPos = 0 ; synchronized ( classifications ) { if ( classifications . getNumberOfClasses ( ) > 0 ) { // Need to get the classificat... |
public class Sign1Message { /** * Validate the signature on the message using the passed in key .
* @ param cnKey key to use for validation
* @ return true if the signature validates
* @ throws CoseException Errors generated by the COSE module */
public boolean validate ( OneKey cnKey ) throws CoseException { } } | CBORObject obj = CBORObject . NewArray ( ) ; obj . Add ( contextString ) ; if ( objProtected . size ( ) > 0 ) obj . Add ( rgbProtected ) ; else obj . Add ( CBORObject . FromObject ( new byte [ 0 ] ) ) ; obj . Add ( externalData ) ; obj . Add ( rgbContent ) ; return validateSignature ( obj . EncodeToBytes ( ) , rgbSigna... |
public class AbstractManifestServlet { /** * Sub - classes can override this method to perform handle the inability to find a matching permutation . In which
* case the method should return true if the response has been handled . */
protected boolean handleUnmatchedRequest ( final HttpServletRequest request , final H... | return false ; |
public class HtmlSerialFieldWriter { /** * Add the tag information for this member .
* @ param field the field to document .
* @ param contentTree the tree to which the member tags info will be added */
public void addMemberTags ( FieldDoc field , Content contentTree ) { } } | Content tagContent = new ContentBuilder ( ) ; TagletWriter . genTagOuput ( configuration . tagletManager , field , configuration . tagletManager . getCustomTaglets ( field ) , writer . getTagletWriterInstance ( false ) , tagContent ) ; Content dlTags = new HtmlTree ( HtmlTag . DL ) ; dlTags . addContent ( tagContent ) ... |
public class NameSpaceBinderImpl { /** * Store the binding information for later use .
* @ see com . ibm . ws . ejbcontainer . runtime . NameSpaceBinder # createBindingObject ( com . ibm . ejs . container . HomeRecord , com . ibm . websphere . csi . HomeWrapperSet , java . lang . String , boolean ,
* boolean ) */
@... | return new EJBBinding ( hr , interfaceName , interfaceIndex , local ) ; |
public class DistributionPointFetcher { /** * Append relative name to the issuer name and return a new
* GeneralNames object . */
private static GeneralNames getFullNames ( X500Name issuer , RDN rdn ) throws IOException { } } | List < RDN > rdns = new ArrayList < > ( issuer . rdns ( ) ) ; rdns . add ( rdn ) ; X500Name fullName = new X500Name ( rdns . toArray ( new RDN [ 0 ] ) ) ; GeneralNames fullNames = new GeneralNames ( ) ; fullNames . add ( new GeneralName ( fullName ) ) ; return fullNames ; |
public class Form { /** * Render the end of this form .
* @ throws JspException if a JSP exception has occurred */
public int doEndTag ( ) throws JspException { } } | if ( hasErrors ( ) ) return reportAndExit ( EVAL_PAGE ) ; String idScript = null ; // Create an appropriate " form " element based on our parameters
HttpServletRequest request = ( HttpServletRequest ) pageContext . getRequest ( ) ; ServletContext servletContext = pageContext . getServletContext ( ) ; // if we have an I... |
public class FacesConfigTypeImpl { /** * If not already created , a new < code > lifecycle < / code > element will be created and returned .
* Otherwise , the first existing < code > lifecycle < / code > element will be returned .
* @ return the instance defined for the element < code > lifecycle < / code > */
publ... | List < Node > nodeList = childNode . get ( "lifecycle" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new FacesConfigLifecycleTypeImpl < FacesConfigType < T > > ( this , "lifecycle" , childNode , nodeList . get ( 0 ) ) ; } return createLifecycle ( ) ; |
public class GroovyScript2RestLoaderPlugin { /** * Get working repository name . Returns the repository name from configuration
* if it previously configured and returns the name of current repository in other case .
* @ return String
* repository name */
public String getRepository ( ) { } } | if ( repository == null ) { try { return repositoryService . getCurrentRepository ( ) . getConfiguration ( ) . getName ( ) ; } catch ( RepositoryException e ) { throw new RuntimeException ( "Can not get current repository and repository name was not configured" , e ) ; } } else { return repository ; } |
public class ImagePipeline { /** * Returns a DataSource supplier that will on get submit the request for execution and return a
* DataSource representing the pending results of the task .
* @ param imageRequest the request to submit ( what to execute ) .
* @ return a DataSource representing pending results and co... | return new Supplier < DataSource < CloseableReference < PooledByteBuffer > > > ( ) { @ Override public DataSource < CloseableReference < PooledByteBuffer > > get ( ) { return fetchEncodedImage ( imageRequest , callerContext ) ; } @ Override public String toString ( ) { return Objects . toStringHelper ( this ) . add ( "... |
public class ElementsExceptionsFactory { /** * Constructs and initializes a new { @ link DataAccessException } with the given { @ link Throwable cause }
* and { @ link String message } formatted with the given { @ link Object [ ] arguments } .
* @ param cause { @ link Throwable } identified as the reason this { @ l... | return new DataAccessException ( format ( message , args ) , cause ) ; |
public class OgmTableGenerator { /** * NOTE : Copied from TableGenerator
* Determine the table name to use for the generator values .
* Called during { @ link # configure configuration } .
* @ see # getTableName ( )
* @ param params The params supplied in the generator config ( plus some standard useful extras ... | String schemaName = params . getProperty ( PersistentIdentifierGenerator . SCHEMA ) ; if ( schemaName != null ) { log . schemaOptionNotSupportedForTableGenerator ( schemaName ) ; } String catalogName = params . getProperty ( PersistentIdentifierGenerator . CATALOG ) ; if ( catalogName != null ) { log . catalogOptionNot... |
public class IfcRegularTimeSeriesImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) @ Override public EList < IfcTimeSeriesValue > getValues ( ) { } } | return ( EList < IfcTimeSeriesValue > ) eGet ( Ifc4Package . Literals . IFC_REGULAR_TIME_SERIES__VALUES , true ) ; |
public class InjectorImpl { /** * Creates a new bean instance for a given InjectionPoint , such as a
* method or field . */
@ Override public < T > T instance ( InjectionPoint < T > ip ) { } } | Objects . requireNonNull ( ip ) ; Provider < T > provider = provider ( ip ) ; if ( provider != null ) { return provider . get ( ) ; } else { return null ; } |
public class FP64 { /** * Returns the value of this fingerprint as an unsigned integer encoded
* in base 16 ( hexideicmal ) , padded with leading zeros to a total length
* of 16 characters . < p >
* < b > Important : < / b > If the output of this function is subsequently
* fingerprinted , the probabilistic guar... | String res = Long . toHexString ( _fp ) ; int len = res . length ( ) ; if ( len < 16 ) { res = LEADING_ZEROS . substring ( len ) + res ; assert res . length ( ) == 16 ; } return res ; |
public class Redwood { /** * Hide multiple channels . All other channels will be shown .
* @ param channels The channels to hide */
public static void hideOnlyChannels ( Object ... channels ) { } } | for ( LogRecordHandler handler : handlers ) { if ( handler instanceof VisibilityHandler ) { VisibilityHandler visHandler = ( VisibilityHandler ) handler ; visHandler . showAll ( ) ; for ( Object channel : channels ) { visHandler . alsoHide ( channel ) ; } } } |
public class OStorageEmbedded { /** * Executes the command request and return the result back . */
public Object command ( final OCommandRequestText iCommand ) { } } | final OCommandExecutor executor = OCommandManager . instance ( ) . getExecutor ( iCommand ) ; executor . setProgressListener ( iCommand . getProgressListener ( ) ) ; executor . parse ( iCommand ) ; return executeCommand ( iCommand , executor ) ; |
public class MessageSetImpl { /** * Gets up to a given amount of messages in the given channel after a given message in any channel .
* @ param channel The channel of the messages .
* @ param limit The limit of messages to get .
* @ param after Get messages after the message with this id .
* @ return The messag... | return getMessages ( channel , limit , - 1 , after ) ; |
public class QueuedKeyedResourcePool { /** * Destroys all resource requests in requestQueue .
* @ param requestQueue The queue for which all resource requests are to be
* destroyed . */
private void destroyRequestQueue ( Queue < AsyncResourceRequest < V > > requestQueue ) { } } | if ( requestQueue != null ) { AsyncResourceRequest < V > resourceRequest = requestQueue . poll ( ) ; while ( resourceRequest != null ) { destroyRequest ( resourceRequest ) ; resourceRequest = requestQueue . poll ( ) ; } } |
public class SQLRebuilder { /** * Update the registry and deployment cache to reflect the latest state of
* reality .
* @ param obj
* DOReader of a service deployment object */
private synchronized void updateDeploymentMap ( DigitalObject obj , Connection c ) throws SQLException { } } | Set < RelationshipTuple > sDefs = obj . getRelationships ( Constants . MODEL . IS_DEPLOYMENT_OF , null ) ; Set < RelationshipTuple > models = obj . getRelationships ( Constants . MODEL . IS_CONTRACTOR_OF , null ) ; for ( RelationshipTuple sDefTuple : sDefs ) { String sDef = sDefTuple . getObjectPID ( ) ; for ( Relation... |
public class JoynrUtil { /** * If targetLocation does not exist , it will be created . */
public static void copyDirectory ( File sourceLocation , File targetLocation ) throws IOException { } } | if ( sourceLocation . isDirectory ( ) ) { if ( ! targetLocation . exists ( ) ) { if ( targetLocation . mkdir ( ) == false ) { logger . debug ( "Creating target directory " + targetLocation + " failed." ) ; } } String [ ] children = sourceLocation . list ( ) ; if ( children == null ) { return ; } for ( int i = 0 ; i < c... |
public class NamedResolverMap { /** * Return the integer value indicated by the given numeric key .
* @ param key The key of the value to return .
* @ param dfl The default value to return , if the key is absent .
* @ return The integer value stored under the given key , or dfl .
* @ throws IllegalArgumentExcep... | Any3 < Boolean , Integer , String > value = data . getOrDefault ( Any2 . < Integer , String > left ( key ) , Any3 . < Boolean , Integer , String > create2 ( dfl ) ) ; return value . get2 ( ) . orElseThrow ( ( ) -> new IllegalArgumentException ( "expected integer argument for param " + key ) ) ; |
public class BitSet { /** * flips a bit and returns the resulting bit value . The index should be less than the
* BitSet size .
* @ param index the index to flip
* @ return previous state of the index */
public boolean flipAndGet ( long index ) { } } | int wordNum = ( int ) ( index >> 6 ) ; // div 64
int bit = ( int ) index & 0x3f ; // mod 64
long bitmask = 1L << bit ; bits [ wordNum ] ^= bitmask ; return ( bits [ wordNum ] & bitmask ) != 0 ; |
public class BosClient { /** * Fetches a source object to a new destination in Bos .
* @ param bucketName The name of the bucket in which the new object will be created .
* @ param key The key in the destination bucket under which the new object will be created .
* @ param sourceUrl The url full path for fetching... | FetchObjectRequest request = new FetchObjectRequest ( bucketName , key , sourceUrl ) ; return this . fetchObject ( request ) ; |
public class BiInt2ObjectMap { /** * Compact the backing arrays by rehashing with a capacity just larger than current size
* and giving consideration to the load factor . */
public void compact ( ) { } } | final int idealCapacity = ( int ) Math . round ( size ( ) * ( 1.0 / loadFactor ) ) ; rehash ( findNextPositivePowerOfTwo ( Math . max ( MIN_CAPACITY , idealCapacity ) ) ) ; |
public class S3DataSegmentPuller { /** * Returns the " version " ( aka last modified timestamp ) of the URI
* @ param uri The URI to check the last timestamp
* @ return The time in ms of the last modification of the URI in String format
* @ throws IOException */
@ Override public String getVersion ( URI uri ) thr... | try { final S3Coords coords = new S3Coords ( checkURI ( uri ) ) ; final S3ObjectSummary objectSummary = S3Utils . getSingleObjectSummary ( s3Client , coords . bucket , coords . path ) ; return StringUtils . format ( "%d" , objectSummary . getLastModified ( ) . getTime ( ) ) ; } catch ( AmazonServiceException e ) { if (... |
public class ServiceClientImpl { /** * / * ( non - Javadoc )
* @ see com . ibm . g11n . pipeline . client . ServiceClient # createDocumentTranslationRequest ( com . ibm . g11n . pipeline . client . NewDocumentTranslationRequestData ) */
@ Override public DocumentTranslationRequestData createDocumentTranslationRequest... | if ( newTranslationRequestData == null ) { throw new IllegalArgumentException ( "Non-empty newTranslationRequestData must be specified." ) ; } RestInputDocumentTranslationRequestData newRestTRData = new RestInputDocumentTranslationRequestData ( newTranslationRequestData ) ; Gson gson = createGson ( RestInputDocumentTra... |
public class CacheableSessionLockManager { /** * { @ inheritDoc } */
protected boolean isPersistedLockHolder ( NodeData node ) throws RepositoryException { } } | LockData lData = lockManager . getExactNodeOrCloseParentLock ( node ) ; return lData != null && isLockHolder ( lData ) ; |
public class CacheImpl { /** * { @ inheritDoc } */
@ Override public boolean offer ( String name , Object obj ) { } } | boolean accepted = false ; // check map size
if ( CACHE . size ( ) < capacity ) { SoftReference < ? > tmp = CACHE . get ( name ) ; // because soft references can be garbage collected when a system is
// in need of memory , we will check that the cacheable object is
// valid
// log . debug ( " Softreference : " + ( null... |
public class TxRecoveryAgentImpl { /** * This method retrieves a system property named com . ibm . tx . jta . impl . PeerLeaseCheckInterval
* which allows a value to be specified for the time we should wait between peer server status checks .
* @ return */
private int getPeerLeaseCheckInterval ( ) { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getPeerLeaseCheckInterval" ) ; int intToReturn ; Integer peerLeaseCheckInterval = null ; try { peerLeaseCheckInterval = AccessController . doPrivileged ( new PrivilegedExceptionAction < Integer > ( ) { @ Override public Integer run ( ) { return Integer . getInteger ( "c... |
public class ContainerDefinition { /** * The mount points for data volumes in your container .
* This parameter maps to < code > Volumes < / code > in the < a
* href = " https : / / docs . docker . com / engine / api / v1.35 / # operation / ContainerCreate " > Create a container < / a > section of the
* < a href ... | if ( mountPoints == null ) { mountPoints = new com . amazonaws . internal . SdkInternalList < MountPoint > ( ) ; } return mountPoints ; |
public class SubordinateControlInterceptor { /** * Before servicing the request , apply the registered subordinate controls to make sure any state changes that have
* occurred on the client are applied .
* @ param request the request being serviced */
@ Override public void serviceRequest ( final Request request ) ... | // Only apply for POST
if ( "POST" . equals ( request . getMethod ( ) ) ) { // Apply Controls ( Use values on request )
SubordinateControlHelper . applyRegisteredControls ( request , true ) ; } // Service Request
super . serviceRequest ( request ) ; |
public class RESTResponseHelper { /** * This method builds the overview for the resources and collection we offer
* in our implementation .
* @ param pDatabase
* path to the storage
* @ param pStorageFac
* factory for creating backends
* @ param pRevision
* revision algorithm utilized
* @ return The str... | final StreamingOutput sOutput = new StreamingOutput ( ) { @ Override public void write ( final OutputStream output ) throws IOException , WebApplicationException { Document document ; try { document = createSurroundingXMLResp ( ) ; final Element resElement = RESTResponseHelper . createResultElement ( document ) ; List ... |
public class CollectionValuedMap { /** * For testing only .
* @ param args
* from command line */
public static void main ( String [ ] args ) { } } | CollectionValuedMap < Integer , Integer > originalMap = new CollectionValuedMap < Integer , Integer > ( ) ; /* for ( int i = 0 ; i < 4 ; i + + ) {
for ( int j = 0 ; j < 4 ; j + + ) {
originalMap . add ( new Integer ( i ) , new Integer ( j ) ) ;
originalMap . remove ( new Integer ( 2 ) ) ;
System . out . println... |
public class OAuthProviderProcessingFilter { /** * Validate the signature of the request given the authentication request .
* @ param authentication The authentication request . */
protected void validateSignature ( ConsumerAuthentication authentication ) throws AuthenticationException { } } | SignatureSecret secret = authentication . getConsumerDetails ( ) . getSignatureSecret ( ) ; String token = authentication . getConsumerCredentials ( ) . getToken ( ) ; OAuthProviderToken authToken = null ; if ( token != null && ! "" . equals ( token ) ) { authToken = getTokenServices ( ) . getToken ( token ) ; } String... |
public class AutoValueOrOneOfProcessor { /** * Checks that , if the given { @ code @ AutoValue } or { @ code @ AutoOneOf } class is nested , it is
* static and not private . This check is not necessary for correctness , since the generated code
* would not compile if the check fails , but it produces better error m... | ElementKind enclosingKind = type . getEnclosingElement ( ) . getKind ( ) ; if ( enclosingKind . isClass ( ) || enclosingKind . isInterface ( ) ) { if ( type . getModifiers ( ) . contains ( Modifier . PRIVATE ) ) { errorReporter . abortWithError ( "@" + simpleAnnotationName + " class must not be private" , type ) ; } el... |
public class RtmpClient { /** * Send a remote procedure call .
* @ param endpoint The endpoint of the call
* @ param service The service handling the call
* @ param method The method to call
* @ param args Optional args to the call
* @ return The callback getting called once the rpc returns a result */
public... | RemotingMessage message = createRemotingMessage ( endpoint , service , method , args ) ; Invoke invoke = createAmf3InvokeSkeleton ( null , message ) ; InvokeCallback callback = getInvokeCallback ( invoke . getInvokeId ( ) ) ; send ( invoke ) ; return callback ; |
public class ChargingStationEventListener { /** * Makes a charging station reservable or not reservable .
* @ param chargingStationId the charging station to make reservable or not reservable .
* @ param reservable true if reservable , false if not . */
private void setReservable ( ChargingStationId chargingStation... | ChargingStation chargingStation = repository . findOne ( chargingStationId . getId ( ) ) ; if ( chargingStation != null ) { chargingStation . setReservable ( reservable ) ; repository . createOrUpdate ( chargingStation ) ; } |
public class TimeShift { /** * in place modify of TsdbResult array to increase timestamps by timeshift
* @ param data _ query
* @ param results
* @ param params
* @ return */
@ Override public DataPoints [ ] evaluate ( TSQuery data_query , List < DataPoints [ ] > results , List < String > params ) { } } | // not 100 % sure what to do here - > do I need to think of the case where I have no data points
if ( results == null || results . isEmpty ( ) ) { return new DataPoints [ ] { } ; } if ( params == null || params . isEmpty ( ) ) { throw new IllegalArgumentException ( "Need amount of timeshift to perform timeshift" ) ; } ... |
public class ComputationGraph { /** * Do backprop ( gradient calculation )
* @ param truncatedBPTT false : normal backprop . true : calculate gradients using truncated BPTT for RNN layers
* @ param externalEpsilons null usually ( for typical supervised learning ) . If not null ( and length > 0 ) then assume that
... | if ( flattenedGradients == null ) { initGradientsView ( ) ; } /* Design for workspaces use in backprop for ComputationGraph is similar to MultiLayerNetwork and shares some
features with outputOfLayersDetached
Specifically :
1 . We assume forward pass has already been done , and hence layer input fields are set ( ... |
public class DropinMonitor { /** * Call this method to stop all applications started by the dropin monitor ( for example if dropins is disabled
* on a server startup but the applications it started last server run are still there ) . */
private void deleteAllConfiguredApplications ( ) { } } | try { Configuration [ ] configs = configAdmin . listConfigurations ( "(&(service.factoryPid=" + AppManagerConstants . APPLICATIONS_PID + ")(" + AppManagerConstants . AUTO_INSTALL_PROP + "=true))" ) ; if ( configs != null ) { for ( Configuration c : configs ) { try { c . delete ( ) ; } catch ( Exception e ) { // Move on... |
public class CommerceCountryPersistenceImpl { /** * Returns the commerce country where groupId = & # 63 ; and twoLettersISOCode = & # 63 ; or throws a { @ link NoSuchCountryException } if it could not be found .
* @ param groupId the group ID
* @ param twoLettersISOCode the two letters iso code
* @ return the mat... | CommerceCountry commerceCountry = fetchByG_Tw ( groupId , twoLettersISOCode ) ; if ( commerceCountry == null ) { StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "groupId=" ) ; msg . append ( groupId ) ; msg . append ( ", twoLettersISOCode=" ) ; msg . append ( two... |
public class ParsedColInfo { /** * Helpers */
public ParsedColInfo updateTableName ( String tblName , String tblAlias ) { } } | m_tableName = tblName ; m_tableAlias = tblAlias ; return this ; |
public class AtomPlacer3D { /** * Gets the distanceValue attribute of the parameter set .
* @ param id1 atom1 id
* @ param id2 atom2 id
* @ return The distanceValue value from the force field parameter set */
public double getBondLengthValue ( String id1 , String id2 ) { } } | String dkey = "" ; if ( pSet . containsKey ( ( "bond" + id1 + ";" + id2 ) ) ) { dkey = "bond" + id1 + ";" + id2 ; } else if ( pSet . containsKey ( ( "bond" + id2 + ";" + id1 ) ) ) { dkey = "bond" + id2 + ";" + id1 ; } else { logger . warn ( "KEYError: Unknown distance key in pSet: " + id2 + ";" + id1 + " take default b... |
public class Formation { /** * Updates the assignment of members to slots */
public void updateSlotAssignments ( ) { } } | // Apply the strategy to update slot assignments
slotAssignmentStrategy . updateSlotAssignments ( slotAssignments ) ; // Set the newly calculated number of slots
pattern . setNumberOfSlots ( slotAssignmentStrategy . calculateNumberOfSlots ( slotAssignments ) ) ; // Update the drift offset if a motion moderator is set
i... |
public class Position { /** * calculates the distance of a point to the great circle path between p1
* and p2.
* Formula from : http : / / www . movable - type . co . uk / scripts / latlong . html
* @ param p1
* @ param p2
* @ return */
public final double getDistanceKmToPath ( Position p1 , Position p2 ) { }... | double d = radiusEarthKm * asin ( sin ( getDistanceToKm ( p1 ) / radiusEarthKm ) * sin ( toRadians ( getBearingDegrees ( p1 ) - p1 . getBearingDegrees ( p2 ) ) ) ) ; return abs ( d ) ; |
public class RealexHpp { /** * Method produces JSON from < code > HppRequest < / code > object .
* Carries out the following actions :
* < ul >
* < li > Validates inputs < / li >
* < li > Generates defaults for security hash , order ID and time stamp ( if required ) < / li >
* < li > Optional to Base64 encode... | LOGGER . info ( "Converting HppRequest to JSON." ) ; String json = null ; // generate defaults
LOGGER . debug ( "Generating defaults." ) ; hppRequest . generateDefaults ( secret ) ; // validate request
LOGGER . debug ( "Validating request." ) ; ValidationUtils . validate ( hppRequest ) ; // encode
LOGGER . debug ( "Enc... |
public class HttpURI { public URI toURI ( ) throws URISyntaxException { } } | return new URI ( _scheme , null , _host , _port , _path , _query == null ? null : UrlEncoded . decodeString ( _query ) , _fragment ) ; |
public class AnnotationUtil { /** * Returns all annotations searching from the specified { @ code element } . The search range depends on
* the specified { @ link FindOption } s and the specified { @ code collectingFilter } decides whether
* an annotation is collected or not .
* @ param element the { @ link Annot... | requireNonNull ( element , "element" ) ; requireNonNull ( collectingFilter , "collectingFilter" ) ; final Builder < Annotation > builder = new Builder < > ( ) ; for ( final AnnotatedElement e : resolveTargetElements ( element , findOptions ) ) { for ( final Annotation annotation : e . getDeclaredAnnotations ( ) ) { if ... |
public class PairtreeFactory { /** * Creates a Pairtree , with the supplied prefix , using the supplied S3 bucket and internal bucket path .
* @ param aPrefix A Pairtree prefix
* @ param aBucket An S3 bucket
* @ param aBucketPath A path in the S3 bucket to the Pairtree root
* @ param aAccessKey An AWS access ke... | return new S3Pairtree ( aPrefix , myVertx , aBucket , aBucketPath , aAccessKey , aSecretKey ) ; |
public class TurnWeighting { /** * This method calculates the turn weight separately . */
public double calcTurnWeight ( int edgeFrom , int nodeVia , int edgeTo ) { } } | long turnFlags = turnCostExt . getTurnCostFlags ( edgeFrom , nodeVia , edgeTo ) ; if ( turnCostEncoder . isTurnRestricted ( turnFlags ) ) return Double . POSITIVE_INFINITY ; return turnCostEncoder . getTurnCost ( turnFlags ) ; |
public class CloudTasksClient { /** * Forces a task to run now .
* < p > When this method is called , Cloud Tasks will dispatch the task , even if the task is already
* running , the queue has reached its [ RateLimits ] [ google . cloud . tasks . v2 . RateLimits ] or is
* [ PAUSED ] [ google . cloud . tasks . v2 ... | RunTaskRequest request = RunTaskRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . build ( ) ; return runTask ( request ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcThermalAdmittanceMeasure ( ) { } } | if ( ifcThermalAdmittanceMeasureEClass == null ) { ifcThermalAdmittanceMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 879 ) ; } return ifcThermalAdmittanceMeasureEClass ; |
public class LanguageTranslator { /** * Identify language .
* Identifies the language of the input text .
* @ param identifyOptions the { @ link IdentifyOptions } containing the options for the call
* @ return a { @ link ServiceCall } with a response type of { @ link IdentifiedLanguages } */
public ServiceCall < ... | Validator . notNull ( identifyOptions , "identifyOptions cannot be null" ) ; String [ ] pathSegments = { "v3/identify" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHe... |
public class ProxyDetails { /** * Returns the lowest index of the given list of values */
protected int indexOf ( String text , String ... values ) { } } | int answer = - 1 ; for ( String value : values ) { int idx = text . indexOf ( value ) ; if ( idx >= 0 ) { if ( answer < 0 || idx < answer ) { answer = idx ; } } } return answer ; |
public class AbstractFuture { /** * Returns a value , suitable for storing in the { @ link # value } field . From the given future ,
* which is assumed to be done .
* < p > This is approximately the inverse of { @ link # getDoneValue ( Object ) } */
private static Object getFutureValue ( ListenableFuture < ? > futu... | Object valueToSet ; if ( future instanceof TrustedFuture ) { // Break encapsulation for TrustedFuture instances since we know that subclasses cannot
// override . get ( ) ( since it is final ) and therefore this is equivalent to calling . get ( )
// and unpacking the exceptions like we do below ( just much faster becau... |
public class TextWrapper { /** * Wrap the specified text .
* @ param text the text to wrap .
* @ return the wrapped text . */
public String wrap ( String text ) { } } | StringBuilder sb = new StringBuilder ( ) ; int continuationLength = continuation . length ( ) ; int currentPosition = 0 ; for ( String word : text . split ( " " ) ) { String lastWord ; int wordLength = word . length ( ) ; if ( currentPosition + wordLength <= width ) { if ( currentPosition != 0 ) { sb . append ( " " ) ;... |
public class Model { /** * Saves the given context , by calling all the { @ link ContextDataFactory } ies .
* @ param ctx the context to save .
* @ throws IllegalArgumentException ( since TODO add version ) if the given context is { @ code null } .
* @ since 2.0.0
* @ see ContextDataFactory # persistContextData... | validateContextNotNull ( ctx ) ; for ( ContextDataFactory cdf : this . contextDataFactories ) { cdf . persistContextData ( getSession ( ) , ctx ) ; } |
public class AbstractIoAcceptor { /** * { @ inheritDoc } */
public final void bind ( SocketAddress firstLocalAddress , SocketAddress ... otherLocalAddresses ) throws IOException { } } | if ( firstLocalAddress == null ) { bind ( getDefaultLocalAddresses ( ) ) ; return ; } List < SocketAddress > localAddresses = new ArrayList < > ( 2 ) ; localAddresses . add ( firstLocalAddress ) ; if ( otherLocalAddresses != null ) { Collections . addAll ( localAddresses , otherLocalAddresses ) ; } bind ( localAddresse... |
public class GBSNode { /** * Find the insert point in the right half of the node for a new key .
* NB : If the node is less than half full then the new key is to
* become the highest key in the node .
* @ param new1 New Object to be inserted
* @ param point Found insertion point */
void findInsertPointInRight (... | int r = rightMostIndex ( ) ; int m = midPoint ( ) ; if ( r <= m ) { String x = "Erroneous call to findInsertPointInRight(). " + "rightMostIndex() = " + r + ", midPoint() = " + m + "." ; throw new OptimisticDepthException ( x ) ; } findIndex ( m + 1 , r , new1 , point ) ; |
public class PerspectiveOps { /** * Takes a list of { @ link AssociatedTriple } as input and breaks it up into three lists for each view .
* @ param pairs Input : List of associated triples .
* @ param view1 Output : List of observations from view 1
* @ param view2 Output : List of observations from view 2
* @ ... | for ( AssociatedTriple p : pairs ) { view1 . add ( p . p1 ) ; view2 . add ( p . p2 ) ; view3 . add ( p . p3 ) ; } |
public class ContainerClassLoader { /** * to set vars passed up to ClassLoader . definePackage . */
public Package definePackage ( String name , Manifest manifest , URL sealBase ) throws IllegalArgumentException { } } | Attributes mA = manifest . getMainAttributes ( ) ; String specTitle = mA . getValue ( Name . SPECIFICATION_TITLE ) ; String specVersion = mA . getValue ( Name . SPECIFICATION_VERSION ) ; String specVendor = mA . getValue ( Name . SPECIFICATION_VENDOR ) ; String implTitle = mA . getValue ( Name . IMPLEMENTATION_TITLE ) ... |
public class ResourceSnippet { /** * returns the line number of the given char in the text */
public static int getLineNumber ( String text , int posChar ) { } } | int len = Math . min ( posChar , text . length ( ) ) ; int result = 1 ; for ( int i = 0 ; i < len ; i ++ ) { if ( text . charAt ( i ) == '\n' ) result ++ ; } return result ; |
public class EventsHelper { /** * Bind a function to the mousemove event of each matched element .
* @ param jsScope
* Scope to use
* @ return the jQuery code */
public static ChainableStatement mousemove ( JsScope jsScope ) { } } | return new DefaultChainableStatement ( MouseEvent . MOUSEMOVE . getEventLabel ( ) , jsScope . render ( ) ) ; |
public class PrcReplicationAccMethodSave { /** * < p > Process entity request . < / p >
* @ param pAddParam additional param , e . g . return this line ' s
* document in " nextEntity " for farther process
* @ param pRequestData Request Data
* @ param pEntity Entity to process
* @ return Entity processed for f... | if ( pEntity . getRequestedDatabaseId ( ) == getSrvOrm ( ) . getIdDatabase ( ) ) { throw new ExceptionWithCode ( ExceptionWithCode . WRONG_PARAMETER , "requested_database_must_be_different" ) ; } if ( pEntity . getIsNew ( ) ) { this . srvOrm . insertEntity ( pAddParam , pEntity ) ; } else { this . srvOrm . updateEntity... |
public class CommerceDiscountUsageEntryLocalServiceWrapper { /** * Creates a new commerce discount usage entry with the primary key . Does not add the commerce discount usage entry to the database .
* @ param commerceDiscountUsageEntryId the primary key for the new commerce discount usage entry
* @ return the new c... | return _commerceDiscountUsageEntryLocalService . createCommerceDiscountUsageEntry ( commerceDiscountUsageEntryId ) ; |
public class WrappingJavaFileManager { /** * This implementation maps the given list of file objects by
* calling wrap on each . Subclasses may override this behavior .
* @ param fileObjects a list of file objects
* @ return the mapping */
protected Iterable < JavaFileObject > wrap ( Iterable < JavaFileObject > f... | List < JavaFileObject > mapped = new ArrayList < JavaFileObject > ( ) ; for ( JavaFileObject fileObject : fileObjects ) mapped . add ( wrap ( fileObject ) ) ; return Collections . unmodifiableList ( mapped ) ; |
public class DomainTopicsInner { /** * List domain topics .
* List all the topics in a domain .
* @ param resourceGroupName The name of the resource group within the user ' s subscription .
* @ param domainName Domain name .
* @ param serviceCallback the async ServiceCallback to handle successful and failed res... | return ServiceFuture . fromResponse ( listByDomainWithServiceResponseAsync ( resourceGroupName , domainName ) , serviceCallback ) ; |
public class GeneratorExtensions { /** * Creates a String list with the String constants from the given String list . For instance :
* List data = new ArrayList ( ) ; data . add ( " foo " ) ; data . add ( " bar " ) ;
* newConstantsFromStringList ( data , false ) ; Result from list : [ " public static final String F... | final List < String > returnList = new ArrayList < > ( ) ; final int size = data . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { final String element = data . get ( i ) ; final StringBuilder sb = new StringBuilder ( ) ; sb . append ( "public static final String " ) ; if ( withQuotation ) { String striped = element .... |
public class WebSocketDecoder { /** * Returns a map of key / value pairs from a given querystring .
* @ param query
* @ return k / v map */
public static Map < String , Object > parseQuerystring ( String query ) { } } | String [ ] params = query . split ( "&" ) ; Map < String , Object > map = new HashMap < String , Object > ( ) ; for ( String param : params ) { String [ ] nameValue = param . split ( "=" ) ; map . put ( nameValue [ 0 ] , nameValue [ 1 ] ) ; } return map ; |
public class HexHelper { /** * Decodes a hexidecimal string ( optionally with < code > separator < / code > characters separating each two - digit pair ) < br / >
* Multiple runs of the separator will be ignored ( eg . AA : : BB will result in < code > [ 0xAA , 0xBB ] < / code > , not
* < code > [ 0xAA , 0x00,0xBB ... | if ( value . length ( ) == 0 ) return new byte [ 0 ] ; final String sepString = new String ( new char [ ] { separator } ) ; final StringTokenizer t = new StringTokenizer ( value , sepString , false ) ; final byte [ ] buffer = new byte [ t . countTokens ( ) ] ; int i = 0 ; while ( t . hasMoreTokens ( ) ) { final String ... |
public class FileUtil { /** * Return an array of FileStatus objects for each file beneath
* the given path to a specified depth ( inclusive ) . Directories at
* the given depth will be returned , while directories above that
* depth will not .
* @ param fs FileSystem on which to operate
* @ param f starting p... | if ( null == f ) { throw new IllegalArgumentException ( "Path cannot be null." ) ; } if ( null == fs ) { throw new IllegalArgumentException ( "File system cannot be null." ) ; } if ( depth < 0 ) { throw new IllegalArgumentException ( "Depth cannot be negative." ) ; } if ( depth == 0 ) { FileStatus [ ] fileStatus = { fs... |
public class PredicateUtils { /** * Constructs a canonical index name from the given index components .
* A canonical name is a comma - separated list of index components with a
* single space character going after every comma .
* It ' s a caller ' s responsibility to canonicalize individual components
* as spe... | assert components . length > 1 ; StringBuilder builder = new StringBuilder ( components . length * EXPECTED_AVERAGE_COMPONENT_NAME_LENGTH ) ; for ( String component : components ) { if ( builder . length ( ) > 0 ) { builder . append ( ", " ) ; } builder . append ( component ) ; } return builder . toString ( ) ; |
public class Instance { /** * The elastic inference accelerator associated with the instance .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setElasticInferenceAcceleratorAssociations ( java . util . Collection ) } or
* { @ link # withElasticInferenceAcce... | if ( this . elasticInferenceAcceleratorAssociations == null ) { setElasticInferenceAcceleratorAssociations ( new com . amazonaws . internal . SdkInternalList < ElasticInferenceAcceleratorAssociation > ( elasticInferenceAcceleratorAssociations . length ) ) ; } for ( ElasticInferenceAcceleratorAssociation ele : elasticIn... |
public class Publisher { /** * Sends the HUB url a notification of a change in topic asynchronously
* @ param hub URL of the hub to notify .
* @ param topic The Topic that has changed
* @ param callback A callback invoked when the notification completes .
* @ throws NotificationException Any failure */
public v... | final Runnable r = new Runnable ( ) { @ Override public void run ( ) { try { sendUpdateNotification ( hub , topic ) ; callback . onSuccess ( ) ; } catch ( final Throwable t ) { callback . onFailure ( t ) ; } } } ; if ( executor != null ) { executor . execute ( r ) ; } else { new Thread ( r ) . start ( ) ; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.