post pet { pet id } upload image : uploads an image

completable future < response entity < model api response > > upload file ( @ api param ( value = " id of pet to update " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " additional data to pass to server " ) @ request param ( value = " additional metadata " , required = false ) string additional metadata , @ api param ( value = " file to upload " ) @ request param ( " file " ) multipart file file ) ;


public void array item test ( ) { / / todo : test array item }


destroys the open g l texture as specified by the gl handle

protected void delete ( ) { if ( gl handle ! = 0 ) { gdx gl gl delete texture ( gl handle ) ; gl handle = 0 ; } }


if true , then bookmarks should be readwritten

public boolean is bookmarks ( ) { return bookmarks ; }


escapes the character unsafe for e - mail address see http : en wikipedia orgwiki e - mail address for the details , but here the vocabulary is even more restricted

public static string to email safe string ( string project name ) { / / todo : escape non - ascii characters string builder buf = new string builder ( project name length ( ) ) ; for ( int i = 0 ; i < project name length ( ) ; i + + ) { char ch = project name char at ( i ) ; if ( ( ' a ' < = ch & & ch < = ' z ' ) | | ( ' a ' < = ch & & ch < = ' z ' ) | | ( ' 0 ' < = ch & & ch < = ' 9 ' ) | | " - " index of ( ch ) > = 0 ) buf append ( ch ) ; else buf append ( ' ' ) ; / / escape } return string value of ( buf ) ; }


asserts that the durations of the periods in the { @ link timeline } and the durations in the given sequence are equal

public static void assert period durations ( timeline timeline , long durations us ) { int period count = timeline get period count ( ) ; assert that ( period count ) is equal to ( durations us length ) ; period period = new period ( ) ; for ( int i = 0 ; i < period count ; i + + ) { assert that ( timeline get period ( i , period ) duration us ) is equal to ( durations us [ i ] ) ; } }


datagram socket get datagram socket ( ) { return datagram socket ; }


check that a partition step was done correctly for debugging and testing

public static void check partition ( int [ ] order , double [ ] values , double pivot value , int start , int low , int high , int end ) { if ( order length ! = values length ) { throw new illegal argument exception ( " arguments must be same size " ) ; } if ( ! ( start > = 0 & & low > = start & & high > = low & & end > = high ) ) { throw new illegal argument exception ( format ( " invalid indices % d , % d , % d , % d " , start , low , high , end ) ) ; } for ( int i = 0 ; i < low ; i + + ) { double v = values [ order [ i ] ] ; if ( v > = pivot value ) { throw new illegal argument exception ( format ( " value greater than pivot at % d " , i ) ) ; } } for ( int i = low ; i < high ; i + + ) { if ( values [ order [ i ] ] ! = pivot value ) { throw new illegal argument exception ( format ( " non - pivot at % d " , i ) ) ; } } for ( int i = high ; i < end ; i + + ) { double v = values [ order [ i ] ] ; if ( v < = pivot value ) { throw new illegal argument exception ( format ( " value less than pivot at % d " , i ) ) ; } } }


used ( by block graph transfer object ref ) to reset the internal object and address

protected void set ( object r , address addr ) { ref = r ; address = addr ; }


return the object that is the subject of this change record

public object get object ( ) { return affected obj ; }


returns an array of locations that have values that will flow to this location

public address [ ] get known flow to addresses ( address to addr ) { / / does this have a no adress from flow to the to addr ? map < register , register value > map = no address future register state map get ( to addr ) ; boolean has no address flow = map ! = null ; int extra for no addr = ( has no address flow ? 1 : 0 ) ; address [ ] flows to = new address [ 0 + extra for no addr ] ; if ( to addr ! = null & & to addr ! = address no address ) { map < address , map < register , register value > > future register state map = future flow register state maps get ( to addr ) ; if ( future register state map ! = null ) { set < address > key set = future register state map key set ( ) ; flows to = key set to array ( new address [ key set size ( ) + extra for no addr ] ) ; } } if ( has no address flow ) { flows to [ flows to length - 1 ] = address no address ; } return flows to ; }


public map < string , boolean > get direct map ( ) { return direct map ; }


delete lazy - persist file that has been persisted to disk both memory blocks and disk blocks are deleted

public void test delete after persist ( ) throws exception { get cluster builder ( ) build ( ) ; final string method name = generic test utils get method name ( ) ; path path = new path ( " / " + method name + " dat " ) ; make test file ( path , block size , true ) ; located blocks located blocks = ensure file replicas on storage type ( path , ram disk ) ; wait for metric ( " ram disk blocks lazy persisted " , 1 ) ; / / delete after persist client delete ( path to string ( ) , false ) ; assert assert false ( fs exists ( path ) ) ; assert that ( verify deleted blocks ( located blocks ) , is ( true ) ) ; verify ram disk j m x metric ( " ram disk blocks lazy persisted " , 1 ) ; verify ram disk j m x metric ( " ram disk bytes lazy persisted " , block size ) ; }


set multiple transaction attribute sources which are used to find transaction attributes will build a composite transaction attribute source for the given sources

public void set transaction attribute sources ( transaction attribute source transaction attribute sources ) { this transaction attribute source = new composite transaction attribute source ( transaction attribute sources ) ; }


determine whether this resource actually exists in physical form this method performs a definitive existence check , whereas the existence of a { @ code resource } handle only guarantees a valid descriptor handle


compares the specified object to this multimap for equality two { @ code list multimap } instances are equal if , for each key , they contain the same values in the same order if the value orderings disagree , the multimaps will not be considered equal

public boolean equals ( @ nullable object object ) { return super equals ( object ) ; }


public boolean set replication ( final path f , final short replication ) throws access control exception , file not found exception , i o exception { final path abs f = fix relative part ( f ) ; return new f s link resolver < boolean > ( ) { @ override public boolean next ( final abstract file system fs , final path p ) throws i o exception , unresolved link exception { return fs set replication ( p , replication ) ; } } resolve ( this , abs f ) ; }


return the quota path associated with this prefix

public static string quota path ( string path ) { return quota zookeeper + path + " / " + limit node ; }


continues a project join transformation and adds fields of the second join input to the projection if the second join input is a { @ link tuple } { @ link data set } , fields can be selected by their index if the second join input is not a tuple data set , no parameters should be passed additional fields of the first and second input can be added by chaining the method calls of { @ link org apache flink api java operators join operator project join # project first ( int ) } and { @ link org apache flink api java operators join operator project join # project second ( int ) } < b > note : with the current implementation , the project transformation loses type information < b >

public < out extends tuple > project join < i1 , i2 , out > project second ( int second field indexes ) { join proj = join proj project second ( second field indexes ) ; return join proj project tuple x ( ) ; }


public list < file info > index files ( ) { return index files ; }


visit a parse tree produced by { @ link sql base parser # select items }

t visit select items ( sql base parser select items context ctx ) ;


returns type mappings using type parameters and type arguments found in the generic superclass and the super interfaces of { @ code context class }

static immutable map < type variable key , type > get type mappings ( type context type ) { check not null ( context type ) ; type mapping introspector introspector = new type mapping introspector ( ) ; introspector visit ( context type ) ; return immutable map copy of ( introspector mappings ) ; }


sets the maximum age of this { @ link cookie } in seconds if an age of { @ code 0 } is specified , this { @ link cookie } will be automatically removed by browser because it will expire immediately if { @ link long # min value } is specified , this { @ link cookie } will be removed when the browser is closed


called when the { @ link listenable future } completes with failure note that exceptions raised by this method are ignored


creates a unique id for the action shadowed by this extra action we need to have a unique id for the extra action to use we build this from the owner ' s label and the shadowed action id ( which is only guaranteed to be unique per target ) together with the subfolder matching the original target ' s package name , we believe this is enough of a uniqueness guarantee

public static string get action id ( action key context action key context , action owner owner , action action ) throws interrupted exception { fingerprint f = new fingerprint ( ) ; f add string ( owner get label ( ) to string ( ) ) ; immutable list < aspect descriptor > aspect descriptors = owner get aspect descriptors ( ) ; f add int ( aspect descriptors size ( ) ) ; for ( aspect descriptor aspect descriptor : aspect descriptors ) { f add string ( aspect descriptor get description ( ) ) ; } f add string ( action get key ( action key context , / * artifact expander = * / null ) ) ; return f hex digest and reset ( ) ; }


sets the confidence level for this suggester the confidence level defines a factor applied to the input phrases score which is used as a threshold for other suggest candidates only candidates that score higher than the threshold will be included in the result for instance a confidence level of { @ code 1 0 } will only return suggestions that score higher than the input phrase if set to { @ code 0 0 } the top n candidates are returned the default is { @ code 1 0 }

public phrase suggestion builder confidence ( float confidence ) { if ( confidence < 0 0 ) { throw new illegal argument exception ( " confidence must be > = 0 0 " ) ; } this confidence = confidence ; return this ; }


in this test , we close a leaf stream in the priority tree and verify distribution 0 \ a b \ c d after the close : 0 \ a b | d

public void bytes distributed should be correct with leaf stream close ( ) throws http 2 exception { init state ( stream a , 400 , true ) ; init state ( stream b , 500 , true ) ; init state ( stream c , 600 , true ) ; init state ( stream d , 700 , true ) ; stream ( stream c ) close ( ) ; assert true ( write ( 900 ) ) ; assert equals ( 400 , capture writes ( stream a ) ) ; assert equals ( 500 , capture writes ( stream b ) ) ; verify never write ( stream c ) ; verify write ( at most ( 1 ) , stream d , 0 ) ; assert false ( write ( 700 ) ) ; assert equals ( 400 , capture writes ( stream a ) ) ; assert equals ( 500 , capture writes ( stream b ) ) ; verify never write ( stream c ) ; assert equals ( 700 , capture writes ( stream d ) ) ; }


public long long value ( ) { return sum ( ) ; }


return true if this storage dir can roll back to the previous storage state , false otherwise the nn will refuse to run the rollback operation unless at least one jm or fsimage storage directory can roll back

static boolean can roll back ( storage directory sd , storage info storage , storage info prev storage , int target layout version ) throws i o exception { file prev dir = sd get previous dir ( ) ; if ( ! prev dir exists ( ) ) { / / use current directory then log info ( " storage directory " + sd get root ( ) + " does not contain previous fs state " ) ; / / read and verify consistency with other directories storage read properties ( sd ) ; return false ; } / / read and verify consistency of the prev dir prev storage read previous version properties ( sd ) ; if ( prev storage get layout version ( ) ! = target layout version ) { throw new i o exception ( " cannot rollback to storage version " + prev storage get layout version ( ) + " using this version of the name node , which uses storage version " + target layout version + " " + " please use the previous version of hdfs to perform the rollback " ) ; } return true ; }


exit a parse tree produced by the { @ code parenthesized expression } labeled alternative in { @ link sql base parser # primary expression }

void exit parenthesized expression ( sql base parser parenthesized expression context ctx ) ;


returns a decoded version of the input stream where " % nn " escape sequences are replaced with their actual characters , using utf - 8 decoding rules

public static string escape decode ( string s ) throws malformed u r l exception { if ( s = = null ) { return null ; } byte [ ] bytes = null ; string builder sb = new string builder ( ) ; for ( int i = 0 ; i < s length ( ) ; ) { char c = s char at ( i ) ; if ( c = = ' % ' ) { if ( bytes = = null ) { bytes = new byte [ ( s length ( ) - i ) / 3 ] ; } int pos = 0 ; while ( ( ( i + 2 ) < s length ( ) ) & & ( c = = ' % ' ) ) { int v = integer parse int ( s substring ( i + 1 , i + 3 ) , 16 ) ; if ( v < 0 ) { throw new malformed u r l exception ( " bad hex characters in escape ( % ) pattern : " + s ) ; } bytes [ pos + + ] = ( byte ) v ; i + = 3 ; if ( i < s length ( ) ) { c = s char at ( i ) ; } } if ( ( i < s length ( ) ) & & ( c = = ' % ' ) ) { throw new malformed u r l exception ( " bad escape pattern in " + s ) ; } sb append ( new string ( bytes , 0 , pos , standard charsets utf 8 ) ) ; } else { sb append ( c ) ; i + + ; } } return sb to string ( ) ; }


intersects a { @ link ray } and a { @ link plane } the intersection point is stored in intersection in case an intersection is present

public static boolean intersect ray plane ( ray ray , plane plane , vector 3 intersection ) { float denom = ray direction dot ( plane get normal ( ) ) ; if ( denom ! = 0 ) { float t = - ( ray origin dot ( plane get normal ( ) ) + plane get d ( ) ) / denom ; if ( t < 0 ) return false ; if ( intersection ! = null ) intersection set ( ray origin ) add ( v 0 set ( ray direction ) scl ( t ) ) ; return true ; } else if ( plane test point ( ray origin ) = = plane plane side on plane ) { if ( intersection ! = null ) intersection set ( ray origin ) ; return true ; } else return false ; }


private static job create job ( string name , configuration conf ) throws i o exception { final job job = job get instance ( conf , name + " " + name ) ; final configuration jobconf = job get configuration ( ) ; job set jar by class ( bailey borwein plouffe class ) ; / / setup mapper job set mapper class ( bbp mapper class ) ; job set map output key class ( long writable class ) ; job set map output value class ( bytes writable class ) ; / / setup reducer job set reducer class ( bbp reducer class ) ; job set output key class ( long writable class ) ; job set output value class ( bytes writable class ) ; job set num reduce tasks ( 1 ) ; / / setup input job set input format class ( bbp input format class ) ; / / disable task timeout jobconf set long ( m r job config task timeout , 0 ) ; / / do not use speculative execution jobconf set boolean ( m r job config map speculative , false ) ; jobconf set boolean ( m r job config reduce speculative , false ) ; return job ; }


loading a matcher from a string the default access privilege is read - only the string contains 1 or 2 parts , separated by whitespace characters , where the first part specifies the client hosts , and the second part ( if existent ) specifies the access privilege of the client hosts i e , " client - hosts [ access - privilege ] "

private static match get match ( string line ) { string [ ] parts = line split ( " \ \ s + " ) ; final string host ; access privilege privilege = access privilege read only ; switch ( parts length ) { case 1 : host = string utils to lower case ( parts [ 0 ] ) trim ( ) ; break ; case 2 : host = string utils to lower case ( parts [ 0 ] ) trim ( ) ; string option = parts [ 1 ] trim ( ) ; if ( " rw " equals ignore case ( option ) ) { privilege = access privilege read write ; } break ; default : throw new illegal argument exception ( " incorrectly formatted line ' " + line + " ' " ) ; } if ( host equals ( " * " ) ) { if ( log is debug enabled ( ) ) { log debug ( " using match all for ' " + host + " ' and " + privilege ) ; } return new anonymous match ( privilege ) ; } else if ( cidr format short matcher ( host ) matches ( ) ) { if ( log is debug enabled ( ) ) { log debug ( " using cidr match for ' " + host + " ' and " + privilege ) ; } return new c i d r match ( privilege , new subnet utils ( host ) get info ( ) ) ; } else if ( cidr format long matcher ( host ) matches ( ) ) { if ( log is debug enabled ( ) ) { log debug ( " using cidr match for ' " + host + " ' and " + privilege ) ; } string [ ] pair = host split ( " / " ) ; return new c i d r match ( privilege , new subnet utils ( pair [ 0 ] , pair [ 1 ] ) get info ( ) ) ; } else if ( host contains ( " * " ) | | host contains ( " ? " ) | | host contains ( " [ " ) | | host contains ( " ] " ) | | host contains ( " ( " ) | | host contains ( " ) " ) ) { if ( log is debug enabled ( ) ) { log debug ( " using regex match for ' " + host + " ' and " + privilege ) ; } return new regex match ( privilege , host ) ; } else if ( hostname format matcher ( host ) matches ( ) ) { if ( log is debug enabled ( ) ) { log debug ( " using exact match for ' " + host + " ' and " + privilege ) ; } return new exact match ( privilege , host ) ; } else { throw new illegal argument exception ( " invalid hostname provided ' " + host + " ' " ) ; } }


set the active animation , replacing any current animation

public animation desc set animation ( final string id , int loop count ) { return set animation ( id , loop count , 1 0f , null ) ; }


variant of { @ link # eventually ( int , callable , callable ) } method for void lambda expressions

public static void eventually ( int timeout millis , void callable eval , callable < integer > retry ) throws exception { eventually ( timeout millis , new void caller ( eval ) , retry ) ; }


public static void ensure service access is allowed ( final string service , final registered service registered service ) { if ( registered service = = null ) { logger warn ( " unauthorized service access service [ { } ] is not found in service registry " , service ) ; throw new unauthorized service exception ( unauthorized service exception code unauthz service , " service is not found in service registry " ) ; } if ( ! registered service get access strategy ( ) is service access allowed ( ) ) { val msg = string format ( " unauthorized service access service [ % s ] is not enabled in service registry " , service ) ; logger warn ( msg ) ; throw new unauthorized service exception ( unauthorized service exception code unauthz service , msg ) ; } if ( ! ensure service is not expired ( registered service ) ) { val msg = string format ( " expired service access is denied service [ % s ] has been expired " , service ) ; logger warn ( msg ) ; throw new unauthorized service exception ( unauthorized service exception code expired service , msg ) ; } }


public java util logging logger get parent logger ( ) throws s q l feature not supported exception { throw new s q l feature not supported exception ( ) ; }


public big decimal get number item ( ) { return number item ; }


post pet { pet id } : updates a pet in the store with form data

default response entity < void > update pet with form ( @ api param ( value = " id of pet that needs to be updated " , required = true ) @ path variable ( " pet id " ) long pet id , @ api param ( value = " updated name of the pet " ) @ valid @ request part ( value = " name " , required = false ) string name , @ api param ( value = " updated status of the pet " ) @ valid @ request part ( value = " status " , required = false ) string status ) { return new response entity < > ( http status not implemented ) ; }


public enum number enum get enum number ( ) { return enum number ; }


public boolean is real time ( ) { return real time ; }


public builder set num cores ( int num cores ) { node num cores = num cores ; return this ; }


public void enable java assertions ( ) { add ( " - ea " ) ; add ( " - esa " ) ; }


return an unmodifiable { @ code transaction definition } with defaults for customization purposes , use the modifiable { @ link org springframework transaction support default transaction definition } instead

static transaction definition with defaults ( ) { return static transaction definition instance ; }


{ @ inherit doc } consequently , the values do not follow their natural ordering or the ordering of the value comparator

public collection < v > values ( ) { return super values ( ) ; }


public object get column value for row ( function record t , int column index ) { switch ( column index ) { case fid col : return string format ( " 0x % 0 1 6x " , t get i d ( ) ) ; case lib col : library record library record = service get library for function ( t ) ; return string format ( " % s % s % s " , library record get library family name ( ) , library record get library version ( ) , library record get library variant ( ) ) ; case path col : return t get domain path ( ) ; case name col : return t get name ( ) ; case fh col : return string format ( " 0x % 0 1 6x " , t get full hash ( ) ) ; case cus col : return integer value of ( t get code unit size ( ) ) ; case xh col : return string format ( " 0x % 0 1 6x " , t get specific hash ( ) ) ; case xhs col : return integer value of ( t get specific hash additional size ( ) ) ; case warn col : / / warning column can raise three different flags : / / f , which means the record automatically fails / / p , which means this record automatically passes / / u , which means the function body was unterminated ( likely analysis error ) / / s , which means this record can only be matched if the specific hash matches / / r , which means this record can only be matched if a parent / child also matches return string format ( " % s % s % s % s % s " , t auto fail ( ) ? " f " : " " , t auto pass ( ) ? " p " : " " , t has terminator ( ) ? " " : " u " , t is force specific ( ) ? " s " : " " , t is force relation ( ) ? " r " : " " ) ; } return " < < internal error > > " ; }


verify disk checker bails after 3 file write errors

public final void test disk io detects write errors ( ) throws throwable { disk checker replace file output stream provider ( new test file io provider ( 0 , disk checker disk io max iterations ) ) ; check dirs ( false ) ; }


public void test response serialization ( ) throws exception { long request id = integer max value + 72727278l ; byte [ ] serialized result = random byte array ( 1024 ) ; final kv state response response = new kv state response ( serialized result ) ; final message serializer < kv state internal request , kv state response > serializer = new message serializer < > ( new kv state internal request kv state internal request deserializer ( ) , new kv state response kv state response deserializer ( ) ) ; byte buf buf = message serializer serialize response ( alloc , request id , response ) ; int frame length = buf read int ( ) ; assert equals ( message type request result , message serializer deserialize header ( buf ) ) ; assert equals ( request id , message serializer get request id ( buf ) ) ; kv state response response deser = serializer deserialize response ( buf ) ; assert equals ( buf reader index ( ) , frame length + 4 ) ; assert array equals ( serialized result , response deser get content ( ) ) ; }


removes the mapping for the composite of active key and given namespace this method should be preferred over { @ link # remove and get old ( k , n ) } when the caller is not interested in the old state

public abstract void remove ( k key , n namespace ) ;


void close ( ) throws i o exception { local buffer file map file = null ; boolean success = false ; try { if ( ! read only ) { file tmp file = new file ( file get parent file ( ) , file get name ( ) + local buffer file temp file ext ) ; map file = new local buffer file ( tmp file , buf mgr get buffer size ( ) ) ; buf mgr save as ( map file , true , null ) ; buf mgr dispose ( ) ; buf mgr = null ; file delete ( ) ; if ( ! tmp file rename to ( file ) ) { throw new i o exception ( " failed to update file : " + file ) ; } } else { buf mgr dispose ( ) ; buf mgr = null ; } success = true ; } catch ( cancelled exception e ) { } finally { if ( ! success ) { if ( map file ! = null ) { map file delete ( ) ; } if ( buf mgr ! = null ) { buf mgr dispose ( ) ; } } } }


private void push ( j s o n object jo ) throws j s o n exception { if ( this top > = maxdepth ) { throw new j s o n exception ( " nesting too deep " ) ; } this stack [ this top ] = jo ; this mode = jo = = null ? ' a ' : ' k ' ; this top + = 1 ; }


returns an unstructured message explaining the origin of this rule

public static string get rule definition information ( rule rule ) { string builder buf = new string builder ( ) ; / / emit stack of rule instantiation buf append ( " repository " ) append ( rule get name ( ) ) append ( " instantiated at : \ n " ) ; immutable list < starlark thread call stack entry > stack = rule get call stack ( ) to list ( ) ; / / todo : callstack should always be available for bazel if ( stack is empty ( ) ) { buf append ( " callstack not available \ n " ) ; } else { for ( starlark thread call stack entry frame : stack ) { buf append ( " " ) append ( frame location ) append ( " : in " ) append ( frame name ) append ( ' \ n ' ) ; } } / / emit stack of rule class declaration stack = rule get rule class object ( ) get call stack ( ) ; if ( stack is empty ( ) ) { buf append ( " repository rule " ) append ( rule get rule class ( ) ) append ( " is built - in \ n " ) ; } else { buf append ( " repository rule " ) append ( rule get rule class ( ) ) append ( " defined at : \ n " ) ; for ( starlark thread call stack entry frame : stack ) { buf append ( " " ) append ( frame location ) append ( " : in " ) append ( frame name ) append ( ' \ n ' ) ; } } return buf to string ( ) ; }


public integer get snake case ( ) { return snake case ; }


test the property ' array array number '

public void array array number test ( ) { / / todo : test array array number }


called when the { @ link process engine } is initialized , but before it is returned

protected void post process engine initialisation ( ) { if ( performance settings is validate execution relationship count config on boot ( ) ) { command executor execute ( new validate execution related entity count cfg cmd ( ) ) ; } }


returns everything above the endpoint relative to the specified comparator , with the specified endpoint behavior

static < t > general range < t > down to ( comparator < ? super t > comparator , @ nullable t endpoint , bound type bound type ) { return new general range < t > ( comparator , true , endpoint , bound type , false , null , open ) ; }


{ @ inherit doc } because a { @ code set multimap } has unique values for a given key , this method returns a { @ link set } , instead of the { @ link java util collection } specified in the { @ link multimap } interface

set < v > remove all ( @ nullable decl object key ) ;


the version of the response data ( used for debugging ) < code > string system version info = 1 ; < code >

public builder set system version info bytes ( com google protobuf byte string value ) { if ( value = = null ) { throw new null pointer exception ( ) ; } check byte string is utf 8 ( value ) ; system version info = value ; on changed ( ) ; return this ; }


sets the components from the given spherical coordinate

public vector 3 set from spherical ( float azimuthal angle , float polar angle ) { float cos polar = math utils cos ( polar angle ) ; float sin polar = math utils sin ( polar angle ) ; float cos azim = math utils cos ( azimuthal angle ) ; float sin azim = math utils sin ( azimuthal angle ) ; return this set ( cos azim * sin polar , sin azim * sin polar , cos polar ) ; }


issues a recovery message if appropriate and prepares for next report

public void finish report ( ) { if ( ! has problems & & had problems ) { auditor info ( job id , messages get message ( messages job audit datafeed recovered ) ) ; } had problems = has problems ; has problems = false ; }


return the hex string of 3des encryption

public static string encrypt 3 d e s 2 hex string ( final byte [ ] data , final byte [ ] key , final string transformation , final byte [ ] iv ) { return utils bridge bytes 2 hex string ( encrypt 3 d e s ( data , key , transformation , iv ) ) ; }


public static string get string ( @ non null final string key , final string default value , @ non null final s p utils sp utils ) { return sp utils get string ( key , default value ) ; }


public static void intercept ( @ this object obj , @ all arguments object [ ] all arguments ) { try { prepare ( ) ; enhanced instance target object = ( enhanced instance ) obj ; if ( interceptor = = null ) { return ; } interceptor on construct ( target object , all arguments ) ; } catch ( throwable t ) { logger error ( " constructor inter failure " , t ) ; } }


return the terminal display width of a code point : 0 , 1 | | 2

public static int width ( int ucs ) { if ( ucs = = 0 | | ucs = = 0x 0 3 4 f | | ( 0x 2 0 0 b < = ucs & & ucs < = 0x 2 0 0 f ) | | ucs = = 0x 2 0 2 8 | | ucs = = 0x 2 0 2 9 | | ( 0x 2 0 2 a < = ucs & & ucs < = 0x 2 0 2 e ) | | ( 0x 2 0 6 0 < = ucs & & ucs < = 0x 2 0 6 3 ) ) { return 0 ; } / / c0 / c1 control characters / / termux change : return 0 instead of - 1 if ( ucs < 32 | | ( 0x 0 7 f < = ucs & & ucs < 0x 0 a 0 ) ) return 0 ; / / combining characters with zero width if ( intable ( zero width , ucs ) ) return 0 ; return intable ( wide eastasian , ucs ) ? 2 : 1 ; }


returns a formatter that combines a full weekyear date and time , separated by a ' t ' ( xxxx - ' w ' ww - e ' t ' hh : mm : ss ssszz ) the time zone offset is ' z ' for zero , and of the form ' ± hh : mm ' for non - zero the parser is strict by default , thus time string { @ code 24 : 00 } cannot be parsed the returned formatter prints and parses only this format , which includes milliseconds see { @ link # date time parser ( ) } for a more flexible parser that accepts different formats

public static date time formatter week date time ( ) { return constants wdt ; }


deserializes an { @ link abstract ms type } from the { @ link pdb byte reader } and returns it as a { @ link ms type field }

public ms type field parse field ( pdb byte reader reader ) throws pdb exception , cancelled exception { ms type field result = parse ( reader , ms type field class ) ; return result ; }


public boolean restart data node ( data node properties dnprop ) throws i o exception { return restart data node ( dnprop , false ) ; }


returns the apple platform type for the given platform type string ( corresponding directly with platform type attribute value )

private static platform type get platform type ( string platform type string ) throws apple platform unsupported platform type exception { platform type platform type = platform type from string ( platform type string ) ; if ( ! supported platform types contains ( platform type ) ) { throw new apple platform unsupported platform type exception ( string format ( unsupported platform type error format , platform type string ) ) ; } else { return platform type ; } }


returns all vertices on any task failure

public set < execution vertex i d > get tasks needing restart ( execution vertex i d execution vertex id , throwable cause ) { return iterable utils to stream ( topology get vertices ( ) ) map ( scheduling execution vertex : : get id ) collect ( collectors to set ( ) ) ; }


finds pets by tags multiple tags can be provided with comma separated strings use tag 1 , tag 2 , tag 3 for testing

public void find pets by tags ( set < string > tags , handler < async result < set < pet > > > result handler ) { find pets by tags ( tags , null , result handler ) ; }


public map < string , boolean > get indirect map ( ) { return indirect map ; }


test cases when peer has new - epoch zxid

public void test new epoch zxid ( ) throws exception { long peer zxid ; db txn log add ( create proposal ( get zxid ( 0 , 1 ) ) ) ; db txn log add ( create proposal ( get zxid ( 1 , 1 ) ) ) ; db txn log add ( create proposal ( get zxid ( 1 , 2 ) ) ) ; / / after leader election , last processed zxid will point to new epoch db last processed zxid = get zxid ( 2 , 0 ) ; db committed log add ( create proposal ( get zxid ( 1 , 1 ) ) ) ; db committed log add ( create proposal ( get zxid ( 1 , 2 ) ) ) ; / / peer has zxid of epoch 0 peer zxid = get zxid ( 0 , 0 ) ; / / we should get snap , we can do better here , but the main logic is / / that we should never send diff if we have never seen any txn older / / than peer zxid assert true ( learner handler sync follower ( peer zxid , leader ) ) ; assert equals ( 0 , learner handler get queued packets ( ) size ( ) ) ; reset ( ) ; / / peer has zxid of epoch 1 peer zxid = get zxid ( 1 , 0 ) ; assert false ( learner handler sync follower ( peer zxid , leader ) ) ; / / we send diff to ( 1 , 2 ) and forward any packet starting at ( 1 , 2 ) assert op type ( leader diff , get zxid ( 1 , 2 ) , get zxid ( 1 , 2 ) ) ; / / diff + 2 proposals + 2 commit assert equals ( 5 , learner handler get queued packets ( ) size ( ) ) ; queued packet matches ( new long [ ] { get zxid ( 1 , 1 ) , get zxid ( 1 , 2 ) } ) ; reset ( ) ; / / peer has zxid of epoch 2 , so it is already sync peer zxid = get zxid ( 2 , 0 ) ; assert false ( learner handler sync follower ( peer zxid , leader ) ) ; / / we send diff to ( 2 , 0 ) and forward any packet starting at ( 2 , 0 ) assert op type ( leader diff , get zxid ( 2 , 0 ) , get zxid ( 2 , 0 ) ) ; / / diff only assert equals ( 1 , learner handler get queued packets ( ) size ( ) ) ; reset ( ) ; }


private options dialog create options dialog ( ) { options dialog dialog = null ; if ( options map size ( ) = = 0 ) { return null ; } options key binding options = get options ( docking tool constants key bindings ) ; tree path path = null ; if ( options dialog ! = null ) { path = options dialog get selected path ( ) ; options dialog dispose ( ) ; options editor old editor = key binding options get options editor ( ) ; old editor dispose ( ) ; } key binding options register options editor ( new key binding options editor ( ) ) ; dialog = new options dialog ( " options for " + tool get name ( ) , " options " , get editable options ( ) , null , true ) ; dialog set selected path ( path ) ; dialog set help location ( new help location ( tool constants tool help topic , " tool options dialog " ) ) ; return dialog ; }


start the kdc , create the keytab and the alice and bob users , and ugi instances of them logged in from the keytab

protected void service start ( ) throws exception { super service start ( ) ; kdc start ( ) ; keytab = new file ( work dir , " keytab bin " ) ; login username = user group information get login user ( ) get short user name ( ) ; login principal = login username + " / " + krb instance ; alice principal = alice + " / " + krb instance ; bob principal = bob + " / " + krb instance ; kdc create principal ( keytab , alice principal , bob principal , " http / " + krb instance , http localhost , login principal ) ; final file keystores dir = new file ( work dir , " ssl " ) ; keystores dir mkdirs ( ) ; ssl conf dir = key store test util get classpath dir ( this get class ( ) ) ; key store test util setup s s l config ( keystores dir get absolute path ( ) , ssl conf dir , get config ( ) , false ) ; client s s l config file name = key store test util get client s s l config file name ( ) ; server s s l config file name = key store test util get server s s l config file name ( ) ; }


see { @ link file status # has acl ( ) }


set the linear velocity of the center of mass

public void set linear velocity ( vector 2 v ) { jni set linear velocity ( addr , v x , v y ) ; }


returns the unique least value of type { @ code c } that is greater than { @ code value } , or { @ code null } if none exists inverse operation to { @ link # previous }


public void add mime mapping ( string extension , string type ) { handler get mime types ( ) add mime mapping ( extension , type ) ; }


check whether the conditions are satisfied for moving to the next stage if the diff entries size is no greater than the threshold and the open files could be force closed or there is no open file , then moving to the next stage

boolean diff dist cp stage done ( ) throws i o exception , retry exception { int diff size = get diff size ( ) ; if ( diff size < = diff threshold ) { if ( force close open files | | ! verify open files ( ) ) { return true ; } else { throw new retry exception ( ) ; } } return false ; }


returns just the shell command to be used to fetch a user ' s group i ds list this is mainly separate to make some tests easier

protected string [ ] get groups i d for user command ( string user name ) { return shell get groups i d for user command ( user name ) ; }


get the byte value for the specified field

public byte get byte value ( int col index ) { return field values [ col index ] get byte value ( ) ; }


public redis connection config builder with timeout ( long timeout ) { assert util not null ( timeout , " timeout must not be null " ) ; assert util not null ( timeout > = 0 , " timeout must be greater or equal 0 " ) ; this timeout = timeout ; return this ; }


protected void finalize ( ) throws throwable { dispose ( ) ; super finalize ( ) ; }


must be called at the end of each subclass ' s constructor this method performs the " real " initialization ; we can ' t put this in the constructor because , in the case where futures are already complete , we would not initialize the subclass before calling { @ link # collect value from non cancelled future } as this is called after the subclass is constructed , we ' re guaranteed to have properly initialized the subclass

final void init ( ) { / / corner case : list is empty if ( futures is empty ( ) ) { handle all completed ( ) ; return ; } / / note : if we ever want to use a custom executor here , have a look at combined future as we ' ll / / need to handle rejected execution exception if ( all must succeed ) { / / we need fail fast , so we have to keep track of which future failed so we can propagate / / the exception immediately / / register a listener on each future in the list to update the state of this future / / note that if all the futures on the list are done prior to completing this loop , the last / / call to add listener ( ) will callback to set one value ( ) , transitively call our cleanup / / listener , and set this futures to null / / this is not actually a problem , since the foreach only needs this futures to be non - null / / at the beginning of the loop int i = 0 ; for ( final listenable future < ? extends input t > future : futures ) { final int index = i + + ; future add listener ( new runnable ( ) { @ override public void run ( ) { try { if ( future is cancelled ( ) ) { / / clear futures prior to cancelling children this sets our own state but lets / / the input futures keep running , as some of them may be used elsewhere futures = null ; cancel ( false ) ; } else { collect value from non cancelled future ( index , future ) ; } } finally { / * * " null " means : there is no need to access ` futures ` again during * ` process completed ` because we ' re reading each value during a call to * handle one input done * / decrement count and maybe complete ( null ) ; } } } , direct executor ( ) ) ; } } else { / * * we ' ll call the user callback or collect the values only when all inputs complete , * regardless of whether some failed this lets us avoid calling expensive methods like * future get ( ) when we don ' t need to ( specifically , for when all complete ( ) call * ( ) ) , and it * lets all futures share the same listener * * we store ` local futures ` inside the listener because ` this futures ` might be nulled out by * the time the listener runs for the final future - - at which point we need to check all * inputs for exceptions * if * we ' re collecting values if we ' re not , then the listener doesn ' t * need access to the futures again , so we can just pass ` null ` * * todo ( b / 112550045 ) : allocating a single , cheaper listener is ( i think ) only an optimization * if we make some other optimizations , this one will no longer be necessary the optimization * could actually hurt in some cases , as it forces us to keep all inputs in memory until the * final input completes * / final immutable collection < ? extends future < ? extends input t > > local futures = collects values ? futures : null ; runnable listener = new runnable ( ) { @ override public void run ( ) { decrement count and maybe complete ( local futures ) ; } } ; for ( listenable future < ? extends input t > future : futures ) { future add listener ( listener , direct executor ( ) ) ; } } }


set code analysis enablement by default new instructions will be submitted for auto - analysis

public void enable code analysis ( boolean enable ) { this enable analysis = enable ; }


apply an immutable transformation to the given string

public string escape string ( string s ) { string builder sb = null ; int n = s length ( ) ; for ( int i = 0 ; i < n ; i + + ) { char c = s char at ( i ) ; string escape ; / / codes > = 128 ( e g euro sign ) are always escaped if ( c > 127 ) { escape = " & # " + integer to string ( c ) + " ; " ; } else if ( c > = translation table length ) { escape = null ; } else { escape = translation table [ c ] ; } if ( escape = = null ) { if ( sb ! = null ) { sb append ( c ) ; } } else { if ( sb = = null ) { sb = new string builder ( n * 2 ) ; sb append ( s , 0 , i ) ; } sb append ( escape ) ; } } if ( sb = = null ) { return s ; } else { return sb to string ( ) ; } }


returns the index , or unset if the pointer is " null "

private static int get next ( long entry ) { return ( int ) entry ; }


return the first header value for the given header name , if any

public string get first ( string header name ) { return this headers get first ( header name ) ; }


returns the product of this long value and the given particular long value

public long value multiply ( particular long value other ) { return multiply ( ( specific long value ) other ) ; }


this is called when the model is bound to a view , and the view ' s variables should be updated with the model ' s data { @ link view data binding # execute pending bindings ( ) } is called for you after this method is run if you leave your class abstract and have a model generated for you via annotations this will be implemented for you however , you may choose to implement this manually if you like

protected abstract void set data binding variables ( view data binding binding ) ;


public x pack info response info ( x pack info request request , request options options ) throws i o exception { return rest high level client perform request and parse entity ( request , x pack request converters : : info , options , x pack info response : : from x content , empty set ( ) ) ; }


set a script execution to be run in the bean destruction callback , cleaning up the database and leaving it in a known state for others

public void set database cleaner ( database populator database cleaner ) { this database cleaner = database cleaner ; }


public void date time test ( ) { / / todo : test date time }


public void byte test ( ) { / / todo : test byte }


public string get constant name ( clazz clazz ) { return clazz get string ( u 2constant name index ) ; }


publish the given event to all listeners

protected void publish event ( object event , @ nullable resolvable type event type ) { assert not null ( event , " event must not be null " ) ; / / decorate event as an application event if necessary application event application event ; if ( event instanceof application event ) { application event = ( application event ) event ; } else { application event = new payload application event < > ( this , event ) ; if ( event type = = null ) { event type = ( ( payload application event < ? > ) application event ) get resolvable type ( ) ; } } / / multicast right now if possible - or lazily once the multicaster is initialized if ( this early application events ! = null ) { this early application events add ( application event ) ; } else { get application event multicaster ( ) multicast event ( application event , event type ) ; } / / publish event via parent context as well if ( this parent ! = null ) { if ( this parent instanceof abstract application context ) { ( ( abstract application context ) this parent ) publish event ( event , event type ) ; } else { this parent publish event ( event ) ; } } }


the implementing class of the { @ link hystrix command }

public class < ? extends hystrix invokable > get implementing class ( ) { return command class ; }


public static boolean write file from bytes by channel ( final file file , final byte [ ] bytes , final boolean is force ) { return write file from bytes by channel ( file , bytes , false , is force ) ; }


asserts whether or not the inode for a specific path has an acl feature

public static void assert acl feature ( final mini d f s cluster mini cluster , path path to check , boolean expect acl feature ) throws i o exception { acl feature acl feature = get acl feature ( path to check , mini cluster ) ; if ( expect acl feature ) { assert not null ( acl feature ) ; / / intentionally capturing a reference to the entries , not using nested / / calls this way , we get compile - time enforcement that the entries are / / stored in an immutable list immutable list < acl entry > entries = acl storage get entries from acl feature ( acl feature ) ; assert false ( entries is empty ( ) ) ; } else { assert null ( acl feature ) ; } }


determine the raw status code for the given exception

protected int determine raw status code ( throwable ex ) { if ( ex instanceof response status exception ) { return ( ( response status exception ) ex ) get raw status code ( ) ; } return - 1 ; }


public long read long ( ) throws i o exception { return ( ( ( long ) read int ( ) ) < < 32 ) | ( read int ( ) & 0x f f f f f f f f l ) ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


returns a list of buffers , checking the first n non - priority buffers , and skipping all events

private list < buffer > get inflight buffers unsafe ( long checkpoint id ) throws checkpoint exception { assert thread holds lock ( received buffers ) ; if ( checkpoint id < last barrier id ) { throw new checkpoint exception ( string format ( " sequence number for checkpoint % d is not known ( it was likely been overwritten by a newer checkpoint % d ) " , checkpoint id , last barrier id ) , checkpoint failure reason checkpoint subsumed ) ; / / currently , at most one active unaligned / / checkpoint is possible } final list < buffer > inflight buffers = new array list < > ( ) ; iterator < sequence buffer > iterator = received buffers iterator ( ) ; / / skip all priority events ( only buffers are stored anyways ) iterators advance ( iterator , received buffers get num priority elements ( ) ) ; while ( iterator has next ( ) ) { sequence buffer sequence buffer = iterator next ( ) ; if ( sequence buffer buffer is buffer ( ) ) { if ( should be spilled ( sequence buffer sequence number ) ) { inflight buffers add ( sequence buffer buffer retain buffer ( ) ) ; } else { break ; } } } return inflight buffers ; }


public void test read only first ( ) { / / todo : test read only first }


public void close ( reporter reporter ) throws i o exception { super close ( null ) ; }


process the option value before it is written the default implementation simply returns the same value unchanged

protected string process option value ( string resolved value ) { return resolved value ; }


publish a new item and submit an update for it if it is already published , redirects to its page

public void publish ( publishable p ) { log info ( " publish ( ) : " + p steam title ( ) ) ; if ( p has steam i d ( ) ) { log info ( " content already published , redirecting to id " ) ; view listing ( p ) ; return ; } if ( ! p pre publish ( ) ) { log info ( " rejecting due to pre - publish " ) ; return ; } show publish ( id - > update ( p , id , null ) ) ; }


returns the " other " instance if it has any expressions ; returns " this " instance otherwise practically that means a method - level " produces " overrides a type - level " produces " condition

public produces request condition combine ( produces request condition other ) { return ( ! other expressions is empty ( ) ? other : this ) ; }


public integer get integer ( ) { return integer ; }


< code > optional aapt pb style style = 2 ; < code >

public com android aapt resources style get style ( ) { return instance get style ( ) ; }


specify whether or not parsing is to be lenient default is false with lenient parsing , the parser may allow inputs that do not precisely match the format with strict parsing , inputs must match the format exactly

public void set lenient ( boolean lenient ) { this lenient = lenient ; }


public tabbed folder info get info ( ) { return tab ; }


calculate score authentication risk score

protected big decimal calculate score ( final http servlet request request , final authentication authentication , final registered service service , final collection < ? extends cas event > events ) { return highest risk score ; }


to test enum parameters to test enum parameters

public void test enum parameters ( list < string > enum header string array , string enum header string , list < string > enum query string array , string enum query string , integer enum query integer , double enum query double , list < string > enum form string array , string enum form string , api client auth info auth info , handler < async result < void > > result handler ) { delegate test enum parameters ( enum header string array , enum header string , enum query string array , enum query string , enum query integer , enum query double , enum form string array , enum form string , auth info , result handler ) ; }


creates a new iterator that traverses the entire program ' s address space , returning data instances that successfully match the predicate

public static defined data iterator by data instance ( program program , predicate < data > data instance predicate ) { return new defined data iterator ( program , null , null , data instance predicate ) ; }


returns a vertex [ ] containing the sources a vertex is a source if it has no incoming edges

public vertex [ ] get sources ( ) { return this vertices ( ) get sources ( ) ; }


test serialization of object with outer number type < b > 200 < b > - output composite

public outer composite fake outer composite serialize ( outer composite body ) throws rest client exception { return fake outer composite serialize with http info ( body ) get body ( ) ; }


we encoded incorrectly for years , so we have to read this data eventhough it is wrong see openzipkinzipkin - reporter - java # 133

public void decoder for list message thrift incorrect first byte ( ) { byte [ ] message = span bytes encoder thrift encode list ( as list ( span 1 , span 2 ) ) ; message [ 0 ] = 11 ; / / we made a typo it should have been 12 assert that ( span bytes decoder detector decoder for list message ( message ) ) is equal to ( span bytes decoder thrift ) ; }


checks if the task is currently present in the list and has the right allocation id

public boolean has task ( string task id , long allocation id ) { persistent task < ? > task in progress = tasks get ( task id ) ; if ( task in progress ! = null ) { return task in progress get allocation id ( ) = = allocation id ; } return false ; }


for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ;

public void test body with file schema ( file schema test class body ) throws api exception { test body with file schema with http info ( body ) ; }


get the default filename extension for this kind of compression

public string get default extension ( ) { return codec constants lz4 codec extension ; }


private boolean create key ( user group information ugi , final string key , final configuration conf ) { return do user op ( ugi , new user op ( ) { @ override public void execute ( ) throws i o exception { try { d f s test util create key ( key , cluster , conf ) ; } catch ( no such algorithm exception ex ) { throw new i o exception ( ex ) ; } } } ) ; }


check whether the given class loader is underneath the given parent , that is , whether the parent is within the candidate ' s hierarchy

private static boolean is underneath class loader ( @ nullable class loader candidate , @ nullable class loader parent ) { if ( candidate = = parent ) { return true ; } if ( candidate = = null ) { return false ; } class loader class loader to check = candidate ; while ( class loader to check ! = null ) { class loader to check = class loader to check get parent ( ) ; if ( class loader to check = = parent ) { return true ; } } return false ; }


sets the default value to use for a rule ' s { @ link rule class # applicable licenses attr } attribute when not explicitly specified by the rule records a package error if any labels are duplicated

void set default applicable licenses ( list < label > licenses , string attr name , location location ) { if ( has duplicate labels ( licenses , " package " + pkg get name ( ) , attr name , location , this : : add event ) ) { set contains errors ( ) ; } pkg set default applicable licenses ( immutable set copy of ( licenses ) ) ; }


public synchronized boolean try read lock ( ) { if ( is write locked ( ) ) { return false ; } else { status + + ; return true ; } }


determine if the supplied metric name is part of this group identifier

public boolean includes ( metric name metric name ) { return metric name ! = null & & group name equals ( metric name group ( ) ) & & tags equals ( metric name tags ( ) ) ; }


execute authentication risk contingency plan

protected authentication risk contingency response execute internal ( final authentication authentication , final registered service service , final authentication risk score score , final http servlet request request ) { return null ; }


public void test to list ( ) { list < list < string > > table = new linked list < > ( ) ; table add ( arrays as list ( " abc " , " abc " , " abc " ) ) ; table add ( arrays as list ( " 1 " , " 2 " , " 3 " ) ) ; table add ( arrays as list ( " x " , " y " , " z " ) ) ; string to list = telnet utils to list ( table ) ; assertions assert true ( to list contains ( " abc - abc - abc " ) ) ; assertions assert true ( to list contains ( " 1 - 2 - 3 " ) ) ; assertions assert true ( to list contains ( " x - y - z " ) ) ; }


list of rules for ( possibly ) expanding the list of unresolved expressions

public static list < resolver rule > get expanding resolver rules ( ) { return arrays as list ( resolver rules unwrap api expression , resolver rules lookup call by name , resolver rules flatten star reference , resolver rules expand column functions ) ; }


build a { @ link long keyed bucket ords }

public static bytes keyed bucket ords build ( big arrays big arrays , cardinality upper bound cardinality ) { return cardinality map ( estimate - > estimate < 2 ? new from single ( big arrays ) : new from many ( big arrays ) ) ; }


resolves a custom value handling , return { @ code null } if can ' t handle it

inet address [ ] resolve if possible ( string value ) throws i o exception ;


refreshes the list of hosts and excluded hosts from the configured files

public void refresh nodes ( ) throws i o exception { dfs refresh nodes ( ) ; }


public string get pet type ( ) { return pet type ; }


check whether the service monitors the given job

boolean contains job ( job i d job id ) ;


public void code sample test ( ) { mammal example mammal = new mammal ( ) ; / / create a new pig pig example pig = new pig ( ) ; / / set mammal to pig example mammal set actual instance ( example pig ) ; / / to get back the pig set earlier pig test pig = ( pig ) example mammal get actual instance ( ) ; / / create a new whale whale example whale = new whale ( ) ; / / set mammal to whale example mammal set actual instance ( example whale ) ; / / to get back the whale set earlier whale test whale = ( whale ) example mammal get actual instance ( ) ; / / create a new zebra zebra example zebra = new zebra ( ) ; / / set mammal to zebra example mammal set actual instance ( example zebra ) ; / / to get back the zebra set earlier zebra test zebra = ( zebra ) example mammal get actual instance ( ) ; }


controls the shard routing of the delete request using this value to hash the shard and not the id

public delete request builder set routing ( string routing ) { request routing ( routing ) ; return this ; }


sets the { @ code additional properties } and returns a reference to this builder so that the methods can be chained together

public builder with additional properties ( map < string , object > additional properties ) { this additional properties = additional properties ; return this ; }


sets the min width and min height to the specified values

public cell < t > min size ( value width , value height ) { if ( width = = null ) throw new illegal argument exception ( " width cannot be null " ) ; if ( height = = null ) throw new illegal argument exception ( " height cannot be null " ) ; min width = width ; min height = height ; return this ; }


share connnect for registry , metadata , etc make sure the connection is connected

public zookeeper client connect ( url url ) { zookeeper client zookeeper client ; / / address format : { [ username : password @ ] address } list < string > address list = get u r l backup address ( url ) ; / / the field define the zookeeper server , including protocol , host , port , username , password if ( ( zookeeper client = fetch and update zookeeper client cache ( address list ) ) ! = null & & zookeeper client is connected ( ) ) { logger info ( " find valid zookeeper client from the cache for address : " + url ) ; return zookeeper client ; } / / avoid creating too many connections ， so add lock synchronized ( zookeeper client map ) { if ( ( zookeeper client = fetch and update zookeeper client cache ( address list ) ) ! = null & & zookeeper client is connected ( ) ) { logger info ( " find valid zookeeper client from the cache for address : " + url ) ; return zookeeper client ; } zookeeper client = create zookeeper client ( url ) ; logger info ( " no valid zookeeper client found from cache , therefore create a new client for url " + url ) ; write to client map ( address list , zookeeper client ) ; } return zookeeper client ; }


for the provided path , return its value in the x content map note that in contrast with { @ link x content map values # extract raw values } , array and object values can be returned

public static object extract value ( string path , map < ? , ? > map ) { return extract value ( map , path split ( " \ \ " ) ) ; }


public order place order ( order body ) { / / todo : implement return null ; }


aggregate the supplied statistics into the current set

boolean aggregate ( @ nullable i o statistics statistics ) ;


public interval set complement ( int set vocabulary ) { if ( vocabulary = = null | | vocabulary is nil ( ) ) { return null ; / / nothing in common with null set } interval set vocabulary i s ; if ( vocabulary instanceof interval set ) { vocabulary i s = ( interval set ) vocabulary ; } else { vocabulary i s = new interval set ( ) ; vocabulary i s add all ( vocabulary ) ; } return vocabulary i s subtract ( this ) ; }


gets the total size in bytes of all currently cached items


real stream traffic applied to the log format

@ test public void example stream ( ) { assert that ( frame log ( false , 0 , 5 , type settings , flag none ) ) is equal to ( " > > 0x 0 0 0 0 0 0 0 0 5 settings " ) ; assert that ( frame log ( false , 3 , 100 , type headers , flag end headers ) ) is equal to ( " > > 0x 0 0 0 0 0 0 0 3 100 headers end headers " ) ; assert that ( frame log ( false , 3 , 0 , type data , flag end stream ) ) is equal to ( " > > 0x 0 0 0 0 0 0 0 3 0 data end stream " ) ; assert that ( frame log ( true , 0 , 15 , type settings , flag none ) ) is equal to ( " < < 0x 0 0 0 0 0 0 0 0 15 settings " ) ; assert that ( frame log ( false , 0 , 0 , type settings , flag ack ) ) is equal to ( " > > 0x 0 0 0 0 0 0 0 0 0 settings ack " ) ; assert that ( frame log ( true , 0 , 0 , type settings , flag ack ) ) is equal to ( " < < 0x 0 0 0 0 0 0 0 0 0 settings ack " ) ; assert that ( frame log ( true , 3 , 22 , type headers , flag end headers ) ) is equal to ( " < < 0x 0 0 0 0 0 0 0 3 22 headers end headers " ) ; assert that ( frame log ( true , 3 , 226 , type data , flag end stream ) ) is equal to ( " < < 0x 0 0 0 0 0 0 0 3 226 data end stream " ) ; assert that ( frame log ( false , 0 , 8 , type goaway , flag none ) ) is equal to ( " > > 0x 0 0 0 0 0 0 0 0 8 goaway " ) ; }


public declaration of object ' s { @ code clone ( ) } method delegates to { @ link # clone bean definition ( ) }

public object clone ( ) { return clone bean definition ( ) ; }


flags { @ code type = " checkbox " } and { @ code type = " radio " } as illegal dynamic attributes

protected boolean is valid dynamic attribute ( string local name , object value ) { return ! ( " type " equals ( local name ) & & ( " checkbox " equals ( value ) | | " radio " equals ( value ) ) ) ; }


releases resources used to display the image the containing view must call this method from both { @ link view # on start temporary detach ( ) } and { @ link view # on detached from window ( ) }

public void on detach ( ) { if ( ! m is attached ) { return ; } m is attached = false ; for ( int i = 0 ; i < m holders size ( ) ; + + i ) { m holders get ( i ) on detach ( ) ; } }


prepare for the cross - process propagation

void inject ( context carrier carrier ) { carrier get extension context ( ) skip analysis = this skip analysis ; }


public context snapshot capture ( ) { context snapshot snapshot = new context snapshot ( segment get trace segment id ( ) , active span ( ) get span id ( ) , get primary trace id ( ) , first ( ) get operation name ( ) , this correlation context , this extension context ) ; return snapshot ; }


public void begin ( ) { if ( model ! = null ) throw new gdx runtime exception ( " call end ( ) first " ) ; node = null ; model = new model ( ) ; builders clear ( ) ; }


public void test run unknown path ( ) throws throwable { run to failure ( exit not found , markers , audit , method path ( ) ) ; }


returns the signed integer value of the requested attribute after resolving any dwarf expression opcodes

public int parse int ( int attribute , int default value ) throws i o exception , d w a r f expression exception { attr info attr info = find attribute ( attribute ) ; if ( attr info = = null ) { return default value ; } d w a r f attribute value attr = attr info attr ; if ( attr instanceof d w a r f numeric attribute ) { return assert valid int ( ( ( d w a r f numeric attribute ) attr ) get value ( ) ) ; } else if ( attr instanceof d w a r f blob attribute ) { byte [ ] expr bytes = ( ( d w a r f blob attribute ) attr ) get bytes ( ) ; d w a r f expression evaluator evaluator = d w a r f expression evaluator create ( get head fragment ( ) ) ; ghidra app util bin format dwarf 4 expression d w a r f expression expr = evaluator read expr ( expr bytes ) ; evaluator evaluate ( expr , 0 ) ; return assert valid int ( evaluator pop ( ) ) ; } else { throw new i o exception ( " dwarf attribute form not valid for integer value : " + attr info form ) ; } }


public void set transaction name ( string transaction name ) { this transaction name = transaction name ; }


creates an { @ code apple binary } target writer for the label indicated by the given string

protected scratch attribute writer create binary target writer ( string label string ) { return scratch attribute writer from label string ( this , " apple binary " , label string ) set ( " platform type " , " ' ios ' " ) ; }


returns a map of profile properties included in this profile instance the returned properties corresponds to how this profile is described in the credential profiles file , i e , profiles with basic credentials consist of two properties { " aws access key id " , " aws secret access key " } and profiles with session credentials have three properties , with an additional " aws session token " property

public map < string , string > get properties ( ) { return new linked hash map < string , string > ( properties ) ; }


deletes any state in the { @ code context } when the window expires ( the watermark passes its { @ code max timestamp } + { @ code allowed lateness } )

public void clear ( context context ) throws exception { }


public okhttp 3 call delete user call ( string username , final api callback callback ) throws api exception { object local var post body = null ; / / create path and map variables string local var path = " / user / { username } " replace all ( " \ \ { " + " username " + " \ \ } " , local var api client escape string ( username to string ( ) ) ) ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; final string [ ] local var accepts = { } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , " delete " , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


get the count of " 0 3 0t " triads which have three unidirectional edges among the vertices , forming a closed triplet , a triangle ; two of the unidirectional edges sourcetarget the same vertex

public big integer get count 0 3 0t ( ) { return counts [ 8 ] ; }


calculate the length of the current constructor state assuming all its operands are constructed

public void calc current length ( int min length , int numopers ) { min length + = point get offset ( ) ; / / convert relative length to absolute length for ( int i = 0 ; i < numopers ; + + i ) { construct state subpoint = point get sub state ( i ) ; int sublength = subpoint get length ( ) + subpoint get offset ( ) ; / / since subpoint offset is an absolute offset / / ( relative to beginning of instruction ) sublength / / is absolute and must be compared to absolute length if ( sublength > min length ) min length = sublength ; } point set length ( min length - point get offset ( ) ) ; / / convert back to relative length }


write 8 byte fixed length integer to byte buffers

public void write int 8 ( final long value ) { byte buf write long ( value ) ; }


public void get user by name test ( ) throws i o exception { string username = null ; user response = api get user by name ( username ) ; / / todo : test validations }


returns the precision of the field precision is the specified column size for numeric data , this is the maximum precision for character data , this is the length in characters for datetime datatypes , this is the length in characters of the string representation ( assuming the maximum allowed default precision of the fractional seconds component )

public static int default precision ( data type data type ) { if ( data type = = unsupported ) { return data type size ( ) ; } if ( data type = = null ) { return data type size ( ) ; } if ( data type = = boolean ) { return data type size ( ) ; } if ( data type = = byte ) { return 3 ; } if ( data type = = short ) { return 5 ; } if ( data type = = integer ) { return 10 ; } if ( data type = = long ) { return 19 ; } if ( data type = = double ) { return 15 ; } if ( data type = = float ) { return 7 ; } if ( data type = = half float ) { return 3 ; } if ( data type = = scaled float ) { return 15 ; } if ( data type = = keyword ) { return 15 ; } if ( data type = = text ) { return 32766 ; } if ( data type = = datetime ) { return 3 ; } if ( data type = = ip ) { return data type size ( ) ; } if ( data type = = binary ) { return data type size ( ) ; } if ( data type = = object ) { return data type size ( ) ; } if ( data type = = nested ) { return data type size ( ) ; } / / / / sql specific / / / / since odbc and jdbc interpret precision for date as display size / / the precision is 23 ( number of chars in iso8601 with millis ) + 6 chars for the timezone ( e g : + 05 : 00 ) / / see https : / / github com / elastic / elasticsearch / issues / 30386 # issuecomment - 386807288 if ( data type = = date ) { return 3 ; } if ( data type = = time ) { return 3 ; } if ( data type = = geo shape ) { return data type size ( ) ; } if ( data type = = geo point ) { return integer max value ; } if ( data type = = shape ) { return data type size ( ) ; } if ( data type = = interval year ) { return 7 ; } if ( data type = = interval month ) { return 7 ; } if ( data type = = interval day ) { return 23 ; } if ( data type = = interval hour ) { return 23 ; } if ( data type = = interval minute ) { return 23 ; } if ( data type = = interval second ) { return 23 ; } if ( data type = = interval year to month ) { return 7 ; } if ( data type = = interval day to hour ) { return 23 ; } if ( data type = = interval day to minute ) { return 23 ; } if ( data type = = interval day to second ) { return 23 ; } if ( data type = = interval hour to minute ) { return 23 ; } if ( data type = = interval hour to second ) { return 23 ; } if ( data type = = interval minute to second ) { return 23 ; } return 0 ; }


sets the actor in this cell and adds the actor to the cell ' s table if null , removes any current actor

public < a extends actor > cell < a > set actor ( @ null a new actor ) { if ( actor ! = new actor ) { if ( actor ! = null & & actor get parent ( ) = = table ) actor remove ( ) ; actor = new actor ; if ( new actor ! = null ) table add actor ( new actor ) ; } return ( cell < a > ) this ; }


wait till all the recursive task for add replica to volume completed

private void wait for sub task to finish ( queue < recursive action > sub task queue , list < i o exception > exceptions ) throws i o exception { while ( ! sub task queue is empty ( ) ) { recursive action task = sub task queue poll ( ) ; if ( task ! = null ) { task join ( ) ; } } if ( ! exceptions is empty ( ) ) { throw multiple i o exception create i o exception ( exceptions ) ; } }


public void set data source ( data source data source ) { this data source = data source ; }


returns the unicode code point of the character at the given index unlike { @ link character # code point at ( char sequence , int ) } or { @ link string # code point at ( int ) } this method will never fail silently when encountering an invalid surrogate pair the behaviour of this method is as follows : if { @ code index > = end } , { @ link index out of bounds exception } is thrown < b > if the character at the specified index is not a surrogate , it is returned < b > if the first character was a high surrogate value , then an attempt is made to read the next character < b > if the end of the sequence was reached , the negated value of the trailing high surrogate is returned < b > < b > if the next character was a valid low surrogate , the code point value of the highlow surrogate pair is returned < b > if the next character was not a low surrogate value , then { @ link illegal argument exception } is thrown if the first character was a low surrogate value , { @ link illegal argument exception } is thrown

protected static int code point at ( char sequence seq , int index , int end ) { check not null ( seq ) ; if ( index < end ) { char c 1 = seq char at ( index + + ) ; if ( c 1 < character min high surrogate | | c 1 > character max low surrogate ) { / / fast path ( first test is probably all we need to do ) return c 1 ; } else if ( c 1 < = character max high surrogate ) { / / if the high surrogate was the last character , return its inverse if ( index = = end ) { return - c 1 ; } / / otherwise look for the low surrogate following it char c 2 = seq char at ( index ) ; if ( character is low surrogate ( c 2 ) ) { return character to code point ( c 1 , c 2 ) ; } throw new illegal argument exception ( " expected low surrogate but got char ' " + c 2 + " ' with value " + ( int ) c 2 + " at index " + index + " in ' " + seq + " ' " ) ; } else { throw new illegal argument exception ( " unexpected low surrogate character ' " + c 1 + " ' with value " + ( int ) c 1 + " at index " + ( index - 1 ) + " in ' " + seq + " ' " ) ; } } throw new index out of bounds exception ( " index exceeds specified range " ) ; }


fetch message queues of topic < code > topic < code > , to which we may sendpublish messages

public list < message queue > fetch publish message queues ( string topic ) throws m q client exception { return this default m q producer impl fetch publish message queues ( with namespace ( topic ) ) ; }


public future < update center job > deploy backup ( ) { jenkins get ( ) check permission ( jenkins administer ) ; update center uc = jenkins get ( ) get update center ( ) ; return uc add job ( uc new plugin downgrade job ( this , update site this , jenkins get authentication 2 ( ) ) ) ; }


revert a commit by deleting the file relies on retry code in filesystem

void revert commit ( string dest key , @ nullable bulk operation state operation state ) throws i o exception ;


public void configure ( configuration conf ) { this input file = conf get ( m r job config map input file ) ; }


invoked when a menu is no longer selected this is always preceeded by a menu selected invocation this is invoked prior to the process menu action if an action item is selected

public void menu deselected ( menu event e ) { }


get petfind by status : finds pets by status multiple status values can be provided with comma separated strings

default response entity < list < pet > > find pets by status ( list < string > status ) { get request ( ) if present ( request - > { for ( media type media type : media type parse media types ( request get header ( " accept " ) ) ) { if ( media type is compatible with ( media type value of ( " application / json " ) ) ) { string example string = " { \ " photo urls \ " : [ \ " photo urls \ " , \ " photo urls \ " ] , \ " name \ " : \ " doggie \ " , \ " id \ " : 0 , \ " category \ " : { \ " name \ " : \ " default - name \ " , \ " id \ " : 6 } , \ " tags \ " : [ { \ " name \ " : \ " name \ " , \ " id \ " : 1 } , { \ " name \ " : \ " name \ " , \ " id \ " : 1 } ] , \ " status \ " : \ " available \ " } " ; api util set example response ( request , " application / json " , example string ) ; break ; } if ( media type is compatible with ( media type value of ( " application / xml " ) ) ) { string example string = " < pet > < id > 123456789 < / id > < name > doggie < / name > < photo urls > < photo urls > aeiou < / photo urls > < / photo urls > < tags > < / tags > < status > aeiou < / status > < / pet > " ; api util set example response ( request , " application / xml " , example string ) ; break ; } } } ) ; return new response entity < > ( http status not implemented ) ; }


get the installed extension provider if the parse method has not yet been invoked , the default adapter will be returned

public elf load adapter get load adapter ( ) { return elf load adapter ; }


< code > optional aapt pb raw string raw str = 3 ; < code >

public com android aapt resources raw string get raw str ( ) { return raw str = = null ? com android aapt resources raw string get default instance ( ) : raw str ; }


helper method that encodes any of the register - list formats

private static void encode register list ( decoded instruction insn , code output out ) { out write ( code unit ( insn get opcode ( ) , make byte ( insn get e ( ) , insn get register count ( ) ) ) , insn get index unit ( ) , code unit ( insn get a ( ) , insn get b ( ) , insn get c ( ) , insn get d ( ) ) ) ; }


public single < user > rx get user by name ( string username , api client auth info auth info ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate get user by name ( username , auth info , fut ) ) ) ; }


assert that these fields sort in the same order no matter which order they start in

private static void assert sort consistently ( field a , field b , field c ) { field [ ] [ ] initial orderings = { { a , b , c } , { a , c , b } , { b , a , c } , { b , c , a } , { c , a , b } , { c , b , a } } ; set < list < field > > results = new hash set < list < field > > ( ) ; for ( field [ ] o : initial orderings ) { results add ( sort super types last ( arrays as list ( o ) ) ) ; } assert that ( results ) has size ( 1 ) ; }


returns the discrete domain for values of type { @ code integer }

public static discrete domain < integer > integers ( ) { return integer domain instance ; }


put spans with null endpoints first , so that their data can be attached to the first span with the same id and endpoint it is possible that a server can get the same request on a different port not addressing this

static int compare endpoint ( endpoint left , endpoint right ) { if ( left = = null ) { / / nulls first return ( right = = null ) ? 0 : - 1 ; } else if ( right = = null ) { return 1 ; } int by service = null safe compare to ( left service name ( ) , right service name ( ) , false ) ; if ( by service ! = 0 ) return by service ; int by ip v 4 = null safe compare to ( left ipv 4 ( ) , right ipv 4 ( ) , false ) ; if ( by ip v 4 ! = 0 ) return by ip v 4 ; return null safe compare to ( left ipv 6 ( ) , right ipv 6 ( ) , false ) ; }


manipulate this entity ' s headers with the given consumer the headers provided to the consumer are " live " , so that the consumer can be used to { @ linkplain http headers # set ( string , string ) overwrite } existing header values , { @ linkplain http headers # remove ( object ) remove } values , or use any of the other { @ link http headers } methods

b headers ( consumer < http headers > headers consumer ) ;


validate this setting against its dependencies , specified by { @ link # settings ( ) } this method allows validation logic to evaluate whether the setting will be present in the { @ link settings } after the update the default implementation does nothing , accepting any value as valid as long as it passes the validation in { @ link # validate ( object ) }

default void validate ( t value , map < setting < ? > , object > settings , boolean is present ) { }


public void get pet by id test ( ) { long pet id = null ; / / pet response = api get pet by id ( pet id ) ; / / assert not null ( response ) ; / / todo : test validations }


evaluates this guard ' s boolean condition this method is always called with the associated monitor already occupied implementations of this method must depend only on state protected by the associated monitor , and must not modify that state

public abstract boolean is satisfied ( ) ;


updates this map so that the given < code > key < code > maps to the given < code > value < code > if the map previously contained a mapping for < code > key < code > then that mapping is replaced and the previous value is returned

public v put ( k key , v value ) { process queue ( ) ; weak value < v > v = hash get ( key ) ; v old value = null ; if ( v ! = null ) { reverse hash remove ( v ) ; old value = v get ( ) ; } v = weak value create ( value , queue ) ; reverse hash put ( v , key ) ; hash put ( key , v ) ; return old value ; }


creates a launchable task for fenzo to process

private launchable mesos worker create launchable mesos worker ( protos task i d task i d ) { log debug ( " launchable mesos worker parameters : { } " , task manager parameters ) ; return new launchable mesos worker ( artifact server , task manager parameters , task manager container spec , task i d , mesos config ) ; }


@ test public void test left recursive rule ref with arg ( ) throws exception { string grammar = " grammar t ; \ n " + " statement \ n " + " locals [ scope scope ] \ n " + " : expression a [ $ scope ] ' ; ' \ n " + " ; \ n " + " expression a [ scope scope ] \ n " + " : atom [ $ scope ] \ n " + " | expression a [ $ scope ] ' [ ' expression a [ $ scope ] ' ] ' \ n " + " ; \ n " + " atom [ scope scope ] \ n " + " : ' dummy ' \ n " + " ; \ n " ; string expected = " error ( " + error type nonconforming lr rule code + " ) : t g 4 : 6 : 0 : rule expression a is left recursive but doesn ' t conform to a pattern antlr can handle \ n " ; test errors ( new string [ ] { grammar , expected } , false ) ; }


builds a uuid by repeating the given number n for valid n , it is guaranteed that the returned u u i ds satisfy the same relation relative to others as their parameter n does : iff n < m , then uuid for int ( n ) < uuid for int ( m )

public static uuid uuid for int ( final int n ) { return new uuid ( 0 , n ) ; }


find and add to class names , all classes within a jar file and the specified package which extend or implement the specified search class

private static void find classes in jar ( string jar filename , string pkg name , class < ? > search class , hash set < string > class names ) { try ( jar file jar file = new jar file ( jar filename ) ) { string pkg path = pkg name ! = null ? pkg name replace ( ' ' , jar file separator ) : " " ; if ( pkg path length ( ) > 0 ) { pkg path + = jar file separator ; } int last sep ix = pkg path length ( ) - 1 ; enumeration < jar entry > entries = jar file entries ( ) ; while ( entries has more elements ( ) ) { jar entry entry = entries next element ( ) ; string name = entry get name ( ) ; if ( ! name ends with ( " class " ) ) { continue ; / / file is not a class file } if ( ( last sep ix ! = - 1 & & name index of ( pkg path ) ! = 0 ) | | name last index of ( jar file separator ) ! = last sep ix ) { continue ; / / file not contained within specified package } string class name = create class name ( name , pkg name , jar file separator ) ; if ( ! class names contains ( class name ) ) { try { class < ? > c = class for name ( class name ) ; if ( is class of interest ( c , search class ) ) { class names add ( class name ) ; } } catch ( throwable t ) { continue ; } } } } catch ( i o exception e ) { / / system out println ( " search jar file : " + e ) ; return ; } }


public < t > t unwrap ( class < t > iface ) throws s q l exception { if ( iface is instance ( this ) ) { return ( t ) this ; } hikari pool p = pool ; if ( p ! = null ) { final data source unwrapped data source = p get unwrapped data source ( ) ; if ( iface is instance ( unwrapped data source ) ) { return ( t ) unwrapped data source ; } if ( unwrapped data source ! = null ) { return unwrapped data source unwrap ( iface ) ; } } throw new s q l exception ( " wrapped data source is not an instance of " + iface ) ; }


initiate a { @ code list objects } operation , incrementing metrics in the process

static object listing list objects ( final o b s file system owner , final list objects request request ) throws i o exception { if ( request get delimiter ( ) = = null & & request get marker ( ) = = null & & owner is fs bucket ( ) & & owner is obs client d f s list enable ( ) ) { return o b s fs d f s listing fs d f s list objects ( owner , request ) ; } return common list objects ( owner , request ) ; }


throw an s q l warning exception if encountering an actual warning

protected void handle warnings ( @ nullable s q l warning warning ) throws s q l warning exception { if ( warning ! = null ) { throw new s q l warning exception ( " warning not ignored " , warning ) ; } }


moves this file to the specified file , overwriting the file if it already exists @ throw gdx runtime exception if the source or destination file handle is a { @ link file type # classpath } or { @ link file type # internal } file

public void move to ( file handle dest ) { throw new gdx runtime exception ( " stub " ) ; }


creates a set of dummy tasks to enforce ordering among { @ link term milestone } s

public static task builder ordering ( ) { task graph builder b = new task graph builder ( ) ; term milestone [ ] v = values ( ) ; for ( int i = 0 ; i < v length - 1 ; i + + ) b add ( null , executable noop ) requires ( v [ i ] ) attains ( v [ i + 1 ] ) ; return b ; }


convert the given object to string with each line indented by 4 spaces ( except the first line )

private string to indented string ( object o ) { if ( o = = null ) { return " null " ; } return o to string ( ) replace ( " \ n " , " \ n " ) ; }


creates a { @ link dynamic table sink } from a { @ link catalog table } it considers { @ link catalog # get factory ( ) } if provided

public static dynamic table sink create table sink ( @ nullable catalog catalog , object identifier object identifier , catalog table catalog table , readable config configuration , class loader class loader , boolean is temporary ) { final default dynamic table context context = new default dynamic table context ( object identifier , catalog table , configuration , class loader , is temporary ) ; try { final dynamic table sink factory factory = get dynamic table factory ( dynamic table sink factory class , catalog , context ) ; return factory create dynamic table sink ( context ) ; } catch ( throwable t ) { throw new validation exception ( string format ( " unable to create a sink for writing table ' % s ' \ n \ n " + " table options are : \ n \ n " + " % s " , object identifier as summary string ( ) , catalog table get options ( ) entry set ( ) stream ( ) map ( e - > stringify option ( e get key ( ) , e get value ( ) ) ) sorted ( ) collect ( collectors joining ( " \ n " ) ) ) , t ) ; } }


creates a new builder with the given host and port

public static ok http channel builder for address ( string host , int port , channel credentials creds ) { return for target ( grpc util authority from host and port ( host , port ) , creds ) ; }


suspend the given transaction suspends transaction synchronization first , then delegates to the { @ code do suspend } template method

protected final suspended resources holder suspend ( @ nullable object transaction ) throws transaction exception { if ( transaction synchronization manager is synchronization active ( ) ) { list < transaction synchronization > suspended synchronizations = do suspend synchronization ( ) ; try { object suspended resources = null ; if ( transaction ! = null ) { suspended resources = do suspend ( transaction ) ; } string name = transaction synchronization manager get current transaction name ( ) ; transaction synchronization manager set current transaction name ( null ) ; boolean read only = transaction synchronization manager is current transaction read only ( ) ; transaction synchronization manager set current transaction read only ( false ) ; integer isolation level = transaction synchronization manager get current transaction isolation level ( ) ; transaction synchronization manager set current transaction isolation level ( null ) ; boolean was active = transaction synchronization manager is actual transaction active ( ) ; transaction synchronization manager set actual transaction active ( false ) ; return new suspended resources holder ( suspended resources , suspended synchronizations , name , read only , isolation level , was active ) ; } catch ( runtime exception | error ex ) { / / do suspend failed - original transaction is still active do resume synchronization ( suspended synchronizations ) ; throw ex ; } } else if ( transaction ! = null ) { / / transaction active but no synchronization active object suspended resources = do suspend ( transaction ) ; return new suspended resources holder ( suspended resources ) ; } else { / / neither transaction nor synchronization active return null ; } }


returns the value for the removed key , or null if the key is not in the map

public @ null v remove ( long key ) { if ( key = = 0 ) { if ( ! has zero value ) return null ; has zero value = false ; v old value = zero value ; zero value = null ; size - - ; return old value ; } int i = locate key ( key ) ; if ( i < 0 ) return null ; long [ ] key table = this key table ; v [ ] value table = this value table ; v old value = value table [ i ] ; int mask = this mask , next = i + 1 & mask ; while ( ( key = key table [ next ] ) ! = 0 ) { int placement = place ( key ) ; if ( ( next - placement & mask ) > ( i - placement & mask ) ) { key table [ i ] = key ; value table [ i ] = value table [ next ] ; i = next ; } next = next + 1 & mask ; } key table [ i ] = 0 ; value table [ i ] = null ; size - - ; return old value ; }


selects the source from which to fetch the images

private void select source ( final int source index ) { get instrumentation ( ) run on main sync ( new runnable ( ) { @ override public void run ( ) { m source select set selection ( source index , true ) ; } } ) ; }


returns a new char buffer identical to buf , except twice the capacity

private static char buffer grow ( char buffer buf ) { char [ ] copy = arrays copy of ( buf array ( ) , buf capacity ( ) * 2 ) ; char buffer bigger = char buffer wrap ( copy ) ; java 8 compatibility position ( bigger , buf position ( ) ) ; java 8 compatibility limit ( bigger , buf limit ( ) ) ; return bigger ; }


start registration and provide response entity

public response entity < object > start registration ( @ non null @ request param ( " username " ) final string username , @ non null @ request param ( " display name " ) final string display name , @ request param ( value = " credential nickname " , required = false , default value = string utils empty ) final string credential nickname , @ request param ( value = " require resident key " , required = false ) final boolean require resident key , @ request param ( value = " session token " , required = false , default value = string utils empty ) final string session token base 6 4 ) throws exception { val result = server start registration ( username , optional of ( display name ) , optional of nullable ( credential nickname ) , require resident key , optional of nullable ( session token base 6 4 ) map ( unchecked function ( byte array : : from base 6 4 url ) ) ) ; if ( result is right ( ) ) { return start response ( new start registration response ( result right ( ) get ( ) ) ) ; } return messages json ( response entity bad request ( ) , result left ( ) get ( ) ) ; }


gets the iteration aggregator registered under the given name the iteration aggregator combines all aggregates globally once per superstep and makes them available in the next superstep

public final < t extends aggregator < ? > > t get iteration aggregator ( string name ) { return this runtime context get iteration aggregator ( name ) ; }


fill the column vector with the provided value


create rs raw decoder according to configuration

public static raw erasure decoder create raw decoder ( configuration conf , string codec , erasure coder options coder options ) { preconditions check not null ( conf ) ; preconditions check not null ( codec ) ; return create raw decoder with fallback ( conf , codec , coder options ) ; }


public final toast utils set duration is long ( boolean is long ) { this is long = is long ; return this ; }


read in the jump table list for this function from xml

private void read jump table list x m l ( xml pull parser parser ) throws pcode x m l exception { xml element el = parser start ( " jumptablelist " ) ; while ( parser peek ( ) is start ( ) ) { jump table table = new jump table ( func get entry point ( ) get address space ( ) ) ; table restore xml ( parser , get address factory ( ) ) ; if ( ! table is empty ( ) ) { if ( jump tables = = null ) { jump tables = new array list < jump table > ( ) ; } jump tables add ( table ) ; } } parser end ( el ) ; }


returns all the files in crosstool is not a middleman

public nested set < artifact > get all files ( ) { return all files ; }


builds a cache which does not automatically load values when keys are requested consider { @ link # build ( cache loader ) } instead , if it is feasible to implement a { @ code cache loader } this method does not alter the state of this { @ code cache builder } instance , so it can be invoked again to create multiple independent caches

public < k1 extends k , v1 extends v > cache < k1 , v1 > build ( ) { check weight with weigher ( ) ; check non loading cache ( ) ; return new local cache local manual cache < > ( this ) ; }


subclasses should invoke this method to set the failure this method will return { @ code true } if the failure was successfully set , or { @ code false } if the data source has already been set , failed or closed if the failure was successfully set , state of the data source will be set to { @ link abstract data source data source status # failure } this will also notify the subscribers if the failure was successfully set do not call this method from a synchronized block as it invokes external code of the subscribers

protected boolean set failure ( throwable throwable ) { return set failure ( throwable , null ) ; }


post storeorder : place an order for a pet

com netflix hystrix hystrix command < response entity < order > > place order ( @ api param ( value = " order placed for purchasing the pet " , required = true ) @ valid @ request body order body ) ;


public void test initial state ( ) throws exception { min max avg stats mma = new min max avg stats ( ) ; assert equals ( 0 , mma get minimum ( ) ) ; assert equals ( 0 , mma get maximum ( ) ) ; assert equals ( 0 , mma get sum ( ) ) ; assert equals ( 0 , mma get count ( ) ) ; assert equals ( 0 , mma get average ( ) ) ; }


adds a bundled theme to the list , and mark it if it ' s the current theme

private static void add bundled theme ( final default action group group , final m t themeable theme , final m t themeable current , final icon our current action , final icon our not current action ) { final icon theme icon = theme get icon ( ) ! = null ? theme get icon ( ) : our not current action ; group add ( new dumb aware action ( theme get name ( ) , theme get editor colors scheme ( ) , theme = = current ? our current action : theme icon ) { @ override public void action performed ( @ not null final an action event e ) { / / install theme if not installed final m t theme facade external theme = m t themes install theme ( theme ) ; m t theme manager activate ( external theme , true ) ; m t analytics get instance ( ) track value ( m t analytics select theme , external theme ) ; } } ) ; }


the { @ link reservation list request } will use the reservation id to search for reservations to list if it is provided otherwise , it will select active reservations within the start time and end time ( inclusive )

public static reservation list request new instance ( string queue , string reservation id ) { return new instance ( queue , reservation id , - 1 , - 1 , false ) ; }


returns the original element list , unchanged

public iterable < entry < string , string > > order ( list < entry < string , string > > insertion order ) { return insertion order ; }


< code > repeated io netty example worldclock local time local time = 1 ; < code >

public io netty example worldclock world clock protocol local time builder add local time builder ( int index ) { return get local time field builder ( ) add builder ( index , io netty example worldclock world clock protocol local time get default instance ( ) ) ; }


create a return result set parameter sql out parameter depending on the support provided by the jdbc driver used for the database in use

public sql parameter create return result set parameter ( string parameter name , row mapper < ? > row mapper ) { call meta data provider provider = obtain meta data provider ( ) ; if ( provider is return result set supported ( ) ) { return new sql return result set ( parameter name , row mapper ) ; } else { if ( provider is ref cursor supported ( ) ) { return new sql out parameter ( parameter name , provider get ref cursor sql type ( ) , row mapper ) ; } else { throw new invalid data access api usage exception ( " return of a result set from a stored procedure is not supported " ) ; } } }


t deserialize ( byte [ ] message ) throws i o exception ;


gets an unsigned byte at the current { @ code reader index } and increases the { @ code reader index } by { @ code 1 } in this buffer

public abstract short read unsigned byte ( ) ;


specify one or more modules by class ( or class name in xml ) to be registered with the { @ link object mapper } modules specified here will be registered after spring ' s autodetection of jsr - 310 and joda - time , or jackson ' s finding of modules ( see { @ link # set find modules via service loader } ) , allowing to eventually override their configuration specify either this or { @ link # set modules } , not both

public final void set modules to install ( class < ? extends module > modules ) { this builder modules to install ( modules ) ; }


returns an array of { @ link method } containing the methods declared by the class represented by the supplied class

static public method [ ] get declared methods ( class c ) { com badlogic gwtref client method [ ] methods = reflection cache get type ( c ) get declared methods ( ) ; method [ ] result = new method [ methods length ] ; for ( int i = 0 , j = methods length ; i < j ; i + + ) { result [ i ] = new method ( methods [ i ] ) ; } return result ; }


same to { @ link # send ( message ) } with target message queue specified in addition

public send result send ( message msg , message queue mq ) throws m q client exception , remoting exception , m q broker exception , interrupted exception { msg set topic ( with namespace ( msg get topic ( ) ) ) ; return this default m q producer impl send ( msg , queue with namespace ( mq ) ) ; }