method called for merging an external that was added in latest and one that was added in my

private void merge latest and my for add conflict ( external location [ ] external locations , task monitor monitor ) throws cancelled exception { / / merge latest and my into the result external / / this is a merge of latest and my added externals , so every difference is a conflict int latest my changes = get basic external diffs ( external locations [ latest ] , external locations [ my ] ) ; int detail conflict flags = latest my changes & ( external namespace | external label | external address ) ; / / ( external namespace | external label | external source type | external address ) ; if ( ( detail conflict flags & external address ) ! = 0 ) { address latest address = external locations [ latest ] get address ( ) ; address my address = external locations [ my ] get address ( ) ; if ( latest address ! = null & & my address = = null ) { / / want to set the external to latest address , which it already is , so nothing to do detail conflict flags & = ~ external address ; / / turn off the address conflict flag } else if ( latest address = = null & & my address ! = null ) { / / set the external to my address merge external detail ( external address , external locations [ result ] , external locations [ my ] , monitor ) ; detail conflict flags & = ~ external address ; / / turn off the address conflict flag } } if ( detail conflict flags ! = 0 ) { save external detail conflict ( external locations , detail conflict flags ) ; } / / check data type vs function and for just data type differences address my external address = external locations [ my ] get external space address ( ) ; data type latest data type = get result data type ( external locations [ latest ] ) ; data type my data type = get result data type ( external locations [ my ] ) ; boolean latest has data type = ( latest data type ! = null ) & & ( latest data type ! = data type default ) ; boolean my has data type = ( my data type ! = null ) & & ( my data type ! = data type default ) ; boolean different data types = latest has data type & & my has data type & & ( latest my changes & external data type ) ! = 0 ; boolean latest is function = external locations [ latest ] is function ( ) ; boolean my is function = external locations [ my ] is function ( ) ; boolean different functions = latest is function & & my is function & & ( latest my changes & external function ) ! = 0 ; / / if the data types are different , then did a change to one conflict with a / / data type or function change to the other ? if ( different data types ) { / / conflict : both set the data type differently save external data type conflict ( my external address ) ; } if ( different functions ) { / / conflict : both created different functions determine detailed function conflicts ( external locations , monitor ) ; } if ( ( latest is function & & ! latest has data type & & ! my is function & & my has data type ) | | ( my is function & & ! my has data type & & ! latest is function & & latest has data type ) ) { / / conflict : latest is function and my is label with data type / / - or - my is function and latest is label with data type save external function versus data type conflict ( my external address ) ; } else { if ( my has data type & & ! latest has data type ) { / / auto merge my data type change replace external data type ( external locations [ result ] , external locations [ my ] , monitor ) ; } if ( my is function & & ! latest is function ) { / / auto merge my external function changes replace function ( external locations [ result ] , external locations [ my ] , get merge my ( ) , monitor ) ; } } }


public long get start time ( ) { return start time ; }


called when a session expiration update occurs , to inform the app about the change in expiration time

void on expiration update ( exo media drm media drm , byte [ ] session id , long expiration time ms ) ;


public int get time to live ( ) { return ( int ) time to live millis / 1000 ; }


changes the current animation by blending the new on top of the old during the transition time

protected animation desc animate ( final animation anim , float offset , float duration , int loop count , float speed , final animation listener listener , float transition time ) { return animate ( obtain ( anim , offset , duration , loop count , speed , listener ) , transition time ) ; }


get the { @ link token } instance associated with the value returned by { @ link # la la ( k ) } this method has the same pre - and post - conditions as { @ link int stream # la } in addition , when the preconditions of this method are met , the return value is non - null and the value of { @ code lt ( k ) get type ( ) = = la ( k ) }


public describable list < label atom property , label atom property descriptor > get properties ( ) { return properties ; }


create a orc vector from partition spec value see hive { @ code vectorized row batch ctx # add partition cols to batch }

private static column vector create hive vector from constant ( logical type type , object value , int batch size ) { switch ( type get type root ( ) ) { case char : case varchar : case binary : case varbinary : return create bytes vector ( batch size , value ) ; case boolean : return create long vector ( batch size , ( boolean ) value ? 1 : 0 ) ; case tinyint : case smallint : case integer : case bigint : return create long vector ( batch size , value ) ; case decimal : decimal type decimal type = ( decimal type ) type ; return create decimal vector ( batch size , decimal type get precision ( ) , decimal type get scale ( ) , value ) ; case float : case double : return create double vector ( batch size , value ) ; case date : if ( value instanceof local date ) { value = date value of ( ( local date ) value ) ; } return create long vector ( batch size , date to internal ( ( date ) value ) ) ; case timestamp without time zone : return timestamp util create vector from constant ( batch size , value ) ; default : throw new unsupported operation exception ( " unsupported type : " + type ) ; } }


checks an ast node denoting a class type against directtransitive dependencies

private void check type literal ( j c tree node , symbol sym ) { if ( sym = = null | | sym kind ! = kinds kind typ ) { return ; } path jar path = get jar path ( sym encl class ( ) , platform jars ) ; / / if this type symbol comes from a class file loaded from a jar , check / / whether that jar was a direct dependency and error out otherwise if ( jar path ! = null & & seen classes add ( sym encl class ( ) ) ) { collect explicit dependency ( jar path , node , sym ) ; } }


returns the minimal window covers both this window and the given window

public time window cover ( time window other ) { return new time window ( math min ( start , other start ) , math max ( end , other end ) ) ; }


get the substring except base name from path

private string path without base name ( ) { return base name ! = null ? path replace ( " / " + base name to lower case ( locale root ) , " " ) : path ; }


fill the current client - side stack trace into the given exception the given exception is typically thrown on the server and serialized as - is , with the client wanting it to contain the client - side portion of the stack trace as well what we can do here is to update the { @ code stack trace element } array with the current client - side stack trace , provided that we run on jdk 1 4 +

public static void fill in client stack trace if possible ( throwable ex ) { if ( ex ! = null ) { stack trace element [ ] client stack = new throwable ( ) get stack trace ( ) ; set < throwable > visited exceptions = new hash set < > ( ) ; throwable ex to update = ex ; while ( ex to update ! = null & & ! visited exceptions contains ( ex to update ) ) { stack trace element [ ] server stack = ex to update get stack trace ( ) ; stack trace element [ ] combined stack = new stack trace element [ server stack length + client stack length ] ; system arraycopy ( server stack , 0 , combined stack , 0 , server stack length ) ; system arraycopy ( client stack , 0 , combined stack , server stack length , client stack length ) ; ex to update set stack trace ( combined stack ) ; visited exceptions add ( ex to update ) ; ex to update = ex to update get cause ( ) ; } } }


get striped block group checksum ( md5 of crc32 )

void block group checksum ( striped block info striped block info , token < block token identifier > block token , long requested num bytes , block checksum options block checksum options ) throws i o exception ;


let ' s pretend people use crappy data , but only on the first hop

@ test public void merges when missing endpoints ( ) { list < span > trace = as list ( span new builder ( ) trace id ( " a " ) id ( " a " ) put tag ( " service " , " frontend " ) put tag ( " span kind " , " server " ) build ( ) , span new builder ( ) trace id ( " a " ) parent id ( " a " ) id ( " b " ) put tag ( " service " , " frontend " ) put tag ( " span kind " , " client " ) timestamp ( 1l ) build ( ) , span ( " a " , " a " , " b " , kind server , " backend " , null , true ) , span new builder ( ) trace id ( " a " ) parent id ( " a " ) id ( " b " ) duration ( 10l ) build ( ) ) ; assert that ( trace merge ( trace ) ) using field by field element comparator ( ) contains exactly in any order ( span new builder ( ) trace id ( " a " ) id ( " a " ) put tag ( " service " , " frontend " ) put tag ( " span kind " , " server " ) build ( ) , span new builder ( ) trace id ( " a " ) parent id ( " a " ) id ( " b " ) put tag ( " service " , " frontend " ) put tag ( " span kind " , " client " ) timestamp ( 1l ) duration ( 10l ) build ( ) , span ( " a " , " a " , " b " , kind server , " backend " , null , true ) ) ; }


public dynamo db client create amazon dynamo db ( final abstract dynamo db properties props ) { if ( props is local instance ( ) ) { logger debug ( " creating dynamo db standard client with endpoint [ { } ] and region [ { } ] " , props get endpoint ( ) , props get region ( ) ) ; return dynamo db client builder ( ) endpoint override ( new uri ( props get endpoint ( ) ) ) region ( region of ( props get region ( ) ) ) build ( ) ; } val provider = chaining a w s credentials provider get instance ( props get credential access key ( ) , props get credential secret key ( ) ) ; logger trace ( " creating dynamo db client configuration " ) ; val builder = dynamo db client builder ( ) ; amazon client configuration builder prepare client builder ( builder , provider , props ) ; return builder build ( ) ; }


return the phase in which this component will be started and stopped

public int get phase ( ) { return this phase ; }


returns this reference object ' s referent if this reference object has been cleared , either by the program or by the garbage collector , then this method returns { @ code null }


sets the order of the elements within a group for the given input

public void set group order ( int input num , ordering order ) { if ( input num = = 0 ) { this group order 1 = order ; } else if ( input num = = 1 ) { this group order 2 = order ; } else { throw new index out of bounds exception ( ) ; } }


public void last name test ( ) { / / todo : test last name }


populates a { @ link period } with data for the period at the specified index { @ link period # id } and { @ link period # uid } will be set to null

public final period get period ( int period index , period period ) { return get period ( period index , period , false ) ; }


visit a parse tree produced by the { @ code while } labeled alternative in { @ link painless parser # rstatement }

t visit while ( painless parser while context ctx ) ;


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


returns the number of sequences in the projected database

public int get support ( ) { return support ; }


return { @ code true } if this type contains generic parameters

public boolean has generics ( ) { return ( get generics ( ) length > 0 ) ; }


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


notifies that the node for { @ code sky key } has been evaluated { @ code state } indicates the new state of the node if the value builder threw an error when building this node , then { @ code value supplier get ( ) } evaluates to null

void evaluated ( sky key sky key , @ nullable sky value value , supplier < evaluation success state > evaluation success state , evaluation state state ) ;


returns the reverse of this ordering ; the { @ code ordering } equivalent to { @ link collections # reverse order ( comparator ) } < b > java 8 users : < b > use { @ code this comparator reversed ( ) } instead

public < s extends t > ordering < s > reverse ( ) { return new reverse ordering < s > ( this ) ; }


enables setting basic qos for the consumer channel only applicable to the { @ link r m q source } set to 0 for unlimited , which is the default

public builder set prefetch count ( int prefetch count ) { this prefetch count = prefetch count ; return this ; }


public long get pet id ( ) { return pet id ; }


execute a named query , binding one value to a " : " named parameter in the query string a named query is defined in a hibernate mapping file

list < ? > find by named query and named param ( string query name , string param name , object value ) throws data access exception ;


this method is called before this replication request is retried the first time

public void on retry ( ) { / / nothing by default }


pauses the thread this call is non - blocking

public void on pause ( ) { paused = true ; }


take a varargs list and and return as an array

private string [ ] l ( string s ) { return s ; }


to test watermark is monotonically incremental with randomized watermark producer parallelism = 2 ; kafka partition # = 3 ; consumer parallelism = 3

public void test watermark incremental ( ) throws exception { test watermark incremental ( 100000 ) ; }


public void registered service distributed cache kafka listener ( @ payload final distributed cache object < registered service > item ) { if ( ! item get publisher identifier ( ) get id ( ) equals ( publisher identifier get id ( ) ) ) { if ( ! delete object from cache ( item ) ) { cache manager update ( item get value ( ) , item , false ) ; } } }


adds a python dependency which could be py files , python packages ( zip , egg etc ) or local directories the dependencies will be added to the pythonpath of the python udf worker and the local py 4 j python client

private void add python file ( string file path ) { preconditions check not null ( file path ) ; string file key = generate unique file key ( python file prefix , file path ) ; register cached file if not exist ( file path , file key ) ; if ( ! internal config contains ( python files ) ) { internal config set ( python files , new hash map < > ( ) ) ; } internal config get ( python files ) put ( file key , new file ( file path ) get name ( ) ) ; }


only return traces where all { @ link span # timestamp ( ) } are at or after ( end ts - lookback ) in milliseconds defaults to end ts

public long lookback ( ) { return lookback ; }


determine if location corresponds to a reference destination

public boolean is reference destination ( ) { return reference class ! = null ; }


public static map < string , string > map ( string key , string val ) { map < string , string > map = new hash map < string , string > ( 1 ) ; map put ( key , val ) ; return map ; }


test for the case when the following submit application and administer queue a c ls are defined : root : ( all ) d : ( all ) d1 : ( none ) expected result : access to d1 will be permitted from queue d , so the user will be able to access queues root , d and d1

public void test queue acl restricted d 1 ( ) throws i o exception { update config with d and d 1 queues ( all acl , all acl , none acl ) ; check access ( true , true , true ) ; }


set if the qos values ( delivery mode , priority , time to live ) should be used for sending a message

public void set explicit qos enabled ( boolean explicit qos enabled ) { this explicit qos enabled = explicit qos enabled ; }


create dir listing metadata with two dirs and one file living in directory ' parent '

private static dir listing metadata make two dirs one file ( path parent ) { path metadata path meta 1 = new path metadata ( new s 3 a file status ( true , new path ( parent , " dir 1 " ) , test owner ) ) ; path metadata path meta 2 = new path metadata ( new s 3 a file status ( true , new path ( parent , " dir 2 " ) , test owner ) ) ; path metadata path meta 3 = new path metadata ( new s 3 a file status ( 123 , 456 , new path ( parent , " file 1 " ) , 8192 , test owner , test etag , test version id ) ) ; list < path metadata > listing = arrays as list ( path meta 1 , path meta 2 , path meta 3 ) ; return new dir listing metadata ( parent , listing , false ) ; }


performs an in - place selection to find the element which would appear at a given index in a dataset if it were sorted the following preconditions should hold : { @ code required } , { @ code from } , and { @ code to } should all be indexes into { @ code array } ; { @ code required } should be in the range [ { @ code from } , { @ code to } ] ; all the values with indexes in the range [ 0 , { @ code from } ) should be less than or equal to all the values with indexes in the range [ { @ code from } , { @ code to } ] ; all the values with indexes in the range ( { @ code to } , { @ code array length - 1 } ] should be greater than or equal to all the values with indexes in the range [ { @ code from } , { @ code to } ] this method will reorder the values with indexes in the range [ { @ code from } , { @ code to } ] such that all the values with indexes in the range [ { @ code from } , { @ code required } ) are less than or equal to the value with index { @ code required } , and all the values with indexes in the range ( { @ code required } , { @ code to } ] are greater than or equal to that value therefore , the value at { @ code required } is the value which would appear at that index in the sorted dataset

private static void select in place ( int required , double [ ] array , int from , int to ) { / / if we are looking for the least element in the range , we can just do a linear search for it / / ( we will hit this whenever we are doing quantile interpolation : our first selection finds / / the lower value , our second one finds the upper value by looking for the next least element ) if ( required = = from ) { int min = from ; for ( int index = from + 1 ; index < = to ; index + + ) { if ( array [ min ] > array [ index ] ) { min = index ; } } if ( min ! = from ) { swap ( array , min , from ) ; } return ; } / / let ' s play quickselect ! we ' ll repeatedly partition the range [ from , to ] containing the / / required element , as long as it has more than one element while ( to > from ) { int partition point = partition ( array , from , to ) ; if ( partition point > = required ) { to = partition point - 1 ; } if ( partition point < = required ) { from = partition point + 1 ; } } }


set the density of this fixture this will not automatically adjust the mass of the body you must call b 2 body : : reset mass data to update the body ' s mass

public void set density ( float density ) { fixture set density ( density ) ; }


write contents of this instance as credentials proto message to data output

void write proto ( data output out ) throws i o exception { credentials proto builder storage = credentials proto new builder ( ) ; for ( map entry < text , token < ? extends token identifier > > e : token map entry set ( ) ) { credentials k v proto builder kv = credentials k v proto new builder ( ) set alias bytes ( byte string copy from ( e get key ( ) get bytes ( ) , 0 , e get key ( ) get length ( ) ) ) set token ( protobuf helper proto from token ( e get value ( ) ) ) ; storage add tokens ( kv build ( ) ) ; } for ( map entry < text , byte [ ] > e : secret keys map entry set ( ) ) { credentials k v proto builder kv = credentials k v proto new builder ( ) set alias bytes ( byte string copy from ( e get key ( ) get bytes ( ) , 0 , e get key ( ) get length ( ) ) ) set secret ( byte string copy from ( e get value ( ) ) ) ; storage add secrets ( kv build ( ) ) ; } storage build ( ) write delimited to ( ( data output stream ) out ) ; }


applies this function to five inputs , or throws an exception if unable to do so any objects that are passed to { @ link deferred closer # eventually close ( closeable , executor ) closer eventually close ( ) } will be closed when the { @ link closing future } pipeline is done ( but not before this method completes ) , even if this method throws or the pipeline is cancelled

closing future < u > apply ( deferred closer closer , @ nullable decl v1 value 1 , @ nullable decl v2 value 2 , @ nullable decl v3 value 3 , @ nullable decl v4 value 4 , @ nullable decl v5 value 5 ) throws exception ;


cancels all tasks in the currently running group tasks in the group that have not yet started will never run and will immediately be put into the task results list the task monitor for the currently running task will be cancelled , but the task will continue to run until it checks the monitor

public void cancel running group ( g task group group ) { lock lock ( ) ; try { if ( group = = running group ) { group set cancelled ( ) ; if ( running task ! = null ) { running task get task monitor ( ) cancel ( ) ; } if ( suspended ) { process cancelled jobs in priority q ( ) ; } } } finally { lock unlock ( ) ; } }


returns the list of resource references currently registered under the cache entry if the list is empty , it returns an empty collection the returned collection is unmodifiable and a snapshot of the information at the time of the query the state may change after this query returns the caller should handle the situation that some or all of these resource references are no longer relevant

public collection < shared cache resource reference > get resource references ( string key ) { string interned = intern ( key ) ; synchronized ( interned ) { shared cache resource resource = cached resources get ( interned ) ; if ( resource = = null ) { return collections empty set ( ) ; } set < shared cache resource reference > refs = new hash set < shared cache resource reference > ( resource get resource references ( ) ) ; return collections unmodifiable set ( refs ) ; } }


create actions for parsing object files to generate a def file , should only be used when targeting windows

public static artifact create def file actions ( rule context rule context , artifact def parser , immutable list < artifact > object files , string dll name ) { artifact def file = rule context get bin artifact ( rule context get label ( ) get name ( ) + " gen " + iterables get only element ( cpp file types windows def file get extensions ( ) ) ) ; custom command line builder argv = new custom command line builder ( ) ; for ( artifact object file : object files ) { argv add dynamic string ( object file get exec path string ( ) ) ; } rule context register action ( new spawn action builder ( ) add inputs ( object files ) add output ( def file ) set executable ( def parser ) use default shell environment ( ) add command line ( custom command line builder ( ) add exec path ( def file ) add dynamic string ( dll name ) build ( ) ) add command line ( argv build ( ) , param file info builder ( parameter file parameter file type shell quoted ) set charset ( utf 8 ) set use always ( true ) build ( ) ) set mnemonic ( " def parser " ) build ( rule context ) ) ; return def file ; }


resources names of resources that have be deleted and to be removed from the mcp client removed resources for missing resources can be ignored < code > repeated string removed resources = 3 ; < code >

public com google protobuf protocol string list get removed resources list ( ) { return removed resources ; }


recursively evaluatesinterprets the starlark file at a given path and its transitive starlark dependencies using a fake build api and collects information about all rule definitions made in those files

private module recursive eval ( starlark semantics semantics , label label , list < rule info wrapper > rule info list , list < provider info wrapper > provider info list , list < aspect info wrapper > aspect info list , immutable map builder < label , string > module doc map ) throws interrupted exception , i o exception , label syntax exception , starlark evaluation exception { path path = path of label ( label , semantics ) ; if ( pending contains ( path ) ) { throw new starlark evaluation exception ( " cycle with " + path ) ; } else if ( loaded contains key ( path ) ) { return loaded get ( path ) ; } pending add ( path ) ; / / add fake build api immutable map builder < string , object > env = immutable map builder ( ) ; fake api add predeclared ( env , rule info list , provider info list , aspect info list ) ; add more predeclared ( env ) ; module module = module with predeclared ( semantics , env build ( ) ) ; / / parse & compile ( and get doc ) parser input input = get input source ( path to string ( ) ) ; program prog ; try { starlark file file = starlark file parse ( input , file options default ) ; module doc map put ( label , get module doc ( file ) ) ; prog = program compile file ( file , module ) ; } catch ( syntax error exception ex ) { event replay events on ( event handler , ex errors ( ) ) ; throw new starlark evaluation exception ( ex get message ( ) ) ; } / / process loads map < string , module > imports = new hash map < > ( ) ; for ( string load : prog get loads ( ) ) { label relative label = label get relative with remapping ( load , immutable map of ( ) ) ; try { module loaded module = recursive eval ( semantics , relative label , rule info list , provider info list , aspect info list , module doc map ) ; imports put ( load , loaded module ) ; } catch ( no such file exception no such file exception ) { throw new starlark evaluation exception ( string format ( " file % s imported ' % s ' , yet % s was not found , even at roots % s " , path , load , path of label ( relative label , semantics ) , dep roots ) , no such file exception ) ; } } / / execute try ( mutability mu = mutability create ( " skydoc " ) ) { starlark thread thread = new starlark thread ( mu , semantics ) ; / / we use the default print handler , which writes to stderr thread set loader ( imports : : get ) ; / / fake bazel ' s " export " hack , by which provider symbols / / bound to global variables take on the name of the global variable thread set post assign hook ( ( name , value ) - > { if ( value instanceof fake provider api ) { ( ( fake provider api ) value ) set name ( name ) ; } } ) ; starlark exec file program ( prog , module , thread ) ; } catch ( eval exception ex ) { throw new starlark evaluation exception ( ex get message with stack ( ) ) ; } pending remove ( path ) ; loaded put ( path , module ) ; return module ; }


the context exposes this metadata for use in the processor normally , they are set by the kafka streams framework , but for the purpose of driving unit tests , you can set it directly setting this attribute doesn ' t affect the others

public void set partition ( final int partition ) { this partition = partition ; }


query terms that contain " now " can trigger a query to not be cacheable this test checks the search context cacheable flag is updated accordingly

public void test caching strategies with now ( ) throws i o exception { / / if we hit all fields , this should contain a date field and should diable cachability string query = " now " + random alpha of length between ( 4 , 10 ) ; simple query string builder query builder = new simple query string builder ( query ) ; assert query cachability ( query builder , false ) ; / / if we hit a date field with " now " , this should diable cachability query builder = new simple query string builder ( " now " ) ; query builder field ( date field name ) ; assert query cachability ( query builder , false ) ; / / everything else is fine on all fields query = random from ( " no w " , " n ow " , " now " ) + " " + random alpha of length between ( 4 , 10 ) ; query builder = new simple query string builder ( query ) ; assert query cachability ( query builder , true ) ; }


test that collisions in the block id space are handled gracefully

public void test trigger block id collision ( ) throws i o exception { configuration conf = new hdfs configuration ( ) ; conf set int ( d f s config keys dfs replication key , 1 ) ; mini d f s cluster cluster = new mini d f s cluster builder ( conf ) num data nodes ( 1 ) build ( ) ; try { cluster wait active ( ) ; file system fs = cluster get file system ( ) ; f s namesystem fsn = cluster get namesystem ( ) ; final int block count = 10 ; / / create a file with a few blocks to rev up the global block id / / counter path path 1 = new path ( " test block id collision detection file 1 dat " ) ; d f s test util create file ( fs , path 1 , io size , block size * block count , block size , replication , seed ) ; list < located block > blocks 1 = d f s test util get all blocks ( fs , path 1 ) ; / / rewind the block id counter in the name system object this will result / / in block id collisions when we try to allocate new blocks sequential block id generator block id generator = fsn get block manager ( ) get block id manager ( ) get block id generator ( ) ; block id generator set current value ( block id generator get current value ( ) - 5 ) ; / / trigger collisions by creating a new file path path 2 = new path ( " test block id collision detection file 2 dat " ) ; d f s test util create file ( fs , path 2 , io size , block size * block count , block size , replication , seed ) ; list < located block > blocks 2 = d f s test util get all blocks ( fs , path 2 ) ; assert that ( blocks 2 size ( ) , is ( block count ) ) ; / / make sure that file 2 block i ds start immediately after file 1 assert that ( blocks 2 get ( 0 ) get block ( ) get block id ( ) , is ( blocks 1 get ( 9 ) get block ( ) get block id ( ) + 1 ) ) ; } finally { cluster shutdown ( ) ; } }


main entry point into the < code > blaze config < code > command its purpose is to parse all options , figure out what variation of the command that implies , run the right logic , and return the right exit code

public blaze command result exec ( command environment env , options parsing result options ) { immutable sorted map < build configuration value key , build configuration > configurations = find configurations ( env ) ; try ( print writer writer = new print writer ( new output stream writer ( env get reporter ( ) get out err ( ) get output stream ( ) , utf 8 ) ) ) { config options config command options = options get options ( config options class ) ; config command output formatter output formatter = config command options output type = = output type text ? new text output formatter ( writer ) : new json output formatter ( writer ) ; immutable sorted map < class < ? extends fragment > , immutable sorted set < class < ? extends fragment options > > > fragment defs = get fragment defs ( env get runtime ( ) get rule class provider ( ) ) ; if ( options get residue ( ) is empty ( ) ) { if ( config command options dump all ) { return report all configurations ( output formatter , for output ( configurations , fragment defs ) ) ; } else { return report configuration ids ( output formatter , for output ( configurations , fragment defs ) ) ; } } else if ( options get residue ( ) size ( ) = = 1 ) { string config hash = options get residue ( ) get ( 0 ) ; return report single configuration ( output formatter , env , for output ( configurations , fragment defs ) , config hash ) ; } else if ( options get residue ( ) size ( ) = = 2 ) { string config hash 1 = options get residue ( ) get ( 0 ) ; string config hash 2 = options get residue ( ) get ( 1 ) ; return report configuration diff ( configurations values ( ) , config hash 1 , config hash 2 , output formatter , env ) ; } else { string message = " too many config ids " ; env get reporter ( ) handle ( event error ( message ) ) ; return create failure result ( message , code too many config ids ) ; } } }


public test text prop view model title ( @ string res int string res , object format args ) { on mutation ( ) ; assigned attributes epoxy generated model set ( 0 ) ; title string attribute data set value ( string res , format args ) ; return this ; }


converts { @ code value } to a json document and writes it to { @ code out } unlike gson ' s similar { @ link gson # to json ( json element , appendable ) to json } method , this write is strict create a { @ link json writer # set lenient ( boolean ) lenient } { @ code json writer } and call { @ link # write ( com google gson stream json writer , object ) } for lenient writing

public final void to json ( writer out , t value ) throws i o exception { json writer writer = new json writer ( out ) ; write ( writer , value ) ; }


parses a clut definition segment , as defined by etsi en 300 743 7 2 4

private static clut definition parse clut definition ( parsable bit array data , int length ) { int clut id = data read bits ( 8 ) ; data skip bits ( 8 ) ; / / skip clut version number ( 4 ) , reserved ( 4 ) int remaining length = length - 2 ; int [ ] clut entries 2 bit = generate default 2 bit clut entries ( ) ; int [ ] clut entries 4 bit = generate default 4 bit clut entries ( ) ; int [ ] clut entries 8 bit = generate default 8 bit clut entries ( ) ; while ( remaining length > 0 ) { int entry id = data read bits ( 8 ) ; int entry flags = data read bits ( 8 ) ; remaining length - = 2 ; int [ ] clut entries ; if ( ( entry flags & 0x 8 0 ) ! = 0 ) { clut entries = clut entries 2 bit ; } else if ( ( entry flags & 0x 4 0 ) ! = 0 ) { clut entries = clut entries 4 bit ; } else { clut entries = clut entries 8 bit ; } int y ; int cr ; int cb ; int t ; if ( ( entry flags & 0x 0 1 ) ! = 0 ) { y = data read bits ( 8 ) ; cr = data read bits ( 8 ) ; cb = data read bits ( 8 ) ; t = data read bits ( 8 ) ; remaining length - = 4 ; } else { y = data read bits ( 6 ) < < 2 ; cr = data read bits ( 4 ) < < 4 ; cb = data read bits ( 4 ) < < 4 ; t = data read bits ( 2 ) < < 6 ; remaining length - = 2 ; } if ( y = = 0x 0 0 ) { cr = 0x 0 0 ; cb = 0x 0 0 ; t = 0x f f ; } int a = ( byte ) ( 0x f f - ( t & 0x f f ) ) ; int r = ( int ) ( y + ( 1 40200 * ( cr - 128 ) ) ) ; int g = ( int ) ( y - ( 0 34414 * ( cb - 128 ) ) - ( 0 71414 * ( cr - 128 ) ) ) ; int b = ( int ) ( y + ( 1 77200 * ( cb - 128 ) ) ) ; clut entries [ entry id ] = get color ( a , util constrain value ( r , 0 , 255 ) , util constrain value ( g , 0 , 255 ) , util constrain value ( b , 0 , 255 ) ) ; } return new clut definition ( clut id , clut entries 2 bit , clut entries 4 bit , clut entries 8 bit ) ; }


protected void print request ( mock http servlet request request ) throws exception { string body = ( request get character encoding ( ) ! = null ? request get content as string ( ) : missing character encoding ) ; this printer print value ( " http method " , request get method ( ) ) ; this printer print value ( " request uri " , request get request u r i ( ) ) ; this printer print value ( " parameters " , get params multi value map ( request ) ) ; this printer print value ( " headers " , get request headers ( request ) ) ; this printer print value ( " body " , body ) ; this printer print value ( " session attrs " , get session attributes ( request ) ) ; }


asynchronously resolves any necessary information to authorize the given user ( s ) this could include retrieval of permissions from an index or external system

void resolve authorization info ( request info request info , action listener < authorization info > listener ) ;


perform actual closing of the hibernate session , catching and logging any cleanup exceptions thrown

public static void close session ( @ nullable session session ) { if ( session ! = null ) { try { session close ( ) ; } catch ( throwable ex ) { logger error ( " failed to release hibernate session " , ex ) ; } } }


clear { @ linkplain # get concurrent result ( ) concurrent result } and { @ linkplain # get concurrent result context ( ) concurrent result context }

public void clear concurrent result ( ) { synchronized ( web async manager this ) { this concurrent result = result none ; this concurrent result context = null ; } }


public record reader < long writable , int writable > create record reader ( input split generic , task attempt context context ) { final bbp split split = ( bbp split ) generic ; / / return a record reader return new record reader < long writable , int writable > ( ) { boolean done = false ; public void initialize ( input split split , task attempt context context ) { } public boolean next key value ( ) { / / each record only contains one key return ! done ? done = true : false ; } public long writable get current key ( ) { return new long writable ( split get offset ( ) ) ; } public int writable get current value ( ) { return new int writable ( ( int ) split get length ( ) ) ; } public float get progress ( ) { return done ? 1f : 0f ; } public void close ( ) { } } ; }


returns the difference of this float value and the given specific float value

public float value subtract ( specific float value other ) { return subtract ( ( float value ) other ) ; }


returns the open a p i type for the property

public string get schema type ( schema p ) { string open a p i type = super get schema type ( p ) ; string type ; / / this maps , for example , long - > long based on hashes in this type ' s constructor if ( type mapping contains key ( open a p i type ) ) { type = type mapping get ( open a p i type ) ; if ( language specific primitives contains ( type ) ) { return type ; } } else { type = open a p i type ; } / / model / object return to model name ( type ) ; }


creates a new builder object for { @ link generator metadata }

public static builder new builder ( ) { return new builder ( ) ; }


public map < string , list < integer > > get map array integer ( ) { return map array integer ; }


public void test zlib sequence file ( ) throws exception { log info ( " testing sequence file with default codec " ) ; compressed seq file test ( new default codec ( ) ) ; log info ( " successfully tested sequence file with default codec " ) ; }


approximate width of geohash tile for a specific precision in degrees

public static double lon width in degrees ( int precision ) { return precision to lon width [ precision ] ; }


convert an under construction block to complete

void convert to complete block ( ) { assert get block u c state ( ) ! = block u c state complete : " trying to convert a complete block " ; uc = null ; }


clients should override this method only if the post - processed bitmap has to be of a different size than the source bitmap if the post - processed bitmap is of the same size , clients should override one of the other two methods the source bitmap must not be modified as it may be shared by the other clients the implementation must create a new bitmap that is safe to be modified and return a reference to it clients should use < code > bitmap factory < code > to create a new bitmap

public closeable reference < bitmap > process ( bitmap source bitmap , platform bitmap factory bitmap factory ) { final bitmap config source bitmap config = source bitmap get config ( ) ; closeable reference < bitmap > dest bitmap ref = bitmap factory create bitmap internal ( source bitmap get width ( ) , source bitmap get height ( ) , source bitmap config ! = null ? source bitmap config : fallback bitmap configuration ) ; try { process ( dest bitmap ref get ( ) , source bitmap ) ; return dest bitmap ref clone ( ) ; } finally { closeable reference close safely ( dest bitmap ref ) ; } }


public boolean is full mask ( ) { if ( offset ! = 0 ) { return false ; } for ( byte element : mask ) { if ( element ! = ( byte ) 0xff ) { return false ; } } return true ; }


set the parallax header of the recyclerview

public void set parallax header ( view header ) { m header = new custom relative wrapper ( header get context ( ) ) ; m header set layout params ( new view group layout params ( view group layout params wrap content , view group layout params wrap content ) ) ; m header add view ( header , new relative layout layout params ( view group layout params match parent , view group layout params match parent ) ) ; is parallax header = true ; }


converts name to valid database name produced name must be used with backticks only , eg ` database name `

public string to database name ( string name ) { string identifier = to identifier ( name , database name prefix , database name suffix ) ; if ( identifier length ( ) > identifier max length ) { logger warn ( " database name too long name ' " + name + " ' will be truncated " ) ; identifier = identifier substring ( 0 , identifier max length ) ; } return identifier ; }


returns whether { @ code new element } hasn ' t been seen before at depth less than or equal to { @ code depth } by { @ link # unique at depth less than or equal to ( t , int ) } or { @ link # unique at depth less than or equal to ( iterable , int ) } please note the difference between this method and { @ link # unique at depth less than or equal to ( t , int ) } ! this method is inherently racy wrt { @ link # unique at depth less than or equal to ( t , int ) } and { @ link # unique at depth less than or equal to ( iterable , int ) } only use it if you know what you are doing

boolean unique at depth less than or equal to pure ( t new element , int depth ) ;


returns a newly inserted { @ code loading value reference } , or null if the live value reference is already loading

loading value reference < k , v > insert loading value reference ( final k key , final int hash , boolean check time ) { reference entry < k , v > e = null ; lock ( ) ; try { long now = map ticker read ( ) ; pre write cleanup ( now ) ; atomic reference array < reference entry < k , v > > table = this table ; int index = hash & ( table length ( ) - 1 ) ; reference entry < k , v > first = table get ( index ) ; / / look for an existing entry for ( e = first ; e ! = null ; e = e get next ( ) ) { k entry key = e get key ( ) ; if ( e get hash ( ) = = hash & & entry key ! = null & & map key equivalence equivalent ( key , entry key ) ) { / / we found an existing entry value reference < k , v > value reference = e get value reference ( ) ; if ( value reference is loading ( ) | | ( check time & & ( now - e get write time ( ) < map refresh nanos ) ) ) { / / refresh is a no - op if loading is pending / / if check time , we want to check * after * acquiring the lock if refresh still needs / / to be scheduled return null ; } / / continue returning old value while loading + + mod count ; loading value reference < k , v > loading value reference = new loading value reference < > ( value reference ) ; e set value reference ( loading value reference ) ; return loading value reference ; } } + + mod count ; loading value reference < k , v > loading value reference = new loading value reference < > ( ) ; e = new entry ( key , hash , first ) ; e set value reference ( loading value reference ) ; table set ( index , e ) ; return loading value reference ; } finally { unlock ( ) ; post write cleanup ( ) ; } }


resolves all type variables in { @ code type } and all downstream types and returns a corresponding type with type variables resolved

public type resolve type ( type type ) { check not null ( type ) ; if ( type instanceof type variable ) { return type table resolve ( ( type variable < ? > ) type ) ; } else if ( type instanceof parameterized type ) { return resolve parameterized type ( ( parameterized type ) type ) ; } else if ( type instanceof generic array type ) { return resolve generic array type ( ( generic array type ) type ) ; } else if ( type instanceof wildcard type ) { return resolve wildcard type ( ( wildcard type ) type ) ; } else { / / if class < ? > , no resolution needed , we are done return type ; } }


public static pattern check cors setting for regex ( string cors setting ) { if ( cors setting = = null ) { return null ; } int len = cors setting length ( ) ; boolean is regex = len > 2 & & cors setting starts with ( " / " ) & & cors setting ends with ( " / " ) ; if ( is regex ) { return pattern compile ( cors setting substring ( 1 , cors setting length ( ) - 1 ) ) ; } return null ; }


get the state store given the store name

< s extends state store > s get state store ( final string name ) ;


public time value get bucket span ( ) { return bucket span ; }


a sensible definition of { @ link # tail set ( object ) } in terms of the { @ link # tail set ( object , boolean ) } method if you override { @ link # tail set ( object , boolean ) } , you may wish to override { @ link # tail set ( object ) } to forward to this implementation

protected sorted set < e > standard tail set ( e from element ) { return tail set ( from element , true ) ; }


encoding overhead is brackets and a comma for each span over 1

@ override public int list size in bytes ( list < byte [ ] > values ) { int size in bytes = 2 ; / / brackets for ( int i = 0 , length = values size ( ) ; i < length ; ) { size in bytes + = values get ( i + + ) length ; if ( i < length ) size in bytes + + ; } return size in bytes ; }


get the default statck data ref type for the specified code - unitop index and register

public static ref type get default register ref type ( code unit cu , register reg , int op index ) { ref type rt = ref type data ; if ( cu instanceof instruction ) { instruction instr = ( instruction ) cu ; object [ ] objs = instr get result objects ( ) ; for ( object obj : objs ) { if ( reg = = obj ) { rt = ref type write ; break ; } } objs = instr get input objects ( ) ; for ( object obj : objs ) { if ( reg = = obj ) { rt = ( rt = = ref type write ) ? ref type read write : ref type read ; break ; } } } return rt ; }


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 " ) ; }


this operation is not supported i could implement this using the cached edges , but that may not be semantically , what a path computation algorithm actually requires instead , i will assume the algorithm only explores the graph in the same direction as its edges if not , i will hear about it quickly

public collection < edge > get in edges ( vertex v ) { throw new unsupported operation exception ( " does not support backward traversal " ) ; }


look up the session factory that this filter should use the default implementation looks for a bean with the specified name in spring ' s root application context

protected session factory lookup session factory ( ) { if ( logger is debug enabled ( ) ) { logger debug ( " using session factory ' " + get session factory bean name ( ) + " ' for open session in view filter " ) ; } web application context wac = web application context utils get required web application context ( get servlet context ( ) ) ; return wac get bean ( get session factory bean name ( ) , session factory class ) ; }


notifies the sampler that a { @ link video frame release time helper } is observing { @ link # sampled vsync time ns } , and hence that the value should be periodically updated

public void add observer ( ) { handler send empty message ( msg add observer ) ; }


creates a new symbol path composed of the list of names in this path followed by the list of names in the given path

public symbol path append ( symbol path path ) { list < string > list = as list ( ) ; list add all ( path as list ( ) ) ; return new symbol path ( list ) ; }


observable < model api response > upload file with required file ( @ retrofit 2 http path ( " pet id " ) long pet id , @ retrofit 2 http part multipart body part required file , @ retrofit 2 http part ( " additional metadata " ) string additional metadata ) ;


public void test model 2 0 0 response ( ) { / / todo : test model 2 0 0 response }


done here so can be handled in a separate thread

private void handle apply ( ) { / / get the data model as an array of strings string [ ] user plugin paths = get user plugin paths ( ) ; / / update ghidra preferences with new paths preferences set plugin paths ( user plugin paths ) ; error msg = null ; / / save the new values if ( preferences store ( ) ) { set status message ( " saved plugin paths successfully ! " ) ; / / indicate to user all changes have been applied set apply enabled ( false ) ; msg show info ( get class ( ) , root panel , " restart ghidra " , " you must restart ghidra in order \ n " + " for path changes to take effect " ) ; } else { set status message ( " " ) ; msg show error ( this , root panel , " error saving plugin paths " , " failed to update user preferences ( see log for details ) " ) ; } }


test that ignore malformed parameter correctly parses

public void test ignore malformed parsing ( ) throws i o exception { document mapper default mapper = create document mapper ( field mapping ( b - > { b field ( " type " , " shape " ) ; b field ( " ignore malformed " , true ) ; } ) ) ; mapper field mapper = default mapper mappers ( ) get mapper ( field name ) ; assert that ( field mapper , instance of ( shape field mapper class ) ) ; boolean ignore malformed = ( ( shape field mapper ) field mapper ) ignore malformed ( ) ; assert that ( ignore malformed , equal to ( true ) ) ; / / explicit false ignore malformed test default mapper = create document mapper ( field mapping ( b - > { b field ( " type " , " shape " ) ; b field ( " ignore malformed " , false ) ; } ) ) ; field mapper = default mapper mappers ( ) get mapper ( field name ) ; assert that ( field mapper , instance of ( shape field mapper class ) ) ; ignore malformed = ( ( shape field mapper ) field mapper ) ignore malformed ( ) ; assert that ( ignore malformed , equal to ( false ) ) ; }


public void test outer enum integer ( ) { / / todo : test outer enum integer }


assert that a tag cloud contains label name and weight

public void assert that cloud label ( boolean contains , tag cloud < label atom > tag cloud , string expected label , int expected weight ) { string builder contains failure message = new string builder ( ) append ( " unable to find label cloud expected : [ " ) append ( expected label ) append ( " , " ) append ( expected weight ) append ( " ] " ) append ( " actual : [ " ) ; for ( tag cloud entry entry : tag cloud ) { if ( expected label equals ( ( ( label atom ) entry item ) get name ( ) ) ) { if ( expected weight = = entry weight ) { if ( ! contains ) { fail ( " cloud label should not contain [ " + expected label + " , " + expected weight + " ] " ) ; } else { return ; } } } / / gather information for failure message just in case contains failure message append ( " { " ) append ( entry item to string ( ) ) append ( " , " ) append ( entry weight ) append ( " } " ) ; } / / if a label should be part of the cloud label then fail if ( contains ) { fail ( contains failure message to string ( ) + " ] " ) ; } }


determine whether the given attribute is eligible for being turned into a corresponding bean property value the default implementation considers any attribute as eligible , except for the " id " attribute

protected boolean is eligible attribute ( string attribute name ) { return ! id attribute equals ( attribute name ) ; }


de - serializes metrics from the given byte array and returns them as a list of { @ link metric dump }

public list < metric dump > deserialize ( metric dump serialization metric serialization result data ) { data input view counters input view = new data input deserializer ( data serialized counters , 0 , data serialized counters length ) ; data input view gauges input view = new data input deserializer ( data serialized gauges , 0 , data serialized gauges length ) ; data input view meters input view = new data input deserializer ( data serialized meters , 0 , data serialized meters length ) ; data input view histograms input view = new data input deserializer ( data serialized histograms , 0 , data serialized histograms length ) ; list < metric dump > metrics = new array list < > ( data num counters + data num gauges + data num meters + data num histograms ) ; for ( int x = 0 ; x < data num counters ; x + + ) { try { metrics add ( deserialize counter ( counters input view ) ) ; } catch ( exception e ) { log debug ( " failed to deserialize counter " , e ) ; } } for ( int x = 0 ; x < data num gauges ; x + + ) { try { metrics add ( deserialize gauge ( gauges input view ) ) ; } catch ( exception e ) { log debug ( " failed to deserialize gauge " , e ) ; } } for ( int x = 0 ; x < data num meters ; x + + ) { try { metrics add ( deserialize meter ( meters input view ) ) ; } catch ( exception e ) { log debug ( " failed to deserialize meter " , e ) ; } } for ( int x = 0 ; x < data num histograms ; x + + ) { try { metrics add ( deserialize histogram ( histograms input view ) ) ; } catch ( exception e ) { log debug ( " failed to deserialize histogram " , e ) ; } } return metrics ; }


draws an area from another pixmap to this pixmap

public void draw pixmap ( pixmap pixmap , int x , int y , int srcx , int srcy , int src width , int src height ) { this pixmap draw pixmap ( pixmap pixmap , srcx , srcy , x , y , src width , src height ) ; }


saves the state to a stream ( that is , serializes it ) @ serial data the length of the array is emitted ( int ) , followed by all of its elements ( each a { @ code double } ) in the proper order

private void write object ( java io object output stream s ) throws java io i o exception { s default write object ( ) ; / / write out array length int length = length ( ) ; s write int ( length ) ; / / write out all elements in the proper order for ( int i = 0 ; i < length ; i + + ) { s write double ( get ( i ) ) ; } }


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


finds the type parameter for the given class

public static class < ? > get type parameter ( class < ? > klass ) { return get type parameter ( klass , object class ) ; }


key < provider < t > > provider key ( ) { return of type ( type literal provider type ( ) ) ; }


flush all active output channels , including { @ code system err } , so as to stay in sync with any jre log messages

private void flush ( ) { if ( out ! = null ) { out flush ( ) ; } else { system out flush ( ) ; } system err flush ( ) ; }


creates a new { @ link d w a r f source info } instance from the supplied { @ link d i e aggregate } if the info is present , otherwise returns null ;

public static d w a r f source info create ( d i e aggregate diea ) { int file num = ( int ) diea get unsigned long ( d w a r f attribute dw at decl file , - 1 ) ; int line num = ( int ) diea get unsigned long ( d w a r f attribute dw at decl line , - 1 ) ; return ( file num ! = - 1 & & line num ! = - 1 ) ? new d w a r f source info ( diea get compilation unit ( ) get compile unit ( ) get file by index ( file num ) , line num ) : null ; }


returns { @ code true } if a { @ link attribute key } exists for the given { @ code name }

public boolean exists ( string name ) { check not null and not empty ( name ) ; return constants contains key ( name ) ; }


tests the behaviour of the leader retrieval handler under the following conditions 1 no gateway resolved - - > service unavailable 2 leader gateway

public void test leader retrieval gateway ( ) throws exception { final string rest path = " / testing " ; final configuration configuration = new configuration ( ) ; final router router = new router ( ) ; final time timeout = time seconds ( 10l ) ; final completable future < restful gateway > gateway future = new completable future < > ( ) ; final gateway retriever < restful gateway > gateway retriever = ( ) - > gateway future ; final restful gateway gateway = new testing restful gateway builder ( ) build ( ) ; final testing handler testing handler = new testing handler ( gateway retriever , timeout ) ; router add get ( rest path , testing handler ) ; web frontend bootstrap bootstrap = new web frontend bootstrap ( router , log , null , null , " localhost " , 0 , configuration ) ; try ( http test client http client = new http test client ( " localhost " , bootstrap get server port ( ) ) ) { / / 1 no leader gateway available - - > service unavailable http client send get request ( rest path , future utils to duration ( timeout ) ) ; http test client simple http response response = http client get next response ( future utils to duration ( timeout ) ) ; assert assert equals ( http response status service unavailable , response get status ( ) ) ; / / 2 with leader gateway future complete ( gateway ) ; http client send get request ( rest path , future utils to duration ( timeout ) ) ; response = http client get next response ( future utils to duration ( timeout ) ) ; assert assert equals ( http response status ok , response get status ( ) ) ; assert assert equals ( response message , response get content ( ) ) ; } finally { bootstrap shutdown ( ) ; } }


writes out the args using parameter file , returns the output broken down as lines

private static immutable list < string > to param file ( args args ) throws exception { byte [ ] bytes ; try ( byte array output stream output stream = new byte array output stream ( ) ) { parameter file write parameter file ( output stream , args build ( ) arguments ( ) , args get parameter file type ( ) , utf 8 ) ; bytes = output stream to byte array ( ) ; } try ( byte array input stream input stream = new byte array input stream ( bytes ) ; input stream reader reader = new input stream reader ( input stream , utf 8 ) ) { return immutable list copy of ( char streams read lines ( reader ) ) ; } }


construct a lite pal d b instance from the default configuration by litepal xml but database name must be different than the default

public static lite pal d b from default ( string db name ) { lite pal config config = lite pal parser parse lite pal configuration ( ) ; lite pal d b lite pal d b = new lite pal d b ( db name , config get version ( ) ) ; lite pal d b set storage ( config get storage ( ) ) ; lite pal d b set class names ( config get class names ( ) ) ; return lite pal d b ; }


flag setting echo char for this password field

public boolean is echo char is set ( ) { return echo char is set ; }


removes the dsa params headers that open s s l adds to dsa private keys as the information in them is redundant

private static buffered reader remove dsa headers ( buffered reader b reader ) throws i o exception { string line = b reader read line ( ) ; while ( line ! = null ) { if ( openssl dsa params footer equals ( line trim ( ) ) ) { break ; } line = b reader read line ( ) ; } if ( null = = line | | openssl dsa params footer equals ( line trim ( ) ) = = false ) { throw new i o exception ( " malformed pem file , dsa parameters footer is missing " ) ; } / / verify that the key starts with the correct header before passing it to parse open ssl dsa if ( openssl dsa header equals ( b reader read line ( ) ) = = false ) { throw new i o exception ( " malformed pem file , dsa key header is missing " ) ; } return b reader ; }


returns the { @ link open ssl key material provider } that should be used for open s s l depending on the given { @ link key manager factory } this may cache the { @ link open ssl key material } for better performance if it can ensure that the same material is always returned for the same alias

static open ssl key material provider provider for ( key manager factory factory , string password ) { if ( factory instanceof open ssl x 5 0 9 key manager factory ) { return ( ( open ssl x 5 0 9 key manager factory ) factory ) new provider ( ) ; } if ( factory instanceof open ssl caching x 5 0 9 key manager factory ) { / / the user explicit used open ssl caching x 5 0 9 key manager factory which signals us that its fine to cache return ( ( open ssl caching x 5 0 9 key manager factory ) factory ) new provider ( password ) ; } / / we can not be sure if the material may change at runtime so we will not cache it return new open ssl key material provider ( choose x 5 0 9 key manager ( factory get key managers ( ) ) , password ) ; }


we need to be aware of changes to the program that could result in scalars being addedremoved when this happens we want to update the appropriate providers

public void domain object changed ( domain object changed event ev ) { if ( ev contains event ( domain object do object restored ) | | ev contains event ( change manager docr code added ) | | ev contains event ( change manager docr code removed ) ) { reload update mgr update ( ) ; } }


draws the grid line at the specified position using the provided path

protected void draw grid line ( canvas c , float x , float y , path grid line path ) { grid line path move to ( x , m view port handler content bottom ( ) ) ; grid line path line to ( x , m view port handler content top ( ) ) ; / / draw a path because lines don ' t support dashing on lower android versions c draw path ( grid line path , m grid paint ) ; grid line path reset ( ) ; }


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 " ) ; }


set whether overloaded methods should be enabled for remote invocations default is " false "

public void set overload enabled ( boolean overload enabled ) { this proxy factory set overload enabled ( overload enabled ) ; }


waits for the { @ link service } to reach the { @ linkplain state # running running state } for no more than the given time

default void await running ( duration timeout ) throws timeout exception { await running ( to nanos saturated ( timeout ) , time unit nanoseconds ) ; }


com netflix hystrix hystrix command < response entity < void > > update pet ( @ api param ( value = " pet object that needs to be added to the store " , required = true ) @ valid @ request body pet body ) ;


applies the given visitor to all type path elements

public void type path infos accept ( clazz clazz , field field , type path info visitor type path visitor ) { for ( int index = 0 ; index < type path length ; index + + ) { / / we don ' t need double dispatching here , since there is only one / / type of type path info type path visitor visit type path info ( clazz , field , this , type path [ index ] ) ; } }


configures a failure handling strategy in case a request to elasticsearch fails this strategy throws an exception if a request fails and thus causes a job failure

public elasticsearch failure handler fail ( ) { internal properties put string ( connector failure handler , elasticsearch validator connector failure handler value fail ) ; return this ; }


static public void dump info ( string file , print stream out , configuration conf ) throws i o exception { final int max key sample len = 16 ; path path = new path ( file ) ; file system fs = path get file system ( conf ) ; long length = fs get file status ( path ) get len ( ) ; f s data input stream fsdis = fs open ( path ) ; t file reader reader = new t file reader ( fsdis , length , conf ) ; try { linked hash map < string , string > properties = new linked hash map < string , string > ( ) ; int block cnt = reader reader b c f get block count ( ) ; int meta blk cnt = reader reader b c f meta index index size ( ) ; properties put ( " b c file version " , reader reader b c f version to string ( ) ) ; properties put ( " t file version " , reader tfile meta version to string ( ) ) ; properties put ( " file length " , long to string ( length ) ) ; properties put ( " data compression " , reader reader b c f get default compression name ( ) ) ; properties put ( " record count " , long to string ( reader get entry count ( ) ) ) ; properties put ( " sorted " , boolean to string ( reader is sorted ( ) ) ) ; if ( reader is sorted ( ) ) { properties put ( " comparator " , reader get comparator name ( ) ) ; } properties put ( " data block count " , integer to string ( block cnt ) ) ; long data size = 0 , data size uncompressed = 0 ; if ( block cnt > 0 ) { for ( int i = 0 ; i < block cnt ; + + i ) { block region region = reader reader b c f data index get block region list ( ) get ( i ) ; data size + = region get compressed size ( ) ; data size uncompressed + = region get raw size ( ) ; } properties put ( " data block bytes " , long to string ( data size ) ) ; if ( ! reader reader b c f get default compression name ( ) equals ( " none " ) ) { properties put ( " data block uncompressed bytes " , long to string ( data size uncompressed ) ) ; properties put ( " data block compression ratio " , string format ( " 1 : % 1f " , ( double ) data size uncompressed / data size ) ) ; } } properties put ( " meta block count " , integer to string ( meta blk cnt ) ) ; long meta size = 0 , meta size uncompressed = 0 ; if ( meta blk cnt > 0 ) { collection < meta index entry > meta blks = reader reader b c f meta index index values ( ) ; boolean calculate compression = false ; for ( iterator < meta index entry > it = meta blks iterator ( ) ; it has next ( ) ; ) { meta index entry e = it next ( ) ; meta size + = e get region ( ) get compressed size ( ) ; meta size uncompressed + = e get region ( ) get raw size ( ) ; if ( e get compression algorithm ( ) ! = compression algorithm none ) { calculate compression = true ; } } properties put ( " meta block bytes " , long to string ( meta size ) ) ; if ( calculate compression ) { properties put ( " meta block uncompressed bytes " , long to string ( meta size uncompressed ) ) ; properties put ( " meta block compression ratio " , string format ( " 1 : % 1f " , ( double ) meta size uncompressed / meta size ) ) ; } } properties put ( " meta - data size ratio " , string format ( " 1 : % 1f " , ( double ) data size / meta size ) ) ; long left over bytes = length - data size - meta size ; long misc size = b c file magic size ( ) * 2 + long size / byte size + version size ( ) ; long meta index size = left over bytes - misc size ; properties put ( " meta block index bytes " , long to string ( meta index size ) ) ; properties put ( " headers etc bytes " , long to string ( misc size ) ) ; / / now output the properties table int max key length = 0 ; set < map entry < string , string > > entry set = properties entry set ( ) ; for ( iterator < map entry < string , string > > it = entry set iterator ( ) ; it has next ( ) ; ) { map entry < string , string > e = it next ( ) ; if ( e get key ( ) length ( ) > max key length ) { max key length = e get key ( ) length ( ) ; } } for ( iterator < map entry < string , string > > it = entry set iterator ( ) ; it has next ( ) ; ) { map entry < string , string > e = it next ( ) ; out printf ( " % s : % s % n " , align format ( e get key ( ) , max key length , align left ) , e get value ( ) ) ; } out println ( ) ; reader check t file data index ( ) ; if ( block cnt > 0 ) { string blk i d = " data - block " ; int blk i d width = align calculate width ( blk i d , block cnt ) ; int blk i d width 2 = align calculate width ( " " , block cnt ) ; string offset = " offset " ; int offset width = align calculate width ( offset , length ) ; string blk len = " length " ; int blk len width = align calculate width ( blk len , data size / block cnt * 10 ) ; string raw size = " raw - size " ; int raw size width = align calculate width ( raw size , data size uncompressed / block cnt * 10 ) ; string records = " records " ; int records width = align calculate width ( records , reader get entry count ( ) / block cnt * 10 ) ; string end key = " end - key " ; int end key width = math max ( end key length ( ) , max key sample len * 2 + 5 ) ; out printf ( " % s % s % s % s % s % s % n " , align format ( blk i d , blk i d width , align center ) , align format ( offset , offset width , align center ) , align format ( blk len , blk len width , align center ) , align format ( raw size , raw size width , align center ) , align format ( records , records width , align center ) , align format ( end key , end key width , align left ) ) ; for ( int i = 0 ; i < block cnt ; + + i ) { block region region = reader reader b c f data index get block region list ( ) get ( i ) ; t file index entry index entry = reader tfile index get entry ( i ) ; out printf ( " % s % s % s % s % s " , align format ( align format ( i , blk i d width 2 , align zero padded ) , blk i d width , align left ) , align format ( region get offset ( ) , offset width , align left ) , align format ( region get compressed size ( ) , blk len width , align left ) , align format ( region get raw size ( ) , raw size width , align left ) , align format ( index entry kv entries , records width , align left ) ) ; byte [ ] key = index entry key ; boolean as ascii = true ; int sample len = math min ( max key sample len , key length ) ; for ( int j = 0 ; j < sample len ; + + j ) { byte b = key [ j ] ; if ( ( b < 32 & & b ! = 9 ) | | ( b = = 127 ) ) { as ascii = false ; } } if ( ! as ascii ) { out print ( " 0x " ) ; for ( int j = 0 ; j < sample len ; + + j ) { byte b = key [ i ] ; out printf ( " % x " , b ) ; } } else { out print ( new string ( key , 0 , sample len , standard charsets utf 8 ) ) ; } if ( sample len < key length ) { out print ( " " ) ; } out println ( ) ; } } out println ( ) ; if ( meta blk cnt > 0 ) { string name = " meta - block " ; int max name len = 0 ; set < map entry < string , meta index entry > > meta blk entry set = reader reader b c f meta index index entry set ( ) ; for ( iterator < map entry < string , meta index entry > > it = meta blk entry set iterator ( ) ; it has next ( ) ; ) { map entry < string , meta index entry > e = it next ( ) ; if ( e get key ( ) length ( ) > max name len ) { max name len = e get key ( ) length ( ) ; } } int name width = math max ( name length ( ) , max name len ) ; string offset = " offset " ; int offset width = align calculate width ( offset , length ) ; string blk len = " length " ; int blk len width = align calculate width ( blk len , meta size / meta blk cnt * 10 ) ; string raw size = " raw - size " ; int raw size width = align calculate width ( raw size , meta size uncompressed / meta blk cnt * 10 ) ; string compression = " compression " ; int compression width = compression length ( ) ; out printf ( " % s % s % s % s % s % n " , align format ( name , name width , align center ) , align format ( offset , offset width , align center ) , align format ( blk len , blk len width , align center ) , align format ( raw size , raw size width , align center ) , align format ( compression , compression width , align left ) ) ; for ( iterator < map entry < string , meta index entry > > it = meta blk entry set iterator ( ) ; it has next ( ) ; ) { map entry < string , meta index entry > e = it next ( ) ; string blk name = e get value ( ) get meta name ( ) ; block region region = e get value ( ) get region ( ) ; string blk compression = e get value ( ) get compression algorithm ( ) get name ( ) ; out printf ( " % s % s % s % s % s % n " , align format ( blk name , name width , align left ) , align format ( region get offset ( ) , offset width , align left ) , align format ( region get compressed size ( ) , blk len width , align left ) , align format ( region get raw size ( ) , raw size width , align left ) , align format ( blk compression , compression width , align left ) ) ; } } } finally { i o utils cleanup with logger ( log , reader , fsdis ) ; } }


public void set model key ( string model key ) { this model keys = collections singleton ( model key ) ; }


log a message at the warn level according to the specified format and argument this form avoids superfluous object creation when the logger is disabled for the warn level

public void warn ( string format , object arg ) { if ( logger is enabled for ( level warn ) ) { formatting tuple ft = message formatter format ( format , arg ) ; logger log ( fqcn , level warn , ft get message ( ) , ft get throwable ( ) ) ; } }


updates all the process definition entities to match the deployment ' s values for tenant , engine version , and deployment id

public void copy deployment values to process definitions ( deployment entity deployment , list < process definition entity > process definitions ) { string engine version = deployment get engine version ( ) ; string tenant id = deployment get tenant id ( ) ; string deployment id = deployment get id ( ) ; for ( process definition entity process definition : process definitions ) { / / backwards compatibility if ( engine version ! = null ) { process definition set engine version ( engine version ) ; } / / process definition inherits the tenant id if ( tenant id ! = null ) { process definition set tenant id ( tenant id ) ; } process definition set deployment id ( deployment id ) ; } }


public void test file schema test class ( ) { / / todo : test file schema test class }


public connection get target connection ( ) { return target connection ; }


writes to the given { @ link byte buffer } a byte representation of this instance < b > note : < b > no guarantees are made regarding stability of the representation between versions

void write to ( byte buffer buffer ) { check not null ( buffer ) ; check argument ( buffer remaining ( ) > = bytes , " expected at least stats bytes = % s remaining , got % s " , bytes , buffer remaining ( ) ) ; buffer put long ( count ) put double ( mean ) put double ( sum of squares of deltas ) put double ( min ) put double ( max ) ; }


returns { @ code true } for { @ code unary } and { @ code client streaming } , which do not permit the server to stream

public final boolean server sends one message ( ) { return this = = unary | | this = = client streaming ; }


< code > optional double money = 1 ; < code >


decodes a string from base 6 4 format no blanks or line breaks are allowed within the base 6 4 encoded input data

public static string decode string ( string s ) { return decode string ( s , false ) ; }


static method to execute a shell command covers most of the simple cases without requiring the user to implement the < code > shell < code > interface

public static string exec command ( string cmd ) throws i o exception { return exec command ( null , cmd , 0l ) ; }


public boolean can upgrade ( ) { return lifecycle get ( ) can rewrite hudson war ( ) ; }


test day interval rounding , ( interval & gt ; = 1 2h ) with time zone shift

public void test day interval rounding ( ) { zone id tz = zone offset of hours ( - 8 ) ; rounding tz rounding = rounding builder ( time value time value hours ( 12 ) ) time zone ( tz ) build ( ) ; assert that ( tz rounding round ( time ( " 2009 - 02 - 03t00 : 01 : 01 " ) ) , is date ( time ( " 2009 - 02 - 02t20 : 00 : 00 000z " ) , tz ) ) ; assert that ( tz rounding next rounding value ( time ( " 2009 - 02 - 02t20 : 00 : 00 000z " ) ) , is date ( time ( " 2009 - 02 - 03t08 : 00 : 00 000z " ) , tz ) ) ; assert that ( tz rounding round ( time ( " 2009 - 02 - 03t13 : 01 : 01 " ) ) , is date ( time ( " 2009 - 02 - 03t08 : 00 : 00 000z " ) , tz ) ) ; assert that ( tz rounding next rounding value ( time ( " 2009 - 02 - 03t08 : 00 : 00 000z " ) ) , is date ( time ( " 2009 - 02 - 03t20 : 00 : 00 000z " ) , tz ) ) ; }


public set < string > topic cleanup policy ( string topic ) { config topic config = describe topic config ( topic ) ; if ( topic config = = null ) { / / the topic must not exist log debug ( " unable to find topic ' { } ' when getting cleanup policy " , topic ) ; return collections empty set ( ) ; } config entry entry = topic config get ( cleanup policy config ) ; if ( entry ! = null & & entry value ( ) ! = null ) { string policy str = entry value ( ) ; log debug ( " found cleanup policy = { } for topic ' { } ' " , policy str , topic ) ; return arrays stream ( policy str split ( " , " ) ) map ( string : : trim ) filter ( s - > ! s is empty ( ) ) map ( string : : to lower case ) collect ( collectors to set ( ) ) ; } / / this is unexpected , as the topic config should include the cleanup policy even if / / the topic settings don ' t override the broker ' s log cleanup policy but just to be safe log debug ( " found no cleanup policy for topic ' { } ' " , topic ) ; return collections empty set ( ) ; }


applies the library symbol table to the imported symbols of the specified { @ link program } symbols may also be demangled ( although this could be a mistake )

private void apply imports ( program program , message log log , task monitor monitor ) { monitor set message ( " applying imports " + program get name ( ) ) ; reference manager rm = program get reference manager ( ) ; external manager em = program get external manager ( ) ; string [ ] libs = em get external library names ( ) ; for ( string lib : libs ) { if ( monitor is cancelled ( ) ) { return ; } int size = program get language ( ) get language description ( ) get size ( ) ; library symbol table symtab = library lookup table get symbol table ( lib , size ) ; external reference [ ] er array = get external references ( rm , lib ) ; for ( external reference element : er array ) { if ( monitor is cancelled ( ) ) { return ; } string sym name = element get label ( ) ; / / this check belongs here , because we want to demangled even / / if we do not have a symbol table if ( symtab = = null ) { continue ; } external location ext loc = element get external location ( ) ; / / if symbol is imported by ordinal , then see if the / / library contains a name for that ordinal if so , / / then rename the symbol library exported symbol exp sym = symtab get symbol ( sym name ) ; if ( exp sym = = null ) { try { int ord = symbol utilities get ordinal value ( sym name ) ; if ( ord = = - 1 ) { continue ; } exp sym = symtab get symbol ( ord ) ; if ( exp sym = = null ) { log append msg ( " unable to locate symbol [ " + sym name + " ] in [ " + library lookup table get existing exports file ( lib , size ) + " ] please verify the version is correct " ) ; continue ; } ext loc set location ( exp sym get name ( ) , ext loc get address ( ) , source type imported ) ; } catch ( duplicate name exception | invalid input exception e ) { log append msg ( " error creating label : " , e get message ( ) ) ; } } listing listing = program get listing ( ) ; data data = listing get data at ( element get from address ( ) ) ; int purge size = exp sym get purge ( ) ; / / no purge size for 64 - bit programs boolean is not 3 2 bit = data get min address ( ) get address space ( ) get size ( ) > 32 ; if ( ( purge size = = - 1 | | purge size < - 1024 | | purge size > 1024 ) | | is not 3 2 bit ) { continue ; } / / create or get external function function ext func = ext loc create function ( ) ; ext func set stack purge size ( purge size ) ; if ( exp sym has no return ( ) ) { ext func set no return ( true ) ; } / / todo : this should not be done at time of import and should be done / / by a late running analyzer ( e g , stack analyzer ) if no signature / / has been established / / int stack shift = program get compiler spec ( ) get default calling convention ( ) get stackshift ( ) ; / / if ( stack shift = = - 1 ) { / / stack shift = 0 ; / / } / / int num params = exp sym get purge ( ) / 4 ; / / if ( num params > 0 ) { / / / / hack : assumes specific stack - based x 8 6 convention / / try { / / parameter [ ] params = new parameter [ num params ] ; / / for ( int ind = 0 ; ind < num params ; ind + + ) { / / params [ ind ] = new parameter impl ( null , undefined get undefined data type ( 4 ) , / / ind * 4 + stack shift , p ) ; / / } / / ext func replace parameters ( function update type dynamic storage all params , / / false , source type analysis , params ) ; / / } / / catch ( invalid input exception | duplicate name exception e ) { / / log append msg ( " error creating label : " , e get message ( ) ) ; / / } / / } } } }


checks that the two values are not equal , and emits a warning if their hashcodes are equal

private void assert not equals ( object a , object b ) { if ( a equals ( b ) ) throw new gdx runtime exception ( a get class ( ) get simple name ( ) + " ! equals ( ) failed : \ n " + a + " \ n = = \ n " + b ) ; if ( b equals ( a ) ) throw new gdx runtime exception ( a get class ( ) get simple name ( ) + " ! equals ( ) failed ( not symmetric ) : \ n " + b + " \ n = = \ n " + a ) ; if ( a hash code ( ) = = b hash code ( ) ) system out println ( " warning : " + a get class ( ) get simple name ( ) + " hash code ( ) may be incorrect : \ n " + a + " \ n = = \ n " + b ) ; }


private void update root attr ( i node with additional fields root ) { final quota counts q = root get quota counts ( ) ; final long ns quota = q get name space ( ) ; final long ds quota = q get storage space ( ) ; f s directory fs dir = namesystem dir ; if ( ns quota ! = - 1 | | ds quota ! = - 1 ) { fs dir root dir get directory with quota feature ( ) set quota ( ns quota , ds quota ) ; } fs dir root dir clone modification time ( root ) ; fs dir root dir clone permission status ( root ) ; }


compare this file status to another file status this method was added back by hadoop - 14683 to keep binary compatibility

public int compare to ( object o ) { file status other = ( file status ) o ; return compare to ( other ) ; }


clear script info metadata cached by ghidra script util

public void clear metadata ( ) { script file to info map clear ( ) ; script name to files map clear ( ) ; }


finalize procedure deletes an existing snapshot rename previous to finalized tmp directory fully delete the finalized tmp directory do nothing , if previous directory does not exist

void do finalize ( storage directory sd ) throws i o exception { file prev dir = sd get previous dir ( ) ; if ( ! prev dir exists ( ) ) return ; / / already discarded final string data dir path = sd get root ( ) get canonical path ( ) ; log info ( " finalizing upgrade for storage directory { } \ n cur lv = { } ; " + " cur c time = { } " , data dir path , this get layout version ( ) , this get c time ( ) ) ; assert sd get current dir ( ) exists ( ) : " current directory must exist " ; final file tmp dir = sd get finalized tmp ( ) ; / / finalized tmp directory final file bbw dir = new file ( sd get root ( ) , storage storage 1 bbw ) ; / / 1 rename previous to finalized tmp rename ( prev dir , tmp dir ) ; / / 2 delete finalized tmp dir in a separate thread / / also delete the blocks being written from hdfs 1 x and earlier , if / / it exists new daemon ( new runnable ( ) { @ override public void run ( ) { try { delete dir ( tmp dir ) ; if ( bbw dir exists ( ) ) { delete dir ( bbw dir ) ; } } catch ( i o exception ex ) { log error ( " finalize upgrade for " + data dir path + " failed " , ex ) ; } log info ( " finalize upgrade for " + data dir path + " is complete " ) ; } @ override public string to string ( ) { return " finalize " + data dir path ; } } ) start ( ) ; }


whether to use the { @ link gson builder # serialize nulls ( ) } option when writing json this is a shortcut for setting up a { @ code gson } as follows : < pre class = " code " > new gson builder ( ) serialize nulls ( ) create ( ) ;

public void set serialize nulls ( boolean serialize nulls ) { this serialize nulls = serialize nulls ; }


returns whether this integer value is greater than or equal to the given unknown integer value : < code > never < code > , < code > maybe < code > , or < code > always < code >

public final int greater than or equal ( unknown integer value other ) { return - less than ( other ) ; }


validates file existence and returns the file

private static file validate and get file ( string path ) { file file = new file ( path ) ; if ( ! file exists ( ) ) { system err println ( " path ' " + file get absolute path ( ) + " ' does not exist " ) ; print usage then exit ( ) ; } return file ; }


updates generated component file with new content

static psi class update class ( string class f q n , string new content , project project ) { final optional < psi class > generated class = optional of nullable ( psi search utils find original class ( project , class f q n ) ) filter ( cls - > ! component scope contains ( cls get containing file ( ) ) ) ; if ( generated class is present ( ) ) { return update existing class ( new content , generated class get ( ) , project ) ; } else { return update in memory class ( new content , class f q n , project ) ; } }


private void execute sql ( final connection connection , final string sql , final boolean is commit ) throws s q l exception { if ( sql ! = null ) { try ( statement statement = connection create statement ( ) ) { / / connection was created a few milliseconds before , so set query timeout is omitted ( we assume it will succeed ) statement execute ( sql ) ; } if ( is isolate internal queries & & ! is auto commit ) { if ( is commit ) { connection commit ( ) ; } else { connection rollback ( ) ; } } } }


public optional < string > find plain column ( final string logic table , final string logic column ) { optional < string > origin column name = find origin column name ( logic table , logic column ) ; return origin column name is present ( ) & & tables contains key ( logic table ) ? tables get ( logic table ) find plain column ( origin column name get ( ) ) : optional empty ( ) ; }


obtain a metadata reader for the given resource

metadata reader get metadata reader ( resource resource ) throws i o exception ;


checks whether the device has a camera feature or not

public static boolean has camera feature ( context context ) { package manager pm = context get application context ( ) get package manager ( ) ; return pm has system feature ( package manager feature camera ) ; }


reverses the elements of { @ code array } this is equivalent to { @ code collections reverse ( floats as list ( array ) ) } , but is likely to be more efficient

public static void reverse ( float [ ] array ) { check not null ( array ) ; reverse ( array , 0 , array length ) ; }


get a class by name if the class is not found then return null

protected static class < ? > get class ( string class name ) { try { return thread current thread ( ) get context class loader ( ) load class ( class name ) ; / / return reflect util find class ( class name ) ; } catch ( class not found exception e ) { if ( log is debug enabled ( ) ) { log debug ( " class not found : " + class name ) ; } return null ; } }


calls the parser and returns any gathered deprecations

public list < string > get query deprecations ( named x content registry named x content registry ) { list < string > deprecations = new array list < > ( ) ; try { x content object transformer query builder transformer ( named x content registry ) from map ( query provider get query ( ) , deprecations ) ; } catch ( exception exception ) { / / certain thrown exceptions wrap up the real illegal argument making it hard to determine cause for the user if ( exception get cause ( ) instanceof illegal argument exception ) { exception = ( exception ) exception get cause ( ) ; } throw exceptions helper bad request exception ( messages data frame analytics bad query format , exception ) ; } return deprecations ; }


returns a pretty - print string of all found windows that are showing , nesting by parent - child relationship

public static string get open windows as string ( ) { set < window > all found windows = get all windows ( ) ; / / @ formatter : off list < window > roots = all found windows stream ( ) filter ( w - > w get parent ( ) = = null ) collect ( collectors to list ( ) ) ; / / @ formatter : on string builder buffy = new string builder ( " \ n " ) ; for ( window w : roots ) { if ( ! is hierarchy showing ( w ) ) { continue ; } window to string ( w , 0 , buffy ) ; } return buffy to string ( ) ; }


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 " ) ; }


the response resources wrapped in the common mcp resource message < code > repeated istio mcp v 1alpha 1 resource resources = 2 ; < code >

public com alibaba nacos istio model mcp resource builder add resources builder ( int index ) { return get resources field builder ( ) add builder ( index , com alibaba nacos istio model mcp resource get default instance ( ) ) ; }


public static void create table ( database db , boolean if not exists ) { string constraint = if not exists ? " if not exists " : " " ; db exec s q l ( " create table " + constraint + " \ " tree entity \ " ( " + / / " \ " id \ " integer primary key , " + / / 0 : id " \ " parent id \ " integer ) ; " ) ; / / 1 : parent id }


returns the fragment if this node represents a fragment

public program fragment get fragment ( ) { return fragment ; }


get the underlying change map data as a byte array

public byte [ ] get data ( ) { return map data ; }


track state - in particular watch for expiration if it happens for re - creation of the zk client session

synchronized public void process ( watched event event ) { if ( event get state ( ) = = keeper state expired ) { close ( context path ) ; } }


returns the class reader from which this symbol table was constructed

class reader get source ( ) { return source class reader ; }


set the connect timeout ( in milliseconds ) a value of 0 means no timeout , otherwise values must be between 1 and { @ link integer # max value }

public api client set connect timeout ( int connection timeout ) { this connection timeout = connection timeout ; http client property ( client properties connect timeout , connection timeout ) ; return this ; }


public event type get event type ( ) { return event type task started ; }


experimental , do not use ! ! if used recycling for components may not happen

public builder recycling mode ( @ recycling mode int recycling mode ) { this recycling mode = recycling mode ; return this ; }


public string get short user name ( ) { return user get short name ( ) ; }


public int get value ( ) { return this value ; }


this resource response is an incremental update the source should only send incremental updates if the sink requested them < code > bool incremental = 6 ; < code >

public boolean get incremental ( ) { return incremental ; }


checks whether any method argument annotated with { @ link com netflix hystrix contrib javanica cache annotation cache key } annotation

public boolean has key parameters ( ) { return ! key parameters is empty ( ) ; }


public static object map to object ( map < string , string > map , class < ? > clazz ) { if ( collection utils is empty ( map ) ) { return null ; } try { object instance = clazz new instance ( ) ; field [ ] fields = instance get class ( ) get declared fields ( ) ; for ( field field : fields ) { int modifiers = field get modifiers ( ) ; if ( modifier is static ( modifiers ) | | modifier is final ( modifiers ) ) { continue ; } boolean accessible = field is accessible ( ) ; field set accessible ( true ) ; class < ? > type = field get type ( ) ; if ( type = = date class ) { if ( ! string utils is empty ( map get ( field get name ( ) ) ) ) { field set ( instance , new date ( long value of ( map get ( field get name ( ) ) ) ) ) ; } } else if ( type = = long class ) { if ( ! string utils is empty ( map get ( field get name ( ) ) ) ) { field set ( instance , long value of ( map get ( field get name ( ) ) ) ) ; } } else if ( type = = integer class ) { if ( ! string utils is empty ( map get ( field get name ( ) ) ) ) { field set ( instance , integer value of ( map get ( field get name ( ) ) ) ) ; } } else if ( type = = double class ) { if ( ! string utils is empty ( map get ( field get name ( ) ) ) ) { field set ( instance , double value of ( map get ( field get name ( ) ) ) ) ; } } else if ( type = = string class ) { if ( ! string utils is empty ( map get ( field get name ( ) ) ) ) { field set ( instance , map get ( field get name ( ) ) ) ; } } field set accessible ( accessible ) ; } return instance ; } catch ( illegal access exception e ) { throw new not support yet exception ( " map to " + clazz to string ( ) + " failed : " + e get message ( ) , e ) ; } catch ( instantiation exception e ) { throw new not support yet exception ( " map to " + clazz to string ( ) + " failed : " + e get message ( ) , e ) ; } }


creates a pixmap from a part of the current framebuffer

public static pixmap create from frame buffer ( int x , int y , int w , int h ) { gdx gl gl pixel storei ( gl20 gl pack alignment , 1 ) ; final pixmap pixmap = new pixmap ( w , h , format rgba8888 ) ; byte buffer pixels = buffer utils new byte buffer ( h * w * 4 ) ; gdx gl gl read pixels ( x , y , w , h , gl20 gl rgba , gl20 gl unsigned byte , pixels ) ; pixmap set pixels ( pixels ) ; return pixmap ; }


public void prefix string test ( ) { / / todo : test prefix string }


tests nested repeatable and use of @ data bound constructor to process form data

public void test nested enabled top button ( ) throws exception { html page p = create web client ( ) go to ( " self / test nested top button " ) ; html form f = p get form by name ( " config " ) ; try { click button ( p , f , " add " , true ) ; f get input by value ( " " ) set value attribute ( " title one " ) ; click button ( p , f , " add foo " , true ) ; f get input by value ( " " ) set value attribute ( " txt one " ) ; click button ( p , f , " add foo " , false ) ; f get input by value ( " " ) set value attribute ( " txt two " ) ; f get inputs by name ( " bool " ) get ( 1 ) click ( ) ; click button ( p , f , " add " , false ) ; f get input by value ( " " ) set value attribute ( " title two " ) ; f get elements by tag name ( " button " ) get ( 3 ) click ( ) ; / / 2nd " add foo " button f get input by value ( " " ) set value attribute ( " txt 2 1 " ) ; } catch ( exception e ) { system err println ( " html at time of failure : \ n " + p get body ( ) as xml ( ) ) ; throw e ; } bind class = foo list class ; submit ( f ) ; assert equals ( " [ foo list : title one : [ foo : txt one : false , foo : txt two : true ] , " + " foo list : title two : [ foo : txt 2 1 : false ] ] " , bind result to string ( ) ) ; }


determine if the supplied { @ code test method } is enabled in the current environment , as specified by the { @ link if profile value & # 064 ; if profile value } annotation , which may be declared on the test method itself or at the class level class - level usage overrides method - level usage defaults to { @ code true } if no { @ link if profile value & # 064 ; if profile value } annotation is declared

public static boolean is test enabled in this environment ( method test method , class < ? > test class ) { return is test enabled in this environment ( retrieve profile value source ( test class ) , test method , test class ) ; }


checks if the given set of fields is a valid subset of this set of fields for unordered sets , this is the case if all of the given set ' s fields are also part of this field subclasses that describe field sets where the field order matters must override this method to implement a field ordering sensitive check

public boolean is valid subset ( field set set ) { if ( set size ( ) > size ( ) ) { return false ; } for ( integer i : set ) { if ( ! contains ( i ) ) { return false ; } } return true ; }


generates a simplified name from a { @ link class } similar to { @ link class # get simple name ( ) } , but it works fine with anonymous classes

public static string simple class name ( class < ? > clazz ) { string class name = check not null ( clazz , " clazz " ) get name ( ) ; final int last dot idx = class name last index of ( package separator char ) ; if ( last dot idx > - 1 ) { return class name substring ( last dot idx + 1 ) ; } return class name ; }


creates an out - of - band channel builder for load balancer ' s own rpc needs , e g , talking to an external load - balancer service , that is specified by a target string and credentials see the documentation on { @ link grpc # new channel builder } for the format of a target string the target string will be resolved by a { @ link name resolver } created according to the target string the load balancer is responsible for closing unused oob channels , and closing all oob channels within { @ link # shutdown }

public managed channel builder < ? > create resolving oob channel builder ( string target , channel credentials creds ) { throw new unsupported operation exception ( ) ; }


returns a map key serializer for integer keys encodes as v int

public static key serializer < integer > get v int key serializer ( ) { return v int key serializer instance ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit join term ( eql base parser join term context ctx ) { }


returns a string representation of this location

public string to string ( ) { return super to string ( ) + " , function name : " + function name ; }


indicates that there is an auxiliary ( inline , not stack ) argument consisting of a list of initial values for a newly created array

public void aux init values ( array list < constant > init values ) ;


calls the { @ link # register handlers } method in addition to the superclass ' s initialization

public void init application context ( ) throws beans exception { super init application context ( ) ; register handlers ( this url map ) ; }


creates a thread pool for the query execution

private executor service create query executor ( ) { thread factory thread factory = new thread factory builder ( ) set daemon ( true ) set name format ( " flink " + get server name ( ) + " thread % d " ) build ( ) ; return executors new fixed thread pool ( num query threads , thread factory ) ; }