signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Summarizer { /** * setup label * @ param key key */ private void setupLabel ( Key key ) { } }
int i = 0 ; Key k = new Key ( ) ; for ( ValueWritable vw : key . getGrouping ( ) ) { vw . getLabel ( ) . set ( inputLabels [ i ++ ] ) ; k . getGrouping ( ) . add ( new ValueWritable ( vw . getLabel ( ) . toString ( ) , vw . getValue ( ) ) ) ; } defaultGroupRecord . setKey ( k ) ; valuesLabels = new String [ inputLabels...
public class ListStreamProcessorsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ListStreamProcessorsRequest listStreamProcessorsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( listStreamProcessorsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( listStreamProcessorsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; protocolMarshaller . marshall ( listStreamProcessorsRequest . getMaxResults ( ) , MAXR...
public class Ingest { /** * Checks if the ingest is catching up . * If the ingest is consuming finalized segment , it ' s assumed to be behind . * Otherwise , catching up is based on the position of the input stream . * @ throws IOException */ private void setCatchingUp ( ) throws IOException { } }
try { if ( inputEditStream != null && inputEditStream . isInProgress ( ) ) { catchingUp = ( inputEditStream . length ( ) - inputEditStream . getPosition ( ) > catchUpLag ) ; } else { catchingUp = true ; } } catch ( Exception e ) { catchingUp = true ; }
public class ResourceConverter { /** * Converts rawdata input into a collection of requested output objects . * @ param data raw data input * @ param clazz target type * @ param < T > type * @ return collection of converted elements * @ throws RuntimeException in case conversion fails */ @ Deprecated public <...
return readDocumentCollection ( data , clazz ) . get ( ) ;
public class CPDefinitionGroupedEntryPersistenceImpl { /** * Returns all the cp definition grouped entries where CPDefinitionId = & # 63 ; . * @ param CPDefinitionId the cp definition ID * @ return the matching cp definition grouped entries */ @ Override public List < CPDefinitionGroupedEntry > findByCPDefinitionId...
return findByCPDefinitionId ( CPDefinitionId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ;
public class KerasUpsampling3D { /** * Get layer output type . * @ param inputType Array of InputTypes * @ return output type as InputType * @ throws InvalidKerasConfigurationException Invalid Keras config */ @ Override public InputType getOutputType ( InputType ... inputType ) throws InvalidKerasConfigurationExc...
if ( inputType . length > 1 ) throw new InvalidKerasConfigurationException ( "Keras Upsampling 3D layer accepts only one input (received " + inputType . length + ")" ) ; return this . getUpsampling3DLayer ( ) . getOutputType ( - 1 , inputType [ 0 ] ) ;
public class ToStringSerializer { /** * { @ inheritDoc } * @ see fr . dudie . nominatim . client . request . paramhelper . QueryParameterSerializer # handle ( java . lang . Object ) */ @ Override public String handle ( final Object value ) { } }
if ( value instanceof NominatimRequest ) { return ( ( NominatimRequest ) value ) . getQueryString ( ) ; } else { return value . toString ( ) ; }
public class RateLimiterAspect { /** * handle the asynchronous completable future flow * @ param proceedingJoinPoint AOPJoinPoint * @ param rateLimiter configured rate limiter * @ return CompletionStage */ private Object handleJoinPointCompletableFuture ( ProceedingJoinPoint proceedingJoinPoint , io . github . re...
return rateLimiter . executeCompletionStage ( ( ) -> { try { return ( CompletionStage < ? > ) proceedingJoinPoint . proceed ( ) ; } catch ( Throwable throwable ) { throw new CompletionException ( throwable ) ; } } ) ;
public class HtmlEscape { /** * Perform a ( configurable ) HTML < strong > escape < / strong > operation on a < tt > Reader < / tt > input , writing * results to a < tt > Writer < / tt > . * This method will perform an escape operation according to the specified * { @ link org . unbescape . html . HtmlEscapeType ...
if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } if ( type == null ) { throw new IllegalArgumentException ( "The 'type' argument cannot be null" ) ; } if ( level == null ) { throw new IllegalArgumentException ( "The 'level' argument cannot be null" ) ; } HtmlEscapeUt...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcUnitEnum ( ) { } }
if ( ifcUnitEnumEEnum == null ) { ifcUnitEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 923 ) ; } return ifcUnitEnumEEnum ;
public class AWSRAMClient { /** * Enables resource sharing within your organization . * @ param enableSharingWithAwsOrganizationRequest * @ return Result of the EnableSharingWithAwsOrganization operation returned by the service . * @ throws OperationNotPermittedException * The requested operation is not permitt...
request = beforeClientExecution ( request ) ; return executeEnableSharingWithAwsOrganization ( request ) ;
public class EventsHelper { /** * Bind a function to the dblclick event of each matched element . * @ param jsScope * Scope to use * @ return the jQuery code */ public static ChainableStatement dblclick ( JsScope jsScope ) { } }
return new DefaultChainableStatement ( MouseEvent . DBLCLICK . getEventLabel ( ) , jsScope . render ( ) ) ;
public class HTTPBatchClientConnectionInterceptor { /** * Returns httpRequest instance with configured fields * @ param intuitRequest * @ param client * @ param < T > * @ return * @ throws FMSException */ private < T extends CloseableHttpClient > HttpRequestBase prepareHttpRequest ( RequestElements intuitRequ...
// setTimeout ( client , intuitRequest . getContext ( ) ) ; HttpRequestBase httpRequest = extractMethod ( intuitRequest , extractURI ( intuitRequest ) ) ; // populate the headers to HttpRequestBase populateRequestHeaders ( httpRequest , intuitRequest . getRequestHeaders ( ) ) ; // authorize the request authorizeRequest...
public class UploadManager { /** * Tasks */ public void startUpload ( long rid , String descriptor , String fileName , ActorRef requestActor ) { } }
if ( LOG ) { Log . d ( TAG , "Starting upload #" + rid + " with descriptor " + descriptor ) ; } QueueItem queueItem = new QueueItem ( rid , descriptor , fileName , requestActor ) ; queueItem . isStopped = false ; queue . add ( queueItem ) ; checkQueue ( ) ;
public class MisoScenePanel { /** * Called whenever a block is done resolving , whether it was successfully resolved or if it * was abandoned . */ protected void blockFinished ( SceneBlock block ) { } }
-- _pendingBlocks ; // once all the visible pending blocks have completed their // resolution , recompute our visible object set and show ourselves if ( _visiBlocks . remove ( block ) && _visiBlocks . size ( ) == 0 ) { allBlocksFinished ( ) ; }
public class ContainsCondition { /** * { @ inheritDoc } */ @ Override public Query query ( Schema schema ) { } }
if ( field == null || field . trim ( ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "Field name required" ) ; } if ( values == null ) { throw new IllegalArgumentException ( "Field values required" ) ; } BooleanQuery query = new BooleanQuery ( ) ; for ( Object value : values ) { Condition condition = new Match...
public class ScriptFunction { /** * Call with parameters * @ param m put this in context * @ return * @ throws org . s1 . script . errors . ScriptException */ public Object call ( Map < String , Object > m ) throws ScriptException { } }
List < Object > args = Objects . newArrayList ( ) ; for ( Object o : m . values ( ) ) { args . add ( o ) ; } return call ( m , args ) ;
public class AddShoppingDynamicRemarketingCampaign { /** * Uploads the image from the specified { @ code url } . * @ return the { @ code Image } that was uploaded . * @ throws IOException if the image cannot be loaded . */ private static Image uploadImage ( AdWordsServicesInterface services , AdWordsSession session...
Image image = new Image ( ) ; image . setType ( MediaMediaType . IMAGE ) ; image . setData ( com . google . api . ads . common . lib . utils . Media . getMediaDataFromUrl ( url ) ) ; MediaServiceInterface mediaService = services . get ( session , MediaServiceInterface . class ) ; return ( Image ) mediaService . upload ...
public class CharOperation { /** * Answers true if the pattern matches the given name , false otherwise . This char [ ] pattern matching accepts * wild - cards ' * ' and ' ? ' . When not case sensitive , the pattern is assumed to already be lowercased , the name will * be lowercased character per character as compa...
if ( name == null ) { return false ; // null name cannot match } if ( pattern == null ) { return true ; // null pattern is equivalent to ' * ' } return match ( pattern , 0 , pattern . length , name , 0 , name . length , isCaseSensitive ) ;
public class RestReportingEngine { /** * { @ inheritDoc } */ @ Override @ GET @ Path ( "/server-config" ) public String getServerConfigurationAsJson ( ) throws NotAuthorizedException { } }
accessControlUtils . checkAuthorization ( Action . EXECUTE_REPORT , requestContext ) ; return gson . toJson ( appSensorServer . getConfiguration ( ) ) ;
public class StructureImpl { /** * { @ inheritDoc } */ @ Override public Chain getChainByPDB ( String authId , int modelnr ) throws StructureException { } }
Chain c = getPolyChainByPDB ( authId , modelnr ) ; if ( c == null ) { throw new StructureException ( "Could not find chain with authId \"" + authId + "\"" + " for PDB id " + pdb_id + ", model " + modelnr ) ; } return c ;
public class SelectOverheadParameters { /** * Creates a new instance of the overhead view */ public < T extends ImageBase < T > > OverheadView createOverhead ( ImageType < T > imageType ) { } }
OverheadView ret = new OverheadView ( ) ; ret . image = imageType . createImage ( overheadWidth , overheadHeight ) ; ret . cellSize = cellSize ; ret . centerX = centerX ; ret . centerY = centerY ; return ret ;
public class TkJoinedCookies { /** * Join them . * @ param response The response * @ return New response * @ throws IOException If fails */ private static Response join ( final Response response ) throws IOException { } }
final StringBuilder cookies = new StringBuilder ( ) ; for ( final String header : response . head ( ) ) { final Matcher matcher = TkJoinedCookies . PTN . matcher ( header ) ; if ( ! matcher . matches ( ) ) { continue ; } cookies . append ( matcher . group ( 1 ) ) . append ( ", " ) ; } final Response out ; if ( cookies ...
public class GHistogramFeatureOps { /** * Computes a joint histogram for a planar image . Since it ' s a joint distribution the histogram * can become huge ( and too sparse ) if bin sizes are used that are too big . Also consider computing the * histogram independently in each band . * @ param image Input image ....
if ( image . getNumBands ( ) != histogram . getDimensions ( ) ) throw new IllegalArgumentException ( "Number of bands in the image and histogram must be the same" ) ; if ( image . getBandType ( ) == GrayU8 . class ) { HistogramFeatureOps . histogram_U8 ( ( Planar < GrayU8 > ) image , histogram ) ; } else if ( image . g...
public class BeanContextSupport { /** * Notifies registered < code > BeanContextMembershipListener < / code > s that a child has been removed . * @ param event * the < code > BeanContextMembershipEvent < / code > */ protected final void fireChildrenRemoved ( BeanContextMembershipEvent event ) { } }
Object listeners [ ] ; synchronized ( bcmListeners ) { listeners = bcmListeners . toArray ( ) ; } for ( int i = 0 ; i < listeners . length ; i ++ ) { BeanContextMembershipListener l = ( BeanContextMembershipListener ) listeners [ i ] ; l . childrenRemoved ( event ) ; }
public class BasicFunctionsRuntime { /** * Rounds the given value to the closest decimal point left ( negative numbers ) or right ( positive * numbers ) of the decimal point */ public static NumberData round ( SoyValue value , int numDigitsAfterPoint ) { } }
// NOTE : for more accurate rounding , this should really be using BigDecimal which can do correct // decimal arithmetic . However , for compatibility with js , that probably isn ' t an option . if ( numDigitsAfterPoint == 0 ) { return IntegerData . forValue ( round ( value ) ) ; } else if ( numDigitsAfterPoint > 0 ) {...
public class Predicates { /** * Returns a predicate that evaluates to { @ code true } if the key set * of its argument satisfies { @ code p } . */ public static < K , V > Predicate < Map < K , V > > forKeys ( final Predicate < ? super Set < K > > p ) { } }
return new Predicate < Map < K , V > > ( ) { @ Override public boolean apply ( Map < K , V > obj ) { return p . apply ( obj . keySet ( ) ) ; } } ;
public class PropertiesLoaderUtils { /** * Fill the given properties from the specified class path resource ( in ISO - 8859-1 encoding ) . * < p > Merges properties if more than one resource of the same name * found in the class path . < / p > * @ param props the Properties instance to load into * @ param resou...
fillProperties ( props , resourceName , AspectranClassLoader . getDefaultClassLoader ( ) ) ;
public class BasePanel { /** * This field changed , if this is the main record , lock it ! * @ param field The field that changed . */ public void fieldChanged ( Field field ) { } }
Record record = this . getMainRecord ( ) ; if ( field != null ) if ( record != null ) if ( field . getRecord ( ) == record ) { int iErrorCode = record . handleRecordChange ( ( BaseField ) field , DBConstants . FIELD_CHANGED_TYPE , DBConstants . DONT_DISPLAY ) ; // Tell table that I ' m getting changed ( if not locked )...
public class KeyVaultClientBaseImpl { /** * Backs up the specified certificate . * Requests that a backup of the specified certificate be downloaded to the client . All versions of the certificate will be downloaded . This operation requires the certificates / backup permission . * @ param vaultBaseUrl The vault na...
return ServiceFuture . fromResponse ( backupCertificateWithServiceResponseAsync ( vaultBaseUrl , certificateName ) , serviceCallback ) ;
public class MessageUnpacker { /** * Reads payload bytes of binary , extension , or raw string types . * This consumes specified amount of bytes into the specified byte array . * @ param dst the byte array into which the data is read * @ param off the offset in the dst array * @ param len the number of bytes to...
while ( true ) { int bufferRemaining = buffer . size ( ) - position ; if ( bufferRemaining >= len ) { buffer . getBytes ( position , dst , off , len ) ; position += len ; return ; } buffer . getBytes ( position , dst , off , bufferRemaining ) ; off += bufferRemaining ; len -= bufferRemaining ; position += bufferRemaini...
public class BouncyCastleUtil { /** * Converts given < code > DERObject < / code > into * a DER - encoded byte array . * @ param obj DERObject to convert . * @ return the DER - encoded byte array * @ exception IOException if conversion fails */ public static byte [ ] toByteArray ( ASN1Primitive obj ) throws IOE...
ByteArrayOutputStream bout = new ByteArrayOutputStream ( ) ; DEROutputStream der = new DEROutputStream ( bout ) ; der . writeObject ( obj ) ; return bout . toByteArray ( ) ;
public class LongConstant { /** * Writes the contents of the pool entry . */ void write ( ByteCodeWriter out ) throws IOException { } }
out . write ( ConstantPool . CP_LONG ) ; out . writeLong ( _value ) ;
public class HintManager { /** * Set sharding value for database sharding only . * < p > The sharding operator is { @ code = } < / p > * @ param value sharding value */ public void setDatabaseShardingValue ( final Comparable < ? > value ) { } }
databaseShardingValues . clear ( ) ; databaseShardingValues . put ( "" , value ) ; databaseShardingOnly = true ;
public class FreeOnFreeHandler { /** * Free the dependent object . */ public void freeDependent ( ) { } }
if ( m_recDependent != null ) // If close and file is still open if ( ! m_recDependent . isInFree ( ) ) { this . setDependentListener ( null ) ; // In case you want to delete me ! if ( m_recDependent != null ) { if ( m_bCloseOnFree ) m_recDependent . close ( ) ; // File is still open , and my listener is still there , ...
public class RiceEncoder { /** * Create the residual headers for a FLAC stream . * @ param useFiveBitParam Set TRUE if using a five - bit parameter size , FALSE * for a four - bit parameter * @ param order Specify order of partitions to be used ( actual number of * partitions will be 2 ^ order . * @ param ele...
ele = ele . getEnd ( ) ; int paramSize = ( useFiveBitParam ) ? 1 : 0 ; ele . addInt ( paramSize , 2 ) ; ele . addInt ( order , 4 ) ; return 6 ;
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcWindowStyleOperationEnum createIfcWindowStyleOperationEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcWindowStyleOperationEnum result = IfcWindowStyleOperationEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcCoordinateReferenceSystemSelect ( ) { } }
if ( ifcCoordinateReferenceSystemSelectEClass == null ) { ifcCoordinateReferenceSystemSelectEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1124 ) ; } return ifcCoordinateReferenceSystemSelectEClass ;
public class AbstractInvokable { /** * Aborts a checkpoint as the result of receiving possibly some checkpoint barriers , * but at least one { @ link org . apache . flink . runtime . io . network . api . CancelCheckpointMarker } . * < p > This requires implementing tasks to forward a * { @ link org . apache . fli...
throw new UnsupportedOperationException ( String . format ( "abortCheckpointOnBarrier not supported by %s" , this . getClass ( ) . getName ( ) ) ) ;
public class Log { /** * Restores in from an incremental backup */ private void restoreBackupIncremental ( ) { } }
try { if ( fa . isStreamElement ( fileName + ".backup" ) ) { RAShadowFile . restoreFile ( fileName + ".backup" , fileName + ".data" ) ; } else { /* / / this is to ensure file has been written fully but it is not necessary / / as semantics dictate that if a backup does not exist , the file / / was never changed or w...
public class Strings { public static String addLeftOpt ( String str , String left ) { } }
if ( str . startsWith ( left ) ) { return str ; } else { return left + str ; }
public class NamespaceConverter { /** * ( non - Javadoc ) * @ see * org . fcrepo . kernel . api . identifiers . InternalIdentifierConverter # doForward ( * java . lang . String ) */ @ Override protected String doForward ( final String inputId ) { } }
LOGGER . trace ( "Converting identifier {} from internal to external..." , inputId ) ; String result = inputId ; for ( final String jcrNamespace : jcrNamespacesToRDFNamespaces . keySet ( ) ) { LOGGER . trace ( "Replacing namespace: {} with: {}" , jcrNamespace , jcrNamespacesToRDFNamespaces . get ( jcrNamespace ) ) ; re...
public class ElasticsearchBeyonder { /** * Automatically scan classpath and creates indices , types , templates . . . * @ param client elasticsearch client * @ param root dir within the classpath * @ throws Exception when beyonder can not start */ public static void start ( RestClient client , String root ) throw...
start ( client , root , Defaults . MergeMappings , Defaults . ForceCreation ) ;
public class Weight { /** * Creates a new weight with the opposite sign . * @ return a new < code > Weight < / code > . */ public Weight invertSign ( ) { } }
if ( isInfinity ) { if ( posOrNeg ) { return WeightFactory . NEG_INFINITY ; } else { return WeightFactory . POS_INFINITY ; } } return new Weight ( - val ) ;
public class VirtualFileSystems { /** * Constructs a new FileSystem to access the contents of a file as a file system . * @ param path * @ param env * @ return * @ throws IOException */ public static final FileSystem newFileSystem ( Path path , Map < String , ? > env ) throws IOException { } }
return getDefault ( ) . provider ( ) . newFileSystem ( path , env ) ;
public class SecurityConstraintTypeImpl { /** * Returns all < code > web - resource - collection < / code > elements * @ return list of < code > web - resource - collection < / code > */ public List < WebResourceCollectionType < SecurityConstraintType < T > > > getAllWebResourceCollection ( ) { } }
List < WebResourceCollectionType < SecurityConstraintType < T > > > list = new ArrayList < WebResourceCollectionType < SecurityConstraintType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "web-resource-collection" ) ; for ( Node node : nodeList ) { WebResourceCollectionType < SecurityConstraintType < T > >...
public class PersonImpl { /** * Provides access to this { @ link org . apereo . portal . security . provider . PersonImpl } ' s private copy * of the attributes attached to this { @ link IPerson } . Changes to the map will affect the * attributes directly . ( Perhaps we ' d rather do a defensive copy ? ) */ @ Overr...
final Map < String , List < Object > > attrMap = userAttributes ; return attrMap ;
public class OctalUnescaper { /** * { @ inheritDoc } */ @ Override public int translate ( final CharSequence input , final int index , final Writer out ) throws IOException { } }
final int remaining = input . length ( ) - index - 1 ; // how many characters left , ignoring the first \ final StringBuilder builder = new StringBuilder ( ) ; if ( input . charAt ( index ) == '\\' && remaining > 0 && isOctalDigit ( input . charAt ( index + 1 ) ) ) { final int next = index + 1 ; final int next2 = index...
public class Connection { /** * from interface NetEventHandler */ public boolean checkIdle ( long idleStamp ) { } }
if ( _lastEvent > idleStamp ) { return false ; } if ( ! isClosed ( ) ) { log . info ( "Disconnecting non-communicative client" , "conn" , this , "idle" , ( System . currentTimeMillis ( ) - _lastEvent ) + "ms" ) ; } return true ;
public class Strings { /** * Process formatted string with arguments transform and no illegal format exception . Java string format throws * unchecked { @ link IllegalFormatException } if given string is not well formatted . This method catches it and return * original , not formatted string if exception happened ....
if ( format == null ) { return null ; } if ( format . isEmpty ( ) ) { return "" ; } if ( args . length == 0 ) { return format ; } for ( int i = 0 ; i < args . length ; i ++ ) { if ( args [ i ] instanceof Class ) { args [ i ] = ( ( Class < ? > ) args [ i ] ) . getCanonicalName ( ) ; } else if ( args [ i ] instanceof Thr...
public class CoinbaseAccountServiceRaw { /** * Authenticated resource that shows the current user accounts . * @ see < a * href = " https : / / developers . coinbase . com / api / v2 # list - accounts " > developers . coinbase . com / api / v2 # list - accounts < / a > */ public List < CoinbaseAccount > getCoinbase...
String apiKey = exchange . getExchangeSpecification ( ) . getApiKey ( ) ; BigDecimal timestamp = coinbase . getTime ( Coinbase . CB_VERSION_VALUE ) . getData ( ) . getEpoch ( ) ; return coinbase . getAccounts ( Coinbase . CB_VERSION_VALUE , apiKey , signatureCreator2 , timestamp ) . getData ( ) ;
public class TransformResourcesMarshaller { /** * Marshall the given parameter object . */ public void marshall ( TransformResources transformResources , ProtocolMarshaller protocolMarshaller ) { } }
if ( transformResources == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( transformResources . getInstanceType ( ) , INSTANCETYPE_BINDING ) ; protocolMarshaller . marshall ( transformResources . getInstanceCount ( ) , INSTANCECOUNT_BINDING ...
public class AbstractLinkedList { /** * Concatenates two linked lists . All elements of the specified list ( which will be empty afterwards ) are added at * the end of this list . This operation runs in constant time . * @ param other * the list to append , */ public void concat ( AbstractLinkedList < ? extends E...
if ( other . isEmpty ( ) ) { return ; } if ( isEmpty ( ) ) { head = other . head ; last = other . last ; } else { T otherHead = other . head ; last . setNext ( otherHead ) ; otherHead . setPrev ( last ) ; last = other . last ; } size += other . size ; other . clear ( ) ;
public class SpringBindRegistry { /** * register . * @ param type a { @ link java . lang . Class } object . * @ param name a { @ link java . lang . String } object . * @ param args a { @ link java . lang . Object } object . */ public void register ( Class < ? > type , String name , Object ... args ) { } }
Assert . notNull ( name , "class'name is null" ) ; if ( 0 == args . length ) { nameTypes . put ( name , type ) ; } else { // 注册bean的name和别名 BeanDefinition bd = ( BeanDefinition ) args [ 0 ] ; definitionRegistry . registerBeanDefinition ( name , bd ) ; // for list ( a . class , b . class ) binding usage String alias = b...
public class Graphics { /** * Draw the the given shape filled in with a texture * @ param shape * The shape to texture . * @ param image * The image to tile across the shape * @ param scaleX * The scale to apply on the x axis for texturing * @ param scaleY * The scale to apply on the y axis for texturin...
texture ( shape , image , scaleX , scaleY , false ) ;
public class FidelityOptions { /** * Creates fidelity options using strict option . Note : no namespace * prefixes , comments etc are preserved nor schema deviations are allowed . * @ return default fidelity options */ public static FidelityOptions createStrict ( ) { } }
FidelityOptions fo = new FidelityOptions ( ) ; fo . options . add ( FEATURE_STRICT ) ; fo . isStrict = true ; return fo ;
public class GeometryIndexService { /** * Given a certain geometry and index ( one ) , check if the the other index ( two ) is a neighbor . * @ param geometry * The geometry wherein to search if indices one and two are neighbors . * @ param one * One of the indices . Must point to either a vertex or and edge . ...
List < GeometryIndex > neighbors = null ; try { if ( isVertex ( two ) ) { neighbors = getAdjacentVertices ( geometry , one ) ; } else if ( isEdge ( two ) ) { neighbors = getAdjacentEdges ( geometry , one ) ; } } catch ( GeometryIndexNotFoundException e ) { return false ; } if ( neighbors != null ) { for ( GeometryIndex...
public class ServiceLoaderUtil { /** * Finds all implementations of the given service type and creates their instances . * @ param clazz service type * @ return implementations ' stream of the given service type */ public static < T > Stream < T > findAll ( Class < T > clazz ) { } }
ServiceLoader < T > load = ServiceLoader . load ( clazz ) ; return StreamSupport . stream ( load . spliterator ( ) , false ) ;
public class CasCoreWebConfiguration { /** * Load property files containing non - i18n fallback values * that should be exposed to Thyme templates . * keys in properties files added last will take precedence over the * internal cas _ common _ messages . properties . * Keys in regular messages bundles will overr...
val properties = new PropertiesFactoryBean ( ) ; val resourceLoader = new DefaultResourceLoader ( ) ; val commonNames = casProperties . getMessageBundle ( ) . getCommonNames ( ) ; val resourceList = commonNames . stream ( ) . map ( resourceLoader :: getResource ) . collect ( Collectors . toList ( ) ) ; resourceList . a...
public class HttpProxyRequest { /** * Returns the host to which we are connecting . */ public synchronized final String getHost ( ) { } }
if ( host == null ) { if ( getEndpointAddress ( ) != null && ! getEndpointAddress ( ) . isUnresolved ( ) ) { host = getEndpointAddress ( ) . getHostName ( ) ; } if ( host == null && httpURI != null ) { try { host = ( new URL ( httpURI ) ) . getHost ( ) ; } catch ( MalformedURLException e ) { logger . debug ( "Malformed...
public class AmazonEC2Client { /** * Deletes one or more specified VPC endpoints . Deleting a gateway endpoint also deletes the endpoint routes in the * route tables that were associated with the endpoint . Deleting an interface endpoint deletes the endpoint network * interfaces . * @ param deleteVpcEndpointsRequ...
request = beforeClientExecution ( request ) ; return executeDeleteVpcEndpoints ( request ) ;
public class InternalXtextParser { /** * InternalXtext . g : 3294:1 : ruleAbstractNegatedToken returns [ EObject current = null ] : ( this _ NegatedToken _ 0 = ruleNegatedToken | this _ UntilToken _ 1 = ruleUntilToken ) ; */ public final EObject ruleAbstractNegatedToken ( ) throws RecognitionException { } }
EObject current = null ; EObject this_NegatedToken_0 = null ; EObject this_UntilToken_1 = null ; enterRule ( ) ; try { // InternalXtext . g : 3300:2 : ( ( this _ NegatedToken _ 0 = ruleNegatedToken | this _ UntilToken _ 1 = ruleUntilToken ) ) // InternalXtext . g : 3301:2 : ( this _ NegatedToken _ 0 = ruleNegatedToken ...
public class AfplibPackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getBCA ( ) { } }
if ( bcaEClass == null ) { bcaEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( AfplibPackage . eNS_URI ) . getEClassifiers ( ) . get ( 195 ) ; } return bcaEClass ;
public class br_restoreconfig { /** * < pre > * Use this operation to restore config from file on Repeater Instances in bulk . * < / pre > */ public static br_restoreconfig [ ] restoreconfig ( nitro_service client , br_restoreconfig [ ] resources ) throws Exception { } }
if ( resources == null ) throw new Exception ( "Null resource array" ) ; if ( resources . length == 1 ) return ( ( br_restoreconfig [ ] ) resources [ 0 ] . perform_operation ( client , "restoreconfig" ) ) ; return ( ( br_restoreconfig [ ] ) perform_operation_bulk_request ( client , resources , "restoreconfig" ) ) ;
public class SyntheticPropertyList { /** * Adds a property to this index , with the specified direction . * @ param propertyName name of property to add to index * @ param direction optional direction of property */ public void addProperty ( String propertyName , Direction direction ) { } }
if ( propertyName == null ) { throw new IllegalArgumentException ( ) ; } if ( direction == null ) { direction = Direction . UNSPECIFIED ; } if ( direction != Direction . UNSPECIFIED ) { if ( propertyName . length ( ) > 0 ) { if ( propertyName . charAt ( 0 ) == '-' || propertyName . charAt ( 0 ) == '+' ) { // Overrule t...
public class CrossTabColorShema { /** * Sets the color for each total for the row * @ param row ( starting from 1) * @ param color */ public void setTotalColorForRow ( int row , Color color ) { } }
int map = ( colors [ 0 ] . length - 1 ) - row ; colors [ colors . length - 1 ] [ map ] = color ;
public class AptUtils { /** * Checks that the annotation { @ code am } has the name of { @ code anno } . * Values are ignored . */ public static boolean areSameByClass ( AnnotationMirror am , Class < ? extends Annotation > anno ) { } }
return areSameByName ( am , anno . getCanonicalName ( ) . intern ( ) ) ;
public class DevicesInner { /** * Uploads registration certificate for the device . * @ param deviceName The device name . * @ param resourceGroupName The resource group name . * @ param parameters The upload certificate request . * @ throws IllegalArgumentException thrown if parameters fail the validation * ...
if ( deviceName == null ) { throw new IllegalArgumentException ( "Parameter deviceName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == ...
public class AromaticityCalculator { /** * Tests the < code > ring < / code > in the < code > molecule < / code > for aromaticity . Uses the * H & uuml ; ckel rule ( 4n + 2 ) pie electrons . sp < sup > 2 < / sup > hybridized C contibute 1 electron non * sp < sup > 2 < / sup > hybridized heteroatoms contribute 2 ele...
java . util . Iterator < IAtom > ringAtoms = ring . atoms ( ) . iterator ( ) ; int eCount = 0 ; java . util . List < IBond > conectedBonds ; int numDoubleBond = 0 ; boolean allConnectedBondsSingle ; while ( ringAtoms . hasNext ( ) ) { IAtom atom = ringAtoms . next ( ) ; numDoubleBond = 0 ; allConnectedBondsSingle = tru...
public class BasicUserProfile { /** * Check to see if profile contains attribute name . * @ param name the name * @ return true / false */ @ Override public boolean containsAttribute ( final String name ) { } }
CommonHelper . assertNotNull ( "name" , name ) ; return this . attributes . containsKey ( name ) ;
public class BitSetHelper { /** * Extract the long representation of the passed bit set . To avoid loss of * data , the bit set may not have more than 64 bits . * @ param aBS * The bit set to extract the value from . May not be < code > null < / code > . * @ return The extracted value . May be negative if the b...
ValueEnforcer . notNull ( aBS , "BitSet" ) ; final int nMax = aBS . length ( ) ; ValueEnforcer . isTrue ( nMax <= CGlobal . BITS_PER_LONG , ( ) -> "Can extract only up to " + CGlobal . BITS_PER_LONG + " bits" ) ; long ret = 0 ; for ( int i = nMax - 1 ; i >= 0 ; -- i ) { ret <<= 1 ; if ( aBS . get ( i ) ) ret += CGlobal...
public class SplitterNode { /** * Gets the child node splits . * @ return A list of child node splits */ public List < Double > getSplits ( ) { } }
List < Double > splits = new ArrayList < Double > ( ) ; for ( Node curNode : getVisibleChildren ( ) ) { splits . add ( nodeSplits . get ( curNode ) ) ; } return splits ;
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link AbstractFeatureType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link AbstractFeatureType } { @ co...
return new JAXBElement < AbstractFeatureType > ( __Feature_QNAME , AbstractFeatureType . class , null , value ) ;
public class DocumentRevisionTree { /** * < p > Returns whether this document is conflicted . < / p > * @ return true if there is more than one branch terminated by an active * leaf revision , otherwise false */ public boolean hasConflicts ( ) { } }
int count = 0 ; for ( DocumentRevisionNode n : leafs ) { if ( ! n . getData ( ) . isDeleted ( ) ) { count ++ ; if ( count > 1 ) { return true ; } } } return false ;
public class BaseFont { /** * Gets the width of a < CODE > String < / CODE > in normalized 1000 units . * @ param text the < CODE > String < / CODE > to get the width of * @ return the width in normalized 1000 units */ public int getWidth ( String text ) { } }
int total = 0 ; if ( fastWinansi ) { int len = text . length ( ) ; for ( int k = 0 ; k < len ; ++ k ) { char char1 = text . charAt ( k ) ; if ( char1 < 128 || ( char1 >= 160 && char1 <= 255 ) ) total += widths [ char1 ] ; else total += widths [ PdfEncodings . winansi . get ( char1 ) ] ; } return total ; } else { byte m...
public class ReadStreamIterator { /** * Create a stream iterator that can enforce shard boundary semantics . * @ param auth The OfflineAuth to use for the request . * @ param request The request for the shard of data . * @ param shardBoundary The shard boundary semantics to enforce . * @ param fields Which fiel...
return ReadStreamIterator . enforceShardBoundary ( GenomicsChannel . fromOfflineAuth ( auth , fields ) , request , shardBoundary , fields ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcPath ( ) { } }
if ( ifcPathEClass == null ) { ifcPathEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 407 ) ; } return ifcPathEClass ;
public class NodeUtil { /** * @ return Whether the provided expression is known not to evaluate to ' undefined ' . * Similar to # getKnownValueType only for ' undefined ' . This is useful for simplifying * default value expressions . */ static boolean isDefinedValue ( Node value ) { } }
switch ( value . getToken ( ) ) { case ASSIGN : // Only the assigned value matters here . case CAST : case COMMA : return isDefinedValue ( value . getLastChild ( ) ) ; case AND : case OR : return isDefinedValue ( value . getFirstChild ( ) ) && isDefinedValue ( value . getLastChild ( ) ) ; case HOOK : return isDefinedVa...
public class ListManagementTermsImpl { /** * Gets all terms from the list with list Id equal to the list Id passed . * @ param listId List Id of the image list . * @ param language Language of the terms . * @ param getAllTermsOptionalParameter the object representing the optional parameters to be set before calli...
return getAllTermsWithServiceResponseAsync ( listId , language , getAllTermsOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class PoolBase { /** * Set the query timeout , if it is supported by the driver . * @ param statement a statement to set the query timeout on * @ param timeoutSec the number of seconds before timeout */ private void setQueryTimeout ( final Statement statement , final int timeoutSec ) { } }
if ( isQueryTimeoutSupported != FALSE ) { try { statement . setQueryTimeout ( timeoutSec ) ; isQueryTimeoutSupported = TRUE ; } catch ( Exception e ) { if ( isQueryTimeoutSupported == UNINITIALIZED ) { isQueryTimeoutSupported = FALSE ; logger . info ( "{} - Failed to set query timeout for statement. ({})" , poolName , ...
public class WebAppSecurityCollaboratorImpl { /** * no null check for webReply object , so make sure it is not null upon calling this method . */ private void logAuditEntriesBeforeAuthn ( WebReply webReply , Subject receivedSubject , String uriName , WebRequest webRequest ) { } }
AuthenticationResult authResult ; if ( webReply instanceof PermitReply ) { authResult = new AuthenticationResult ( AuthResult . SUCCESS , receivedSubject , null , null , AuditEvent . OUTCOME_SUCCESS ) ; } else { authResult = new AuthenticationResult ( AuthResult . FAILURE , receivedSubject , null , null , AuditEvent . ...
public class BsJobLog { @ Override public Map < String , Object > toSource ( ) { } }
Map < String , Object > sourceMap = new HashMap < > ( ) ; if ( endTime != null ) { addFieldToSource ( sourceMap , "endTime" , endTime ) ; } if ( jobName != null ) { addFieldToSource ( sourceMap , "jobName" , jobName ) ; } if ( jobStatus != null ) { addFieldToSource ( sourceMap , "jobStatus" , jobStatus ) ; } if ( lastU...
public class BaseNeo4jAssociationQueries { /** * Returns the relationship corresponding to the { @ link AssociationKey } and { @ link RowKey } . * @ param executionEngine the { @ link GraphDatabaseService } used to run the query * @ param associationKey represents the association * @ param rowKey represents a row...
Object [ ] relationshipValues = relationshipValues ( associationKey , rowKey ) ; Object [ ] queryValues = ArrayHelper . concat ( associationKey . getEntityKey ( ) . getColumnValues ( ) , relationshipValues ) ; Result result = executionEngine . execute ( findRelationshipQuery , params ( queryValues ) ) ; return singleRe...
public class PeriodicReplicationService { /** * Set a flag in SharedPreferences to indicate whether periodic replications were explicitly * stopped . * @ param explicitlyStopped true to indicate that periodic replications were stopped * explicitly by the sending of COMMAND _ STOP _ PERIODIC _ REPLICATION , * ot...
SharedPreferences . Editor editor = mPrefs . edit ( ) ; editor . putBoolean ( constructKey ( EXPLICITLY_STOPPED_SUFFIX ) , explicitlyStopped ) ; editor . apply ( ) ;
public class LongStreamEx { /** * Returns the minimum element of this stream according to the provided key * extractor function . * This is a terminal operation . * @ param keyExtractor a non - interfering , stateless function * @ return an { @ code OptionalLong } describing the first element of this * stream...
long [ ] result = collect ( ( ) -> new long [ 3 ] , ( acc , l ) -> { long key = keyExtractor . applyAsLong ( l ) ; if ( acc [ 2 ] == 0 || acc [ 1 ] > key ) { acc [ 0 ] = l ; acc [ 1 ] = key ; acc [ 2 ] = 1 ; } } , ( acc1 , acc2 ) -> { if ( acc2 [ 2 ] == 1 && ( acc1 [ 2 ] == 0 || acc1 [ 1 ] > acc2 [ 1 ] ) ) System . arr...
public class SmsClient { /** * Get the detail of message template * @ param request The request object which includes the id of template which is ready to be get * @ return The response object which includes all of the detail of message template , refer to * < code > com . baidubce . services . sms . model . GetT...
checkNotNull ( request , "object request should not be null." ) ; assertStringNotNullOrEmpty ( request . getTemplateId ( ) , "object templateId should not be null or empty." ) ; InternalRequest internalRequest = this . createRequest ( "template" , request , HttpMethodName . GET , request . getTemplateId ( ) ) ; return ...
public class Transformation2D { /** * Set transformation to a shear . * @ param proportionX * The proportion of shearing in x direction . * @ param proportionY * The proportion of shearing in y direction . */ public void setShear ( double proportionX , double proportionY ) { } }
xx = 1 ; xy = proportionX ; xd = 0 ; yx = proportionY ; yy = 1 ; yd = 0 ;
public class AssessmentRunNotificationMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AssessmentRunNotification assessmentRunNotification , ProtocolMarshaller protocolMarshaller ) { } }
if ( assessmentRunNotification == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( assessmentRunNotification . getDate ( ) , DATE_BINDING ) ; protocolMarshaller . marshall ( assessmentRunNotification . getEvent ( ) , EVENT_BINDING ) ; protoco...
public class CreateFunctionRequest { /** * A list of < a href = " https : / / docs . aws . amazon . com / lambda / latest / dg / tagging . html " > tags < / a > to apply to the function . * @ param tags * A list of < a href = " https : / / docs . aws . amazon . com / lambda / latest / dg / tagging . html " > tags <...
setTags ( tags ) ; return this ;
public class DBPropertiesUpdate { /** * inserts a new language into the Database . * @ param _ language language to be inserted * @ return ID of the new language */ private long insertNewLanguage ( final String _language ) { } }
Long ret = null ; try { final Insert insert = new Insert ( CIAdmin . Language ) ; insert . add ( CIAdmin . Language . Language , _language ) ; insert . executeWithoutAccessCheck ( ) ; ret = insert . getId ( ) ; insert . close ( ) ; } catch ( final EFapsException e ) { DBPropertiesUpdate . LOG . error ( "insertNewLangua...
public class Utils { /** * Must call when epoll is available */ private static Class < ? extends Channel > epollChannelType ( ) { } }
try { Class < ? extends Channel > channelType = Class . forName ( "io.netty.channel.epoll.EpollSocketChannel" ) . asSubclass ( Channel . class ) ; return channelType ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( "Cannot load EpollSocketChannel" , e ) ; }
public class A_CmsUploadDialog { /** * Removes the drag and drop message . < p > */ protected void removeDragAndDropMessage ( ) { } }
if ( m_dragAndDropMessage != null ) { m_dragAndDropMessage . removeFromParent ( ) ; m_dragAndDropMessage = null ; getContentWrapper ( ) . getElement ( ) . getStyle ( ) . clearBackgroundColor ( ) ; }
public class ValidatorTag { /** * < p > Create and return a new { @ link Validator } to be registered * on our surrounding { @ link UIComponent } . < / p > * @ throws JspException if a new instance cannot be created */ protected Validator createValidator ( ) throws JspException { } }
FacesContext context = FacesContext . getCurrentInstance ( ) ; Validator validator = null ; ValueExpression vb = null ; // If " binding " is set , use it to create a validator instance . if ( binding != null ) { try { vb = context . getApplication ( ) . getExpressionFactory ( ) . createValueExpression ( context . getEL...
public class BBox { /** * Calculates the intersecting BBox between this and the specified BBox * @ return the intersecting BBox or null if not intersecting */ public BBox calculateIntersection ( BBox bBox ) { } }
if ( ! this . intersects ( bBox ) ) return null ; double minLon = Math . max ( this . minLon , bBox . minLon ) ; double maxLon = Math . min ( this . maxLon , bBox . maxLon ) ; double minLat = Math . max ( this . minLat , bBox . minLat ) ; double maxLat = Math . min ( this . maxLat , bBox . maxLat ) ; return new BBox ( ...
public class RedisQueueFactory { /** * { @ inheritDoc } * @ throws Exception */ @ Override protected void initQueue ( T queue , QueueSpec spec ) throws Exception { } }
queue . setEphemeralDisabled ( getDefaultEphemeralDisabled ( ) ) . setEphemeralMaxSize ( getDefaultEphemeralMaxSize ( ) ) ; Boolean ephemeralDisabled = spec . getField ( QueueSpec . FIELD_EPHEMERAL_DISABLED , Boolean . class ) ; if ( ephemeralDisabled != null ) { queue . setEphemeralDisabled ( ephemeralDisabled . boole...
public class ChaiProviderFactory { /** * Maintains the global chai provider statistics . All { @ code com . novell . ldapchai . provider . ChaiProvider } instances * that have their { @ link ChaiSetting # STATISTICS _ ENABLE } set to < i > true < / i > will register statistics in * this global tracker . * @ retur...
final Map < String , String > debugProperties = new LinkedHashMap < > ( ) ; final ProviderStatistics providerStatistics = getCentralService ( ) . getStatsBean ( ) ; if ( providerStatistics != null ) { debugProperties . putAll ( providerStatistics . allStatistics ( ) ) ; } return Collections . unmodifiableMap ( debugPro...
public class RoutesApi { /** * Get route Get the systems between origin and destination - - - This route * is cached for up to 86400 seconds * @ param destination * destination solar system ID ( required ) * @ param origin * origin solar system ID ( required ) * @ param avoid * avoid solar system ID ( s )...
ApiResponse < List < Integer > > resp = getRouteOriginDestinationWithHttpInfo ( destination , origin , avoid , connections , datasource , flag , ifNoneMatch ) ; return resp . getData ( ) ;
public class ID3v1Tag { /** * Set the year field of the tag . The maximum size of the String is 4. * If the size exceeds the maximum size , the String will be truncated . * @ param newYear the year for the tag */ public void setYear ( String newYear ) { } }
if ( newYear . length ( ) > YEAR_SIZE ) { year = newYear . substring ( 0 , YEAR_SIZE ) ; } else { year = newYear ; }
public class HttpHeaders { /** * Get { @ link Map } representation of the HttpHeaders collection . * @ return the headers as map */ public Map < String , String > toMap ( ) { } }
final Map < String , String > result = new HashMap < > ( ) ; for ( final HttpHeader header : headers . values ( ) ) { result . put ( header . name ( ) , header . value ( ) ) ; } return result ;
public class BagArray { /** * Retrieve an indexed element and return it as a BagArray . * @ param index An integer value specifying the offset from the beginning of the array . * @ return The element as a BagArray , or null if the element is not found . */ public BagArray getBagArray ( int index ) { } }
Object object = getObject ( index ) ; try { return ( BagArray ) object ; } catch ( ClassCastException exception ) { log . warn ( "Cannot cast value type (" + object . getClass ( ) . getName ( ) + ") to BagArray for index (" + index + ")" ) ; } return null ;