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 * @ throws SINotAuthorizedException * @ throws SIMPNotPossibleInCurrentConfigurationException */ private DestinationHandler handleFRPMessage ( MessageItem msg , TransactionCommon tran , MessageProducer sender , boolean msgFRP ) throws SINotAuthorizedException , SIMPNotPossibleInCurrentConfigurationException , SIResourceException { } }
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 destination that the message needs // to go to . // e . g . it ' s the end of the list , it ' s a topicspace or it ' s in a foreign bus JsDestinationAddress head = null ; DestinationHandler frpDestination = null ; DestinationHandler previousDestination = _destination ; do { // Pop off first element of FRP head = ( JsDestinationAddress ) frp . get ( 0 ) ; String name = head . getDestinationName ( ) ; String busName = head . getBusName ( ) ; // Get the named destination from the destination manager try { frpDestination = _messageProcessor . getDestinationManager ( ) . getDestination ( name , busName , false ) ; // If security is enabled , then we need to check authority to access // the next destination if ( _messageProcessor . isBusSecure ( ) ) { // Will drive the form of sib . security checkDestinationAccess ( ) that // takes a JsMessage JsMessage jsMsg = msg . getMessage ( ) ; String discriminator = jsMsg . getDiscriminator ( ) ; SecurityContext secContext = new SecurityContext ( jsMsg , null , // alt user discriminator , _messageProcessor . getAuthorisationUtils ( ) ) ; checkDestinationAccess ( frpDestination , secContext ) ; } previousDestination = frpDestination ; frp . remove ( 0 ) ; } catch ( SIException e ) { // No FFDC code Needed if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . exception ( tc , e ) ; // Need to throw NotAuthorized exceptions back to the caller . if ( e instanceof SINotAuthorizedException ) { // Write an audit record if access is denied SibTr . audit ( tc , nls_cwsik . getFormattedMessage ( "DELIVERY_ERROR_SIRC_18" , // USER _ NOT _ AUTH _ SEND _ ERROR _ CWSIP0308 new Object [ ] { name , msg . getMessage ( ) . getSecurityUserid ( ) } , null ) ) ; // Thrown if user denied access to destination SIMPNotAuthorizedException ex = new SIMPNotAuthorizedException ( e . getMessage ( ) ) ; ex . setExceptionReason ( SIRCConstants . SIRC0020_USER_NOT_AUTH_SEND_ERROR ) ; ex . setExceptionInserts ( new String [ ] { name , msg . getMessage ( ) . getSecurityUserid ( ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "handleFRPMessage" , ex ) ; throw ex ; } ExceptionDestinationHandlerImpl excDest = new ExceptionDestinationHandlerImpl ( previousDestination ) ; final UndeliverableReturnCode rc = excDest . handleUndeliverableMessage ( msg , tran , SIRCConstants . SIRC0037_INVALID_ROUTING_PATH_ERROR , new String [ ] { name , _messageProcessor . getMessagingEngineName ( ) , previousDestination . getName ( ) , SIMPUtils . getStackTrace ( e ) } ) ; if ( rc == UndeliverableReturnCode . ERROR || rc == UndeliverableReturnCode . BLOCK ) { SIMPNotPossibleInCurrentConfigurationException ee = new SIMPNotPossibleInCurrentConfigurationException ( nls_cwsik . getFormattedMessage ( "DELIVERY_ERROR_SIRC_23" , // EXCEPTION _ DESTINATION _ ERROR _ CWSIP0296 new Object [ ] { name , rc , SIMPUtils . getStackTrace ( e ) , _destination . getName ( ) } , null ) , e ) ; ee . setExceptionReason ( SIRCConstants . SIRC0023_EXCEPTION_DESTINATION_ERROR ) ; ee . setExceptionInserts ( new String [ ] { name , rc . toString ( ) , SIMPUtils . getStackTrace ( e ) , _destination . getName ( ) } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "handleFRPMessage" , ee ) ; throw ee ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "handleFRPMessage" ) ; // Indicate message was delivered to exception destination return null ; } } // bypass the destination if its a queue ( If the destination // is foreign we cannot tell if there is a medition or not , so we err on the side of // caution and send it there anyway ) while ( ( ! previousDestination . isPubSub ( ) && // and it is not PubSub ! frp . isEmpty ( ) && // and there is more FRP to process ! ( previousDestination . isForeign ( ) || previousDestination . isForeignBus ( ) ) ) ) ; // and it is not foreign // Set the remainder of the FRP back into the message msg . getMessage ( ) . setForwardRoutingPath ( frp ) ; // Get the InputHandler for the chosen destination ProducerInputHandler handler = null ; if ( frpDestination != null ) { ProtocolType type = ProtocolType . UNICASTINPUT ; if ( frpDestination . isPubSub ( ) ) type = ProtocolType . PUBSUBINPUT ; handler = ( ProducerInputHandler ) frpDestination . getInputHandler ( type , _messageProcessor . getMessagingEngineUuid ( ) , null ) ; } // If handler is null , the message went to the exception destination . // Otherwise we have a new InputHandler for the next interesting destination // in the FRP . Let it process the message . if ( handler != null ) { try { // Do some cleanup of the message to make it look like new JsMessage jsMsg = msg . getMessage ( ) ; // Defect 496906 : Set the outAddress to " head " - the JsDestinationAddress of the // frpDestination we are working with . This variable is used as a base from which // to generate the routing address which will be set into the message . JsDestinationAddress outAddress = head ; // Reset the redelivery count jsMsg . setRedeliveredCount ( 0 ) ; // If the FRP destination is either an alias or is foreign , then update // the RFH2 flag . if ( frpDestination . isAlias ( ) || frpDestination . isForeign ( ) || frpDestination . isForeignBus ( ) ) { ProducerSessionImpl . setRFH2Allowed ( jsMsg , frpDestination ) ; } msg . incrementRedirectCount ( ) ; // Generate error if max frp depth is exceeded if ( msg . getRedirectCount ( ) > _messageProcessor . getCustomProperties ( ) . get_max_frp_depth ( ) ) { SibTr . register ( PtoPInputHandler . class , SIMPConstants . MP_TRACE_GROUP , SIMPConstants . CWSIK_RESOURCE_BUNDLE ) ; SibTr . error ( tc , "DELIVERY_ERROR_SIRC_43" , new Integer ( msg . getRedirectCount ( ) ) ) ; SibTr . register ( PtoPInputHandler . class , SIMPConstants . MP_TRACE_GROUP , SIMPConstants . RESOURCE_BUNDLE ) ; // Put the message to the exception destination handleUndeliverableMessage ( frpDestination , null // LinkHandler , msg , SIRCConstants . SIRC0043_MAX_FRP_DEPTH_EXCEEDED , new String [ ] { frpDestination . getName ( ) } , tran ) ; } // We haven ' t hit the loop limit so lets pass the message onto the // next InputHandler else { handler . handleProducerMessage ( msg , tran , outAddress , null , msgFRP ) ; } } catch ( SIMPNoLocalisationsException e ) { // No FFDC code needed // We can ' t find a suitable localisation . // Although a queue must have at least one localisation this is // possible if the sender restricted the potential localisations // using a fixed ME or a scoping alias ( to an out - of - date set of // localisation ) // Put the message to the exception destination handleUndeliverableMessage ( frpDestination , null // LinkHandler , msg , SIRCConstants . SIRC0026_NO_LOCALISATIONS_FOUND_ERROR , new String [ ] { frpDestination . getName ( ) } , tran ) ; } catch ( Exception e ) { // defect 259323 // due to an unexpected error we cannot send this message along the // FRP . The best we can do is send the message to the exception destination // and ffdc / trace this event FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.PtoPInputHandler.handleFRPMessage" , "1:2072:1.323" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "FRP message being put to exception destination" , new Object [ ] { msg , e } ) ; } handleUndeliverableMessage ( frpDestination , null // LinkHandler , msg , SIRCConstants . SIRC0001_DELIVERY_ERROR , new String [ ] { frpDestination . getName ( ) } , tran ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "handleFRPMessage" ) ; return frpDestination ;
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 ) ; // if ( r = = 0 ) break ; // out . write ( buf , 0 , r ) ; // stream . closeStream ( ) ; int len = b . length - 1 ; for ( int k = 0 ; k < len ; ++ k ) { if ( b [ k ] == '\r' && b [ k + 1 ] != '\n' ) b [ k ] = ( byte ) '\n' ; } out . println ( new String ( b ) ) ; out . println ( "endstream" ) ; } catch ( IOException e ) { System . err . println ( "I/O exception: " + e ) ; // } catch ( java . util . zip . DataFormatException e ) { // System . err . println ( " Data Format Exception : " + e ) ; }
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 low surrogate not preceded by a high surrogate ) will be returned as - is . < / p > * < pre > * StringUtils . toCodePoints ( null ) = null * StringUtils . toCodePoints ( " " ) = [ ] / / empty array * < / pre > * @ param str the character sequence to convert * @ return an array of code points * @ since 3.6 */ public static int [ ] toCodePoints ( final CharSequence str ) { } }
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 ( index ) ; index += Character . charCount ( result [ i ] ) ; } return result ;
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 authorized to use eureka - protempa - etl . */ public E getUser ( HttpServletRequest servletRequest ) { } }
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 Parameters supplied to the Update operation . * @ param ifMatch The ETag of the Private DNS zone . Omit this value to always overwrite the current zone . Specify the last - seen ETag value to prevent accidentally overwriting any concurrent changes . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable for the request */ public Observable < PrivateZoneInner > updateAsync ( String resourceGroupName , String privateZoneName , PrivateZoneInner parameters , String ifMatch ) { } }
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 ( ) ) { uh . migrateUser ( iterator . nextNode ( ) ) ; } } } finally { session . logout ( ) ; }
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 < CloudWatchDashboard > cloudWatchDashboards ) { } }
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 < T , E > registerAll ( Map < Integer , Type > responseTypes ) { } }
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 ( optional , default to * tranquility ) * @ param ifNoneMatch * ETag from a previous request . A 304 will be returned if this * matches the current ETag ( optional ) * @ param callback * The callback to be executed when the API call finishes * @ return The request call * @ throws ApiException * If fail to process the API call , e . g . serializing the request * body object */ public com . squareup . okhttp . Call getFwLeaderboardsCharactersAsync ( String datasource , String ifNoneMatch , final ApiCallback < FactionWarfareLeaderboardCharactersResponse > callback ) throws ApiException { } }
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 == null ) { application = System . getProperty ( Constants . APPLICATION_KEY ) ; } else { if ( System . getProperty ( Constants . APPLICATION_KEY ) != null ) { application = application + "-" + System . getProperty ( Constants . APPLICATION_KEY ) ; } } if ( remoteHost != null ) { address = getAddressByName ( remoteHost ) ; } else { String err = "The RemoteHost property is required for MulticastAppender named " + name ; LogLog . error ( err ) ; throw new IllegalStateException ( err ) ; } if ( layout == null ) { layout = new XMLLayout ( ) ; } if ( advertiseViaMulticastDNS ) { Map properties = new HashMap ( ) ; properties . put ( "multicastAddress" , remoteHost ) ; zeroConf = new ZeroConfSupport ( ZONE , port , getName ( ) , properties ) ; zeroConf . advertise ( ) ; } connect ( ) ; super . activateOptions ( ) ;
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 of this invocation or an error occurs */ public File createFile ( String relativePath , InputStream sourceData ) throws IOException { } }
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 { VFSUtils . safeClose ( sourceData ) ; if ( ! ok ) { tempFile . delete ( ) ; } }
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 ( ) , entity , createKey ( information . getPartitionKeyFieldValue ( entity ) ) ) ; } return entity ;
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 key itself cannot be changed . This operation requires the keys / update permission . * @ param vaultBaseUrl The vault name , for example https : / / myvault . vault . azure . net . * @ param keyName The name of key to update . * @ param keyVersion The version of the key to update . * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the { @ link ServiceFuture } object */ public ServiceFuture < KeyBundle > updateKeyAsync ( String vaultBaseUrl , String keyName , String keyVersion , final ServiceCallback < KeyBundle > serviceCallback ) { } }
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 < code > null < / code > if a commerce shipping fixed option with the primary key could not be found */ @ Override public CommerceShippingFixedOption fetchByPrimaryKey ( Serializable primaryKey ) { } }
Serializable serializable = entityCache . getResult ( CommerceShippingFixedOptionModelImpl . ENTITY_CACHE_ENABLED , CommerceShippingFixedOptionImpl . class , primaryKey ) ; if ( serializable == nullModel ) { return null ; } CommerceShippingFixedOption commerceShippingFixedOption = ( CommerceShippingFixedOption ) serializable ; if ( commerceShippingFixedOption == null ) { Session session = null ; try { session = openSession ( ) ; commerceShippingFixedOption = ( CommerceShippingFixedOption ) session . get ( CommerceShippingFixedOptionImpl . class , primaryKey ) ; if ( commerceShippingFixedOption != null ) { cacheResult ( commerceShippingFixedOption ) ; } else { entityCache . putResult ( CommerceShippingFixedOptionModelImpl . ENTITY_CACHE_ENABLED , CommerceShippingFixedOptionImpl . class , primaryKey , nullModel ) ; } } catch ( Exception e ) { entityCache . removeResult ( CommerceShippingFixedOptionModelImpl . ENTITY_CACHE_ENABLED , CommerceShippingFixedOptionImpl . class , primaryKey ) ; throw processException ( e ) ; } finally { closeSession ( session ) ; } } return commerceShippingFixedOption ;
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 . * < ! - - end generic documentation - - > * < ! - - start release - specific documentation - - > * < div class = " ReleaseSpecificDocumentation " > * < h3 > HSQLDB - Specific Information : < / h3 > < p > * Starting with HSQLDB 1.7.2 , savepoints are fully supported both * in SQL and via the JDBC interface . < p > * Using SQL , savepoints may be set , released and used in rollback * as follows : * < pre > * SAVEPOINT & lt ; savepoint - name & gt ; * RELEASE SAVEPOINT & lt ; savepoint - name & gt ; * ROLLBACK TO SAVEPOINT & lt ; savepoint - name & gt ; * < / pre > * < / div > < ! - - end release - specific documentation - - > * @ exception SQLException if a database access error occurs , * ( JDBC4 Clarification : ) * this method is called while participating in a distributed transaction , * this method is called on a closed connection or this * < code > Connection < / code > object is in auto - commit mode * @ see # setAutoCommit */ public synchronized void rollback ( ) throws SQLException { } }
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 fail the validation * @ return the observable to the IntegrationAccountSessionInner object */ public Observable < IntegrationAccountSessionInner > getAsync ( String resourceGroupName , String integrationAccountName , String sessionName ) { } }
return getWithServiceResponseAsync ( resourceGroupName , integrationAccountName , sessionName ) . map ( new Func1 < ServiceResponse < IntegrationAccountSessionInner > , IntegrationAccountSessionInner > ( ) { @ Override public IntegrationAccountSessionInner call ( ServiceResponse < IntegrationAccountSessionInner > response ) { return response . body ( ) ; } } ) ;
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 > instead . * @ param version The String to check . * @ return Whether the given String is formatted as a semantic version . * @ since 0.5.0 */ public static boolean isValidVersion ( String version ) { } }
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 . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws javax . servlet . ServletException if the servlet ' s init method throws an exception , or the given servlet object has * already been registered at a different alias . * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws org . osgi . service . http . NamespaceException if the registration fails because the alias is already in use . * @ throws org . osgi . service . http . NamespaceException when the servlet is currently registered under a different { @ link org . osgi . service . http . HttpService } * @ throws java . lang . IllegalStateException if any . */ public synchronized void register ( HttpService service ) throws ServletException , NamespaceException , IllegalStateException { } }
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 ) { throw new IllegalStateException ( "the servlet is already registered with another HttpService" ) ; } } }
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 = ( AuthenticationResult ) session . getAttribute ( AUTH_USER_SESSION_KEY ) ; } } catch ( Exception ex ) { // Use no session mode meaning whatever VMC sends as hashed password is used to authenticate . session = null ; m_rate_limited_log . log ( EstTime . currentTimeMillis ( ) , Level . ERROR , ex , "Failed to get or create HTTP Session. authenticating user explicitely." ) ; } } if ( authResult == null ) { authResult = getAuthenticationResult ( request ) ; if ( ! authResult . isAuthenticated ( ) ) { if ( session != null ) { session . removeAttribute ( AUTH_USER_SESSION_KEY ) ; } m_rate_limited_log . log ( "JSON interface exception: " + authResult . m_message , EstTime . currentTimeMillis ( ) ) ; } else { if ( session != null ) { // Cache the authResult in session so we dont authenticate again . session . setAttribute ( AUTH_USER_SESSION_KEY , authResult ) ; } } } return authResult ;
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 ) ) . getReference ( ) ; MessageVersion recMessageVersion = ( ( MessageControl ) this . getRecord ( MessageControl . MESSAGE_CONTROL_FILE ) ) . getMessageVersion ( strTargetVersion ) ; MessageProcessInfo recMessageProcessInfo = new MessageProcessInfo ( this ) ; recMessageProcessInfo . setKeyArea ( MessageProcessInfo . MESSAGE_INFO_ID_KEY ) ; try { // Always register this generic processing queue . recMessageProcessInfo . close ( ) ; while ( recMessageProcessInfo . hasNext ( ) ) { recMessageProcessInfo . next ( ) ; String strQueueName = recMessageProcessInfo . getQueueName ( true ) ; String strQueueType = recMessageProcessInfo . getQueueType ( true ) ; String strProcessClass = recMessageProcessInfo . getField ( MessageProcessInfo . PROCESSOR_CLASS ) . toString ( ) ; Map < String , Object > properties = ( ( PropertiesField ) recMessageProcessInfo . getField ( MessageProcessInfo . PROPERTIES ) ) . getProperties ( ) ; Record recMessageType = ( ( ReferenceField ) recMessageProcessInfo . getField ( MessageProcessInfo . MESSAGE_TYPE_ID ) ) . getReference ( ) ; if ( recMessageType != null ) { // Start all processes that handle INcoming REQUESTs . String strMessageType = recMessageType . getField ( MessageType . CODE ) . toString ( ) ; Record recMessageInfo = ( ( ReferenceField ) recMessageProcessInfo . getField ( MessageProcessInfo . MESSAGE_INFO_ID ) ) . getReference ( ) ; if ( recMessageInfo != null ) { Record recMessageInfoType = ( ( ReferenceField ) recMessageInfo . getField ( MessageInfo . MESSAGE_INFO_TYPE_ID ) ) . getReference ( ) ; if ( recMessageInfoType != null ) { String strMessageInfoType = recMessageInfoType . getField ( MessageInfoType . CODE ) . toString ( ) ; if ( MessageInfoType . REQUEST . equals ( strMessageInfoType ) ) if ( MessageType . MESSAGE_IN . equals ( strMessageType ) ) if ( ( strQueueName != null ) && ( strQueueName . length ( ) > 0 ) ) { Record recMessageTransportInfo = this . getRecord ( MessageTransportInfo . MESSAGE_TRANSPORT_INFO_FILE ) ; recMessageTransportInfo . setKeyArea ( MessageTransportInfo . MESSAGE_PROCESS_INFO_ID_KEY ) ; recMessageTransportInfo . getField ( MessageTransportInfo . MESSAGE_PROCESS_INFO_ID ) . moveFieldToThis ( recMessageProcessInfo . getField ( MessageProcessInfo . ID ) ) ; recMessageTransportInfo . getField ( MessageTransportInfo . MESSAGE_TRANSPORT_ID ) . moveFieldToThis ( recMessageTransport . getField ( MessageTransport . ID ) ) ; recMessageTransportInfo . getField ( MessageTransportInfo . MESSAGE_VERSION_ID ) . moveFieldToThis ( recMessageVersion . getField ( MessageVersion . ID ) ) ; if ( recMessageTransportInfo . seek ( DBConstants . EQUALS ) ) { this . addProcessForWSDL ( strTargetVersion , typeObject , recMessageProcessInfo , type ) ; } } } } } } recMessageProcessInfo . close ( ) ; } catch ( DBException ex ) { ex . printStackTrace ( ) ; } finally { recMessageProcessInfo . free ( ) ; }
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 ( toReturn ) ) ; } catch ( TransformerException e ) { throw new IllegalStateException ( "Could not transform node [" + node . getNodeName ( ) + "] to XML" , e ) ; } return toReturn . toString ( ) ;
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 IllegalArgumentException ( dtype + " directory value is not a directory (" + d . getPath ( ) + ")" ) ; }
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 . * @ throws InvalidParameterGroupStateException * One or more parameters in a parameter group are in an invalid state . * @ throws ParameterGroupNotFoundException * The specified parameter group does not exist . * @ throws ServiceLinkedRoleNotFoundException * @ throws InvalidParameterValueException * The value for a parameter is invalid . * @ throws InvalidParameterCombinationException * Two or more incompatible parameters were specified . * @ sample AmazonDax . UpdateParameterGroup * @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / dax - 2017-04-19 / UpdateParameterGroup " target = " _ top " > AWS API * Documentation < / a > */ @ Override public UpdateParameterGroupResult updateParameterGroup ( UpdateParameterGroupRequest request ) { } }
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 firstForCodePoint ( int cp ) { } }
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 . dot_empty ) ; setBackgroundResource ( background ) ; }
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 value of theme attributes * are obtained in the following order : ApptentiveTheme . Base . Versioned specified in Apptentive ' s AndroidManifest . xml - > * app default theme specified in app AndroidManifest . xml ( force ) - > ApptentiveThemeOverride ( force ) * @ param interactionTheme The base theme to apply Apptentive styling layers * @ param context The context that will host Apptentive interaction fragment , either ApptentiveViewActivity * or application context */ public void updateApptentiveInteractionTheme ( Context context , Resources . Theme interactionTheme ) { } }
/* 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 activity , i . e . application context , treat it as initial theme setup interactionTheme . applyStyle ( R . style . ApptentiveTheme_Base_Versioned , true ) ; } // Step 2 : Inherit app default appcompat theme if there is one specified in app ' s AndroidManifest if ( appDefaultAppCompatThemeId != 0 ) { interactionTheme . applyStyle ( appDefaultAppCompatThemeId , true ) ; } // Step 3 : Restore Apptentive UI window properties that may have been overridden in Step 2 . This theme // is to ensure Apptentive interaction has a modal feel - n - look . interactionTheme . applyStyle ( R . style . ApptentiveBaseFrameTheme , true ) ; // Step 4 : Apply optional theme override specified in host app ' s style int themeOverrideResId = context . getResources ( ) . getIdentifier ( "ApptentiveThemeOverride" , "style" , getApplicationContext ( ) . getPackageName ( ) ) ; if ( themeOverrideResId != 0 ) { interactionTheme . applyStyle ( themeOverrideResId , true ) ; } // Step 5 : Update status bar color /* Obtain the default status bar color . When an Apptentive Modal interaction is shown , * a translucent overlay would be applied on top of statusBarColorDefault */ if ( Build . VERSION . SDK_INT >= Build . VERSION_CODES . LOLLIPOP ) { int transparentColor = ContextCompat . getColor ( context , android . R . color . transparent ) ; TypedArray a = interactionTheme . obtainStyledAttributes ( new int [ ] { android . R . attr . statusBarColor } ) ; try { statusBarColorDefault = a . getColor ( 0 , transparentColor ) ; } finally { a . recycle ( ) ; } } // Step 6 : Update toolbar overlay theme int toolbarThemeId = Util . getResourceIdFromAttribute ( interactionTheme , R . attr . apptentiveToolbarTheme ) ; apptentiveToolbarTheme . setTo ( interactionTheme ) ; apptentiveToolbarTheme . applyStyle ( toolbarThemeId , true ) ;
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 . */ public boolean isFeature ( String feature ) { } }
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 . util . Collection ) } if you * want to override the existing values . * @ param inAppStreamNames * Returns the in - application stream names that are mapped to the stream source . * @ return Returns a reference to this object so that method calls can be chained together . */ public InputDescription withInAppStreamNames ( String ... inAppStreamNames ) { } }
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 be checked and updated */ private void ensureValidACLAuthorization ( final FedoraResource resource , final Model inputModel ) { } }
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 . getSubject ( ) . asNode ( ) ; // If subject is Authorization Hash Resource , add it to the map with its accessTo / accessToClass status . if ( subject . toString ( ) . contains ( "/" + FCR_ACL + "#" ) ) { uniqueAuthSubjects . add ( subject ) ; } } ) ; final Graph graph = inputModel . getGraph ( ) ; uniqueAuthSubjects . forEach ( ( final Node subject ) -> { if ( graph . contains ( subject , WEBAC_ACCESS_TO_URI , Node . ANY ) && graph . contains ( subject , WEBAC_ACCESS_TO_CLASS_URI , Node . ANY ) ) { throw new ACLAuthorizationConstraintViolationException ( MessageFormat . format ( "Using both accessTo and accessToClass within " + "a single Authorization is not allowed: {0}." , subject . toString ( ) . substring ( subject . toString ( ) . lastIndexOf ( "#" ) ) ) ) ; } else if ( ! ( graph . contains ( subject , WEBAC_ACCESS_TO_URI , Node . ANY ) || graph . contains ( subject , WEBAC_ACCESS_TO_CLASS_URI , Node . ANY ) ) ) { inputModel . add ( createDefaultAccessToStatement ( subject . toString ( ) ) ) ; } } ) ; }
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 the validation * @ return the observable to the RouteFilterRuleInner object */ public Observable < RouteFilterRuleInner > getAsync ( String resourceGroupName , String routeFilterName , String ruleName ) { } }
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 contentSize , String checksum , String storeID ) throws ResourceException , InvalidIdException , ResourcePropertiesInvalidException { } }
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 are preserved . // c . f . https : / / jira . duraspace . org / browse / DURACLOUD - 757 Map < String , String > oldUserProperties = storage . getContentProperties ( spaceID , contentID ) ; // remove all non extended properties if ( userProperties != null ) { oldUserProperties . putAll ( userProperties ) ; // use old mimetype if none specified . String oldMimetype = oldUserProperties . remove ( StorageProvider . PROPERTIES_CONTENT_MIMETYPE ) ; if ( contentMimeType == null || contentMimeType . trim ( ) == "" ) { contentMimeType = oldMimetype ; } oldUserProperties = StorageProviderUtil . removeCalculatedProperties ( oldUserProperties ) ; } userProperties = oldUserProperties ; } catch ( NotFoundException ex ) { // do nothing - no properties to update // since file did not previous exist . } return storage . addContent ( spaceID , contentID , contentMimeType , userProperties , contentSize , checksum , content ) ; } catch ( NotFoundException e ) { throw new ResourceNotFoundException ( "add content" , spaceID , contentID , e ) ; } catch ( ChecksumMismatchException e ) { throw new ResourceChecksumException ( "add content" , spaceID , contentID , e ) ; } catch ( Exception e ) { storageProviderFactory . expireStorageProvider ( storeID ) ; throw new ResourceException ( "add content" , spaceID , contentID , e ) ; }
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 } is available . * @ throws IllegalArgumentException if no such rounding is registered using a * { @ link javax . money . spi . RoundingProviderSpi } instance . */ public static boolean isRoundingAvailable ( RoundingQuery roundingQuery ) { } }
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 theoretical right value , * the resulting < code > Either < / code > must be invariant on the same left value to flatten properly . * @ param rightFn the function to apply to a right value * @ param < R2 > the new right parameter type * @ return the Either resulting from applying rightFn to this right value , or this left value if left */ @ Override @ SuppressWarnings ( "RedundantTypeArguments" ) public < R2 > Either < L , R2 > flatMap ( Function < ? super R , ? extends Monad < R2 , Either < L , ? > > > rightFn ) { } }
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 = 10 ; < / code > */ public com . google . protobuf . ByteString getExtendsBytes ( ) { } }
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 primary keys , they are indexes in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CommerceWishListItemModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order . * @ param CPInstanceUuid the cp instance uuid * @ param start the lower bound of the range of commerce wish list items * @ param end the upper bound of the range of commerce wish list items ( not inclusive ) * @ param orderByComparator the comparator to order the results by ( optionally < code > null < / code > ) * @ param retrieveFromCache whether to retrieve from the finder cache * @ return the ordered range of matching commerce wish list items */ @ Override public List < CommerceWishListItem > findByCPInstanceUuid ( String CPInstanceUuid , int start , int end , OrderByComparator < CommerceWishListItem > orderByComparator , boolean retrieveFromCache ) { } }
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 [ ] { CPInstanceUuid } ; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CPINSTANCEUUID ; finderArgs = new Object [ ] { CPInstanceUuid , start , end , orderByComparator } ; } List < CommerceWishListItem > list = null ; if ( retrieveFromCache ) { list = ( List < CommerceWishListItem > ) finderCache . getResult ( finderPath , finderArgs , this ) ; if ( ( list != null ) && ! list . isEmpty ( ) ) { for ( CommerceWishListItem commerceWishListItem : list ) { if ( ! Objects . equals ( CPInstanceUuid , commerceWishListItem . getCPInstanceUuid ( ) ) ) { list = null ; break ; } } } } if ( list == null ) { StringBundler query = null ; if ( orderByComparator != null ) { query = new StringBundler ( 3 + ( orderByComparator . getOrderByFields ( ) . length * 2 ) ) ; } else { query = new StringBundler ( 3 ) ; } query . append ( _SQL_SELECT_COMMERCEWISHLISTITEM_WHERE ) ; boolean bindCPInstanceUuid = false ; if ( CPInstanceUuid == null ) { query . append ( _FINDER_COLUMN_CPINSTANCEUUID_CPINSTANCEUUID_1 ) ; } else if ( CPInstanceUuid . equals ( "" ) ) { query . append ( _FINDER_COLUMN_CPINSTANCEUUID_CPINSTANCEUUID_3 ) ; } else { bindCPInstanceUuid = true ; query . append ( _FINDER_COLUMN_CPINSTANCEUUID_CPINSTANCEUUID_2 ) ; } if ( orderByComparator != null ) { appendOrderByComparator ( query , _ORDER_BY_ENTITY_ALIAS , orderByComparator ) ; } else if ( pagination ) { query . append ( CommerceWishListItemModelImpl . ORDER_BY_JPQL ) ; } String sql = query . toString ( ) ; Session session = null ; try { session = openSession ( ) ; Query q = session . createQuery ( sql ) ; QueryPos qPos = QueryPos . getInstance ( q ) ; if ( bindCPInstanceUuid ) { qPos . add ( CPInstanceUuid ) ; } if ( ! pagination ) { list = ( List < CommerceWishListItem > ) QueryUtil . list ( q , getDialect ( ) , start , end , false ) ; Collections . sort ( list ) ; list = Collections . unmodifiableList ( list ) ; } else { list = ( List < CommerceWishListItem > ) QueryUtil . list ( q , getDialect ( ) , start , end ) ; } cacheResult ( list ) ; finderCache . putResult ( finderPath , finderArgs , list ) ; } catch ( Exception e ) { finderCache . removeResult ( finderPath , finderArgs ) ; throw processException ( e ) ; } finally { closeSession ( session ) ; } } return list ;
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 fails . */ public CmsOrganizationalUnit createWebOU ( String ouFqn , String description , boolean hideLogin ) { } }
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 ( getMessages ( ) . key ( Messages . GUI_SHELL_WEB_OU_CREATION_FAILED_2 , ouFqn , description ) ) ; return null ; }
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 the display area described by this constraints object is * not inside the grid */ void ensureValidGridBounds ( int colCount , int rowCount ) { } }
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 IndexOutOfBoundsException ( "The grid width " + gridWidth + " must be less than or equal to " + ( colCount - gridX + 1 ) + "." ) ; } if ( gridY <= 0 ) { throw new IndexOutOfBoundsException ( "The row index " + gridY + " must be positive." ) ; } if ( gridY > rowCount ) { throw new IndexOutOfBoundsException ( "The row index " + gridY + " must be less than or equal to " + rowCount + "." ) ; } if ( gridY + gridHeight - 1 > rowCount ) { throw new IndexOutOfBoundsException ( "The grid height " + gridHeight + " must be less than or equal to " + ( rowCount - gridY + 1 ) + "." ) ; }
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 UnsupportedOperationException if the field is not supported */ public Period plusMillis ( int millis ) { } }
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 . Hooks # onLastOperator ( Function ) } or * { @ link reactor . core . publisher . Hooks # onLastOperator ( Function ) } . The Span operator * pointcut will pass the Scope of the Span without ever creating any new spans . * @ param beanFactory - { @ link BeanFactory } * @ param < T > an arbitrary type that is left unchanged by the span operator * @ return a new lazy span operator pointcut */ @ SuppressWarnings ( "unchecked" ) public static < T > Function < ? super Publisher < T > , ? extends Publisher < T > > scopePassingSpanOperator ( BeanFactory beanFactory ) { } }
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 . liftPublisher ( ( p , sub ) -> { // if Flux / Mono # just , # empty , # error if ( p instanceof Fuseable . ScalarCallable ) { return sub ; } Scannable scannable = Scannable . from ( p ) ; // rest of the logic unchanged . . . if ( isActive . getAsBoolean ( ) ) { if ( log . isTraceEnabled ( ) ) { log . trace ( "Spring Context [" + beanFactory + "] already refreshed. Creating a scope " + "passing span subscriber with Reactor Context " + "[" + sub . currentContext ( ) + "] and name [" + scannable . name ( ) + "]" ) ; } return scopePassingSpanSubscription ( beanFactory . getBean ( Tracing . class ) , sub ) ; } if ( log . isTraceEnabled ( ) ) { log . trace ( "Spring Context [" + beanFactory + "] is not yet refreshed, falling back to lazy span subscriber. Reactor Context is [" + sub . currentContext ( ) + "] and name is [" + scannable . name ( ) + "]" ) ; } return new LazySpanSubscriber < > ( lazyScopePassingSpanSubscription ( beanFactory , scannable , sub ) ) ; } ) ;
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 , int srcPathIndex , boolean bForward ) { } }
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 . filter is always a valid filter . Filter oldf = this . filter ; Filter newf = securityRealm . createFilter ( this . filterConfig ) ; newf . init ( this . filterConfig ) ; this . filter = newf ; if ( oldf != null ) oldf . destroy ( ) ; } else { // no security related filter needed . AUTHENTICATION_MANAGER . setDelegate ( null ) ; USER_DETAILS_SERVICE_PROXY . setDelegate ( null ) ; REMEMBER_ME_SERVICES_PROXY . setDelegate ( null ) ; filter = null ; }
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 double [ centers . size ( ) ] ; boolean [ ] used = new boolean [ centers . size ( ) ] ; Arrays . fill ( used , false ) ; for ( int i = 0 ; i < centers . size ( ) ; i ++ ) { Point3d tCenter = new Point3d ( centers . get ( i ) ) ; transformation . transform ( tCenter ) ; int permutation = - 1 ; double minDistSq = Double . MAX_VALUE ; for ( int j = 0 ; j < centers . size ( ) ; j ++ ) { if ( seqClusterId . get ( i ) == seqClusterId . get ( j ) ) { if ( ! used [ j ] ) { double dSq = tCenter . distanceSquared ( centers . get ( j ) ) ; if ( dSq < minDistSq && dSq <= rmsdThresholdSq ) { minDistSq = dSq ; permutation = j ; dSqs [ j ] = dSq ; } } } } // can ' t map to itself if ( permutations . size ( ) == permutation ) { permutation = - 1 ; } if ( permutation != - 1 ) { used [ permutation ] = true ; } permutations . add ( permutation ) ; } return permutations ;
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 setState ( int oldState , int newState ) throws InvalidBeanOStateException , BeanNotReentrantException // LIDB2775-23.7 { } }
// Inlined assertState ( oldState ) ; for performance . d154342.6 if ( state != oldState ) { throw new InvalidBeanOStateException ( getStateName ( state ) , getStateName ( oldState ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && // d527372 TEBeanLifeCycleInfo . isTraceEnabled ( ) ) TEBeanLifeCycleInfo . traceBeanState ( state , getStateName ( state ) , newState , getStateName ( newState ) ) ; // d167264 // Inlined setState ( newState ) ; for performance . d154342.6 state = newState ;
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 getBatchReceiver ( String queueName , long timeout ) { } }
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 paint . * @ param w the width to paint . * @ param h the height to paint . * @ param transform the affine transform to apply , or { @ code null } if none * is to be applied . */ private void paintBackground ( SynthContext ctx , Graphics g , int x , int y , int w , int h , AffineTransform transform ) { } }
// 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 != null ) ? c . getBackground ( ) : null ; if ( bg == null || bg . getAlpha ( ) > 0 ) { SeaGlassPainter backgroundPainter = style . getBackgroundPainter ( ctx ) ; if ( backgroundPainter != null ) { paint ( backgroundPainter , ctx , g , x , y , w , h , transform ) ; } }
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 > persist ( ) { } }
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 . out . println ( Arrays . toString ( q ) + " " + Arrays . toString ( v ) + " " + Arrays . toString ( r ) ) ; reset ( ) ; return tsdb . put ( r , q , v , base_time ) ;
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 */ public List executeQuery ( QueryBuilder filter , AggregationBuilder aggregation , final EntityMetadata entityMetadata , KunderaQuery query , int firstResult , int maxResults ) { } }
String [ ] fieldsToSelect = query . getResult ( ) ; Class clazz = entityMetadata . getEntityClazz ( ) ; MetamodelImpl metaModel = ( MetamodelImpl ) kunderaMetadata . getApplicationMetadata ( ) . getMetamodel ( entityMetadata . getPersistenceUnit ( ) ) ; FilteredQueryBuilder queryBuilder = QueryBuilders . filteredQuery ( null , filter ) ; SearchRequestBuilder builder = txClient . prepareSearch ( entityMetadata . getSchema ( ) . toLowerCase ( ) ) . setTypes ( entityMetadata . getTableName ( ) ) ; addFieldsToBuilder ( fieldsToSelect , clazz , metaModel , builder ) ; if ( aggregation == null ) { builder . setQuery ( queryBuilder ) ; builder . setFrom ( firstResult ) ; builder . setSize ( maxResults ) ; addSortOrder ( builder , query , entityMetadata ) ; } else { logger . debug ( "Aggregated query identified" ) ; builder . addAggregation ( aggregation ) ; if ( fieldsToSelect . length == 1 || ( query . isSelectStatement ( ) && query . getSelectStatement ( ) . hasGroupByClause ( ) ) ) { builder . setSize ( 0 ) ; } } SearchResponse response = null ; logger . debug ( "Query generated: " + builder ) ; try { response = builder . execute ( ) . actionGet ( ) ; logger . debug ( "Query execution response: " + response ) ; } catch ( ElasticsearchException e ) { logger . error ( "Exception occured while executing query on Elasticsearch." , e ) ; throw new KunderaException ( "Exception occured while executing query on Elasticsearch." , e ) ; } return esResponseReader . parseResponse ( response , aggregation , fieldsToSelect , metaModel , clazz , entityMetadata , query ) ;
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 . SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "SESSION_ID_HAS_NOT_BEEN_SET_SICO1043" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".exchangeStop" , CommsConstants . CONVERSATIONHELPERIMPL_04 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , e . getMessage ( ) , e ) ; throw e ; } CommsByteBuffer request = getCommsByteBuffer ( ) ; // Connection object id request . putShort ( connectionObjectId ) ; // Consumer session id request . putShort ( sessionId ) ; // Pass on call to server final CommsByteBuffer reply = jfapExchange ( request , JFapChannelConstants . SEG_STOP_SESS , JFapChannelConstants . PRIORITY_MEDIUM , true ) ; // Confirm appropriate data returned try { short err = reply . getCommandCompletionCode ( JFapChannelConstants . SEG_STOP_SESS_R ) ; if ( err != CommsConstants . SI_NO_EXCEPTION ) { checkFor_SISessionUnavailableException ( reply , err ) ; checkFor_SISessionDroppedException ( reply , err ) ; checkFor_SIConnectionUnavailableException ( reply , err ) ; checkFor_SIConnectionDroppedException ( reply , err ) ; checkFor_SIConnectionLostException ( reply , err ) ; checkFor_SIResourceException ( reply , err ) ; checkFor_SIErrorException ( reply , err ) ; defaultChecker ( reply , err ) ; } } finally { if ( reply != null ) reply . release ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "exchangeStop" ) ;
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 intersect ( final Range < C > range0 , final Range < C > range1 ) { } }
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 is a significant savings over running * single - linkage with a max - heap . * @ param numClusters the number of clusters to produce */ private < E extends Edge > MultiMap < Integer , Integer > singleLink ( final Graph < E > g , int numClusters ) { } }
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 < Edge > ( ) ; // Keep a simple int - > int mapping from each edge ' s index to ( 1 ) the // cluster its in , ( 2 ) the most similar edge to that edge , ( 3 ) the // similarity of the most similar edge . int [ ] edgeToCluster = new int [ numEdges ] ; final int [ ] edgeToMostSim = new int [ numEdges ] ; final double [ ] edgeToSimOfMostSim = new double [ numEdges ] ; // Keep track of the vertices in each cluster MultiMap < Integer , Integer > clusterToVertices = new HashMultiMap < Integer , Integer > ( ) ; // Loop over each edge in the graph and add the vertices for that edge // to the initial cluster assignment for ( Edge e : g . edges ( ) ) { int initialCluster = edgeIndexer . index ( new SimpleEdge ( e . from ( ) , e . to ( ) ) ) ; edgeToCluster [ initialCluster ] = initialCluster ; clusterToVertices . put ( initialCluster , e . to ( ) ) ; clusterToVertices . put ( initialCluster , e . from ( ) ) ; } // Ensure that the reverse lookup table is created in the Indexer ahead // of time , since threads will be accessing it concurrently edgeIndexer . lookup ( 0 ) ; // For each edge , find the most similar cluster updating the relative // indices of the rowToMostSimilar arrays with the results . Object taskKey = WORK_QUEUE . registerTaskGroup ( g . order ( ) ) ; IntIterator iter1 = g . vertices ( ) . iterator ( ) ; while ( iter1 . hasNext ( ) ) { final int v1 = iter1 . nextInt ( ) ; WORK_QUEUE . add ( taskKey , new Runnable ( ) { public void run ( ) { veryVerbose ( LOGGER , "Computing similarities for " + "vertex %d" , v1 ) ; IntSet neighbors = g . getNeighbors ( v1 ) ; IntIterator it1 = neighbors . iterator ( ) ; while ( it1 . hasNext ( ) ) { int v2 = it1 . nextInt ( ) ; IntIterator it2 = neighbors . iterator ( ) ; while ( it2 . hasNext ( ) ) { int v3 = it2 . nextInt ( ) ; if ( v2 == v3 ) break ; double sim = getConnectionSimilarity ( g , v1 , v2 , v3 ) ; int e1index = edgeIndexer . index ( new SimpleEdge ( v1 , v2 ) ) ; int e2index = edgeIndexer . index ( new SimpleEdge ( v1 , v3 ) ) ; // Lock on the canonical instance of e1 before // updating its similarity values synchronized ( edgeIndexer . lookup ( e1index ) ) { if ( sim > edgeToSimOfMostSim [ e1index ] ) { edgeToSimOfMostSim [ e1index ] = sim ; edgeToMostSim [ e1index ] = e2index ; } } // Lock on the canonical instance of e2 before // updating its similarity values synchronized ( edgeIndexer . lookup ( e2index ) ) { if ( sim > edgeToSimOfMostSim [ e2index ] ) { edgeToSimOfMostSim [ e2index ] = sim ; edgeToMostSim [ e2index ] = e1index ; } } } } } } ) ; } WORK_QUEUE . await ( taskKey ) ; // Keep track of the size of each cluster so that we can merge the // smaller into the larger . Each cluster has an initial size of 1 int [ ] clusterToNumEdges = new int [ numEdges ] ; Arrays . fill ( clusterToNumEdges , 1 ) ; verbose ( LOGGER , "Clustering edges" ) ; // Keep merging until we reach the desired number of clusters int mergeIter = 0 ; while ( clusterToVertices . size ( ) > numClusters ) { if ( LOGGER . isLoggable ( Level . FINE ) ) LOGGER . log ( Level . FINE , "Computing dendrogram merge {0}/{1}" , new Object [ ] { mergeIter + 1 , numEdges - 1 } ) ; // Find the edge that has the highest similarity to another edge int edge1index = - 1 ; int edge2index = - 1 ; // set during iteration double highestSim = - 1 ; for ( int i = 0 ; i < edgeToSimOfMostSim . length ; ++ i ) { if ( edgeToSimOfMostSim [ i ] > highestSim ) { int c1 = edgeToCluster [ i ] ; int mostSim = edgeToMostSim [ i ] ; int c2 = edgeToCluster [ mostSim ] ; if ( c1 != c2 ) { highestSim = edgeToSimOfMostSim [ i ] ; edge1index = i ; edge2index = edgeToMostSim [ i ] ; } } } int cluster1index = - 1 ; int cluster2index = - 1 ; // No more similar pairs ( disconnected graph ? ) so merge two // arbitrary clusters and continue if ( edge1index == - 1 ) { Iterator < Integer > it = clusterToVertices . keySet ( ) . iterator ( ) ; cluster1index = it . next ( ) ; cluster2index = it . next ( ) ; // by contract , we have > 2 clusters } else { cluster1index = edgeToCluster [ edge1index ] ; cluster2index = edgeToCluster [ edge2index ] ; } assert cluster1index != cluster2index : "merging same cluster" ; // System . out . printf ( " Merging c % d ( size : % d ) with c % d ( size : % d ) % n " , // cluster2index , clusterToVertices . get ( cluster2index ) . size ( ) , // cluster1index , clusterToVertices . get ( cluster1index ) . size ( ) ) ; Set < Integer > verticesInSmaller = clusterToVertices . get ( cluster2index ) ; clusterToVertices . putMany ( cluster1index , verticesInSmaller ) ; clusterToVertices . remove ( cluster2index ) ; clusterToNumEdges [ cluster1index ] += clusterToNumEdges [ cluster2index ] ; // Short circuit on the last iteration since we don ' t need to scan // through the list of edges again to update their most - similar - edge if ( mergeIter == numEdges - 2 ) break ; // Update the similarity for the second edge so that it is no longer // merged with another edge . Even if it is more similar , we maintain // the invariant that only the cluster1index is valid after a merge // operation edgeToSimOfMostSim [ edge1index ] = - 2d ; edgeToSimOfMostSim [ edge2index ] = - 3d ; // For all the edges not in the current cluster , find the most // similar data point to the now - merged cluster . Note that this // process doesn ' t need to update the nearest neighbors of these // nodes , as they should still be valid post - merge . int mostSimEdgeToCurCluster = - 1 ; highestSim = - 4d ; Edge e1 = edgeIndexer . lookup ( edge1index ) ; Edge e2 = edgeIndexer . lookup ( edge2index ) ; for ( int i = 0 ; i < numEdges ; i ++ ) { int cId = edgeToCluster [ i ] ; if ( cId == cluster1index ) { // See if the most similar edge is also an edge in cluster1, // in which case we should invalidate its similarity since // the clusters are already merged // int mostSimEdge = edgeToMostSim [ i ] ; // if ( edgeToCluster [ mostSimEdge ] = = cluster2index ) // edgeToSimOfMostSim [ i ] = Double . MIN _ VALUE ; continue ; } else if ( cId == cluster2index ) { edgeToCluster [ i ] = cluster1index ; // See if the most similar edge is also an edge in cluster1, // in which case we should invalidate its similarity since // the clusters are already merged // int mostSimEdge = edgeToMostSim [ i ] ; // if ( edgeToCluster [ mostSimEdge ] = = cluster1index ) // edgeToSimOfMostSim [ i ] = Double . MIN _ VALUE ; continue ; } Edge e3 = edgeIndexer . lookup ( i ) ; double simToE1 = getConnectionSimilarity ( g , e1 , e3 ) ; double simToE2 = getConnectionSimilarity ( g , e2 , e3 ) ; double sim = Math . max ( simToE1 , simToE2 ) ; if ( sim > highestSim ) { highestSim = sim ; mostSimEdgeToCurCluster = i ; } } edgeToMostSim [ edge1index ] = mostSimEdgeToCurCluster ; edgeToSimOfMostSim [ edge1index ] = highestSim ; } return clusterToVertices ;
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 ( LoadBalancerPoolFilter loadBalancerPoolFilter , LoadBalancerPoolConfig config ) { } }
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 . refById ( metadata . getDataCenterId ( ) ) ) ) ) . collect ( toList ( ) ) ; return update ( loadBalancerPoolList , config ) ;
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_DESTINATION + getMessagingEngineName ( ) ) ; // Set up a suitable qos defaultExceptionDestDef . setMaxReliability ( Reliability . ASSURED_PERSISTENT ) ; defaultExceptionDestDef . setDefaultReliability ( Reliability . ASSURED_PERSISTENT ) ; defaultExceptionDestDef . setUUID ( SIMPUtils . createSIBUuid12 ( SIMPConstants . SYSTEM_DEFAULT_EXCEPTION_DESTINATION + getMessagingEngineName ( ) ) ) ; // Destination is localized on this ME Set < String > destinationLocalizingMEs = new HashSet < String > ( ) ; destinationLocalizingMEs . add ( getMessagingEngineUuid ( ) . toString ( ) ) ; // Create the destination _destinationManager . createDestinationLocalization ( defaultExceptionDestDef , createLocalizationDefinition ( defaultExceptionDestDef . getName ( ) ) , destinationLocalizingMEs , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createSystemDefaultExceptionDestination" , defaultExceptionDestDef ) ; return defaultExceptionDestDef ;
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 createNodeData ( NodeData parent , InternalQName name , InternalQName primaryTypeName , InternalQName [ ] mixinTypesName , String identifier , AccessControlList acl ) { } }
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 . ATTRIBUTE_FOREGROUND ) ) ; setFontVariant ( ( String ) attr . getAttribute ( Constants . ATTRIBUTE_FONT_VARIANT ) ) ; @ SuppressWarnings ( "unchecked" ) List < TextDecoration > attribute = ( List < TextDecoration > ) attr . getAttribute ( Constants . ATTRIBUTE_TEXT_DECORATION ) ; setTextDecoration ( attribute ) ; }
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 , annoDomini ) ; } } List < NewYearStrategy > strategies = new ArrayList < > ( n ) ; for ( int i = 0 ; i < n ; i ++ ) { NewYearRule rule = NewYearRule . valueOf ( in . readUTF ( ) ) ; int annoDomini = in . readInt ( ) ; strategies . add ( new NewYearStrategy ( rule , annoDomini ) ) ; } return new NewYearStrategy ( strategies ) ;
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 with ( String name , Object value ) { } }
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 ( Object newObj , ClassDescriptor cld , boolean forced ) throws PersistenceBrokerException { } }
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 ( ) ; } getExiter ( ) . exit ( ) ;
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 } instances . < br > * < b > Note 1 < / b > : If contiguous keys are not required , using a sequence file instead is preferable from a performance * point of view . Contiguous keys are often only required for non - Spark use cases , such as with * { @ link org . datavec . hadoop . records . reader . mapfile . MapFileSequenceRecordReader } < br > * < b > Note 2 < / b > : This use a MapFile interval of { @ link # DEFAULT _ MAP _ FILE _ INTERVAL } , which is usually suitable for * use cases such as { @ link org . datavec . hadoop . records . reader . mapfile . MapFileSequenceRecordReader } . Use * { @ link # saveMapFileSequences ( String , JavaRDD , int , Integer ) } or { @ link # saveMapFileSequences ( String , JavaRDD , Configuration , Integer ) } * to customize this . < br > * Use { @ link # restoreMapFileSequences ( String , JavaSparkContext ) } to restore values saved with this method . * @ param path Path to save the MapFile * @ param rdd RDD to save * @ see # saveMapFileSequences ( String , JavaRDD ) * @ see # saveSequenceFile ( String , JavaRDD ) */ public static void saveMapFileSequences ( String path , JavaRDD < List < List < Writable > > > rdd ) { } }
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 ) { } }
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 ( flx < 0 ) flx = 0 ; int frx = fright . getWidth ( fy ) - floatXr ; if ( frx < 0 ) frx = 0 ; int avail = wlimit - flx - frx ; // if it does not fit the width , try to move down // TODO the available space must be tested for the whole height of the subbox final int startfy = fy ; // System . out . println ( " minw = " + minw + " avail = " + avail + " availw = " + availw ) ; while ( ( flx > floatXl || frx > floatXr ) // if the space can be narrower at least at one side && ( minw > avail ) ) // the subbox doesn ' t fit in this Y coordinate { int nexty = FloatList . getNextY ( fleft , fright , fy ) ; if ( nexty == - 1 ) fy += Math . max ( stat . maxh , getLineHeight ( ) ) ; // if we don ' t know try increasing by a line else fy = nexty ; // recompute the limits for the new fy flx = fleft . getWidth ( fy ) - floatXl ; if ( flx < 0 ) flx = 0 ; frx = fright . getWidth ( fy ) - floatXr ; if ( frx < 0 ) frx = 0 ; avail = wlimit - flx - frx ; } // do not consider the top margin when moving down if ( fy > startfy && subbox . margin . top != 0 ) { fy -= subbox . margin . top ; if ( fy < startfy ) fy = startfy ; } stat . y = fy - floatY ; // position the box subbox . setFloats ( new FloatList ( subbox ) , new FloatList ( subbox ) , 0 , 0 , 0 ) ; subbox . setPosition ( flx , stat . y ) ; subbox . setWidthAdjust ( - flx - frx ) ; // if ( availw ! = 0) // System . out . println ( " jo ! " ) ; subbox . doLayout ( avail , true , true ) ; // System . out . println ( " H = " + subbox . getHeight ( ) ) ; // check the colisions after the layout int xlimit [ ] = computeFloatLimits ( fy , fy + subbox . getBounds ( ) . height , new int [ ] { flx , frx } ) ; availw = wlimit - xlimit [ 0 ] - xlimit [ 1 ] ; if ( minw > availw ) // the whole box still does not fit yoffset = FloatList . getNextY ( fleft , fright , fy ) ; // new starting Y } while ( minw > availw && yoffset != - 1 ) ; stat . y += subbox . getHeight ( ) ; // maximal width if ( subbox . getWidth ( ) > stat . maxw ) stat . maxw = subbox . getWidth ( ) ;
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 */ public Audit getAudit ( BigInteger id ) throws IOException , TokenExpiredException { } }
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 > allowedValues , String value ) { } }
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 and not null or empty . False otherwise */ public static boolean hasNonEmptyPath ( Config config , String key ) { } }
return config . hasPath ( key ) && StringUtils . isNotBlank ( config . getString ( key ) ) ;