get the single timeline entity that the given user has access to the meaning of each argument has been documented with { @ link timeline reader # get entity }

public timeline entity get entity ( string entity type , string entity id , enum set < field > fields , user group information caller u g i ) throws yarn exception , i o exception { long start time = time monotonic now ( ) ; metrics incr get entity ops ( ) ; try { return do get entity ( entity type , entity id , fields , caller u g i ) ; } finally { metrics add get entity time ( time monotonic now ( ) - start time ) ; } }


creates an { @ link elasticsearch security exception } that indicates the token was expired it is up to the client to re - authenticate and obtain a new token the format for this response is defined in < a href = " https : tools ietf orghtmlrfc 6 7 5 0 # section - 3 1 " >

private static elasticsearch security exception expired token exception ( ) { elasticsearch security exception e = new elasticsearch security exception ( " token expired " , rest status unauthorized ) ; e add header ( " www - authenticate " , expired token www auth value ) ; return e ; }


returns the class loader - wide default channel

public static managed channel provider provider ( ) { managed channel provider provider = managed channel registry get default registry ( ) provider ( ) ; if ( provider = = null ) { throw new provider not found exception ( " no functional channel service provider found " + " try adding a dependency on the grpc - okhttp , grpc - netty , or grpc - netty - shaded " + " artifact " ) ; } return provider ; }


private void get config key rst ( config key key , string builder b ) { b append ( " ` ` " ) append ( key name ) append ( " ` ` " ) append ( " \ n " ) ; for ( string doc line : key documentation split ( " \ n " ) ) { if ( doc line length ( ) = = 0 ) { continue ; } b append ( " " ) append ( doc line ) append ( " \ n \ n " ) ; } b append ( " * type : " ) append ( get config value ( key , " type " ) ) append ( " \ n " ) ; if ( key has default ( ) ) { b append ( " * default : " ) append ( get config value ( key , " default " ) ) append ( " \ n " ) ; } if ( key validator ! = null ) { b append ( " * valid values : " ) append ( get config value ( key , " valid values " ) ) append ( " \ n " ) ; } b append ( " * importance : " ) append ( get config value ( key , " importance " ) ) append ( " \ n " ) ; }


the reloc count field ( 4 bytes ) indicates the number of 16 - bit relocation blocks for this section

public int get reloc count ( ) { return reloc count ; }


the string pool containing source paths referenced throughout the resource table this does not end up in the final binary arsc file < code > optional aapt pb string pool source pool = 1 ; < code >

public builder set source pool ( com android aapt resources string pool builder builder for value ) { copy on write ( ) ; instance set source pool ( builder for value ) ; return this ; }


tests that the delay is respected between subsequent retries of a retry future with retry delay

public void test retry with delay fixed args ( ) throws exception { final int retries = 4 ; final time delay = time milliseconds ( 5l ) ; final atomic integer count down = new atomic integer ( retries ) ; long start = system current time millis ( ) ; completable future < boolean > retry future = future utils retry with delay ( ( ) - > { if ( count down get and decrement ( ) = = 0 ) { return completable future completed future ( true ) ; } else { return future utils completed exceptionally ( new flink exception ( " test exception " ) ) ; } } , retries , delay , testing utils default scheduled executor ( ) ) ; boolean result = retry future get ( ) ; long completion time = system current time millis ( ) - start ; assert true ( result ) ; assert true ( " the completion time should be at least retries times delay between retries " , completion time > = retries * delay to milliseconds ( ) ) ; }


private long find max generation id ( final string prefix , path locations ) throws i o exception { long max id = - 1 ; for ( path data location : locations ) { final path resolve = data location resolve ( state dir name ) ; if ( files exists ( resolve ) ) { try ( directory stream < path > stream = files new directory stream ( resolve , prefix + " * " ) ) { for ( path state file : stream ) { final matcher matcher = state file pattern matcher ( state file get file name ( ) to string ( ) ) ; if ( matcher matches ( ) ) { final long id = long parse long ( matcher group ( 1 ) ) ; max id = math max ( max id , id ) ; } } } } } return max id ; }


indicates whether the response should contain the stored source for every hit

public search request builder set fetch source ( boolean fetch ) { source builder ( ) fetch source ( fetch ) ; return this ; }


public static boolean is device rooted ( ) { string su = " su " ; string [ ] locations = { " / system / bin / " , " / system / xbin / " , " / sbin / " , " / system / sd / xbin / " , " / system / bin / failsafe / " , " / data / local / xbin / " , " / data / local / bin / " , " / data / local / " , " / system / sbin / " , " / usr / bin / " , " / vendor / bin / " } ; for ( string location : locations ) { if ( new file ( location + su ) exists ( ) ) { return true ; } } return false ; }


calling this method informs the strategy that a vertex is no longer in finished state , e g , when a vertex is re - executed

void vertex unfinished ( execution vertex i d execution vertex i d ) ;


in this short living thread , any local states should be collected before the thread dies away

private void collect thread local states ( ) { if ( datanode get peer metrics ( ) ! = null ) { datanode get peer metrics ( ) collect thread local states ( ) ; } }


stops one listener from listening to value changes in the specified key

void remove listener ( string key , string group , configuration listener listener ) ;


see { @ link # set padding ( float , float , float , float ) }

public void set pad right ( float right ) { this pad right = right ; }


clears out the instruction list in this model , and fires off a notification to subscribers

public void clear and reload ( ) { / / no need to do anything if the instructions are already empty if ( instructions is empty ( ) ) { return ; } instructions clear ( ) ; model changed ( update type reload ) ; }


obtain a jpa entity manager from the given factory is aware of a corresponding entity manager bound to the current thread , e g when using jpa transaction manager note : will return { @ code null } if no thread - bound entity manager found !

public static entity manager get transactional entity manager ( entity manager factory emf ) throws data access resource failure exception { return get transactional entity manager ( emf , null ) ; }


finds the sample in the specified range that ' s before or at the specified time if { @ code keyframe } is { @ code true } then the sample is additionally required to be a keyframe

private int find sample before ( int relative start index , int length , long time us , boolean keyframe ) { / / this could be optimized to use a binary search , however in practice callers to this method / / normally pass times near to the start of the search region hence it ' s unclear whether / / switching to a binary search would yield any real benefit int sample count to target = - 1 ; int search index = relative start index ; for ( int i = 0 ; i < length & & times us [ search index ] < = time us ; i + + ) { if ( ! keyframe | | ( flags [ search index ] & c buffer flag key frame ) ! = 0 ) { / / we ' ve found a suitable sample sample count to target = i ; if ( times us [ search index ] = = time us ) { / / stop the search if we found a sample at the specified time to avoid returning a later / / sample with the same exactly matching timestamp break ; } } search index + + ; if ( search index = = capacity ) { search index = 0 ; } } return sample count to target ; }


method to actually perform the action logic for this action

public void action performed ( action context context ) ;


protected boolean match class name ( string class name ) { return false ; }


public spel message get message code ( ) { return this message ; }


test that the bpos can register to talk to two different n ns , sends block reports to both , etc

public void test basic functionality ( ) throws exception { b p offer service bpos = setup b p o s for n ns ( mock n n 1 , mock n n 2 ) ; bpos start ( ) ; try { wait for both actors ( bpos ) ; / / the dn should have register to both n ns mockito verify ( mock n n 1 ) register datanode ( mockito any ( ) ) ; mockito verify ( mock n n 2 ) register datanode ( mockito any ( ) ) ; / / should get block reports from both n ns wait for block report ( mock n n 1 ) ; wait for block report ( mock n n 2 ) ; / / when we receive a block , it should report it to both n ns bpos notify namenode received block ( fake block , null , " " , false ) ; received deleted block info [ ] ret = wait for block received ( fake block , mock n n 1 ) ; assert equals ( 1 , ret length ) ; assert equals ( fake block get local block ( ) , ret [ 0 ] get block ( ) ) ; ret = wait for block received ( fake block , mock n n 2 ) ; assert equals ( 1 , ret length ) ; assert equals ( fake block get local block ( ) , ret [ 0 ] get block ( ) ) ; } finally { bpos stop ( ) ; bpos join ( ) ; } }


getter of the { @ link org apache flink streaming api graph stream graph } of the streaming job this call clears previously registered { @ link transformation transformations }

public stream graph get stream graph ( string job name ) { return get stream graph ( job name , true ) ; }


sets a null value for the given setting key

public builder put null ( string key ) { return put ( key , ( string ) null ) ; }


public void set transaction id ( long transaction id ) { this transaction id = transaction id ; }


test that we can handle the evaluator getting interrupted at various points this method creates an evaluator with the specified sky function for graph tested node type , then starts a thread , requests evaluation and asserts that evaluation started it then interrupts the evaluator thread and asserts that it acknowledged the interruption

private void run interruption test ( sky function factory value builder factory ) throws exception { final semaphore thread started = new semaphore ( 0 ) ; final semaphore thread interrupted = new semaphore ( 0 ) ; final string [ ] was error = new string [ ] { null } ; final parallel evaluator evaluator = make evaluator ( new in memory graph impl ( ) , immutable map of ( graph tester node type , value builder factory create ( thread started , was error ) ) , false ) ; thread t = new thread ( new runnable ( ) { @ override public void run ( ) { try { evaluator eval ( immutable list of ( graph tester to sky key ( " a " ) ) ) ; / / there ' s no real need to set an error here if the thread is not interrupted then / / thread interrupted is not released and the test thread will fail to acquire it was error [ 0 ] = " evaluation should have been interrupted " ; } catch ( interrupted exception e ) { / / this is the interrupt we are waiting for it should come straight from the / / evaluator ( more precisely , the abstract queue visitor ) / / signal the waiting test thread that the interrupt was acknowledged thread interrupted release ( ) ; } } } ) ; / / start the thread and wait for a semaphore this ensures that the thread was really started t start ( ) ; assert that ( thread started try acquire ( test utils wait timeout milliseconds , time unit milliseconds ) ) is true ( ) ; / / interrupt the thread and wait for a semaphore this ensures that the thread was really / / interrupted and this fact was acknowledged t interrupt ( ) ; assert that ( thread interrupted try acquire ( test utils wait timeout milliseconds , time unit milliseconds ) ) is true ( ) ; / / the sky function may have reported an error if ( was error [ 0 ] ! = null ) { fail ( was error [ 0 ] ) ; } / / wait for the thread to finish t join ( test utils wait timeout milliseconds ) ; }


public boolean retain all ( collection < ? > c ) { throw new unsupported operation exception ( ) ; }


checks if there is a next address in the iteration


request that the renderer render a frame this method is typically used when the render mode has been set to { @ link # rendermode when dirty } , so that frames are only rendered on demand may be called from any thread must not be called before a renderer has been set

public void request render ( ) { gl thread request render ( ) ; }


convert this changelog stream to a { @ link k stream } note that this is a logical operation and only changes the " interpretation " of the stream , i e , each record of this changelog stream is no longer treated as an updated record ( cf { @ link k stream } vs { @ code k table } )

k stream < k , v > to stream ( final named named ) ;


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


gets the selected project , or null if a project is not selected if multiple things are selected , only the first selected item is considered

public static i project get selected project ( i selection selection ) { i project project = null ; if ( selection instanceof i structured selection ) { i structured selection structured selection = ( i structured selection ) selection ; object first element = structured selection get first element ( ) ; if ( first element instanceof i resource ) { project = ( ( i resource ) ( first element ) ) get project ( ) ; } else if ( first element instanceof i java element ) { project = ( ( i java element ) ( first element ) ) get resource ( ) get project ( ) ; } } return project ; }


bundles all the given { @ link console annotator } into a single annotator

public static < t > console annotator < t > combine ( collection < ? extends console annotator < ? super t > > all ) { switch ( all size ( ) ) { case 0 : return null ; / / none case 1 : return cast ( all iterator ( ) next ( ) ) ; / / just one } return new console annotator aggregator < > ( all ) ; }


sets the record count to the specified value

public void set record count ( long record count ) { this record count = record count ; }


returns the buffer - offset - to - symbol map for the module as specified by module number

public map < long , abstract ms symbol > get module symbols by offset ( int module number ) throws pdb exception { if ( module number < 0 | | module number > module information list size ( ) ) { throw new pdb exception ( " module number out of range : " + module number ) ; } if ( module number = = 0 ) { return get symbols by offset ( ) ; } return symbol records get module symbols by offset ( module number - 1 ) ; }


gets the number of restarts , including full restarts and fine grained restarts if a recovery is currently pending , this recovery is included in the count

public long get number of restarts ( ) { return number of restarts counter get count ( ) ; }


parse the string representation of a refresh policy , usually from a request parameter

public static refresh policy parse ( string value ) { for ( refresh policy policy : values ( ) ) { if ( policy get value ( ) equals ( value ) ) { return policy ; } } if ( " " equals ( value ) ) { / / empty string is immediate because that makes " post / test / test / 1 ? refresh " perform / / a refresh which reads well and is what folks are used to return immediate ; } throw new illegal argument exception ( " unknown value for refresh : [ " + value + " ] " ) ; }


test accessing name node from three different ports , tests overwriting downstream dn in the pipeline

public void test multiple n n port overwrite down stream ( ) throws exception { cluster conf set ( dfs encrypt data overwrite downstream new qop key , " auth " ) ; cluster conf set boolean ( dfs encrypt data overwrite downstream derived qop key , true ) ; mini d f s cluster cluster = null ; try { cluster = new mini d f s cluster builder ( cluster conf ) num data nodes ( 3 ) build ( ) ; cluster wait active ( ) ; hdfs configuration client conf = new hdfs configuration ( cluster conf ) ; client conf unset ( common configuration keys hadoop security sasl props resolver class ) ; array list < data node > data nodes = cluster get data nodes ( ) ; uri current u r i = cluster get u r i ( ) ; uri uri auth port = new uri ( current u r i get scheme ( ) + " : / / " + current u r i get host ( ) + " : 12000 " ) ; uri uri integrity port = new uri ( current u r i get scheme ( ) + " : / / " + current u r i get host ( ) + " : 12100 " ) ; uri uri privacy port = new uri ( current u r i get scheme ( ) + " : / / " + current u r i get host ( ) + " : 12200 " ) ; client conf set ( hadoop rpc protection , " privacy " ) ; file system fs privacy = file system get ( uri privacy port , client conf ) ; do test ( fs privacy , path1 ) ; long count = data nodes stream ( ) map ( dn - > dn get sasl client ( ) get target q o p ( ) ) filter ( " auth " : : equals ) count ( ) ; / / for each datanode pipeline , target q o ps of sasl clients in the first two / / datanodes become equal to auth / / note that it is not necessarily the case for all datanodes , / / since a datanode may be always at the last position in pipelines assert true ( " at least two qops should be auth " , count > = 2 ) ; client conf set ( hadoop rpc protection , " integrity " ) ; file system fs integrity = file system get ( uri integrity port , client conf ) ; do test ( fs integrity , path2 ) ; count = data nodes stream ( ) map ( dn - > dn get sasl client ( ) get target q o p ( ) ) filter ( " auth " : : equals ) count ( ) ; assert true ( " at least two qops should be auth " , count > = 2 ) ; client conf set ( hadoop rpc protection , " authentication " ) ; file system fs auth = file system get ( uri auth port , client conf ) ; do test ( fs auth , path3 ) ; count = data nodes stream ( ) map ( dn - > dn get sasl server ( ) get negotiated q o p ( ) ) filter ( " auth " : : equals ) count ( ) ; assert equals ( " all qops should be auth " , 3 , count ) ; } finally { if ( cluster ! = null ) { cluster shutdown ( ) ; } } }


called while the nn is in standby state , but just about to be asked to enter active state this cancels any checkpoints currently being taken

void prepare to stop standby services ( ) throws service failed exception { if ( standby checkpointer ! = null ) { standby checkpointer cancel and prevent checkpoints ( " about to leave standby state " ) ; } }


compute the " weighting " to give to a sublcuster based on the configured policy weights ( for the active subclusters )

private float get policy config weighting ( sub cluster id target id , allocation bookkeeper allocation bookkeeper ) { float tot weight = allocation bookkeeper tot policy weight ; float local weight = allocation bookkeeper policy weights get ( target id ) ; return ( local weight ! = null & & tot weight > 0 ) ? local weight / tot weight : 0 ; }


get the associated model ' s map of self model it can be used for associations actions of crud the key is the name of associated model ' s table the value is the id of associated model

map < string , long > get associated models map without f k ( ) { if ( associated models map without f k = = null ) { associated models map without f k = new hash map < string , long > ( ) ; } return associated models map without f k ; }


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


test serialization of outer number types

public void fake outer number serialize test ( ) throws api exception { big decimal body = null ; big decimal response = api fake outer number serialize ( body ) ; / / todo : test validations }


creates an empty temporary directory for csv files and returns the absolute path

private static string create temporary directory ( ) throws i o exception { final path temp directory = files create temp directory ( " population " ) ; return temp directory to string ( ) ; }


creates a new symbol of the indicated type along with its associated object in the " to " program < br > this method will throw an exception if the symbol can ' t be created < br > note : it will not create a symbol with a conflict name

private symbol create symbol ( string name , symbol type type , address address , namespace parent namespace , source type source ) throws duplicate name exception , invalid input exception { symbol symbol = null ; if ( type = = symbol type label ) { if ( address is external address ( ) ) { / / fixme should this be passing the namespace ? external manager d b ext mgr = ( external manager d b ) to program get external manager ( ) ; external location add ext location = ext mgr add ext location ( parent namespace get name ( ) , name , address , source ) ; return add ext location get symbol ( ) ; } symbol = to symbol table create label ( address , name , parent namespace , source ) ; } / / else if ( type = = symbol type external ) { / / external manager d b ext mgr = ( external manager d b ) to program get external manager ( ) ; / / ext mgr add ext location ( parent namespace get name ( ) , name , address , source ) ; / / symbol = to symbol table get symbol ( name , parent namespace ) ; / / } else if ( type = = symbol type class ) { ghidra class new ghidra class = to symbol table create class ( parent namespace , name , source ) ; symbol = new ghidra class get symbol ( ) ; } else if ( type = = symbol type namespace ) { namespace new namespace = to symbol table create name space ( parent namespace , name , source ) ; symbol = new namespace get symbol ( ) ; } else if ( type = = symbol type library ) { external manager from ext mgr = from program get external manager ( ) ; string path = from ext mgr get external library path ( name ) ; external manager d b ext mgr = ( external manager d b ) to program get external manager ( ) ; ext mgr set external path ( name , path , source = = source type user defined ) ; symbol = to symbol table get library symbol ( name ) ; } else if ( type = = symbol type function ) { function manager from function mgr = from program get function manager ( ) ; address set view body = from function mgr get function at ( address ) get body ( ) ; function manager function mgr = to program get function manager ( ) ; try { function mgr create function ( name , parent namespace , address , body , source ) ; } catch ( overlapping function exception e ) { throw new invalid input exception ( e get message ( ) ) ; } symbol = to symbol table get symbol ( name , address , parent namespace ) ; } return symbol ; }


protected void verify authentication context signature ( final pair < ? extends signable s a m l object , message context > authentication context , final http servlet request request , final request abstract type authn request , final saml registered service service provider metadata facade adaptor ) throws exception { val ctx = authentication context get value ( ) ; verify authentication context signature ( ctx , request , authn request , adaptor ) ; }


adds { @ code element } to the { @ code immutable multiset }

public builder < e > add ( e element ) { contents add ( check not null ( element ) ) ; return this ; }


public fed balance context build ( ) { fed balance context context = new fed balance context ( ) ; context src = this src ; context dst = this dst ; context mount = this mount ; context conf = this conf ; context force close open files = this force close open files ; context use mount read only = this use mount read only ; context map num = this map num ; context bandwidth limit = this bandwidth limit ; context trash opt = this trash opt ; context delay duration = this delay duration ; context diff threshold = this diff threshold ; return context ; }


creates new fix , that adds static method call as an argument to the original method call

static intention action create add method call fix ( psi method call expression original method call , string cls name , string method name , psi element factory element factory ) { psi expression list new argument list = create argument list ( original method call get context ( ) , cls name , method name , element factory ) ; string fix description = " add " + method name + " ( ) " + get capitalized metho name ( original method call ) ; return new add argument fix ( original method call , new argument list , fix description ) ; }


a convenience method over { @ link # validate relative path ( string , boolean , boolean ) }

public form validation validate relative directory ( string value , boolean error if not exist ) throws i o exception { return validate relative path ( value , error if not exist , false ) ; }


writes a subset of the records in this buffer in their logical order to the given output

public void write to output ( final channel writer output view output , final int start , int num ) throws i o exception { final type comparator < t > comparator = this comparator ; final type serializer < t > serializer = this serializer ; t record = this record instance ; final single segment input view in view = this in view ; final int records per segment = this records per segment ; int current mem seg = start / records per segment ; int offset = ( start % records per segment ) * this record size ; while ( num > 0 ) { final memory segment current index segment = this sort buffer get ( current mem seg + + ) ; in view set ( current index segment , offset ) ; / / check whether we have a full or partially full segment if ( num > = records per segment & & offset = = 0 ) { / / full segment for ( int num in mem seg = 0 ; num in mem seg < records per segment ; num in mem seg + + ) { record = comparator read with key denormalization ( record , in view ) ; serializer serialize ( record , output ) ; } num - = records per segment ; } else { / / partially filled segment for ( ; num > 0 & & offset < = this last entry offset ; num - - , offset + = this record size ) { record = comparator read with key denormalization ( record , in view ) ; serializer serialize ( record , output ) ; } } offset = 0 ; } }


return a map from topic names to futures which can be used to check the status of individual topics

public map < string , kafka future < topic description > > values ( ) { return futures ; }


private int write default file region ( channel outbound buffer in , default file region region ) throws exception { final long region count = region count ( ) ; final long offset = region transferred ( ) ; if ( offset > = region count ) { in remove ( ) ; return 0 ; } final long flushed amount = socket send file ( region , region position ( ) , offset , region count - offset ) ; if ( flushed amount > 0 ) { in progress ( flushed amount ) ; if ( region transferred ( ) > = region count ) { in remove ( ) ; } return 1 ; } else if ( flushed amount = = 0 ) { validate file region ( region , offset ) ; } return write status sndbuf full ; }


< code > replace labels < code > replaces all symbols and aliases in the specified address set from the second program

public void replace labels ( address set origin address set , boolean replace function , task monitor monitor ) throws cancelled exception { merge labels ( origin address set , program merge filter replace , true , replace function , monitor ) ; }


closes the file system all resources should be released ( programs , temporary files , etc )

public void close ( ) throws i o exception { ref manager on close ( ) ; provider close ( ) ; provider = null ; }


in this scenario , we make sure that if a set root happens in the background followed by a second set root in the background before the first can commit on the main thread , that we still properly diff at mount time and don ' t unmount and remount and mount specs with @ should update ( on mount = true )

public void layout diffing multiple set roots in parallel with should update true for first layout mount content is remounted ( ) { final array list < lifecycle step > operations = new array list < > ( ) ; final object first object for should update = new object ( ) ; m litho view rule set root ( create root component ( m litho view rule get context ( ) , first object for should update , operations ) ) set size px ( 100 , 100 ) measure ( ) layout ( ) attach to window ( ) ; assert that ( operations ) contains exactly ( lifecycle step on mount ) ; operations clear ( ) ; final object second object for should update = new object ( ) ; / / do two prop updates sequentially without draining the main thread queue m litho view rule set root async ( create root component ( m litho view rule get context ( ) , second object for should update , operations ) ) ; m background layout looper rule run to end of tasks sync ( ) ; m litho view rule set root async ( create root component ( m litho view rule get context ( ) , second object for should update , operations ) ) ; m background layout looper rule run to end of tasks sync ( ) ; / / now drain the main thread queue and mount the result shadow looper idle main looper ( ) ; m litho view rule layout ( ) ; / / in this case , we did change the object for should update in layout 1 even though / / it was the same for layouts 2 we expect to see unmount and mount assert that ( operations ) contains exactly ( lifecycle step on unmount , lifecycle step on mount ) ; operations clear ( ) ; }


using provided csr , returns a signed certificate that represents a gcp service account identity

public com google common util concurrent listenable future < com google security meshca v 1 mesh certificate response > create certificate ( com google security meshca v 1 mesh certificate request request ) { return io grpc stub client calls future unary call ( get channel ( ) new call ( get create certificate method ( ) , get call options ( ) ) , request ) ; }


build call for test body with query params

public okhttp 3 call test body with query params call ( string query , user body , final api callback callback ) throws api exception { object local var post body = body ; / / create path and map variables api operation api operation = local var api client get operation lookup map ( ) get ( " test body with query params " ) ; if ( api operation = = null ) { throw new api exception ( " operation not found in oas " ) ; } operation operation = api operation get operation ( ) ; string local var path = api operation get path ( ) ; map < string , object > param map = new hash map < > ( ) ; param map put ( " query " , query ) ; list < pair > local var query params = new array list < pair > ( ) ; list < pair > local var collection query params = new array list < pair > ( ) ; map < string , string > local var header params = new hash map < string , string > ( ) ; map < string , string > local var cookie params = new hash map < string , string > ( ) ; map < string , object > local var form params = new hash map < string , object > ( ) ; local var path = local var api client fill parameters from operation ( operation , param map , local var path , local var query params , local var collection query params , local var header params , local var cookie params ) ; final string [ ] local var accepts = { } ; final string local var accept = local var api client select header accept ( local var accepts ) ; if ( local var accept ! = null ) { local var header params put ( " accept " , local var accept ) ; } final string [ ] local var content types = { " application / json " } ; final string local var content type = local var api client select header content type ( local var content types ) ; local var header params put ( " content - type " , local var content type ) ; string [ ] local var auth names = new string [ ] { } ; return local var api client build call ( local var path , api operation get method ( ) , local var query params , local var collection query params , local var post body , local var header params , local var cookie params , local var form params , local var auth names , callback ) ; }


return readers that need to be at the end , after all others

final list < http message reader < ? > > get catch all readers ( ) { if ( ! this register defaults ) { return collections empty list ( ) ; } list < http message reader < ? > > readers = new array list < > ( ) ; add codec ( readers , new decoder http message reader < > ( string decoder all mime types ( ) ) ) ; return readers ; }


public static byte [ ] decode hex ( char sequence input ) { return base encoding base 1 6 ( ) decode ( input ) ; }


create the f s data output stream to write on the file system

public abstract s build ( ) throws illegal argument exception , i o exception ;


public static throwable sun ssl engine unavailability cause ( ) { return unavailability cause ; } / * returns { @ code true }


does the given { @ code path } represent a pattern that can be matched by an implementation of this interface ? if the return value is { @ code false } , then the { @ link # match } method does not have to be used because direct equality comparisons on the static path strings will lead to the same result


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


public boolean get bool item ( ) { return bool item ; }


set the list of acceptable { @ linkplain media type media types } , as specified by the { @ code accept } header

b accept ( media type acceptable media types ) ;


if the directory contains a { @ link directory with quota feature } , return it ; otherwise , return null

public final directory with quota feature get directory with quota feature ( ) { return get feature ( directory with quota feature class ) ; }


returns all top level classes loadable from the current class path note that " top - level - ness " is determined heuristically by class name ( see { @ link class info # is top level } )

public immutable set < class info > get top level classes ( ) { return fluent iterable from ( resources ) filter ( class info class ) filter ( new predicate < class info > ( ) { @ override public boolean apply ( class info info ) { return info is top level ( ) ; } } ) to set ( ) ; }


adds an { @ link extension } that will be invoked with the other attachdetach binders can be used to add generic functionality ( e g dynamic props ) to a render unit nb : this method should only be called while initially configuring the render unit see the class - level javadocs about immutability

public void add attach detach extension ( extension < ? , ? super mount content > extension ) { if ( m attach detach extensions = = null ) { m attach detach extensions = new array list < > ( ) ; if ( m attach detach binder type to extension map ! = null ) { throw new illegal state exception ( " extension map and extension list out of sync ! " ) ; } m attach detach binder type to extension map = new hash map < > ( ) ; } add extension ( m attach detach binder type to extension map , m attach detach extensions , extension ) ; }


the deploy jar that interacts with the device

private static files to run provider get test entry point ( rule context rule context ) { return rule context get executable prerequisite ( " $ test entry point " ) ; }


get the statement list of the compile unit

public int get statement list ( ) { return this stmt list = = null ? - 1 : this stmt list int value ( ) ; }


associate < code > key < code > with < code > value < code > and return a new copy of the hash table the current hash table is not modified

public copy on write hash map < k , v > copy and put ( k key , v value ) { if ( key = = null ) { throw new illegal argument exception ( " null keys are not supported " ) ; } if ( value = = null ) { throw new illegal argument exception ( " null values are not supported " ) ; } final int hash = key hash code ( ) ; final mutable value int new value = new mutable value int ( ) ; final inner node < k , v > new root = root put ( key , hash , total hash bits , value , new value ) ; final int new size = size + new value value ; return new copy on write hash map < > ( new root , new size ) ; }


print to stdout the set of user names with access to the specified repositories root this is intended to be used with the svr admin console command

static void list users ( file repositories root dir ) { file user file = new file ( repositories root dir , user password file ) ; linked hash map < string , user entry > list = new linked hash map < > ( ) ; hash map < x 5 0 0 principal , user entry > lookup map = new hash map < > ( ) ; try { read user list ( user file , list , lookup map ) ; system out println ( " \ n repository server users : " ) ; if ( list is empty ( ) ) { system out println ( " < no users have been added > " ) ; } else { for ( string name : list key set ( ) ) { system out println ( " " + name ) ; } } } catch ( i o exception e ) { system out println ( " \ n failed to read user file : " + e get message ( ) ) ; } }


creates a { @ link bloom filter } with the expected number of insertions and a default expected false positive probability of 3 % note that overflowing a { @ code bloom filter } with significantly more elements than specified , will result in its saturation , and a sharp deterioration of its false positive probability the constructed { @ code bloom filter } will be serializable if the provided { @ code funnel < t > } is it is recommended that the funnel be implemented as a java enum this has the benefit of ensuring proper serialization and deserialization , which is important since { @ link # equals } also relies on object identity of funnels

public static < t > bloom filter < t > create ( funnel < ? super t > funnel , int expected insertions ) { return create ( funnel , ( long ) expected insertions ) ; }


configure the maximum allowable frame payload length setting this value to your application ' s requirement may reduce denial of service attacks using long data frames corresponds to the argument with the same name in the constructor of { @ link io netty handler codec http websocketx web socket server handshaker factory web socket server handshaker factory } in netty by default set to 65536 ( 64k )

public void set max frame payload length ( int max frame payload length ) { this max frame payload length = max frame payload length ; }


checks to see whether applications are runnable now by iterating through each one of them and check if the queue and user have slack if we know how many apps can be runnable , there is no need to iterate through all apps , max runnable apps is used to break out of the iteration

private void update apps runnability ( list < list < f s app attempt > > apps now maybe runnable , int max runnable apps ) { / / scan through and check whether this means that any apps are now runnable iterator < f s app attempt > iter = new multi list start time iterator ( apps now maybe runnable ) ; f s app attempt prev = null ; list < f s app attempt > no longer pending apps = new array list < f s app attempt > ( ) ; while ( iter has next ( ) ) { f s app attempt next = iter next ( ) ; if ( next = = prev ) { continue ; } if ( can app be runnable ( next get queue ( ) , next ) ) { track runnable app ( next ) ; f s app attempt app sched = next ; next get queue ( ) add app ( app sched , true ) ; no longer pending apps add ( app sched ) ; if ( no longer pending apps size ( ) > = max runnable apps ) { break ; } } prev = next ; } / / we remove the apps from their pending lists afterwards so that we don ' t / / pull them out from under the iterator if they are not in these lists / / in the first place , there is a bug for ( f s app attempt app sched : no longer pending apps ) { if ( ! app sched get queue ( ) remove non runnable app ( app sched ) ) { log error ( " can ' t make app runnable that does not already exist in queue " + " as non - runnable : " + app sched + " this should never happen " ) ; } if ( ! users non runnable apps remove ( app sched get user ( ) , app sched ) ) { log error ( " waiting app " + app sched + " expected to be in " + " users non runnable apps , but was not this should never happen " ) ; } } }


switch the target object , replacing the cached introspection results only if the class of the new object is different to that of the replaced object

public void set wrapped instance ( object object , @ nullable string nested path , @ nullable object root object ) { this wrapped object = object utils unwrap optional ( object ) ; assert not null ( this wrapped object , " target object must not be null " ) ; this nested path = ( nested path ! = null ? nested path : " " ) ; this root object = ( ! this nested path is empty ( ) ? root object : this wrapped object ) ; this nested property accessors = null ; this type converter delegate = new type converter delegate ( this , this wrapped object ) ; }


draws the limit lines associated with this axis to the screen

public void render limit lines ( canvas c ) { list < limit line > limit lines = m x axis get limit lines ( ) ; if ( limit lines = = null | | limit lines size ( ) < = 0 ) return ; float [ ] position = m render limit lines buffer ; position [ 0 ] = 0 ; position [ 1 ] = 0 ; for ( int i = 0 ; i < limit lines size ( ) ; i + + ) { limit line l = limit lines get ( i ) ; if ( ! l is enabled ( ) ) continue ; int clip restore count = c save ( ) ; m limit line clipping rect set ( m view port handler get content rect ( ) ) ; m limit line clipping rect inset ( - l get line width ( ) , 0 f ) ; c clip rect ( m limit line clipping rect ) ; position [ 0 ] = l get limit ( ) ; position [ 1 ] = 0 f ; m trans point values to pixel ( position ) ; render limit line line ( c , l , position ) ; render limit line label ( c , l , position , 2 f + l get y offset ( ) ) ; c restore to count ( clip restore count ) ; } }


{ @ inherit doc } this method makes the change to this objects { @ link configuration } and calls reconfigure property impl to update internal data structures this method cannot be overridden , subclasses should instead override reconfigure property impl

public final void reconfigure property ( string property , string new val ) throws reconfiguration exception { if ( is property reconfigurable ( property ) ) { log info ( " changing property " + property + " to " + new val ) ; synchronized ( get conf ( ) ) { get conf ( ) get ( property ) ; string effective value = reconfigure property impl ( property , new val ) ; if ( new val ! = null ) { get conf ( ) set ( property , effective value ) ; } else { get conf ( ) unset ( property ) ; } } } else { throw new reconfiguration exception ( property , new val , get conf ( ) get ( property ) ) ; } }


for all alts , find which ref x or r needs list must see across alts if any alt needs x or r as list , then define as list

public set < decl > get decls for all elements ( list < alt a s t > alt a s ts ) { set < string > needs list = new hash set < string > ( ) ; set < string > non optional = new hash set < string > ( ) ; list < grammar a s t > all refs = new array list < grammar a s t > ( ) ; boolean first alt = true ; interval set reftypes = new interval set ( rule ref , token ref , string literal ) ; for ( alt a s t ast : alt a s ts ) { list < grammar a s t > refs = get rule tokens ( ast get nodes with type ( reftypes ) ) ; all refs add all ( refs ) ; pair < frequency set < string > , frequency set < string > > min and alt freq = get element frequencies for alt ( ast ) ; frequency set < string > min freq = min and alt freq a ; frequency set < string > alt freq = min and alt freq b ; for ( grammar a s t t : refs ) { string ref label name = get name ( t ) ; if ( ref label name ! = null ) { if ( alt freq count ( ref label name ) > 1 ) { needs list add ( ref label name ) ; } if ( first alt & & min freq count ( ref label name ) ! = 0 ) { non optional add ( ref label name ) ; } } } for ( string ref : non optional to array ( new string [ non optional size ( ) ] ) ) { if ( min freq count ( ref ) = = 0 ) { non optional remove ( ref ) ; } } first alt = false ; } set < decl > decls = new linked hash set < decl > ( ) ; for ( grammar a s t t : all refs ) { string ref label name = get name ( t ) ; if ( ref label name = = null ) { continue ; } list < decl > d = get decl for alt element ( t , ref label name , needs list contains ( ref label name ) , ! non optional contains ( ref label name ) ) ; decls add all ( d ) ; } return decls ; }


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


public boolean ignore expire event ( ) { return false ; }


perform the grouping operation using the provided value serde for serializing the value

public grouped < k , v > with value serde ( final serde < v > value serde ) { return new grouped < > ( name , key serde , value serde ) ; }


public decoded instruction with index ( int new index ) { throw new unsupported operation exception ( " no index in instruction " ) ; }


compute the path where the output of a committed task is stored until the entire job is committed for a specific application attempt

protected path get committed task path ( int app attempt id , task attempt context context ) { validate context ( context ) ; return new path ( get job attempt path ( app attempt id ) , string value of ( context get task attempt i d ( ) get task i d ( ) ) ) ; }


public void property class test ( ) { / / todo : test property class }


private void run ( ) { int reg count = ssa meth get reg count ( ) ; for ( int reg = 0 ; reg < reg count ; reg + + ) { ssa insn definsn = ssa meth get definition for register ( reg ) ; if ( definsn ! = null & & ( definsn get result ( ) get basic type ( ) = = type bt void ) ) { worklist set ( reg ) ; } } int reg ; while ( 0 < = ( reg = worklist next set bit ( 0 ) ) ) { worklist clear ( reg ) ; / * * definitions on the worklist have a type of bt void , which * must have originated from a phi insn * / phi insn definsn = ( phi insn ) ssa meth get definition for register ( reg ) ; if ( resolve result type ( definsn ) ) { / * * if the result type has changed , re - resolve all phis * that use this * / list < ssa insn > use list = ssa meth get use list for register ( reg ) ; int sz = use list size ( ) ; for ( int i = 0 ; i < sz ; i + + ) { ssa insn use insn = use list get ( i ) ; register spec result reg = use insn get result ( ) ; if ( result reg ! = null & & use insn instanceof phi insn ) { worklist set ( result reg get reg ( ) ) ; } } } } }


protected void set channel handlers ( final channel handler handlers ) { if ( handlers ! = null ) { channel handlers = handlers ; } }


get the number of bytes uploaded to remote swift cluster bytes uploaded - bytes written = the number of bytes left to upload

long get bytes uploaded ( ) { return bytes uploaded ; }


public void test json form data test ( ) { string param = null ; string param 2 = null ; / / api test json form data ( param , param 2 ) ; / / todo : test validations }


void expire variable entries ( long now ) { if ( expires variable ( ) ) { timer wheel ( ) advance ( now ) ; } }


return the single { @ link cache memory utils } instance

public static cache memory utils get instance ( final string cache key , final int max count ) { cache memory utils cache = cache map get ( cache key ) ; if ( cache = = null ) { synchronized ( cache memory utils class ) { cache = cache map get ( cache key ) ; if ( cache = = null ) { cache = new cache memory utils ( cache key , new lru cache < string , cache value > ( max count ) ) ; cache map put ( cache key , cache ) ; } } } return cache ; }


get the { @ link session context } when initialize the execution context it ' s usually used when resetting the session properties

public session context get original session context ( ) { return this original session context ; }


public retention lease stats get retention lease stats ( ) { return retention lease stats ; }


a convenience method to take a throwable , filter boiler - plate java - related lines ( e g , awt , swing , security , etc ) this can be useful for emitting diagnostic stack traces with reduced noise

public static throwable filter java throwable ( throwable t ) { stack trace element [ ] trace = t get stack trace ( ) ; stack trace element [ ] filtered = filter stack trace ( trace , java awt pattern , java reflect pattern , jdk internal reflect pattern , swing java pattern , swing javax pattern , security pattern , sun awt pattern , sun reflect pattern , mockit pattern , junit pattern ) ; t set stack trace ( filtered ) ; return t ; }


convert nanoseconds time to milliseconds

public static long nanos to millis ( long nanos ) { return nanos / nanos per milli ; }


this test is equivalent of calling analyze against a specific index the index specific value for the maximum token count is used

public void test exceed set max token limit ( ) { / / create a string with no words more than idx max token count string builder sb text = new string builder ( ) ; for ( int i = 0 ; i < = idx max token count ; i + + ) { sb text append ( ' a ' ) ; sb text append ( ' ' ) ; } string text = sb text to string ( ) ; analyze action request request = new analyze action request ( ) ; request text ( text ) ; request analyzer ( " standard " ) ; illegal state exception e = expect throws ( illegal state exception class , ( ) - > transport analyze action analyze ( request , registry , null , idx max token count ) ) ; assert equals ( e get message ( ) , " the number of tokens produced by calling analyze has exceeded the allowed maximum of [ " + idx max token count + " ] " + " this limit can be set by changing the [ index analyze max token count ] index level setting " ) ; }


the width at an index position in a java char array

public static int width ( char [ ] chars , int index ) { char c = chars [ index ] ; return character is high surrogate ( c ) ? width ( character to code point ( c , chars [ index + 1 ] ) ) : width ( c ) ; }


returns all table entries associated with the given function id this effectively gives a list of all the tags for a function

abstract record iterator get records by function i d ( long function i d ) throws i o exception ;


fill slots between < code > from index < code > inclusive to < code > to index < code > exclusive with < code > value < code >

void fill ( long from index , long to index , long value ) ;


returns the first visible layout or null if there are no visible layouts

public anchored layout get visible start layout ( ) { if ( layouts is empty ( ) ) { return null ; } return layouts get ( 0 ) ; }


return an { @ link input stream } to the cached content

public input stream get content input stream ( ) { return this content get input stream ( ) ; }


{ @ inherit doc } the default implementation does nothing

@ override public void enter function expression ( sql base parser function expression context ctx ) { }


public static long get log end time ( string end str ) throws number format exception { long end = long max value ; if ( end str ! = null & & ! end str is empty ( ) ) { end = long parse long ( end str ) ; } return end ; }


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 yarn router will forward to the respective yarn rm in which the am is running possible failure : client : identical behavior as { @ code r m web services } router : the client will timeout and resubmit the request resource manager : the router will timeout and the call will fail state store : the router will timeout and it will retry depending on the federation facade settings - if the failure happened before the select operation

public app state get app state ( http servlet request hsr , string app id ) throws authorization exception { application id application id = null ; try { application id = application id from string ( app id ) ; } catch ( illegal argument exception e ) { return null ; } sub cluster info sub cluster info = null ; sub cluster id sub cluster id = null ; try { sub cluster id = federation facade get application home sub cluster ( application id ) ; if ( sub cluster id = = null ) { return null ; } sub cluster info = federation facade get sub cluster ( sub cluster id ) ; } catch ( yarn exception e ) { return null ; } default request interceptor r e s t interceptor = get or create interceptor for sub cluster ( sub cluster id , sub cluster info get r m web service address ( ) ) ; return interceptor get app state ( hsr , app id ) ; }


public void test equals and hashcode ( ) { for ( int runs = 0 ; runs < number of testbuilders ; runs + + ) { check equals and hash code ( create test item ( ) , this : : copy , this : : mutate ) ; } }


test that accept z value parameter correctly parses

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


test set client role to null test get application id

public void test client role null ( ) { rpc context set client role ( null ) ; assertions assert null ( rpc context get client role ( ) ) ; }


check if any instruction intersects the specified address range

public void check context write ( address start , address end ) throws context change exception { lock acquire ( ) ; try { if ( ! start get address space ( ) equals ( end get address space ( ) ) ) { throw new illegal argument exception ( ) ; } if ( ! context locking enabled | | creating instruction | | ! program get memory ( ) contains ( start , end ) ) { return ; } boolean fail = false ; if ( get instruction containing ( start ) ! = null ) { fail = true ; } else { address range range = new address range impl ( start , end ) ; instruction inst = get instruction after ( start ) ; if ( inst ! = null ) { address addr = inst get min address ( ) ; if ( range contains ( addr ) ) { fail = true ; } } } if ( fail ) { throw new context change exception ( " context register change conflicts with one or more instructions " ) ; } } finally { lock release ( ) ; } }


returns a map of node id to the outgoing search requests to that node

public map < string , long > get outgoing connections ( ) { return client outgoing connections ; }


< code > optional string name = 2 ; < code >

public builder set name ( java lang string value ) { copy on write ( ) ; instance set name ( value ) ; return this ; }


translates an integer from host byte order to network byte order

public final static byte [ ] htonl ( int value ) { byte [ ] bytes = new byte [ 4 ] ; bytes [ 3 ] = ( byte ) ( ( value > > 0 ) & 0xff ) ; bytes [ 2 ] = ( byte ) ( ( value > > 8 ) & 0xff ) ; bytes [ 1 ] = ( byte ) ( ( value > > 16 ) & 0xff ) ; bytes [ 0 ] = ( byte ) ( ( value > > 24 ) & 0xff ) ; return bytes ; }


we need to write a manual parser for this because of { @ link status or exception } since { @ link status or exception # from x content ( x content parser ) } tries to peek at a field first before deciding what needs to be it cannot use an { @ link object parser }

public x content builder inner x content ( x content builder builder , params params ) throws i o exception { if ( slice id ! = null ) { builder field ( slice id field , slice id ) ; } builder field ( total field , total ) ; if ( params param as boolean ( include updated , true ) ) { builder field ( updated field , updated ) ; } if ( params param as boolean ( include created , true ) ) { builder field ( created field , created ) ; } builder field ( deleted field , deleted ) ; builder field ( batches field , batches ) ; builder field ( version conflicts field , version conflicts ) ; builder field ( noops field , noops ) ; builder start object ( retries field ) ; { builder field ( retries bulk field , bulk retries ) ; builder field ( retries search field , search retries ) ; } builder end object ( ) ; builder human readable field ( throttled raw field , throttled hr field , throttled ) ; builder field ( requests per sec field , requests per second = = float positive infinity ? - 1 : requests per second ) ; if ( reason cancelled ! = null ) { builder field ( canceled field , reason cancelled ) ; } builder human readable field ( throttled until raw field , throttled until hr field , throttled until ) ; if ( false = = slice statuses is empty ( ) ) { builder start array ( slices field ) ; for ( status or exception slice : slice statuses ) { if ( slice = = null ) { builder null value ( ) ; } else { slice to x content ( builder , params ) ; } } builder end array ( ) ; } return builder ; }


protected set < event > resolve single multifactor provider ( final optional < request context > context , final registered service service , final principal principal , final collection < multifactor authentication provider > providers ) { val global principal attribute value regex = cas properties get authn ( ) get mfa ( ) get global principal attribute value regex ( ) ; val provider = providers iterator ( ) next ( ) ; logger trace ( " found a single multifactor provider [ { } ] in the application context " , provider ) ; val attribute names = comma delimited list to set ( cas properties get authn ( ) get mfa ( ) get global principal attribute name triggers ( ) ) ; return multifactor authentication provider resolver resolve event via principal attribute ( principal , attribute names , service , context , providers , ( attribute value , mfa provider ) - > attribute value ! = null & & attribute value matches ( global principal attribute value regex ) ) ; }


private boolean update branch transaction d o ( branch transaction d o branch transaction d o ) { string branch key = build branch key ( branch transaction d o get branch id ( ) ) ; try ( jedis jedis = jedis pooled factory get jedis instance ( ) ) { string previous branch status = jedis hget ( branch key , redis key branch status ) ; if ( string utils is empty ( previous branch status ) ) { throw new store exception ( " branch transaction is not exist , update branch transaction failed " ) ; } map < string , string > map = new hash map < > ( 2 , 1 ) ; map put ( redis key branch status , string value of ( branch transaction d o get status ( ) ) ) ; map put ( redis key branch gmt modified , string value of ( ( new date ( ) ) get time ( ) ) ) ; jedis hmset ( branch key , map ) ; return true ; } catch ( exception ex ) { throw new redis exception ( ex ) ; } }


test that the correct comparator sort is returned , based on the script type

public void test build correct comparator type ( ) throws i o exception { script sort builder sort builder = new script sort builder ( mock script ( mock script name ) , script sort type string ) ; sort field sort field = sort builder build ( create mock shard context ( ) ) field ; assert that ( sort field get comparator source ( ) , instance of ( bytes ref field comparator source class ) ) ; sort builder = new script sort builder ( mock script ( mock script name ) , script sort type number ) ; sort field = sort builder build ( create mock shard context ( ) ) field ; assert that ( sort field get comparator source ( ) , instance of ( double values comparator source class ) ) ; }


calls the on chart gesture listener to do the end callback

public void end action ( motion event me ) { on chart gesture listener l = m chart get on chart gesture listener ( ) ; if ( l ! = null ) l on chart gesture end ( me , m last gesture ) ; }


returns the { @ code int } value whose byte representation is the given 4 bytes , in big - endian order ; equivalent to { @ code ints from byte array ( new byte [ ] { b 1 , b 2 , b 3 , b 4 } ) }

public static int from bytes ( byte b 1 , byte b 2 , byte b 3 , byte b 4 ) { return b 1 < < 24 | ( b 2 & 0x f f ) < < 16 | ( b 3 & 0x f f ) < < 8 | ( b 4 & 0x f f ) ; }


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

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


public object intercept ( @ this final object target , @ origin final method method , @ all arguments final object [ ] args , @ super call final callable < ? > callable ) { advice target object instance = ( advice target object ) target ; method invocation result method result = new method invocation result ( ) ; object result ; try { instance method around advice before method ( instance , method , args , method result ) ; / / checkstyle : off } catch ( final throwable ex ) { / / checkstyle : on log error ( " failed to execute the pre - method of method [ { } ] in class [ { } ] " , method get name ( ) , target get class ( ) , ex ) ; } try { if ( method result is rebased ( ) ) { result = method result get result ( ) ; } else { result = callable call ( ) ; } method result rebase ( result ) ; / / checkstyle : off } catch ( final throwable ex ) { / / checkstyle : on try { instance method around advice on throwing ( instance , method , args , ex ) ; / / checkstyle : off } catch ( final throwable ignored ) { / / checkstyle : on log error ( " failed to execute the error handler of method [ { } ] in class [ { } ] " , method get name ( ) , target get class ( ) , ex ) ; } throw ex ; } finally { try { instance method around advice after method ( instance , method , args , method result ) ; / / checkstyle : off } catch ( final throwable ex ) { / / checkstyle : on log error ( " failed to execute the post - method of method [ { } ] in class [ { } ] " , method get name ( ) , target get class ( ) , ex ) ; } } return result ; }


public boolean get executed bit ( int line ) { / / if any of the branch is taken , the branch must have executed otherwise assume it is not return get branch for line ( line ) any ( ) ; }


return a unique global id used to identify this instance


copy the aop configuration from the given advised support object , but allow substitution of a fresh target source and a given interceptor chain

protected void copy configuration from ( advised support other , target source target source , list < advisor > advisors ) { copy from ( other ) ; this target source = target source ; this advisor chain factory = other advisor chain factory ; this interfaces = new array list < > ( other interfaces ) ; for ( advisor advisor : advisors ) { if ( advisor instanceof introduction advisor ) { validate introduction advisor ( ( introduction advisor ) advisor ) ; } assert not null ( advisor , " advisor must not be null " ) ; this advisors add ( advisor ) ; } advice changed ( ) ; }


default void run ( t configuration , environment environment ) throws exception { / / do nothing }


to test the collection format in query parameters

public void test query parameter collection format test ( ) { list < string > pipe = null ; list < string > ioutil = null ; list < string > http = null ; list < string > url = null ; list < string > context = null ; / / api test query parameter collection format ( pipe , ioutil , http , url , context ) ; / / todo : test validations }


returns a map from rule variable to fully - expanded value , for all rule variables defined in this target

public immutable sorted map < ninja rule variable , string > compute rule variables ( ) { immutable sorted map < string , string > late expansion variables = compute input output variables ( ) ; immutable sorted map builder < string , string > full expansion variables builder = immutable sorted map < string , string > natural order ( ) put all ( late expansion variables ) ; immutable sorted map builder < ninja rule variable , string > builder = immutable sorted map natural order ( ) ; for ( map entry < ninja rule variable , ninja variable value > entry : rule variables entry set ( ) ) { ninja rule variable type = entry get key ( ) ; / / skip command for now it may need to expand other rule variables if ( ninja rule variable command equals ( type ) ) { continue ; } string expanded value = entry get value ( ) expand value ( late expansion variables ) ; builder put ( type , expanded value ) ; full expansion variables builder put ( ascii to lower case ( type name ( ) ) , expanded value ) ; } / / todo ( cparsons ) : ensure parsing exception is thrown early if the rule has no command defined / / otherwise , this throws npe string expanded command = rule variables get ( ninja rule variable command ) expand value ( full expansion variables builder build ( ) ) ; builder put ( ninja rule variable command , expanded command ) ; return builder build ( ) ; }


test loading an editlog with gaps a single editlog directory is set up on of the edit log files is deleted this should fail when selecting the input streams as it will not be able to select enough streams to load up to 4txns per roll there should be 4txns per roll transactions as we rolled 3 times

public void test loading with gaps ( ) throws i o exception { file f 1 = new file ( test dir + " / gaptest 0 " ) ; list < uri > edit uris = immutable list of ( f 1 to u r i ( ) ) ; n n storage storage = setup edits ( edit uris , 3 ) ; final long start gap tx id = 1 * txns per roll + 1 ; final long end gap tx id = 2 * txns per roll ; file [ ] files = new file ( f 1 , " current " ) list files ( new filename filter ( ) { @ override public boolean accept ( file dir , string name ) { if ( name starts with ( n n storage get finalized edits file name ( start gap tx id , end gap tx id ) ) ) { return true ; } return false ; } } ) ; assert equals ( 1 , files length ) ; assert true ( files [ 0 ] delete ( ) ) ; f s edit log editlog = get f s edit log ( storage ) ; editlog init journals for write ( ) ; long start tx id = 1 ; try { editlog select input streams ( start tx id , 4 * txns per roll ) ; fail ( " should have thrown exception " ) ; } catch ( i o exception ioe ) { generic test utils assert exception contains ( " gap in transactions expected to be able to read up until " + " at least txid 40 but unable to find any edit logs containing " + " txid 11 " , ioe ) ; } }


checks to see if a list of ssa registers can all be mapped into the same rop reg ignores registers that have already been mapped , and checks the interference graph and ensures the range does not cross the parameter range

private boolean can map regs ( array list < register spec > specs , int rop reg ) { for ( register spec spec : specs ) { if ( ssa regs mapped get ( spec get reg ( ) ) ) continue ; if ( ! can map reg ( spec , rop reg ) ) return false ; } return true ; }


public boolean get bool item ( ) { return bool item ; }


compute the path where the output of a given job attempt will be placed for the magic committer , the path includes the job uuid

protected path get job attempt path ( int app attempt id ) { return get magic job attempt path ( get u u i d ( ) , get output path ( ) ) ; }


attempt to solve an expression converts the given goal to a fully - defined { @ link masked long } and then solves as before

protected static assembly resolution solve or backfill ( pattern expression exp , long goal , map < string , long > vals , map < integer , object > res , assembly resolved constructor cur , string description ) { return solve or backfill ( exp , masked long from long ( goal ) , vals , res , cur , description ) ; }


string information about a summary entry for debug messages

public static string stringify ( s 3 object summary summary ) { string builder builder = new string builder ( summary get key ( ) length ( ) + 100 ) ; builder append ( summary get key ( ) ) append ( ' ' ) ; builder append ( " size = " ) append ( summary get size ( ) ) ; return builder to string ( ) ; }


checks expected rule invariants , throws rule errors if anything is set wrong

private static void validate rule context ( rule context rule context ) throws interrupted exception , rule error exception {


public float get max force ( ) { return m max force ; }


debug method for dumping information from this { @ link abstract symbol information } header

protected void dump hash header ( string builder builder ) { builder append ( " hash header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ n " ) ; builder append ( " header signature : " ) ; builder append ( header signature ) ; builder append ( " \ nversion number : " ) ; builder append ( version number ) ; builder append ( " \ nlength hash records : " ) ; builder append ( hash records length ) ; builder append ( " \ nlength buckets : " ) ; builder append ( buckets length ) ; builder append ( " \ n end hash header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ n " ) ; }


constructs the java source info provider from the provided java sources

public java source info provider build ( ) { return new java source info provider ( source files , source jars , jar files , source jars for jar files , resources ) ; }


updated user this can only be done by the logged in user

public single < void > rx update user ( string username , user body ) { return single create ( new io vertx rx java single on subscribe adapter < > ( fut - > delegate update user ( username , body , fut ) ) ) ; }


ensures that all of the internal structures in the hash bi map are ready for this many elements

private void ensure capacity ( int min capacity ) { if ( next in bucket k to v length < min capacity ) { int old capacity = next in bucket k to v length ; int new capacity = immutable collection builder expanded capacity ( old capacity , min capacity ) ; keys = arrays copy of ( keys , new capacity ) ; values = arrays copy of ( values , new capacity ) ; next in bucket k to v = expand and fill with absent ( next in bucket k to v , new capacity ) ; next in bucket v to k = expand and fill with absent ( next in bucket v to k , new capacity ) ; prev in insertion order = expand and fill with absent ( prev in insertion order , new capacity ) ; next in insertion order = expand and fill with absent ( next in insertion order , new capacity ) ; } if ( hash table k to v length < min capacity ) { int new table size = hashing closed table size ( min capacity , 1 0 ) ; hash table k to v = create filled with absent ( new table size ) ; hash table v to k = create filled with absent ( new table size ) ; for ( int entry to rehash = 0 ; entry to rehash < size ; entry to rehash + + ) { int key hash = hashing smeared hash ( keys [ entry to rehash ] ) ; int key bucket = bucket ( key hash ) ; next in bucket k to v [ entry to rehash ] = hash table k to v [ key bucket ] ; hash table k to v [ key bucket ] = entry to rehash ; int value hash = hashing smeared hash ( values [ entry to rehash ] ) ; int value bucket = bucket ( value hash ) ; next in bucket v to k [ entry to rehash ] = hash table v to k [ value bucket ] ; hash table v to k [ value bucket ] = entry to rehash ; } } }


public offset date time get date time ( ) { return date time ; }


public component get active component ( ) { if ( focused placeholder ! = null ) { return focused placeholder get component ( ) ; } return null ; }


determine if the handler type referenced is unaligned

public boolean is unaligned ( ) { return is bit set ( unaligned bit ) ; }


hook for subclasses to lazily set block locations the { @ link # locations } field should be null before this is called

protected void set block locations ( block location [ ] locations ) { this locations = locations ; }


static string get date string ( long time ) { if ( time < = 0 ) { return " - " ; } date date = new date ( time ) ; simple date format sdf = new simple date format ( date format ) ; return sdf format ( date ) ; }


public string get prefix string ( ) { return prefix string ; }


public list < integer > get prefix ns wrapped array ( ) { return prefix ns wrapped array ; }


configure one or more hosts associated with the application all other hosts will be considered external hosts in effect , this property provides a way turn off encoding on redirect via { @ link http servlet response # encode redirect u r l } for u r ls that have a host and that host is not listed as a known host if not set ( the default ) all u r ls are encoded through the response

public void set redirect hosts ( @ nullable string redirect hosts ) { this redirect hosts = redirect hosts ; }


test to ensure the setter will throw illegal argument exception

public void test enum discriminator ( ) throws exception { child cat cc = new child cat ( ) ; cc set pet type ( " child cat " ) ; assert equals ( " child cat " , cc get pet type ( ) ) ; cc set pet type ( " wrong value " ) ; }


ensures the truth of an expression involving the state of the calling instance , but not involving any parameters to the calling method see { @ link # check state ( boolean , string , object ) } for details

public static void check state ( boolean b , @ nullable decl string error message template , char p 1 , char p 2 ) { if ( ! b ) { throw new illegal state exception ( lenient format ( error message template , p 1 , p 2 ) ) ; } }


returns true if the output should bypass output filtering this is used for test actions

boolean shows output unconditionally ( ) ;


adds the j cache specification ' s lazy expiration settings

public void add lazy expiration ( ) { duration creation = get duration for ( " policy lazy - expiration creation " ) ; duration update = get duration for ( " policy lazy - expiration update " ) ; duration access = get duration for ( " policy lazy - expiration access " ) ; require non null ( creation , " policy lazy - expiration creation may not be null " ) ; boolean eternal = objects equals ( creation , duration eternal ) & & objects equals ( update , duration eternal ) & & objects equals ( access , duration eternal ) ; @ suppress warnings ( " null away " ) factory < ? extends expiry policy > factory = eternal ? eternal expiry policy factory of ( ) : factory builder factory of ( new j cache expiry policy ( creation , update , access ) ) ; configuration set expiry policy factory ( factory ) ; }


triggers a ' save as ' dialog that allows the user to save off the tool under a different name this returns true if the user performed a save

public boolean save tool as ( ) { return dialog mgr save tool as ( ) ; }


update the bounds to be within visible bounds of the screen the given component is used to determine which screen to use for updating the bounds < p > note : the given comonent ' s bounds will not be adjusted by this method

public static void ensure on screen ( component c , rectangle bounds ) { shape visible screen bounds = get visible screen bounds ( ) ; if ( visible screen bounds contains ( bounds ) ) { return ; / / the given shape is completely on the screen } rectangle screen = get screen bounds ( c ) ; if ( screen = = null ) { throw new illegal argument exception ( " component is not on screen : " + c ) ; } point new point = center ( screen , bounds get size ( ) ) ; bounds set location ( new point ) ; }


adds a search index under the keyword ' name ' to the given url

public search index builder add ( string url , string name ) { items add ( search items create ( name , url ) ) ; return this ; }


set the < code > execution type request < code > of the requested container

public void set execution type request ( execution type request exec spec ) { throw new unsupported operation exception ( ) ; }


listing get listing ( ) { return program get listing ( ) ; }


return whether this code unit has an automatic comment ( i e any memory reference from this code unit has a function defined at the reference ' s to address , or if the to address is a pointer )

public boolean has automatic ( ) { return ( display comment arrays [ my automatic ] ! = null ) & & ( display comment arrays [ my automatic ] length > 0 ) ; }


notifies the tree that a node has changed

public void fire node changed ( g tree node parent node , g tree node node ) { swing run now ( ( ) - > do fire node changed ( ) ) ; }


add node to the map return true if the node is added ; false otherwise

boolean add ( datanode descriptor node ) { hostmap lock write lock ( ) lock ( ) ; try { if ( node = = null | | contains ( node ) ) { return false ; } string ip addr = node get ip addr ( ) ; string hostname = node get host name ( ) ; map host put ( hostname , ip addr ) ; datanode descriptor [ ] nodes = map get ( ip addr ) ; datanode descriptor [ ] new nodes ; if ( nodes = = null ) { new nodes = new datanode descriptor [ 1 ] ; new nodes [ 0 ] = node ; } else { / / rare case : more than one datanode on the host new nodes = new datanode descriptor [ nodes length + 1 ] ; system arraycopy ( nodes , 0 , new nodes , 0 , nodes length ) ; new nodes [ nodes length ] = node ; } map put ( ip addr , new nodes ) ; return true ; } finally { hostmap lock write lock ( ) unlock ( ) ; } }


get the number of partitions for the given topic

public integer partition count for topic ( string topic ) { list < partition info > partitions = this partitions by topic get ( topic ) ; return partitions = = null ? null : partitions size ( ) ; }


register the given list of transaction synchronizations with the existing transaction invoked when the control of the spring transaction manager and thus all spring transaction synchronizations end , without the transaction being completed yet this is for example the case when participating in an existing jta or ejb cmt transaction the default implementation simply invokes the { @ code after completion } methods immediately , passing in " status unknown " this is the best we can do if there ' s no chance to determine the actual outcome of the outer transaction

protected mono < void > register after completion with existing transaction ( transaction synchronization manager synchronization manager , object transaction , list < transaction synchronization > synchronizations ) throws transaction exception { logger debug ( " cannot register spring after - completion synchronization with existing transaction - " + " processing spring after - completion callbacks immediately , with outcome status ' unknown ' " ) ; return invoke after completion ( synchronization manager , synchronizations , transaction synchronization status unknown ) ; }


tries to perform a " full " garbage collection cycle ( including processing of weak references and invocation of finalize methods ) and waits for it to complete ensures that at least one weak reference has been cleared and one { @ code finalize } method has been run before this method returns this method may be useful when testing the garbage collection mechanism itself , or inhibiting a spontaneous gc initiation in subsequent code in contrast , a plain call to { @ link java lang system # gc ( ) } does not ensure finalization processing and may run concurrently , for example , if the jvm flag { @ code - xx : + explicit g c invokes concurrent } is used whenever possible , it is preferable to test directly for some observable change resulting from gc , as with { @ link # await clear } because there are no guarantees for the order of gc finalization processing , there may still be some unfinished work for the gc to do after this method returns this method does not create any memory pressure as would be required to cause soft references to be processed

public static void await full gc ( ) { final count down latch finalizer ran = new count down latch ( 1 ) ; weak reference < object > ref = new weak reference < object > ( new object ( ) { @ override protected void finalize ( ) { finalizer ran count down ( ) ; } } ) ; await ( finalizer ran ) ; await clear ( ref ) ; / / hope to catch some stragglers queued up behind our finalizable object system run finalization ( ) ; }


bin - copies fields from a source record to this record the following caveats apply : if the source field is in a modified state , no binary representation will exist yet in that case , this method is equivalent to { @ code set field ( , source get field ( , < class > ) ) } in particular , if set value is called on the source field value instance , that change will propagate to this record if the source field has already been serialized , then the binary representation will be copied further modifications to the source field will not be observable via this record , but attempting to read the field from this record will cause it to be deserialized finally , bin - copying a source field requires calling update binary representation on this instance in order to reserve space in the binary data array if none of the source fields are actually bin - copied , then update binary representation won ' t be called

public void copy from ( final record source , final int [ ] source positions , final int [ ] target positions ) { final int [ ] source offsets = source offsets ; final int [ ] source lengths = source lengths ; final byte [ ] source buffer = source binary data ; final value [ ] source fields = source write fields ; boolean any field is binary = false ; int max field num = 0 ; for ( int i = 0 ; i < source positions length ; i + + ) { final int source field num = source positions [ i ] ; final int source offset = source offsets [ source field num ] ; final int target field num = target positions [ i ] ; max field num = math max ( target field num , max field num ) ; if ( source offset = = null indicator offset ) { / / set null on existing field ( new fields are null by default ) if ( target field num < num fields ) { internally set field ( target field num , null ) ; } } else if ( source offset ! = modified indicator offset ) { any field is binary = true ; } } if ( num fields < max field num + 1 ) { set num fields ( max field num + 1 ) ; } final int [ ] target lengths = this lengths ; final int [ ] target offsets = this offsets ; / / reserve space in binary data for the binary source fields if ( any field is binary ) { for ( int i = 0 ; i < source positions length ; i + + ) { final int source field num = source positions [ i ] ; final int source offset = source offsets [ source field num ] ; if ( source offset ! = modified indicator offset & & source offset ! = null indicator offset ) { final int target field num = target positions [ i ] ; target lengths [ target field num ] = source lengths [ source field num ] ; internally set field ( target field num , reserve space ) ; } } update binary represenation ( ) ; } final byte [ ] target buffer = this binary data ; for ( int i = 0 ; i < source positions length ; i + + ) { final int source field num = source positions [ i ] ; final int source offset = source offsets [ source field num ] ; final int target field num = target positions [ i ] ; if ( source offset = = modified indicator offset ) { internally set field ( target field num , source fields [ source field num ] ) ; } else if ( source offset ! = null indicator offset ) { / / bin - copy final int target offset = target offsets [ target field num ] ; final int length = target lengths [ target field num ] ; system arraycopy ( source buffer , source offset , target buffer , target offset , length ) ; } } }


called after writing sample data may cause { @ link # write allocation node } to be advanced

private void post append ( int length ) { total bytes written + = length ; if ( total bytes written = = write allocation node end position ) { write allocation node = write allocation node next ; } }


picks an order for the blocks by doing " trace " analysis

private void pick order ( ) { basic block list blocks = method get blocks ( ) ; int sz = blocks size ( ) ; int max label = blocks get max label ( ) ; int [ ] work set = bits make bit set ( max label ) ; int [ ] traceback set = bits make bit set ( max label ) ; for ( int i = 0 ; i < sz ; i + + ) { basic block one = blocks get ( i ) ; bits set ( work set , one get label ( ) ) ; } int [ ] order = new int [ sz ] ; int at = 0 ; / * * starting with the designated " first label " ( that is , the * first block of the method ) , add that label to the order , * and then pick its first as - yet unordered successor to * immediately follow it , giving top priority to the primary * ( aka default ) successor ( if any ) keep following successors * until the trace runs out of possibilities then , continue * by finding an unordered chain containing the first as - yet * unordered block , and adding it to the order , and so on * / for ( int label = method get first label ( ) ; label ! = - 1 ; label = bits find first ( work set , 0 ) ) { / * * attempt to trace backward from the chosen block to an * as - yet unordered predecessor which lists the chosen * block as its primary successor , and so on , until we * fail to find such an unordered predecessor start the * trace with that block note that the first block in the * method has no predecessors , so in that case this loop * will simply terminate with zero iterations and without * picking a new starter block * / trace back : for ( ; ; ) { int list preds = method label to predecessors ( label ) ; int psz = preds size ( ) ; for ( int i = 0 ; i < psz ; i + + ) { int pred label = preds get ( i ) ; if ( bits get ( traceback set , pred label ) ) { / * * we found a predecessor loop ; stop tracing back * from here * / break ; } if ( ! bits get ( work set , pred label ) ) { / / this one ' s already ordered continue ; } basic block pred = blocks label to block ( pred label ) ; if ( pred get primary successor ( ) = = label ) { / / found one ! label = pred label ; bits set ( traceback set , label ) ; continue trace back ; } } / / failed to find a better block to start the trace break ; } / * * trace a path from the chosen block to one of its * unordered successors ( hopefully the primary ) , and so * on , until we run out of unordered successors * / while ( label ! = - 1 ) { bits clear ( work set , label ) ; bits clear ( traceback set , label ) ; order [ at ] = label ; at + + ; basic block one = blocks label to block ( label ) ; basic block preferred block = blocks preferred successor of ( one ) ; if ( preferred block = = null ) { break ; } int preferred = preferred block get label ( ) ; int primary = one get primary successor ( ) ; if ( bits get ( work set , preferred ) ) { / * * order the current block ' s preferred successor * next , as it has yet to be scheduled * / label = preferred ; } else if ( ( primary ! = preferred ) & & ( primary > = 0 ) & & bits get ( work set , primary ) ) { / * * the primary is available , so use that * / label = primary ; } else { / * * there ' s no obvious candidate , so pick the first * one that ' s available , if any * / int list successors = one get successors ( ) ; int ssz = successors size ( ) ; label = - 1 ; for ( int i = 0 ; i < ssz ; i + + ) { int candidate = successors get ( i ) ; if ( bits get ( work set , candidate ) ) { label = candidate ; break ; } } } } } if ( at ! = sz ) { / / there was a duplicate block label throw new runtime exception ( " shouldn ' t happen " ) ; } this order = order ; }


expand the columns expression in the input expression list

private list < expression > resolve args of columns ( list < expression > args , boolean is reverse projection ) { list < expression > final result = new linked list < > ( ) ; list < unresolved reference expression > result = args stream ( ) flat map ( e - > e accept ( this columns expression expander ) stream ( ) ) collect ( collectors to list ( ) ) ; if ( is reverse projection ) { for ( unresolved reference expression field : input field references ) { if ( index of name ( result , field get name ( ) ) = = - 1 ) { final result add ( field ) ; } } } else { final result add all ( result ) ; } return final result ; }


public string get last name ( ) { return last name ; }


protected path write text output ( task attempt context context ) throws i o exception , interrupted exception { describe ( " write output " ) ; try ( duration info d = new duration info ( log , " writing text output for task % s " , context get task attempt i d ( ) ) ) { logging text output format logging line record writer < object , object > record writer = new logging text output format < > ( ) get record writer ( context ) ; write output ( record writer , context ) ; return record writer get dest ( ) ; } }


returns the least value present in { @ code array }

public static long min ( long array ) { check argument ( array length > 0 ) ; long min = array [ 0 ] ; for ( int i = 1 ; i < array length ; i + + ) { if ( array [ i ] < min ) { min = array [ i ] ; } } return min ; }


recursively searches a given directory for any module manifest and extension properties files that are in an uninstalled state and restores them specifically , the following will be renamed : < ul > < li > module manifest uninstalled to module manifest < li > < li > extension properties uninstalled = extension properties < li > < ul >

public static boolean restore state files ( file root dir ) { boolean success = true ; list < file > manifest files = new array list < > ( ) ; find files with name ( root dir , module utilities manifest file name uninstalled , manifest files ) ; for ( file f : manifest files ) { if ( f exists ( ) ) { file new file = new file ( f get absolute path ( ) replace ( module utilities manifest file name uninstalled , module utilities manifest file name ) ) ; if ( ! f rename to ( new file ) ) { success = false ; } } } list < file > prop files = new array list < > ( ) ; find files with name ( root dir , properties file name uninstalled , prop files ) ; for ( file f : prop files ) { if ( f exists ( ) ) { file new file = new file ( f get absolute path ( ) replace ( properties file name uninstalled , properties file name ) ) ; if ( ! f rename to ( new file ) ) { success = false ; } } } return success ; }


appends the node to the tail of the list

public void append to tail ( node head ) { node tail = head prev ; head prev = this ; tail next = this ; next = head ; prev = tail ; }


determines whether { @ code lane size in bytes } is a valid lane size for this register

public boolean is valid lane size ( int lane size in bytes ) { if ( ! is vector register ( ) ) { return false ; } if ( lane sizes = = null ) { return false ; } return lane sizes contains ( lane size in bytes ) ; }


checks if an address is already trusted and then sends client sasl negotiation if required

private i o stream pair check trust and send ( inet address addr , output stream underlying out , input stream underlying in , data encryption key factory encryption key factory , token < block token identifier > access token , datanode i d datanode id , secret key secret key ) throws i o exception { boolean local trusted = trusted channel resolver is trusted ( ) ; boolean remote trusted = trusted channel resolver is trusted ( addr ) ; log debug ( " sasl encryption trust check : local host trusted = { } , " + " remote host trusted = { } " , local trusted , remote trusted ) ; if ( ! local trusted | | ! remote trusted ) { / / the encryption key factory only returns a key if encryption is enabled data encryption key encryption key = encryption key factory new data encryption key ( ) ; return send ( addr , underlying out , underlying in , encryption key , access token , datanode id , secret key ) ; } else { log debug ( " sasl client skipping handshake on trusted connection for addr = { } , " + " datanode id = { } " , addr , datanode id ) ; return null ; } }


static collection < object [ ] > data provider ( ) { return list of ( new object [ ] { new melee strategy ( ) , " with your excalibur you sever the dragon ' s head ! " } , new object [ ] { new projectile strategy ( ) , " you shoot the dragon with the magical crossbow and it falls dead on the ground ! " } , new object [ ] { new spell strategy ( ) , " you cast the spell of disintegration and the dragon vaporizes in a pile of dust ! " } ) ; }


public final cancellable delete async ( delete request delete request , request options options , action listener < delete response > listener ) { return perform request async and parse entity ( delete request , request converters : : delete , options , delete response : : from x content , listener , collections singleton ( 404 ) ) ; }


resolve the specified not - unique scenario : by default , throwing a { @ link no unique bean definition exception } subclasses may override this to select one of the instances or to opt out with no result at all through returning { @ code null }

public object resolve not unique ( class < ? > type , map < string , object > matching beans ) throws beans exception { throw new no unique bean definition exception ( type , matching beans key set ( ) ) ; }


overridden to ensure that we only place block comments on the first { @ link code unit } of the block

public field location get field location ( listing field listing field , big integer index , int field num , program location program loc ) { / / only handle this if it ' s the right kind of location object if ( ! ( program loc instanceof memory block start field location ) ) { return null ; } memory block start field location block location = ( memory block start field location ) program loc ; object obj = listing field get proxy ( ) get object ( ) ; if ( obj instanceof code unit ) { code unit cu = ( code unit ) obj ; memory block block = cu get memory ( ) get block ( cu get address ( ) ) ; if ( block = = null ) { return null ; } / / if the code unit does not rest at the beginning of a memory block , no need / / to handle this if ( cu get min address ( ) equals ( block get start ( ) ) ) { if ( listing field instanceof listing text field ) { listing text field listing text field = ( listing text field ) listing field ; row col location location = listing text field data to screen location ( block location get row ( ) , block location get char offset ( ) ) ; return new field location ( index , field num , location row ( ) , location col ( ) ) ; } } } return null ; }


test to make sure 0 20 204 supports delegation token

public void test release 2 0 4 ( ) { assert true ( name node layout version supports ( layout version feature delegation token , feature reserved rel20 204 get info ( ) get layout version ( ) ) ) ; }


makes a simple http get request to the price microservice

public string get price ( ) { var http client = http client new http client ( ) ; var http get = http request new builder ( ) get ( ) uri ( uri create ( " http : / / localhost : 50006 / price " ) ) build ( ) ; try { logger info ( " sending request to fetch price info " ) ; var http response = http client send ( http get , body handlers of string ( ) ) ; log response ( http response ) ; return http response body ( ) ; } catch ( i o exception | interrupted exception e ) { logger error ( " failure occurred while getting price info " , e ) ; } return null ; }


public void set count ( phase phase , step step , long count ) { lazy init step ( phase , step ) count set ( count ) ; }


interrupt the execution mark the cause and the status accordingly

public void interrupt ( result result , cause of interruption causes ) { interrupt ( result , false , causes ) ; }


build a locale context for the given request , exposing the request ' s primary locale as current locale

protected locale context build locale context ( http servlet request request ) { return new simple locale context ( request get locale ( ) ) ; }


converts an array of integers in the range [ 0 , 255 ] into an equivalent byte array

private static byte [ ] create byte array ( int bytes ) { byte [ ] byte array = new byte [ bytes length ] ; for ( int i = 0 ; i < byte array length ; i + + ) { assertions check state ( 0x 0 0 < = bytes [ i ] & & bytes [ i ] < = 0x f f ) ; byte array [ i ] = ( byte ) bytes [ i ] ; } return byte array ; }


returns true iff the process exited normally

public boolean exited ( ) { return ! timed out & & ( wait result < signal 1 | | wait result > signal 63 ) ; }


returns the index of the last operation that is not a nop

public int get last active op index ( ) { return last active op index ; }


returns a string such that all uppercase characters in the given string are replaced by the mangle char followed by the lowercase version of the character mangle c h a rs are replaced by 2 mangle c h a rs this method is to get around the stupid windows problem where filenames are not case sensitive under windows , foo exe and foo exe represent the same filename to fix this we mangle names first such that foo exe becomes foo exe

public static string mangle ( string name ) { int len = name length ( ) ; string buffer buf = new string buffer ( 2 * len ) ; for ( int i = 0 ; i < len ; i + + ) { char c = name char at ( i ) ; if ( c = = mangle char ) { buf append ( mangle char ) ; buf append ( mangle char ) ; } else if ( character is upper case ( c ) ) { buf append ( mangle char ) ; buf append ( character to lower case ( c ) ) ; } else { buf append ( c ) ; } } return buf to string ( ) ; }


initializes all file system instances used in the tests

private void init file systems ( ) throws exception { fs = create file system ( ) ; fs as bruce = create file system ( bruce ) ; fs as diana = create file system ( diana ) ; fs as bob = create file system ( bob ) ; fs as supergroup member = create file system ( supergroup member ) ; }


returns a unicode string of < code > length < code > bytes starting at < code > index < code > this method does not care about null - terminators

public string read unicode string ( long index , int length ) throws i o exception { string buffer buffer = new string buffer ( ) ; char c = 0 ; for ( int i = 0 ; i < length * 2 ; i + = 2 ) { c = ( char ) ( ( provider read byte ( index + + ) & 0xff ) ) ; c + = ( char ) ( ( provider read byte ( index + + ) & 0xff ) < < 8 ) ; buffer append ( c ) ; } return buffer to string ( ) trim ( ) ; }


return the attribute of the specified keyed object as a string

public string get value as string ( keyed object o ) { return get value ( o ) ; }


get the value of the ' { @ code onmousemove } ' attribute may be a runtime expression

protected string get onmousemove ( ) { return this onmousemove ; }