test that adjusting the string alignment value to " 4 " works the strings tested here should be created when the alignment is set to 4 also test that strings that would be created at align 2 ( but not at align 4 ) are not created

public void test string start align at 4 ( ) throws exception { program test program = build program ( " msvidctl dll " , false ) ; listing listing = test program get listing ( ) ; address space space = test program get language ( ) get address factory ( ) get default address space ( ) ; string [ ] existing strings = new string [ ] { " release bound objects w ` \ \ t " , " current image ( # " , " content becoming stale , 3 " , " enum media types w w 0 * " } ; int [ ] offsets = new int [ ] { 0x 5a 2b 0 7a 8 , 0x 5a 2b 5 2 7 8 , 0x 5a 2b 6 2 7 0 , 0x 5a 2cc 2fc } ; string [ ] strings aligned at 2 = new string [ ] { " mci send command w " , " component type , " , " set the sink filter ( clsid ) www \ \ t " , " ms video control interface ; " } ; int [ ] offsets aligned at 2 = new int [ ] { 0x 5a 2 9b 0c 2 , 0x 5a 2b 7 7 2 2 , 0x 5a 2b 8 9 1a , 0x 5a 2b 9 0b 2 } ; address [ ] existing addresses = new address [ offsets length ] ; address [ ] align at 2 addresses = new address [ offsets aligned at 2 length ] ; for ( int i = 0 ; i < offsets length ; i + + ) { existing addresses [ i ] = addr ( space , offsets [ i ] ) ; } for ( int i = 0 ; i < align at 2 addresses length ; i + + ) { align at 2 addresses [ i ] = addr ( space , offsets aligned at 2 [ i ] ) ; } data data here ; / / verify these strings do not exist prior to running the strings analyzer for ( address curr address : existing addresses ) { data here = listing get defined data at ( curr address ) ; assert null ( data here ) ; } for ( address curr address : align at 2 addresses ) { data here = listing get defined data at ( curr address ) ; assert null ( data here ) ; } auto analysis manager manager = auto analysis manager get analysis manager ( test program ) ; strings analyzer analyzer = new strings analyzer ( ) ; analyzer set string start alignment ( 4 ) ; analyzer set string end alignment ( 1 ) ; analyzer added ( test program , null , monitor , manager get message log ( ) ) ; string string here ; for ( int i = 0 ; i < existing strings length ; i + + ) { / / verify string is actually there data here = listing get defined data at ( existing addresses [ i ] ) ; assert not null ( data here ) ; string here = data here get default value representation ( ) ; assert equals ( " \ " " + existing strings [ i ] + " \ " " , string here ) ; } / / verify " aligned at 2 " strings still not there for ( address curr address : align at 2 addresses ) { data here = listing get defined data at ( curr address ) ; assert null ( data here ) ; } / / verify the align 2 strings are created when start alignment is changed to 2 analyzer set string start alignment ( 2 ) ; analyzer added ( test program , null , monitor , manager get message log ( ) ) ; for ( int i = 0 ; i < strings aligned at 2 length ; i + + ) { / / verify string is actually there data here = listing get defined data at ( align at 2 addresses [ i ] ) ; assert not null ( data here ) ; string here = data here get default value representation ( ) ; assert equals ( " \ " " + strings aligned at 2 [ i ] + " \ " " , string here ) ; } }


returns the value to which the specified key is mapped , or null if this map contains no mapping for the key

public v get ( k key ) { return get ( key , now ( ) , e - > { } ) ; }


determine whether the given map type is an approximable type , i e a type that { @ link # create approximate map } can approximate

public static boolean is approximable map type ( @ nullable class < ? > map type ) { return ( map type ! = null & & approximable map types contains ( map type ) ) ; }


sets the field value as the specified value

public abstract out read ( int index ) ;


checks a programs memory for 32 bit image base offset references to the address indicated these relative references are only found at addresses that match the indicated alignment

public static set < address > find image base offsets 3 2 ( program program , int alignment , address to address , task monitor monitor ) throws cancelled exception { if ( monitor = = null ) { monitor = task monitor adapter dummy monitor ; } memory memory = program get memory ( ) ; address image base = program get image base ( ) ; long offset value = to address subtract ( image base ) ; int offset size = 4 ; / / 32 bit offset byte [ ] bytes = new byte [ offset size ] ; for ( int i = 0 ; i < offset size ; i + + ) { bytes [ i ] = ( byte ) offset value ; offset value > > = 8 ; / / shift by a single byte } set < address > ibo refs addrs = new tree set < > ( ) ; find byte pattern ( memory , ( address range ) null , bytes , alignment , ibo refs addrs , monitor ) ; return ibo refs addrs ; }


returns the type of the resize operation

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


does the domain name match one of the " wildcard " patterns ( e g { @ code " ar " } ) ? if a { @ code desired type } is specified , the wildcard pattern must also match that type

private static boolean matches wildcard suffix type ( optional < public suffix type > desired type , string domain ) { list < string > pieces = dot splitter limit ( 2 ) split to list ( domain ) ; return pieces size ( ) = = 2 & & matches type ( desired type , optional from nullable ( public suffix patterns under get ( pieces get ( 1 ) ) ) ) ; }


set whether to allow { @ code null } values ( adapting them to an internal null holder value ) default is " true "

public void set allow null values ( boolean allow null values ) { this allow null values = allow null values ; }


returns true if the three { @ link plane planes } intersect , setting the point of intersection in { @ code intersection } , if any

public static boolean intersect planes ( plane a , plane b , plane c , vector 3 intersection ) { tmp 1 set ( a normal ) crs ( b normal ) ; tmp 2 set ( b normal ) crs ( c normal ) ; tmp 3 set ( c normal ) crs ( a normal ) ; float f = - a normal dot ( tmp 2 ) ; if ( math abs ( f ) < math utils float rounding error ) { return false ; } tmp 1 scl ( c d ) ; tmp 2 scl ( a d ) ; tmp 3 scl ( b d ) ; intersection set ( tmp 1 x + tmp 2 x + tmp 3 x , tmp 1 y + tmp 2 y + tmp 3 y , tmp 1 z + tmp 2 z + tmp 3 z ) ; intersection scl ( 1 / f ) ; return true ; }


train and produce a { @ link model } which fits the records in the given { @ link table }

m fit ( table environment t env , table input ) ;


force the repository into a consistent end state so that its eventual state can be examined

public void force consistent ( ) { synchronized ( actions ) { final list < blob store action > consistent actions = consistent view ( actions ) ; actions clear ( ) ; actions add all ( consistent actions ) ; consistent = true ; } }


simulates to generate different peer addresses , e g [ 84 125 113 65 : 9801 ]

private string gen peer address ( ) { final thread local random r = thread local random current ( ) ; return string format ( " [ % d % d % d % d : 9801 ] " , r next int ( 1 , 256 ) , r next int ( 1 , 256 ) , r next int ( 1 , 256 ) , r next int ( 1 , 256 ) ) ; }


get the description of the m bean resource default implementation returns a simple description for the m bean based on the class name

protected string get description ( object managed bean , string bean key ) throws j m exception { string target class name = get target class ( managed bean ) get name ( ) ; if ( aop utils is aop proxy ( managed bean ) ) { return " proxy for " + target class name ; } return target class name ; }


public static byte [ ] to byte array ( input stream in ) throws i o exception { byte array output stream out = new byte array output stream ( ) ; copy ( in , out ) ; return out to byte array ( ) ; }


returns true if inst is an instance of model class in the open a p i model hierarchy the java class hierarchy is not implemented the same way as the open a p i model hierarchy , so it ' s not possible to use the instanceof keyword

public static boolean is instance of ( class < ? > model class , object inst , set < class < ? > > visited classes ) { if ( model class is instance ( inst ) ) { / / this handles the ' all of ' use case with single parent inheritance return true ; } if ( visited classes contains ( model class ) ) { / / this is to prevent infinite recursion when the composed schemas have / / a circular dependency return false ; } visited classes add ( model class ) ; / / traverse the one of / any of composed schemas map < string , generic type > descendants = model descendants get ( model class ) ; if ( descendants ! = null ) { for ( generic type child type : descendants values ( ) ) { if ( is instance of ( child type get raw type ( ) , inst , visited classes ) ) { return true ; } } } return false ; }


public object get map with undeclared properties anytype 2 ( ) { return map with undeclared properties anytype 2 ; }


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


converts the internal representation of a sql timestamp ( long ) to the java type used for udf parameters ( { @ link java sql timestamp } )

public static java sql timestamp internal to timestamp ( long v ) { return new java sql timestamp ( v - local tz get offset ( v ) ) ; }


formats the given string to resemble a scope variable

public static string as variable ( string scope ) { return scope variable prefix + scope + scope variable suffix ; }


immediately stops a request within a filter or route with specified status code and body content note : when using this don ' t catch exceptions of type halt exception , or if catched , re - throw otherwise halt will not work

public static halt exception halt ( int status , string body ) { throw get instance ( ) halt ( status , body ) ; }


returns a reasonable default to use if no other value is set , or { @ code null }

public t get default value ( ) { return default value ; }


releases all of the partition ' s segments ( pages and overflow buckets )

public void clear all memory ( list < memory segment > target ) { / / return the overflow segments if ( this overflow segments ! = null ) { for ( int k = 0 ; k < this num overflow segments ; k + + ) { target add ( this overflow segments [ k ] ) ; } } / / return the partition buffers target add all ( this partition pages ) ; this partition pages clear ( ) ; }


send the list offset request to a specific broker for the partitions and target timestamps

private request future < list offset result > send list offset request ( final node node , final map < topic partition , list offsets partition > timestamps to search , boolean require timestamp ) { list offsets request builder builder = list offsets request builder for consumer ( require timestamp , isolation level ) set target times ( list offsets request to list offsets topics ( timestamps to search ) ) ; log debug ( " sending list offset request { } to broker { } " , builder , node ) ; return client send ( node , builder ) compose ( new request future adapter < client response , list offset result > ( ) { @ override public void on success ( client response response , request future < list offset result > future ) { list offsets response lor = ( list offsets response ) response response body ( ) ; log trace ( " received list offset response { } from broker { } " , lor , node ) ; handle list offset response ( lor , future ) ; } } ) ; }


set the date format used to parseformat date parameters

public api client set date format ( date format date format ) { this date format = date format ; / / also set the date format for model ( de ) serialization with date properties this json set date format ( ( date format ) date format clone ( ) ) ; return this ; }


set the u r i resolver used in the transform the u r i resolver handles calls to the xslt { @ code document ( ) } function

public void set uri resolver ( u r i resolver uri resolver ) { this uri resolver = uri resolver ; }


returns a { @ link handler exception resolver composite } containing a list of exception resolvers obtained either through { @ link # configure handler exception resolvers } or through { @ link # add default handler exception resolvers } note : this method cannot be made final due to cglib constraints rather than overriding it , consider overriding { @ link # configure handler exception resolvers } which allows for providing a list of resolvers

public handler exception resolver handler exception resolver ( @ qualifier ( " mvc content negotiation manager " ) content negotiation manager content negotiation manager ) { list < handler exception resolver > exception resolvers = new array list < > ( ) ; configure handler exception resolvers ( exception resolvers ) ; if ( exception resolvers is empty ( ) ) { add default handler exception resolvers ( exception resolvers , content negotiation manager ) ; } extend handler exception resolvers ( exception resolvers ) ; handler exception resolver composite composite = new handler exception resolver composite ( ) ; composite set order ( 0 ) ; composite set exception resolvers ( exception resolvers ) ; return composite ; }


test that allowed operation puts proper entry in audit log

public void test audit allowed ( ) throws exception { final path file = new path ( fnames [ 0 ] ) ; file system userfs = d f s test util get file system as ( user group info , conf ) ; setup audit logs ( ) ; input stream istream = userfs open ( file ) ; int val = istream read ( ) ; istream close ( ) ; verify audit logs ( true ) ; assert true ( " failed to read from file " , val > = 0 ) ; }


applies this options policy enforcer ' s policy to the given options parser

public void enforce ( options parser parser , @ nullable string command ) throws options parsing exception { if ( invocation policy = = null | | invocation policy get flag policies count ( ) = = 0 ) { return ; } / / the effective policy returned is expanded , filtered for applicable commands , and cleaned of / / redundancies and conflicts list < flag policy with context > effective policies = get effective policies ( invocation policy , parser , command , loglevel ) ; for ( flag policy with context flag policy : effective policies ) { string flag name = flag policy policy get flag name ( ) ; option value description value description ; try { value description = parser get option value description ( flag name ) ; } catch ( illegal argument exception e ) { / / this flag doesn ' t exist we are deliberately lenient if the flag policy has a flag / / we don ' t know about this is for better future proofing so that as new flags are added , / / new policies can use the new flags without worrying about older versions of bazel logger at ( loglevel ) log ( " flag ' % s ' specified by invocation policy does not exist " , flag name ) ; continue ; } / / get option description ( ) will return null if the option does not exist , however / / get option value description ( ) above would have thrown an illegal argument exception if that / / were the case verify verify not null ( flag policy description ) ; switch ( flag policy policy get operation case ( ) ) { case set value : apply set value operation ( parser , flag policy , value description , loglevel ) ; break ; case use default : apply use default operation ( parser , " use default " , flag policy description get option definition ( ) , loglevel ) ; break ; case allow values : allow values allow values = flag policy policy get allow values ( ) ; filter value operation allow value operation allow value operation = new filter value operation allow value operation ( loglevel ) ; allow value operation apply ( parser , flag policy origin , allow values get allowed values list ( ) , allow values has new value ( ) ? allow values get new value ( ) : null , allow values has use default ( ) , value description , flag policy description ) ; break ; case disallow values : disallow values disallow values = flag policy policy get disallow values ( ) ; filter value operation disallow value operation disallow value operation = new filter value operation disallow value operation ( loglevel ) ; disallow value operation apply ( parser , flag policy origin , disallow values get disallowed values list ( ) , disallow values has new value ( ) ? disallow values get new value ( ) : null , disallow values has use default ( ) , value description , flag policy description ) ; break ; case operation not set : throw new policy operation not set exception ( flag name ) ; default : logger at warning ( ) log ( " unknown operation ' % s ' from invocation policy for flag ' % s ' " , flag policy policy get operation case ( ) , flag name ) ; break ; } } }


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


return an interval stream of n number of ticks and buffer the emissions to avoid back pressure failures ( e g on slow ci server ) use this method as follows : tests that verify n number of items followed by verify on complete ( ) should set the number of emissions to n tests that verify n number of items followed by then cancel ( ) should set the number of buffered to an arbitrary number greater than n

public static flux < long > test interval ( duration period , int count ) { return flux interval ( period ) take ( count ) on backpressure buffer ( count ) ; } @ retention ( retention policy runtime ) @ target ( element type method ) @ parameterized test ( name = " [ { index } ] { 0 }


execute a delete request on the given url

public int execute delete ( string url ) { return request delete ( url ) get status ( ) ; }


returns { @ code true } if the { @ code hash code ( ) } method runs quickly

boolean is hash code fast ( ) { return false ; }


when the incremental mesh config request is the first in a stream , the initial resource versions must be populated otherwise , initial resource versions must be omitted the keys are the resources names of the mcp resources known to the mcp client the values in the map are the associated resource level version info < code > map & lt ; string , string & gt ; initial resource versions = 3 ; < code >

public builder remove initial resource versions ( java lang string key ) { if ( key = = null ) { throw new java lang null pointer exception ( ) ; } internal get mutable initial resource versions ( ) get mutable map ( ) remove ( key ) ; return this ; }


configure the { @ link scheduler } to use by default , initialized with a { @ link scheduled executor scheduler }

public void set scheduler ( @ nullable scheduler scheduler ) { this scheduler = scheduler ; }


creates an { @ link avro writer factory } that accepts and writes avro generic types the avro writers will use the given schema to build and write the records

public static avro writer factory < generic record > for generic record ( schema schema ) { string schema string = schema to string ( ) ; avro builder < generic record > builder = ( out ) - > create avro data file writer ( schema string , generic datum writer : : new , out ) ; return new avro writer factory < > ( builder ) ; }


filter events by multifactor authentication providers

protected pair < collection < event > , collection < multifactor authentication provider > > filter events by multifactor authentication provider ( final collection < event > resolve events , final authentication authentication , final registered service registered service , final http servlet request request ) { logger debug ( " locating multifactor providers to determine support for this authentication sequence " ) ; val providers = multifactor authentication utils get available multifactor authentication providers ( get webflow event resolution configuration context ( ) get application context ( ) ) ; if ( providers is empty ( ) ) { logger debug ( " no providers are available to honor this request moving on " ) ; return pair of ( resolve events , new hash set < > ( 0 ) ) ; } val provider values = providers values ( ) ; provider values remove if ( p - > resolve events stream ( ) none match ( e - > p matches ( e get id ( ) ) ) ) ; resolve events remove if ( e - > provider values stream ( ) none match ( p - > p matches ( e get id ( ) ) ) ) ; logger debug ( " finalized set of resolved events are [ { } ] " , resolve events ) ; val final events = new tree set < > ( comparator comparing ( event : : get id ) ) ; final events add all ( resolve events ) ; return pair of ( final events , provider values ) ; }


private high symbol parse symbol x m l ( xml pull parser parser ) throws pcode x m l exception { high symbol res = high symbol restore map sym x m l ( parser , false , func ) ; insert symbol ( res ) ; return res ; }


public void set signed pre key ( signed pre key record signed pre key ) throws i o exception { this push service socket set current signed pre key ( signed pre key ) ; }


gets the specified actual producer value from the stack , ignoring dupswap instructions , without disturbing it

public value get bottom actual producer value ( int index ) { return actual producer stack get bottom ( index ) ; }


get the time taken by the last task in nanoseconds

public long get last task time nanos ( ) throws illegal state exception { if ( this last task info = = null ) { throw new illegal state exception ( " no tasks run : can ' t get last task interval " ) ; } return this last task info get time nanos ( ) ; }


set a custom rmi server socket factory to use for the rmi registry only needs to be specified when the client socket factory does not implement { @ code java rmi server r m i server socket factory } already

public void set registry server socket factory ( r m i server socket factory registry server socket factory ) { this registry server socket factory = registry server socket factory ; }


force client username to be used throughout ghidra this may be required when testing so that the default login name can be forced

public static void set local user ( string username ) { test utils set instance field ( " user name " , system utilities class , username ) ; if ( ! username equals ( client util get user name ( ) ) ) { throw new assert exception ( " failed to force client username : " + username ) ; } }


returns how many volumes are in the data node

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


creates a table with pk and not null constraints

void create table with constraints ( i meta store client client , table table , configuration conf , unique constraint pk , list < byte > pk traits , list < string > not null cols , list < byte > nn traits ) ;


returns whether or not any layers in this composition has a matte layer

@ suppress warnings ( " unused " ) public boolean has matte ( ) { return lottie drawable has matte ( ) ; }


public path [ ] repo files ( ) { return repo files ; }


obtain an { @ code object name } for the supplied bean

object name get object name ( object managed bean , @ nullable string bean key ) throws malformed object name exception ;


parse the url that needs to be notified of the end of the job , along with the number of retries in case of failure , the amount of time to wait between retries and proxy settings

public void set conf ( configuration conf ) { this conf = conf ; num tries = math min ( conf get int ( m r job config mr job end retry attempts , 0 ) + 1 , conf get int ( m r job config mr job end notification max attempts , 1 ) ) ; wait interval = math min ( conf get int ( m r job config mr job end retry interval , 5000 ) , conf get int ( m r job config mr job end notification max retry interval , 5000 ) ) ; wait interval = ( wait interval < 0 ) ? 5000 : wait interval ; timeout = conf get int ( job context mr job end notification timeout , job context default mr job end notification timeout ) ; user url = conf get ( m r job config mr job end notification url ) ; proxy conf = conf get ( m r job config mr job end notification proxy ) ; custom job end notifier class name = string utils strip to null ( conf get ( m r job config mr job end notification custom notifier class ) ) ; / / configure the proxy to use if its set it should be set like / / proxy type @ proxy hostname : port if ( proxy conf ! = null & & ! proxy conf equals ( " " ) & & proxy conf last index of ( " : " ) ! = - 1 ) { int type index = proxy conf index of ( " @ " ) ; proxy type proxy type = proxy type http ; if ( type index ! = - 1 & & proxy conf substring ( 0 , type index ) compare to ignore case ( " socks " ) = = 0 ) { proxy type = proxy type socks ; } string hostname = proxy conf substring ( type index + 1 , proxy conf last index of ( " : " ) ) ; string port conf = proxy conf substring ( proxy conf last index of ( " : " ) + 1 ) ; try { int port = integer parse int ( port conf ) ; proxy to use = new proxy ( proxy type , new inet socket address ( hostname , port ) ) ; log get log ( ) info ( " job end notification using proxy type \ " " + proxy type + " \ " hostname \ " " + hostname + " \ " and port \ " " + port + " \ " " ) ; } catch ( number format exception nfe ) { log get log ( ) warn ( " job end notification couldn ' t parse configured " + " proxy ' s port " + port conf + " not going to use a proxy " ) ; } } }


simple query string builder flags ( int flags ) { this flags = flags ; return this ; }


from bug report http : code google compgoogle - gsonissuesdetail ? id = 95

public void test map of map serialization ( ) { map < string , map < string , string > > map = new hash map < string , map < string , string > > ( ) ; map < string , string > nested map = new hash map < string , string > ( ) ; nested map put ( " 1 " , " 1 " ) ; nested map put ( " 2 " , " 2 " ) ; map put ( " nested map " , nested map ) ; string json = gson to json ( map ) ; assert true ( json contains ( " nested map " ) ) ; assert true ( json contains ( " \ " 1 \ " : \ " 1 \ " " ) ) ; assert true ( json contains ( " \ " 2 \ " : \ " 2 \ " " ) ) ; }


returns if the counters for the named outputs are enabled or not by default these counters are disabled multiple outputs supports counters , by default the are disabled the counters group is the { @ link multiple outputs } class name the names of the counters are the same as the named outputs for multi named outputs the name of the counter is the concatenation of the named output , and underscore ' ' and the multiname

public static boolean get counters enabled ( job conf conf ) { return conf get boolean ( counters enabled , false ) ; }


configure the list of { @ link resource transformer resource transformers } to use by default no transformers are configured for use

public void set resource transformers ( @ nullable list < resource transformer > resource transformers ) { this resource transformers clear ( ) ; if ( resource transformers ! = null ) { this resource transformers add all ( resource transformers ) ; } }


creates a new reader that reads from the { @ link file source split # path ( ) split ' s path } starting at the { @ link file source split # offset ( ) } split ' s offset } and reads { @ link file source split # length ( ) length } bytes after the offset

bulk format reader < t > create reader ( configuration config , split t split ) throws i o exception ;


save the i node state to the snapshot if it is not done already

void save snapshot copy ( a snapshot copy ) { preconditions check state ( snapshot i node = = null , " expected snapshot i node to be null " ) ; snapshot i node = snapshot copy ; }


get a { @ link erasure coding policy } by policy name , including system policy , user defined policy and replication policy

public erasure coding policy get erasure coding policy by name ( string name ) { final erasure coding policy info ecpi = get policy info by name ( name ) ; if ( ecpi = = null ) { if ( name equals ignore case ( erasure code constants replication policy name ) ) { return system erasure coding policies get replication policy ( ) ; } return null ; } return ecpi get policy ( ) ; }


return the long timestamp for the date header with the given { @ code name } if the internal value representation is a string , this method will try to parse it as a date using the supported date formats : " eee , dd mmm yyyy hh : mm : ss zzz " " eee , dd - mmm - yy hh : mm : ss zzz " " eee mmm dd hh : mm : ss yyyy "

public long get date header ( string name ) { header value holder header = this headers get ( name ) ; object value = ( header ! = null ? header get value ( ) : null ) ; if ( value instanceof date ) { return ( ( date ) value ) get time ( ) ; } else if ( value instanceof number ) { return ( ( number ) value ) long value ( ) ; } else if ( value instanceof string ) { return parse date header ( name , ( string ) value ) ; } else if ( value ! = null ) { throw new illegal argument exception ( " value for header ' " + name + " ' is not a date , number , or string : " + value ) ; } else { return - 1l ; } }


public static string field name to method name ( string method prefix , string field name , boolean ignore first letter case ) { string method name = null ; if ( field name ! = null & & field name length ( ) > 0 ) { if ( ignore first letter case ) { method name = method prefix + field name ; } else { method name = method prefix + field name substring ( 0 , 1 ) to upper case ( ) + field name substring ( 1 ) ; } } else { method name = method prefix ; } return method name ; }


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


{ @ inherit doc } because the values for a given key may have duplicates and follow the insertion ordering , this method returns a { @ link list } , instead of the { @ link java util collection } specified in the { @ link multimap } interface


tells if the function is declspec ( naked )

public boolean is declspec naked ( ) { return is declspec naked ; }


returns automatic connection recovery interval in milliseconds

public integer get network recovery interval ( ) { return network recovery interval ; }


tests that a failure in requesting an access execution graph from the gateway , will not create a cache entry - - > another cache request will trigger a new gateway request

public void test immediate cache invalidation after failure ( ) throws exception { final time timeout = time milliseconds ( 100l ) ; final time time to live = time hours ( 1l ) ; / / let ' s first answer with a job not found exception and then only with the correct result final counting restful gateway restful gateway = create counting restful gateway ( expected job id , future utils completed exceptionally ( new flink job not found exception ( expected job id ) ) , completable future completed future ( expected execution graph ) ) ; try ( execution graph cache execution graph cache = new default execution graph cache ( timeout , time to live ) ) { completable future < access execution graph > execution graph future = execution graph cache get execution graph ( expected job id , restful gateway ) ; try { execution graph future get ( ) ; fail ( " the execution graph future should have been completed exceptionally " ) ; } catch ( execution exception ee ) { assert true ( ee get cause ( ) instanceof flink exception ) ; } completable future < access execution graph > execution graph future 2 = execution graph cache get execution graph ( expected job id , restful gateway ) ; assert equals ( expected execution graph , execution graph future 2 get ( ) ) ; } }


public regexp query builder max determinized states ( int value ) { this max determinized states = value ; return this ; }


groups by vertex and computes a group reduce transformation over the neighbors ( both edges and vertices ) of each vertex the neighbors function applied on the neighbors only has access to both the vertex id and the vertex value of the grouping vertex for each vertex , the neighbors function can iterate over all neighbors of this vertex with the specified direction , and emit any number of output elements , including none

public < t > data set < t > group reduce on neighbors ( neighbors function with vertex value < k , vv , ev , t > neighbors function , edge direction direction , type information < t > type info ) throws illegal argument exception { switch ( direction ) { case in : / / create < edge - source vertex > pairs data set < tuple 2 < edge < k , ev > , vertex < k , vv > > > edges with sources = edges join ( this vertices ) where ( 0 ) equal to ( 0 ) name ( " edge with source vertex " ) ; return vertices co group ( edges with sources ) where ( 0 ) equal to ( " f 0 f 1 " ) with ( new apply neighbor co group function < > ( neighbors function ) ) name ( " neighbors function " ) returns ( type info ) ; case out : / / create < edge - target vertex > pairs data set < tuple 2 < edge < k , ev > , vertex < k , vv > > > edges with targets = edges join ( this vertices ) where ( 1 ) equal to ( 0 ) name ( " edge with target vertex " ) ; return vertices co group ( edges with targets ) where ( 0 ) equal to ( " f 0 f 0 " ) with ( new apply neighbor co group function < > ( neighbors function ) ) name ( " neighbors function " ) returns ( type info ) ; case all : / / create < edge - source or target vertex > pairs data set < tuple 3 < k , edge < k , ev > , vertex < k , vv > > > edges with neighbors = edges flat map ( new emit one edge with neighbor per node < > ( ) ) name ( " forward and reverse edges " ) join ( this vertices ) where ( 1 ) equal to ( 0 ) with ( new project edge with neighbor < > ( ) ) name ( " edge with vertex " ) ; return vertices co group ( edges with neighbors ) where ( 0 ) equal to ( 0 ) with ( new apply co group function on all neighbors < > ( neighbors function ) ) name ( " neighbors function " ) returns ( type info ) ; default : throw new illegal argument exception ( " illegal edge direction " ) ; } }


returns the refined environments this rule is compatible with refined environments are static environments with unsupported environments from { @ code select } able deps removed ( on the principle that others paths in the select would have provided those environments , so this rule is " refined " to match whichever deps got chosen ) > refined environments require knowledge of the build configuration see { @ link constraint semantics } for details

environment collection get refined environments ( ) ;


default name means generated by mockito non - default means the user has named the mock at creation


assert that a path refers to a directory

public static void assert is directory ( file status file status ) { assert true ( " should be a directory - but isn ' t : " + file status , file status is directory ( ) ) ; }


sets the items visible in the list , clearing the selection if it is no longer valid if a selection is { @ link array selection # get required ( ) } , the first item is selected this can safely be called with a ( modified ) array returned from { @ link # get items ( ) }

public void set items ( array new items ) { if ( new items = = null ) throw new illegal argument exception ( " new items cannot be null " ) ; float old pref width = get pref width ( ) , old pref height = get pref height ( ) ; if ( new items ! = items ) { items clear ( ) ; items add all ( new items ) ; } over index = - 1 ; pressed index = - 1 ; selection validate ( ) ; invalidate ( ) ; if ( old pref width ! = get pref width ( ) | | old pref height ! = get pref height ( ) ) invalidate hierarchy ( ) ; }


tests that we can merge two different function tags that have been added to the same function note : the test programs must be modified a bit to facilitate this test specifically we have to add a function at the same address in both programs , then add tags to each program , then add those tags to the newly created functions

public void test function tag merge ( ) { try { load program ( diff test p 1 ) ; load program ( diff test p 2 ) ; function manager d b func mgr 1 = ( function manager d b ) diff test p 1 get function manager ( ) ; function manager d b func mgr 2 = ( function manager d b ) diff test p 2 get function manager ( ) ; / / create a function in program 1 int id = diff test p 1 start transaction ( " create 1 " ) ; func mgr 1 create function ( " testfunc " , addr ( " 1002040 " ) , new address set ( addr ( " 1002040 " ) , addr ( " 1002048 " ) ) , source type default ) ; diff test p 1 end transaction ( id , true ) ; / / create a function in program 2 id = diff test p 2 start transaction ( " create 2 " ) ; func mgr 2 create function ( " testfunc " , addr ( " 1002040 " ) , new address set ( addr ( " 1002040 " ) , addr ( " 1002048 " ) ) , source type default ) ; diff test p 2 end transaction ( id , true ) ; function f 1 = diff test p 1 get function manager ( ) get function at ( addr ( " 1002040 " ) ) ; function f 2 = diff test p 2 get function manager ( ) get function at ( addr ( " 1002040 " ) ) ; / / create a tag and add it to program 1 id = diff test p 1 start transaction ( " create 1 " ) ; func mgr 1 get function tag manager ( ) create function tag ( " tag a " , " tag a comment " ) ; f 1 add tag ( " tag a " ) ; diff test p 1 end transaction ( id , true ) ; / / create a tag and add it to program 2 id = diff test p 2 start transaction ( " create 2 " ) ; func mgr 2 get function tag manager ( ) create function tag ( " tag b " , " tag b comment " ) ; f 2 add tag ( " tag b " ) ; diff test p 2 end transaction ( id , true ) ; / / open the diff display and apply the merge open diff ( diff test p 1 , diff test p 2 ) ; show apply settings ( ) ; merge ( function tag apply c b ) ; address set as = new address set ( addr ( " 1002040 " ) , addr ( " 1002040 " ) ) ; set diff selection ( as ) ; apply ( ) ; / / check the results we should have both tags now in the target program / / ( program 1 ) , so check the number of tags and make sure the names are / / correct iterator < function tag > iter = f 1 get tags ( ) iterator ( ) ; list < string > tag names = new array list < > ( ) ; while ( iter has next ( ) ) { function tag tag = iter next ( ) ; tag names add ( tag get name ( ) ) ; } assert equals ( tag names size ( ) , 2 ) ; assert true ( tag names contains ( " tag a " ) ) ; assert true ( tag names contains ( " tag b " ) ) ; } catch ( invalid input exception | overlapping function exception e ) { msg error ( this , " error setting up function tag diff test " , e ) ; } }


subclasses can use this to add information that isn ' t always in the capabilities map

protected int amend hash code ( ) { return 0 ; }


tests forwarding of both { @ link read only sliced network buffer # recycle buffer ( ) } and { @ link read only sliced network buffer # is recycled ( ) }

public void test forwards recycle buffer 2 ( ) { read only sliced network buffer slice = buffer read only slice ( 1 , 2 ) ; assert false ( slice is recycled ( ) ) ; slice recycle buffer ( ) ; assert true ( slice is recycled ( ) ) ; assert true ( buffer is recycled ( ) ) ; }


format the given { @ code offset date time } object into string

public string format offset date time ( offset date time offset date time ) { return offset date time formatter format ( offset date time ) ; }


determines the set of property resolvers that should be used to try and access a property on the specified target type the resolvers are considered to be in an ordered list , however in the returned list any that are exact matches for the input target type ( as opposed to ' general ' resolvers that could work for any type ) are placed at the start of the list in addition , there are specific resolvers that exactly name the class in question and resolvers that name a specific class but it is a supertype of the class we have these are put at the end of the specific resolvers set and will be tried after exactly matching accessors but before generic accessors

public static list < property accessor > get property accessors to try ( @ nullable class < ? > target type , list < property accessor > property accessors ) { list < property accessor > specific accessors = new array list < > ( ) ; list < property accessor > general accessors = new array list < > ( ) ; for ( property accessor resolver : property accessors ) { class < ? > [ ] targets = resolver get specific target classes ( ) ; if ( targets = = null ) { / / generic resolver that says it can be used for any type general accessors add ( resolver ) ; } else { if ( target type ! = null ) { for ( class < ? > clazz : targets ) { if ( clazz = = target type ) { / / put exact matches on the front to be tried first ? specific accessors add ( resolver ) ; } else if ( clazz is assignable from ( target type ) ) { / / put supertype matches at the end of the / / specific accessor list general accessors add ( resolver ) ; } } } } } list < property accessor > resolvers = new array list < > ( specific accessors size ( ) + general accessors size ( ) ) ; resolvers add all ( specific accessors ) ; resolvers add all ( general accessors ) ; return resolvers ; }


validate the name for an index against some static rules and a cluster state

public void validate index name ( string index , cluster state state ) { validate index or alias name ( index , invalid index name exception : : new ) ; if ( ! index to lower case ( locale root ) equals ( index ) ) { throw new invalid index name exception ( index , " must be lowercase " ) ; } / / note : dot - prefixed index names are validated after template application , not here if ( state routing table ( ) has index ( index ) ) { throw new resource already exists exception ( state routing table ( ) index ( index ) get index ( ) ) ; } if ( state metadata ( ) has index ( index ) ) { throw new resource already exists exception ( state metadata ( ) index ( index ) get index ( ) ) ; } if ( state metadata ( ) has alias ( index ) ) { throw new invalid index name exception ( index , " already exists as alias " ) ; } }


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

public double get money ( ) { return money ; }


public string java binary exec path ( ) { return java binary exec path to string ( ) ; }


set the short value for the specified field

public void set short value ( int col index , short value ) { dirty = true ; field values [ col index ] set short value ( value ) ; }


public datanode command [ ] handle heartbeat ( datanode registration node reg , storage report [ ] reports , final string block pool id , long cache capacity , long cache used , int xceiver count , int max transfers , int failed volumes , volume failure summary volume failure summary , @ nonnull slow peer reports slow peers , @ nonnull slow disk reports slow disks ) throws i o exception { final datanode descriptor nodeinfo ; try { nodeinfo = get datanode ( node reg ) ; } catch ( unregistered node exception e ) { return new datanode command [ ] { register command register } ; } / / check if this datanode should actually be shutdown instead if ( nodeinfo ! = null & & nodeinfo is disallowed ( ) ) { set datanode dead ( nodeinfo ) ; throw new disallowed datanode exception ( nodeinfo ) ; } if ( nodeinfo = = null | | ! nodeinfo is registered ( ) ) { return new datanode command [ ] { register command register } ; } heartbeat manager update heartbeat ( nodeinfo , reports , cache capacity , cache used , xceiver count , failed volumes , volume failure summary ) ; / / if we are in safemode , do not send back any recovery / replication / / requests don ' t even drain the existing queue of work if ( namesystem is in safe mode ( ) ) { return new datanode command [ 0 ] ; } / / block recovery command final block recovery command br command = get block recovery command ( block pool id , nodeinfo ) ; if ( br command ! = null ) { return new datanode command [ ] { br command } ; } final list < datanode command > cmds = new array list < > ( ) ; / / allocate approximately max transfers pending tasks to data node / / nn chooses pending tasks based on the ratio between the lengths of / / replication and erasure - coded block queues int total replicate blocks = nodeinfo get number of replicate blocks ( ) ; int total e c blocks = nodeinfo get number of blocks to be erasure coded ( ) ; int total blocks = total replicate blocks + total e c blocks ; if ( total blocks > 0 ) { int num replication tasks = ( int ) math ceil ( ( double ) ( total replicate blocks * max transfers ) / total blocks ) ; int num e c tasks = ( int ) math ceil ( ( double ) ( total e c blocks * max transfers ) / total blocks ) ; if ( log is debug enabled ( ) ) { log debug ( " pending replication tasks : " + num replication tasks + " erasure - coded tasks : " + num e c tasks ) ; } / / check pending replication tasks list < block target pair > pending list = nodeinfo get replication command ( num replication tasks ) ; if ( pending list ! = null & & ! pending list is empty ( ) ) { / / if the block is deleted , the block size will become / / block command no ack ( long max value ) this kind of block we don ' t / / need / / to send for replication or reconstruction iterator < block target pair > iterator = pending list iterator ( ) ; while ( iterator has next ( ) ) { block target pair cmd = iterator next ( ) ; if ( cmd block ! = null & & cmd block get num bytes ( ) = = block command no ack ) { / / block deleted datanode storage info decrement blocks scheduled ( cmd targets ) ; iterator remove ( ) ; } } if ( ! pending list is empty ( ) ) { cmds add ( new block command ( datanode protocol dna transfer , block pool id , pending list ) ) ; } } / / check pending erasure coding tasks list < block e c reconstruction info > pending e c list = nodeinfo get erasure code command ( num e c tasks ) ; if ( pending e c list ! = null & & ! pending e c list is empty ( ) ) { cmds add ( new block e c reconstruction command ( dna erasure coding reconstruction , pending e c list ) ) ; } } / / check block invalidation block [ ] blks = nodeinfo get invalidate blocks ( block invalidate limit ) ; if ( blks ! = null ) { cmds add ( new block command ( datanode protocol dna invalidate , block pool id , blks ) ) ; } / / cache commands add cache commands ( block pool id , nodeinfo , cmds ) ; / / key update command block manager add key update command ( cmds , nodeinfo ) ; / / check for balancer bandwidth update if ( nodeinfo get balancer bandwidth ( ) > 0 ) { cmds add ( new balancer bandwidth command ( nodeinfo get balancer bandwidth ( ) ) ) ; / / set back to 0 to indicate that datanode has been sent the new value nodeinfo set balancer bandwidth ( 0 ) ; } if ( slow peer tracker ! = null ) { final map < string , double > slow peers map = slow peers get slow peers ( ) ; if ( ! slow peers map is empty ( ) ) { if ( log is debug enabled ( ) ) { log debug ( " data node " + node reg + " reported slow peers : " + slow peers map ) ; } for ( string slow node id : slow peers map key set ( ) ) { slow peer tracker add report ( slow node id , node reg get ipc addr ( false ) ) ; } } } if ( slow disk tracker ! = null ) { if ( ! slow disks get slow disks ( ) is empty ( ) ) { if ( log is debug enabled ( ) ) { log debug ( " data node " + node reg + " reported slow disks : " + slow disks get slow disks ( ) ) ; } slow disk tracker add slow disk report ( node reg get ipc addr ( false ) , slow disks ) ; } slow disk tracker check and update report if necessary ( ) ; } if ( ! cmds is empty ( ) ) { return cmds to array ( new datanode command [ cmds size ( ) ] ) ; } return new datanode command [ 0 ] ; }


apply limit to calculate the parallelism here limit is the limit in query < code > select from xxx limit [ limit ] < code >

int limit ( long limit ) { if ( limit ! = null ) { parallelism = math min ( parallelism , ( int ) ( limit / 1000 ) ) ; } / / make sure that parallelism is at least 1 return math max ( 1 , parallelism ) ; }


delete purchase order by id for valid response try integer i ds with value & lt ; 1000 anything above 1000 or nonintegers will generate api errors

public void delete order test ( ) { string order id = null ; / / api delete order ( order id ) ; / / todo : test validations }


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

@ override public t visit multi match query ( sql base parser multi match query context ctx ) { return visit children ( ctx ) ; }


closes all { @ link name resolver } s created by this group

public void close ( ) { final address resolver < t > [ ] r array ; final map entry < event executor , generic future listener < future < object > > > [ ] listeners ; synchronized ( resolvers ) { r array = ( address resolver < t > [ ] ) resolvers values ( ) to array ( new address resolver [ 0 ] ) ; resolvers clear ( ) ; listeners = executor termination listeners entry set ( ) to array ( new map entry [ 0 ] ) ; executor termination listeners clear ( ) ; } for ( final map entry < event executor , generic future listener < future < object > > > entry : listeners ) { entry get key ( ) termination future ( ) remove listener ( entry get value ( ) ) ; } for ( final address resolver < t > r : r array ) { try { r close ( ) ; } catch ( throwable t ) { logger warn ( " failed to close a resolver : " , t ) ; } } }


public float [ ] get radii ( ) { return m radii ; }


build and return an authorized sheets api client service

public static sheets get sheets service ( string token ) throws i o exception { credential credential = new credential builder ( null ) build ( ) set access token ( token ) ; int connect timeout = get connect timeout ( ) ; int read timeout = get read timeout ( ) ; return new sheets builder ( http transport , json factory , credential ) set http request initializer ( new http request initializer ( ) { @ override public void initialize ( http request http request ) throws i o exception { credential initialize ( http request ) ; http request set connect timeout ( connect timeout ) ; http request set read timeout ( read timeout ) ; / / 3 minutes read timeout } } ) set application name ( service app name ) build ( ) ; }


is called once { @ link # set auto read ( boolean ) } is called with { @ code false } and { @ link # is auto read ( ) } was { @ code true } before

protected void auto read cleared ( ) { }


public read only first baz ( string baz ) { this baz = baz ; return this ; }


fake endpoint to test group parameters ( optional ) fake endpoint to test group parameters ( optional )

call < void > test group parameters ( @ retrofit 2 http query ( " required string group " ) integer required string group , @ retrofit 2 http header ( " required boolean group " ) boolean required boolean group , @ retrofit 2 http query ( " required int 6 4 group " ) long required int 6 4 group , @ retrofit 2 http query ( " string group " ) integer string group , @ retrofit 2 http header ( " boolean group " ) boolean boolean group , @ retrofit 2 http query ( " int 6 4 group " ) long int 6 4 group ) ;


public static d b type valueof ( string db type ) { for ( d b type dt : values ( ) ) { if ( string utils equals ignore case ( dt name ( ) , db type ) ) { return dt ; } } throw new illegal argument exception ( " unknown dbtype : " + db type ) ; }


this implementation will trim existing translog files using a { @ link translog deletion policy } that retains nothing but the last translog generation from safe commit

public void trim unreferenced translog files ( ) { final store store = this engine config get store ( ) ; store inc ref ( ) ; try ( releasable lock lock = read lock acquire ( ) ) { ensure open ( ) ; final list < index commit > commits = directory reader list commits ( store directory ( ) ) ; if ( commits size ( ) = = 1 & & translog stats get translog size in bytes ( ) > translog stats get uncommitted size in bytes ( ) ) { final map < string , string > commit user data = get last committed segment infos ( ) get user data ( ) ; final string translog uuid = commit user data get ( translog translog uuid key ) ; if ( translog uuid = = null ) { throw new illegal state exception ( " commit doesn ' t contain translog unique id " ) ; } final translog config translog config = engine config get translog config ( ) ; final long local checkpoint = long parse long ( commit user data get ( sequence numbers local checkpoint key ) ) ; final translog deletion policy translog deletion policy = new translog deletion policy ( ) ; translog deletion policy set local checkpoint of safe commit ( local checkpoint ) ; try ( translog translog = new translog ( translog config , translog uuid , translog deletion policy , engine config get global checkpoint supplier ( ) , engine config get primary term supplier ( ) , seq no - > { } ) ) { translog trim unreferenced readers ( ) ; / / refresh the translog stats this translog stats = translog stats ( ) ; assert translog current file generation ( ) = = translog get min file generation ( ) : " translog was not trimmed " + " current gen " + translog current file generation ( ) + " ! = min gen " + translog get min file generation ( ) ; } } } catch ( final exception e ) { try { fail engine ( " translog trimming failed " , e ) ; } catch ( exception inner ) { e add suppressed ( inner ) ; } throw new engine exception ( shard id , " failed to trim translog " , e ) ; } finally { store dec ref ( ) ; } }


called when the operation is done notifies any threads waiting for this operation ' s completion

synchronized void set completed ( ) { completed = true ; notify all ( ) ; }


gives the ability to override the auto - generated component tree id : this is generally not useful in the majority of circumstances , so don ' t use it unless you really know what you ' re doing

public builder override component tree id ( int override component tree id ) { this override component tree id = override component tree id ; return this ; }


get the authentication method from the real user ' s subject if there is no real user , return the given user ' s authentication method

public synchronized authentication method get real authentication method ( ) { user group information ugi = get real user ( ) ; if ( ugi = = null ) { ugi = this ; } return ugi get authentication method ( ) ; }


put the data to occupy the next integer space in the byte array

public void put int ( int value ) { little endian data converter instance put int ( scratch byte array , value ) ; put bytes ( scratch byte array , 4 ) ; }


public static route meta build ( route type type , class < ? > destination , string path , string group , int priority , int extra ) { return new route meta ( type , null , destination , null , path , group , null , priority , extra ) ; }


await termination on the main thread since the grpc library uses daemon threads

private void block until shutdown ( ) throws interrupted exception { if ( server ! = null ) { server await termination ( ) ; } }


sets the maximum size of header list allowed to be received this is cumulative size of the headers with some overhead , as defined for < a href = " http : httpwg orgspecsrfc 7 5 4 0 html # rfc section 6 5 2 " > http2 ' s settings max header list size the default is 8 ki b

public netty channel builder max header list size ( int max header list size ) { return max inbound metadata size ( max header list size ) ; }


returns the underlying closeable if this reference is not closed yet otherwise illegal state exception is thrown

public synchronized t get ( ) { preconditions check state ( ! m is closed ) ; return preconditions check not null ( m shared reference get ( ) ) ; }


check if we have violated our quota for any metric that has a configured quota

public void check quotas ( ) { check quotas ( time milliseconds ( ) ) ; }


returns the field element at the given screen location

public field element get field element ( int screen row , int screen column ) ;


close the given jms message producer and ignore any thrown exception this is useful for typical { @ code finally } blocks in manual jms code

public static void close message producer ( @ nullable message producer producer ) { if ( producer ! = null ) { try { producer close ( ) ; } catch ( j m s exception ex ) { logger trace ( " could not close jms message producer " , ex ) ; } catch ( throwable ex ) { / / we don ' t trust the jms provider : it might throw runtime exception or error logger trace ( " unexpected exception on closing jms message producer " , ex ) ; } } }


any int or non - null < code > integer < code > since mockito 2 1 0 , only allow valued < code > integer < code > , thus < code > null < code > is not anymore a valid value as primitive wrappers are nullable , the suggested api to match < code > null < code > wrapper would be { @ link # is null ( ) } we felt this change would make tests harness much safer that it was with mockito 1 x see examples in javadoc for { @ link argument matchers } class

public static int any int ( ) { report matcher ( new instance of ( integer class , " < any integer > " ) ) ; return 0 ; }


job did not complete successfully , but it can be retried later

public static result retry ( ) { return retry ; }


follow code flow and identify address set to be cleared if offcut code is encountered , it will be cleared immediately

private address set view find instruction flow ( program program , address first addr , address set view clear set , stack < address > todo starts , task monitor monitor ) throws cancelled exception { address set block set = new address set ( ) ; listing listing = program get listing ( ) ; symbol table symbol table = program get symbol table ( ) ; if ( clear offcut ) { / / check for initial offcut instruction instruction prev instr = listing get instruction before ( first addr ) ; if ( prev instr ! = null & & first addr compare to ( prev instr get max address ( ) ) < = 0 ) { clear offcut flow ( listing get instruction at ( first addr ) , todo starts , monitor ) ; return block set ; } } hashtable < address , block vertex > vertex map = new hashtable < > ( ) ; simple block model block model = new simple block model ( program ) ; stack < block vertex > todo vertices = new stack < > ( ) ; set < address > dest addrs = new hash set < > ( ) ; / / re - usable set for collecting block destination addrs / / establish start vertex within flow graph code block start block = block model get first code block containing ( first addr , monitor ) ; block set add ( start block ) ; block vertex start vertex = new block vertex ( start block ) ; vertex map put ( start block get min address ( ) , start vertex ) ; todo vertices push ( start vertex ) ; boolean never snip start block = ( start addrs contains ( first addr ) ) ; / / follow start block flow and build graph while ( ! todo vertices is empty ( ) ) { monitor check canceled ( ) ; block vertex from vertex = todo vertices pop ( ) ; code block from block = from vertex block ; if ( protected set contains ( from block get min address ( ) ) ) { continue ; } from block = adjust block for split protected block ( program , block model , from block get first start address ( ) , from block ) ; / / hot spot - get destinations ( ) code block reference iterator block ref iter = from block get destinations ( monitor ) ; if ( clear offcut ) { find dest addrs ( from block , dest addrs ) ; / / needed for detecting offcut flows } while ( block ref iter has next ( ) ) { monitor check canceled ( ) ; code block reference cb ref = block ref iter next ( ) ; address block addr = cb ref get reference ( ) ; if ( protected set contains ( block addr ) ) { continue ; } if ( clear set contains ( block addr ) ) { continue ; } code block dest block = cb ref get destination block ( ) ; if ( block addr equals ( dest block get first start address ( ) ) ) { dest block = adjust block for split protected block ( program , block model , block addr , dest block ) ; } if ( never snip start block & & dest block equals ( start block ) ) { continue ; / / do not allow incoming edges to start block vertex } block vertex dest vertex = vertex map get ( block addr ) ; if ( dest vertex = = null ) { if ( listing get instruction at ( block addr ) = = null ) { continue ; / / do not include data } symbol s = symbol table get primary symbol ( block addr ) ; if ( s ! = null & & s get symbol type ( ) = = symbol type function ) { source type source = s get source ( ) ; if ( source = = source type user defined | | source = = source type imported ) { continue ; / / keep imported or user - defined function } } if ( clear offcut & & ! dest addrs contains ( block addr ) ) { / / offcut flow was cleared - skip this block if ( clear offcut flow ( dest block , todo starts , monitor ) ) { continue ; } } / / todo : check disassembly hint block set add ( dest block ) ; dest vertex = new block vertex ( dest block ) ; vertex map put ( block addr , dest vertex ) ; todo vertices push ( dest vertex ) ; } / / hot spot - hash set add ( ) from vertex dest vertices add ( dest vertex ) ; dest vertex src vertices add ( from vertex ) ; } } / / if start address not start of block , never clear the first part of the block if ( ! first addr equals ( start block get min address ( ) ) ) { block set delete range ( start block get min address ( ) , first addr previous ( ) ) ; } reference manager ref mgr = program get reference manager ( ) ; function manager function manager = program get function manager ( ) ; iterator < block vertex > vertex iter = vertex map values ( ) iterator ( ) ; while ( vertex iter has next ( ) ) { monitor check canceled ( ) ; block vertex v = vertex iter next ( ) ; if ( v = = start vertex | | v src vertices is empty ( ) ) { continue ; } address addr = v block get min address ( ) ; instruction instr = listing get instruction at ( addr ) ; address fall from = instr get fall from ( ) ; if ( fall from ! = null & & ! block set contains ( fall from ) ) { prune ( v , block set ) ; } else { reference iterator ref iter = ref mgr get references to ( addr ) ; / / if there are no references , and there is a defined function inside this block / / that starts in this block , with no references to it , then this bad flow couldn ' t / / have created it / / todo : maybe even just symbols with no refs to them should be snipped / / code starts at the symbol someone might have disassembled there if ( ! ref iter has next ( ) & & function manager get function at ( addr ) ! = null ) { prune ( v , block set ) ; continue ; } while ( ref iter has next ( ) ) { monitor check canceled ( ) ; reference ref = ref iter next ( ) ; address from addr = ref get from address ( ) ; ref type ref type = ref get reference type ( ) ; if ( ref type is flow ( ) & & ! block set contains ( from addr ) & & ! clear set contains ( from addr ) ) { prune ( v , block set ) ; break ; } / / any addr which corresponds to a entry - point function should be snipped if ( ref type = = ref type external ref & & function manager get function at ( addr ) ! = null ) { prune ( v , block set ) ; break ; } } } } if ( repair ) { clear bad bookmarks ( program , block set , monitor ) ; } return block set ; }


delete user { username } : delete user this can only be done by the logged in user

default response entity < void > delete user ( @ api param ( value = " the name that needs to be deleted " , required = true ) @ path variable ( " username " ) string username ) { return new response entity < > ( http status not implemented ) ; }


adds all the elements of the given arrays into a new array the new array contains all of the element of < code > array 1 < code > followed by all of the elements < code > array 2 < code > when an array is returned , it is always a new array array utils add ( null , null ) = null array utils add ( array 1 , null ) = copy of array 1 array utils add ( null , array 2 ) = copy of array 2 array utils add ( [ ] , [ ] ) = [ ] array utils add ( [ null ] , [ null ] ) = [ null , null ] array utils add ( [ " a " , " b " , " c " ] , [ " 1 " , " 2 " , " 3 " ] ) = [ " a " , " b " , " c " , " 1 " , " 2 " , " 3 " ]

public static < t > t [ ] add ( t [ ] array 1 , t [ ] array 2 ) { return ( t [ ] ) real add arr ( array 1 , array 2 ) ; }


casts a non - null starlark value { @ code x } to a { @ code dict < k , v > } after checking that all keys and values are instances of { @ code key type } and { @ code value type } , respectively on error , it throws an eval exception whose message includes { @ code what } , ideally a string literal , as a description of the role of { @ code x } if x is null , it returns an immutable empty dict

public static < k , v > dict < k , v > cast ( object x , class < k > key type , class < v > value type , string what ) throws eval exception { preconditions check not null ( x ) ; if ( ! ( x instanceof dict ) ) { throw starlark errorf ( " got % s for ' % s ' , want dict " , starlark type ( x ) , what ) ; } for ( map entry < ? , ? > e : ( ( map < ? , ? > ) x ) entry set ( ) ) { if ( ! key type is assignable from ( e get key ( ) get class ( ) ) | | ! value type is assignable from ( e get value ( ) get class ( ) ) ) { / / todo ( adonovan ) : change message to " found < k2 , v2 > entry " , / / without suggesting that the entire dict is < k2 , v2 > throw starlark errorf ( " got dict < % s , % s > for ' % s ' , want dict < % s , % s > " , starlark type ( e get key ( ) ) , starlark type ( e get value ( ) ) , what , starlark class type ( key type ) , starlark class type ( value type ) ) ; } } @ suppress warnings ( " unchecked " ) / / safe dict < k , v > res = ( dict < k , v > ) x ; return res ; }


no calls expected at all , i e min = 0 and max = 0

public static expected count never ( ) { return new expected count ( 0 , 0 ) ; }


constructs a definition for the attribute used to restrict access to config feature flag the allowlist will only be reached if the given { @ code attribute to inspect } has a value explicitly specified it must be non - configurable

public static attribute builder < label > get allowlist attribute ( rule definition environment env , string attribute to inspect ) { final label label = env get tools label ( allowlist label ) ; return allowlist get attribute from allowlist name ( allowlist name ) value ( new computed default ( ) { @ override public label get default ( attribute map rule ) { return rule is attribute value explicitly specified ( attribute to inspect ) ? label : null ; } } ) ; }


remove the first node from the linked list

final void remove first ( ) { node head = get ( ) ; node next = head get ( ) ; size - - ; / / can ' t just move the head because it would retain the very first value / / can ' t null out the head ' s value because of late replayers would see null set first ( next ) ; }


sets the < code > ship date < code > property

public void set ship date ( date ship date ) { this ship date = ship date ; }


invalidates the current foreground notification and causes { @ link # get foreground notification ( list ) } to be invoked again if the service isn ' t stopped

protected final void invalidate foreground notification ( ) { if ( foreground notification updater ! = null & & ! is destroyed ) { foreground notification updater invalidate ( ) ; } }


public object get anytype 3 ( ) { return anytype 3 ; }


return the sql that led to the problem ( if known )

public string get sql ( ) { return this sql ; }


gets the number of pool resources idle at present

protected int get idle count ( ) { return - 1 ; }


notes that an action has started , giving the key

void note action evaluation started ( action lookup data action lookup data , action action ) ;


sets { @ link format # width } the default value is { @ link # no value }

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


test that comparator is defined and configured

public static void test get comparator ( ) throws exception { configuration conf = new configuration ( ) ; / / without conf writable comparator frob comparator = writable comparator get ( frob class ) ; assert ( frob comparator instanceof frob comparator ) ; assert not null ( frob comparator get conf ( ) ) ; assert null ( frob comparator get conf ( ) get ( test config param ) ) ; / / with conf conf set ( test config param , test config value ) ; frob comparator = writable comparator get ( frob class , conf ) ; assert ( frob comparator instanceof frob comparator ) ; assert not null ( frob comparator get conf ( ) ) ; assert equals ( conf get ( test config param ) , test config value ) ; / / without conf should reuse configuration frob comparator = writable comparator get ( frob class ) ; assert ( frob comparator instanceof frob comparator ) ; assert not null ( frob comparator get conf ( ) ) ; assert equals ( conf get ( test config param ) , test config value ) ; / / new conf should use new configuration frob comparator = writable comparator get ( frob class , new configuration ( ) ) ; assert ( frob comparator instanceof frob comparator ) ; assert not null ( frob comparator get conf ( ) ) ; assert null ( frob comparator get conf ( ) get ( test config param ) ) ; }


opens a session to cassandra and initializes the prepared statement

public void open ( int task number , int num tasks ) { this session = cluster connect ( ) ; mapping manager mapping manager = new mapping manager ( session ) ; this mapper = mapping manager mapper ( output class ) ; if ( mapper options ! = null ) { mapper option [ ] options array = mapper options get mapper options ( ) ; if ( options array ! = null ) { mapper set default save options ( options array ) ; } } this callback = new future callback < void > ( ) { @ override public void on success ( void ignored ) { on write success ( ) ; } @ override public void on failure ( throwable t ) { on write failure ( t ) ; } } ; }


public path [ ] get paths ( ) { return paths ; }


indicates whether this domain name ends in a { @ linkplain # is registry suffix ( ) registry suffix } , while not being a registry suffix itself for example , returns { @ code true } for { @ code www google com } , { @ code foo co uk } and { @ code blogspot com } , but not for { @ code com } , { @ code co uk } , or { @ code google invalid }

public boolean is under registry suffix ( ) { return registry suffix index > 0 ; }


this test expects read ahead manager to throw exception if the read ahead thread had failed within the last threshold age milliseconds also checks that the read buffers are evicted as per the read buffer manager threshold criteria

public void test read ahead manager for failed read ahead ( ) throws exception { abfs client client = get mock abfs client ( ) ; abfs rest operation success op = get mock rest op ( ) ; / / stub : / / read request leads to 3 readahead calls : fail all 3 readahead - client read ( ) / / actual read request fails with the failure in readahead thread do throw ( new timeout exception ( " internal server error for rah - thread - x " ) ) do throw ( new timeout exception ( " internal server error for rah - thread - y " ) ) do throw ( new timeout exception ( " internal server error rah - thread - z " ) ) do return ( success op ) / / any extra calls to read , pass it when ( client ) read ( any ( string class ) , any ( long class ) , any ( byte [ ] class ) , any ( integer class ) , any ( integer class ) , any ( string class ) , any ( string class ) ) ; abfs input stream input stream = get abfs input stream ( client , " test read ahead manager for failed read ahead txt " ) ; queue read aheads ( input stream ) ; / / abfs input stream read would have waited for the read - ahead for the requested offset / / as we are testing from read ahead manager directly , sleep for a sec to / / get the read ahead threads to complete thread sleep ( 1000 ) ; / / if read ahead failed for specific offset , get block should / / throw exception from the read buffer that failed within last threshold age milliseconds sec intercept ( i o exception class , ( ) - > read buffer manager get buffer manager ( ) get block ( input stream , 0 , one kb , new byte [ one kb ] ) ) ; / / only the 3 read ahead threads should have triggered client read verify read call count ( client , 3 ) ; / / stub returns success for the 4th read request , if read buffers still / / persisted , read ahead manager get block would have returned exception check evicted status ( input stream , 0 , false ) ; }


returns a string that describes what kind of object is specified by the { @ link d i e aggregate } used to create a name for anonymous types

public static string get container type name ( d i e aggregate diea ) { switch ( diea get tag ( ) ) { case d w a r f tag dw tag structure type : return " struct " ; case d w a r f tag dw tag class type : return " class " ; case d w a r f tag dw tag enumeration type : return " enum " ; case d w a r f tag dw tag union type : return " union " ; case d w a r f tag dw tag lexical block : return " lexical block " ; case d w a r f tag dw tag subprogram : return " subprogram " ; case d w a r f tag dw tag subroutine type : return " subr " ; case d w a r f tag dw tag variable : return " var " ; } return " unknown " ; } / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


returns the open g l es format of this pixmap used as the seventh parameter to { @ link gl20 # gl tex image 2 d ( int , int , int , int , int , int , int , int , java nio buffer ) }

public int get g l format ( ) { return pixmap get g l format ( ) ; }


opens the hash join this method reads the build - side input and constructs the initial hash table , gradually spilling partitions that do not fit into memory

public void open ( final mutable object iterator < bt > build side , final mutable object iterator < pt > probe side ) throws i o exception { open ( build side , probe side , false ) ; }


ensures the cluster has a yellow state via the cluster health api

public cluster health status ensure yellow ( string indices ) { return ensure color ( cluster health status yellow , time value time value seconds ( 30 ) , false , indices ) ; }


public long get file offset ( ) { return file offset ; }


public transaction attribute source get transaction attribute source ( ) { return this transaction attribute source ; }


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


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

t visit false ( painless parser false context ctx ) ;


{ @ inherit doc } { @ code proxy hash code ( ) } delegates to { @ link abstract invocation handler # hash code } { @ code proxy to string ( ) } delegates to { @ link abstract invocation handler # to string } { @ code proxy equals ( argument ) } returns true if : { @ code proxy } and { @ code argument } are of the same type and { @ link abstract invocation handler # equals } returns true for the { @ link invocation handler } of { @ code argument } other method calls are dispatched to { @ link # handle invocation }

public final object invoke ( object proxy , method method , @ nullable decl object [ ] args ) throws throwable { if ( args = = null ) { args = no args ; } if ( args length = = 0 & & method get name ( ) equals ( " hash code " ) ) { return hash code ( ) ; } if ( args length = = 1 & & method get name ( ) equals ( " equals " ) & & method get parameter types ( ) [ 0 ] = = object class ) { object arg = args [ 0 ] ; if ( arg = = null ) { return false ; } if ( proxy = = arg ) { return true ; } return is proxy of same interfaces ( arg , proxy get class ( ) ) & & equals ( proxy get invocation handler ( arg ) ) ; } if ( args length = = 0 & & method get name ( ) equals ( " to string " ) ) { return to string ( ) ; } return handle invocation ( proxy , method , args ) ; }


returns an immutable list object with the current underlying contents of this sequence

default immutable list < e > get immutable list ( ) { return immutable list copy of ( this ) ; }


validate and create a new extractor factory the destination index must exist and contain at least 1 compatible field or validations will fail

public static void create for destination index ( client client , data frame analytics config config , action listener < data frame data extractor factory > listener ) { extracted fields detector factory extracted fields detector factory = new extracted fields detector factory ( client ) ; extracted fields detector factory create from dest ( config , action listener wrap ( extracted fields detector - > { extracted fields extracted fields = extracted fields detector detect ( ) v 1 ( ) ; data frame data extractor factory extractor factory = new data frame data extractor factory ( client , config get id ( ) , collections singleton list ( config get dest ( ) get index ( ) ) , config get source ( ) get parsed query ( ) , extracted fields , config get analysis ( ) get required fields ( ) , config get headers ( ) , config get analysis ( ) supports missing values ( ) , create train test splitter factory ( client , config , extracted fields ) ) ; listener on response ( extractor factory ) ; } , listener : : on failure ) ) ; }


protected body inserter < ? , ? super client http request > select body ( object obj , multi value map < string , object > form params , media type content type ) { if ( media type application form urlencoded equals ( content type ) ) { multi value map < string , string > map = new linked multi value map < > ( ) ; form params to single value map ( ) entry set ( ) for each ( es - > map add ( es get key ( ) , string value of ( es get value ( ) ) ) ) ; return body inserters from form data ( map ) ; } else if ( media type multipart form data equals ( content type ) ) { return body inserters from multipart data ( form params ) ; } else { return obj ! = null ? body inserters from object ( obj ) : null ; } }


single - element reads were for legacy non - list encoding don ' t add new code that does this

public void decoder for message json v 2 ( ) { byte [ ] message = span bytes encoder json v2 encode ( span 1 ) ; assert that ( span bytes decoder detector decoder for message ( message ) ) is equal to ( span bytes decoder json v2 ) ; }


returns the { @ code k } least elements of the given iterable according to this ordering , in order from least to greatest if there are fewer than { @ code k } elements present , all will be included the implementation does not necessarily use a stable sorting algorithm ; when multiple elements are equivalent , it is undefined which will come first < b > java 8 users : < b > use { @ code streams stream ( iterable ) collect ( comparators least ( k , this comparator ) ) } instead

public < e extends t > list < e > least of ( iterable < e > iterable , int k ) { if ( iterable instanceof collection ) { collection < e > collection = ( collection < e > ) iterable ; if ( collection size ( ) < = 2l * k ) { / / in this case , just dumping the collection to an array and sorting is / / faster than using the implementation for iterator , which is / / specialized for k much smaller than n @ suppress warnings ( " unchecked " ) / / c only contains e ' s and doesn ' t escape e [ ] array = ( e [ ] ) collection to array ( ) ; arrays sort ( array , this ) ; if ( array length > k ) { array = arrays copy of ( array , k ) ; } return collections unmodifiable list ( arrays as list ( array ) ) ; } } return least of ( iterable iterator ( ) , k ) ; }


encodes the specified cookies into a single cookie header value

public string encode ( collection < ? extends cookie > cookies ) { if ( check not null ( cookies , " cookies " ) is empty ( ) ) { return null ; } string builder buf = string builder ( ) ; if ( strict ) { if ( cookies size ( ) = = 1 ) { encode ( buf , cookies iterator ( ) next ( ) ) ; } else { cookie [ ] cookies sorted = cookies to array ( new cookie [ 0 ] ) ; arrays sort ( cookies sorted , cookie comparator ) ; for ( cookie c : cookies sorted ) { encode ( buf , c ) ; } } } else { for ( cookie c : cookies ) { encode ( buf , c ) ; } } return strip trailing separator or null ( buf ) ; }


return the current local ip filter used by { @ link # get all local i ps ( ) }

public static local ip filter get local ip filter ( ) { return require non null ( local ip filter get ( ) ) ; }


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

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


static s 3 client settings get client settings ( final settings settings , final string client name ) { try ( secure string proxy username = get config value ( settings , client name , proxy username setting ) ; secure string proxy password = get config value ( settings , client name , proxy password setting ) ) { return new s 3 client settings ( s 3 client settings load credentials ( settings , client name ) , get config value ( settings , client name , endpoint setting ) , get config value ( settings , client name , protocol setting ) , get config value ( settings , client name , proxy host setting ) , get config value ( settings , client name , proxy port setting ) , proxy username to string ( ) , proxy password to string ( ) , math to int exact ( get config value ( settings , client name , read timeout setting ) millis ( ) ) , get config value ( settings , client name , max retries setting ) , get config value ( settings , client name , use throttle retries setting ) , get config value ( settings , client name , use path style access ) , get config value ( settings , client name , disable chunked encoding ) , get config value ( settings , client name , region ) , get config value ( settings , client name , signer override ) ) ; } }


upon successful creation , the { @ link injector } will inject instance fields and methods of the given object

< t > void request injection ( type literal < t > type , t instance ) ;


finds an unreserved range that will fit the sources of the specified instruction does not bother trying to center the range around an already - mapped source register ;

private int find any fitting range ( normal ssa insn insn , int range length , int [ ] categories for index , bit set out moves required ) { alignment alignment = alignment unspecified ; if ( dex options align 64bit regs support ) { int reg number = 0 ; int p 6 4bits aligned = 0 ; int p 6 4bits not aligned = 0 ; for ( int category : categories for index ) { if ( category = = 2 ) { if ( is even ( reg number ) ) { p 6 4bits aligned + + ; } else { p 6 4bits not aligned + + ; } reg number + = 2 ; } else { reg number + = 1 ; } } if ( p 6 4bits not aligned > p 6 4bits aligned ) { if ( is even ( param range end ) ) { alignment = alignment odd ; } else { alignment = alignment even ; } } else if ( p 6 4bits aligned > 0 ) { if ( is even ( param range end ) ) { alignment = alignment even ; } else { alignment = alignment odd ; } } } int range start = param range end ; while ( true ) { range start = find next unreserved rop reg ( range start , range length , alignment ) ; int fit width = fit plan for range ( range start , insn , categories for index , out moves required ) ; if ( fit width > = 0 ) { break ; } range start + + ; out moves required clear ( ) ; } return range start ; }


set the additional ( undeclared ) property with the specified name and value if the property does not already exist , create it otherwise replace it

public additional properties array put additional property ( string key , list value ) { if ( this additional properties = = null ) { this additional properties = new hash map < string , list > ( ) ; } this additional properties put ( key , value ) ; return this ; }


returns task temporary paths in this checkpoint

public static list < path > list task temporary paths ( file system fs , path base path , long checkpoint id ) throws exception { list < path > task tmp paths = new array list < > ( ) ; for ( file status task status : fs list status ( new path ( base path , checkpoint name ( checkpoint id ) ) ) ) { if ( is task dir ( task status get path ( ) get name ( ) ) ) { task tmp paths add ( task status get path ( ) ) ; } } return task tmp paths ; }


creates a file file state value instance corresponding to the given existing file

private static regular file state value from path ( path path , file status with digest stat , boolean digest will be injected , @ nullable timestamp granularity monitor tsgm ) throws inconsistent filesystem exception { preconditions check state ( stat is file ( ) , path ) ; try { / / if the digest will be injected , we can skip calling get fast digest , but we need to store a / / contents proxy because if the digest is injected but is not available from the / / filesystem , we will need the proxy to determine whether the file was modified byte [ ] digest = digest will be injected ? null : try get digest ( path , stat ) ; if ( digest = = null ) { / / note that timestamp granularity monitor # notify dependence on file time is a thread - safe / / method if ( tsgm ! = null ) { tsgm notify dependence on file time ( path as fragment ( ) , stat get last change time ( ) ) ; } return new regular file state value ( stat get size ( ) , null , file contents proxy create ( stat ) ) ; } else { / / we are careful here to avoid putting the value id into file metadata if we already have / / a digest arbitrary filesystems may do weird things with the value id ; a digest is more / / robust return new regular file state value ( stat get size ( ) , digest , null ) ; } } catch ( i o exception e ) { string error message = e get message ( ) ! = null ? " error ' " + e get message ( ) + " ' " : " an error " ; throw new inconsistent filesystem exception ( " ' stat ' said " + path + " is a file but then we " + " later encountered " + error message + " which indicates that " + path + " is no " + " longer a file did you delete it during the build ? " ) ; } }


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


moves an item from from position to to postion if there are other pending operations on this binder this will only be executed when all the operations have been completed ( to ensure index consistency )

public final void move item async ( int from position , int to position ) { assert single thread for change set ( ) ; if ( sections debug enabled ) { log d ( sections debug tag , " ( " + hash code ( ) + " ) move item async " + from position + " to " + to position ) ; } final async move operation operation = new async move operation ( from position , to position ) ; synchronized ( this ) { m has async operations = true ; m async component tree holders add ( to position , m async component tree holders remove ( from position ) ) ; / / todo ( t 2 8 6 1 9 7 8 2 ) : when moving a ct into range , do an async prepare add to current batch ( operation ) ; } }


public boolean check exists ( string path ) { try { return retry loops invoke with retry ( ( ) - > { required not null ( client , failed ) ; return client get k v client ( ) get ( byte sequence from ( path , utf 8 ) , get option new builder ( ) with count only ( true ) build ( ) ) get ( default request timeout , time unit milliseconds ) get count ( ) > 0 ; } , retry policy ) ; } catch ( exception e ) { throw new illegal state exception ( e get message ( ) , e ) ; } }


initialize shape cache for mesh generation

public mesh part builder begin ( int primitive type ) { if ( building ) throw new gdx runtime exception ( " call end ( ) after calling begin ( ) " ) ; building = true ; builder begin ( mesh get vertex attributes ( ) ) ; builder part ( id , primitive type , renderable mesh part ) ; return builder ; }


gets the conflict resolution panel to display

vertical choices panel get conflict panel ( i d group id group , change listener listener ) { if ( conflict panel = = null ) { conflict panel = new vertical choices panel ( ) ; conflict panel set title ( get conflict type ( ) ) ; } conflict panel clear ( ) ; / / initialize the conflict panel conflict panel set header ( get conflict info ( id group , 1 , 1 ) ) ; conflict panel set row header ( get external name info ( null , null , null , null ) ) ; external manager latest mgr = latest pgm get external manager ( ) ; external manager my mgr = my pgm get external manager ( ) ; string latest name = id group get latest name ( ) ; string my name = id group get my name ( ) ; string original name = id group get original name ( ) ; boolean in latest = ( latest name ! = null ) ? latest mgr contains ( latest name ) : false ; boolean in my = ( my name ! = null ) ? my mgr contains ( my name ) : false ; string latest prefix = ( in latest ) ? " change as in ' " : " remove as in ' " ; string my prefix = ( in my ) ? " change as in ' " : " remove as in ' " ; string suffix = " ' version " ; conflict panel add radio button row ( get external name info ( latest pgm , latest name , latest prefix , suffix ) , latest button name , keep latest , listener ) ; conflict panel add radio button row ( get external name info ( my pgm , my name , my prefix , suffix ) , checked out button name , keep my , listener ) ; conflict panel add info row ( get external name info ( original pgm , original name , " ' " , suffix ) ) ; return conflict panel ; }


converts a list of types to a list of canonical type names as a string based on the terminology specified as part of the documentation for { @ link painless lookup utility } since classes are a subset of types , this method will safely convert a list of classes or a mixed list of classes and types to a list of canonical type names as a string as well

public static string types to canonical type names ( list < class < ? > > types ) { string builder types string builder = new string builder ( " [ " ) ; int any types size = types size ( ) ; int any types index = 0 ; for ( class < ? > painless type : types ) { string canonical type name = type to canonical type name ( painless type ) ; types string builder append ( canonical type name ) ; if ( + + any types index < any types size ) { types string builder append ( " , " ) ; } } types string builder append ( " ] " ) ; return types string builder to string ( ) ; }


return true if this enum arrays 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 ; } enum arrays enum arrays = ( enum arrays ) o ; return objects equals ( this just symbol , enum arrays just symbol ) & & objects equals ( this array enum , enum arrays array enum ) ; }


public acl operation operation ( ) { return data operation ( ) ; }


disposes of all resources this vertex buffer object uses

public void dispose ( ) { gl30 gl = gdx gl 3 0 ; gl gl bind buffer ( gl20 gl array buffer , 0 ) ; gl gl delete buffer ( buffer handle ) ; buffer handle = 0 ; delete v a o ( ) ; }


closes the stream , also sets it to null

public void close stream ( ) throws i o exception { if ( stream = = null ) return ; stream close ( ) ; stream = null ; }


tests that after renaming a directory , the original directory and its contents are indeed missing and the corresponding new paths are visible

public void test consistent list after rename ( ) throws exception { path d 1f = path ( " d 1 / f " ) ; path d 1f 2 = path ( " d 1 / f - " + default delay key substring ) ; path [ ] mkdirs = { d 1f , d 1f 2 } ; path d 1 = path ( " d 1 " ) ; path [ ] srcdirs = { d 1 } ; path d 2 = path ( " d 2 " ) ; path [ ] dstdirs = { d 2 } ; path d 2f 2 = path ( " d 2 / f - " + default delay key substring ) ; path [ ] yesdirs = { d 2 , path ( " d 2 / f " ) , d 2f 2 } ; path [ ] nodirs = { d 1 , d 1f , d 1f 2 } ; try { do test rename sequence ( mkdirs , srcdirs , dstdirs , yesdirs , nodirs ) ; } finally { clear inconsistency ( get file system ( ) ) ; delete paths quietly ( d 1 , d 2 , d 1f , d 1f 2 , d 2f 2 ) ; } }


set a predicate to only include files with matching filenames in any of the outputs < b > other zip entries are dropped < b > , regardless of whether they ' re classes or resources and regardless of whether they ' re listed in { @ link # set main class list file }

public split zip set input filter ( predicate < string > input filter ) { this input filter = preconditions check not null ( input filter ) ; return this ; }


remove user data file associated with an existing folder item

void remove user data file ( folder item item , file system user filesystem ) throws i o exception ;


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

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


this is a garbage , due to intersector returning values slightly different then the grid values snapping exactly to grid is important , so that during bulid vertices method , it can be figured out if points is on the wall of it ' s own grid box or not , to set uv properly any other implementations are welcome

private float [ ] snap to grid ( float [ ] vertices ) { for ( int i = 0 ; i < vertices length ; i + = 2 ) { float num x = ( vertices [ i ] / grid width ) % 1 ; float num y = ( vertices [ i + 1 ] / grid height ) % 1 ; if ( num x > 0 9 9f | | num x < 0 0 1f ) { vertices [ i ] = grid width * math round ( vertices [ i ] / grid width ) ; } if ( num y > 0 9 9f | | num y < 0 0 1f ) { vertices [ i + 1 ] = grid height * math round ( vertices [ i + 1 ] / grid height ) ; } } return vertices ; }


sets the bulk flush interval , in milliseconds

public void set bulk flush interval ( long interval millis ) { this bulk requests config put ( config key bulk flush interval ms , string value of ( interval millis ) ) ; }


public range aggregation builder add unbounded to ( string key , double to ) { add range ( new range ( key , null , to ) ) ; return this ; }


public static boolean in global transaction ( ) { return context holder get ( key xid ) ! = null ; }


whether the specified { @ link codec capabilities } { @ code feature } is supported

boolean is feature supported ( string feature , string mime type , codec capabilities capabilities ) ;


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


subtracts the given values from this color ' s component values

public color sub ( float r , float g , float b , float a ) { this r - = r ; this g - = g ; this b - = b ; this a - = a ; return clamp ( ) ; }


create an exception ( or throw one , if desired )

throwable evaluate ( int timeout millis , throwable caught ) throws throwable ;


order by activity name ( needs to be followed by { @ link # asc ( ) } or { @ link # desc ( ) } )

historic activity instance query order by activity name ( ) ;


return the aop alliance method invocation object associated with the current invocation

public static method invocation current invocation ( ) throws illegal state exception { method invocation mi = invocation get ( ) ; if ( mi = = null ) { throw new illegal state exception ( " no method invocation found : check that an aop invocation is in progress and that the " + " expose invocation interceptor is upfront in the interceptor chain specifically , note that " + " advices with order highest precedence will execute before expose invocation interceptor ! " + " in addition , expose invocation interceptor and expose invocation interceptor current invocation ( ) " + " must be invoked from the same thread " ) ; } return mi ; }


public void set security realm ( @ check for null security realm security realm ) { if ( security realm = = null ) security realm = security realm no authentication ; this use security = true ; id strategy old user id strategy = this security realm = = null ? security realm get user id strategy ( ) / / don ' t trigger rekey on jenkins load : this security realm get user id strategy ( ) ; this security realm = security realm ; / / reset the filters and proxies for the new security realm try { hudson filter filter = hudson filter get ( servlet context ) ; if ( filter = = null ) { / / fix for # 3069 : this filter is not necessarily initialized before the servlets / / when hudson filter does come back , it ' ll initialize itself logger fine ( " hudson filter has not yet been initialized : can ' t perform security setup for now " ) ; } else { logger fine ( " hudson filter has been previously initialized : setting security up " ) ; filter reset ( security realm ) ; logger fine ( " security is now fully set up " ) ; } if ( ! old user id strategy equals ( this security realm get user id strategy ( ) ) ) { user rekey ( ) ; } } catch ( servlet exception e ) { / / for binary compatibility , this method cannot throw a checked exception throw new runtime exception ( " failed to configure filter " , e ) { } ; } save quietly ( ) ; }


notifies every given listener with the failure passed to { @ link # on failure ( exception ) } if a listener itself throws an exception all remaining listeners will be processed and the caught exception will be re - thrown

static < response > void on failure ( iterable < action listener < response > > listeners , exception failure ) { list < exception > exception list = new array list < > ( ) ; for ( action listener < response > listener : listeners ) { try { listener on failure ( failure ) ; } catch ( exception ex ) { exception list add ( ex ) ; } } exceptions helper maybe throw runtime and suppress ( exception list ) ; }


public v put ( r row key , c column key , @ nullable decl v value ) { check not null ( row key ) ; check not null ( column key ) ; integer row index = row key to index get ( row key ) ; check argument ( row index ! = null , " row % s not in % s " , row key , row list ) ; integer column index = column key to index get ( column key ) ; check argument ( column index ! = null , " column % s not in % s " , column key , column list ) ; return set ( row index , column index , value ) ; } / * * todo ( jlevy ) : consider creating a merge ( ) method , similar to put all ( ) but * copying non - null values only * /


private int force bootstrap ( int i ) throws exception { return bootstrap standby run ( new string [ ] { " - force " } , cluster get configuration ( i ) ) ; }


creates a new data stream that contains a sequence of numbers ( longs ) and is useful for testing and for cases that just need a stream of n events of any kind the generated source splits the sequence into as many parallel sub - sequences as there are parallel source readers each sub - sequence will be produced in order if the parallelism is limited to one , the source will produce one sequence in order this source is always bounded for very long sequences ( for example over the entire domain of long integer values ) , you may consider executing the application in a streaming manner because of the end bound that is pretty far away use { @ link # from source ( source , watermark strategy , string ) } together with { @ link number sequence source } if you required more control over the created sources for example , if you want to set a { @ link watermark strategy }

public data stream source < long > from sequence ( long from , long to ) { if ( from > to ) { throw new illegal argument exception ( " start of sequence must not be greater than the end " ) ; } return from source ( new number sequence source ( from , to ) , watermark strategy no watermarks ( ) , " sequence source " ) ; }