signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class GrailsASTUtils { /** * Obtains the default constructor for the given class node . * @ param classNode The class node * @ return The default constructor or null if there isn ' t one */ public static ConstructorNode getDefaultConstructor ( ClassNode classNode ) { } }
for ( ConstructorNode cons : classNode . getDeclaredConstructors ( ) ) { if ( cons . getParameters ( ) . length == 0 ) { return cons ; } } return null ;
public class OperandStack { /** * duplicate top element */ public void dup ( ) { } }
ClassNode type = getTopOperand ( ) ; stack . add ( type ) ; MethodVisitor mv = controller . getMethodVisitor ( ) ; if ( type == ClassHelper . double_TYPE || type == ClassHelper . long_TYPE ) { mv . visitInsn ( DUP2 ) ; } else { mv . visitInsn ( DUP ) ; }
public class NettyLink { /** * Writes the message to this link . * @ param message the message */ @ Override public void write ( final T message ) { } }
LOG . log ( Level . FINEST , "write {0} :: {1}" , new Object [ ] { channel , message } ) ; final ChannelFuture future = channel . writeAndFlush ( Unpooled . wrappedBuffer ( encoder . encode ( message ) ) ) ; if ( listener != null ) { future . addListener ( new NettyChannelFutureListener < > ( message , listener ) ) ; }
public class PtoPInputHandler { /** * Puts a message to the forward routing path destination of a message . * Will throw an SINotAuthorizedException if the user is not allowed * to put a message to the destination along the forward routing path * @ param msg * @ param tran * @ param sourceCellule * @ return...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleFRPMessage" , new Object [ ] { msg , tran , sender , Boolean . valueOf ( msgFRP ) } ) ; List < SIDestinationAddress > frp = msg . getMessage ( ) . getForwardRoutingPath ( ) ; // Walk down the FRP until we come to a de...
public class PdfLister { /** * Visualizes a Stream . * @ param stream * @ param reader */ public void listStream ( PRStream stream , PdfReaderInstance reader ) { } }
try { listDict ( stream ) ; out . println ( "startstream" ) ; byte [ ] b = PdfReader . getStreamBytes ( stream ) ; // byte buf [ ] = new byte [ Math . min ( stream . getLength ( ) , 4096 ) ] ; // int r = 0; // stream . openStream ( reader ) ; // for ( ; ; ) { // r = stream . readStream ( buf , 0 , buf . length ) ; // i...
public class StringUtils { /** * < p > Converts a { @ code CharSequence } into an array of code points . < / p > * < p > Valid pairs of surrogate code units will be converted into a single supplementary * code point . Isolated surrogate code units ( i . e . a high surrogate not followed by a low surrogate or * a ...
if ( str == null ) { return null ; } if ( str . length ( ) == 0 ) { return ArrayUtils . EMPTY_INT_ARRAY ; } final String s = str . toString ( ) ; final int [ ] result = new int [ s . codePointCount ( 0 , s . length ( ) ) ] ; int index = 0 ; for ( int i = 0 ; i < result . length ; i ++ ) { result [ i ] = s . codePointAt...
public class AuthorizedUserSupport { /** * Returns the user object , or if there isn ' t one , throws an exception . * @ param servletRequest the HTTP servlet request . * @ return the user object . * @ throws HttpStatusException if the logged - in user isn ' t in the user * table , which means the user is not a...
AttributePrincipal principal = getUserPrincipal ( servletRequest ) ; E result = this . userDao . getByPrincipal ( principal ) ; if ( result == null ) { throw new HttpStatusException ( Status . FORBIDDEN , "User " + principal . getName ( ) + " is not authorized to use this resource" ) ; } return result ;
public class PrivateZonesInner { /** * Updates a Private DNS zone . Does not modify virtual network links or DNS records within the zone . * @ param resourceGroupName The name of the resource group . * @ param privateZoneName The name of the Private DNS zone ( without a terminating dot ) . * @ param parameters Pa...
return updateWithServiceResponseAsync ( resourceGroupName , privateZoneName , parameters , ifMatch ) . map ( new Func1 < ServiceResponse < PrivateZoneInner > , PrivateZoneInner > ( ) { @ Override public PrivateZoneInner call ( ServiceResponse < PrivateZoneInner > response ) { return response . body ( ) ; } } ) ;
public class MigrationTool { /** * Method for users migration . * @ throws Exception */ private void migrateUsers ( ) throws Exception { } }
Session session = service . getStorageSession ( ) ; try { if ( session . itemExists ( usersStorageOld ) ) { NodeIterator iterator = ( ( ExtendedNode ) session . getItem ( usersStorageOld ) ) . getNodesLazily ( ) ; UserHandlerImpl uh = ( ( UserHandlerImpl ) service . getUserHandler ( ) ) ; while ( iterator . hasNext ( )...
public class DescribeProvisionedProductResult { /** * Any CloudWatch dashboards that were created when provisioning the product . * @ param cloudWatchDashboards * Any CloudWatch dashboards that were created when provisioning the product . */ public void setCloudWatchDashboards ( java . util . Collection < CloudWatc...
if ( cloudWatchDashboards == null ) { this . cloudWatchDashboards = null ; return ; } this . cloudWatchDashboards = new java . util . ArrayList < CloudWatchDashboard > ( cloudWatchDashboards ) ;
public class ServiceResponseBuilder { /** * Register all the mappings from a response status code to a response * destination type stored in a { @ link Map } . * @ param responseTypes the mapping from response status codes to response types . * @ return the same builder instance . */ public ServiceResponseBuilder...
this . responseTypes . putAll ( responseTypes ) ; return this ;
public class NetworkMessageEntity { /** * Add an action . * @ param element The action type . * @ param value The action value . */ public void addAction ( M element , char value ) { } }
actions . put ( element , Character . valueOf ( value ) ) ;
public class OfferingManager { /** * Add a new offering in the repository * @ param offering the Offering to add * @ return the id of the added Offering */ public String addOffering ( Offering offering ) { } }
this . offeringsCollection . insertOne ( offering . toDBObject ( ) ) ; this . offeringNames . add ( offering . getName ( ) ) ; return offering . getName ( ) ;
public class FactionWarfareApi { /** * List of the top pilots in faction warfare ( asynchronously ) Top 100 * leaderboard of pilots for kills and victory points separated by total , * last week and yesterday - - - This route expires daily at 11:05 * @ param datasource * The server name you would like data from ...
com . squareup . okhttp . Call call = getFwLeaderboardsCharactersValidateBeforeCall ( datasource , ifNoneMatch , callback ) ; Type localVarReturnType = new TypeToken < FactionWarfareLeaderboardCharactersResponse > ( ) { } . getType ( ) ; apiClient . executeAsync ( call , localVarReturnType , callback ) ; return call ;
public class MulticastAppender { /** * Open the multicast sender for the < b > RemoteHost < / b > and < b > Port < / b > . */ public void activateOptions ( ) { } }
try { hostname = InetAddress . getLocalHost ( ) . getHostName ( ) ; } catch ( UnknownHostException uhe ) { try { hostname = InetAddress . getLocalHost ( ) . getHostAddress ( ) ; } catch ( UnknownHostException uhe2 ) { hostname = "unknown" ; } } // allow system property of application to be primary if ( application == n...
public class VoltTrace { /** * Creates and starts a new tracer . If one already exists , this is a * no - op . Synchronized to prevent multiple threads enabling it at the same * time . */ private static synchronized void start ( ) throws IOException { } }
if ( s_tracer == null ) { final VoltTrace tracer = new VoltTrace ( ) ; final Thread thread = new Thread ( tracer ) ; thread . setDaemon ( true ) ; thread . start ( ) ; s_tracer = tracer ; }
public class TempDir { /** * Create a file within this temporary directory , prepopulating the file from the given input stream . * @ param relativePath the relative path name * @ param sourceData the source input stream to use * @ return the file * @ throws IOException if the directory was closed at the time o...
final File tempFile = getFile ( relativePath ) ; boolean ok = false ; try { final FileOutputStream fos = new FileOutputStream ( tempFile ) ; try { VFSUtils . copyStream ( sourceData , fos ) ; fos . close ( ) ; sourceData . close ( ) ; ok = true ; return tempFile ; } finally { VFSUtils . safeClose ( fos ) ; } } finally ...
public class LiteralMapList { /** * Answer a LiteralMapList containing only literal maps with the given key and value * @ param key * @ param value * @ return */ public LiteralMapList select ( JcPrimitive key , Object value ) { } }
LiteralMapList ret = new LiteralMapList ( ) ; for ( LiteralMap lm : this ) { if ( isEqual ( value , lm . get ( ValueAccess . getName ( key ) ) ) ) ret . add ( lm ) ; } return ret ;
public class nsrpcnode { /** * Use this API to unset the properties of nsrpcnode resource . * Properties that need to be unset are specified in args array . */ public static base_response unset ( nitro_service client , nsrpcnode resource , String [ ] args ) throws Exception { } }
nsrpcnode unsetresource = new nsrpcnode ( ) ; unsetresource . ipaddress = resource . ipaddress ; return unsetresource . unset_resource ( client , args ) ;
public class SimpleDocumentDbRepository { /** * save entity without partition * @ param entity to be saved * @ param < S > * @ return entity */ @ Override public < S extends T > S save ( S entity ) { } }
Assert . notNull ( entity , "entity must not be null" ) ; // save entity if ( information . isNew ( entity ) ) { return operation . insert ( information . getCollectionName ( ) , entity , createKey ( information . getPartitionKeyFieldValue ( entity ) ) ) ; } else { operation . upsert ( information . getCollectionName (...
public class KeyVaultClientBaseImpl { /** * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault . * In order to perform this operation , the key must already exist in the Key Vault . Note : The cryptographic material of a k...
return ServiceFuture . fromResponse ( updateKeyWithServiceResponseAsync ( vaultBaseUrl , keyName , keyVersion ) , serviceCallback ) ;
public class TitlePaneCloseButtonPainter { /** * Create the edge of the button . * @ param width the width . * @ param height the height . * @ return the shape of the edge . */ private Shape decodeEdge ( int width , int height ) { } }
path . reset ( ) ; path . moveTo ( width - 2 , 0 ) ; path . lineTo ( width - 2 , height - 4 ) ; path . lineTo ( width - 4 , height - 2 ) ; path . lineTo ( 0 , height - 2 ) ; return path ;
public class CommerceShippingFixedOptionPersistenceImpl { /** * Returns the commerce shipping fixed option with the primary key or returns < code > null < / code > if it could not be found . * @ param primaryKey the primary key of the commerce shipping fixed option * @ return the commerce shipping fixed option , or...
Serializable serializable = entityCache . getResult ( CommerceShippingFixedOptionModelImpl . ENTITY_CACHE_ENABLED , CommerceShippingFixedOptionImpl . class , primaryKey ) ; if ( serializable == nullModel ) { return null ; } CommerceShippingFixedOption commerceShippingFixedOption = ( CommerceShippingFixedOption ) serial...
public class ApiOvhMe { /** * Get this object properties * REST : GET / me / refund / { refundId } * @ param refundId [ required ] */ public OvhRefund refund_refundId_GET ( String refundId ) throws IOException { } }
String qPath = "/me/refund/{refundId}" ; StringBuilder sb = path ( qPath , refundId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhRefund . class ) ;
public class JDBCConnection { /** * < ! - - start generic documentation - - > * Undoes all changes made in the current transaction * and releases any database locks currently held * by this < code > Connection < / code > object . This method should be * used only when auto - commit mode has been disabled . * ...
checkClosed ( ) ; try { sessionProxy . rollback ( false ) ; } catch ( HsqlException e ) { throw Util . sqlException ( e ) ; }
public class SessionsInner { /** * Gets an integration account session . * @ param resourceGroupName The resource group name . * @ param integrationAccountName The integration account name . * @ param sessionName The integration account session name . * @ throws IllegalArgumentException thrown if parameters fai...
return getWithServiceResponseAsync ( resourceGroupName , integrationAccountName , sessionName ) . map ( new Func1 < ServiceResponse < IntegrationAccountSessionInner > , IntegrationAccountSessionInner > ( ) { @ Override public IntegrationAccountSessionInner call ( ServiceResponse < IntegrationAccountSessionInner > respo...
public class RestRequestBuilder { /** * Add a query parameter . If a null or empty array is passed , the param is ignored . * @ param name Name of the parameter * @ param values Value of the parameter * @ return this builder */ public RestRequestBuilder < B , R > addQueryParam ( String name , Object [ ] values ) ...
if ( null != values ) { List < Object > allValues = getQueryParams ( name ) ; for ( Object value : values ) { allValues . add ( value ) ; } } return this ;
public class CombinedTrackerScalePoint { /** * Tracks features in the list using KLT and update their state */ private void trackUsingKlt ( List < CombinedTrack < TD > > tracks ) { } }
for ( int i = 0 ; i < tracks . size ( ) ; ) { CombinedTrack < TD > track = tracks . get ( i ) ; if ( ! trackerKlt . performTracking ( track . track ) ) { // handle the dropped track tracks . remove ( i ) ; tracksDormant . add ( track ) ; } else { track . set ( track . track . x , track . track . y ) ; i ++ ; } }
public class Version { /** * Tries to parse the given String as a semantic version and returns whether the * String is properly formatted according to the semantic version specification . * Note : this method does not throw an exception upon < code > null < / code > input , but * returns < code > false < / code >...
return version != null && ! version . isEmpty ( ) && parse ( version , true ) != null ;
public class ServletDescriptor { /** * register the service with the given { @ link org . osgi . service . http . HttpService } if not already registered and the given service is not * < code > null < / code > * @ param service a { @ link org . osgi . service . http . HttpService } object . * @ throws org . osgi ...
if ( service != null ) { if ( this . service == null ) { LOG . info ( "register new servlet on mountpoint {} with contextParams {}" , getAlias ( ) , contextParams ) ; service . registerServlet ( getAlias ( ) , servlet , contextParams , httpContext ) ; this . service = service ; } else { if ( this . service != service )...
public class HTTPClientInterface { /** * Look to get session if no session found or created fallback to always authenticate mode . */ public AuthenticationResult authenticate ( HttpServletRequest request ) { } }
HttpSession session = null ; AuthenticationResult authResult = null ; if ( ! HTTP_DONT_USE_SESSION && ! m_dontUseSession ) { try { session = request . getSession ( ) ; if ( session != null ) { if ( session . isNew ( ) ) { session . setMaxInactiveInterval ( MAX_SESSION_INACTIVITY_SECONDS ) ; } authResult = ( Authenticat...
public class CreateWSDL { /** * ScanProcesses Method . */ public void scanProcesses ( Object typeObject , OperationType type ) { } }
String strTargetVersion = this . getProperty ( "version" ) ; if ( strTargetVersion == null ) strTargetVersion = this . getDefaultVersion ( ) ; Record recMessageTransport = ( ( ReferenceField ) this . getRecord ( MessageControl . MESSAGE_CONTROL_FILE ) . getField ( MessageControl . WEB_MESSAGE_TRANSPORT_ID ) ) . getRefe...
public class XsdGeneratorHelper { /** * Converts the provided DOM Node to a pretty - printed XML - formatted string . * @ param node The Node whose children should be converted to a String . * @ return a pretty - printed XML - formatted string . */ protected static String getHumanReadableXml ( final Node node ) { }...
StringWriter toReturn = new StringWriter ( ) ; try { Transformer transformer = getFactory ( ) . newTransformer ( ) ; transformer . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; transformer . setOutputProperty ( OutputKeys . STANDALONE , "yes" ) ; transformer . transform ( new DOMSource ( node ) , new StreamResult...
public class CompilerOptions { /** * A private utility function to verify that the directory is really a * directory , exists , and absolute . * @ param dirs * directory to check * @ param dtype * name to use in case of errors */ private void checkDirectory ( File d , String dtype ) { } }
if ( ! d . isAbsolute ( ) ) { throw new IllegalArgumentException ( dtype + " directory must be an absolute path (" + d . getPath ( ) + ")" ) ; } if ( ! d . exists ( ) ) { throw new IllegalArgumentException ( dtype + " directory does not exist (" + d . getPath ( ) + ")" ) ; } if ( ! d . isDirectory ( ) ) { throw new Ill...
public class ConcurrentServiceReferenceSet { /** * Return an iterator for the elements in service ranking order . */ private Iterator < ConcurrentServiceReferenceElement < T > > elements ( ) { } }
Collection < ConcurrentServiceReferenceElement < T > > set ; synchronized ( elementMap ) { if ( elementSetUnsorted ) { elementSet = new ConcurrentSkipListSet < ConcurrentServiceReferenceElement < T > > ( elementMap . values ( ) ) ; elementSetUnsorted = false ; } set = elementSet ; } return set . iterator ( ) ;
public class AmazonDaxClient { /** * Modifies the parameters of a parameter group . You can modify up to 20 parameters in a single request by * submitting a list parameter name and value pairs . * @ param updateParameterGroupRequest * @ return Result of the UpdateParameterGroup operation returned by the service ....
request = beforeClientExecution ( request ) ; return executeUpdateParameterGroup ( request ) ;
public class CharsTrie { /** * Traverses the trie from the initial state for the * one or two UTF - 16 code units for this input code point . * Equivalent to reset ( ) . nextForCodePoint ( cp ) . * @ param cp A Unicode code point 0 . . 0x10ffff . * @ return The match / value Result . */ public Result firstForCo...
return cp <= 0xffff ? first ( cp ) : ( first ( UTF16 . getLeadSurrogate ( cp ) ) . hasNext ( ) ? next ( UTF16 . getTrailSurrogate ( cp ) ) : Result . NO_MATCH ) ;
public class Dot { /** * Setting up background for the view . Should pass shapes for both filled and empty dots . * Otherwise will use the default backgrounds */ private void setBackground ( boolean filled ) { } }
if ( filled ) { final int background = styledAttributes . getResourceId ( R . styleable . PinLock_statusFilledBackground , R . drawable . dot_filled ) ; setBackgroundResource ( background ) ; } else { final int background = styledAttributes . getResourceId ( R . styleable . PinLock_statusEmptyBackground , R . drawable ...
public class ApptentiveInternal { /** * / * Apply Apptentive styling layers to the theme to be used by interaction . The layers include * Apptentive defaults , and app / activity theme inheritance and app specific overrides . * When the Apptentive fragments are hosted by ApptentiveViewActivity ( by default ) , the ...
/* Step 1 : Apply Apptentive default theme layer . * If host activity is an activity , the base theme already has Apptentive defaults applied , so skip Step 1. * If parent activity is NOT an activity , first apply Apptentive defaults . */ if ( ! ( context instanceof Activity ) ) { // If host context is not an activ...
public class Features { /** * Checks the value of the specified feature . Will return false for features * that have not been specified . Implementations should rely on * { @ link # contains ( String ) } in addition to this method . * @ param feature * The feature to check * @ return If the feature is true . ...
Boolean result = features . get ( feature ) ; return ( result != null ) ? result : false ;
public class XMLStreamEvents { /** * Remove and return the attribute for the given namespace prefix and local name if it exists . */ public Attribute removeAttributeWithPrefix ( CharSequence prefix , CharSequence name ) { } }
for ( Iterator < Attribute > it = event . attributes . iterator ( ) ; it . hasNext ( ) ; ) { Attribute attr = it . next ( ) ; if ( attr . localName . equals ( name ) && attr . namespacePrefix . equals ( prefix ) ) { it . remove ( ) ; return attr ; } } return null ;
public class ProxyFactory { /** * The four partition - related artifacts */ public static PartitionReducerProxy createPartitionReducerProxy ( String id , InjectionReferences injectionRefs , RuntimeStepExecution stepContext ) throws ArtifactValidationException { } }
PartitionReducer loadedArtifact = ( PartitionReducer ) loadArtifact ( id , injectionRefs ) ; PartitionReducerProxy proxy = new PartitionReducerProxy ( loadedArtifact ) ; proxy . setStepContext ( stepContext ) ; return proxy ;
public class InputDescription { /** * Returns the in - application stream names that are mapped to the stream source . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setInAppStreamNames ( java . util . Collection ) } or { @ link # withInAppStreamNames ( java...
if ( this . inAppStreamNames == null ) { setInAppStreamNames ( new java . util . ArrayList < String > ( inAppStreamNames . length ) ) ; } for ( String ele : inAppStreamNames ) { this . inAppStreamNames . add ( ele ) ; } return this ;
public class ContentExposingResource { /** * This method does two things : * - Throws an exception if an authorization has both accessTo and accessToClass * - Adds a default accessTo target if an authorization has neither accessTo nor accessToClass * @ param resource the fedora resource * @ param inputModel to ...
if ( resource . isAcl ( ) ) { final Set < Node > uniqueAuthSubjects = new HashSet < > ( ) ; inputModel . listStatements ( ) . forEachRemaining ( ( final Statement s ) -> { LOGGER . debug ( "statement: s={}, p={}, o={}" , s . getSubject ( ) , s . getPredicate ( ) , s . getObject ( ) ) ; final Node subject = s . getSubje...
public class RouteFilterRulesInner { /** * Gets the specified rule from a route filter . * @ param resourceGroupName The name of the resource group . * @ param routeFilterName The name of the route filter . * @ param ruleName The name of the rule . * @ throws IllegalArgumentException thrown if parameters fail t...
return getWithServiceResponseAsync ( resourceGroupName , routeFilterName , ruleName ) . map ( new Func1 < ServiceResponse < RouteFilterRuleInner > , RouteFilterRuleInner > ( ) { @ Override public RouteFilterRuleInner call ( ServiceResponse < RouteFilterRuleInner > response ) { return response . body ( ) ; } } ) ;
public class SibRaSingleProcessListener { /** * Returns the expiry time for message locks . * @ return zero to indicate that message locks should not be used */ long getMessageLockExpiry ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { final String methodName = "getMessageLockExpiry" ; SibTr . entry ( this , TRACE , methodName ) ; SibTr . exit ( this , TRACE , methodName , "0" ) ; } return 0 ;
public class ContentResourceImpl { /** * Adds content to a space . * @ return the checksum of the content as computed by the storage provider */ @ Override public String addContent ( String spaceID , String contentID , InputStream content , String contentMimeType , Map < String , String > userProperties , long conten...
IdUtil . validateContentId ( contentID ) ; validateProperties ( userProperties , "add content" , spaceID , contentID ) ; try { StorageProvider storage = storageProviderFactory . getStorageProvider ( storeID ) ; try { // overlay new properties on top of older extended properties // so that old tags and custom properties...
public class Monetary { /** * Checks if a { @ link MonetaryRounding } matching the query is available . * @ param roundingQuery The { @ link javax . money . RoundingQuery } that may contains arbitrary parameters to be * evaluated . * @ return true , if a corresponding { @ link javax . money . MonetaryRounding } i...
return Optional . ofNullable ( monetaryRoundingsSingletonSpi ( ) ) . orElseThrow ( ( ) -> new MonetaryException ( "No MonetaryRoundingsSpi loaded, query functionality is not available." ) ) . isRoundingAvailable ( roundingQuery ) ;
public class StylesheetRoot { /** * This internal method allows the setting of the java class * to handle the extension function ( if other than the default one ) . * @ xsl . usage internal */ public String setExtensionHandlerClass ( String handlerClassName ) { } }
String oldvalue = m_extensionHandlerClass ; m_extensionHandlerClass = handlerClassName ; return oldvalue ;
public class Either { /** * If a right value , unwrap it and apply it to < code > rightFn < / code > , returning the resulting * < code > Either & lt ; L , R & gt ; < / code > . Otherwise , return the left value . * Note that because this monadic form of < code > flatMap < / code > only supports mapping over a theo...
return match ( Either :: left , rightFn . andThen ( Monad < R2 , Either < L , ? > > :: coerce ) ) ;
public class Requirement { /** * < pre > * Allows extending whitelists of rules with the specified rule _ id . If this * field is specified then all fields except whitelist , whitelist _ regexp , * only _ apply _ to and only _ apply _ to _ regexp are ignored . * < / pre > * < code > optional string extends = ...
java . lang . Object ref = extends_ ; if ( ref instanceof java . lang . String ) { com . google . protobuf . ByteString b = com . google . protobuf . ByteString . copyFromUtf8 ( ( java . lang . String ) ref ) ; extends_ = b ; return b ; } else { return ( com . google . protobuf . ByteString ) ref ; }
public class CommerceWishListItemPersistenceImpl { /** * Returns an ordered range of all the commerce wish list items where CPInstanceUuid = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not prim...
boolean pagination = true ; FinderPath finderPath = null ; Object [ ] finderArgs = null ; if ( ( start == QueryUtil . ALL_POS ) && ( end == QueryUtil . ALL_POS ) && ( orderByComparator == null ) ) { pagination = false ; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CPINSTANCEUUID ; finderArgs = new Object [ ] { C...
public class CmsShellCommands { /** * Create a web OU * @ param ouFqn the fully qualified name of the OU * @ param description the description of the OU * @ param hideLogin flag , indicating if the OU should be hidden from the login form . * @ return the created OU , or < code > null < / code > if creation fail...
try { return OpenCms . getOrgUnitManager ( ) . createOrganizationalUnit ( m_cms , ouFqn , description , ( hideLogin ? CmsOrganizationalUnit . FLAG_HIDE_LOGIN : 0 ) | CmsOrganizationalUnit . FLAG_WEBUSERS , null ) ; } catch ( CmsException e ) { // TODO Auto - generated catch block m_shell . getOut ( ) . println ( getMes...
public class CellConstraints { /** * Checks and verifies that this constraints object has valid grid index values , i . e . the * display area cells are inside the form ' s grid . * @ param colCount number of columns in the grid * @ param rowCount number of rows in the grid * @ throws IndexOutOfBoundsException ...
if ( gridX <= 0 ) { throw new IndexOutOfBoundsException ( "The column index " + gridX + " must be positive." ) ; } if ( gridX > colCount ) { throw new IndexOutOfBoundsException ( "The column index " + gridX + " must be less than or equal to " + colCount + "." ) ; } if ( gridX + gridWidth - 1 > colCount ) { throw new In...
public class Period { /** * Returns a new period plus the specified number of millis added . * This period instance is immutable and unaffected by this method call . * @ param millis the amount of millis to add , may be negative * @ return the new period plus the increased millis * @ throws UnsupportedOperation...
if ( millis == 0 ) { return this ; } int [ ] values = getValues ( ) ; // cloned getPeriodType ( ) . addIndexedField ( this , PeriodType . MILLI_INDEX , values , millis ) ; return new Period ( values , getPeriodType ( ) ) ;
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcSchedulingTime ( ) { } }
if ( ifcSchedulingTimeEClass == null ) { ifcSchedulingTimeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 586 ) ; } return ifcSchedulingTimeEClass ;
public class ReactorSleuth { /** * Return a span operator pointcut given a { @ link Tracing } . This can be used in * reactor via { @ link reactor . core . publisher . Flux # transform ( Function ) } , * { @ link reactor . core . publisher . Mono # transform ( Function ) } , * { @ link reactor . core . publisher ...
if ( log . isTraceEnabled ( ) ) { log . trace ( "Scope passing operator [" + beanFactory + "]" ) ; } // Adapt if lazy bean factory BooleanSupplier isActive = beanFactory instanceof ConfigurableApplicationContext ? ( ( ConfigurableApplicationContext ) beanFactory ) :: isActive : ( ) -> true ; return Operators . liftPubl...
public class NettyOptions { /** * The SSL Protocol . */ public SslProtocol sslProtocol ( ) { } }
String protocol = reader . getString ( SSL_PROTOCOL , DEFAULT_SSL_PROTOCOL ) . replace ( "." , "_" ) ; try { return SslProtocol . valueOf ( protocol ) ; } catch ( IllegalArgumentException e ) { throw new ConfigurationException ( "unknown SSL protocol: " + protocol , e ) ; }
public class Node { /** * Remove the Node < T > element at index index of the List < Node < T > > . * @ param index the index of the element to delete . * @ throws IndexOutOfBoundsException if thrown . */ public void removeChildAt ( int index ) throws IndexOutOfBoundsException { } }
Node < T > child = children . get ( index ) ; child . parent = null ; children . remove ( index ) ;
public class MultiPath { /** * Copies a path from another multipath . * @ param src * The multipath to copy from . * @ param srcPathIndex * The index of the path in the the source MultiPath . * @ param bForward * When FALSE , the points are inserted in reverse order . */ public void addPath ( MultiPath src ...
m_impl . addPath ( ( MultiPathImpl ) src . _getImpl ( ) , srcPathIndex , bForward ) ;
public class HudsonFilter { /** * Reset the proxies and filter for a change in { @ link SecurityRealm } . */ public void reset ( SecurityRealm securityRealm ) throws ServletException { } }
if ( securityRealm != null ) { SecurityRealm . SecurityComponents sc = securityRealm . getSecurityComponents ( ) ; AUTHENTICATION_MANAGER . setDelegate ( sc . manager ) ; USER_DETAILS_SERVICE_PROXY . setDelegate ( sc . userDetails ) ; REMEMBER_ME_SERVICES_PROXY . setDelegate ( sc . rememberMe ) ; // make sure this . fi...
public class HelixSolver { /** * Returns a permutation of subunit indices for the given helix * transformation . An index of - 1 is used to indicate subunits that do not * superpose onto any other subunit . * @ param transformation * @ return */ private List < Integer > getPermutation ( Matrix4d transformation ...
double rmsdThresholdSq = Math . pow ( this . parameters . getRmsdThreshold ( ) , 2 ) ; List < Point3d > centers = subunits . getOriginalCenters ( ) ; List < Integer > seqClusterId = subunits . getClusterIds ( ) ; List < Integer > permutations = new ArrayList < Integer > ( centers . size ( ) ) ; double [ ] dSqs = new do...
public class DescribePointPixelRegionNCC { /** * The entire region must be inside the image because any outside pixels will change the statistics */ public boolean isInBounds ( int c_x , int c_y ) { } }
return BoofMiscOps . checkInside ( image , c_x , c_y , radiusWidth , radiusHeight ) ;
public class BeanO { /** * Set the current state of this < code > BeanO < / code > . < p > * The current state of this < code > BeanO < / code > must be old state , * else this method fails . < p > * @ param oldState the old state < p > * @ param newState the new state < p > */ protected final synchronized void...
// Inlined assertState ( oldState ) ; for performance . d154342.6 if ( state != oldState ) { throw new InvalidBeanOStateException ( getStateName ( state ) , getStateName ( oldState ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && // d527372 TEBeanLifeCycleInfo . isTraceEnabled ( ) ) TEBeanLifeCycleInfo . traceB...
public class SAXDriver { /** * < b > SAX Attributes < / b > method ( don ' t invoke on parser ) ; */ @ Override public String getValue ( String uri , String local ) { } }
int index = getIndex ( uri , local ) ; if ( index < 0 ) { return null ; } return getValue ( index ) ;
public class Async { /** * Generate a { @ link BatchReceiver } to receive and process stored messages . * This method ALWAYS works in the context of a transaction . * @ param queueName name of queue * @ param timeout timeout to wait . * @ return instance of { @ link BatchReceiver } . */ public BatchReceiver get...
try { return new BatchReceiver ( ( Queue ) jmsServer . lookup ( QUEUE_NAMESPACE + queueName ) , timeout , consumerConnection ) ; } catch ( Exception e ) { throw new AsyncException ( e ) ; }
public class SourceStream { /** * Get a tick range given a tick value * @ param tick * @ return TickRange */ public synchronized TickRange getTickRange ( long tick ) { } }
oststream . setCursor ( tick ) ; // Get the TickRange return ( TickRange ) oststream . getNext ( ) . clone ( ) ;
public class SeaGlassSynthPainterImpl { /** * Paint the object ' s background . * @ param ctx the SynthContext . * @ param g the Graphics context . * @ param x the x location corresponding to the upper - left * coordinate to paint . * @ param y the y location corresponding to the upper left * coordinate to ...
// if the background color of the component is 100 % transparent // then we should not paint any background graphics . This is a solution // for there being no way of turning off Nimbus background painting as // basic components are all non - opaque by default . Component c = ctx . getComponent ( ) ; Color bg = ( c != ...
public class BatchedDataPoints { /** * A copy of the values is created and sent with a put request . A reset is * initialized which makes this data structure ready to be reused for the same * metric and tags but for a different hour of data . * @ return { @ inheritDoc } */ @ Override public Deferred < Object > pe...
final byte [ ] q = Arrays . copyOfRange ( batched_qualifier , 0 , qualifier_index ) ; final byte [ ] v = Arrays . copyOfRange ( batched_value , 0 , value_index ) ; final byte [ ] r = Arrays . copyOfRange ( row_key , 0 , row_key . length ) ; final long base_time = this . base_time ; // shadow fixes issue # 1436 System ....
public class ESClient { /** * Execute query . * @ param filter * the filter * @ param aggregation * the aggregation * @ param entityMetadata * the entity metadata * @ param query * the query * @ param firstResult * the first result * @ param maxResults * the max results * @ return the list */ ...
String [ ] fieldsToSelect = query . getResult ( ) ; Class clazz = entityMetadata . getEntityClazz ( ) ; MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( entityMetadata . getPersistenceUnit ( ) ) ; FilteredQueryBuilder queryBuilder = QueryBuilders . filteredQuery ...
public class LessParser { /** * Read a quoted string and append it to the builder . * @ param quote the quote character . * @ param builder the target */ private void readQuote ( char quote , StringBuilder builder ) { } }
builder . append ( quote ) ; boolean isBackslash = false ; for ( ; ; ) { char ch = read ( ) ; builder . append ( ch ) ; if ( ch == quote && ! isBackslash ) { return ; } isBackslash = ch == '\\' ; }
public class ConversationHelperImpl { /** * Sends a request to stop the session . */ public void exchangeStop ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "exchangeStop" ) ; if ( sessionId == 0 ) { // If the session Id = 0 , then no one called setSessionId ( ) . As such we are unable to flow // to the server as we do not know which session to instruct the server to use ...
public class Ranges { /** * Return true if the specified ranges intersect . * @ param < C > range endpoint type * @ param range0 first range , must not be null * @ param range1 second range , must not be null * @ return true if the specified ranges intersect */ public static < C extends Comparable > boolean int...
checkNotNull ( range0 ) ; checkNotNull ( range1 ) ; return range0 . isConnected ( range1 ) && ! range0 . intersection ( range1 ) . isEmpty ( ) ;
public class ListT { /** * / * ( non - Javadoc ) * @ see cyclops2 . monads . transformers . values . ListT # sorted ( ) */ @ Override public ListT < W , T > sorted ( ) { } }
return ( ListT < W , T > ) FoldableTransformerSeq . super . sorted ( ) ;
public class ParaClient { /** * Retrieves an object from the data store . * @ param < P > the type of object * @ param type the type of the object * @ param id the id of the object * @ return the retrieved object or null if not found */ public < P extends ParaObject > P read ( String type , String id ) { } }
if ( StringUtils . isBlank ( type ) || StringUtils . isBlank ( id ) ) { return null ; } return getEntity ( invokeGet ( type . concat ( "/" ) . concat ( id ) , null ) , ParaObjectUtils . toClass ( type ) ) ;
public class Value { /** * intended byte [ ] . Also , the value is NOT on the deserialize ' d machines disk */ public AutoBuffer write ( AutoBuffer bb ) { } }
byte p = _persist ; if ( onICE ( ) ) p &= ~ ON_dsk ; // Not on the remote disk return bb . put1 ( p ) . put2 ( _type ) . putA1 ( memOrLoad ( ) ) ;
public class LinkClustering { /** * Performs single - linkage agglomerative clustering on the Graph ' s edges * using a next - best - merge array until the specified number of clusters has * been reached . This implementation achieves O ( n < sup > 2 < / sup > ) run - time * complexity and O ( n ) space , which i...
final int numEdges = g . size ( ) ; if ( numClusters < 1 || numClusters > numEdges ) throw new IllegalArgumentException ( "Invalid range for number of clusters: " + numClusters ) ; // Index the edges so that we can quickly look up which cluster an edge // is in final Indexer < Edge > edgeIndexer = new HashIndexer < Edg...
public class LoadBalancerPoolService { /** * Update filtered balancer pools * @ param loadBalancerPoolFilter load balancer pool filter * @ param config load balancer pool config * @ return OperationFuture wrapper for load balancer pool list */ public OperationFuture < List < LoadBalancerPool > > update ( LoadBala...
checkNotNull ( loadBalancerPoolFilter , "Load balancer pool filter must be not null" ) ; List < LoadBalancerPool > loadBalancerPoolList = findLazy ( loadBalancerPoolFilter ) . map ( metadata -> LoadBalancerPool . refById ( metadata . getId ( ) , LoadBalancer . refById ( metadata . getLoadBalancerId ( ) , DataCenter . r...
public class CacheManagerPersistenceConfiguration { /** * Transforms the builder received in one that returns a { @ link PersistentCacheManager } . */ @ Override @ SuppressWarnings ( "unchecked" ) public CacheManagerBuilder < PersistentCacheManager > builder ( final CacheManagerBuilder < ? extends CacheManager > other ...
return ( CacheManagerBuilder < PersistentCacheManager > ) other . using ( this ) ;
public class MessageProcessor { /** * Method to create the System default exception destination . There will be * a default exception destination per Messaging Engine . */ public DestinationDefinition createSystemDefaultExceptionDestination ( ) throws SIResourceException , SIMPDestinationAlreadyExistsException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createSystemDefaultExceptionDestination" ) ; // Set up a suitable definition DestinationDefinition defaultExceptionDestDef = createDestinationDefinition ( DestinationType . QUEUE , SIMPConstants . SYSTEM_DEFAULT_EXCEPTION_D...
public class TransientNodeData { /** * Factory method * @ param parent NodeData * @ param name InternalQName * @ param primaryTypeName InternalQName * @ param mixinTypesName InternalQName [ ] * @ param identifier String * @ param acl AccessControlList * @ return */ public static TransientNodeData createNo...
TransientNodeData nodeData = null ; QPath path = QPath . makeChildPath ( parent . getQPath ( ) , name ) ; nodeData = new TransientNodeData ( path , identifier , - 1 , primaryTypeName , mixinTypesName , 0 , parent . getIdentifier ( ) , acl ) ; return nodeData ;
public class TzdbZoneRulesCompiler { /** * Deduplicates an object instance . * @ param < T > the generic type * @ param object the object to deduplicate * @ return the deduplicated object */ @ SuppressWarnings ( "unchecked" ) < T > T deduplicate ( T object ) { } }
if ( deduplicateMap . containsKey ( object ) == false ) { deduplicateMap . put ( object , object ) ; } return ( T ) deduplicateMap . get ( object ) ;
public class AbstractResource { /** * Add an embedded resource with the given reference . * @ param ref The reference * @ param resourceList The resources * @ return This JsonError */ public Impl embedded ( CharSequence ref , List < Resource > resourceList ) { } }
if ( StringUtils . isNotEmpty ( ref ) && resourceList != null ) { List < Resource > resources = this . embeddedMap . computeIfAbsent ( ref , charSequence -> new ArrayList < > ( ) ) ; resources . addAll ( resourceList ) ; } return ( Impl ) this ;
public class TextBoxView { /** * Sets the properties from the attributes . * @ param attr * the new properties from attributes */ protected void setPropertiesFromAttributes ( AttributeSet attr ) { } }
if ( attr != null ) { Font newFont = ( Font ) attr . getAttribute ( Constants . ATTRIBUTE_FONT ) ; if ( newFont != null ) { setFont ( newFont ) ; } else { // the font is the most important for us throw new IllegalStateException ( "Font can not be null !" ) ; } setForeground ( ( Color ) attr . getAttribute ( Constants ....
public class KeysAndAttributes { /** * Sets the value of the Keys property for this object . * < b > Constraints : < / b > < br / > * < b > Length : < / b > 1 - 100 < br / > * @ param keys The new value for the Keys property for this object . */ public void setKeys ( java . util . Collection < Key > keys ) { } }
if ( keys == null ) { this . keys = null ; return ; } java . util . List < Key > keysCopy = new java . util . ArrayList < Key > ( keys . size ( ) ) ; keysCopy . addAll ( keys ) ; this . keys = keysCopy ;
public class NewYearStrategy { /** * used in deserialization */ static NewYearStrategy readFromStream ( DataInput in ) throws IOException { } }
int n = in . readInt ( ) ; if ( n == 0 ) { NewYearRule rule = NewYearRule . valueOf ( in . readUTF ( ) ) ; int annoDomini = in . readInt ( ) ; if ( ( annoDomini == Integer . MAX_VALUE ) && ( rule == NewYearRule . BEGIN_OF_JANUARY ) ) { return NewYearStrategy . DEFAULT ; } else { return new NewYearStrategy ( rule , anno...
public class MethodCompiler { /** * Get field from class * < p > Stack : . . . , = & gt ; . . . , value * @ param cls * @ param name * @ throws IOException */ public void getStaticField ( Class < ? > cls , String name ) throws IOException { } }
getStaticField ( El . getField ( cls , name ) ) ;
public class SerializerIntrinsics { /** * ! Round Packed SP - FP Values @ brief ( SSE4.1 ) . */ public final void roundps ( XMMRegister dst , XMMRegister src , Immediate imm8 ) { } }
emitX86 ( INST_ROUNDPS , dst , src , imm8 ) ;
public class XClaimArgs { /** * Return only messages that are idle for at least { @ code minIdleTime } . * @ param minIdleTime min idle time . * @ return { @ code this } . */ public XClaimArgs minIdleTime ( Duration minIdleTime ) { } }
LettuceAssert . notNull ( minIdleTime , "Min idle time must not be null" ) ; return minIdleTime ( minIdleTime . toMillis ( ) ) ;
public class URIBuilder { /** * Adds a view constraint equivalent to * { @ link org . kitesdk . data . RefinableView # with ( String , Object . . . ) } * @ param name the field name of the Entity * @ param value the field value * @ return this builder for method chaining * @ since 0.17.0 */ public URIBuilder ...
options . put ( name , Conversions . makeString ( value ) ) ; this . isView = true ; return this ;
public class QueryReferenceBroker { /** * Retrieve all Collection attributes of a given instance * @ param newObj the instance to be loaded or refreshed * @ param cld the ClassDescriptor of the instance * @ param forced if set to true , loading is forced even if cld differs */ public void retrieveCollections ( Ob...
doRetrieveCollections ( newObj , cld , forced , false ) ;
public class Boot { /** * Show the classpath of the system properties . This function never returns . */ @ SuppressWarnings ( { } }
"resource" } ) public static void showClasspath ( ) { final String cp = getCurrentClasspath ( ) ; if ( ! Strings . isNullOrEmpty ( cp ) ) { final PrintStream ps = getConsoleLogger ( ) ; for ( final String entry : cp . split ( Pattern . quote ( File . pathSeparator ) ) ) { ps . println ( entry ) ; } ps . flush ( ) ; } g...
public class SparkStorageUtils { /** * Save a { @ code JavaRDD < List < List < Writable > > > } to a Hadoop { @ link org . apache . hadoop . io . MapFile } . Each record is * given a < i > unique and contiguous < / i > { @ link LongWritable } key , and values are stored as * { @ link SequenceRecordWritable } instan...
saveMapFileSequences ( path , rdd , DEFAULT_MAP_FILE_INTERVAL , null ) ;
public class ConditionalProbabilityTable { /** * Computes the index into the { @ link # countArray } using the given data point * @ param dataPoint the data point to get the index of * @ return the index for the given data point */ @ SuppressWarnings ( "unused" ) private int cordToIndex ( DataPointPair < Integer > ...
DataPoint dp = dataPoint . getDataPoint ( ) ; int index = 0 ; for ( int i = 0 ; i < dimSize . length ; i ++ ) index = dp . getCategoricalValue ( realIndexToCatIndex [ i ] ) + dimSize [ i ] * index ; return index ;
public class BlockBox { /** * http : / / www . w3 . org / TR / CSS22 / visuren . html # bfc - next - to - float */ protected void layoutBlockInFlowAvoidFloats ( BlockBox subbox , int wlimit , BlockLayoutStatus stat ) { } }
final int minw = subbox . getMinimalDecorationWidth ( ) ; // minimal subbox width for computing the space - - content is not considered ( based on other browser observations ) int yoffset = stat . y + floatY ; // starting offset int availw = 0 ; do { int fy = yoffset ; int flx = fleft . getWidth ( fy ) - floatXl ; if (...
public class AuditService { /** * Returns the audit item for the given audit ID . * @ param id The ID of the audit to retrieve . * @ return The corresponding audit . * @ throws IOException If the server cannot be reached . * @ throws TokenExpiredException If the token sent along with the request has expired */ ...
String requestUrl = RESOURCE + "/" + id . toString ( ) ; ArgusResponse response = getClient ( ) . executeHttpRequest ( ArgusHttpClient . RequestType . GET , requestUrl , null ) ; assertValidResponse ( response , requestUrl ) ; return fromJson ( response . getResult ( ) , Audit . class ) ;
public class FeatureWebSecurityConfigImpl { /** * { @ inheritDoc } */ @ Override public List < String > getSSODomainList ( ) { } }
WebAppSecurityConfig globalConfig = WebAppSecurityCollaboratorImpl . getGlobalWebAppSecurityConfig ( ) ; if ( globalConfig != null ) return WebAppSecurityCollaboratorImpl . getGlobalWebAppSecurityConfig ( ) . getSSODomainList ( ) ; else return domainNamesToList ( ssoDomainNames ) ;
public class WorkManagerEventQueue { /** * Get events * @ param workManagerName The name of the WorkManager * @ return The list of events */ public synchronized List < WorkManagerEvent > getEvents ( String workManagerName ) { } }
List < WorkManagerEvent > result = new ArrayList < WorkManagerEvent > ( ) ; List < WorkManagerEvent > e = events . get ( workManagerName ) ; if ( e != null ) { result . addAll ( e ) ; e . clear ( ) ; } if ( trace ) log . tracef ( "getEvents(%s): %s" , workManagerName , result ) ; return result ;
public class ValidationUtilities { /** * Validate the given value against a collection of allowed values . * @ param allowedValues * @ param value Value to test * @ return boolean { @ code true } if { @ code value } in { @ code allowedValues } */ private static boolean validateEnumeration ( Collection < String > ...
return ( allowedValues != null && allowedValues . contains ( value ) ) ;
public class ConfigUtils { /** * Check if the given < code > key < / code > exists in < code > config < / code > and it is not null or empty * Uses { @ link StringUtils # isNotBlank ( CharSequence ) } * @ param config which may have the key * @ param key to look for in the config * @ return True if key exits an...
return config . hasPath ( key ) && StringUtils . isNotBlank ( config . getString ( key ) ) ;