processes resources for generated sources , configs and packaging resources returns a post - processed merged android data notably , the resources will be stripped of any databinding expressions

public merged android data process resources ( path temp root , path aapt , path android jar , @ nullable revision build tools version , variant type variant type , boolean debug , string custom package for r , aapt options aapt options , collection < string > resource configs , boolean use data binding android x , merged android data primary data , list < dependency android data > dependency data , @ nullable path source out , @ nullable path package out , @ nullable path proguard out , @ nullable path main dex proguard out , @ nullable path public resources out , @ nullable path data binding info out ) throws i o exception , interrupted exception , logged error exception { path android manifest = primary data get manifest ( ) ; final path resource dir = process data bindings ( primary data get resource dir ( ) resolve sibling ( " res no binding " ) , primary data get resource dir ( ) , data binding info out , custom package for r , / * should zip data binding info = * / true , use data binding android x ) ; final path assets dir = primary data get asset dir ( ) ; if ( public resources out ! = null ) { prepare output path ( public resources out get parent ( ) ) ; } run aapt ( temp root , aapt , android jar , build tools version , variant type , debug , custom package for r , aapt options , resource configs , android manifest , resource dir , assets dir , source out , package out , proguard out , main dex proguard out , public resources out ) ; / / the r needs to be created for each library in the dependencies , / / but only if the current project is not a library if ( source out ! = null & & variant type ! = variant type library ) { write dependency package r java files ( dependency data , custom package for r , android manifest , source out ) ; } return new merged android data ( resource dir , assets dir , android manifest ) ; }


10 : or ( start 2 ) 12 : nfctx 20 , 2 ( 4 - byte instr not parsed due to instruction conflict @ 14 ) + - > 16 : ret | | 14 : imm ( start 1 ) ( parsed tail of 4 - byte nfctx instr ) + - - + test instruction conflict error

public void test disassembler instruction conflict ( ) throws exception { / / instr at 14 is tail of nfctx but we need to add to program builder to register / / instruction location for verification purpose only program builder add bytes fallthrough ( 14 ) ; program builder add bytes fallthrough ( 10 ) ; program builder add bytes fallthrough set no flow context ( 12 , 2 , 30 ) ; / / overwrites instr bytes at 14 program builder add bytes return ( 16 ) ; address set view dis addrs = disassembler disassemble ( addr ( 14 ) , null ) ; assert equals ( addrset ( range ( 14 , 17 ) ) , dis addrs ) ; dis addrs = disassembler disassemble ( addr ( 10 ) , null ) ; assert equals ( addrset ( range ( 10 , 11 ) ) , dis addrs ) ; verify instruction presence ( collection utils as set ( addr ( 12 ) ) ) ; verify error bookmark ( addr ( 12 ) , " conflicting instruction " ) ; }


public geo bounding box query builder type ( string type ) { this type = geo exec type from string ( type ) ; return this ; }


if a state was previously saved for this view holder via { @ link # save } it will be restored here

public void restore ( epoxy view holder holder ) { if ( ! holder get model ( ) should save view state ( ) ) { return ; } view state state = get ( holder get item id ( ) ) ; if ( state ! = null ) { state restore ( holder item view ) ; } else { / / the first time a model is bound it won ' t have previous state we need to make sure / / the view is reset to its initial state to clear any changes from previously bound models holder restore initial view state ( ) ; } }


to test class name in snake case to test class name in snake case


public static void apply pressed view alpha ( final view views ) { apply pressed view alpha ( views , null ) ; }


decode the values array into a { @ link big integer } of length { @ code n } bytes the array is either truncated or zero - extended on the right to match the requested number of bytes , then decoded in big - endian format as an unsigned value

public big integer to big integer ( int n ) { big integer res = new big integer ( 1 , vals ) ; if ( n < length ( ) ) { res = res shift right ( ( length ( ) - n ) * 8 ) ; } else { res = res shift left ( ( n - length ( ) ) * 8 ) ; } return res ; }


a utility method for creating credentials used by web hdfs to return url encoded token

public static credentials create credentials ( final router router , final user group information ugi , final string renewer ) throws i o exception { final token < delegation token identifier > token = router get rpc server ( ) get delegation token ( new text ( renewer ) ) ; if ( token = = null ) { return null ; } final inet socket address addr = router get rpc server address ( ) ; security util set token service ( token , addr ) ; final credentials c = new credentials ( ) ; c add token ( new text ( ugi get short user name ( ) ) , token ) ; return c ; }


examines the give < code > data type < code > and creates a tool tip for it , depending upon its actual class type

public static string get tool tip text ( data type data type ) { return get h t m l representation ( data type ) get h t m l string ( ) ; }


asynchronously delete all the auto - generated ( i e created by the xpack user ) annotations

public void delete all annotations ( action listener < boolean > listener ) { delete annotations from time ( null , null , listener ) ; }


sets the file chooser to allow multiple file selections

public void set multi selection enabled ( boolean b ) { multi selection enabled = b ; if ( b ) { directory list set selection mode ( list selection model multiple interval selection ) ; directory table set selection mode ( list selection model multiple interval selection ) ; } else { directory list set selection mode ( list selection model single selection ) ; directory table set selection mode ( list selection model single selection ) ; } }


creates a new 8 - byte big - endian buffer that holds the specified 64 - bit floating point number

public static byte buf copy double ( double value ) { byte buf buf = buffer ( 8 ) ; buf write double ( value ) ; return buf ; }


private options get opts ( ) { options opts = new options ( ) ; add plan commands ( opts ) ; add help commands ( opts ) ; add execute commands ( opts ) ; add query commands ( opts ) ; add cancel commands ( opts ) ; add report commands ( opts ) ; return opts ; }


public t get animation backend ( ) { return m animation backend ; }


sets the height that the root { @ link com facebook rendercore host } should take on the next measure pass and then requests a layout this should be called from animation - driving code on each frame to animate the size of the root { @ link com facebook rendercore host }

void set animated height ( int height ) ;


the namespace uri of this element < code > optional string namespace uri = 2 ; < code >

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


sets an level setting with the provided setting key and level instance

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


returns the repository name , with leading " { @ literal @ } " ( or " " for the default repository )

public string get name ( ) { return name ; }


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


sets the aliases that will be associated with the index when it gets created

public put index template request builder set aliases ( string source ) { request aliases ( source ) ; return this ; }


this test runs a job reading continuous input ( files appearing over time ) with a stream record format ( text lines )

public void test continuous text file source ( ) throws exception { test continuous text file source ( failover type none ) ; }


test scoring the entire set of documents , which uses a slightly different logic when creating scorers

public void test exhaustive scoring ( ) throws exception { assert acked ( prepare create ( " test " ) set mapping ( json builder ( ) start object ( ) start object ( " doc " ) start object ( " properties " ) start object ( " field 1 " ) field ( " analyzer " , " whitespace " ) field ( " type " , " text " ) end object ( ) start object ( " field 2 " ) field ( " analyzer " , " whitespace " ) field ( " type " , " text " ) end object ( ) end object ( ) end object ( ) end object ( ) ) set settings ( settings builder ( ) put ( index settings ( ) ) put ( " index number of shards " , 1 ) ) ) ; client ( ) prepare index ( " test " ) set id ( " 1 " ) set source ( " field 1 " , " foo " ) get ( ) ; client ( ) prepare index ( " test " ) set id ( " 2 " ) set source ( " field 1 " , " foo " , " field 2 " , " foo " ) get ( ) ; refresh ( ) ; query string query builder organic query = query builders query string query ( " foo " ) ; pinned query builder pqb = new pinned query builder ( organic query , " 2 " ) ; search response search response = client ( ) prepare search ( ) set query ( pqb ) set track total hits ( true ) set search type ( dfs query then fetch ) get ( ) ; long num hits = search response get hits ( ) get total hits ( ) value ; assert that ( num hits , equal to ( 2l ) ) ; }


this is called when a horizontal scan finds a possible alignment pattern it will cross check with a vertical scan , and if successful , will , ah , cross - cross - check with another horizontal scan this is needed primarily to locate the real horizontal center of the pattern in cases of extreme skew and then we cross - cross - cross check with another diagonal scan if that succeeds the finder pattern location is added to a list that tracks the number of times each location has been nearly - matched as a finder pattern each additional find is more evidence that the location is in fact a finder pattern center

protected final boolean handle possible center ( int [ ] state count , int i , int j ) { int state count total = state count [ 0 ] + state count [ 1 ] + state count [ 2 ] + state count [ 3 ] + state count [ 4 ] ; float center j = center from end ( state count , j ) ; float center i = cross check vertical ( i , ( int ) center j , state count [ 2 ] , state count total ) ; if ( ! float is na n ( center i ) ) { / / re - cross check center j = cross check horizontal ( ( int ) center j , ( int ) center i , state count [ 2 ] , state count total ) ; if ( ! float is na n ( center j ) & & cross check diagonal ( ( int ) center i , ( int ) center j ) ) { float estimated module size = state count total / 7 0f ; boolean found = false ; for ( int index = 0 ; index < possible centers size ( ) ; index + + ) { finder pattern center = possible centers get ( index ) ; / / look for about the same center and module size : if ( center about equals ( estimated module size , center i , center j ) ) { possible centers set ( index , center combine estimate ( center i , center j , estimated module size ) ) ; found = true ; break ; } } if ( ! found ) { finder pattern point = new finder pattern ( center j , center i , estimated module size ) ; possible centers add ( point ) ; if ( result point callback ! = null ) { result point callback found possible result point ( point ) ; } } return true ; } } return false ; }


reschedule the given task object immediately to be implemented by subclasses if they ever call { @ code reschedule task if necessary } this implementation throws an unsupported operation exception

protected void do reschedule task ( object task ) { throw new unsupported operation exception ( class utils get short name ( get class ( ) ) + " does not support rescheduling of tasks " ) ; }


get the world body origin position note that the same vector 2 instance is returned each time this method is called

public vector 2 get position ( ) { jni get position ( addr , tmp ) ; position x = tmp [ 0 ] ; position y = tmp [ 1 ] ; return position ; }


an implementation of { @ link multiset # add all }

static < e > boolean add all impl ( multiset < e > self , collection < ? extends e > elements ) { check not null ( self ) ; check not null ( elements ) ; if ( elements instanceof multiset ) { return add all impl ( self , cast ( elements ) ) ; } else if ( elements is empty ( ) ) { return false ; } else { return iterators add all ( self , elements iterator ( ) ) ; } }


finds layout spec class in the given file

public static optional < psi class > get first layout spec ( psi file psi file ) { return get first class ( psi file , litho plugin utils : : is layout spec ) ; }


returns a string representation of the enclosed { @ link inet socket address }

public string get address ( ) { return network address format ( address get address ( ) ) ; }


notify all the handshake futures about the failure during the handshake

private void set handshake failure ( channel handler context ctx , throwable cause , boolean close inbound , boolean notify , boolean always flush and close ) { try { / / release all resources such as internal buffers that s s l engine / / is managing outbound closed = true ; engine close outbound ( ) ; if ( close inbound ) { try { engine close inbound ( ) ; } catch ( s s l exception e ) { if ( logger is debug enabled ( ) ) { / / only log in debug mode as it most likely harmless and latest chrome still trigger / / this all the time / / / / see https : / / github com / netty / netty / issues / 1340 string msg = e get message ( ) ; if ( msg = = null | | ! ( msg contains ( " possible truncation attack " ) | | msg contains ( " closing inbound before receiving peer ' s close notify " ) ) ) { logger debug ( " { } s s l engine close inbound ( ) raised an exception " , ctx channel ( ) , e ) ; } } } } if ( handshake promise try failure ( cause ) | | always flush and close ) { ssl utils handle handshake failure ( ctx , cause , notify ) ; } } finally { / / ensure we remove and fail all pending writes in all cases and so release memory quickly release and fail all ( ctx , cause ) ; } }


create a mutable { @ link routing nodes } this is a costly operation so this must only be called once !

private routing nodes get mutable routing nodes ( cluster state cluster state ) { return new routing nodes ( cluster state , false ) ; }


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


advances through { @ code input } looking for the start of the next ogg page the start of a page is identified by the 4 - byte capture pattern ' ogg s ' returns { @ code true } if a capture pattern was found , with the read and peek positions of { @ code input } at the start of the page , just before the capture pattern otherwise returns { @ code false } , with the read and peek positions of { @ code input } at either { @ code limit } ( if set ) or end - of - input

public boolean skip to next page ( extractor input input , long limit ) throws i o exception { assertions check argument ( input get position ( ) = = input get peek position ( ) ) ; while ( ( limit = = c position unset | | input get position ( ) + capture pattern size < limit ) & & peek safely ( input , scratch get data ( ) , 0 , capture pattern size , / * quiet = * / true ) ) { scratch reset ( / * limit = * / capture pattern size ) ; if ( scratch read unsigned int ( ) = = capture pattern ) { input reset peek position ( ) ; return true ; } / / advance one byte before looking for the capture pattern again input skip fully ( 1 ) ; } / / move the read & peek positions to limit or end - of - input , whichever is closer while ( ( limit = = c position unset | | input get position ( ) < limit ) & & input skip ( 1 ) ! = c result end of input ) { } return false ; }


visit a terminal node , and return a user - defined result of the operation

t visit terminal ( terminal node node ) ;


helper method used by all the visitor methods

private void visit common ( int offset , int length , boolean next is live ) { bits set ( live set , offset ) ; if ( next is live ) { / * * if the next instruction is flowed to by this one , just * add it to the work set , and then a subsequent visit * ( ) * will deal with it as appropriate * / add work if necessary ( offset + length , false ) ; } else { / * * if the next instruction isn ' t flowed to by this one , * then mark it as a start of a block but * don ' t * add it * to the work set , so that in the final phase we can know * dead code blocks as those marked as blocks but not also marked * live * / bits set ( block set , offset + length ) ; } }


gets the same thing as the ' this ' list represents , except as { @ link extension component } s

public list < extension component < t > > get components ( ) { return collections unmodifiable list ( ensure loaded ( ) ) ; }


expert users can override this method for more complete control over the execution of the mapper

public void run ( context context ) throws i o exception , interrupted exception { setup ( context ) ; try { while ( context next key value ( ) ) { map ( context get current key ( ) , context get current value ( ) , context ) ; } } finally { cleanup ( context ) ; } }


find the fields constant that matches field id , throwing an exception if it is not found

public static fields find by thrift id or throw ( int field id ) { fields fields = find by thrift id ( field id ) ; if ( fields = = null ) throw new illegal argument exception ( " field " + field id + " doesn ' t exist ! " ) ; return fields ; }


public double get double ( ) { return double ; }


to test the collection format in query parameters

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


gets the declared output fields for the specified componentstream

public fields get component output fields ( string component id , string stream id ) { fields ret = component to stream to fields get ( component id ) get ( stream id ) ; if ( ret = = null ) { throw new illegal argument exception ( " no output fields defined for component : stream " + component id + " : " + stream id ) ; } return ret ; }


gets the next smallest element , with respect to the definition of order implied by the { @ link type serializer } provided to this iterator

public e next ( e reuse ) throws i o exception { / * there are three ways to handle object reuse : * 1 ) reuse and return the given object * 2 ) ignore the given object and return a new object * 3 ) exchange the given object for an existing object * * the first option is not available here as the return value has * already been deserialized from the heap ' s top iterator the second * option avoids object reuse the third option is implemented below * by passing the given object to the heap ' s top iterator into which * the next value will be deserialized * / if ( this heap size ( ) > 0 ) { / / get the smallest element final head stream < e > top = this heap peek ( ) ; e result = top get head ( ) ; / / read an element if ( ! top next head ( reuse ) ) { this heap poll ( ) ; } else { this heap adjust top ( ) ; } return result ; } else { return null ; } }


returns the { @ link servlet context } to be injected or { @ code null } this method can be overridden by subclasses when a context is obtained after the post - processor has been registered

protected servlet context get servlet context ( ) { if ( this servlet context = = null & & get servlet config ( ) ! = null ) { return get servlet config ( ) get servlet context ( ) ; } return this servlet context ; }


current time from some arbitrary time base in the past , counting in milliseconds , and not affected by settimeofday or similar system clock changes this is appropriate to use when computing how much longer to wait for an interval to expire

public long monotonic now ( ) { return time monotonic now ( ) ; }


applies a touch down event to the stage and returns true if an actor in the scene { @ link event # handle ( ) handled } the event

public boolean touch down ( int screen x , int screen y , int pointer , int button ) { if ( ! is inside viewport ( screen x , screen y ) ) return false ; pointer touched [ pointer ] = true ; pointer screen x [ pointer ] = screen x ; pointer screen y [ pointer ] = screen y ; screen to stage coordinates ( temp coords set ( screen x , screen y ) ) ; input event event = pools obtain ( input event class ) ; event set type ( type touch down ) ; event set stage ( this ) ; event set stage x ( temp coords x ) ; event set stage y ( temp coords y ) ; event set pointer ( pointer ) ; event set button ( button ) ; actor target = hit ( temp coords x , temp coords y , true ) ; if ( target = = null ) { if ( root get touchable ( ) = = touchable enabled ) root fire ( event ) ; } else target fire ( event ) ; boolean handled = event is handled ( ) ; pools free ( event ) ; return handled ; }


returns the used ids bucket for the given tileset name if it doesn ' t exist one will be created with the specified size if its > 0 , else null will be returned

private int array get used ids bucket ( string tileset name , int size ) { if ( tileset used ids contains key ( tileset name ) ) { return tileset used ids get ( tileset name ) ; } if ( size < = 0 ) { return null ; } int array bucket = new int array ( size ) ; tileset used ids put ( tileset name , bucket ) ; return bucket ; }


return an html formatted rendering of a function

public static string get tool tip text ( function function , boolean include symbol details ) { string builder buf = new string builder ( html ) ; external location ext loc = function get external location ( ) ; if ( ext loc ! = null ) { buf append ( " external " ) append ( html space ) ; } else if ( function is thunk ( ) ) { buf append ( " thunk " ) append ( html space ) ; } if ( include symbol details ) { buf append ( " function " ) ; buf append ( html space ) append ( " - " ) append ( html space ) ; buf append ( friendly encode h t m l ( function get symbol ( ) get name ( true ) ) ) ; if ( ext loc ! = null ) { address addr = ext loc get address ( ) ; if ( addr ! = null ) { buf append ( html space ) append ( " @ " ) append ( html space ) ; buf append ( addr to string ( true ) ) ; } } buf append ( br ) ; } buf append ( get function signature preview ( function ) ) ; buf append ( br ) ; buf append ( " < table cellspacing = 0 callpadding = 0 border = 0 > " ) ; buf append ( get parameter detail row ( function get return ( ) ) ) ; for ( parameter p : function get parameters ( ) ) { buf append ( get parameter detail row ( p ) ) ; } if ( ext loc ! = null ) { string original imported name = ext loc get original imported name ( ) ; if ( original imported name ! = null ) { buf append ( " imported " ) append ( html space ) append ( " name : " ) append ( html space ) append ( friendly encode h t m l ( original imported name ) ) ; } } buf append ( " < / table > < / html > " ) ; return buf to string ( ) ; }


returns the current program location of the cursor

public program location get program location ( ) { field location loc = field panel get cursor location ( ) ; if ( loc = = null ) { return null ; } field field = field panel get current field ( ) ; return layout model get program location ( loc , field ) ; }


get a thread - local typed bytes writable input for the supplied { @ link data input }

public static typed bytes writable input get ( data input in ) { return get ( typed bytes input get ( in ) ) ; }


public object node distro status ( @ request param ( default value = " view " ) string action ) { object node result = jackson utils create empty json node ( ) ; if ( string utils equals ( switch entry action view , action ) ) { result replace ( " status " , jackson utils transfer to json node ( member manager all members ( ) ) ) ; return result ; } return result ; }


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

public static fields find by name ( string name ) { return by name get ( name ) ; }


gets the owner of a file in a way that should be supported by all filesystems that have a concept of file owner

public static string get file owner ( path path ) { try { file owner attribute view view = files get file attribute view ( path , file owner attribute view class ) ; return view get owner ( ) get name ( ) ; } catch ( i o exception e ) { throw new runtime exception ( e ) ; } }


set the configuration and extract the configuration parameters of interest

public void set conf ( configuration conf ) { super set conf ( conf ) ; if ( conf ! = null ) { dependency script name = conf get ( dependency script filename key ) ; } else { dependency script name = null ; } }


public static void main ( string [ ] args ) throws exception { configuration conf = new configuration ( ) ; compression codec factory factory = new compression codec factory ( conf ) ; boolean encode = false ; for ( int i = 0 ; i < args length ; + + i ) { if ( " - in " equals ( args [ i ] ) ) { encode = true ; } else if ( " - out " equals ( args [ i ] ) ) { encode = false ; } else { compression codec codec = factory get codec ( new path ( args [ i ] ) ) ; if ( codec = = null ) { system out println ( " codec for " + args [ i ] + " not found " ) ; } else { if ( encode ) { compression output stream out = null ; java io input stream in = null ; try { out = codec create output stream ( new java io file output stream ( args [ i ] ) ) ; byte [ ] buffer = new byte [ 100 ] ; string in filename = remove suffix ( args [ i ] , codec get default extension ( ) ) ; in = new java io file input stream ( in filename ) ; int len = in read ( buffer ) ; while ( len > 0 ) { out write ( buffer , 0 , len ) ; len = in read ( buffer ) ; } } finally { if ( out ! = null ) { out close ( ) ; } if ( in ! = null ) { in close ( ) ; } } } else { compression input stream in = null ; try { in = codec create input stream ( new java io file input stream ( args [ i ] ) ) ; byte [ ] buffer = new byte [ 100 ] ; int len = in read ( buffer ) ; while ( len > 0 ) { system out write ( buffer , 0 , len ) ; len = in read ( buffer ) ; } } finally { if ( in ! = null ) { in close ( ) ; } } } } } } }


subtracts decrement from this resource counter value and returns the new value

public resource counter subtract ( map < resource profile , integer > decrement ) { return internal subtract ( decrement entry set ( ) ) ; }


parses the specified http status line into a { @ link http response status } the expected formats of the line are : { @ code status code } ( e g 200 ) { @ code status code } { @ code reason phrase } ( e g 404 not found )

public static http response status parse line ( ascii string line ) { try { int space = line for each byte ( find ascii space ) ; return space = = - 1 ? value of ( line parse int ( ) ) : value of ( line parse int ( 0 , space ) , line to string ( space + 1 ) ) ; } catch ( exception e ) { throw new illegal argument exception ( " malformed status line : " + line , e ) ; } }


returns a new function scope as the top - level scope with the specified return type

public static function scope new function scope ( script scope script scope , class < ? > return type ) { return new function scope ( script scope , return type ) ; }


returns the tree font size enabled of this m t config object

public boolean is tree font size enabled ( ) { return tree font size enabled ; }


verify self - generated uuid logic a committer used for job setup can also use it for task setup , but a committer which generated a job id but was only used for task setup - that is rejected task abort will still work

public void test self generated u u i d ( ) throws throwable { describe ( " run two jobs to the same destination , assert they both complete " ) ; configuration conf = get configuration ( ) ; unset u u i d options ( conf ) ; / / job is set to generate u u i ds conf set boolean ( fs s3a committer generate uuid , true ) ; / / create the job don ' t write anything job data job data = start job ( false ) ; abstract s 3 a committer committer = job data committer ; string uuid = committer get u u i d ( ) ; assertions assert that ( committer get u u i d source ( ) ) described as ( " uuid source of % s " , committer ) is equal to ( abstract s 3 a committer job u u i d source generated locally ) ; / / examine the job configuration and verify that it has been updated configuration job conf = job data conf ; assertions assert that ( job conf get ( fs s3a committer uuid , null ) ) described as ( " config option " + fs s3a committer uuid ) is equal to ( uuid ) ; assertions assert that ( job conf get ( fs s3a committer uuid source , null ) ) described as ( " config option " + fs s3a committer uuid source ) is equal to ( abstract s 3 a committer job u u i d source generated locally get text ( ) ) ; / / because the task was set up in the job , it can have task / / setup called , even though it had a random id committer setup task ( job data t context ) ; / / but a new committer will not be set up task attempt context t context 2 = new task attempt context impl ( conf , task attempt 1 ) ; abstract s 3 a committer committer 2 = create committer ( out dir , t context 2 ) ; assertions assert that ( committer 2 get u u i d source ( ) ) described as ( " uuid source of % s " , committer 2 ) is equal to ( abstract s 3 a committer job u u i d source generated locally ) ; assert not equals ( " job u u i ds " , committer get u u i d ( ) , committer 2 get u u i d ( ) ) ; / / task setup must fail intercept ( path commit exception class , e self generated job uuid , ( ) - > { committer 2 setup task ( t context 2 ) ; return committer 2 ; } ) ; / / task abort with the self - generated option is fine committer 2 abort task ( t context 2 ) ; }


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


public string name ( ) { class c = get class ( ) ; if ( c is anonymous class ( ) ) c = c get superclass ( ) ; return core bundle get ( " filter " + c get simple name ( ) to lower case ( ) replace ( " filter " , " " ) , c get simple name ( ) replace ( " filter " , " " ) ) ; }


set the periodicity of this reservation representing the time period of the periodic job period is represented in milliseconds for periodic jobs period is 0 for non - periodic jobs


returns total number of files in the snapshot

public int get total file count ( ) { return total file count ; }


determine a default locale to fall back to : either a locally specified default locale or the system locale , or { @ code null } for no fallback locale at all

protected locale get default locale ( ) { if ( this default locale ! = null ) { return this default locale ; } if ( this fallback to system locale ) { return locale get default ( ) ; } return null ; }


global option to specify a cookie to be added to every request , if the request does not already contain such a cookie

builder default cookie ( string cookie , string values ) ;


public busy box action builder add input ( artifact value ) { preconditions check not null ( value ) ; command line add exec path ( value ) ; inputs add ( value ) ; return this ; }


1 detect if has awb dependency yes : special process no : default process 2 parse to atlas dependency tree

public set < android dependency > resolve dependencies ( @ non null variant dependencies variant deps ) { this ap dependency = resolve ap dependencies ( variant deps ) ; atlas dependency tree atlas dependency tree = new atlas dep tree parser ( project , extra model info , awbs ) parse dependency tree ( variant deps ) ; s logger info ( " [ dependency tree " + variant deps get name ( ) + " ] { } " , json to j s o n string ( atlas dependency tree get dependency json ( ) , true ) ) ; if ( plugin type utils is app project ( project ) ) { atlas build context android dependency trees put ( variant deps get name ( ) , atlas dependency tree ) ; } else { atlas build context lib dependency trees put ( variant deps get name ( ) , atlas dependency tree ) ; } / / set < android dependency > libs to explode = super resolve dependencies ( variant deps , tested project path ) ; / / return libs to explode ; return new hash set < > ( 0 ) ; }


handle deserialization of the ' null ' value

public shape get null value ( deserialization context ctxt ) throws json mapping exception { throw new json mapping exception ( ctxt get parser ( ) , " shape cannot be null " ) ; }


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


adds the given class specification to the given list , creating a new list if necessary

private list extend class specifications ( list class specifications , class specification class specification ) { if ( class specifications = = null ) { class specifications = new array list ( ) ; } class specifications add ( class specification ) ; return class specifications ; }


returns the idl parcelables defined on the given rule

private static immutable list < artifact > get idl parcelables ( rule context rule context ) { return rule context get rule ( ) is attr defined ( " idl parcelables " , build type label list ) ? immutable list copy of ( rule context get prerequisite artifacts ( " idl parcelables " ) filter ( android rule classes android idl ) list ( ) ) : immutable list < artifact > of ( ) ; }


sets the byte buffer providing access to the raw content of this zip entry

public zip entry with content ( byte buffer content ) { this content = content ; return this ; }


public void add ( texture texture , float x , float y ) { final float fx 2 = x + texture get width ( ) ; final float fy 2 = y + texture get height ( ) ; temp vertices [ 0 ] = x ; temp vertices [ 1 ] = y ; temp vertices [ 2 ] = color packed ; temp vertices [ 3 ] = 0 ; temp vertices [ 4 ] = 1 ; temp vertices [ 5 ] = x ; temp vertices [ 6 ] = fy 2 ; temp vertices [ 7 ] = color packed ; temp vertices [ 8 ] = 0 ; temp vertices [ 9 ] = 0 ; temp vertices [ 10 ] = fx 2 ; temp vertices [ 11 ] = fy 2 ; temp vertices [ 12 ] = color packed ; temp vertices [ 13 ] = 1 ; temp vertices [ 14 ] = 0 ; if ( mesh get num indices ( ) > 0 ) { temp vertices [ 15 ] = fx 2 ; temp vertices [ 16 ] = y ; temp vertices [ 17 ] = color packed ; temp vertices [ 18 ] = 1 ; temp vertices [ 19 ] = 1 ; add ( texture , temp vertices , 0 , 20 ) ; } else { temp vertices [ 15 ] = fx 2 ; temp vertices [ 16 ] = fy 2 ; temp vertices [ 17 ] = color packed ; temp vertices [ 18 ] = 1 ; temp vertices [ 19 ] = 0 ; temp vertices [ 20 ] = fx 2 ; temp vertices [ 21 ] = y ; temp vertices [ 22 ] = color packed ; temp vertices [ 23 ] = 1 ; temp vertices [ 24 ] = 1 ; temp vertices [ 25 ] = x ; temp vertices [ 26 ] = y ; temp vertices [ 27 ] = color packed ; temp vertices [ 28 ] = 0 ; temp vertices [ 29 ] = 1 ; add ( texture , temp vertices , 0 , 30 ) ; } }


when looking at a result set that consists of a map hash table we cannot rely on the output order , as the hashing algorithm or other aspects of the implementation may be different on differnt j d ks or platforms hence we take the map , convert the keys to a list , sort them and stringify the map , which is a bit of a hack , but guarantees that we get the same order on all systems we assume that the keys are strings

public < k , v > string sort map to string ( map < k , v > m ) { / / pass in crap , and get nothing back / / if ( m = = null ) { return null ; } system out println ( " map to string looks like : " + m to string ( ) ) ; / / sort the keys in the map / / tree map < k , v > nset = new tree map < k , v > ( m ) ; system out println ( " tree map looks like : " + nset to string ( ) ) ; return nset to string ( ) ; }


returns an immutable multimap containing the given entries , in order

public static < k , v > immutable list multimap < k , v > of ( k k 1 , v v 1 , k k 2 , v v 2 , k k 3 , v v 3 , k k 4 , v v 4 ) { immutable list multimap builder < k , v > builder = immutable list multimap builder ( ) ; builder put ( k 1 , v 1 ) ; builder put ( k 2 , v 2 ) ; builder put ( k 3 , v 3 ) ; builder put ( k 4 , v 4 ) ; return builder build ( ) ; }


public void test multiple thread ( ) throws exception { string testname = name get method name ( ) ; instrumented lock lock = new instrumented lock ( testname , log , 0 , 300 ) ; lock lock ( ) ; try { thread competing thread = new thread ( ) { @ override public void run ( ) { assert false ( lock try lock ( ) ) ; } } ; competing thread start ( ) ; competing thread join ( ) ; } finally { lock unlock ( ) ; } }


set event id should be assigned incrementally starting from 0

public void set event id ( int event id ) { super set event id ( event id ) ; }


verify that the fs ( real or restricted ) meets the requirement of the test s 3 guard tests are skipped if the ( default ) store is not a ddb store consistent across all fs instances the raw tests fail if somehow the fs does still have a s 3 guard metastore

protected void verify s 3 guard settings ( final s 3 a file system fs , final string store type ) { if ( s 3guard ) { assumptions assume that ( fs get metadata store ( ) ) described as ( " metadata store in " + store type + " fs : % s " , fs get metadata store ( ) ) is instance of ( dynamo d b metadata store class ) ; } else { assertions assert that ( fs has metadata store ( ) ) described as ( " metadata store in " + store type + " fs : % s " , fs get metadata store ( ) ) is false ( ) ; } }


returns true if any of the user source files had containers that were not recursed into because of the { @ link # max depth } limit

public boolean was recurse terminated early ( ) { for ( user added source info uasi : user added sources ) { if ( uasi was recurse terminated early ( ) ) { return true ; } } return false ; }


writes this { @ code bloom filter } to an output stream , with a custom format ( not java serialization ) this has been measured to save at least 400 bytes compared to regular serialization use { @ linkplain # read from ( input stream , funnel ) } to reconstruct the written bloom filter

public void write to ( output stream out ) throws i o exception { / / serial form : / / 1 signed byte for the strategy / / 1 unsigned byte for the number of hash functions / / 1 big endian int , the number of longs in our bitset / / n big endian longs of our bitset data output stream dout = new data output stream ( out ) ; dout write byte ( signed bytes checked cast ( strategy ordinal ( ) ) ) ; dout write byte ( unsigned bytes checked cast ( num hash functions ) ) ; / / note : checked at the c ' tor dout write int ( bits data length ( ) ) ; for ( int i = 0 ; i < bits data length ( ) ; i + + ) { dout write long ( bits data get ( i ) ) ; } }


returns the { @ link method } instance for { @ link # test sub list sub list remove affects original large list ( ) } so that tests of { @ link copy on write array list } can suppress it with { @ code feature specific test suite builder suppressing ( ) } until < a href = " http : bugs sun combugdatabaseview bug do ? bug id = 6570575 " > sun bug 6570575 is fixed

public static method get sub list sub list remove affects original large list method ( ) { return get method ( list sub list tester class , " test sub list sub list remove affects original large list " ) ; }


adds providers for runtime frameworks included in the final app bundle but not linked with at build time

builder add runtime deps ( list < ? extends transitive info collection > runtime deps ) { immutable list builder < objc provider > propagated objc deps = immutable list builder ( ) ; immutable list builder < cc info > cpp deps = immutable list builder ( ) ; for ( transitive info collection dep : runtime deps ) { add any providers ( propagated objc deps , dep , objc provider starlark constructor ) ; add any providers ( cpp deps , dep , cc info provider ) ; } this runtime dep objc providers = iterables concat ( this runtime dep objc providers , propagated objc deps build ( ) ) ; add dep cc header providers ( cpp deps build ( ) ) ; return this ; }


public static void clear ( @ non null final cache double utils cache double utils ) { cache double utils clear ( ) ; }


protected @ nullable gesture detector get gesture detector ( ) { return m gesture detector ; }


forwards item moved callback to all listeners within this list

public void item moved ( string parent path , string name , string new parent path , string new name ) { if ( enable asynchronous dispatching ) { add ( new item moved event ( parent path , name , new parent path , new name ) ) ; } else { for ( file system listener l : listener list ) { l item moved ( parent path , name , new parent path , new name ) ; } } }


look for an argument value that either corresponds to the given index in the constructor argument list or generically matches by type

public value holder get argument value ( int index , class < ? > required type ) { return get argument value ( index , required type , null , null ) ; }


completes the history with response events for invocations that are missing corresponding responses

public void complete ( function < object , object > missing response generator ) { final map < integer , event > uncompleted invocations = new hash map < > ( ) ; for ( event event : events ) { if ( event type = = event type invocation ) { uncompleted invocations put ( event id , event ) ; } else { final event removed = uncompleted invocations remove ( event id ) ; if ( removed = = null ) { throw new illegal argument exception ( " history not well - formed : " + events ) ; } } } for ( map entry < integer , event > entry : uncompleted invocations entry set ( ) ) { events add ( new event ( event type response , missing response generator apply ( entry get value ( ) value ) , entry get key ( ) ) ) ; } }


return the persistent instance of the given entity class with the given identifier , or { @ code null } if not found obtains the specified lock mode if the instance exists this method is a thin wrapper around { @ link org hibernate session # get ( string , serializable , lock mode ) } for convenience for an explanation of the exact semantics of this method , please do refer to the hibernate api documentation in the first instance

object get ( string entity name , serializable id , lock mode lock mode ) throws data access exception ;


returns the index of the given value , or - 1 if the value does not appear in the list this will do a binary search if the list is sorted or a linear search if not

public int index of ( int value ) { int ret = binarysearch ( value ) ; return ret > = 0 ? ret : - 1 ; }


public http response do hide upgrade wizard ( ) { jenkins get ( ) check permission ( jenkins administer ) ; http session session = stapler get current request ( ) get session ( false ) ; if ( session ! = null ) { session remove attribute ( show upgrade wizard flag ) ; } return http responses redirect to context root ( ) ; }


returns whether this monitor is occupied by any thread this method is designed for use in monitoring of the system state , not for synchronization control

public boolean is occupied ( ) { return lock is locked ( ) ; }


parses a placement constraint specification a placement constraint spec is a composite expression which is composed by multiple sub constraint expressions delimited by " : " with following syntax : tag 1 ( n1 ) , p1 : tag 2 ( n2 ) , p2 : : tag n ( nn ) , pn where < b > tag n ( nn ) < b > is a key value pair to determine the source allocation tag and the number of allocations , such as : foo ( 3 ) optional when using node attribute constraint and where < b > pn < b > can be any form of a valid constraint expression , such as : in , node , foo , bar notin , node , foo , bar , 1 , 2 and ( notin , node , foo : notin , node , bar ) and node attribute constraint such as yarn rm iofoo = true java = 1 7 , 1 8

public static map < source tags , placement constraint > parse placement spec ( string expression ) throws placement constraint parse exception { / / continue handling for application tag based constraint otherwise / / respect insertion order map < source tags , placement constraint > result = new linked hash map < > ( ) ; placement constraint parser constraint tokenizer tokenizer = new placement constraint parser multiple constraints tokenizer ( expression ) ; tokenizer validate ( ) ; while ( tokenizer has more elements ( ) ) { string spec str = tokenizer next element ( ) ; / / each spec starts with source allocation tag ( num of containers ) and / / followed by a constraint expression / / foo ( 4 ) , pn final source tags st ; placement constraint constraint ; string delimiter = new string ( new char [ ] { ' [ ' , bracket end , ' ] ' , expression val delim } ) ; string [ ] splitted = spec str split ( delimiter , 2 ) ; if ( splitted length = = 2 ) { st = source tags parse from ( splitted [ 0 ] + string value of ( bracket end ) ) ; constraint = placement constraint parser parse expression ( splitted [ 1 ] ) build ( ) ; } else if ( splitted length = = 1 ) { / / either node attribute constraint or source allocation tag alone node constraint parser np = new node constraint parser ( spec str ) ; optional < abstract constraint > constraint optional = optional of nullable ( np try parse ( ) ) ; if ( constraint optional is present ( ) ) { st = source tags empty source tags ( ) ; constraint = constraint optional get ( ) build ( ) ; } else { st = source tags parse from ( spec str ) ; constraint = null ; } } else { throw new placement constraint parse exception ( " unexpected placement constraint expression " + spec str ) ; } result put ( st , constraint ) ; } / / validation set < source tags > source tag set = result key set ( ) ; if ( source tag set stream ( ) filter ( source tags - > source tags is empty ( ) ) find any ( ) is present ( ) ) { / / source tags , e g foo ( 3 ) , is optional for a node - attribute constraint , / / but when source tags is absent , the parser only accept single / / constraint expression to avoid ambiguous semantic this is because / / ds am is requesting number of containers per the number specified / / in the source tags , we do overwrite when there is no source tags / / with num containers argument from commandline if that is partially / / missed in the constraints , we don ' t know if it is ought to / / overwritten or not if ( result size ( ) ! = 1 ) { throw new placement constraint parse exception ( " source allocation tags is required for a multi placement " + " constraint expression " ) ; } } return result ; }


create zoom inout buttons on the default help window toolbar

protected void add custom toolbar items ( final j help j help ) { for ( component component : j help get components ( ) ) { if ( component instanceof j tool bar ) { j tool bar toolbar = ( j tool bar ) component ; toolbar add separator ( ) ; image icon zoom out icon = resource manager get scaled icon ( zoom out icon , 24 , 24 ) ; j button zoom out btn = new j button ( zoom out icon ) ; zoom out btn set tool tip text ( " zoom out " ) ; zoom out btn add action listener ( e - > { g help h t m l editor kit zoom out ( ) ; / / need to reload the page to force the scroll panes to resize properly a / / simple revalidate / repaint won ' t do it reload help page ( get current u r l ( ) ) ; } ) ; toolbar add ( zoom out btn ) ; image icon zoom in icon = resource manager get scaled icon ( zoom in icon , 24 , 24 ) ; j button zoom in btn = new j button ( zoom in icon ) ; zoom in btn set tool tip text ( " zoom in " ) ; zoom in btn add action listener ( e - > { g help h t m l editor kit zoom in ( ) ; / / need to reload the page to force the scroll panes to resize properly a / / simple revalidate / repaint won ' t do it reload help page ( get current u r l ( ) ) ; } ) ; toolbar add ( zoom in btn ) ; / / once we ' ve found the toolbar we can break out of the loop and stop looking for it break ; } } }


get a packed database which whose unpacking will be cached if possible

public static packed database get packed database ( file packed db file , task monitor monitor ) throws i o exception , cancelled exception { return get packed database ( packed db file , false , monitor ) ; }


evaluate the callother op which corresponds to this behavior

public void evaluate ( emulate emu , varnode out , varnode [ ] inputs ) ;


links all requested bindings plus their transitive dependencies this creates jit bindings as necessary to fill in the gaps

public void link requested ( ) { assert lock held ( ) ; binding < ? > binding ; while ( ( binding = to link poll ( ) ) ! = null ) { if ( binding instanceof deferred binding ) { deferred binding deferred = ( deferred binding ) binding ; string key = deferred deferred key ; boolean must have injections = deferred must have injections ; if ( bindings contains key ( key ) ) { continue ; / / a binding for this key has since been linked } try { binding < ? > resolved binding = create binding ( key , binding required by , deferred class loader , must have injections ) ; resolved binding set library ( binding library ( ) ) ; resolved binding set depended on ( binding depended on ( ) ) ; / / fail if the type of binding we got wasn ' t capable of what was requested if ( ! key equals ( resolved binding provide key ) & & ! key equals ( resolved binding members key ) ) { throw new illegal state exception ( " unable to create binding for " + key ) ; } / / enqueue the jit binding so its own dependencies can be linked binding < ? > scoped binding = scope ( resolved binding ) ; to link add ( scoped binding ) ; put binding ( scoped binding ) ; } catch ( invalid binding exception e ) { add error ( e type + " " + e get message ( ) + " required by " + binding required by ) ; bindings put ( key , binding unresolved ) ; } catch ( unsupported operation exception e ) { add error ( " unsupported : " + e get message ( ) + " required by " + binding required by ) ; bindings put ( key , binding unresolved ) ; } catch ( illegal argument exception e ) { add error ( e get message ( ) + " required by " + binding required by ) ; bindings put ( key , binding unresolved ) ; } catch ( runtime exception e ) { throw e ; } catch ( exception e ) { throw new runtime exception ( e ) ; } } else { / / attempt to attach the binding to its dependencies if any dependency / / is not available , the attach will fail we ' ll enqueue creation of / / that dependency and retry the attachment later attach success = true ; binding attach ( this ) ; if ( attach success ) { binding set linked ( ) ; } else { to link add ( binding ) ; } } } try { error handler handle errors ( errors ) ; } finally { errors clear ( ) ; } }


called when an m bean is registered under the given { @ link object name } allows subclasses to perform additional processing when an m bean is registered the default implementation is empty can be overridden in subclasses

protected void on register ( object name object name ) { }


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


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


public x attr get x attr ( string prefixed name ) { x attr attr = x attr format get x attr ( attrs , prefixed name ) ; if ( attr = = null & & x attrs ! = null ) { x attr to find = x attr helper build x attr ( prefixed name ) ; for ( x attr a : x attrs ) { if ( a equals ignore value ( to find ) ) { attr = a ; break ; } } } return attr ; }


returns all installed la fs this will vary by os

public static list < string > get look and feel names ( ) { list < string > list = new array list < > ( ) ; list add ( docking windows look and feel utils system look and feel ) ; look and feel info [ ] installed look and feels = u i manager get installed look and feels ( ) ; for ( look and feel info info : installed look and feels ) { list add ( info get name ( ) ) ; } return list ; }


public table pad top ( value pad top ) { if ( pad top = = null ) throw new illegal argument exception ( " pad top cannot be null " ) ; this pad top = pad top ; size invalid = true ; return this ; }


jta { @ code before completion } callback : just invoked before commit in case of an exception , the jta transaction will be marked as rollback - only

public void before completion ( ) { try { boolean read only = transaction synchronization manager is current transaction read only ( ) ; this spring synchronization before commit ( read only ) ; } catch ( runtime exception | error ex ) { set rollback only if possible ( ) ; throw ex ; } finally { / / process spring ' s before completion early , in order to avoid issues / / with strict jta implementations that issue warnings when doing jdbc / / operations after transaction completion ( e g connection get warnings ) this before completion called = true ; this spring synchronization before completion ( ) ; } }


writes a cdata section such sections always appear on their own line the nature in which the cdata section is written depends on the actual string content with respect to these special characterssequences : < code > & amp ; < code > < code > & quot ; < code > < code > ' < code > < code > & lt ; < code > < code > & gt ; < code > additionally , the sequence < code > ] ] & gt ; < code > is special content containing no special characters will be left as - is content containing one or more special characters but not the sequence < code > ] ] & gt ; < code > will be enclosed in a cdata section content containing special characters and at least one < code > ] ] & gt ; < code > sequence will be left as - is but have all of its special characters encoded as entities these special treatment rules are required to allow cdata sections to contain xml strings which may themselves contain cdata sections traditional cdata sections < b > do not nest < b >

public void cdata ( string data ) { cdata ( data , false ) ; }


tests if character in the input string is a vowel

boolean is vowel ( int at ) { if ( ( at < 0 ) | | ( at > = m length ) ) { return false ; } char it = char at ( at ) ; if ( is vowel ( it ) ) { return true ; } return false ; }


list the statuses of the filesdirectories in the given path if the path is a directory

public remote iterator < located file status > list located status ( path f ) throws i o exception { return fs list located status ( f , default filter ) ; }


filling in the maps as indicated by their descriptions

private void map pre existing symbols ( ) throws pdb exception { / / cannot do this commented - out code here as we are relying on the primary symbol / / map , regardless of the remap so might need to separate the two todo : later thoughts / / if ( ! applicator get pdb applicator options ( ) remap address using existing public symbols ( ) ) { / / return ; / / } program program = applicator get program ( ) ; if ( program = = null ) { throw new pdb exception ( " program may not be null " ) ; } symbol iterator iter = program get symbol table ( ) get all symbols ( false ) ; while ( iter has next ( ) ) { symbol symbol = iter next ( ) ; string name = symbol get path ( ) to string ( ) ; address address = symbol get address ( ) ; address existing address = address by pre existing symbol name get ( name ) ; if ( existing address = = null ) { address by pre existing symbol name put ( name , address ) ; } else if ( ! existing address equals ( address ) ) { address by pre existing symbol name put ( name , address no address ) ; } if ( primary symbol by address get ( address ) = = null & & symbol is primary ( ) ) { primary symbol by address put ( address , symbol ) ; } } }


selects the item at the given zero - relative index in the receiver the current selection is first cleared , then the new item is selected < p > if cell selection is enabled , all cells within the item at the given index are selected

public void set selection ( int index ) { check widget ( ) ; if ( index > = 0 & & index < get item count ( ) ) { selected cells clear ( ) ; select cells ( get cells ( index ) ) ; } }


shut down the instance make sure to call this method to release its internal resources


public static naming service create naming service ( string server list ) throws nacos exception { try { class < ? > driver impl class = class for name ( " com alibaba nacos client naming nacos naming service " ) ; constructor constructor = driver impl class get constructor ( string class ) ; naming service vendor impl = ( naming service ) constructor new instance ( server list ) ; return vendor impl ; } catch ( throwable e ) { throw new nacos exception ( nacos exception client invalid param , e ) ; } }


tests that the slot manager retries allocating a slot if the task executor # request slot call fails

public void test slot request failure ( ) throws exception { final default slot tracker slot tracker = new default slot tracker ( ) ; try ( final declarative slot manager slot manager = create declarative slot manager builder ( ) set slot tracker ( slot tracker ) build and start with direct exec ( ) ) { resource requirements requirements = create resource requirements for single slot ( ) ; slot manager process resource requirements ( requirements ) ; final blocking queue < tuple 6 < slot i d , job i d , allocation i d , resource profile , string , resource manager id > > request slot queue = new array blocking queue < > ( 1 ) ; final blocking queue < completable future < acknowledge > > response queue = new array blocking queue < > ( 2 ) ; final completable future < acknowledge > first manual slot request response = new completable future < > ( ) ; response queue offer ( first manual slot request response ) ; final completable future < acknowledge > second manual slot request response = new completable future < > ( ) ; response queue offer ( second manual slot request response ) ; final testing task executor gateway testing task executor gateway = new testing task executor gateway builder ( ) set request slot function ( slot i d job i d allocation i d string resource manager id tuple 6 - > { request slot queue offer ( slot i d job i d allocation i d string resource manager id tuple 6 ) ; try { return response queue take ( ) ; } catch ( interrupted exception ignored ) { return future utils completed exceptionally ( new flink exception ( " response queue was interrupted " ) ) ; } } ) create testing task executor gateway ( ) ; final resource i d task executor resource id = resource i d generate ( ) ; final task executor connection task execution connection = new task executor connection ( task executor resource id , testing task executor gateway ) ; final slot report slot report = new slot report ( create free slot status ( new slot i d ( task executor resource id , 0 ) ) ) ; slot manager register task manager ( task execution connection , slot report , resource profile any , resource profile any ) ; final tuple 6 < slot i d , job i d , allocation i d , resource profile , string , resource manager id > first request = request slot queue take ( ) ; / / fail first request first manual slot request response complete exceptionally ( new slot allocation exception ( " test exception " ) ) ; final tuple 6 < slot i d , job i d , allocation i d , resource profile , string , resource manager id > second request = request slot queue take ( ) ; assert that ( second request f 1 , equal to ( first request f 1 ) ) ; assert that ( second request f 0 , equal to ( first request f 0 ) ) ; second manual slot request response complete ( acknowledge get ( ) ) ; final declarative task manager slot slot = slot tracker get slot ( second request f 0 ) ; assert that ( slot get state ( ) , equal to ( slot state allocated ) ) ; assert that ( slot get job id ( ) , equal to ( second request f 1 ) ) ; } }


test that getting more than the allowed number of script fields throws an exception

public void test max script fields search ( ) throws i o exception { create index ( " index " ) ; final search service service = get instance from node ( search service class ) ; final indices service indices service = get instance from node ( indices service class ) ; final index service index service = indices service index service safe ( resolve index ( " index " ) ) ; final index shard index shard = index service get shard ( 0 ) ; search request search request = new search request ( ) allow partial search results ( true ) ; search source builder search source builder = new search source builder ( ) ; search request source ( search source builder ) ; / / adding the maximum allowed number of script fields to retrieve int max script fields = index service get index settings ( ) get max script fields ( ) ; for ( int i = 0 ; i < max script fields ; i + + ) { search source builder script field ( " field " + i , new script ( script type inline , mock script engine name , custom script plugin dummy script , collections empty map ( ) ) ) ; } final shard search request request = new shard search request ( original indices none , search request , index shard shard id ( ) , 0 , 1 , new alias filter ( null , strings empty array ) , 1 0f , - 1 , null ) ; try ( reader context reader = create reader context ( index service , index shard ) ) { try ( search context context = service create context ( reader , request , null , random boolean ( ) ) ) { assert not null ( context ) ; } search source builder script field ( " another script field " , new script ( script type inline , mock script engine name , custom script plugin dummy script , collections empty map ( ) ) ) ; illegal argument exception ex = expect throws ( illegal argument exception class , ( ) - > service create context ( reader , request , null , random boolean ( ) ) ) ; assert equals ( " trying to retrieve too many script fields must be less than or equal to : [ " + max script fields + " ] but was [ " + ( max script fields + 1 ) + " ] this limit can be set by changing the [ index max script fields ] index level setting " , ex get message ( ) ) ; } }


creates a memory reference from the given instruction

public final reference create memory reference ( instruction instruction , int operand index , address to address , ref type flow type ) { reference manager reference manager = current program get reference manager ( ) ; reference ref = reference manager add memory reference ( instruction get min address ( ) , to address , flow type , source type user defined , operand index ) ; return ref ; }


returns the sample covariance of the values the count must be greater than one this is not guaranteed to return zero when the dataset consists of the same pair of values multiple times , due to numerical errors < h 3 > non - finite values < h 3 > if the dataset contains any non - finite values ( { @ link double # positive infinity } , { @ link double # negative infinity } , or { @ link double # na n } ) then the result is { @ link double # na n }

public final double sample covariance ( ) { check state ( count ( ) > 1 ) ; return sum of products of deltas / ( count ( ) - 1 ) ; }


constructs a new parser using the specified stream and name

public static xml pull parser create ( input stream input , string input name , error handler err handler , boolean validate ) throws s a x exception , i o exception { return new threaded xml pull parser impl ( input , input name , err handler , validate , 1000 ) ; }


reset the date time context for the current thread

public static void reset date time context ( ) { date time context holder remove ( ) ; }


helper method to configure the usernamepassword for basic auth or password o auth

public void set credentials ( string username , string password ) { for ( request interceptor api authorization : api authorizations values ( ) ) { if ( api authorization instanceof http basic auth ) { http basic auth basic auth = ( http basic auth ) api authorization ; basic auth set credentials ( username , password ) ; return ; } if ( api authorization instanceof o auth ) { o auth oauth = ( o auth ) api authorization ; oauth get token request builder ( ) set username ( username ) set password ( password ) ; return ; } } throw new runtime exception ( " no basic authentication or o auth configured ! " ) ; }


public void test quorum internal ( string addr ) throws exception { client base setup test env ( ) ; final int client port qp1 = port assignment unique ( ) ; final int client port qp2 = port assignment unique ( ) ; string server 1 = string format ( " server 1 = % 1 $ s : % 2 $ s : % 3 $ s ; % 4 $ s " , addr , port assignment unique ( ) , port assignment unique ( ) , client port qp1 ) ; string server 2 = string format ( " server 2 = % 1 $ s : % 2 $ s : % 3 $ s ; % 4 $ s " , addr , port assignment unique ( ) , port assignment unique ( ) , client port qp2 ) ; string quorum cfg section = server 1 + " \ n " + server 2 ; main thread q 1 = new main thread ( 1 , client port qp1 , quorum cfg section ) ; main thread q 2 = new main thread ( 2 , client port qp2 , quorum cfg section ) ; q 1 start ( ) ; q 2 start ( ) ; assert true ( client base wait for server up ( addr + " : " + client port qp1 , connection timeout ) , " waiting for server 1 being up " ) ; assert true ( client base wait for server up ( addr + " : " + client port qp2 , connection timeout ) , " waiting for server 2 being up " ) ; quorum peer quorum peer = q 1 main quorum peer ; int tick time = quorum peer get tick time ( ) ; assert equals ( tick time * 2 , quorum peer get min session timeout ( ) , " default value of minimum session time out is not considered " ) ; assert equals ( tick time * 20 , quorum peer get max session timeout ( ) , " default value of maximum session time out is not considered " ) ; zoo keeper zk = new zoo keeper ( addr + " : " + client port qp1 , client base connection timeout , this ) ; wait for one ( zk , states connected ) ; zk create ( " / foo q 1 " , " foobar 1 " get bytes ( ) , ids open acl unsafe , create mode persistent ) ; assert equals ( new string ( zk get data ( " / foo q 1 " , null , null ) ) , " foobar 1 " ) ; zk close ( ) ; zk = new zoo keeper ( addr + " : " + client port qp2 , client base connection timeout , this ) ; wait for one ( zk , states connected ) ; zk create ( " / foo q 2 " , " foobar 2 " get bytes ( ) , ids open acl unsafe , create mode persistent ) ; assert equals ( new string ( zk get data ( " / foo q 2 " , null , null ) ) , " foobar 2 " ) ; zk close ( ) ; q 1 shutdown ( ) ; q 2 shutdown ( ) ; assert true ( client base wait for server down ( addr + " : " + client port qp1 , client base connection timeout ) , " waiting for server 1 down " ) ; assert true ( client base wait for server down ( addr + " : " + client port qp2 , client base connection timeout ) , " waiting for server 2 down " ) ; }


gets the addresses where the named register differs between two programs

private address set get register differences ( string reg name , program context context 1 , program context context 2 , address set view address set , task monitor monitor ) { address set differences = new address set ( ) ; program context pc 1 = context 1 ; program context pc 2 = context 2 ; register rb 1 = pc 1 get register ( reg name ) ; register rb 2 = pc 2 get register ( reg name ) ; address range iterator iter = address set get address ranges ( ) ; while ( iter has next ( ) ) { address range range = iter next ( ) ; address range min = range get min address ( ) ; address range max = range get max address ( ) ; address range iterator it 1 = pc 1 get register value address ranges ( rb 1 , range min , range max ) ; address range iterator it 2 = pc 2 get register value address ranges ( rb 2 , range min , range max ) ; address range iterator it = new combined address range iterator ( it 1 , it 2 ) ; while ( it has next ( ) ) { address range addr range = it next ( ) ; big integer value 1 = pc 1 get value ( rb 1 , addr range get min address ( ) , false ) ; big integer value 2 = pc 2 get value ( rb 2 , addr range get min address ( ) , false ) ; boolean same value = ( value 1 = = null ) ? ( value 2 = = null ) : value 1 equals ( value 2 ) ; if ( ! same value ) { differences add range ( addr range get min address ( ) , addr range get max address ( ) ) ; } } if ( monitor is cancelled ( ) ) { return null ; } } return differences ; }


indicates the ordinal of the component which has been added , updated or cleared

void component changed ( int ordinal ) ;


writes project - specific ant properties , which get imported by the module project ' s language build xml file to allow building against a ghidra that lives in an external location if the given project is not a ghidra module project , or if the ghidra module project does not have a language build language xml ant file , this method has no effect

public static void write ant properties ( i project project , ghidra application layout ghidra layout ) throws i o exception { if ( ! ghidra project utils is ghidra module project ( project ) ) { return ; } i folder data folder = project get folder ( " data " ) ; if ( ! data folder exists ( ) ) { return ; } i file build xml file = data folder get file ( " build language xml " ) ; if ( ! build xml file exists ( ) ) { return ; } file ghidra install dir = ghidra layout get application installation dir ( ) get file ( false ) ; file ant file = new file ( project get location ( ) to file ( ) , " ant properties xml " ) ; / / hidden try ( print writer writer = new print writer ( new file writer ( ant file ) ) ) { writer println ( " < ! - - this file is generated on each \ " link ghidra \ " command do not modify - - > " ) ; writer println ( ) ; writer println ( " < project > " ) ; writer println ( " < property name = \ " ghidra install dir \ " value = \ " " + ghidra install dir get absolute path ( ) + " \ " / > " ) ; writer println ( " < / project > " ) ; } }


generates a cache key from a map of values

protected static string generate mashup key ( final map < string , string > keys ) { string builder builder = new string builder ( ) ; for ( object value : keys values ( ) ) { if ( builder length ( ) > 0 ) { builder append ( " - " ) ; } builder append ( value ) ; } return builder to string ( ) ; }


sends a simple patch request to the given path you only specify the $ path part of http : $ host : $ host $ path

public void send patch request ( string path , duration timeout ) throws timeout exception , interrupted exception { if ( ! path starts with ( " / " ) ) { path = " / " + path ; } http request get request = new default full http request ( http version http 1 1 , http method patch , path ) ; get request headers ( ) set ( http headers names host , host ) ; get request headers ( ) set ( http headers names connection , http headers values close ) ; send request ( get request , timeout ) ; }


returns the known dependencies for this type if this has dependencies whose values are not known statically , a dependency for the { @ link org elasticsearch common inject injector injector } will be included in the returned set

set < dependency < ? > > get dependencies ( ) ;


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


should directory contents be displayed in reverse order

boolean is order reverse ( ) { return this order reverse ; }


this method is implemented to invoke the simpler map row template method , ignoring parameters

protected final t map row ( result set rs , int row num , @ nullable object [ ] parameters , @ nullable map < ? , ? > context ) throws s q l exception { return map row ( rs , row num ) ; }


test to check correct values of read and write throttling statistics in { @ code abfs client throttling analyzer }

public void test abfs throttling statistics ( ) throws i o exception { describe ( " test to check correct values of read throttle and write " + " throttle statistics in abfs " ) ; abfs counters statistics = new abfs counters impl ( get file system ( ) get uri ( ) ) ; / * * calling the throttle methods to check correct summation and values of * the counters * / for ( int i = 0 ; i < large operations ; i + + ) { statistics increment counter ( abfs statistic read throttles , 1 ) ; statistics increment counter ( abfs statistic write throttles , 1 ) ; } map < string , long > metric map = statistics to map ( ) ; / * * test to check read and write throttle statistics gave correct values for * 1000 calls * / assert abfs statistics ( abfs statistic read throttles , large operations , metric map ) ; assert abfs statistics ( abfs statistic write throttles , large operations , metric map ) ; }


returns a list of framework library search paths

static immutable list < string > framework library search paths ( objc provider provider ) { immutable list builder < string > search paths = new immutable list builder < > ( ) ; return search paths / / add library search paths corresponding to custom ( non - sdk ) frameworks for each framework / / foo / bar framework , include " foo " as a search path add all ( provider static framework paths ( ) to list ( ) ) add all ( provider dynamic framework paths ( ) to list ( ) ) build ( ) ; }


report an exception to mark the node as unhealthy

public synchronized void report exception ( exception ex ) { node health exception = ex ; node health exception report time = system current time millis ( ) ; }


create an { @ link f s data output stream } at the indicated path with write - progress reporting the frequency of callbacks is implementation - specific ; it may be " none "

public f s data output stream create ( path f , boolean overwrite , int buffer size , progressable progress ) throws i o exception { return create ( f , overwrite , buffer size , get default replication ( f ) , get default block size ( f ) , progress ) ; }


public static void main ( final string [ ] args ) throws exception { final var in memory dao = new in memory customer dao ( ) ; perform operations using ( in memory dao ) ; final var data source = create data source ( ) ; create schema ( data source ) ; final var db dao = new db customer dao ( data source ) ; perform operations using ( db dao ) ; delete schema ( data source ) ; }


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

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


places focus in the first focusable component within this panel

public void request focus ( ) { swing utilities invoke later ( new runnable ( ) { public void run ( ) { keyboard focus manager kfm = keyboard focus manager get current keyboard focus manager ( ) ; kfm focus next component ( edit reference panel this ) ; } } ) ; }


output the subtree rooted at the current node only the leaves are printed

private void output ( print stream out , string prefix ) { prefix = prefix = = null ? name : prefix + " / " + name ; if ( children is empty ( ) ) { out println ( prefix ) ; } else { for ( i node child : children ) { child output ( out , prefix ) ; } } }


gets all server sockets that exist in the process

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


public static synchronized void write new line ( string filename , string line to write , boolean debug ) { print writer writer = null ; string original = filename ; int counter = 0 ; boolean saved = false ; while ( ! saved ) { try { writer = new print writer ( new buffered writer ( new file writer ( filename , true ) ) ) ; writer println ( line to write ) ; if ( debug ) system out println ( " saved " + filename + " > " + line to write + " to disk " ) ; saved = true ; } catch ( exception e ) { if ( debug ) system out println ( " failed saving , trying to save as " + filename ) ; if ( original contains ( " " ) ) { filename = insert file name ( original , " " + counter ) ; } else filename = original + counter ; counter + + ; } } writer close ( ) ; }


ensures the truth of an expression involving the state of the calling instance , but not involving any parameters to the calling method

public static void check state ( boolean expression , @ nullable decl object error message ) { if ( ! expression ) { throw new illegal state exception ( string value of ( error message ) ) ; } }


create a loop this automatically adjusts connectivity

public void create loop ( vector 2 [ ] vertices ) { float [ ] verts = new float [ vertices length * 2 ] ; for ( int i = 0 , j = 0 ; i < vertices length * 2 ; i + = 2 , j + + ) { verts [ i ] = vertices [ j ] x ; verts [ i + 1 ] = vertices [ j ] y ; } jni create loop ( addr , verts , 0 , verts length / 2 ) ; is looped = true ; }


configure notification sender notification sender

notification sender configure notification sender ( ) ;


public task type get task type ( ) { return task type value of ( datum get task type ( ) to string ( ) ) ; }


determines whether the given cache can be converted to a local cache by { @ link # to local cache } without throwing an exception

static boolean has local cache ( cache < ? , ? > cache ) { return ( check not null ( cache ) instanceof local loading cache ) ; }


returns the quotient of this long value and the given specific long value

public long value divide ( specific long value other ) { return this ; }


public integer get integer ( ) { return integer ; }


returns an initialized test harness for { @ link co process function } with two input streams

public static < in1 , in2 , out > two input stream operator test harness < in1 , in2 , out > for co process function ( final co process function < in1 , in2 , out > function ) throws exception { two input stream operator test harness < in1 , in2 , out > test harness = new two input stream operator test harness < > ( new co process operator < > ( preconditions check not null ( function ) ) , 1 , 1 , 0 ) ; test harness open ( ) ; return test harness ; }


model tests for additional properties object

public void test additional properties object ( ) { / / todo : test additional properties object }


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


returns an unmodifiable view of the intersection of two multisets in the returned multiset , the count of each element is the minimum of its counts in the two backing multisets , with elements that would have a count of 0 not included the iteration order of the returned multiset matches that of the element set of { @ code multiset 1 } , with repeated occurrences of the same element appearing consecutively results are undefined if { @ code multiset 1 } and { @ code multiset 2 } are based on different equivalence relations ( as { @ code hash multiset } and { @ code tree multiset } are )

public static < e > multiset < e > intersection ( final multiset < e > multiset 1 , final multiset < ? > multiset 2 ) { check not null ( multiset 1 ) ; check not null ( multiset 2 ) ; return new view multiset < e > ( ) { @ override public int count ( object element ) { int count 1 = multiset 1 count ( element ) ; return ( count 1 = = 0 ) ? 0 : math min ( count 1 , multiset 2 count ( element ) ) ; } @ override set < e > create element set ( ) { return sets intersection ( multiset 1 element set ( ) , multiset 2 element set ( ) ) ; } @ override iterator < e > element iterator ( ) { throw new assertion error ( " should never be called " ) ; } @ override iterator < entry < e > > entry iterator ( ) { final iterator < entry < e > > iterator 1 = multiset 1 entry set ( ) iterator ( ) ; / / todo ( lowasser ) : consider making the entries live views return new abstract iterator < entry < e > > ( ) { @ override protected entry < e > compute next ( ) { while ( iterator 1 has next ( ) ) { entry < e > entry 1 = iterator 1 next ( ) ; e element = entry 1 get element ( ) ; int count = math min ( entry 1 get count ( ) , multiset 2 count ( element ) ) ; if ( count > 0 ) { return immutable entry ( element , count ) ; } } return end of data ( ) ; } } ; } } ; }


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


public static string pretty format ( big decimal number ) { return pretty format ( number double value ( ) ) ; }


returns a method object that reflects the specified public member method of the class or interface represented by the fully qualified class name

private static method get method ( final string fqcn , final string method name , final class < ? > parameter classes ) { try { final class < ? > type = get class ( fqcn ) ; return type get method ( method name , parameter classes ) ; } catch ( exception e ) { throw new instantiation exception ( string format ( " could not find % s # % s ( ) : % s " , fqcn , method name , e ) , e ) ; } }


calls to get the storage component could be blocking this ensures requests that block callers ( such as http or g r p c ) do not add additional load during such events

public void accept ( list < span > spans , callback < void > callback , executor executor ) { if ( spans is empty ( ) ) { callback on success ( null ) ; return ; } metrics increment spans ( spans size ( ) ) ; list < span > sampled spans = sample ( spans ) ; if ( sampled spans is empty ( ) ) { callback on success ( null ) ; return ; } / / in order to ensure callers are not blocked , we swap callbacks when we get to the storage / / phase of this process here , we create a callback whose sole purpose is classifying later / / errors on this bundle of spans in the same log category this allows people to only turn on / / debug logging in one place try { executor execute ( new store spans ( sampled spans ) ) ; callback on success ( null ) ; } catch ( throwable unexpected ) { / / ensure if a future is supplied we always set value or error callback on error ( unexpected ) ; throw unexpected ; } }


returns the object that this proxy represents or null if the represented object no longer exists


inject broker controller for this listener

public void set broker controller ( broker controller broker controller ) { this broker controller = broker controller ; }


return the single { @ link cache memory utils } instance

public static cache memory utils get instance ( ) { return get instance ( default max count ) ; }


protected void perform delete ( ) throws i o exception , interrupted exception { get config file ( ) delete ( ) ; util delete recursive ( get root dir ( ) ) ; }