constructs all the necessary information to start the mr am

public application submission context create application submission context ( configuration job conf , string job submit dir , credentials ts ) throws i o exception { application id application id = res mgr delegate get application id ( ) ; / / setup local resources map < string , local resource > local resources = setup local resources ( job conf , job submit dir ) ; / / setup security tokens data output buffer dob = new data output buffer ( ) ; ts write token storage to stream ( dob ) ; byte buffer security tokens = byte buffer wrap ( dob get data ( ) , 0 , dob get length ( ) ) ; / / setup container launch context for am container list < string > vargs = setup a m command ( job conf ) ; container launch context am container = setup container launch context for a m ( job conf , local resources , security tokens , vargs ) ; string regex = conf get ( m r job config mr job send token conf ) ; if ( regex ! = null & & ! regex is empty ( ) ) { set token renewer conf ( am container , conf , regex ) ; } collection < string > tags from conf = job conf get trimmed string collection ( m r job config job tags ) ; / / set up the application submission context application submission context app context = record factory new record instance ( application submission context class ) ; app context set application id ( application id ) ; / / application id app context set queue ( / / queue name job conf get ( job context queue name , yarn configuration default queue name ) ) ; / / add reservation i d if present reservation id reservation i d = null ; try { reservation i d = reservation id parse reservation id ( job conf get ( job context reservation id ) ) ; } catch ( number format exception e ) { / / throw exception as reservationid as is invalid string err msg = " invalid reservation id : " + job conf get ( job context reservation id ) + " specified for the app : " + application id ; log warn ( err msg ) ; throw new i o exception ( err msg ) ; } if ( reservation i d ! = null ) { app context set reservation i d ( reservation i d ) ; log info ( " submitting application submission context app : " + application id + " to queue : " + app context get queue ( ) + " with reservation id : " + app context get reservation i d ( ) ) ; } app context set application name ( / / job name job conf get ( job context job name , yarn configuration default application name ) ) ; app context set cancel tokens when complete ( conf get boolean ( m r job config job cancel delegation token , true ) ) ; app context set a m container spec ( am container ) ; / / am container app context set max app attempts ( conf get int ( m r job config mr am max attempts , m r job config default mr am max attempts ) ) ; / / setup the am resource requests list < resource request > am resource requests = generate resource requests ( ) ; app context set a m container resource requests ( am resource requests ) ; / / set labels for the am container requests if present string am nodelabel expression = conf get ( m r job config am node label exp ) ; if ( null ! = am nodelabel expression & & am nodelabel expression trim ( ) length ( ) ! = 0 ) { for ( resource request am resource request : am resource requests ) { am resource request set node label expression ( am nodelabel expression trim ( ) ) ; } } / / set labels for the job containers app context set node label expression ( job conf get ( job context job node label exp ) ) ; app context set application type ( m r job config mr application type ) ; if ( tags from conf ! = null & & ! tags from conf is empty ( ) ) { app context set application tags ( new hash set < > ( tags from conf ) ) ; } string job priority = job conf get ( m r job config priority ) ; if ( job priority ! = null ) { int i priority ; try { i priority = type converter to yarn application priority ( job priority ) ; } catch ( illegal argument exception e ) { i priority = integer parse int ( job priority ) ; } app context set priority ( priority new instance ( i priority ) ) ; } return app context ; }


return a future which succeeds if all the feature updates succeed

public kafka future < void > all ( ) { return kafka future all of ( futures values ( ) to array ( new kafka future [ 0 ] ) ) ; }


return true if this array test object is equal to o

public boolean equals ( object o ) { if ( this = = o ) { return true ; } if ( o = = null | | get class ( ) ! = o get class ( ) ) { return false ; } array test array test = ( array test ) o ; return objects equals ( this array of string , array test array of string ) & & objects equals ( this array array of integer , array test array array of integer ) & & objects equals ( this array array of model , array test array array of model ) ; }


@ override protected void init ( service record service record ) throws exception { super init ( service record ) ; if ( get target ( ) = = null ) { return ; } try { this set target ( get ipv 6 address ( get target ( ) ) ) ; } catch ( unknown host exception e ) { throw new illegal state exception ( e ) ; } }


returns true if this history list ' s current item pointer is not at the end of the list

public boolean has next ( ) { boolean has next = history index < history stack size ( ) - 1 ; return has next ; }


shortcut for calling { @ link # write ( object , channel matcher , boolean ) } and { @ link # flush ( ) } and only act on { @ link channel } s that are matched by the { @ link channel matcher }

channel group future write and flush ( object message , channel matcher matcher , boolean void promise ) ;


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


checks for an invokable constructor matching the given arguments

public static boolean has invokable constructor ( class < ? > clazz , class < ? > classes ) { for ( constructor < ? > constructor : clazz get declared constructors ( ) ) { if ( is invokable ( constructor , classes ) ) { return true ; } } return false ; }


visits an instance field access the field could be of the visited class or it could be an accessible field from the class being visited ( unless it ' s private ) for private instance fields , the access instruction is rewritten to calls to reflection to access the fields value : pseudo code for get : < code > value = $ instance field name ; < code > becomes : < code > value = ( unbox ) $ package android instant runtime get private field ( $ instance , $ field name ) ; < code > pseudo code for set : < code > $ instance field name = value ; < code > becomes : < code > $ package android instant runtime set private field ( $ instance , value , $ field name ) ; < code >

private boolean visit field access ( int opcode , string owner , string name , string desc , access right access right ) { / / if the accessed field is anything but public , we must go through reflection boolean use reflection = access right ! = access right public ; / / if the accessed field is accessed from within a constructor , it might be a public / / final field that cannot be set by anything but the original constructor unless / / we use reflection if ( ! use reflection ) { use reflection = is constructor & & ( owner equals ( visited class name ) ) ; } if ( use reflection ) { / / we should make this more efficient , have a per field access type method / / for getting and setting field values switch ( opcode ) { case opcodes getfield : if ( debug ) { system out println ( " get field " ) ; } / / push declaring class visit ldc insn ( type get type ( " l " + owner + " ; " ) ) ; / / the instance of the owner class we are getting the field value from / / is on top of the stack it could be " this " push ( name ) ; / / stack : < receiver > / / < field declaring class > / / < field name > invoke static ( ali runtime type , method get method ( " object get private field ( object , class , string ) " ) ) ; / / stack : < field value > byte code utils unbox ( this , type get type ( desc ) ) ; break ; case opcodes putfield : if ( debug ) { system out println ( " set field " ) ; } / / the instance of the owner class we are getting the field value from / / is second on the stack it could be " this " / / top of the stack is the new value we are trying to set , box it box ( type get type ( desc ) ) ; / / push declaring class visit ldc insn ( type get type ( " l " + owner + " ; " ) ) ; / / push the field name push ( name ) ; / / stack : < receiver > / / < boxed field value > / / < field declaring class > / / < field name > invoke static ( ali runtime type , method get method ( " void set private field ( object , object , class , string ) " ) ) ; break ; default : throw new runtime exception ( " visit field access called with wrong opcode " + opcode ) ; } return true ; } / / if this is a public field , no need to change anything we can access it from the / / $ override class return false ; }


invoked when any change to the structure of the column filter model occurs such as adding entries


attach a { @ link terminal session } to this view

public boolean attach session ( terminal session session ) { if ( session = = m term session ) return false ; m top row = 0 ; m term session = session ; m emulator = null ; m combining accent = 0 ; update size ( ) ; / / wait with enabling the scrollbar until we have a terminal to get scroll position from set vertical scroll bar enabled ( true ) ; return true ; }


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


recursively check if any descendants of this node is in the view

boolean has descendants in view ( ) { if ( is in view ) { return true ; } for ( int i = 0 ; i < get child count ( ) ; i + + ) { program node child = ( program node ) get child at ( i ) ; if ( child is in view ( ) ) { return true ; } if ( child get allows children ( ) ) { if ( child has descendants in view ( ) ) { return true ; } } } return false ; }


normalize the geo { @ code point } for its coordinates to lie within their respective normalized ranges note : a shift of 180 & deg ; is applied in the longitude if necessary , in order to normalize properly the latitude

public static void normalize point ( geo point point ) { normalize point ( point , true , true ) ; }


returns the result of { @ link future # get ( ) } , converting most exceptions to a new instance of the given checked exception type this reduces boilerplate for a common use of { @ code future } in which it is unnecessary to programmatically distinguish between exception types or to extract other information from the exception instance exceptions from { @ code future get } are treated as follows : any { @ link execution exception } has its cause wrapped in an { @ code x } if the cause is a checked exception , an { @ link unchecked execution exception } if the cause is a { @ code runtime exception } , or an { @ link execution error } if the cause is an { @ code error } any { @ link interrupted exception } is wrapped in an { @ code x } ( after restoring the interrupt ) any { @ link cancellation exception } is propagated untouched , as is any other { @ link runtime exception } ( though { @ code get } implementations are discouraged from throwing such exceptions ) the overall principle is to continue to treat every checked exception as a checked exception , every unchecked exception as an unchecked exception , and every error as an error in addition , the cause of any { @ code execution exception } is wrapped in order to ensure that the new stack trace matches that of the current thread instances of { @ code exception class } are created by choosing an arbitrary public constructor that accepts zero or more arguments , all of type { @ code string } or { @ code throwable } ( preferring constructors with at least one { @ code string } ) and calling the constructor via reflection if the exception did not already have a cause , one is set by calling { @ link throwable # init cause ( throwable ) } on it if no such constructor exists , an { @ code illegal argument exception } is thrown

public static < v , x extends exception > v get checked ( future < v > future , class < x > exception class ) throws x { return futures get checked get checked ( future , exception class ) ; }


initializes the extractor with an { @ link extractor output } called at most once

void init ( extractor output extractor output ) ;


creates a new builder with the given host and port

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


returns the labels for this metrics context

map < string , string > context labels ( ) ;


requires { @ link feature # fake } to be understood for use in testing consumers of this credential

public builder require fake feature ( ) { fake feature = true ; return this ; }


private void initialize table ( ) { model = new checksum table model ( tool , checksums ) ; table = new ghidra table ( model ) ; table set selection mode ( list selection model single selection ) ; }


public void set short ( int parameter index , short x ) throws s q l exception { }


public void remove ( object obj ) { shared remove ( obj ) ; }


returns a flat map from jars to dex archives transitively produced for the given dexopts

public map < artifact , artifact > archives for dexopts ( immutable set < string > dexopts ) { / / can ' t use immutable map because we can encounter the same key - value pair multiple times / / use linked hash map in case someone tries to iterate this map ( not the case as of 2 / 2017 ) linked hash map < artifact , artifact > result = new linked hash map < > ( ) ; for ( immutable table < immutable set < string > , artifact , artifact > partial mapping : dex archives to list ( ) ) { result put all ( partial mapping row ( dexopts ) ) ; } return result ; }


get the list of partitions whose leader is this node

public list < partition info > partitions for node ( int node id ) { return partitions by node get or default ( node id , collections empty list ( ) ) ; }


it should be illegal to dereference a normal bean as a factory

public void rejects factory get on normal bean ( ) { assert that exception of type ( bean is not a factory exception class ) is thrown by ( ( ) - > get bean factory ( ) get bean ( " & rod " ) ) ; }


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


calls { @ link future # get ( ) } without the checked exceptions

public static < t > t get ( future < t > future ) { try { return future get ( ) ; } catch ( interrupted exception e ) { thread current thread ( ) interrupt ( ) ; throw new illegal state exception ( " future got interrupted " , e ) ; } catch ( execution exception e ) { throw rethrow execution exception ( e ) ; } }


protected void copy file to target ( path data src , path data target ) throws i o exception { final boolean preserve raw xattrs = check paths for reserved raw ( src path , target path ) ; src fs set verify checksum ( verify checksum ) ; input stream in = null ; try { in = src fs open ( src path ) ; copy stream to target ( in , target ) ; preserve attributes ( src , target , preserve raw xattrs ) ; } finally { i o utils close stream ( in ) ; } }


< code > optional aapt pb array array = 4 ; < code >


returns the protocol identified by { @ code protocol }

public static protocol get ( string protocol ) throws i o exception { / / unroll the loop over values ( ) to save an allocation if ( protocol equals ( http 1 0 protocol ) ) return http 1 0 ; if ( protocol equals ( http 1 1 protocol ) ) return http 1 1 ; if ( protocol equals ( http 2 protocol ) ) return http 2 ; if ( protocol equals ( spdy 3 protocol ) ) return spdy 3 ; throw new i o exception ( " unexpected protocol : " + protocol ) ; }


regression test to ensure there is no npe when the worker has been disposed

public void npe regression ( ) throws exception { scheduler s = get scheduler ( ) ; new thread worker w = ( new thread worker ) s create worker ( ) ; w dispose ( ) ; / / this method used to throw a npe when the worker has been disposed and the parent is null w schedule actual ( new runnable ( ) { @ override public void run ( ) { } } , 0 , time unit milliseconds , null ) ; }


a convenience method to determine if this transferable supports the given flavor

public boolean is data flavor supported ( data flavor flavor ) { data flavor [ ] flavors = transfer handler get supported data flavors ( selected data ) ; for ( data flavor f : flavors ) { if ( f equals ( flavor ) ) { return true ; } } return false ; }


signals the end of input will flush all buffers and notify later stages

public void finish reading ( ) { if ( current buffer ! = null & & ! current buffer get buffer ( ) is empty ( ) ) { this dispatcher send ( sort stage sort , current buffer ) ; } / / add the sentinel to notify the receivers that the work is done / / send the eof marker final circular element < e > eof marker = circular element end marker ( ) ; this dispatcher send ( sort stage sort , eof marker ) ; log debug ( " reading thread done " ) ; }


post usercreate with list : creates list of users with given input array

default response entity < void > create users with list input ( @ api param ( value = " list of user object " , required = true ) @ valid @ request body list < user > body ) { return new response entity < > ( http status not implemented ) ; }


is this logger instance enabled for level severe ?

public boolean is error enabled ( ) { return logger is loggable ( level severe ) ; }


public long get number of vertices ( ) { return vertex count ; }


returns true if field id is set ( has been assigned a value ) and false otherwise

public boolean is set id ( ) { return this id ! = null ; }


returns the set of targets , in sorted order by function name

public set < function > get targets ( ) { return targets ; }


returns an alphabetized list of context registers

public list < string > get context registers ( ) { list < string > context register list = new array list < string > ( context registers size ( ) ) ; context register list add all ( context registers ) ; collections sort ( context register list ) ; return context register list ; }


evaluates the expresson and checks whether it fails with the expected error

scenario test if error contains ( string expected error , string lines ) throws exception { run test ( error testable ( false , expected error , lines ) ) ; return this ; }


bfs traversal of the system under path root , with the entries in the list , in the same order as that of the traversal < b > important : < b > this is not an atomic snapshot of the tree ever , but the state as it exists across multiple r p cs from zk client to the ensemble for practical purposes , it is suggested to bring the clients to the ensemble down ( i e prevent writes to path root ) to ' simulate ' a snapshot behavior

public static list < string > list sub tree b f s ( zoo keeper zk , final string path root ) throws keeper exception , interrupted exception { queue < string > queue = new array deque < > ( ) ; list < string > tree = new array list < string > ( ) ; queue add ( path root ) ; tree add ( path root ) ; while ( ! queue is empty ( ) ) { string node = queue poll ( ) ; list < string > children = zk get children ( node , false ) ; for ( final string child : children ) { final string child path = node + " / " + child ; queue add ( child path ) ; tree add ( child path ) ; } } return tree ; }


creates a feign client for given api interface usage : api client api client = new api client ( ) ; api client set base path ( " http : localhost : 8080 " ) ; x y z api api = api client build client ( x y z api class ) ; x y z response response = api some method ( ) ;

public < t extends api > t build client ( class < t > client class ) { return feign builder target ( client class , base path ) ; }


the name of the tag , and its attributes , encoded as follows : tag name ; attr 1 = value 1 ; attr 2 = value 2 ; [ ] < code > optional string tag = 1 ; < code >

public builder set tag bytes ( com google protobuf byte string value ) { copy on write ( ) ; instance set tag bytes ( value ) ; return this ; }


public void remove change listener ( change listener listener ) { listeners remove ( listener ) ; }


creates a byte datatype at the given address

public final data create byte ( address address ) throws exception { return create data ( address , new byte data type ( ) ) ; }


find the fields constant that matches field id , or null if its not found

public static fields find by thrift id ( int field id ) { switch ( field id ) { case 1 : / / location return location ; case 2 : / / chunk return chunk ; default : return null ; } }


get the absolute version of the path ( fully qualified ) this is public for testing purposes

public path make absolute ( path path ) { if ( path is absolute ( ) ) { return path ; } return new path ( working dir , path ) ; }


schedules a punctuation for the processor

public cancellable schedule ( final long interval , final punctuation type type , final punctuator punctuator ) { switch ( type ) { case stream time : / / align punctuation to 0l , punctuate as soon as we have data return schedule ( 0l , interval , type , punctuator ) ; case wall clock time : / / align punctuation to now , punctuate after interval has elapsed return schedule ( time milliseconds ( ) + interval , interval , type , punctuator ) ; default : throw new illegal argument exception ( " unrecognized punctuation type : " + type ) ; } }


returns a rex simplify the same as this but with a specified { @ link # default unknown as } value

public rex simplify with unknown as false ( boolean unknown as false ) { final rex unknown as default unknown as = rex unknown as false if ( unknown as false ) ; return default unknown as = = this default unknown as ? this : new rex simplify ( rex builder , predicates , default unknown as , predicate elimination , paranoid , executor ) ; }


sets all locations that call the function at entry to be non - returning

protected address set set no fall thru ( program program , address non returning function entry ) { address set called locations = new address set ( ) ; reference iterator ref iter = program get reference manager ( ) get references to ( non returning function entry ) ; while ( ref iter has next ( ) ) { reference ref = ref iter next ( ) ; if ( ! ref get reference type ( ) is call ( ) ) { continue ; } address from addr = ref get from address ( ) ; instruction instr = program get listing ( ) get instruction at ( from addr ) ; if ( instr = = null ) { continue ; } address fallthru addr = instr get fall through ( ) ; if ( instr get flow override ( ) ! = flow override call return & & fallthru addr ! = null ) { instr set flow override ( flow override call return ) ; / / some overriden flows , like conditional call , keep their fallthrough / / no need to fix these locations if ( instr get flow type ( ) has fallthrough ( ) ) { continue ; } called locations add ( instr get min address ( ) ) ; } } return called locations ; }


given a directory path , return the s3 resource to it

public static string [ ] directory ( path path ) { string host = path to uri ( ) get host ( ) ; string key = path to key ( path ) ; if ( ! key is empty ( ) ) { return new string [ ] { resource ( host , key + " / " , true ) , resource ( host , key , false ) , resource ( host , key + " / " , false ) , } ; } else { return new string [ ] { resource ( host , key , true ) , } ; } }


test that collisions in the block group id space are handled gracefully

public void test trigger block group id collision ( ) throws i o exception { long block group id initial value = block grp id generator get current value ( ) ; / / create a file with a few blocks to rev up the global block id / / counter path path 1 = new path ( ec dir , " test block grp id collision detection file 1 dat " ) ; d f s test util create file ( fs , path 1 , cell size , file len , block size , replication , seed ) ; list < located block > blocks 1 = d f s test util get all blocks ( fs , path 1 ) ; assert that ( " wrong block grps " , blocks 1 size ( ) , is ( block grp count ) ) ; / / rewind the block id counter in the name system object this will result / / in block id collisions when we try to allocate new blocks block grp id generator set current value ( block group id initial value ) ; / / trigger collisions by creating a new file path path 2 = new path ( ec dir , " test block grp id collision detection file 2 dat " ) ; d f s test util create file ( fs , path 2 , cell size , file len , block size , replication , seed ) ; list < located block > blocks 2 = d f s test util get all blocks ( fs , path 2 ) ; assert that ( " wrong block grps " , blocks 2 size ( ) , is ( block grp count ) ) ; / / make sure that file 1 and file 2 block i ds are different for ( located block loc block 1 : blocks 1 ) { long block id 1 = loc block 1 get block ( ) get block id ( ) ; for ( located block loc block 2 : blocks 2 ) { long block id 2 = loc block 2 get block ( ) get block id ( ) ; assert that ( " block grp id mismatches ! " , block id 1 , is ( not ( block id 2 ) ) ) ; } } }


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


adjust any program context needed on symbols

private void set entry point context ( elf load helper elf load helper , task monitor monitor ) throws cancelled exception { program program = elf load helper get program ( ) ; if ( get ppc 6 4 a b i version ( elf load helper get elf header ( ) ) = = 2 ) { monitor set message ( " assuming r 1 2 for global functions " ) ; function manager function mgr = program get function manager ( ) ; for ( address addr : program get symbol table ( ) get external entry point iterator ( ) ) { monitor check canceled ( ) ; if ( function mgr get function at ( addr ) ! = null ) { / / assume r 1 2 set to function entry for all global functions set p p c 6 4v 2 global function r 1 2 context ( program , addr ) ; } } / / ensure that r 1 2 context has been set on global entry function symbol entry symbol = symbol utilities get label or function symbol ( elf load helper get program ( ) , elf loader elf entry function name , err - > elf load helper get log ( ) error ( " power p c 6 4 elf " , err ) ) ; if ( entry symbol ! = null & & entry symbol get symbol type ( ) = = symbol type function ) { set p p c 6 4v 2 global function r 1 2 context ( program , entry symbol get address ( ) ) ; } } }


private void get track coordinates ( ) { final boolean left to right = is left to right ( slider ) ; if ( slider get orientation ( ) = = swing constants horizontal ) { track bottom = ( track rect height - 1 ) - get thumb overhang ( ) ; track top = track bottom - ( get track width ( ) - 1 ) ; track right = track rect width - 1 ; } else { if ( left to right ) { track left = ( track rect width - get thumb overhang ( ) ) - get track width ( ) ; track right = ( track rect width - get thumb overhang ( ) ) - 1 ; } else { track left = get thumb overhang ( ) ; track right = get thumb overhang ( ) + get track width ( ) - 1 ; } track bottom = track rect height - 1 ; } }


schedule the given { @ link runnable } , starting as soon as possible and invoking it with the given period execution will end once the scheduler shuts down or the returned { @ link scheduled future } gets cancelled

scheduled future < ? > schedule at fixed rate ( runnable task , long period ) ;


adds extra runfiles for a { @ code java binary } rule

void add runfiles for binary ( rule context rule context , artifact launcher , runfiles builder runfiles builder ) ;


key to be used for request caching < p > by default this returns null which means " do not cache " < p > to enable caching override this method and return a string key uniquely representing the state of a command instance < p > if multiple command instances in the same request scope match keys then only the first will be executed and all others returned from cache


returns a binding builder used to add a new entry in the map each key must be distinct ( and non - null ) bound providers will be evaluated each time the map is injected it is an error to call this method without also calling one of the { @ code to } methods on the returned binding builder scoping elements independently is supported use the { @ code in } method to specify a binding scope

public abstract linked binding builder < v > add binding ( k key ) ;


return whether results processing should be skipped

public boolean is skip results processing ( ) { return this skip results processing ; }


writes the data for the specified key - group to the output you must call { @ link # get key group writer ( ) } once before first calling this method

void write state in key group ( @ nonnull data output view dov , @ nonnegative int key group id ) throws i o exception ;


sets the < code > name array < code > property

public xml item name array ( list < integer > name array ) { this name array = name array ; return this ; }


finish handling this pipeline by writing a response with the " connection : close " header , flushing , and scheduling a close of the connection

private static void send response and close ( channel handler context ctx , default http response resp ) { resp headers ( ) set ( connection , close ) ; ctx write and flush ( resp ) add listener ( channel future listener close ) ; }


recursively compute the difference between snapshots under a given directoryfile

private void compute diff recursively ( final i node directory snapshot dir , i node node , list < byte [ ] > parent path , snapshot diff info diff report ) { final snapshot earlier snapshot = diff report is from earlier ( ) ? diff report get from ( ) : diff report get to ( ) ; final snapshot later snapshot = diff report is from earlier ( ) ? diff report get to ( ) : diff report get from ( ) ; byte [ ] [ ] relative path = parent path to array ( new byte [ parent path size ( ) ] [ ] ) ; if ( node is directory ( ) ) { final children diff diff = new children diff ( ) ; i node directory dir = node as directory ( ) ; directory with snapshot feature sf = dir get directory with snapshot feature ( ) ; if ( sf ! = null ) { boolean change = sf compute diff between snapshots ( earlier snapshot , later snapshot , diff , dir ) ; if ( change ) { diff report add dir diff ( dir , relative path , diff ) ; } } else { diff report increment dirs processed ( ) ; } long start time = time monotonic now ( ) ; read only list < i node > children = dir get children list ( earlier snapshot get id ( ) ) ; diff report add children listing time ( time monotonic now ( ) - start time ) ; for ( i node child : children ) { final byte [ ] name = child get local name bytes ( ) ; boolean to process = ! diff contains deleted ( name ) ; if ( ! to process & & child instanceof i node reference with name ) { byte [ ] [ ] rename target path = find rename target path ( snapshot dir , ( with name ) child , later snapshot = = null ? snapshot current state id : later snapshot get id ( ) ) ; if ( rename target path ! = null ) { to process = true ; diff report set rename target ( child get id ( ) , rename target path ) ; } } if ( to process ) { parent path add ( name ) ; compute diff recursively ( snapshot dir , child , parent path , diff report ) ; parent path remove ( parent path size ( ) - 1 ) ; } } } else if ( node is file ( ) & & node as file ( ) is with snapshot ( ) ) { i node file file = node as file ( ) ; boolean change = file get file with snapshot feature ( ) changed between snapshots ( file , earlier snapshot , later snapshot ) ; if ( change ) { diff report add file diff ( file , relative path ) ; } diff report increment files processed ( ) ; } }


the entries defined for this type < code > repeated aapt pb entry entry = 3 ; < code >

public builder clear entry ( ) { copy on write ( ) ; instance clear entry ( ) ; return this ; }


the value assigned to this plural < code > optional aapt pb item item = 4 ; < code >

public boolean has item ( ) { return instance has item ( ) ; }


catastrophic exceptions should stop the build , even if - - keep going

public boolean is catastrophic ( ) { return catastrophe ; }


returns a { @ link cipher } object for decrypting with this key

public cipher decrypt ( ) { try { cipher cipher = secret get cipher ( key algorithm ) ; cipher init ( cipher decrypt mode , get key ( ) ) ; return cipher ; } catch ( general security exception e ) { throw new assertion error ( e ) ; } }


convenience method to return a collection as a delimited ( e g csv ) string e g useful for { @ code to string ( ) } implementations

public static string collection to delimited string ( collection < ? > coll , string delim , string prefix , string suffix ) { if ( collection utils is empty ( coll ) ) { return " " ; } string builder sb = new string builder ( ) ; iterator < ? > it = coll iterator ( ) ; while ( it has next ( ) ) { sb append ( prefix ) append ( it next ( ) ) append ( suffix ) ; if ( it has next ( ) ) { sb append ( delim ) ; } } return sb to string ( ) ; }


converts this object into an equiv { @ link category path }

public category path as category path ( ) { return new category path ( f s utilities append path ( organizational category path get path ( ) , namespace path is root ( ) ? null : namespace path as category path string ( ) ) ) ; }


remove a user defined reference to the operand at op index

public void remove operand reference ( int op index , address ref addr ) { if ( ref mgr = = null ) throw new unsupported operation exception ( ) ; reference ref = ref mgr get reference ( address , ref addr , op index ) ; if ( ref ! = null ) { ref mgr delete ( ref ) ; } }


resolve $ { } placeholders in the given text , replacing them with corresponding servlet context init parameter or system property values

public static string resolve placeholders ( string text , servlet context servlet context ) { return resolve placeholders ( text , servlet context , false ) ; }


set the source path to the specified erasure coding policy

public void set erasure coding policy ( final path path , final string ec policy name ) throws i o exception { statistics increment write ops ( 1 ) ; storage statistics increment op counter ( op type set ec policy ) ; path abs f = fix relative part ( path ) ; new file system link resolver < void > ( ) { @ override public void do call ( final path p ) throws i o exception { dfs set erasure coding policy ( get path name ( p ) , ec policy name ) ; return null ; } @ override public void next ( final file system fs , final path p ) throws i o exception { if ( fs instanceof distributed file system ) { distributed file system my dfs = ( distributed file system ) fs ; my dfs set erasure coding policy ( p , ec policy name ) ; return null ; } throw new unsupported operation exception ( " cannot set erasure coding policy through a symlink to a " + " non - distributed file system : " + path + " - > " + p ) ; } } resolve ( this , abs f ) ; }


returns the total for the specified phase and step

public long get total ( phase phase , step step ) { step tracking tracking = get step tracking ( phase , step ) ; return tracking ! = null & & tracking total ! = long min value ? tracking total : 0 ; }


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


only one single scope can be added to any setting

public void test mutually exclusive scopes ( ) { / / those should pass setting < string > setting = setting simple string ( " foo bar " , property node scope ) ; assert that ( setting has node scope ( ) , is ( true ) ) ; assert that ( setting has index scope ( ) , is ( false ) ) ; setting = setting simple string ( " foo bar " , property index scope ) ; assert that ( setting has index scope ( ) , is ( true ) ) ; assert that ( setting has node scope ( ) , is ( false ) ) ; / / we accept settings with no scope but they will be rejected when we register with settings module register setting setting = setting simple string ( " foo bar " ) ; assert that ( setting has index scope ( ) , is ( false ) ) ; assert that ( setting has node scope ( ) , is ( false ) ) ; / / we accept settings with multiple scopes but they will be rejected when we register with settings module register setting setting = setting simple string ( " foo bar " , property index scope , property node scope ) ; assert that ( setting has index scope ( ) , is ( true ) ) ; assert that ( setting has node scope ( ) , is ( true ) ) ; }


public void service init ( configuration conf ) throws i o exception { init storage ( conf ) ; }


replaces the list contents with the new list

public void refresh list ( object [ ] data list ) { list set list data ( data list ) ; list clear selection ( ) ; }


public count request source ( search source builder search source builder ) { this query = objects require non null ( search source builder , " source must not be null " ) query ( ) ; return this ; }


returns the background color at a specific location within the layout

color get background color ( field location location ) ;


inserts { @ link channel handler } s at the first position of this pipeline

channel pipeline add first ( channel handler handlers ) ;


returns { @ code true } if the given { @ link byte buf } is encrypted be aware that this method will not increase the reader index of the given { @ link byte buf }

public static boolean is encrypted ( byte buf buffer ) { if ( buffer readable bytes ( ) < ssl utils ssl record header length ) { throw new illegal argument exception ( " buffer must have at least " + ssl utils ssl record header length + " readable bytes " ) ; } return get encrypted packet length ( buffer , buffer reader index ( ) ) ! = ssl utils not encrypted ; }


creates a new { @ code sliding event time windows } { @ link org apache flink streaming api windowing assigners window assigner } that assigns elements to sliding time windows based on the element timestamp

public static sliding window assigner of ( duration size , duration slide ) { return new sliding window assigner ( size to millis ( ) , slide to millis ( ) , 0 , true ) ; }


public void remove ( ) { check state ( key ! = long min value ) ; prev next = next ; next prev = prev ; prev = next = null ; type = null ; }


get the number of acceptable skip groups surrounding the bad group per bad group in reducer the number includes the bad group as well to turn the feature of detectionskipping of bad groups off , set the value to 0 the framework tries to narrow down the skipped range by retrying until this threshold is met or all attempts get exhausted for this task set the value to long max value to indicate that framework need not try to narrow down whatever groups ( depends on application ) get skipped are acceptable default value is 0

public static long get reducer max skip groups ( configuration conf ) { return conf get long ( reducer max skip groups , 0 ) ; }


allow access to the rpc server for testing

server get rpc server ( ) { return server ; }


parse the gzip trailer ( assuming we ' re in the appropriate state ) in order to deal with degenerate cases ( e g , user buffer is one byte long ) , we copy trailer bytes ( all 8 of ' em ) to a local buffer see http : www ietf orgrfcrfc 1 9 5 2 txt for the gzip spec

private void execute trailer state ( ) throws i o exception { if ( user buf len < = 0 ) { return ; } / / verify that the crc - 32 of the decompressed stream matches the value / / stored in the gzip trailer if ( state = = gzip state label trailer crc ) { / / local buf was empty before we handed off to inflater , so we handle this / / exactly like header fields assert ( local buf off < 4 ) ; / / initially 0 , but may need multiple calls int n = math min ( user buf len , 4 - local buf off ) ; copy bytes to local ( n ) ; if ( local buf off > = 4 ) { long stream c r c = read u int l e ( local buf , 0 ) ; if ( stream c r c ! = crc get value ( ) ) { throw new i o exception ( " gzip stream crc failure " ) ; } local buf off = 0 ; crc reset ( ) ; state = gzip state label trailer size ; } } if ( user buf len < = 0 ) { return ; } / / verify that the mod - 2 ^ 32 decompressed stream size matches the value / / stored in the gzip trailer if ( state = = gzip state label trailer size ) { assert ( local buf off < 4 ) ; / / initially 0 , but may need multiple calls int n = math min ( user buf len , 4 - local buf off ) ; copy bytes to local ( n ) ; / / modifies user buf len , etc if ( local buf off > = 4 ) { / / should be strictly = = long input size = read u int l e ( local buf , 0 ) ; if ( input size ! = ( inflater get bytes written ( ) & 0xffffffff l ) ) { throw new i o exception ( " stored gzip size doesn ' t match decompressed size " ) ; } local buf off = 0 ; state = gzip state label finished ; } } if ( state = = gzip state label finished ) { return ; } }


ensure that storage type and storage state are propagated in storage reports

public void test storage report has storage type and state ( ) throws i o exception { / / make sure we are not testing with the default type , that would not / / be a very good test assert not same ( storage type , storage type default ) ; name node nn = cluster get name node ( ) ; data node dn = cluster get data nodes ( ) get ( 0 ) ; / / insert a spy object for the nn rpc datanode protocol client side translator p b nn spy = internal data node test utils spy on bpos to n n ( dn , nn ) ; / / trigger a heartbeat so there is an interaction with the spy / / object data node test utils trigger heartbeat ( dn ) ; / / verify that the callback passed in the expected parameters argument captor < storage report [ ] > captor = argument captor for class ( storage report [ ] class ) ; mockito verify ( nn spy ) send heartbeat ( any ( datanode registration class ) , captor capture ( ) , any long ( ) , any long ( ) , any int ( ) , any int ( ) , any int ( ) , any ( ) , mockito any boolean ( ) , mockito any ( slow peer reports class ) , mockito any ( slow disk reports class ) ) ; storage report [ ] reports = captor get value ( ) ; for ( storage report report : reports ) { assert that ( report get storage ( ) get storage type ( ) , is ( storage type ) ) ; assert that ( report get storage ( ) get state ( ) , is ( datanode storage state normal ) ) ; } }


write one byte to the underlying stream the underlying stream must be valid

public void write ( int one byte ) throws i o exception { byte [ ] buf = new byte [ 1 ] ; buf [ 0 ] = ( byte ) one byte ; this write ( buf ) ; }


using trace method to visit admin server

private void trace admin server ( int port ) throws i o exception { trace admin server ( string format ( url format , port ) ) ; trace admin server ( string format ( https url format , port ) ) ; }


public io grpc testing integration empty protos empty unimplemented call ( io grpc testing integration empty protos empty request ) { return io grpc stub client calls blocking unary call ( get channel ( ) , get unimplemented call method ( ) , get call options ( ) , request ) ; }


ensures that runfiles are built for the specified target if they already are , does nothing , otherwise builds them

private static path ensure runfiles built ( command environment env , runfiles support runfiles support , build configuration configuration ) throws runfiles exception , interrupted exception { artifact manifest = preconditions check not null ( runfiles support get runfiles manifest ( ) ) ; path fragment runfiles dir = runfiles support get runfiles directory exec path ( ) ; path working dir = env get exec root ( ) get relative ( runfiles dir ) ; / / on windows , runfiles tree is disabled / / workspace name directory doesn ' t exist , so don ' t add it if ( configuration runfiles enabled ( ) ) { working dir = working dir get relative ( runfiles support get runfiles ( ) get suffix ( ) ) ; } / / always create runfiles directory and the workspace - named directory underneath , even if we / / run with - - enable runfiles = no ( which is the default on windows as of 2020 - 01 - 24 ) / / if the binary we run is in fact a test , it will expect to be able to chdir into the runfiles / / directory see https : / / github com / bazelbuild / bazel / issues / 10621 try { runfiles support get runfiles directory ( ) get relative ( runfiles support get workspace name ( ) ) create directory and parents ( ) ; } catch ( i o exception e ) { throw new runfiles exception ( " failed to create runfiles directories : " + e get message ( ) , code runfiles directories creation failure , e ) ; } / / when runfiles are not generated , get manifest ( ) returns the / / runfiles manifest file , otherwise it returns the manifest file this is / / a handy way to check whether runfiles were built or not if ( ! runfiles manifest matches ( manifest get filename ( ) ) ) { return working dir ; } symlink tree helper helper = new symlink tree helper ( manifest get path ( ) , runfiles support get runfiles directory ( ) , false ) ; try { helper create symlinks using command ( env get exec root ( ) , env get blaze workspace ( ) get bin tools ( ) , / * shell environment = * / immutable map of ( ) , / * out err = * / null ) ; } catch ( environmental exec exception e ) { throw new runfiles exception ( " failed to create runfiles symlinks : " + e get message ( ) , code runfiles symlinks creation failure , e ) ; } return working dir ; }


returns and removes any content that is dependent on the provided message id

public optional < list < signal service content > > retrieve ( @ non null recipient id sender , long sent timestamp ) { return optional from nullable ( cache remove ( new message id ( sender , sent timestamp ) ) ) ; }


public void write ( long [ ] data ) { for ( long l : data ) { write long ( l ) ; } }


return the assigned { @ link channel pipeline }


do something with the given jndi context implementations don ' t need to worry about error handling or cleanup , as the jndi template class will handle this

t do in context ( context ctx ) throws naming exception ;


add a new build to the map do not use when loading existing builds ( use { @ link # put ( integer , object ) } )

public r put ( r r ) { / / defense against jenkins - 23152 and its ilk file root dir = r get root dir ( ) ; if ( root dir is directory ( ) ) { throw new illegal state exception ( " jenkins - 23152 : " + root dir + " already existed ; will not overwrite with " + r ) ; } if ( ! r get class ( ) get name ( ) equals ( " hudson matrix matrix run " ) ) { / / jenkins - 26739 : grandfathered in propose new number ( r get number ( ) ) ; } root dir mkdirs ( ) ; return super put ( r ) ; }


returns the physical address offset this is the address at which the section should be loaded into memory and reflects a addressable word offset for linked executables , this is the absolute address within the program space for unlinked objects , this address is relative to the object ' s address space ( i e the first section is always at offset zero )

public int get physical address ( ) { return s paddr ; }


{ @ inherit doc } this implementation passes the message to the maven log

public void error ( a n t l r message message ) { st msg s t = tool err mgr get message template ( message ) ; string output msg = msg s t render ( ) ; if ( tool err mgr format wants single line message ( ) ) { output msg = output msg replace ( ' \ n ' , ' ' ) ; } log error ( output msg ) ; if ( message file name ! = null ) { string text = message get message template ( false ) render ( ) ; build context add message ( new file ( message file name ) , message line , message char position , text , build context severity error , message get cause ( ) ) ; } }


creates a { @ link jdbc statement builder } for { @ link row } using the provided sql types array uses { @ link jdbc utils # set record to statement }

static jdbc statement builder < row > create row jdbc statement builder ( int [ ] types ) { return ( st , record ) - > set record to statement ( st , types , record ) ; }


the value of the { @ code package count } item indicates the number of entries in the { @ code package index } table

public int get package count ( ) { return package count & 0xffff ; }


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


get the lower bound on split size imposed by the format

protected long get format min split size ( ) { return 1 ; }


{ @ inherit doc } the default implementation returns the result of calling { @ link # visit children } on { @ code ctx }

@ override public t visit listinitializer ( painless parser listinitializer context ctx ) { return visit children ( ctx ) ; }


creates a new , empty { @ code array list } to hold the collection of values for an arbitrary key

list < v > create collection ( ) { return new array list < v > ( expected values per key ) ; }


gets the format ( an { @ link instruction codec } ) for the given opcode value

public static instruction codec get format ( int opcode ) { return get ( opcode ) get format ( ) ; }


sets the transformation matrix to identity

public void identity ( ) { transform matrix idt ( ) ; matrix dirty = true ; }


updates the cluster metadata if topic expiry is enabled , expiry time is set for topics if required and expired topics are removed from the metadata

public synchronized void update ( int request version , metadata response response , boolean is partial update , long now ms ) { objects require non null ( response , " metadata response cannot be null " ) ; if ( is closed ( ) ) throw new illegal state exception ( " update requested after metadata close " ) ; this need partial update = request version < this request version ; this last refresh ms = now ms ; this update version + = 1 ; if ( ! is partial update ) { this need full update = false ; this last successful refresh ms = now ms ; } string previous cluster id = cache cluster resource ( ) cluster id ( ) ; this cache = handle metadata response ( response , is partial update , now ms ) ; cluster cluster = cache cluster ( ) ; maybe set metadata error ( cluster ) ; this last seen leader epochs key set ( ) remove if ( tp - > ! retain topic ( tp topic ( ) , false , now ms ) ) ; string new cluster id = cache cluster resource ( ) cluster id ( ) ; if ( ! objects equals ( previous cluster id , new cluster id ) ) { log info ( " cluster id : { } " , new cluster id ) ; } cluster resource listeners on update ( cache cluster resource ( ) ) ; log debug ( " updated cluster metadata update version { } to { } " , this update version , this cache ) ; }


resolve the id for the supplied { @ link bean definition } when using { @ link # should generate id generation } , a name is generated automatically otherwise , the id is extracted from the " id " attribute , potentially with a { @ link # should generate id as fallback ( ) fallback } to a generated id

protected string resolve id ( element element , abstract bean definition definition , parser context parser context ) throws bean definition store exception { if ( should generate id ( ) ) { return parser context get reader context ( ) generate bean name ( definition ) ; } else { string id = element get attribute ( id attribute ) ; if ( ! string utils has text ( id ) & & should generate id as fallback ( ) ) { id = parser context get reader context ( ) generate bean name ( definition ) ; } return id ; } }


return true if the request should be validated without altering the configs

public boolean should validate only ( ) { return validate only ; }


returns the number of instructions ( and data ) in the selection

private int get num instructions in selection ( program program , program selection selection ) { / / first get the addresses in the selection ; address range iterator address ranges = selection get address ranges ( ) ; / / keep track of the number of instructions we find int num instructions = 0 ; / / loop over all the addresses , getting all code units and checking to see which ones / / are instructions for those that are , increment our counter while ( address ranges has next ( ) ) { address range range = address ranges next ( ) ; address set addr set = new address set ( range ) ; code unit iterator cu iter = program get listing ( ) get code units ( addr set , true ) ; while ( cu iter has next ( ) ) { code unit cu = cu iter next ( ) ; if ( ( cu instanceof instruction ) | | ( cu instanceof data ) ) { num instructions + + ; } } } return num instructions ; }


todo ( b 1 4 4 7 3 1 6 0 ) : remove when deps are no longer implicitly exported returns true if the rule ( possibly ) relies on the implicit dep exports behavior if this returns true , then the rule is exporting deps implicitly , and does not have any srcs or locally - used resources consuming the deps else , this rule either is not using deps or has another deps - consuming attribute ( src , locally - used resources )

private static boolean uses deprecated implicit export ( rule context rule context ) throws rule error exception { attribute map attrs = rule context attributes ( ) ; if ( ! attrs is attribute value explicitly specified ( " deps " ) | | attrs get ( " deps " , build type label list ) is empty ( ) ) { return false ; } string [ ] label list attrs = { " srcs " , " idl srcs " , " assets " , " resource files " } ; for ( string attr : label list attrs ) { if ( attrs is attribute value explicitly specified ( attr ) & & ! attrs get ( attr , build type label list ) is empty ( ) ) { return false ; } } boolean has manifest = attrs is attribute value explicitly specified ( " manifest " ) ; boolean has assets dir = attrs is attribute value explicitly specified ( " assets dir " ) ; boolean has inline consts = attrs is attribute value explicitly specified ( " inline constants " ) & & attrs get ( " inline constants " , type boolean ) ; boolean has exports manifest = attrs is attribute value explicitly specified ( " exports manifest " ) & & attrs get ( " exports manifest " , build type tristate ) = = tri state yes ; return ! ( has manifest | | has inline consts | | has assets dir | | has exports manifest ) ; }


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


initiate a duration tracking operation by creatingreturning an object whose { @ code close ( ) } call will update the statistics the expected use is within a try - with - resources clause

default duration tracker track duration ( string key ) { return track duration ( key , 1 ) ; }


to test \ & quot ; client \ & quot ; model to test \ & quot ; client \ & quot ; model

public void test client model test ( ) throws api exception { client body = null ; client response = api test client model ( body ) ; / / todo : test validations }


returns the files necessary for an ' objcopy ' invocation

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


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


returns the length in bytes of this file , or 0 if this file is a directory , does not exist , or the size cannot otherwise be determined

public long length ( ) { if ( type = = file type classpath | | ! file exists ( ) ) { input stream input = read ( ) ; try { return input available ( ) ; } catch ( exception ignored ) { } finally { try { input close ( ) ; } catch ( i o exception ignored ) { } } return 0 ; } return file ( ) length ( ) ; }


defines that the value of the option should be of { @ link duration } type

public typed config option builder < duration > duration type ( ) { return new typed config option builder < > ( key , duration class ) ; }


sets the font on this code completion window basically sets the font in the completion list

public void set font ( font font ) { jlist set font ( font ) ; }


merging a late window should not register a timer , otherwise we would get two firings : one from on element ( ) on the merged window and one from the timer

public void test merging late windows ( ) throws exception { trigger test harness < object , time window > test harness = new trigger test harness < > ( event time trigger create ( ) , new time window serializer ( ) ) ; assert true ( event time trigger create ( ) can merge ( ) ) ; assert equals ( trigger result continue , test harness process element ( new stream record < object > ( 1 ) , new time window ( 0 , 2 ) ) ) ; assert equals ( trigger result continue , test harness process element ( new stream record < object > ( 1 ) , new time window ( 2 , 4 ) ) ) ; assert equals ( 0 , test harness num state entries ( ) ) ; assert equals ( 0 , test harness num processing time timers ( ) ) ; assert equals ( 2 , test harness num event time timers ( ) ) ; assert equals ( 1 , test harness num event time timers ( new time window ( 0 , 2 ) ) ) ; assert equals ( 1 , test harness num event time timers ( new time window ( 2 , 4 ) ) ) ; test harness advance watermark ( 10 ) ; assert equals ( 0 , test harness num state entries ( ) ) ; assert equals ( 0 , test harness num processing time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 0 , 2 ) ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 2 , 4 ) ) ) ; test harness merge windows ( new time window ( 0 , 4 ) , lists new array list ( new time window ( 0 , 2 ) , new time window ( 2 , 4 ) ) ) ; assert equals ( 0 , test harness num state entries ( ) ) ; assert equals ( 0 , test harness num processing time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 0 , 2 ) ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 2 , 4 ) ) ) ; assert equals ( 0 , test harness num event time timers ( new time window ( 0 , 4 ) ) ) ; }


positions and sizes children of the table using the cell associated with each child the values given are the position within the parent and size of the table

public void layout ( ) { if ( size invalid ) compute size ( ) ; float layout width = get width ( ) , layout height = get height ( ) ; int columns = this columns , rows = this rows ; float [ ] column width = this column width , row height = this row height ; float pad left = this pad left get ( this ) , hpadding = pad left + pad right get ( this ) ; float pad top = this pad top get ( this ) , vpadding = pad top + pad bottom get ( this ) ; / / size columns and rows between min and pref size using ( preferred - min ) size to weight distribution of extra space float [ ] column weighted width ; float total grow width = table pref width - table min width ; if ( total grow width = = 0 ) column weighted width = column min width ; else { float extra width = math min ( total grow width , math max ( 0 , layout width - table min width ) ) ; column weighted width = table column weighted width = ensure size ( table column weighted width , columns ) ; float [ ] column min width = this column min width , column pref width = this column pref width ; for ( int i = 0 ; i < columns ; i + + ) { float grow width = column pref width [ i ] - column min width [ i ] ; float grow ratio = grow width / total grow width ; column weighted width [ i ] = column min width [ i ] + extra width * grow ratio ; } } float [ ] row weighted height ; float total grow height = table pref height - table min height ; if ( total grow height = = 0 ) row weighted height = row min height ; else { row weighted height = table row weighted height = ensure size ( table row weighted height , rows ) ; float extra height = math min ( total grow height , math max ( 0 , layout height - table min height ) ) ; float [ ] row min height = this row min height , row pref height = this row pref height ; for ( int i = 0 ; i < rows ; i + + ) { float grow height = row pref height [ i ] - row min height [ i ] ; float grow ratio = grow height / total grow height ; row weighted height [ i ] = row min height [ i ] + extra height * grow ratio ; } } / / determine actor and cell sizes ( before expand or fill ) object [ ] cells = this cells items ; int cell count = this cells size ; for ( int i = 0 ; i < cell count ; i + + ) { cell c = ( cell ) cells [ i ] ; int column = c column , row = c row ; actor a = c actor ; float spanned weighted width = 0 ; int colspan = c colspan ; for ( int ii = column , nn = ii + colspan ; ii < nn ; ii + + ) spanned weighted width + = column weighted width [ ii ] ; float weighted height = row weighted height [ row ] ; float pref width = c pref width get ( a ) , pref height = c pref height get ( a ) ; float min width = c min width get ( a ) , min height = c min height get ( a ) ; float max width = c max width get ( a ) , max height = c max height get ( a ) ; if ( pref width < min width ) pref width = min width ; if ( pref height < min height ) pref height = min height ; if ( max width > 0 & & pref width > max width ) pref width = max width ; if ( max height > 0 & & pref height > max height ) pref height = max height ; c actor width = math min ( spanned weighted width - c computed pad left - c computed pad right , pref width ) ; c actor height = math min ( weighted height - c computed pad top - c computed pad bottom , pref height ) ; if ( colspan = = 1 ) column width [ column ] = math max ( column width [ column ] , spanned weighted width ) ; row height [ row ] = math max ( row height [ row ] , weighted height ) ; } / / distribute remaining space to any expanding columns / rows float [ ] expand width = this expand width , expand height = this expand height ; float total expand = 0 ; for ( int i = 0 ; i < columns ; i + + ) total expand + = expand width [ i ] ; if ( total expand > 0 ) { float extra = layout width - hpadding ; for ( int i = 0 ; i < columns ; i + + ) extra - = column width [ i ] ; if ( extra > 0 ) { / / layout width < table min width float used = 0 ; int last index = 0 ; for ( int i = 0 ; i < columns ; i + + ) { if ( expand width [ i ] = = 0 ) continue ; float amount = extra * expand width [ i ] / total expand ; column width [ i ] + = amount ; used + = amount ; last index = i ; } column width [ last index ] + = extra - used ; } } total expand = 0 ; for ( int i = 0 ; i < rows ; i + + ) total expand + = expand height [ i ] ; if ( total expand > 0 ) { float extra = layout height - vpadding ; for ( int i = 0 ; i < rows ; i + + ) extra - = row height [ i ] ; if ( extra > 0 ) { / / layout height < table min height float used = 0 ; int last index = 0 ; for ( int i = 0 ; i < rows ; i + + ) { if ( expand height [ i ] = = 0 ) continue ; float amount = extra * expand height [ i ] / total expand ; row height [ i ] + = amount ; used + = amount ; last index = i ; } row height [ last index ] + = extra - used ; } } / / distribute any additional width added by colspanned cells to the columns spanned for ( int i = 0 ; i < cell count ; i + + ) { cell c = ( cell ) cells [ i ] ; int colspan = c colspan ; if ( colspan = = 1 ) continue ; float extra width = 0 ; for ( int column = c column , nn = column + colspan ; column < nn ; column + + ) extra width + = column weighted width [ column ] - column width [ column ] ; extra width - = math max ( 0 , c computed pad left + c computed pad right ) ; extra width / = colspan ; if ( extra width > 0 ) { for ( int column = c column , nn = column + colspan ; column < nn ; column + + ) column width [ column ] + = extra width ; } } / / determine table size float table width = hpadding , table height = vpadding ; for ( int i = 0 ; i < columns ; i + + ) table width + = column width [ i ] ; for ( int i = 0 ; i < rows ; i + + ) table height + = row height [ i ] ; / / position table within the container int align = this align ; float x = pad left ; if ( ( align & align right ) ! = 0 ) x + = layout width - table width ; else if ( ( align & align left ) = = 0 ) / / center x + = ( layout width - table width ) / 2 ; float y = pad top ; if ( ( align & align bottom ) ! = 0 ) y + = layout height - table height ; else if ( ( align & align top ) = = 0 ) / / center y + = ( layout height - table height ) / 2 ; / / size and position actors within cells float current x = x , current y = y ; for ( int i = 0 ; i < cell count ; i + + ) { cell c = ( cell ) cells [ i ] ; float spanned cell width = 0 ; for ( int column = c column , nn = column + c colspan ; column < nn ; column + + ) spanned cell width + = column width [ column ] ; spanned cell width - = c computed pad left + c computed pad right ; current x + = c computed pad left ; float fill x = c fill x , fill y = c fill y ; if ( fill x > 0 ) { c actor width = math max ( spanned cell width * fill x , c min width get ( c actor ) ) ; float max width = c max width get ( c actor ) ; if ( max width > 0 ) c actor width = math min ( c actor width , max width ) ; } if ( fill y > 0 ) { c actor height = math max ( row height [ c row ] * fill y - c computed pad top - c computed pad bottom , c min height get ( c actor ) ) ; float max height = c max height get ( c actor ) ; if ( max height > 0 ) c actor height = math min ( c actor height , max height ) ; } align = c align ; if ( ( align & align left ) ! = 0 ) c actor x = current x ; else if ( ( align & align right ) ! = 0 ) c actor x = current x + spanned cell width - c actor width ; else c actor x = current x + ( spanned cell width - c actor width ) / 2 ; if ( ( align & align top ) ! = 0 ) c actor y = c computed pad top ; else if ( ( align & align bottom ) ! = 0 ) c actor y = row height [ c row ] - c actor height - c computed pad bottom ; else c actor y = ( row height [ c row ] - c actor height + c computed pad top - c computed pad bottom ) / 2 ; c actor y = layout height - current y - c actor y - c actor height ; if ( round ) { c actor width = ( float ) math ceil ( c actor width ) ; c actor height = ( float ) math ceil ( c actor height ) ; c actor x = ( float ) math floor ( c actor x ) ; c actor y = ( float ) math floor ( c actor y ) ; } if ( c actor ! = null ) c actor set bounds ( c actor x , c actor y , c actor width , c actor height ) ; if ( c end row ) { current x = x ; current y + = row height [ c row ] ; } else current x + = spanned cell width + c computed pad right ; } / / validate all children ( some may not be in cells ) array < actor > children array = get children ( ) ; actor [ ] children = children array items ; for ( int i = 0 , n = children array size ; i < n ; i + + ) { object child = children [ i ] ; if ( child instanceof layout ) ( ( layout ) child ) validate ( ) ; } / / store debug rectangles if ( debug ! = debug none ) add debug rects ( x , y , table width - hpadding , table height - vpadding ) ; }


reads property key from additional properties , converts it to a boolean and writes it back to additional properties to be usable as a boolean in mustache files

public boolean convert property to boolean and write back ( string property key ) { boolean result = convert property to boolean ( property key ) ; write property back ( property key , result ) ; return result ; }


string representation for this object , used for debugging

public string to string ( ) { return " byte viewer state : address = " + addr + " , view position index = = > " + vp get index as int ( ) + " , view y offset = = > " + vp get y offset ( ) ; }


set the { @ link # next flush } variable to the initial flush time the initial flush will be an integer number of flush intervals past the beginning of the current hour and will have a random offset added , up to { @ link # roll offset interval millis } the initial flush will be a time in past that can be used from which to calculate future flush times

protected void set initial flush time ( date now ) { / / start with the beginning of the current hour next flush = calendar get instance ( ) ; next flush set time ( now ) ; next flush set ( calendar millisecond , 0 ) ; next flush set ( calendar second , 0 ) ; next flush set ( calendar minute , 0 ) ; / / in the first round , calculate the first flush as the largest number of / / intervals from the beginning of the current hour that ' s not in the / / future by : / / 1 subtract the beginning of the hour from the current time / / 2 divide by the roll interval and round down to get the number of whole / / intervals that have passed since the beginning of the hour / / 3 multiply by the roll interval to get the number of millis between / / the beginning of the current hour and the beginning of the current / / interval int millis = ( int ) ( ( ( now get time ( ) - next flush get time in millis ( ) ) / roll interval millis ) * roll interval millis ) ; / / then add some noise to help prevent all the nodes from / / closing their files at the same time if ( roll offset interval millis > 0 ) { millis + = thread local random current ( ) next long ( roll offset interval millis ) ; / / if the added time puts us into the future , step back one roll interval / / because the code to increment next flush to the next flush expects that / / next flush is the next flush from the previous interval there wasn ' t / / a previous interval , so we just fake it with the time in the past that / / would have been the previous interval if there had been one / / / / it ' s ok if millis comes out negative while ( next flush get time in millis ( ) + millis > now get time ( ) ) { millis - = roll interval millis ; } } / / adjust the next flush time by millis to get the time of our ficticious / / previous next flush next flush add ( calendar millisecond , millis ) ; }


starts the cpu profiler with the specified sampling period , writing a pprof profile to { @ code out } all running starlark threads are profiled may be called concurrent with starlark execution

public static void start cpu profile ( output stream out , duration period ) { cpu profiler start ( out , period ) ; }


creates an { @ link animated image result builder } for creating an { @ link animated image result }

public static animated image result builder new builder ( animated image image ) { return new animated image result builder ( image ) ; }


where the attribute was defined within the & lt ; declare - styleable & gt ; block < code > optional aapt pb source source = 1 ; < code >

private void set source ( com android aapt resources source builder builder for value ) { source = builder for value build ( ) ; bit field 0 | = 0x 0 0 0 0 0 0 0 1 ; }


force an existing reference to refer to the code space pointers created in the data space refer to the data space by default , this method is used to change these pointers in the data space to refer to code

void force code pointer ( address addr ) { if ( code space = = data space ) { return ; } reference manager ref mgr = program get reference manager ( ) ; reference ref = ref mgr get primary reference from ( addr , 0 ) ; if ( ref = = null ) { return ; } address to addr = ref get to address ( ) ; if ( ! to addr get address space ( ) equals ( code space ) ) { to addr = code space get address ( to addr get addressable word offset ( ) , true ) ; reference new ref = ref mgr add memory reference ( addr , to addr , ref type data , source type analysis , 0 ) ; ref mgr set primary ( new ref , true ) ; ref mgr delete ( ref ) ; } }


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


@ test public void tls timeouts not retried ( ) throws exception { enable tls ( ) ; server enqueue ( new mock response ( ) set socket policy ( socket policy no response ) ) ; server enqueue ( new mock response ( ) set body ( " unreachable ! " ) ) ; client = client new builder ( ) read timeout ( duration of millis ( 100 ) ) build ( ) ; request request = new request builder ( ) url ( server url ( " / " ) ) build ( ) ; try { / / if this succeeds , too many requests were made client new call ( request ) execute ( ) ; fail ( ) ; } catch ( interrupted i o exception expected ) { } }


converts a timestamp in microseconds to a 90 k hz clock timestamp does not perform any wraparound to get a 90 k hz timestamp suitable for use with mpeg - ts , use { @ link # us to wrapped pts ( long ) }

public static long us to non wrapped pts ( long us ) { return ( us * 90000 ) / c micros per second ; }


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


public remoting desc parser remoting service info ( object bean , string bean name , remoting parser remoting parser ) { remoting desc remoting bean desc = remoting parser get service desc ( bean , bean name ) ; if ( remoting bean desc = = null ) { return null ; } remoting service map put ( bean name , remoting bean desc ) ; class < ? > interface class = remoting bean desc get interface class ( ) ; method [ ] methods = interface class get methods ( ) ; if ( remoting parser is service ( bean , bean name ) ) { try { / / service bean , registry resource object target bean = remoting bean desc get target bean ( ) ; for ( method m : methods ) { two phase business action two phase business action = m get annotation ( two phase business action class ) ; if ( two phase business action ! = null ) { t c c resource tcc resource = new t c c resource ( ) ; tcc resource set action name ( two phase business action name ( ) ) ; tcc resource set target bean ( target bean ) ; tcc resource set prepare method ( m ) ; tcc resource set commit method name ( two phase business action commit method ( ) ) ; tcc resource set commit method ( reflection util get method ( interface class , two phase business action commit method ( ) , new class [ ] { business action context class } ) ) ; tcc resource set rollback method name ( two phase business action rollback method ( ) ) ; tcc resource set rollback method ( reflection util get method ( interface class , two phase business action rollback method ( ) , new class [ ] { business action context class } ) ) ; / / registry tcc resource default resource manager get ( ) register resource ( tcc resource ) ; } } } catch ( throwable t ) { throw new framework exception ( t , " parser remoting service error " ) ; } } if ( remoting parser is reference ( bean , bean name ) ) { / / reference bean , tcc proxy remoting bean desc set reference ( true ) ; } return remoting bean desc ; }


provides a list of filters in conjunctive form for filtering on a best - effort basis

default void apply filters ( list < resolved expression > filters ) { }


clears the analysis cache as in - - discard analysis cache

void clear analysis cache ( collection < configured target > top level targets , immutable set < aspect key > top level aspects ) { skyframe build view clear analysis cache ( top level targets , top level aspects ) ; }


pauses the thread this call is non - blocking

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


calculates the maximum value on a given column the value is returned with the same data type of the column lite pal max ( person class , & quot ; age & quot ; , int class ) ; you can also specify a where clause when calculating lite pal where ( & quot ; age & gt ; ? & quot ; , & quot ; 15 & quot ; ) max ( person class , & quot ; age & quot ; , integer type ) ;

public static < t > t max ( class < ? > model class , string column name , class < t > column type ) { return max ( base utility change case ( d b utility get table name by class name ( model class get name ( ) ) ) , column name , column type ) ; }


determines whether to enable strict java deps

public strict deps mode get strict java deps ( ) { return strict java deps ; }


public static void verify histogram ( string name , list < label > labels , list < double > buckets , list < long > bucket values , meter data builder validate ) { assert assert not null ( validate ) ; assert assert equals ( validate get metric case ( ) get number ( ) , meter data histogram field number ) ; meter histogram histogram = validate get histogram ( ) ; assert assert not null ( histogram ) ; assert assert equals ( histogram get name ( ) , name ) ; assert assert equals ( histogram get labels list ( ) , labels ) ; assert assert not null ( histogram get values list ( ) ) ; assert assert equals ( histogram get values count ( ) , bucket values size ( ) ) ; for ( int i = 0 ; i < bucket values size ( ) ; i + + ) { assert assert not null ( histogram get values ( i ) ) ; assert assert equals ( histogram get values ( i ) get bucket ( ) , buckets get ( i ) double value ( ) , 0 0 ) ; assert assert equals ( histogram get values ( i ) get count ( ) , bucket values get ( i ) long value ( ) ) ; } }


returns the config fragment options classes used by the given fragment types

public static set < class < ? extends fragment options > > get options classes ( iterable < class < ? extends fragment > > fragment classes , rule class provider rule class provider ) { multimap < class < ? extends fragment > , class < ? extends fragment options > > fragment to required options = array list multimap create ( ) ; for ( class < ? extends fragment > fragment class : ( ( fragment provider ) rule class provider ) get configuration fragments ( ) ) { fragment to required options put all ( fragment class , fragment required options ( fragment class ) ) ; } set < class < ? extends fragment options > > options = new hash set < > ( ) ; for ( class < ? extends fragment > fragment class : fragment classes ) { options add all ( fragment to required options get ( fragment class ) ) ; } return options ; }


deletes the component data type at the given index in this composite and removes the deleted component from the selection if necessary < br > note : this method does not fix the selection based on lock mode and does not perform any edit notification

void delete ( int component ordinal ) { do delete ( component ordinal ) ; selection remove range ( component ordinal , component ordinal + 1 ) ; adjust selection ( component ordinal + 1 , - 1 ) ; notify composite changed ( ) ; }


sets the logger that is used for the encoder and decoder

protected b frame logger ( http 2 frame logger frame logger ) { enforce non codec constraints ( " frame logger " ) ; this frame logger = check not null ( frame logger , " frame logger " ) ; return self ( ) ; }


returns a formatted string representing the given class id including a handle

public string get string for net cls class id ( int class id ) { return string format ( format net cls class id , root qdisc handle , class id ) ; }


load the version information from the federation state store


public rest result < string > execute ( map < string , string > args ) { final cli service cli service = raft server get cli service ( ) ; if ( args contains key ( j raft constants group id ) ) { final string group id = args get ( j raft constants group id ) ; final node node = raft server find node by group ( group id ) ; return single ( cli service , group id , node , args ) ; } map < string , j raft server raft group tuple > tuple map = raft server get multi raft group ( ) ; for ( map entry < string , j raft server raft group tuple > entry : tuple map entry set ( ) ) { final string group = entry get key ( ) ; final node node = entry get value ( ) get node ( ) ; rest result < string > result = single ( cli service , group , node , args ) ; if ( ! result ok ( ) ) { return result ; } } return rest result utils success ( ) ; }


reports whether this is a tuple expression

public boolean is tuple ( ) { return is tuple ; }


function that returns the key used for matching request arguments against returned objects the key returned from this function should match up with the key returned from { @ link # get batch return type key selector ( ) } ;

protected abstract func 1 < request argument type , k > get request argument key selector ( ) ;


protected b p offer service create b p o s ( final string nameservice id , list < string > nn ids , list < inet socket address > nn addrs , list < inet socket address > lifeline nn addrs ) { return new b p offer service ( nameservice id , nn ids , nn addrs , lifeline nn addrs , dn ) ; }


public type get type ( ) { return type float ; }


returns the index of the first bit that is set to false that occurs on or after the specified starting index

public int next clear bit ( int from index ) { long [ ] bits = this bits ; int word = from index > > > 6 ; int bits length = bits length ; if ( word > = bits length ) return bits length < < 6 ; long bits at word = bits [ word ] ; for ( int i = from index & 0x 3f ; i < 64 ; i + + ) { if ( ( bits at word & ( 1l < < ( i & 0x 3 f ) ) ) = = 0l ) { return ( word < < 6 ) + i ; } } for ( word + + ; word < bits length ; word + + ) { if ( word = = 0 ) { return word < < 6 ; } bits at word = bits [ word ] ; for ( int i = 0 ; i < 64 ; i + + ) { if ( ( bits at word & ( 1l < < ( i & 0x 3 f ) ) ) = = 0l ) { return ( word < < 6 ) + i ; } } } return bits length < < 6 ; }


unwraps a { @ link internal log id } to return a { @ code long }

public static long id ( internal with log id with log id ) { return with log id get log id ( ) get id ( ) ; }


register a free marker view resolver with an empty default view name prefix and a default suffix of " ftl " note that you must also configure free marker by adding a { @ link org springframework web servlet view freemarker free marker configurer } bean

public url based view resolver registration free marker ( ) { if ( ! check bean of type ( free marker configurer class ) ) { throw new bean initialization exception ( " in addition to a free marker view resolver " + " there must also be a single free marker config bean in this web application context " + " ( or its parent ) : free marker configurer is the usual implementation " + " this bean may be given any name " ) ; } free marker registration registration = new free marker registration ( ) ; this view resolvers add ( registration get view resolver ( ) ) ; return registration ; }


inserts the given object into the current buffer this method returns a pointer that can be used to address the written record in this partition

public final long append record ( t record ) throws i o exception { long pointer = this write view get current pointer ( ) ; try { this serializer serialize ( record , this write view ) ; this record counter + + ; return pointer ; } catch ( e o f exception e ) { / / we ran out of pages / / first , reset the pages and then we need to trigger a compaction / / int old current buffer = this write view reset to ( pointer ) ; / / for ( int buf num = this partition pages size ( ) - 1 ; buf num > old current buffer ; / / buf num - - ) { / / this available memory add memory segment ( this partition pages remove ( buf num ) ) ; / / } throw e ; } }


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


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


creates an event reporting an absent input artifact

event get root cause error ( value t value , key t key , label cause root cause , environment env ) throws interrupted exception ;


applies an aggregate transformation on a non - grouped { @ link tuple } { @ link data set } < b > note : only tuple data sets can be aggregated < b > the transformation applies a built - in { @ link aggregations aggregation } on a specified field of a tuple data set additional aggregation functions can be added to the resulting { @ link aggregate operator } by calling { @ link aggregate operator # and ( aggregations , int ) }

public aggregate operator < t > aggregate ( aggregations agg , int field ) { return new aggregate operator < > ( this , agg , field , utils get call location name ( ) ) ; }


install the given grouped vertex into the graph , optionally animating the process

public boolean install group vertex ( f g controller controller , grouped function graph vertex group vertex , point 2 d group vertex location ) { return install group vertex ( controller , group vertex , group vertex location , false , false , false ) ; }


public void shutdown ( ) { this keep running = false ; this interrupt ( ) ; }


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

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


handles collisions for object obj using quadtree

abstract void handle collisions using qt ( t obj ) ;


searches the given directory ( non - recursively ) for jars and returns their paths in a list

public static list < string > find jars in dir ( resource file dir ) { list < string > list = new array list < > ( ) ; resource file [ ] names = dir list files ( ) ; if ( names ! = null ) { for ( resource file file : names ) { if ( file get name ( ) ends with ( " jar " ) ) { list add ( file get absolute path ( ) ) ; } } } return list ; }


public void run interactive mode ( ) { var event manager = new event manager ( ) ; var s = new scanner ( system in ) ; var option = - 1 ; while ( option ! = 4 ) { logger info ( " hello would you like to boil some eggs ? " ) ; logger info ( " ( 1 ) boil an egg \ n ( 2 ) stop boiling this egg \ n ( 3 ) how are my eggs ? \ n ( 4 ) exit " ) ; logger info ( " choose [ 1 , 2 , 3 , 4 ] : " ) ; option = s next int ( ) ; if ( option = = 1 ) { process option 1 ( event manager , s ) ; } else if ( option = = 2 ) { process option 2 ( event manager , s ) ; } else if ( option = = 3 ) { process option 3 ( event manager , s ) ; } else if ( option = = 4 ) { event manager shutdown ( ) ; } } s close ( ) ; }


constructs a new semver from the given components with minor and patch set to 0

public static sem ver from ( int major ) { return from ( major , 0 , 0 ) ; }


reverses the order of the given array there is no special handling for multi - dimensional arrays this method does nothing for a < code > null < code > input array

public static < t > void reverse ( t [ ] array ) { if ( array = = null ) { return ; } int i = 0 ; int j = array length - 1 ; t tmp ; while ( j > i ) { tmp = array [ j ] ; array [ j ] = array [ i ] ; array [ i ] = tmp ; j - - ; i + + ; } }


the sql standard defines that character string literals are allowed to be zero - length strings ( i e , to contain no characters ) even though it is not permitted to declare a type that is zero for consistent behavior , the same logic applies to binary strings this method enables this special kind of binary string zero - length binary strings have no serializable string representation

public static binary type of empty literal ( ) { return new binary type ( empty literal length , false ) ; }


create a new { @ link category context mapping }

public static category context mapping builder category ( string name ) { return new category context mapping builder ( name ) ; }


the number of listeners currently pending for notification

synchronized int pending listeners ( ) { return listeners size ( ) ; }


returns a list of all the symbols with the given name in the given namespace

public final list < symbol > get symbols ( string name , namespace namespace ) { return current program get symbol table ( ) get symbols ( name , namespace ) ; }


test a command execution ( asynchronously ) that fails , has get fallback implemented but that fails as well

public void test queue failure with fallback failure ( ) { test hystrix command < integer > command = get command ( execution isolation strategy thread , abstract test hystrix command execution result failure , abstract test hystrix command fallback result failure ) ; try { command queue ( ) get ( ) ; fail ( " we shouldn ' t get here " ) ; } catch ( exception e ) { if ( e get cause ( ) instanceof hystrix runtime exception ) { hystrix runtime exception de = ( hystrix runtime exception ) e get cause ( ) ; e print stack trace ( ) ; assert not null ( de get fallback exception ( ) ) ; } else { fail ( " the cause should be hystrix runtime exception " ) ; } } assert true ( command get execution time in milliseconds ( ) > - 1 ) ; assert true ( command is failed execution ( ) ) ; assert command execution events ( command , hystrix event type failure , hystrix event type fallback failure ) ; assert not null ( command get execution exception ( ) ) ; assert equals ( 0 , command get builder ( ) metrics get current concurrent execution count ( ) ) ; assert sane hystrix request log ( 1 ) ; }


utility method which set the bg color based on configuration values

public static void set bg color ( view view , final config config ) { int [ ] colors = view get context ( ) get resources ( ) get int array ( r array bg colors ) ; final int bg color = colors [ config bg color ] ; view set background color ( bg color ) ; }


start the { @ link test dns server } but drop all { @ code aaaa } queries and not send any response to these at all

public void start ( final boolean drop a a a a queries ) throws i o exception { inet socket address address = new inet socket address ( net util localhost4 , 0 ) ; udp transport transport = new udp transport ( address get host name ( ) , address get port ( ) ) ; set transports ( transport ) ; datagram acceptor acceptor = transport get acceptor ( ) ; acceptor set handler ( new dns protocol handler ( this , store ) { @ override public void session created ( io session session ) { / / u se our own codec to support aaaa testing session get filter chain ( ) add first ( " codec " , new protocol codec filter ( new test dns protocol udp codec factory ( drop a a a a queries ) ) ) ; } } ) ; ( ( datagram session config ) acceptor get session config ( ) ) set reuse address ( true ) ; / / start the listener acceptor bind ( ) ; }


return the list of all created { @ link query profiler } s so far

public list < query profiler > get query profilers ( ) { return collections unmodifiable list ( query profilers ) ; }


public string query ( ) { return query ; }


returns a list of actions to delete bookmarks that are in the code unit surrounding the given address < b > for the given type of bookmark < b >

private list < docking action if > get actions for code unit and type ( address primary address , string type , bookmark navigator navigator ) { / / find all bookmarks that may be within the code unit at address list < docking action if > action list = new array list < > ( ) ; code unit cu = current program get listing ( ) get code unit containing ( primary address ) ; if ( cu = = null ) { return action list ; } address start = cu get min address ( ) ; address end = cu get max address ( ) ; if ( ! navigator intersects ( start , end ) ) { return action list ; } for ( int i = 1 ; i < cu get length ( ) ; i + + ) { address next code unit address = start add ( i ) ; if ( ! next code unit address equals ( primary address ) ) { / / skip the original location bookmark [ ] other bookmarks = bookmark mgr get bookmarks ( next code unit address , type ) ; if ( other bookmarks length > 0 ) { docking action action = new delete bookmark action ( this , other bookmarks [ 0 ] , true ) ; action set enabled ( true ) ; action list add ( action ) ; } } } return action list ; }


server stream tracer factory get server tracer factory ( ) { return server tracer factory ; }


adds all the rule classes supported internally within the build tool to the given builder

public static void add standard rules ( configured rule class provider builder builder ) { try { class < ? > provider class = class for name ( test constants test rule class provider ) ; method setup method = provider class get method ( " setup " , configured rule class provider builder class ) ; setup method invoke ( null , builder ) ; } catch ( exception e ) { throw new illegal state exception ( e ) ; } }


called when the given < code > data type manager < code > ' s cache has been invalidated

public void data type manager invalidated ( data type manager data type manager ) ;


adds a validation state to the final results

public void add result ( validated validated ) { synchronized ( validations ) { validation rule rule = validated get rule ( ) ; if ( rule ! = null & & ! rule equals ( validation rule empty ( ) ) & & ! validations contains ( validated ) ) { validations add ( validated ) ; } } }


public cancellable get mapping async ( get mappings request get mappings request , request options options , action listener < get mappings response > listener ) { return rest high level client perform request async and parse entity ( get mappings request , indices request converters : : get mappings , options , get mappings response : : from x content , listener , empty set ( ) ) ; }


returns the edges in this graph whose endpoints include { @ code node } this is equal to the union of incoming and outgoing edges

set < endpoint pair < n > > incident edges ( n node ) ;


public long get pointer to d l l name ( ) { return sz name ; }


public file download file from response ( response response ) throws api exception { try { file file = prepare download file ( response ) ; buffered sink sink = okio buffer ( okio sink ( file ) ) ; sink write all ( response body ( ) source ( ) ) ; sink close ( ) ; return file ; } catch ( i o exception e ) { throw new api exception ( e ) ; } }


post usercreate with list : creates list of users with given input array

default completable future < response entity < void > > create users with list input ( @ api param ( value = " list of user object " , required = true ) @ valid @ request body list < user > body ) { return completable future completed future ( new response entity < > ( http status not implemented ) ) ; }


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

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


public final int get int bits ( ) { return bits ; }


called when an event - time timer that was set using the trigger context fires

public abstract trigger result on event time ( long time , w window , trigger context ctx ) throws exception ;


schedule the given { @ link runnable } , invoking it at the specified execution time and subsequently with the given delay between the completion of one execution and the start of the next execution will end once the scheduler shuts down or the returned { @ link scheduled future } gets cancelled

default scheduled future < ? > schedule with fixed delay ( runnable task , instant start time , duration delay ) { return schedule with fixed delay ( task , date from ( start time ) , delay to millis ( ) ) ; }


gets whether the progress bar should be hidden when the progress is 0

public boolean get hide when zero ( ) { return m hide when zero ; }


an api rest method to get the allowed { $ link top level item } s and its categories

public categories do item categories ( stapler request req , stapler response rsp , @ query parameter string icon style ) throws i o exception , servlet exception { get owner ( ) check permission ( item create ) ; rsp add header ( " cache - control " , " no - cache , no - store , must - revalidate " ) ; rsp add header ( " pragma " , " no - cache " ) ; rsp add header ( " expires " , " 0 " ) ; categories categories = new categories ( ) ; int order = 0 ; jelly context ctx ; if ( string utils is not blank ( icon style ) ) { ctx = new jelly context ( ) ; ctx set variable ( " res u r l " , req get context path ( ) + jenkins resource path ) ; } else { ctx = null ; } for ( top level item descriptor descriptor : descriptor visibility filter apply ( get owner ( ) get item group ( ) , items all 2 ( jenkins get authentication 2 ( ) , get owner ( ) get item group ( ) ) ) ) { item category ic = item category get category ( descriptor ) ; map < string , serializable > metadata = new hash map < > ( ) ; / / information about item metadata put ( " class " , descriptor get id ( ) ) ; metadata put ( " order " , + + order ) ; metadata put ( " display name " , descriptor get display name ( ) ) ; metadata put ( " description " , descriptor get description ( ) ) ; metadata put ( " icon file path pattern " , descriptor get icon file path pattern ( ) ) ; string icon class name = descriptor get icon class name ( ) ; if ( string utils is not blank ( icon class name ) ) { metadata put ( " icon class name " , icon class name ) ; if ( ctx ! = null ) { icon icon = icon set icons get icon by class spec ( string utils join ( new string [ ] { icon class name , icon style } , " " ) ) ; if ( icon ! = null ) { metadata put ( " icon qualified url " , icon get qualified url ( ctx ) ) ; } } } category category = categories get item ( ic get id ( ) ) ; if ( category ! = null ) { category get items ( ) add ( metadata ) ; } else { list < map < string , serializable > > temp = new array list < > ( ) ; temp add ( metadata ) ; category = new category ( ic get id ( ) , ic get display name ( ) , ic get description ( ) , ic get order ( ) , ic get min to show ( ) , temp ) ; categories get items ( ) add ( category ) ; } } return categories ; }


create a new { @ link geo distance } aggregation with the given name

public static geo distance aggregation builder geo distance ( string name , geo point origin ) { return new geo distance aggregation builder ( name , origin ) ; }


6 : bral 12 - - + ( start w nfctx = 2 @ 12 ) | + - > 10 : nfctx # 3 | | 12 : cop 3 < - - + ( conflict due to varying context ) + - - 14 : bral 10 test use of non - flow context in disassembly with expected parse error

public void test disassembler inconsistent mid block ( ) throws exception { program get program context ( ) set value ( program get register ( " nfctx " ) , addr ( 12 ) , addr ( 12 ) , big integer value of ( 2 ) ) ; program builder add bytes branch ( 6 , 12 ) ; program builder add bytes fallthrough set no flow context ( 10 , 3 ) ; program builder add bytes cop instruction ( 12 ) ; program builder add bytes branch ( 14 , 10 ) ; address set view dis addrs = disassembler disassemble ( addr ( 6 ) , null ) ; assert equals ( addrset ( range ( 6 , 7 ) , range ( 10 , 15 ) ) , dis addrs ) ; verify instruction presence ( ) ; verify error bookmark ( addr ( 12 ) , " inconsistent instruction prototype " ) ; }


void close ( ) { if ( journal writer ! = null ) { journal writer close ( ) ; journal writer = null ; } if ( journal count > = index rewrite journal limit ) { flush index ( ) ; } }


{ @ inherit doc } the default implementation does nothing

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


public http response do do delete ( ) throws i o exception { throw http responses status ( sc bad request ) ; }


sets the minimum progress that the animation will start from when playing or looping

public void set min progress ( float start progress ) { lottie drawable set min progress ( start progress ) ; }


get the primary symbol for this code unit

public symbol get primary symbol ( ) { if ( program = = null ) return null ; symbol table st = program get symbol table ( ) ; return st get primary symbol ( address ) ; }


location where the file containing the spec will be generated in the output folder

public void set open api spec file location ( string location ) { this open api spec file location = location ; }