signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class ContainerCreate { /** * Construct set of port bindings from comma delimited list of ports .
* @ param portSpecs
* @ param exposedPorts
* @ param context
* @ return */
private Ports getPortBindings ( String portSpecs , ExposedPort [ ] exposedPorts , TestContext context ) { } }
|
String [ ] ports = StringUtils . commaDelimitedListToStringArray ( portSpecs ) ; Ports portsBindings = new Ports ( ) ; for ( String portSpec : ports ) { String [ ] binding = context . replaceDynamicContentInString ( portSpec ) . split ( ":" ) ; if ( binding . length == 2 ) { Integer hostPort = Integer . valueOf ( binding [ 0 ] ) ; Integer port = Integer . valueOf ( binding [ 1 ] ) ; portsBindings . bind ( Stream . of ( exposedPorts ) . filter ( exposed -> port . equals ( exposed . getPort ( ) ) ) . findAny ( ) . orElse ( ExposedPort . tcp ( port ) ) , Ports . Binding . bindPort ( hostPort ) ) ; } } Stream . of ( exposedPorts ) . filter ( exposed -> ! portsBindings . getBindings ( ) . keySet ( ) . contains ( exposed ) ) . forEach ( exposed -> portsBindings . bind ( exposed , Ports . Binding . empty ( ) ) ) ; return portsBindings ;
|
public class IdentityStoreHandlerServiceImpl { /** * Returns the partial subject for hashtable login
* @ param username
* @ return the partial subject which can be used for hashtable login if username and password are valid .
* @ throws com . ibm . ws . security . authentication . AuthenticationException */
@ Override public Subject createHashtableInSubject ( String username ) throws AuthenticationException { } }
|
CallerOnlyCredential credential = new CallerOnlyCredential ( username ) ; return createHashtableInSubject ( credential ) ;
|
public class BatchCreateNotesRequest { /** * Use { @ link # getNotesMap ( ) } instead . */
@ java . lang . Deprecated public java . util . Map < java . lang . String , io . grafeas . v1beta1 . Note > getNotes ( ) { } }
|
return getNotesMap ( ) ;
|
public class AWSStepFunctionsClient { /** * Lists the existing state machines .
* If < code > nextToken < / code > is returned , there are more results available . The value of < code > nextToken < / code > is a
* unique pagination token for each page . Make the call again using the returned token to retrieve the next page .
* Keep all other arguments unchanged . Each pagination token expires after 24 hours . Using an expired pagination
* token will return an < i > HTTP 400 InvalidToken < / i > error .
* < note >
* This operation is eventually consistent . The results are best effort and may not reflect very recent updates and
* changes .
* < / note >
* @ param listStateMachinesRequest
* @ return Result of the ListStateMachines operation returned by the service .
* @ throws InvalidTokenException
* The provided token is invalid .
* @ sample AWSStepFunctions . ListStateMachines
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / states - 2016-11-23 / ListStateMachines " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public ListStateMachinesResult listStateMachines ( ListStateMachinesRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeListStateMachines ( request ) ;
|
public class WIMUserRegistry { /** * { @ inheritDoc } */
@ Override @ FFDCIgnore ( Exception . class ) public SearchResult getGroups ( final String inputPattern , final int inputLimit ) throws RegistryException { } }
|
try { SearchResult returnValue = searchBridge . getGroups ( inputPattern , inputLimit ) ; return returnValue ; } catch ( Exception excp ) { if ( excp instanceof RegistryException ) throw ( RegistryException ) excp ; else throw new RegistryException ( excp . getMessage ( ) , excp ) ; }
|
public class AbstractRegistry { /** * { @ inheritDoc }
* @ return { @ inheritDoc } */
@ Override public int size ( ) { } }
|
registryLock . readLock ( ) . lock ( ) ; try { return entryMap . size ( ) ; } finally { registryLock . readLock ( ) . unlock ( ) ; }
|
public class ConfigWebUtil { /** * default encryption for configuration ( not very secure )
* @ param str
* @ return */
public static String decrypt ( String str ) { } }
|
if ( StringUtil . isEmpty ( str ) || ! StringUtil . startsWithIgnoreCase ( str , "encrypted:" ) ) return str ; str = str . substring ( 10 ) ; return new BlowfishEasy ( "sdfsdfs" ) . decryptString ( str ) ;
|
public class XMLStreamEventsSync { /** * Shortcut to move forward to the next START _ ELEMENT , return false if no START _ ELEMENT event was found . */
public boolean nextStartElement ( ) throws XMLException , IOException { } }
|
try { do { next ( ) ; } while ( ! Type . START_ELEMENT . equals ( event . type ) ) ; return true ; } catch ( EOFException e ) { return false ; }
|
public class ServiceUtils { /** * Find the only expected instance of { @ code clazz } among the { @ code instances } .
* @ param clazz searched class
* @ param instances instances looked at
* @ param < T > type of the searched instance
* @ return the optionally found compatible instance
* @ throws IllegalArgumentException if more than one matching instance */
public static < T > Optional < T > findOptionalAmongst ( Class < T > clazz , Collection < ? > instances ) { } }
|
return findStreamAmongst ( clazz , instances ) . reduce ( ( i1 , i2 ) -> { throw new IllegalArgumentException ( "More than one " + clazz . getName ( ) + " found" ) ; } ) ;
|
public class DigestUtils { /** * Create a new { @ link MessageDigest } with the given algorithm . Necessary because { @ code MessageDigest } is not
* thread - safe . */
private static MessageDigest getDigest ( String algorithm ) { } }
|
try { return MessageDigest . getInstance ( algorithm ) ; } catch ( NoSuchAlgorithmException ex ) { throw new IllegalStateException ( "Could not find MessageDigest with algorithm \"" + algorithm + "\"" , ex ) ; }
|
public class SimpleFormatter { /** * / * [ deutsch ]
* < p > Konstruiert einen Formatierer f & uuml ; r globale Zeitstempelobjekte ( Momente ) . < / p >
* @ param dateStyle format style for the date component
* @ param timeStyle format style for the time component
* @ param locale format locale
* @ param tzid timezone id
* @ return new { @ code SimpleFormatter } - instance
* @ throws IllegalStateException if no localized format pattern can be retrieved
* @ since 5.0 */
public static SimpleFormatter < Moment > ofMomentStyle ( DisplayMode dateStyle , DisplayMode timeStyle , Locale locale , TZID tzid ) { } }
|
DateFormat df = DateFormat . getDateTimeInstance ( dateStyle . getStyleValue ( ) , timeStyle . getStyleValue ( ) , locale ) ; String pattern = getFormatPattern ( df ) ; return SimpleFormatter . ofMomentPattern ( pattern , locale , tzid ) ;
|
public class TransformTimestampToCalendar { /** * Transforms the
* < code > java . sql . Timestamp < / code > returned from JDBC into a
* < code > java . util . Calendar < / code > to be used by the class .
* @ param ts The Timestamp from JDBC .
* @ return A Calendar Object
* @ throws CpoException */
@ Override public Calendar transformIn ( Timestamp ts ) throws CpoException { } }
|
Calendar cal = null ; if ( ts != null ) { cal = Calendar . getInstance ( ) ; cal . setTimeInMillis ( ts . getTime ( ) ) ; } return cal ;
|
public class DfsTraversalNode { /** * Get a Node object for each possible state of the system after triggering
* the given event .
* @ param e the selected event
* @ param exSvc The executor service that will run the threads
* @ return State of the BProgram after event { @ code e } was selected while
* the program was at { @ code this } node ' s state .
* @ throws BPjsRuntimeException In case there ' s an error running the JavaScript code . */
public DfsTraversalNode getNextNode ( BEvent e , ExecutorService exSvc ) throws BPjsRuntimeException { } }
|
try { return new DfsTraversalNode ( bp , BProgramSyncSnapshotCloner . clone ( systemState ) . triggerEvent ( e , exSvc , Collections . emptySet ( ) ) , e ) ; } catch ( InterruptedException ie ) { throw new BPjsRuntimeException ( "Thread interrupted during event invocaiton" , ie ) ; }
|
public class InjectionPointFactory { /** * Creation of callable InjectionPoints */
public < T > ConstructorInjectionPoint < T > createConstructorInjectionPoint ( Bean < T > declaringBean , EnhancedAnnotatedType < T > type , BeanManagerImpl manager ) { } }
|
EnhancedAnnotatedConstructor < T > constructor = Beans . getBeanConstructorStrict ( type ) ; return createConstructorInjectionPoint ( declaringBean , type . getJavaClass ( ) , constructor , manager ) ;
|
public class Metadata { /** * Serialize all the metadata entries .
* < p > It produces serialized names and values interleaved . result [ i * 2 ] are names , while
* result [ i * 2 + 1 ] are values .
* < p > Names are ASCII string bytes that contains only the characters listed in the class comment
* of { @ link Key } . If the name ends with { @ code " - bin " } , the value can be raw binary . Otherwise ,
* the value must contain only characters listed in the class comments of { @ link AsciiMarshaller }
* < p > The returned individual byte arrays < em > must not < / em > be modified . However , the top level
* array may be modified .
* < p > This method is intended for transport use only . */
@ Nullable byte [ ] [ ] serialize ( ) { } }
|
if ( len ( ) == cap ( ) ) { return namesAndValues ; } byte [ ] [ ] serialized = new byte [ len ( ) ] [ ] ; System . arraycopy ( namesAndValues , 0 , serialized , 0 , len ( ) ) ; return serialized ;
|
public class BDDDotFileWriter { /** * Writes a given BDD as a dot file .
* @ param fileName the file name of the dot file to write
* @ param bdd the BDD
* @ throws IOException if there was a problem writing the file */
public static void write ( final String fileName , final BDD bdd ) throws IOException { } }
|
write ( new File ( fileName . endsWith ( ".dot" ) ? fileName : fileName + ".dot" ) , bdd ) ;
|
public class MessageDigestUtils { /** * Calculate the message digest value with SHA 256 algorithm .
* @ param data to calculate .
* @ return message digest value . */
public static byte [ ] computeSha256 ( final byte [ ] data ) { } }
|
try { return MessageDigest . getInstance ( ALGORITHM_SHA_256 ) . digest ( data ) ; } catch ( NoSuchAlgorithmException e ) { throw new IllegalStateException ( "unsupported algorithm for message digest: " , e ) ; }
|
public class ModeledUser { /** * Stores all restricted ( privileged ) attributes within the given Map ,
* pulling the values of those attributes from the underlying user model .
* If no value is yet defined for an attribute , that attribute will be set
* to null .
* @ param attributes
* The Map to store all restricted attributes within . */
private void putRestrictedAttributes ( Map < String , String > attributes ) { } }
|
// Set disabled attribute
attributes . put ( DISABLED_ATTRIBUTE_NAME , getModel ( ) . isDisabled ( ) ? "true" : null ) ; // Set password expired attribute
attributes . put ( EXPIRED_ATTRIBUTE_NAME , getModel ( ) . isExpired ( ) ? "true" : null ) ; // Set access window start time
attributes . put ( ACCESS_WINDOW_START_ATTRIBUTE_NAME , TimeField . format ( getModel ( ) . getAccessWindowStart ( ) ) ) ; // Set access window end time
attributes . put ( ACCESS_WINDOW_END_ATTRIBUTE_NAME , TimeField . format ( getModel ( ) . getAccessWindowEnd ( ) ) ) ; // Set account validity start date
attributes . put ( VALID_FROM_ATTRIBUTE_NAME , DateField . format ( getModel ( ) . getValidFrom ( ) ) ) ; // Set account validity end date
attributes . put ( VALID_UNTIL_ATTRIBUTE_NAME , DateField . format ( getModel ( ) . getValidUntil ( ) ) ) ; // Set timezone attribute
attributes . put ( TIMEZONE_ATTRIBUTE_NAME , getModel ( ) . getTimeZone ( ) ) ;
|
public class XMLUnit { /** * Get the < code > DocumentBuilder < / code > instance used to parse the control
* XML in an XMLTestCase .
* @ return parser for control values
* @ throws ConfigurationException */
public static DocumentBuilder newControlParser ( ) throws ConfigurationException { } }
|
try { controlBuilderFactory = getControlDocumentBuilderFactory ( ) ; DocumentBuilder builder = controlBuilderFactory . newDocumentBuilder ( ) ; if ( controlEntityResolver != null ) { builder . setEntityResolver ( controlEntityResolver ) ; } return builder ; } catch ( ParserConfigurationException ex ) { throw new ConfigurationException ( ex ) ; }
|
public class ContextVector { /** * Gives the list of terms in this context vector sorted by frequency
* ( most frequent first )
* @ return */
public List < Entry > getEntries ( ) { } }
|
if ( _sortedEntries == null ) { this . _sortedEntries = Lists . newArrayListWithCapacity ( entries . size ( ) ) ; for ( Map . Entry < Term , Entry > e : entries . entrySet ( ) ) this . _sortedEntries . add ( e . getValue ( ) ) ; Collections . sort ( this . _sortedEntries ) ; } return _sortedEntries ;
|
public class PackagesScreen { /** * Set up all the screen fields . */
public void setupSFields ( ) { } }
|
this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . CODE ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . NAME ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . COMMENT ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . SEQUENCE ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . PART_ID ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . CLASS_PROJECT_ID ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . CODE_TYPE ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . RECURSIVE ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . EXCLUDE ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ; this . getRecord ( Packages . PACKAGES_FILE ) . getField ( Packages . MANUAL ) . setupDefaultView ( this . getNextLocation ( ScreenConstants . NEXT_LOGICAL , ScreenConstants . ANCHOR_DEFAULT ) , this , ScreenConstants . DEFAULT_DISPLAY ) ;
|
public class Dim { /** * Attaches the debugger to the given ContextFactory . */
public void attachTo ( ContextFactory factory ) { } }
|
detach ( ) ; this . contextFactory = factory ; this . listener = new DimIProxy ( this , IPROXY_LISTEN ) ; factory . addListener ( this . listener ) ;
|
public class dnsaddrec { /** * Use this API to fetch all the dnsaddrec resources that are configured on netscaler .
* This uses dnsaddrec _ args which is a way to provide additional arguments while fetching the resources . */
public static dnsaddrec [ ] get ( nitro_service service , dnsaddrec_args args ) throws Exception { } }
|
dnsaddrec obj = new dnsaddrec ( ) ; options option = new options ( ) ; option . set_args ( nitro_util . object_to_string_withoutquotes ( args ) ) ; dnsaddrec [ ] response = ( dnsaddrec [ ] ) obj . get_resources ( service , option ) ; return response ;
|
public class NodeTypes { /** * Obtain a new version of this cache with the specified node types added to the new cache .
* @ param addedNodeTypes the node types that are to be added to the resulting cache ; may not be null but may be empty
* @ return the resulting cache that contains all of the node types within this cache and the supplied node types ; never null */
protected NodeTypes with ( Collection < JcrNodeType > addedNodeTypes ) { } }
|
if ( addedNodeTypes . isEmpty ( ) ) return this ; Collection < JcrNodeType > nodeTypes = new HashSet < JcrNodeType > ( this . nodeTypes . values ( ) ) ; // if there are updated node types , remove them first ( hashcode is based on name alone ) ,
// else addAll ( ) will ignore the changes .
nodeTypes . removeAll ( addedNodeTypes ) ; nodeTypes . addAll ( addedNodeTypes ) ; return new NodeTypes ( this . context , nodeTypes , getVersion ( ) + 1 ) ;
|
public class UpdateDevEndpointRequest { /** * The map of arguments to add the map of arguments used to configure the DevEndpoint .
* @ param addArguments
* The map of arguments to add the map of arguments used to configure the DevEndpoint .
* @ return Returns a reference to this object so that method calls can be chained together . */
public UpdateDevEndpointRequest withAddArguments ( java . util . Map < String , String > addArguments ) { } }
|
setAddArguments ( addArguments ) ; return this ;
|
public class ClustersInner { /** * Gets the gateway settings for the specified cluster .
* @ param resourceGroupName The name of the resource group .
* @ param clusterName The name of the cluster .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the GatewaySettingsInner object */
public Observable < GatewaySettingsInner > getGatewaySettingsAsync ( String resourceGroupName , String clusterName ) { } }
|
return getGatewaySettingsWithServiceResponseAsync ( resourceGroupName , clusterName ) . map ( new Func1 < ServiceResponse < GatewaySettingsInner > , GatewaySettingsInner > ( ) { @ Override public GatewaySettingsInner call ( ServiceResponse < GatewaySettingsInner > response ) { return response . body ( ) ; } } ) ;
|
public class CommonsQueryEngine { /** * This method execute a query .
* @ param workflow the workflow to be executed .
* @ return the query result .
* @ throws ConnectorException if a error happens . */
@ Override public final QueryResult execute ( String queryId , LogicalWorkflow workflow ) throws ConnectorException { } }
|
QueryResult result = null ; Long time = null ; try { for ( LogicalStep project : workflow . getInitialSteps ( ) ) { ClusterName clusterName = ( ( Project ) project ) . getClusterName ( ) ; connectionHandler . startJob ( clusterName . getName ( ) ) ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Executing [" + workflow . toString ( ) + "]" ) ; } time = System . currentTimeMillis ( ) ; result = executeWorkFlow ( workflow ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "The query has finished. The result form the query [" + workflow . toString ( ) + "] has returned " + "[" + result . getResultSet ( ) . size ( ) + "] rows" ) ; } } finally { for ( LogicalStep project : workflow . getInitialSteps ( ) ) { connectionHandler . endJob ( ( ( Project ) project ) . getClusterName ( ) . getName ( ) ) ; } if ( time != null ) { logger . info ( "TIME - The execute time has been [" + ( System . currentTimeMillis ( ) - time ) + "]" ) ; } } return result ;
|
public class WicketUrlExtensions { /** * Gets the canonical page url . Try to reduce url by eliminating ' . . ' and ' . ' from the path
* where appropriate ( this is somehow similar to { @ link java . io . File # getCanonicalPath ( ) } ) .
* @ param pageClass
* the page class
* @ param parameters
* the parameters
* @ return the page url
* @ see Url # canonical ( ) */
public static Url getCanonicalPageUrl ( final Class < ? extends Page > pageClass , final PageParameters parameters ) { } }
|
return getPageUrl ( pageClass , parameters ) . canonical ( ) ;
|
public class TransactWriteItemsRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( TransactWriteItemsRequest transactWriteItemsRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( transactWriteItemsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( transactWriteItemsRequest . getTransactItems ( ) , TRANSACTITEMS_BINDING ) ; protocolMarshaller . marshall ( transactWriteItemsRequest . getReturnConsumedCapacity ( ) , RETURNCONSUMEDCAPACITY_BINDING ) ; protocolMarshaller . marshall ( transactWriteItemsRequest . getReturnItemCollectionMetrics ( ) , RETURNITEMCOLLECTIONMETRICS_BINDING ) ; protocolMarshaller . marshall ( transactWriteItemsRequest . getClientRequestToken ( ) , CLIENTREQUESTTOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class CryptoHelper { /** * Create signature for JWT header and payload .
* @ param algorithm algorithm name .
* @ param secretBytes algorithm secret .
* @ param headerBytes JWT header .
* @ param payloadBytes JWT payload .
* @ return the signature bytes .
* @ throws NoSuchAlgorithmException if the algorithm is not supported .
* @ throws InvalidKeyException if the given key is inappropriate for initializing the specified algorithm . */
byte [ ] createSignatureFor ( String algorithm , byte [ ] secretBytes , byte [ ] headerBytes , byte [ ] payloadBytes ) throws NoSuchAlgorithmException , InvalidKeyException { } }
|
final Mac mac = Mac . getInstance ( algorithm ) ; mac . init ( new SecretKeySpec ( secretBytes , algorithm ) ) ; mac . update ( headerBytes ) ; mac . update ( JWT_PART_SEPARATOR ) ; return mac . doFinal ( payloadBytes ) ;
|
public class Timespan { /** * Validates the timespan
* @ throws IllegalArgumentException if one or more parameters were invalid */
public void validate ( ) { } }
|
if ( start == null || start . isEmpty ( ) ) { throw new IllegalArgumentException ( "missing or empty start" ) ; } DateTime . parseDateTimeString ( start , timezone ) ; if ( end != null && ! end . isEmpty ( ) ) { DateTime . parseDateTimeString ( end , timezone ) ; } if ( downsampler != null ) { downsampler . validate ( ) ; } if ( aggregator == null || aggregator . isEmpty ( ) ) { throw new IllegalArgumentException ( "Missing or empty aggregator" ) ; } try { Aggregators . get ( aggregator . toLowerCase ( ) ) ; } catch ( final NoSuchElementException e ) { throw new IllegalArgumentException ( "Invalid aggregator" ) ; }
|
public class CardAPI { /** * 创建团购券
* @ param accessToken accessToken
* @ param grouponCard grouponCard
* @ return result */
public static CreateResult create ( String accessToken , GrouponCard grouponCard ) { } }
|
Create < GrouponCard > card = new Create < GrouponCard > ( ) ; card . setCard ( grouponCard ) ; return create ( accessToken , card ) ;
|
public class ActivitysInner { /** * Retrieve a list of activities in the module identified by module name .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PagedList & lt ; ActivityInner & gt ; object */
public Observable < Page < ActivityInner > > listByModuleNextAsync ( final String nextPageLink ) { } }
|
return listByModuleNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < ActivityInner > > , Page < ActivityInner > > ( ) { @ Override public Page < ActivityInner > call ( ServiceResponse < Page < ActivityInner > > response ) { return response . body ( ) ; } } ) ;
|
public class ActorRef { /** * Send message once
* @ param message message
* @ param delay delay
* @ param sender sender */
public void sendOnce ( Object message , long delay , ActorRef sender ) { } }
|
dispatcher . sendMessageOnce ( endpoint , message , ActorTime . currentTime ( ) + delay , sender ) ;
|
public class Model { /** * Gets the person with the specified name .
* @ param name the name of the person
* @ return the Person instance with the specified name ( or null if it doesn ' t exist )
* @ throws IllegalArgumentException if the name is null or empty */
@ Nullable public Person getPersonWithName ( @ Nonnull String name ) { } }
|
if ( name == null || name . trim ( ) . length ( ) == 0 ) { throw new IllegalArgumentException ( "A person name must be specified." ) ; } for ( Person person : getPeople ( ) ) { if ( person . getName ( ) . equals ( name ) ) { return person ; } } return null ;
|
public class EntityReferenceResolverDecorator { /** * Resolve entity references based on given fetch */
@ Override public Stream < Entity > findAll ( Query < Entity > q ) { } }
|
Stream < Entity > entities = delegate ( ) . findAll ( q ) ; return resolveEntityReferences ( entities , q . getFetch ( ) ) ;
|
public class Distance { /** * Gets the Minkowski distance between two points .
* @ param u A point in space .
* @ param v A point in space .
* @ param p Order between two points .
* @ return The Minkowski distance between x and y . */
public static double Minkowski ( double [ ] u , double [ ] v , double p ) { } }
|
double distance = 0 ; for ( int i = 0 ; i < u . length ; i ++ ) { distance += Math . pow ( Math . abs ( u [ i ] - v [ i ] ) , p ) ; } return Math . pow ( distance , 1 / p ) ;
|
public class JmolSymmetryScriptGeneratorCn { /** * Returns the name of a specific orientation
* @ param index orientation index
* @ return name of orientation */
@ Override public String getOrientationName ( int index ) { } }
|
if ( getAxisTransformation ( ) . getRotationGroup ( ) . getPointGroup ( ) . equals ( "C2" ) ) { if ( index == 0 ) { return "Front C2 axis" ; } else if ( index == 2 ) { return "Back C2 axis" ; } } return getPolyhedron ( ) . getViewName ( index ) ;
|
public class DescribeProtectionRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeProtectionRequest describeProtectionRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( describeProtectionRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeProtectionRequest . getProtectionId ( ) , PROTECTIONID_BINDING ) ; protocolMarshaller . marshall ( describeProtectionRequest . getResourceArn ( ) , RESOURCEARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class CreateNetworkInterfacePermissionRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional
* parameters to enable operation dry - run . */
@ Override public Request < CreateNetworkInterfacePermissionRequest > getDryRunRequest ( ) { } }
|
Request < CreateNetworkInterfacePermissionRequest > request = new CreateNetworkInterfacePermissionRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
|
public class CategoryChart { /** * Update a series by updating the X - Axis , Y - Axis and error bar data
* @ param seriesName
* @ param newXData - set null to be automatically generated as a list of increasing Integers
* starting from 1 and ending at the size of the new Y - Axis data list .
* @ param newYData
* @ param newErrorBarData - set null if there are no error bars
* @ return */
public CategorySeries updateCategorySeries ( String seriesName , double [ ] newXData , double [ ] newYData , double [ ] newErrorBarData ) { } }
|
return updateCategorySeries ( seriesName , Utils . getNumberListFromDoubleArray ( newXData ) , Utils . getNumberListFromDoubleArray ( newYData ) , Utils . getNumberListFromDoubleArray ( newErrorBarData ) ) ;
|
public class StringGroovyMethods { /** * Finds all occurrences of a regular expression string within a CharSequence . Any matches are passed to the specified closure . The closure
* is expected to have the full match in the first parameter . If there are any capture groups , they will be placed in subsequent parameters .
* If there are no matches , the closure will not be called , and an empty List will be returned .
* For example , if the regex doesn ' t match , it returns an empty list :
* < pre >
* assert [ ] = = " foo " . findAll ( / ( \ w * ) Fish / ) { match , firstWord - > return firstWord }
* < / pre >
* Any regular expression matches are passed to the closure , if there are no capture groups , there will be one parameter for the match :
* < pre >
* assert [ " couldn ' t " , " wouldn ' t " ] = = " I could not , would not , with a fox . " . findAll ( / . ould / ) { match - > " $ { match } n ' t " }
* < / pre >
* If there are capture groups , the first parameter will be the match followed by one parameter for each capture group :
* < pre >
* def orig = " There ' s a Wocket in my Pocket "
* assert [ " W > Wocket " , " P > Pocket " ] = = orig . findAll ( / ( . ) ocket / ) { match , firstLetter - > " $ firstLetter > $ match " }
* < / pre >
* @ param self a CharSequence
* @ param regex the capturing regex CharSequence
* @ param closure will be passed the full match plus each of the capturing groups ( if any )
* @ return a List containing all results from calling the closure with each full match ( and potentially capturing groups ) of the regex within the CharSequence , an empty list will be returned if there are no matches
* @ see # findAll ( CharSequence , Pattern , groovy . lang . Closure )
* @ since 1.8.2 */
public static < T > List < T > findAll ( CharSequence self , CharSequence regex , @ ClosureParams ( value = SimpleType . class , options = "java.lang.String[]" ) Closure < T > closure ) { } }
|
return findAll ( self , Pattern . compile ( regex . toString ( ) ) , closure ) ;
|
public class LinearEquationSystem { /** * Method for trivial pivot search , searches for non - zero entry .
* @ param k search starts at entry ( k , k )
* @ return the position of the found pivot element */
private IntIntPair nonZeroPivotSearch ( int k ) { } }
|
int i , j ; double absValue ; for ( i = k ; i < coeff . length ; i ++ ) { for ( j = k ; j < coeff [ 0 ] . length ; j ++ ) { // compute absolute value of
// current entry in absValue
absValue = Math . abs ( coeff [ row [ i ] ] [ col [ j ] ] ) ; // check if absValue is non - zero
if ( absValue > 0 ) { // found a pivot element
return new IntIntPair ( i , j ) ; } // end if
} // end for j
} // end for k
return new IntIntPair ( k , k ) ;
|
public class HtmlForm { /** * < p > Return the value of the < code > acceptcharset < / code > property . < / p >
* < p > Contents : List of character encodings for input data
* that are accepted by the server processing
* this form . */
public java . lang . String getAcceptcharset ( ) { } }
|
return ( java . lang . String ) getStateHelper ( ) . eval ( PropertyKeys . acceptcharset ) ;
|
public class OtpMbox { /** * used to break all known links to this mbox */
void breakLinks ( final OtpErlangObject reason ) { } }
|
final Link [ ] l = links . clearLinks ( ) ; if ( l != null ) { final int len = l . length ; for ( int i = 0 ; i < len ; i ++ ) { exit ( 1 , l [ i ] . remote ( ) , reason ) ; } }
|
public class TinyBus { /** * Use this method to get a bus instance bound to the given context .
* If instance does not yet exist in the context , a new instance
* will be created . Otherwise existing instance gets returned .
* < p > Bus instance can be bound to a context .
* < p > If you need a singleton instance existing only once for the
* whole application , provide application context here . This option
* can be chosen for < code > Activity < / code > to < code > Service < / code >
* communication .
* If you need a bus instance per < code > Activity < / code > , you have
* to provide activity context in there . This option is perfect for
* < code > Activity < / code > to < code > Fragment < / code > or
* < code > Fragment < / code > to < code > Fragment < / code > communication .
* Bus instance gets destroyed when your context is destroyed .
* @ param contextcontext to which this instance of bus has to be bound
* @ returnevent bus instance , never null */
public static synchronized TinyBus from ( Context context ) { } }
|
final TinyBusDepot depot = TinyBusDepot . get ( context ) ; TinyBus bus = depot . getBusInContext ( context ) ; if ( bus == null ) { bus = depot . createBusInContext ( context ) ; } return bus ;
|
public class TypeUtil { /** * Returns a string representation of the byte array as an unsigned array of bytes
* ( e . g . " [ 1 , 2 , 3 ] " - Not a conversion of the byte array to a string ) .
* @ param bytes the byte array
* @ return the byte array as a string */
public static String byteArray2String ( byte [ ] bytes ) { } }
|
StringBuffer sb = new StringBuffer ( "[" ) ; // $ NON - NLS - 1 $
int i = 0 ; for ( byte b : bytes ) { sb . append ( i ++ == 0 ? "" : ", " ) . append ( ( ( int ) b ) & 0xFF ) ; // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $
} return sb . append ( "]" ) . toString ( ) ; // $ NON - NLS - 1 $
|
public class CmsJspStandardContextBean { /** * Returns a lazy map which creates a wrapper object for a dynamic function format when given an XML content
* as a key . < p >
* @ return a lazy map for accessing function formats for a content */
public Map < CmsJspContentAccessBean , CmsDynamicFunctionFormatWrapper > getFunctionFormatFromContent ( ) { } }
|
Transformer transformer = new Transformer ( ) { @ Override public Object transform ( Object contentAccess ) { CmsXmlContent content = ( CmsXmlContent ) ( ( ( CmsJspContentAccessBean ) contentAccess ) . getRawContent ( ) ) ; CmsDynamicFunctionParser parser = new CmsDynamicFunctionParser ( ) ; CmsDynamicFunctionBean functionBean = null ; try { functionBean = parser . parseFunctionBean ( m_cms , content ) ; } catch ( CmsException e ) { LOG . debug ( e . getLocalizedMessage ( ) , e ) ; return new CmsDynamicFunctionFormatWrapper ( m_cms , null ) ; } String type = getContainer ( ) . getType ( ) ; String width = getContainer ( ) . getWidth ( ) ; int widthNum = - 1 ; try { widthNum = Integer . parseInt ( width ) ; } catch ( NumberFormatException e ) { LOG . debug ( e . getLocalizedMessage ( ) , e ) ; } CmsDynamicFunctionBean . Format format = functionBean . getFormatForContainer ( m_cms , type , widthNum ) ; CmsDynamicFunctionFormatWrapper wrapper = new CmsDynamicFunctionFormatWrapper ( m_cms , format ) ; return wrapper ; } } ; return CmsCollectionsGenericWrapper . createLazyMap ( transformer ) ;
|
public class RendererRequestUtils { /** * Clears the request when dispatch
* @ param request
* the request
* @ param requestDispatchAttribute
* the request attribute name to determine the dispatch type
* @ param bundleRendererCtxAttributeName
* the bundle renderer context attribute to clean
* @ param jawrDispathAttributeName
* the jawr dispatch attribute used to ensure that the clear is
* done only once */
protected static void clearRequestWhenDispatch ( HttpServletRequest request , String requestDispatchAttribute , String bundleRendererCtxAttributeName , String jawrDispathAttributeName ) { } }
|
if ( request . getAttribute ( requestDispatchAttribute ) != null && request . getAttribute ( jawrDispathAttributeName ) == null ) { request . removeAttribute ( bundleRendererCtxAttributeName ) ; request . setAttribute ( jawrDispathAttributeName , Boolean . TRUE ) ; }
|
public class KeyVaultClientBaseImpl { /** * List all versions of the specified secret .
* The full secret identifier and attributes are provided in the response . No values are returned for the secrets . This operations requires the secrets / list permission .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ param serviceFuture the ServiceFuture object tracking the Retrofit calls
* @ 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 < List < SecretItem > > getSecretVersionsNextAsync ( final String nextPageLink , final ServiceFuture < List < SecretItem > > serviceFuture , final ListOperationCallback < SecretItem > serviceCallback ) { } }
|
return AzureServiceFuture . fromPageResponse ( getSecretVersionsNextSinglePageAsync ( nextPageLink ) , new Func1 < String , Observable < ServiceResponse < Page < SecretItem > > > > ( ) { @ Override public Observable < ServiceResponse < Page < SecretItem > > > call ( String nextPageLink ) { return getSecretVersionsNextSinglePageAsync ( nextPageLink ) ; } } , serviceCallback ) ;
|
public class CmsFrameset { /** * Returns the startup URI for display in the main body frame , this can
* either be the user default view , or ( if set ) a specific startup resource . < p >
* @ return the startup URI for display in the main body frame */
public String getStartupUri ( ) { } }
|
String result = getSettings ( ) . getViewStartup ( ) ; if ( result == null ) { // no specific startup URI is set , use view from user settings
result = getSettings ( ) . getViewUri ( ) ; } else { // reset the startup URI , so that it is not displayed again on reload of the frameset
getSettings ( ) . setViewStartup ( null ) ; } // add eventual request parameters to startup uri
if ( getJsp ( ) . getRequest ( ) . getParameterMap ( ) . size ( ) > 0 ) { @ SuppressWarnings ( "unchecked" ) Set < Entry < String , String [ ] > > params = getJsp ( ) . getRequest ( ) . getParameterMap ( ) . entrySet ( ) ; Iterator < Entry < String , String [ ] > > i = params . iterator ( ) ; while ( i . hasNext ( ) ) { Entry < ? , ? > entry = i . next ( ) ; result = CmsRequestUtil . appendParameter ( result , ( String ) entry . getKey ( ) , ( ( String [ ] ) entry . getValue ( ) ) [ 0 ] ) ; } } // append the frame name to the startup uri
return CmsRequestUtil . appendParameter ( result , CmsFrameset . PARAM_WP_FRAME , FRAMES [ 2 ] ) ;
|
public class BaasDocument { /** * Asynchronously fetches the document identified by < code > id < / code > in < code > collection < / code >
* @ param collection the collection to retrieve the document from . Not < code > null < / code >
* @ param id the id of the document to retrieve . Not < code > null < / code >
* @ param withAcl if true will fetch acl
* @ param handler a callback to be invoked with the result of the request
* @ return a { @ link com . baasbox . android . RequestToken } to handle the asynchronous request */
public static RequestToken fetch ( String collection , String id , boolean withAcl , BaasHandler < BaasDocument > handler ) { } }
|
return doFetch ( collection , id , withAcl , RequestOptions . DEFAULT , handler ) ;
|
public class CmsXmlContentDefinition { /** * Validates if a given element has exactly the required attributes set . < p >
* @ param element the element to validate
* @ param requiredAttributes the list of required attributes
* @ param optionalAttributes the list of optional attributes
* @ throws CmsXmlException if the validation fails */
protected static void validateAttributesExists ( Element element , String [ ] requiredAttributes , String [ ] optionalAttributes ) throws CmsXmlException { } }
|
if ( element . attributeCount ( ) < requiredAttributes . length ) { throw new CmsXmlException ( Messages . get ( ) . container ( Messages . ERR_EL_ATTRIBUTE_TOOFEW_3 , element . getUniquePath ( ) , new Integer ( requiredAttributes . length ) , new Integer ( element . attributeCount ( ) ) ) ) ; } if ( element . attributeCount ( ) > ( requiredAttributes . length + optionalAttributes . length ) ) { throw new CmsXmlException ( Messages . get ( ) . container ( Messages . ERR_EL_ATTRIBUTE_TOOMANY_3 , element . getUniquePath ( ) , new Integer ( requiredAttributes . length + optionalAttributes . length ) , new Integer ( element . attributeCount ( ) ) ) ) ; } for ( int i = 0 ; i < requiredAttributes . length ; i ++ ) { String attributeName = requiredAttributes [ i ] ; if ( element . attribute ( attributeName ) == null ) { throw new CmsXmlException ( Messages . get ( ) . container ( Messages . ERR_EL_MISSING_ATTRIBUTE_2 , element . getUniquePath ( ) , attributeName ) ) ; } } List < String > rA = Arrays . asList ( requiredAttributes ) ; List < String > oA = Arrays . asList ( optionalAttributes ) ; for ( int i = 0 ; i < element . attributes ( ) . size ( ) ; i ++ ) { String attributeName = element . attribute ( i ) . getName ( ) ; if ( ! rA . contains ( attributeName ) && ! oA . contains ( attributeName ) ) { throw new CmsXmlException ( Messages . get ( ) . container ( Messages . ERR_EL_INVALID_ATTRIBUTE_2 , element . getUniquePath ( ) , attributeName ) ) ; } }
|
public class ScannerImpl { /** * Push the given descriptor with all it ' s types to the context .
* @ param descriptor
* The descriptor .
* @ param < D >
* The descriptor type . */
private < D extends Descriptor > void pushDesriptor ( Class < D > type , D descriptor ) { } }
|
if ( descriptor != null ) { scannerContext . push ( type , descriptor ) ; scannerContext . setCurrentDescriptor ( descriptor ) ; }
|
public class AbstractMOEAD { /** * Initialize weight vectors */
protected void initializeUniformWeight ( ) { } }
|
if ( ( problem . getNumberOfObjectives ( ) == 2 ) && ( populationSize <= 300 ) ) { for ( int n = 0 ; n < populationSize ; n ++ ) { double a = 1.0 * n / ( populationSize - 1 ) ; lambda [ n ] [ 0 ] = a ; lambda [ n ] [ 1 ] = 1 - a ; } } else { String dataFileName ; dataFileName = "W" + problem . getNumberOfObjectives ( ) + "D_" + populationSize + ".dat" ; try { // String path =
// Paths . get ( VectorFileUtils . class . getClassLoader ( ) . getResource ( filePath ) . toURI ( ) ) . toString
InputStream in = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( dataDirectory + "/" + dataFileName ) ; InputStreamReader isr = new InputStreamReader ( in ) ; BufferedReader br = new BufferedReader ( isr ) ; int i = 0 ; int j = 0 ; String aux = br . readLine ( ) ; while ( aux != null ) { StringTokenizer st = new StringTokenizer ( aux ) ; j = 0 ; while ( st . hasMoreTokens ( ) ) { double value = new Double ( st . nextToken ( ) ) ; lambda [ i ] [ j ] = value ; j ++ ; } aux = br . readLine ( ) ; i ++ ; } br . close ( ) ; } catch ( Exception e ) { throw new JMetalException ( "initializeUniformWeight: failed when reading for file: " + dataDirectory + "/" + dataFileName , e ) ; } }
|
public class SampleChannelDataRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( SampleChannelDataRequest sampleChannelDataRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( sampleChannelDataRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( sampleChannelDataRequest . getChannelName ( ) , CHANNELNAME_BINDING ) ; protocolMarshaller . marshall ( sampleChannelDataRequest . getMaxMessages ( ) , MAXMESSAGES_BINDING ) ; protocolMarshaller . marshall ( sampleChannelDataRequest . getStartTime ( ) , STARTTIME_BINDING ) ; protocolMarshaller . marshall ( sampleChannelDataRequest . getEndTime ( ) , ENDTIME_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class RouteFiltersInner { /** * Gets all route filters in a subscription .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the PagedList & lt ; RouteFilterInner & gt ; object */
public Observable < Page < RouteFilterInner > > listAsync ( ) { } }
|
return listWithServiceResponseAsync ( ) . map ( new Func1 < ServiceResponse < Page < RouteFilterInner > > , Page < RouteFilterInner > > ( ) { @ Override public Page < RouteFilterInner > call ( ServiceResponse < Page < RouteFilterInner > > response ) { return response . body ( ) ; } } ) ;
|
public class BlobOutputStream { /** * Completes the stream . */
@ Override public void close ( ) throws IOException { } }
|
if ( _isClosed ) { return ; } _isClosed = true ; flushBlock ( true ) ; _cursor . setBlob ( _column . index ( ) , this ) ;
|
public class TransactGetItemsResult { /** * An ordered array of up to 10 < code > ItemResponse < / code > objects , each of which corresponds to the
* < code > TransactGetItem < / code > object in the same position in the < i > TransactItems < / i > array . Each
* < code > ItemResponse < / code > object contains a Map of the name - value pairs that are the projected attributes of the
* requested item .
* If a requested item could not be retrieved , the corresponding < code > ItemResponse < / code > object is Null , or if the
* requested item has no projected attributes , the corresponding < code > ItemResponse < / code > object is an empty Map .
* @ param responses
* An ordered array of up to 10 < code > ItemResponse < / code > objects , each of which corresponds to the
* < code > TransactGetItem < / code > object in the same position in the < i > TransactItems < / i > array . Each
* < code > ItemResponse < / code > object contains a Map of the name - value pairs that are the projected attributes
* of the requested item . < / p >
* If a requested item could not be retrieved , the corresponding < code > ItemResponse < / code > object is Null , or
* if the requested item has no projected attributes , the corresponding < code > ItemResponse < / code > object is
* an empty Map . */
public void setResponses ( java . util . Collection < ItemResponse > responses ) { } }
|
if ( responses == null ) { this . responses = null ; return ; } this . responses = new java . util . ArrayList < ItemResponse > ( responses ) ;
|
public class VirtualNetworkGatewaysInner { /** * This operation retrieves a list of routes the virtual network gateway has learned , including routes learned from BGP peers .
* @ param resourceGroupName The name of the resource group .
* @ param virtualNetworkGatewayName The name of the virtual network gateway .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the GatewayRouteListResultInner object */
public Observable < GatewayRouteListResultInner > beginGetLearnedRoutesAsync ( String resourceGroupName , String virtualNetworkGatewayName ) { } }
|
return beginGetLearnedRoutesWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName ) . map ( new Func1 < ServiceResponse < GatewayRouteListResultInner > , GatewayRouteListResultInner > ( ) { @ Override public GatewayRouteListResultInner call ( ServiceResponse < GatewayRouteListResultInner > response ) { return response . body ( ) ; } } ) ;
|
public class AbstractCasMultifactorWebflowConfigurer { /** * Augment mfa provider flow registry .
* @ param mfaProviderFlowRegistry the mfa provider flow registry */
protected void augmentMultifactorProviderFlowRegistry ( final FlowDefinitionRegistry mfaProviderFlowRegistry ) { } }
|
val flowIds = mfaProviderFlowRegistry . getFlowDefinitionIds ( ) ; Arrays . stream ( flowIds ) . forEach ( id -> { val flow = ( Flow ) mfaProviderFlowRegistry . getFlowDefinition ( id ) ; if ( flow != null && containsFlowState ( flow , CasWebflowConstants . STATE_ID_REAL_SUBMIT ) ) { val states = getCandidateStatesForMultifactorAuthentication ( ) ; states . forEach ( s -> { val state = getState ( flow , s ) ; ensureEndStateTransitionExists ( state , flow , CasWebflowConstants . TRANSITION_ID_SUCCESS , CasWebflowConstants . STATE_ID_SUCCESS ) ; ensureEndStateTransitionExists ( state , flow , CasWebflowConstants . TRANSITION_ID_SUCCESS_WITH_WARNINGS , CasWebflowConstants . TRANSITION_ID_SUCCESS_WITH_WARNINGS ) ; ensureEndStateTransitionExists ( state , flow , CasWebflowConstants . TRANSITION_ID_UNAVAILABLE , CasWebflowConstants . STATE_ID_MFA_UNAVAILABLE ) ; ensureEndStateTransitionExists ( state , flow , CasWebflowConstants . TRANSITION_ID_DENY , CasWebflowConstants . STATE_ID_MFA_DENIED ) ; } ) ; } } ) ;
|
public class HtmlTableRendererBase { /** * actually render the end of the table */
protected void endTable ( FacesContext facesContext , UIComponent uiComponent ) throws IOException { } }
|
ResponseWriter writer = facesContext . getResponseWriter ( ) ; writer . endElement ( HTML . TABLE_ELEM ) ;
|
public class StringUtils { /** * Joins a collection of string with a given delimiter .
* @ param strings The collection of strings to join .
* @ param delimiter The delimiter to use to join them .
* @ return The string built by joining the string with the delimiter . */
public static String join ( Collection strings , String delimiter ) { } }
|
StringBuilder builder = new StringBuilder ( ) ; Iterator < String > iter = strings . iterator ( ) ; while ( iter . hasNext ( ) ) { builder . append ( iter . next ( ) ) ; if ( ! iter . hasNext ( ) ) { break ; } builder . append ( delimiter ) ; } return builder . toString ( ) ;
|
public class StringUtils { /** * < p > Checks if CharSequence contains a search CharSequence irrespective of case ,
* handling { @ code null } . Case - insensitivity is defined as by
* { @ link String # equalsIgnoreCase ( String ) } .
* < p > A { @ code null } CharSequence will return { @ code false } . < / p >
* < pre >
* StringUtils . containsIgnoreCase ( null , * ) = false
* StringUtils . containsIgnoreCase ( * , null ) = false
* StringUtils . containsIgnoreCase ( " " , " " ) = true
* StringUtils . containsIgnoreCase ( " abc " , " " ) = true
* StringUtils . containsIgnoreCase ( " abc " , " a " ) = true
* StringUtils . containsIgnoreCase ( " abc " , " z " ) = false
* StringUtils . containsIgnoreCase ( " abc " , " A " ) = true
* StringUtils . containsIgnoreCase ( " abc " , " Z " ) = false
* < / pre >
* @ param str the CharSequence to check , may be null
* @ param searchStr the CharSequence to find , may be null
* @ return true if the CharSequence contains the search CharSequence irrespective of
* case or false if not or { @ code null } string input
* @ since 3.0 Changed signature from containsIgnoreCase ( String , String ) to containsIgnoreCase ( CharSequence , CharSequence ) */
public static boolean containsIgnoreCase ( final CharSequence str , final CharSequence searchStr ) { } }
|
if ( str == null || searchStr == null ) { return false ; } final int len = searchStr . length ( ) ; final int max = str . length ( ) - len ; for ( int i = 0 ; i <= max ; i ++ ) { if ( CharSequenceUtils . regionMatches ( str , true , i , searchStr , 0 , len ) ) { return true ; } } return false ;
|
public class ComputeNodeOperations { /** * Reboots the specified compute node .
* < p > You can reboot a compute node only when it is in the { @ link com . microsoft . azure . batch . protocol . models . ComputeNodeState # IDLE Idle } or { @ link com . microsoft . azure . batch . protocol . models . ComputeNodeState # RUNNING Running } state . < / p >
* @ param poolId The ID of the pool that contains the compute node .
* @ param nodeId The ID of the compute node to reboot .
* @ throws BatchErrorException Exception thrown when an error response is received from the Batch service .
* @ throws IOException Exception thrown when there is an error in serialization / deserialization of data sent to / received from the Batch service . */
public void rebootComputeNode ( String poolId , String nodeId ) throws BatchErrorException , IOException { } }
|
rebootComputeNode ( poolId , nodeId , null , null ) ;
|
public class JFinalViewResolver { /** * spring 回调 , 利用 ServletContext 做必要的初始化工作 */
@ Override protected void initServletContext ( ServletContext servletContext ) { } }
|
super . initServletContext ( servletContext ) ; super . setExposeRequestAttributes ( true ) ; initBaseTemplatePath ( servletContext ) ; initSharedFunction ( ) ;
|
public class SSLUtils { /** * Search for any buffer in the array that has a position that isn ' t zero .
* If found , return true , otherwise false .
* @ param buffers
* @ return boolean */
public static boolean anyPositionsNonZero ( WsByteBuffer buffers [ ] ) { } }
|
if ( buffers != null ) { // Loop through all buffers in the array .
for ( int i = 0 ; i < buffers . length ; i ++ ) { // Verify buffer is non null and check for nonzero position
if ( ( buffers [ i ] != null ) && ( buffers [ i ] . position ( ) != 0 ) ) { // Found a nonzero position .
return true ; } } } // If we get this far , all positions were zero
return false ;
|
public class ListServerCertificatesResult { /** * A list of server certificates .
* @ param serverCertificateMetadataList
* A list of server certificates . */
public void setServerCertificateMetadataList ( java . util . Collection < ServerCertificateMetadata > serverCertificateMetadataList ) { } }
|
if ( serverCertificateMetadataList == null ) { this . serverCertificateMetadataList = null ; return ; } this . serverCertificateMetadataList = new com . amazonaws . internal . SdkInternalList < ServerCertificateMetadata > ( serverCertificateMetadataList ) ;
|
public class RegionForwardingRuleId { /** * Returns a region forwarding rule identity given the region identity and the rule name . The
* forwarding rule name must be 1-63 characters long and comply with RFC1035 . Specifically , the
* name must match the regular expression { @ code [ a - z ] ( [ - a - z0-9 ] * [ a - z0-9 ] ) ? } which means the first
* character must be a lowercase letter , and all following characters must be a dash , lowercase
* letter , or digit , except the last character , which cannot be a dash .
* @ see < a href = " https : / / www . ietf . org / rfc / rfc1035 . txt " > RFC1035 < / a > */
public static RegionForwardingRuleId of ( RegionId regionId , String rule ) { } }
|
return new RegionForwardingRuleId ( regionId . getProject ( ) , regionId . getRegion ( ) , rule ) ;
|
public class Widget { /** * Get a recursive set of { @ link ChildInfo } instances describing the
* { @ link Widget } children of this { @ code Widget } .
* @ param includeHidden
* Pass { @ code false } to only count children whose
* { @ link # setVisibility ( Visibility ) visibility } is
* { @ link Visibility # VISIBLE } .
* @ return A { @ link List } of { @ code ChildInfo } . */
public List < ChildInfo > getChildInfo ( boolean includeHidden ) { } }
|
List < ChildInfo > children = new ArrayList < > ( ) ; for ( Widget child : getChildren ( ) ) { if ( includeHidden || child . mVisibility == Visibility . VISIBLE ) { children . add ( new ChildInfo ( child . getName ( ) , child . getChildInfo ( includeHidden ) ) ) ; } } return children ;
|
public class Duration { /** * Returns a copy of this duration divided by the specified value .
* This instance is immutable and unaffected by this method call .
* @ param divisor the value to divide the duration by , positive or negative , not zero
* @ return a { @ code Duration } based on this duration divided by the specified divisor , not null
* @ throws ArithmeticException if the divisor is zero or if numeric overflow occurs */
public Duration dividedBy ( long divisor ) { } }
|
if ( divisor == 0 ) { throw new ArithmeticException ( "Cannot divide by zero" ) ; } if ( divisor == 1 ) { return this ; } return create ( toSeconds ( ) . divide ( BigDecimal . valueOf ( divisor ) , RoundingMode . DOWN ) ) ;
|
public class MappeableBitmapContainer { /** * Create a copy of the content of this container as a long array . This creates a copy .
* @ return copy of the content as a long array */
public long [ ] toLongArray ( ) { } }
|
long [ ] answer = new long [ bitmap . limit ( ) ] ; bitmap . rewind ( ) ; bitmap . get ( answer ) ; return answer ;
|
public class Func { /** * Lift a Java Func0 to a Scala Function0
* @ param f the function to lift
* @ returns the Scala function */
public static < Z > Function0 < Z > lift ( Func0 < Z > f ) { } }
|
return bridge . lift ( f ) ;
|
public class CurrencyLocalizationUrl { /** * Get Resource Url for GetCurrencyExchangeRate
* @ param currencyCode The three character ISOÂ currency code , such as USDÂ for US Dollars .
* @ param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object . This parameter should only be used to retrieve data . Attempting to update data using this parameter may cause data loss .
* @ param toCurrencyCode
* @ return String Resource Url */
public static MozuUrl getCurrencyExchangeRateUrl ( String currencyCode , String responseFields , String toCurrencyCode ) { } }
|
UrlFormatter formatter = new UrlFormatter ( "/api/commerce/catalog/admin/currency/{currencyCode}/exchangerates/{toCurrencyCode}?responseFields={responseFields}" ) ; formatter . formatUrl ( "currencyCode" , currencyCode ) ; formatter . formatUrl ( "responseFields" , responseFields ) ; formatter . formatUrl ( "toCurrencyCode" , toCurrencyCode ) ; return new MozuUrl ( formatter . getResourceUrl ( ) , MozuUrl . UrlLocation . TENANT_POD ) ;
|
public class WSJdbcPreparedStatement { /** * Invokes a method on the specified object .
* @ param implObject the instance on which the operation is invoked .
* @ param method the method that is invoked .
* @ param args the parameters to the method .
* @ throws IllegalAccessException if the method is inaccessible .
* @ throws IllegalArgumentException if the instance does not have the method or
* if the method arguments are not appropriate .
* @ throws InvocationTargetException if the method raises a checked exception .
* @ throws SQLException if unable to invoke the method for other reasons .
* @ return the result of invoking the method . */
Object invokeOperation ( Object implObject , Method method , Object [ ] args ) throws IllegalAccessException , IllegalArgumentException , InvocationTargetException , SQLException { } }
|
if ( args == null || args . length == 0 ) { String methodName = method . getName ( ) ; if ( methodName . equals ( "getReturnResultSet" ) ) return getReturnResultSet ( implObject , method ) ; else if ( methodName . equals ( "getSingletonResultSet" ) ) return getSingletonResultSet ( implObject , method ) ; } else if ( args . length == 1 ) { String methodName = method . getName ( ) ; if ( methodName . equals ( "addBatch" ) && method . getParameterTypes ( ) [ 0 ] . getName ( ) . equals ( "com.ibm.db2.jcc.SQLJPreparedStatement" ) ) return addBatch ( implObject , method , args ) ; else if ( methodName . equals ( "executeBatch" ) ) return executeBatch ( implObject , method , args ) ; else if ( methodName . equals ( "setSection" ) && method . getParameterTypes ( ) [ 0 ] . getName ( ) . equals ( "com.ibm.db2.jcc.SQLJSection" ) ) { // Since we cache the SQLJ section , update our cached value whenever it is updated
this . sqljSection = args [ 0 ] ; } } return super . invokeOperation ( implObject , method , args ) ;
|
public class KeyManagementServiceClient { /** * Returns the public key for the given [ CryptoKeyVersion ] [ google . cloud . kms . v1 . CryptoKeyVersion ] .
* The [ CryptoKey . purpose ] [ google . cloud . kms . v1 . CryptoKey . purpose ] must be
* [ ASYMMETRIC _ SIGN ] [ google . cloud . kms . v1 . CryptoKey . CryptoKeyPurpose . ASYMMETRIC _ SIGN ] or
* [ ASYMMETRIC _ DECRYPT ] [ google . cloud . kms . v1 . CryptoKey . CryptoKeyPurpose . ASYMMETRIC _ DECRYPT ] .
* < p > Sample code :
* < pre > < code >
* try ( KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient . create ( ) ) {
* CryptoKeyVersionName name = CryptoKeyVersionName . of ( " [ PROJECT ] " , " [ LOCATION ] " , " [ KEY _ RING ] " , " [ CRYPTO _ KEY ] " , " [ CRYPTO _ KEY _ VERSION ] " ) ;
* PublicKey response = keyManagementServiceClient . getPublicKey ( name . toString ( ) ) ;
* < / code > < / pre >
* @ param name The [ name ] [ google . cloud . kms . v1 . CryptoKeyVersion . name ] of the
* [ CryptoKeyVersion ] [ google . cloud . kms . v1 . CryptoKeyVersion ] public key to get .
* @ throws com . google . api . gax . rpc . ApiException if the remote call fails */
public final PublicKey getPublicKey ( String name ) { } }
|
GetPublicKeyRequest request = GetPublicKeyRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return getPublicKey ( request ) ;
|
public class AbstractProxyFactory { /** * Determines whether the object is a materialized object , i . e . no proxy or a
* proxy that has already been loaded from the database .
* @ param object The object to test
* @ return < code > true < / code > if the object is materialized */
public boolean isMaterialized ( Object object ) { } }
|
IndirectionHandler handler = getIndirectionHandler ( object ) ; return handler == null || handler . alreadyMaterialized ( ) ;
|
public class MathObservable { /** * Returns an Observable that emits the average of the Longs emitted by the source Observable .
* < img width = " 640 " src = " https : / / raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / average . png " alt = " " >
* @ param source
* source Observable to compute the average of
* @ return an Observable that emits a single item : the average of all the Longs emitted by the source
* Observable
* @ see < a href = " https : / / github . com / ReactiveX / RxJava / wiki / Mathematical - and - Aggregate - Operators # wiki - averageinteger - averagelong - averagefloat - and - averagedouble " > RxJava Wiki : averageLong ( ) < / a >
* @ see < a href = " http : / / msdn . microsoft . com / en - us / library / system . reactive . linq . observable . average . aspx " > MSDN : Observable . Average < / a > */
public final static Observable < Long > averageLong ( Observable < Long > source ) { } }
|
return source . lift ( new OperatorAverageLong < Long > ( MathObservable . < Long > identity ( ) ) ) ;
|
public class ThreadMonitor { /** * Return the count of threads that are in any of the statuses */
public int getThreadCount ( ThreadGroup group , Status ... s ) { } }
|
Thread [ ] threads = getThreads ( group ) ; int count = 0 ; for ( Thread t : threads ) { if ( t instanceof MonitoredThread ) { Status status = getStatus ( ( MonitoredThread ) t ) ; if ( status != null ) { for ( Status x : s ) { if ( x == status ) { count ++ ; } } } } } return count ;
|
public class MobileApplicationService { /** * Returns the set of Mobile applications with the given query parameters .
* @ param queryParams The query parameters
* @ return The set of applications */
public Collection < MobileApplication > list ( List < String > queryParams ) { } }
|
return HTTP . GET ( "/v2/mobile_applications.json" , null , queryParams , MOBILE_APPLICATIONS ) . get ( ) ;
|
public class RepositoryCreationServiceImpl { /** * { @ inheritDoc } */
public void createRepository ( String backupId , RepositoryEntry rEntry , StorageCreationProperties creationProps ) throws RepositoryConfigurationException , RepositoryCreationException { } }
|
String rToken = reserveRepositoryName ( rEntry . getName ( ) ) ; if ( creationProps instanceof DBCreationProperties ) { createRepositoryInternally ( backupId , rEntry , rToken , ( DBCreationProperties ) creationProps ) ; } else { throw new RepositoryCreationException ( "creationProps should be the instance of DBCreationProperties" ) ; }
|
public class UpdateGlobalTableSettingsRequest { /** * Represents the settings of a global secondary index for a global table that will be modified .
* @ param globalTableGlobalSecondaryIndexSettingsUpdate
* Represents the settings of a global secondary index for a global table that will be modified . */
public void setGlobalTableGlobalSecondaryIndexSettingsUpdate ( java . util . Collection < GlobalTableGlobalSecondaryIndexSettingsUpdate > globalTableGlobalSecondaryIndexSettingsUpdate ) { } }
|
if ( globalTableGlobalSecondaryIndexSettingsUpdate == null ) { this . globalTableGlobalSecondaryIndexSettingsUpdate = null ; return ; } this . globalTableGlobalSecondaryIndexSettingsUpdate = new java . util . ArrayList < GlobalTableGlobalSecondaryIndexSettingsUpdate > ( globalTableGlobalSecondaryIndexSettingsUpdate ) ;
|
public class DeltaFIFO { /** * Replace the item forcibly .
* @ param list the list
* @ param resourceVersion the resource version */
@ Override public void replace ( List list , String resourceVersion ) { } }
|
lock . writeLock ( ) . lock ( ) ; try { Set < String > keys = new HashSet < > ( ) ; for ( Object obj : list ) { String key = this . keyOf ( obj ) ; keys . add ( key ) ; this . queueActionLocked ( DeltaType . Sync , obj ) ; } if ( this . knownObjects == null ) { for ( Map . Entry < String , Deque < MutablePair < DeltaType , Object > > > entry : this . items . entrySet ( ) ) { if ( keys . contains ( entry . getKey ( ) ) ) { continue ; } Object deletedObj = null ; MutablePair < DeltaType , Object > delta = entry . getValue ( ) . peekLast ( ) ; // get newest
if ( delta != null ) { deletedObj = delta . getRight ( ) ; } this . queueActionLocked ( DeltaType . Deleted , new DeletedFinalStateUnknown ( entry . getKey ( ) , deletedObj ) ) ; } if ( ! this . populated ) { this . populated = true ; this . initialPopulationCount = list . size ( ) ; } return ; } // Detect deletions not already in the queue .
List < String > knownKeys = this . knownObjects . listKeys ( ) ; int queueDeletion = 0 ; for ( String knownKey : knownKeys ) { if ( keys . contains ( knownKey ) ) { continue ; } Object deletedObj = this . knownObjects . getByKey ( knownKey ) ; if ( deletedObj == null ) { log . warn ( "Key {} does not exist in known objects store, placing DeleteFinalStateUnknown marker without object" , knownKey ) ; } queueDeletion ++ ; this . queueActionLocked ( DeltaType . Deleted , new DeletedFinalStateUnknown < > ( knownKey , deletedObj ) ) ; } if ( ! this . populated ) { this . populated = true ; this . initialPopulationCount = list . size ( ) + queueDeletion ; } } finally { lock . writeLock ( ) . unlock ( ) ; }
|
public class BaseOperation { /** * Returns the name and falls back to the item name .
* @ param item The item .
* @ param name The name to check .
* @ param < T >
* @ return */
private static < T > String name ( T item , String name ) { } }
|
if ( name != null && ! name . isEmpty ( ) ) { return name ; } else if ( item instanceof HasMetadata ) { HasMetadata h = ( HasMetadata ) item ; return h . getMetadata ( ) != null ? h . getMetadata ( ) . getName ( ) : null ; } return null ;
|
public class StandardMultipartResolver { /** * Determine an appropriate FileUpload instance for the given encoding .
* < p > Default implementation returns the shared FileUpload instance if the encoding matches , else creates a new
* FileUpload instance with the same configuration other than the desired encoding .
* @ param encoding the character encoding to use .
* @ return an appropriate FileUpload instance . */
private FileUpload prepareFileUpload ( @ NonNull String encoding ) { } }
|
FileUpload actualFileUpload = mFileUpload ; if ( ! encoding . equalsIgnoreCase ( mFileUpload . getHeaderEncoding ( ) ) ) { actualFileUpload = new FileUpload ( mFileItemFactory ) ; actualFileUpload . setSizeMax ( mFileUpload . getSizeMax ( ) ) ; actualFileUpload . setFileSizeMax ( mFileUpload . getFileSizeMax ( ) ) ; actualFileUpload . setHeaderEncoding ( encoding ) ; } return actualFileUpload ;
|
public class Field { /** * Returns the internationalized field title */
public String getTitle ( ) { } }
|
final String key = String . format ( "pm.field.%s.%s" , getEntity ( ) . getId ( ) , getId ( ) ) ; final String message = getPm ( ) . message ( key ) ; if ( key . equals ( message ) ) { final Entity extendzEntity = getEntity ( ) . getExtendzEntity ( ) ; if ( extendzEntity != null && extendzEntity . getFieldById ( getId ( ) ) != null ) { return extendzEntity . getFieldById ( getId ( ) ) . getTitle ( ) ; } } return message ;
|
public class Clock { /** * Removes the given TimeSection from the list of sections .
* Sections in the Medusa library usually are less eye - catching
* than Areas .
* @ param SECTION */
public void removeSection ( final TimeSection SECTION ) { } }
|
if ( null == SECTION ) return ; sections . remove ( SECTION ) ; Collections . sort ( sections , new TimeSectionComparator ( ) ) ; fireUpdateEvent ( SECTION_EVENT ) ;
|
public class FileInfo { /** * < code > optional string persistenceState = 19 ; < / code > */
public java . lang . String getPersistenceState ( ) { } }
|
java . lang . Object ref = persistenceState_ ; if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; if ( bs . isValidUtf8 ( ) ) { persistenceState_ = s ; } return s ; }
|
public class CharacterApi { /** * Get character portraits Get portrait urls for a character - - - This route
* expires daily at 11:05
* @ param characterId
* An EVE character ID ( required )
* @ 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 )
* @ return ApiResponse & lt ; CharacterPortraitResponse & gt ;
* @ throws ApiException
* If fail to call the API , e . g . server error or cannot
* deserialize the response body */
public ApiResponse < CharacterPortraitResponse > getCharactersCharacterIdPortraitWithHttpInfo ( Integer characterId , String datasource , String ifNoneMatch ) throws ApiException { } }
|
com . squareup . okhttp . Call call = getCharactersCharacterIdPortraitValidateBeforeCall ( characterId , datasource , ifNoneMatch , null ) ; Type localVarReturnType = new TypeToken < CharacterPortraitResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
|
public class BrowserInformationCache { /** * Returns the total instances of a particular browser , available through all nodes . This methods takes an instance
* of { @ link GridRegistry } to clean the cache before returning the results .
* @ param browserName
* Browser name as { @ link String }
* @ param registry
* { @ link GridRegistry } instance .
* @ return Total instances of a particular browser across nodes . */
public synchronized int getTotalBrowserCapacity ( String browserName , GridRegistry registry ) { } }
|
logger . entering ( new Object [ ] { browserName , registry } ) ; cleanCacheUsingRegistry ( registry ) ; int totalBrowserCounts = 0 ; for ( Map . Entry < URL , TestSlotInformation > entry : nodeMap . entrySet ( ) ) { BrowserInformation browserInfo = entry . getValue ( ) . getBrowserInfo ( browserName ) ; totalBrowserCounts += ( browserInfo == null ) ? 0 : browserInfo . getMaxInstances ( ) ; } logger . exiting ( totalBrowserCounts ) ; return totalBrowserCounts ;
|
public class JLanguageTool { /** * The grammar checker needs resources from following
* directories :
* < ul >
* < li > { @ code / resource } < / li >
* < li > { @ code / rules } < / li >
* < / ul >
* @ return The currently set data broker which allows to obtain
* resources from the mentioned directories above . If no
* data broker was set , a new { @ link DefaultResourceDataBroker } will
* be instantiated and returned .
* @ since 1.0.1 */
public static synchronized ResourceDataBroker getDataBroker ( ) { } }
|
if ( JLanguageTool . dataBroker == null ) { JLanguageTool . dataBroker = new DefaultResourceDataBroker ( ) ; } return JLanguageTool . dataBroker ;
|
public class LessLookAheadReader { /** * If the next data which are already in the cache are a mixin parameter or part of a selector name .
* This is call after a left parenthesis .
* Samples for selectors : < ul >
* < li > ( min - resolution : 192dpi )
* < li > ( . clearfix all )
* < li > ( audio : not ( [ controls ] ) )
* < li > ( odd )
* < li > ( @ { color } )
* < / ul >
* Samples for mixin params < ul >
* < li > ( . 65)
* < li > ( @ color )
* < li > ( )
* < li > ( . . . )
* < li > ( red )
* < li > ( 1)
* < li > ( { color : green } )
* < / ul >
* @ param isBlock selector of a block or a semicolon line
* @ return true , if it is a mixin parameter */
boolean nextIsMixinParam ( boolean isBlock ) { } }
|
boolean isFirst = true ; for ( int i = cachePos ; i < cache . length ( ) ; i ++ ) { char ch = cache . charAt ( i ) ; switch ( ch ) { case ')' : return true ; case '@' : return cache . charAt ( i + 1 ) != '{' ; case '~' : return true ; case '"' : return ! isBlock ; case '.' : if ( ! isFirst ) { continue ; } else { if ( Character . isDigit ( cache . charAt ( i + 1 ) ) ) { // Number with a starting point
return true ; } } if ( i + 2 < cache . length ( ) && cache . charAt ( i + 1 ) == '.' && cache . charAt ( i + 2 ) == '.' ) { return true ; } return false ; case ':' : case '[' : return false ; case '{' : return true ; // detached ruleset as mixin parameter
case ' ' : continue ; default : isFirst = false ; } } return false ;
|
public class ChunkedOutputStream { /** * flush buffer and bytes in append */
private void flushBuffer ( byte [ ] append , int ofs , int len ) throws IOException { } }
|
int count ; count = pos + len ; if ( count > 0 ) { dest . writeAsciiLn ( Integer . toHexString ( count ) ) ; dest . write ( buffer , 0 , pos ) ; dest . write ( append , ofs , len ) ; dest . writeAsciiLn ( ) ; pos = 0 ; }
|
public class DrizzleConnection { /** * Sets the value of the connection ' s client info properties . The < code > Properties < / code > object contains the names
* and values of the client info properties to be set . The set of client info properties contained in the
* properties list replaces the current set of client info properties on the connection . If a property that is
* currently set on the connection is not present in the properties list , that property is cleared . Specifying an
* empty properties list will clear all of the properties on the connection . See < code > setClientInfo ( String ,
* String ) < / code > for more information .
* If an error occurs in setting any of the client info properties , a < code > SQLClientInfoException < / code > is thrown .
* The < code > SQLClientInfoException < / code > contains information indicating which client info properties were not
* set . The state of the client information is unknown because some databases do not allow multiple client info
* properties to be set atomically . For those databases , one or more properties may have been set before the error
* occurred .
* @ param properties the list of client info properties to set
* @ throws java . sql . SQLClientInfoException
* if the database server returns an error while setting the clientInfo values on the database server or
* this method is called on a closed connection
* @ see java . sql . Connection # setClientInfo ( String , String ) setClientInfo ( String , String )
* @ since 1.6 */
public void setClientInfo ( final Properties properties ) throws java . sql . SQLClientInfoException { } }
|
// TODO : actually use these !
for ( final String key : properties . stringPropertyNames ( ) ) { this . clientInfoProperties . setProperty ( key , properties . getProperty ( key ) ) ; }
|
public class FctBnAccEntitiesProcessors { /** * < p > Get PrcPaymentFromCopy ( create and put into map ) . < / p >
* @ param pAddParam additional param
* @ return requested PrcPaymentFromCopy
* @ throws Exception - an exception */
protected final PrcPaymentFromCopy < RS > createPutPrcPaymentFromCopy ( final Map < String , Object > pAddParam ) throws Exception { } }
|
PrcPaymentFromCopy < RS > proc = new PrcPaymentFromCopy < RS > ( ) ; @ SuppressWarnings ( "unchecked" ) IEntityProcessor < PaymentFrom , Long > procDlg = ( IEntityProcessor < PaymentFrom , Long > ) lazyGetPrcAccEntityPbWithSubaccCopy ( pAddParam ) ; proc . setPrcAccEntityPbWithSubaccCopy ( procDlg ) ; // assigning fully initialized object :
this . processorsMap . put ( PrcPaymentFromCopy . class . getSimpleName ( ) , proc ) ; return proc ;
|
public class ArrowConverter { /** * Create an ndarray from a matrix .
* The included batch must be all the same number of rows in order
* to work . The reason for this is { @ link INDArray } must be all the same dimensions .
* Note that the input columns must also be numerical . If they aren ' t numerical already ,
* consider using an { @ link org . datavec . api . transform . TransformProcess } to transform the data
* output from { @ link org . datavec . arrow . recordreader . ArrowRecordReader } in to the proper format
* for usage with this method for direct conversion .
* @ param arrowWritableRecordBatch the incoming batch . This is typically output from
* an { @ link org . datavec . arrow . recordreader . ArrowRecordReader }
* @ return an { @ link INDArray } representative of the input data */
public static INDArray toArray ( ArrowWritableRecordBatch arrowWritableRecordBatch ) { } }
|
List < FieldVector > columnVectors = arrowWritableRecordBatch . getList ( ) ; Schema schema = arrowWritableRecordBatch . getSchema ( ) ; for ( int i = 0 ; i < schema . numColumns ( ) ; i ++ ) { switch ( schema . getType ( i ) ) { case Integer : break ; case Float : break ; case Double : break ; case Long : break ; case NDArray : break ; default : throw new ND4JIllegalArgumentException ( "Illegal data type found for column " + schema . getName ( i ) + " of type " + schema . getType ( i ) ) ; } } int rows = arrowWritableRecordBatch . getList ( ) . get ( 0 ) . getValueCount ( ) ; if ( schema . numColumns ( ) == 1 && schema . getMetaData ( 0 ) . getColumnType ( ) == ColumnType . NDArray ) { INDArray [ ] toConcat = new INDArray [ rows ] ; VarBinaryVector valueVectors = ( VarBinaryVector ) arrowWritableRecordBatch . getList ( ) . get ( 0 ) ; for ( int i = 0 ; i < rows ; i ++ ) { byte [ ] bytes = valueVectors . get ( i ) ; ByteBuffer direct = ByteBuffer . allocateDirect ( bytes . length ) ; direct . put ( bytes ) ; INDArray fromTensor = BinarySerde . toArray ( direct ) ; toConcat [ i ] = fromTensor ; } return Nd4j . concat ( 0 , toConcat ) ; } int cols = schema . numColumns ( ) ; INDArray arr = Nd4j . create ( rows , cols ) ; for ( int i = 0 ; i < cols ; i ++ ) { INDArray put = ArrowConverter . convertArrowVector ( columnVectors . get ( i ) , schema . getType ( i ) ) ; switch ( arr . data ( ) . dataType ( ) ) { case FLOAT : arr . putColumn ( i , Nd4j . create ( put . data ( ) . asFloat ( ) ) . reshape ( rows , 1 ) ) ; break ; case DOUBLE : arr . putColumn ( i , Nd4j . create ( put . data ( ) . asDouble ( ) ) . reshape ( rows , 1 ) ) ; break ; } } return arr ;
|
public class JSONBuilder { /** * Quotes properly a string and appends it to the JSON stream .
* @ param value - a liternal string to quote and then append
* @ return the JSONBuilder itself */
public JSONBuilder quote ( String value ) { } }
|
_sb . append ( '"' ) ; for ( int i = 0 ; i < value . length ( ) ; ++ i ) { char c = value . charAt ( i ) ; switch ( c ) { case '"' : _sb . append ( "\\\"" ) ; break ; case '\\' : _sb . append ( "\\\\" ) ; break ; default : if ( c < 0x20 ) { _sb . append ( CTRLCHARS [ c ] ) ; } else { _sb . append ( c ) ; } break ; } } _sb . append ( '"' ) ; return this ;
|
public class XExtension { /** * Runs the given visitor for the given log on this extension . */
public void accept ( XVisitor visitor , XLog log ) { } }
|
/* * First call . */
visitor . visitExtensionPre ( this , log ) ; /* * Last call . */
visitor . visitExtensionPost ( this , log ) ;
|
public class RsFork { /** * Pick the right one .
* @ param req Request
* @ param forks List of forks
* @ return Response
* @ throws IOException If fails */
private static Response pick ( final Request req , final Iterable < Fork > forks ) throws IOException { } }
|
for ( final Fork fork : forks ) { final Opt < Response > rsps = fork . route ( req ) ; if ( rsps . has ( ) ) { return rsps . get ( ) ; } } throw new HttpException ( HttpURLConnection . HTTP_NOT_FOUND ) ;
|
public class BooleanUtils { /** * < p > Performs an and on a set of booleans . < / p >
* < pre >
* BooleanUtils . and ( true , true ) = true
* BooleanUtils . and ( false , false ) = false
* BooleanUtils . and ( true , false ) = false
* BooleanUtils . and ( true , true , false ) = false
* BooleanUtils . and ( true , true , true ) = true
* < / pre >
* @ param array an array of { @ code boolean } s
* @ return { @ code true } if the and is successful .
* @ throws IllegalArgumentException if { @ code array } is { @ code null }
* @ throws IllegalArgumentException if { @ code array } is empty .
* @ since 3.0.1 */
public static boolean and ( final boolean ... array ) { } }
|
// Validates input
if ( array == null ) { throw new IllegalArgumentException ( "The Array must not be null" ) ; } if ( array . length == 0 ) { throw new IllegalArgumentException ( "Array is empty" ) ; } for ( final boolean element : array ) { if ( ! element ) { return false ; } } return true ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.