this create a test case in which two threads are trying to load two different jobs of the same user under the intermediate directory one thread should not be blocked by the other thread that is loading a huge job files ( this is simulated by hanging up parsing the job files forever ) the test will fail by triggering the timeout if one thread is blocked by the other while the other thread is holding the lock on its associated job files and hanging up parsing the files

public void test two threads querying different job of same user ( ) throws interrupted exception , i o exception { final configuration config = new configuration ( ) ; config set ( j h admin config mr history intermediate done dir , intermediate dir get path ( ) ) ; config set long ( j h admin config mr history max age ms , long max value ) ; final job id job 1 = create job id ( 0 ) ; final job id job 2 = create job id ( 1 ) ; final history file manager under contention history file manager = create history file manager ( config , job 1 , job 2 ) ; thread web request 1 = null ; thread web request 2 = null ; try { / * * * create a dummy jhist file for job 1 , and try to load / parse the job * files in one child thread * / create jhist file ( job 1 ) ; web request 1 = new thread ( new runnable ( ) { @ override public void run ( ) { try { history file manager history file info history file info = history file manager get file info ( job 1 ) ; history file info load job ( ) ; } catch ( i o exception e ) { e print stack trace ( ) ; } } } ) ; web request 1 start ( ) ; history file manager wait until intermediate dir is scanned ( job 1 ) ; / * * * at this point , thread web request 1 has finished scanning the * intermediate directory and is hanging up parsing the job files while * it ' s holding the lock on the associated history file info object * / / * * * create a dummy jhist file for job 2 and try to load / parse the job files * in the other child thread because job files are not moved from the * intermediate directory to the done directory , thread web request 2 * will also see the job history files for job 1 * / create jhist file ( job 2 ) ; web request 2 = new thread ( new runnable ( ) { @ override public void run ( ) { try { history file manager history file info history file info = history file manager get file info ( job 2 ) ; history file info load job ( ) ; } catch ( i o exception e ) { e print stack trace ( ) ; } } } ) ; web request 2 start ( ) ; history file manager wait until intermediate dir is scanned ( job 2 ) ;


test the use of chained - buffers for record storage chained - buffers will be forced to utilize 3 buffers for storing indexes

public void test insert very large chained buffers var key record ( ) throws i o exception { insert one var key record ( false , false , 2 * buffer size * ( buffer size / 4 ) ) ; }


perform any cleanup to stop this task in sink tasks , this method is invoked only once outstanding calls to other methods have completed ( e g , { @ link # put ( collection ) } has returned ) and a final { @ link # flush ( map ) } and offset commit has completed implementations of this method should only need to perform final cleanup operations , such as closing network connections to the sink system


private memory block add block ( string name , long offset , int length ) throws exception { memory memory = program get memory ( ) ; address start = get addr ( offset ) ; return memory create initialized block ( name , start , length , ( byte ) 0 , task monitor adapter dummy monitor , false ) ; }


returns the children of this value as a newly allocated float array

public float [ ] as float array ( ) { if ( type ! = value type array ) throw new illegal state exception ( " value is not an array : " + type ) ; float [ ] array = new float [ size ] ; int i = 0 ; for ( json value value = child ; value ! = null ; value = value next , i + + ) { float v ; switch ( value type ) { case string value : v = float parse float ( value string value ) ; break ; case double value : v = ( float ) value double value ; break ; case long value : v = value long value ; break ; case boolean value : v = value long value ! = 0 ? 1 : 0 ; break ; default : throw new illegal state exception ( " value cannot be converted to float : " + value type ) ; } array [ i ] = v ; } return array ; }


generates a document that holds random metadata and the document provided as a map argument

public static ingest document random ingest document ( random random , map < string , object > source ) { string index = random string ( random ) ; string id = random string ( random ) ; string routing = null ; long version = random non negtive long ( random ) ; version type version type = random picks random from ( random , new version type [ ] { version type internal , version type external , version type external gte } ) ; if ( random next boolean ( ) ) { routing = random string ( random ) ; } return new ingest document ( index , id , routing , version , version type , source ) ; }


writes a { @ code data } frame to the remote endpoint this will result in one or more frames being written to the context

channel future write data ( channel handler context ctx , int stream id , byte buf data , int padding , boolean end stream , channel promise promise ) ;


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


returns whether the given opcode represents a pop instruction that must get a consistent type ( pop , pop 2 , arraylength )

private boolean is pop ( byte opcode ) { return opcode = = instruction constants op pop | | opcode = = instruction constants op pop2 | | opcode = = instruction constants op arraylength ; }


public static open index request open index request ( string index ) { return new open index request ( index ) ; }


returns the { @ code float } value of a header with the specified name if there is more than one value for the specified name , the first value in insertion order is returned


verify that the block is in the declared state

protected final void verify state ( dest state expected ) throws illegal state exception { if ( expected ! = null & & state ! = expected ) { throw new illegal state exception ( " expected stream state " + expected + " - but actual state is " + state + " in " + this ) ; } }


private void draw second animation ( canvas canvas ) { if ( arc o = = limite ) arc d + = 6 ; if ( arc d > = 290 | | arc o > limite ) { arc o + = 6 ; arc d - = 6 ; } if ( arc o > limite + 290 ) { limite = arc o ; arc o = limite ; arc d = 1 ; } rotate angle + = 4 ; canvas rotate ( rotate angle , get width ( ) / 2 , get height ( ) / 2 ) ; bitmap bitmap = bitmap create bitmap ( canvas get width ( ) , canvas get height ( ) , bitmap config argb 8888 ) ; canvas temp = new canvas ( bitmap ) ; paint paint = new paint ( ) ; paint set anti alias ( true ) ; paint set color ( background color ) ; / / temp draw a r g b ( 0 , 0 , 0 , 255 ) ; temp draw arc ( new rect f ( 0 , 0 , get width ( ) , get height ( ) ) , arc o , arc d , true , paint ) ; paint transparent paint = new paint ( ) ; transparent paint set anti alias ( true ) ; transparent paint set color ( get resources ( ) get color ( android r color transparent ) ) ; transparent paint set xfermode ( new porter duff xfermode ( porter duff mode clear ) ) ; temp draw circle ( get width ( ) / 2 , get height ( ) / 2 , ( get width ( ) / 2 ) - utils dp to px ( 4 , get resources ( ) ) , transparent paint ) ; canvas draw bitmap ( bitmap , 0 , 0 , new paint ( ) ) ; }


determine if the supplied { @ link class } meets the criteria for being considered a default configuration class candidate specifically , such candidates : must not be { @ code null } must not be { @ code private } must not be { @ code final } must be { @ code static } must be annotated or meta - annotated with { @ code @ configuration }

private static boolean is default configuration class candidate ( @ nullable class < ? > clazz ) { return ( clazz ! = null & & is static non private and non final ( clazz ) & & annotated element utils has annotation ( clazz , configuration class ) ) ; }


returns the dts format given { @ code data } containing the dts frame according to etsi ts 102 114 subsections 5 35 4

public static format parse dts format ( byte [ ] frame , @ nullable string track id , @ nullable string language , @ nullable drm init data drm init data ) { parsable bit array frame bits = get normalized frame header ( frame ) ; frame bits skip bits ( 32 + 1 + 5 + 1 + 7 + 14 ) ; / / sync , ftype , short , cpf , nblks , fsize int amode = frame bits read bits ( 6 ) ; int channel count = channels by amode [ amode ] ; int sfreq = frame bits read bits ( 4 ) ; int sample rate = sample rate by sfreq [ sfreq ] ; int rate = frame bits read bits ( 5 ) ; int bitrate = rate > = twice bitrate kbps by rate length ? format no value : twice bitrate kbps by rate [ rate ] * 1000 / 2 ; frame bits skip bits ( 10 ) ; / / mix , dynf , timef , auxf , hdcd , ext audio id , ext audio , aspf channel count + = frame bits read bits ( 2 ) > 0 ? 1 : 0 ; / / lff return new format builder ( ) set id ( track id ) set sample mime type ( mime types audio dts ) set average bitrate ( bitrate ) set channel count ( channel count ) set sample rate ( sample rate ) set drm init data ( drm init data ) set language ( language ) build ( ) ; }


if there are errors during error manager init , we have no choice but to go to system err

static void raw error ( string msg ) { system err println ( msg ) ; }


sets a threshold that enforces a pre - filter roundtrip to pre - filter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold this filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie if date filters are mandatory to match but the shard bounds and the query are disjoint when unspecified , the pre - filter phase is executed if any of these conditions is met : the request targets more than 128 shards the request targets one or more read - only index the primary sort of the query targets an indexed field

public void set pre filter shard size ( int pre filter shard size ) { if ( pre filter shard size < 1 ) { throw new illegal argument exception ( " pre filter shard size must be > = 1 " ) ; } this pre filter shard size = pre filter shard size ; }


public list < list < long > > get array array of integer ( ) { return array array of integer ; }


private static void read eval print loop ( ) { system err println ( " welcome to starlark ( java starlark net ) " ) ; string line ; while ( ( line = prompt ( ) ) ! = null ) { parser input input = parser input from string ( line , " < stdin > " ) ; try { object result = starlark exec file ( input , options , module , thread ) ; if ( result ! = starlark none ) { system out println ( starlark repr ( result ) ) ; } } catch ( syntax error exception ex ) { for ( syntax error error : ex errors ( ) ) { system err println ( error ) ; } } catch ( eval exception ex ) { / / todo ( adonovan ) : provide a source reader requires that we buffer the / / entire history so that line numbers don ' t reset in each chunk system err println ( ex get message with stack ( ) ) ; } catch ( interrupted exception ex ) { system err println ( " interrupted " ) ; } } }


public string get item name ( ) { return item 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 " ) ; }


for this test , the body for this request much reference a schema named & # x 6 0 ; file & # x 6 0 ;

void test body with file schema ( file schema test class body ) ;


public string get http address ( ) { return this rm node get http address ( ) ; }


actually set the nested path delegated to by set nested path and push nested path

protected void do set nested path ( @ nullable string nested path ) { if ( nested path = = null ) { nested path = " " ; } nested path = canonical field name ( nested path ) ; if ( nested path length ( ) > 0 & & ! nested path ends with ( errors nested path separator ) ) { nested path + = errors nested path separator ; } this nested path = nested path ; }


obtain the total size of the available physical memory present in the system

public long get available physical memory size ( ) { return sys get available physical memory size ( ) ; }


stores an short array in the table at the given row and column note - all values in a given column must be of the same type

public void put short array ( int row , int col , short [ ] value ) { if ( col > = data columns length ) { grow table ( col + 1 ) ; } short array array saa = null ; if ( data columns [ col ] = = null ) { saa = new short array array ( ) ; data columns [ col ] = saa ; } else { saa = ( short array array ) data columns [ col ] ; } saa put ( row , value ) ; }


public void test client login override ( ) throws exception { security protocol security protocol = security protocol sasl plaintext ; test jaas config jaas config = configure mechanisms ( " plain " , collections singleton list ( " plain " ) ) ; jaas config set client options ( " plain " , " invaliduser " , " invalidpassword " ) ; server = create echo server ( security protocol ) ; / / connection should succeed using login override that sets correct username / password in subject sasl client configs put ( sasl configs sasl login class , test login class get name ( ) ) ; create and check client connection ( security protocol , " 1 " ) ; assert equals ( 1 , test login login count get ( ) ) ; / / connection should fail without login override since username / password in jaas config is invalid sasl client configs remove ( sasl configs sasl login class ) ; create and check client connection failure ( security protocol , " invalid " ) ; assert equals ( 1 , test login login count get ( ) ) ; }


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


public priority get request priority ( ) { return m request priority ; }


if a value of 0 is set then this attribute will revert to its default value optional : default value is r string string resource value

public text prop default view model nullable text with default ( @ string res int string res ) { on mutation ( ) ; nullable text with default string attribute data set value ( string res ) ; return this ; }


return the path array of the localized files intended to be used by user code

public static path [ ] get local cache files ( configuration conf ) throws i o exception { return string utils string to path ( conf get strings ( m r job config cache localfiles ) ) ; }


private put item outcome put item ( item item ) { log debug ( " putting item { } " , item ) ; return table put item ( item ) ; }


returns a human - readable text that represents this label

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


create a new database and provide the initial buffer file for writing

public static local managed buffer file create database ( file db dir , d b file listener db file listener , int buffer size ) throws i o exception { private database db = new private database ( db dir , db file listener ) ; boolean success = false ; try { local managed buffer file bfile = new local managed buffer file ( buffer size , db bf mgr , - 1 ) ; success = true ; return bfile ; } finally { if ( ! success & & db db dir created ) { delete dir ( db dir ) ; } } }


< code > repeated io netty example worldclock local time local time = 1 ; < code >

public io netty example worldclock world clock protocol local time or builder get local time or builder ( int index ) { return local time get ( index ) ; }


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


creates a file write action to write contents to the resulting artifact file name in the genfiles root underneath the package path

public static artifact create file ( rule context rule context , string file name , char sequence contents , boolean executable ) { artifact script file artifact = rule context get package relative artifact ( file name , rule context get genfiles directory ( ) ) ; rule context register action ( file write action create ( rule context , script file artifact , contents , executable ) ) ; return script file artifact ; }


async http post json create a new resource by p o s ting the given object to the http request , http header content type default ' applicationjson ; charset = utf - 8 ' { @ code response type } can be an rest result or rest result data { @ code t } type { @ code callback } result callback execution , if you need response headers , you can convert the received rest result to http rest result

public < t > void post json ( string url , header header , string body , type response type , callback < t > callback ) { execute ( url , http method post , new request http entity ( header set content type ( media type application json ) , body ) , response type , callback ) ; }


returns and removes the specified property of type map from the specified configuration map if the property value isn ' t of type map an { @ link elasticsearch parse exception } is thrown if the property is missing an { @ link elasticsearch parse exception } is thrown

public static < t > map < string , t > read map ( string processor type , string processor tag , map < string , object > configuration , string property name ) { object value = configuration remove ( property name ) ; if ( value = = null ) { throw new configuration exception ( processor type , processor tag , property name , " required property is missing " ) ; } return read map ( processor type , processor tag , property name , value ) ; }


receives a object array , generates a row data based on the array

public static row data row ( object fields ) { object [ ] objects = new object [ fields length ] ; for ( int i = 0 ; i < fields length ; i + + ) { object field = fields [ i ] ; if ( field instanceof string ) { objects [ i ] = from string ( ( string ) field ) ; } else { objects [ i ] = field ; } } return generic row data of ( objects ) ; }


public boolean create ( final string path , list < acl > zk acl ) throws exception { boolean created = false ; if ( ! exists ( path ) ) { curator create ( ) with mode ( create mode persistent ) with a c l ( zk acl ) for path ( path , null ) ; created = true ; } return created ; }


creates { @ link mapped field type } from the provided < code > job < code > for simplicity all numbers are considered as longs

private map < string , mapped field type > create field types ( rollup job config job ) { map < string , mapped field type > field types = new hash map < > ( ) ; date formatter formatter = date formatter for pattern ( random date formatter pattern ( ) ) with locale ( locale root ) ; mapped field type field type = new date field mapper date field type ( job get group config ( ) get date histogram ( ) get field ( ) , formatter ) ; field types put ( field type name ( ) , field type ) ; if ( job get group config ( ) get histogram ( ) ! = null ) { for ( string field : job get group config ( ) get histogram ( ) get fields ( ) ) { mapped field type ft = new number field mapper builder ( field , number field mapper number type long , false , false ) build ( new content path ( 0 ) ) field type ( ) ; field types put ( ft name ( ) , ft ) ; } } if ( job get group config ( ) get terms ( ) ! = null ) { for ( string field : job get group config ( ) get terms ( ) get fields ( ) ) { mapped field type ft = new keyword field mapper builder ( field ) build ( new content path ( 0 ) ) field type ( ) ; field types put ( ft name ( ) , ft ) ; } } if ( job get metrics config ( ) ! = null ) { for ( metric config metric : job get metrics config ( ) ) { mapped field type ft = new number field mapper builder ( metric get field ( ) , number field mapper number type long , false , false ) build ( new content path ( 0 ) ) field type ( ) ; field types put ( ft name ( ) , ft ) ; } } return field types ; }


public static start recovery request get start recovery request ( logger logger , discovery node local node , recovery target recovery target , long starting seq no ) { final start recovery request request ; logger trace ( " { } collecting local files for [ { } ] " , recovery target shard id ( ) , recovery target source node ( ) ) ; store metadata snapshot metadata snapshot ; try { metadata snapshot = recovery target index shard ( ) snapshot store metadata ( ) ; / / make sure that the current translog is consistent with the lucene index ; otherwise , we have to throw away the lucene index try { final string expected translog u u i d = metadata snapshot get commit user data ( ) get ( translog translog uuid key ) ; final long global checkpoint = translog read global checkpoint ( recovery target translog location ( ) , expected translog u u i d ) ; assert global checkpoint + 1 > = starting seq no : " invalid starting seq no " + starting seq no + " > = " + global checkpoint ; } catch ( i o exception | translog corrupted exception e ) { logger warn ( new parameterized message ( " error while reading global checkpoint from translog , " + " resetting the starting sequence number from { } to unassigned and recovering as if there are none " , starting seq no ) , e ) ; metadata snapshot = store metadata snapshot empty ; starting seq no = unassigned seq no ; } } catch ( final org apache lucene index index not found exception e ) { / / happens on an empty folder no need to log assert starting seq no = = unassigned seq no : starting seq no ; logger trace ( " { } shard folder empty , recovering all files " , recovery target ) ; metadata snapshot = store metadata snapshot empty ; } catch ( final i o exception e ) { if ( starting seq no ! = unassigned seq no ) { logger warn ( new parameterized message ( " error while listing local files , resetting the starting sequence number from { } " + " to unassigned and recovering as if there are none " , starting seq no ) , e ) ; starting seq no = unassigned seq no ; } else { logger warn ( " error while listing local files , recovering as if there are none " , e ) ; } metadata snapshot = store metadata snapshot empty ; } logger trace ( " { } local file count [ { } ] " , recovery target shard id ( ) , metadata snapshot size ( ) ) ; request = new start recovery request ( recovery target shard id ( ) , recovery target index shard ( ) routing entry ( ) allocation id ( ) get id ( ) , recovery target source node ( ) , local node , metadata snapshot , recovery target state ( ) get primary ( ) , recovery target recovery id ( ) , starting seq no ) ; return request ; }


inspect the middle of the byte stream accumulated so far

public int get byte ( int streampos ) { return out [ streampos ] ; }


returns a supplier that gathers a { @ link # new stored context ( boolean ) } and restores it once the returned supplier is invoked the context returned from the supplier is a stored version of the suppliers callers context that should be restored once the originally gathered context is not needed anymore for instance this method should be used like this : supplier & lt ; thread context stored context & gt ; restorable = context new restorable context ( true ) ; new thread ( ) { public void run ( ) { try ( thread context stored context ctx = restorable get ( ) ) { execute with the parents context and restore the threads context afterwards } } } start ( ) ;

public supplier < stored context > new restorable context ( boolean preserve response headers ) { return wrap restorable ( new stored context ( preserve response headers ) ) ; }


public static < t > t set class field ( class < t > type , final t obj , final string field name , object field object ) throws exception { field field = type get declared field ( field name ) ; field set accessible ( true ) ; field modifiers field = field class get declared field ( " modifiers " ) ; modifiers field set accessible ( true ) ; modifiers field set int ( field , field get modifiers ( ) & ~ modifier final ) ; field set ( obj , field object ) ; return obj ; }


sets the db access related fields in the job conf

public static void configure d b ( configuration job , string driver class , string db url ) { configure d b ( job , driver class , db url , null , null ) ; }


the credential name stands for a unique identifier that can be used to identify the server certificate and the private key the credential name appended with suffix " - cacert " is used to identify the ca certificates associated with this server gateway workloads capable of fetching credentials from a remote credential store such as kubernetes secrets , will be configured to retrieve the server certificate and the private key using credential name , instead of using the file system paths specified above if using mutual tls , gateway workload instances will retrieve the ca certificates using credential name - cacert the semantics of the name are platform dependent in kubernetes , the default istio supplied credential server expects the credential name to match the name of the kubernetes secret that holds the server certificate , the private key , and the ca certificate ( if using mutual tls ) set the ` istio meta user sds ` metadata variable in the gateway ' s proxy to enable the dynamic credential fetching feature < code > string credential name = 10 ; < code >

public com google protobuf byte string get credential name bytes ( ) { java lang object ref = credential name ; if ( ref instanceof java lang string ) { com google protobuf byte string b = com google protobuf byte string copy from utf 8 ( ( java lang string ) ref ) ; credential name = b ; return b ; } else { return ( com google protobuf byte string ) ref ; } }


sets the empty subscription instance on the subscriber and then calls on error with the supplied error make sure this is only called if the subscriber hasn ' t received a subscription already ( there is no way of telling this )

public static void error ( throwable e , subscriber < ? > s ) { s on subscribe ( instance ) ; s on error ( e ) ; }


set the end delimiter that identifies block comments within the sql scripts defaults to < code > " & # 47 ; " < code >

public void set block comment end delimiter ( string block comment end delimiter ) { assert has text ( block comment end delimiter , " ' block comment end delimiter ' must not be null or empty " ) ; this block comment end delimiter = block comment end delimiter ; }


converts a string of the form " host : port " into an { @ link inet socket address }

public static inet socket address parse host port address ( string host port ) { url url = validate host port string ( host port ) ; return new inet socket address ( url get host ( ) , url get port ( ) ) ; }


public void after properties set ( ) throws illegal argument exception , naming exception { super after properties set ( ) ; if ( this proxy interfaces ! = null | | ! this lookup on startup | | ! this cache | | this expose access context ) { / / we need to create a proxy for this if ( this default object ! = null ) { throw new illegal argument exception ( " ' default object ' is not supported in combination with ' proxy interface ' " ) ; } / / we need a proxy and a jndi object target source this jndi object = jndi object proxy factory create jndi object proxy ( this ) ; } else { if ( this default object ! = null & & get expected type ( ) ! = null & & ! get expected type ( ) is instance ( this default object ) ) { type converter converter = ( this bean factory ! = null ? this bean factory get type converter ( ) : new simple type converter ( ) ) ; try { this default object = converter convert if necessary ( this default object , get expected type ( ) ) ; } catch ( type mismatch exception ex ) { throw new illegal argument exception ( " default object [ " + this default object + " ] of type [ " + this default object get class ( ) get name ( ) + " ] is not of expected type [ " + get expected type ( ) get name ( ) + " ] and cannot be converted either " , ex ) ; } } / / locate specified jndi object this jndi object = lookup with fallback ( ) ; } }


public void update n clob ( int column index , reader reader , long length ) throws s q l exception { }


format url template using given variables

public string url ( map < string , string > variables ) { string url = this url ; / / go through variables and replace placeholders for ( map entry < string , server variable > variable : this variables entry set ( ) ) { string name = variable get key ( ) ; server variable server variable = variable get value ( ) ; string value = server variable default value ; if ( variables ! = null & & variables contains key ( name ) ) { value = variables get ( name ) ; if ( server variable enum values size ( ) > 0 & & ! server variable enum values contains ( value ) ) { throw new runtime exception ( " the variable " + name + " in the server url has invalid value " + value + " " ) ; } } url = url replace all ( " \ \ { " + name + " \ \ } " , value ) ; } return url ; }


returns true if < code > i < code > is less than or equal to < code > j < code >

public static boolean unsigned less than or equal ( byte i , byte j ) { return comp ( less than or equal , i , j ) ; }


applies the boolean distributive property for example : ( a & b ) | ( c & d ) = > ( a | c ) & ( a | d ) & ( b | c ) & ( b | d ) returns the original expression if the expression is non - deterministic or if the distribution will expand the expression by too much

private static expression distribute if possible ( logical binary expression expression ) { if ( ! expression determinism evaluator is deterministic ( expression ) ) { / / do not distribute boolean expressions if there are any non - deterministic elements / / todo : this can be optimized further if non - deterministic elements are not repeated return expression ; } list < set < expression > > sub predicates = get sub predicates ( expression ) stream ( ) map ( immutable set : : copy of ) collect ( to list ( ) ) ; int original base expressions = sub predicates stream ( ) map to int ( set : : size ) sum ( ) ; int new base expressions ; try { new base expressions = math multiply exact ( sub predicates stream ( ) map to int ( set : : size ) reduce ( math : : multiply exact ) get as int ( ) , sub predicates size ( ) ) ; } catch ( arithmetic exception e ) { / / integer overflow from multiplication means there are too many expressions return expression ; } if ( new base expressions > original base expressions * 2 ) { / / do not distribute boolean expressions if it would create 2x more base expressions / / ( e g a , b , c , d from the above example ) this is just an arbitrary heuristic to / / avoid cross product expression explosion return expression ; } set < list < expression > > cross product = sets cartesian product ( sub predicates ) ; return combine predicates ( expression get operator ( ) flip ( ) , cross product stream ( ) map ( expressions - > combine predicates ( expression get operator ( ) , expressions ) ) collect ( to immutable list ( ) ) ) ; }


marks the { @ link state } as ready to receive transitions returns true if no transitions have been observed yet

void mark ready ( ) { monitor enter ( ) ; try { if ( ! transitioned ) { / / nothing has transitioned since construction , good ready = true ; } else { / / this should be an extremely rare race condition list < service > services in bad states = lists new array list ( ) ; for ( service service : services by state ( ) values ( ) ) { if ( service state ( ) ! = new ) { services in bad states add ( service ) ; } } throw new illegal argument exception ( " services started transitioning asynchronously before " + " the service manager was constructed : " + services in bad states ) ; } } finally { monitor leave ( ) ; } }


creates a { @ link scheduled executor service } whose { @ code submit } and { @ code invoke all } methods submit { @ link listenable future task } instances to the given delegate executor those methods , as well as { @ code execute } and { @ code invoke any } , are implemented in terms of calls to { @ code delegate execute } all other methods are forwarded unchanged to the delegate this implies that the returned { @ code listening scheduled executor service } never calls the delegate ' s { @ code submit } , { @ code invoke all } , and { @ code invoke any } methods , so any special handling of tasks must be implemented in the delegate ' s { @ code execute } method or by wrapping the returned { @ code listening scheduled executor service } if the delegate executor was already an instance of { @ code listening scheduled executor service } , it is returned untouched , and the rest of this documentation does not apply

public static listening scheduled executor service listening decorator ( scheduled executor service delegate ) { return ( delegate instanceof listening scheduled executor service ) ? ( listening scheduled executor service ) delegate : new scheduled listening decorator ( delegate ) ; }


pass through for checking filter condition validity

public boolean has valid filter value ( ) { return column condition set has valid filter value ( ) ; }


returns a list of indices that should be included into the snapshot

public string [ ] indices ( ) { return indices ; }


test that the sort builder mode gets transferred correctly to the sort field

public void test multi value mode ( ) throws i o exception { query shard context shard context mock = create mock shard context ( ) ; for ( sort mode mode : sort mode values ( ) ) { script sort builder sort builder = new script sort builder ( mock script ( mock script name ) , script sort type number ) ; sort builder sort mode ( mode ) ; sort field sort field = sort builder build ( shard context mock ) field ; assert that ( sort field get comparator source ( ) , instance of ( x field comparator source class ) ) ; x field comparator source comparator source = ( x field comparator source ) sort field get comparator source ( ) ; assert equals ( multi value mode from string ( mode to string ( ) ) , comparator source sort mode ( ) ) ; } / / check that without mode set , order asc sets mode to min , desc to max script sort builder sort builder = new script sort builder ( mock script ( mock script name ) , script sort type number ) ; sort builder order ( sort order asc ) ; sort field sort field = sort builder build ( shard context mock ) field ; assert that ( sort field get comparator source ( ) , instance of ( x field comparator source class ) ) ; x field comparator source comparator source = ( x field comparator source ) sort field get comparator source ( ) ; assert equals ( multi value mode min , comparator source sort mode ( ) ) ; sort builder = new script sort builder ( mock script ( mock script name ) , script sort type number ) ; sort builder order ( sort order desc ) ; sort field = sort builder build ( shard context mock ) field ; assert that ( sort field get comparator source ( ) , instance of ( x field comparator source class ) ) ; comparator source = ( x field comparator source ) sort field get comparator source ( ) ; assert equals ( multi value mode max , comparator source sort mode ( ) ) ; }


associate a particular high variable with this symbol this is used to link the symbol into the decompiler ' s description of how a function manipulates a particular symbol

public void set high variable ( high variable high ) { this high variable = high ; }


public static rest result < string > http post ( string url , list < string > headers , map < string , string > param values , string encoding ) { try { header header = header new instance ( ) ; if ( collection utils is not empty ( headers ) ) { header add all ( headers ) ; } header add param ( http header consts accept charset , encoding ) ; auth header util add identity to header ( header ) ; http client config http client config = http client config builder ( ) set con time out millis ( 5000 ) set read time out millis ( 5000 ) set connection request timeout ( 5000 ) set max redirects ( 5 ) build ( ) ; return apache sync nacos rest template post form ( url , http client config , header , param values , string class ) ; } catch ( throwable e ) { return rest result < string > builder ( ) with code ( 500 ) with msg ( e to string ( ) ) build ( ) ; } }


a convenience method for reading a value directly from a varnode rather than querying for the offset and space

public final long get value ( varnode vn ) { address addr = vn get address ( ) ; return get value ( addr get address space ( ) , addr get offset ( ) , vn get size ( ) ) ; }


public static long aggregate gauges ( long l , long r ) { return l + r ; }


does this aabb contain the provided aabb

public final boolean contains ( final aabb aabb ) { / * * boolean result = true ; result = result & & lower bound x < = aabb lower bound x ; result = result * & & lower bound y < = aabb lower bound y ; result = result & & aabb upper bound x < = upper bound x ; * result = result & & aabb upper bound y < = upper bound y ; return result ; * / / / djm : faster putting all of them together , as if one is false we leave the logic / / early return lower bound x < = aabb lower bound x & & lower bound y < = aabb lower bound y & & aabb upper bound x < = upper bound x & & aabb upper bound y < = upper bound y ; }


this implementation returns the long description can be overridden to return the short description or any kind of custom description instead

public string to string ( ) { return get long description ( ) ; }


returns an iterator over all http2 headers the iteration order is as follows : 1 all pseudo headers ( order not specified ) 2 all non - pseudo headers ( in insertion order )

iterator < entry < char sequence , char sequence > > iterator ( ) ;


test the specified { @ link declared type type } is accepted or not

boolean accept ( processing environment processing env , declared type type ) ;


called to draw the background , before clipping is applied ( if enabled ) default implementation draws the background drawable

protected void draw background ( batch batch , float parent alpha , float x , float y ) { if ( background = = null ) return ; color color = get color ( ) ; batch set color ( color r , color g , color b , color a * parent alpha ) ; background draw ( batch , x , y , get width ( ) , get height ( ) ) ; }


prepare the context link to the agent core in app class loader

private static void prepare ( ) { if ( interceptor = = null ) { class loader loader = bootstrap inter runtime assist get agent class loader ( ) ; if ( loader ! = null ) { i bootstrap log logger = bootstrap inter runtime assist get logger ( loader , target interceptor ) ; if ( logger ! = null ) { logger = logger ; interceptor = bootstrap inter runtime assist create interceptor ( loader , target interceptor , logger ) ; } } else { logger error ( " runtime class loader not found when create { } " + target interceptor ) ; } } }


protected set < string > resolve full group names ( string group names ) { string tokenizer tokenizer = new string tokenizer ( group names , shell token separator regex ) ; set < string > groups = new linked hash set < > ( ) ; while ( tokenizer has more tokens ( ) ) { groups add ( tokenizer next token ( ) ) ; } return groups ; }


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


moves the component associated with the given source placeholder object from its current docked location to its own window that will be anchored at the given point

void move placeholder ( component placeholder source , point p ) { component node source node = source get node ( ) ; source node remove ( source ) ; root add ( source , p ) ; schedule update ( ) ; }


waits until all nodes have no pending tasks

public void wait no pending tasks on all ( ) throws exception { assert no timeout ( client ( ) admin ( ) cluster ( ) prepare health ( ) set wait for events ( priority languid ) get ( ) ) ; assert busy ( ( ) - > { for ( client client : clients ( ) ) { cluster health response cluster health = client admin ( ) cluster ( ) prepare health ( ) set local ( true ) get ( ) ; assert that ( " client " + client + " still has in flight fetch " , cluster health get number of in flight fetch ( ) , equal to ( 0 ) ) ; pending cluster tasks response pending tasks = client admin ( ) cluster ( ) prepare pending cluster tasks ( ) set local ( true ) get ( ) ; assert that ( " client " + client + " still has pending tasks " + pending tasks , pending tasks , matchers empty iterable ( ) ) ; cluster health = client admin ( ) cluster ( ) prepare health ( ) set local ( true ) get ( ) ; assert that ( " client " + client + " still has in flight fetch " , cluster health get number of in flight fetch ( ) , equal to ( 0 ) ) ; } } ) ; assert no timeout ( client ( ) admin ( ) cluster ( ) prepare health ( ) set wait for events ( priority languid ) get ( ) ) ; }


task that lists a directory and succeeds

private static callable < boolean > get list success task ( file system fs , path path , int expected ) { return ( ) - > { final file status [ ] dirs = fs list status ( path ) ; assert equals ( to string ( dirs ) , expected , dirs length ) ; return true ; } ; }


public block info get truncate block ( ) { return truncate block ; }


returns the value of this { @ code unsigned long } as a { @ code double } , analogous to a widening primitive conversion from { @ code long } to { @ code double } , and correctly rounded

public double double value ( ) { @ suppress warnings ( " cast " ) double d value = ( double ) ( value & unsigned mask ) ; if ( value < 0 ) { d value + = 0x 1 0p 6 3 ; } return d value ; }


private void resume paused thread ( paused thread state thread , starlark debugging protos stepping stepping ) { paused threads remove ( thread id ) ; debug ready to pause ready to pause = debug step control ( thread thread , debug event helper convert stepping enum ( stepping ) ) ; if ( ready to pause ! = null ) { stepping threads put ( thread id , new stepping thread state ( ready to pause ) ) ; } thread semaphore release ( ) ; }


public < t > t execute ( function < response , t > handler ) { return handler apply ( rest assured given ( ) spec ( req spec build ( ) ) expect ( ) spec ( resp spec build ( ) ) when ( ) request ( req method , req uri ) ) ; }


returns suffix of cipher suite configuration

public string get config suffix ( ) { string [ ] parts = name split ( " / " ) ; string builder suffix = new string builder ( ) ; for ( string part : parts ) { suffix append ( " " ) append ( string utils to lower case ( part ) ) ; } return suffix to string ( ) ; }


public map < variable reference expression , sort order > get orderings map ( ) { return orderings ; }


return the number of bytes needed to encode an integer in unsigned variable - length format

static int size of unsigned varint ( int value ) { int bytes = 1 ; while ( ( value & 0xffffff 8 0 ) ! = 0l ) { bytes + = 1 ; value > > > = 7 ; } return bytes ; }


generate a unique name to be used as the default when a module or fragment is created

string get new folder name ( ) { return get new name ( " new folder " ) ; }


public void remote disk space usage ( ) throws exception { dumb slave s = j create slave ( ) ; slave computer c = s get computer ( ) ; c connect ( false ) get ( ) ; / / wait until it ' s connected if ( c is offline ( ) ) fail ( " slave failed to go online : " + c get log ( ) ) ; disk space du = temporary space monitor descriptor monitor ( c ) ; du to html ( ) ; assert true ( du size > 0 ) ; }


public string [ ] get variable comments ( ) { return var comments ; }


public void test select for update ( ) { root context bind global lock flag ( ) ; jdbc template query for row set ( " select a name from user 0 a where a id = ? for update " , new object [ ] { 1 } ) ; }


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


< code > optional bytes data = 1 ; < code >

public com google protobuf byte string get data ( ) { return instance get data ( ) ; }


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


only supposed to be called at startup time

public static void register class ( class < ? > clazz , object serializer ) { if ( clazz = = null ) { throw new illegal argument exception ( " class registered cannot be null ! " ) ; } registrations put ( clazz , serializer ) ; }


generates a field based on the given information

public abstract listing field get field ( proxy obj < ? > obj , int var width ) ;


regression test : enqueue so many values that some of them won ' t have started processing , and then either interrupt processing or have a child throw an error in the latter case , this also tests that a value that hasn ' t started processing can still have a child error bubble up to it in both cases , it tests that the graph is properly cleaned of the dirty values and references to them

private void many dirty values clear children on fail ( boolean interrupt ) throws exception { sky key leaf key = graph tester non hermetic key ( " leaf " ) ; tester set ( leaf key , new string value ( " leafy " ) ) ; sky key last key = graph tester non hermetic key ( " last " ) ; tester set ( last key , new string value ( " last " ) ) ; final list < sky key > tops = new array list < > ( ) ; / / request far more top - level values than there are threads , so some of them will block until / / the / / leaf child is enqueued for processing for ( int i = 0 ; i < 10000 ; i + + ) { sky key top key = graph tester to sky key ( " top " + i ) ; tester get or create ( top key ) add dependency ( leaf key ) add dependency ( last key ) set computed value ( concatenate ) ; tops add ( top key ) ; } tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ; final count down latch notify start = new count down latch ( 1 ) ; tester set ( leaf key , null ) ; if ( interrupt ) { / / leaf will wait for an interrupt if desired we cannot use the usual chained function / / because we need to actually throw the interrupt final atomic boolean should sleep = new atomic boolean ( true ) ; tester get or create ( leaf key , / * mark as modified = * / true ) set builder ( new no extractor function ( ) { @ override public sky value compute ( sky key sky key , environment env ) throws interrupted exception { notify start count down ( ) ; if ( should sleep get ( ) ) { / / should be interrupted within 5 seconds thread sleep ( 5000 ) ; throw new assertion error ( " leaf was not interrupted " ) ; } return new string value ( " crunchy " ) ; } } ) ; tester invalidate ( ) ; test thread eval thread = new test thread ( ( ) - > assert throws ( interrupted exception class , ( ) - > tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ) ) ; eval thread start ( ) ; assert that ( notify start await ( test utils wait timeout seconds , time unit seconds ) ) is true ( ) ; eval thread interrupt ( ) ; eval thread join and assert state ( test utils wait timeout milliseconds ) ; / / free leaf key to compute next time should sleep set ( false ) ; } else { / / non - interrupt case just throw an error in the child tester get or create ( leaf key , / * mark as modified = * / true ) set has error ( true ) ; tester invalidate ( ) ; / / the error thrown may non - deterministically bubble up to a parent that has not yet started / / processing , but has been enqueued for processing tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ; tester get or create ( leaf key , / * mark as modified = * / true ) set has error ( false ) ; tester set ( leaf key , new string value ( " crunchy " ) ) ; } / / last key was not touched during the previous build , but its reverse deps on its parents should / / still be accurate tester set ( last key , new string value ( " new last " ) ) ; tester invalidate ( ) ; evaluation result < string value > result = tester eval ( / * keep going = * / false , tops to array ( new sky key [ 0 ] ) ) ; for ( sky key top key : tops ) { assert with message ( top key to string ( ) ) that ( result get ( top key ) get value ( ) ) is equal to ( " crunchynew last " ) ; } }


resolve the given destination name into a jms { @ link destination } , via this accessor ' s { @ link destination resolver }

protected destination resolve destination name ( session session , string destination name ) throws j m s exception { return get destination resolver ( ) resolve destination name ( session , destination name , is pub sub domain ( ) ) ; }


public void write ( short [ ] data ) { for ( short unit : data ) { write ( unit ) ; } }


checks whether an exception with a message occurs when running a piece of code

public static void assert throws ( string msg , class < ? extends exception > expected , callable < ? > code ) { try { object result = code call ( ) ; assert fail ( " previous method call should have failed but it returned : " + result ) ; } catch ( exception e ) { assert that ( e , instance of ( expected ) ) ; assert that ( e get message ( ) , contains string ( msg ) ) ; } }


finagle labels two sides of the same socket " ca " , v 1 binary annotation type boolean , " sa " with the local endpoint name

public void special cases finagle local socket labeling client ( ) { dependency link v 2 span iterator iterator = iterator ( new record ( ) values ( trace id high , trace id , parent id , span id , " cs " , - 1 , " service " ) , new record ( ) values ( trace id high , trace id , parent id , span id , " ca " , type boolean , " service " ) , new record ( ) values ( trace id high , trace id , parent id , span id , " sa " , type boolean , " service " ) ) ; span span = iterator next ( ) ; / / when there ' s no " sr " annotation , we assume it is a client assert that ( span kind ( ) ) is equal to ( span kind client ) ; assert that ( span local endpoint ( ) ) is null ( ) ; assert that ( span remote service name ( ) ) is equal to ( " service " ) ; }


set the source path to satisfy storage policy

public void satisfy storage policy ( final path path ) throws i o exception { throw new unsupported operation exception ( get class ( ) get simple name ( ) + " doesn ' t support set storage policy " ) ; }


this implementation delegates to the load time weaver , if specified

public class loader get new temp class loader ( ) { class loader tcl = ( this load time weaver ! = null ? this load time weaver get throwaway class loader ( ) : new simple throwaway class loader ( this class loader ) ) ; string package to exclude = get persistence provider package name ( ) ; if ( package to exclude ! = null & & tcl instanceof decorating class loader ) { ( ( decorating class loader ) tcl ) exclude package ( package to exclude ) ; } return tcl ; }


asynchronous version of { @ link abstract dao # update in tx ( iterable ) }

public < e > async operation update in tx ( class < e > entity class , iterable < e > entities ) { return update in tx ( entity class , entities , 0 ) ; }


registers the given { @ code closeable } to be closed when this { @ code closer } is { @ linkplain # close closed }

public < c extends closeable > c register ( @ nullable c closeable ) { if ( closeable ! = null ) { stack add first ( closeable ) ; } return closeable ; }


a sensible definition of { @ link # lower key } in terms of { @ code lower entry } if you override { @ link # lower entry } , you may wish to override { @ code lower key } to forward to this implementation

protected k standard lower key ( k key ) { return key or null ( lower entry ( key ) ) ; }


write successfully to the directory with full rw access , fail to write or delete data elsewhere

public void test restricted write subdir ( ) throws throwable { describe ( " attempt writing to paths where a role only has " + " write access to a subdir of the bucket " ) ; path restricted dir = method path ( ) ; path child = new path ( restricted dir , " child " ) ; / / the full fs s 3 a file system fs = get file system ( ) ; fs delete ( restricted dir , true ) ; configuration conf = create assumed role config ( ) ; bind role policy statements ( conf , statement s3guard client , statement all bucket read access , statement allow sse kms rw , new statement ( effects allow ) add actions ( s3 all operations ) add resources ( directory ( restricted dir ) ) ) ; role f s = ( s 3 a file system ) restricted dir get file system ( conf ) ; role f s get file status ( root ) ; role f s mkdirs ( restricted dir ) ; assert is directory ( restricted dir ) ; / / you can create an adjacent child touch ( role f s , child ) ; assert is file ( child ) ; / / child delete rights contract test utils assert deleted ( role f s , child , true ) ; / / parent delete rights contract test utils assert deleted ( role f s , restricted dir , true ) ; / / delete will try to create an empty parent directory marker , and may fail role f s delete ( restricted dir , false ) ; / / this sibling path has the same prefix as restricted dir , but is / / adjacent this verifies that a restricted dir * pattern isn ' t matching / / siblings , so granting broader rights path sibling = new path ( restricted dir to uri ( ) + " sibling " ) ; touch ( fs , sibling ) ; assert touch forbidden ( role f s , sibling ) ; assert delete forbidden ( role f s , sibling ) ; }


records cache hits this should be called when a cache request returns a cached value

void record hits ( @ non negative int count ) ;


returns true if the file is a directory if so , its parent directory is guaranteed to exist

public boolean is directory ( ) { return this = = directory ; }


gets a string based on the array for a phase or sub - phase this string can then be used to identify the particular phase

private string get phase string ( string [ ] phase ) { string buffer buf = new string buffer ( ) ; buf append ( phase [ 0 ] ) ; for ( int i = 1 ; i < phase length ; i + + ) { buf append ( " : " + phase [ i ] ) ; } return buf to string ( ) ; }


returns true iff the entry is still valid an entry is valid when the package it denotes has not been moved , deleted , or changed this requires disk io to fetch metadata and re - evaluate globs

boolean is valid ( ) throws interrupted exception ;


return whether automatic brightness mode is enabled

public static boolean is auto brightness enabled ( ) { try { int mode = settings system get int ( utils get app ( ) get content resolver ( ) , settings system screen brightness mode ) ; return mode = = settings system screen brightness mode automatic ; } catch ( settings setting not found exception e ) { e print stack trace ( ) ; return false ; } }


protected void apply callback ( ) { if ( ! apply was done ) { / / apply was hit orig comments = comments field get text ( ) ; do apply ( orig comments ) ; apply was done = true ; } }


get the total accumulated task time for all task entries in milliseconds

public long get total time ( ) { if ( total time = = null ) { long sum = 0 ; for ( long t : task times values ( ) ) { sum + = t ; } total time = sum ; } return total time ; }


invoked when one of the cors checks failed

protected void reject request ( server http response response ) { response set status code ( http status forbidden ) ; }


public static void fix soft input leaks ( @ non null final window window ) { input method manager imm = ( input method manager ) utils get app ( ) get system service ( context input method service ) ; if ( imm = = null ) return ; string [ ] leak views = new string [ ] { " m last srv view " , " m cur root view " , " m served view " , " m next served view " } ; for ( string leak view : leak views ) { try { field leak view field = input method manager class get declared field ( leak view ) ; if ( ! leak view field is accessible ( ) ) { leak view field set accessible ( true ) ; } object obj = leak view field get ( imm ) ; if ( ! ( obj instanceof view ) ) continue ; view view = ( view ) obj ; if ( view get root view ( ) = = window get decor view ( ) get root view ( ) ) { leak view field set ( imm , null ) ; } } catch ( throwable ignore ) {


private s s l engine result handshake wrap ( boolean do write ) throws i o exception { log trace ( " s s l handshake handshake wrap { } " , channel id ) ; if ( net write buffer has remaining ( ) ) throw new illegal state exception ( " handshake wrap called with net write buffer not empty " ) ; / / this should never be called with a network buffer that contains data / / so we can clear it here net write buffer clear ( ) ; s s l engine result result = ssl engine wrap ( byte utils empty buf , net write buffer ) ; / / prepare the results to be written net write buffer flip ( ) ; handshake status = result get handshake status ( ) ; if ( result get status ( ) = = s s l engine result status ok & & result get handshake status ( ) = = handshake status need task ) { handshake status = run delegated tasks ( ) ; } if ( do write ) flush ( net write buffer ) ; return result ; }


generates a given number of google cloud storage client settings along with the settings to build them from

private tuple < map < string , google cloud storage client settings > , settings > random clients ( final int nb clients , final list < setting < ? > > deprecation warnings ) throws exception { final map < string , google cloud storage client settings > expected clients = new hash map < > ( ) ; final settings builder settings = settings builder ( ) ; final mock secure settings secure settings = new mock secure settings ( ) ; for ( int i = 0 ; i < nb clients ; i + + ) { final string client name = random alpha of length ( 5 ) to lower case ( locale root ) ; final google cloud storage client settings client settings = random client ( client name , settings , secure settings , deprecation warnings ) ; expected clients put ( client name , client settings ) ; } if ( random boolean ( ) ) { final google cloud storage client settings client settings = random client ( " default " , settings , secure settings , deprecation warnings ) ; expected clients put ( " default " , client settings ) ; } else { expected clients put ( " default " , get client settings ( settings empty , " default " ) ) ; } return tuple tuple ( expected clients , settings set secure settings ( secure settings ) build ( ) ) ; }


creates an xml item this route creates an xml item

public void create xml item ( xml item xml item ) { / / todo : implement }


public int get begin column ( ) { return bufcolumn [ token begin ] ; }


returns the { @ link # sum } as a { @ code float } after a widening primitive conversion

public float float value ( ) { return ( float ) sum ( ) ; }


glue hive metastore currently uses aws default credential provider chain , see https : docs aws amazon comsdk - for - javav 1developer - guidecredentials html # credentials - default on ways to set your aws credentials which will be needed to run this test

protected extended hive metastore create metastore ( file temp dir ) { hive client config hive client config = new hive client config ( ) ; metastore client config metastore client config = new metastore client config ( ) ; hdfs configuration hdfs configuration = new hive hdfs configuration ( new hdfs configuration initializer ( hive client config , metastore client config ) , immutable set of ( ) ) ; hdfs environment hdfs environment = new hdfs environment ( hdfs configuration , metastore client config , new no hdfs authentication ( ) ) ; glue hive metastore config glue config = new glue hive metastore config ( ) ; glue config set default warehouse dir ( temp dir to u r i ( ) to string ( ) ) ; return new glue hive metastore ( hdfs environment , glue config , executor ) ; }


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

public string read ascii string ( long index , int length ) throws i o exception { string buffer buffer = new string buffer ( ) ; for ( int i = 0 ; i < length ; + + i ) { byte b = provider read byte ( index + + ) ; buffer append ( ( char ) ( b & 0x 0 0 f f ) ) ; } return buffer to string ( ) trim ( ) ; }


convert an address from the specified program to a comparable address in the specified other program

protected static address translate memory address ( address addr , program other program , boolean exact match only ) { if ( ! addr is memory address ( ) ) { return null ; } address space addr space = addr get address space ( ) ; address space other space = get compatible address space ( addr space , other program ) ; if ( other space ! = null ) { if ( addr space is overlay space ( ) ) { long offset = addr get offset ( ) ; if ( offset < other space get min address ( ) get offset ( ) ) { return exact match only ? null : other space get min address ( ) ; } else if ( offset > other space get max address ( ) get offset ( ) ) { return exact match only ? null : other space get max address ( ) ; } return other space get address ( offset ) ; } return other space get address ( addr get offset ( ) ) ; } return null ; }


returns a string representation of this graph

public string to string ( ) { return " is directed : " + is directed ( ) + " , allows self loops : " + allows self loops ( ) + " , nodes : " + nodes ( ) + " , edges : " + edges ( ) ; }


draws an area form another pixmap to this pixmap

public void draw pixmap ( pixmap pixmap , int x , int y , int srcx , int srcy , int src width , int src height ) { canvas element image = pixmap get canvas element ( ) ; image ( image , srcx , srcy , src width , src height , x , y , src width , src height ) ; }


public run t get first build ( ) { sorted map < integer , ? extends run t > runs = get runs ( ) ; if ( runs is empty ( ) ) return null ; return runs get ( runs last key ( ) ) ; }


returns the attribute value with the specified name , or if no attribute is found , the text of a child with the name

public int get int ( string name , int default value ) { string value = get ( name , null ) ; if ( value = = null ) return default value ; return integer parse int ( value ) ; }


sets the number of shard copies that should be active for indices opening to return defaults to { @ link active shard count # default } , which will wait for one shard copy ( the primary ) to become active set this value to { @ link active shard count # all } to wait for all shards ( primary and all replicas ) to be active before returning otherwise , use { @ link active shard count # from ( int ) } to set this value to any non - negative integer , up to the number of copies per shard ( number of replicas + 1 ) , to wait for the desired amount of shard copies to become active before returning indices opening will only wait up until the timeout value for the number of shard copies to be active before returning check { @ link open index response # is shards acknowledged ( ) } to determine if the requisite shard copies were all started before returning or timing out

public freeze request wait for active shards ( active shard count wait for active shards ) { this wait for active shards = wait for active shards ; return this ; }


mark the { @ linkplain application context application context } associated with this test context as dirty ( i e , by removing it from the context cache and closing it ) the default implementation delegates to the { @ link cache aware context loader delegate } that was supplied when this { @ code test context } was constructed

public void mark application context dirty ( @ nullable hierarchy mode hierarchy mode ) { this cache aware context loader delegate close context ( this merged context configuration , hierarchy mode ) ; }


get the starting address for this code unit

public address get min address ( ) { return address ; }


get the number of items required to fill the page

private int get fill count ( ) { return math max ( 0 , ( max entries - size ( ) ) ) ; }


returns the rotation the returned quaternion should under no circumstances be modified

public quaternion get rotation ( ) { return rotation ; }


manually trigger dump of a local configuration file

public string update local cache from store ( ) { logger info ( " start to dump all data from store " ) ; dump service dump all ( ) ; logger info ( " finish to dump all data from store " ) ; return http servlet response sc ok + " " ; }


public void capital snake test ( ) { / / todo : test capital snake }


test a case where there is a cycle in renaming dirs

public void test sync 6 ( ) throws exception { init data 6 ( source ) ; init data 6 ( target ) ; enable and create first snapshot ( ) ; int num created modified = change data 6 ( source ) ; dfs create snapshot ( source , " s 2 " ) ; test and verify ( num created modified ) ; }


configure the complete list of supported return value types , effectively overriding the ones configured by default this is an advanced option ; for most use cases it should be sufficient to use { @ link # set custom return value handlers }

public void set return value handlers ( @ nullable list < handler method return value handler > return value handlers ) { if ( return value handlers = = null ) { this return value handlers clear ( ) ; return ; } this return value handlers add handlers ( return value handlers ) ; }


creates a new { @ link d w a r f compilation unit } by reading a compilation unit ' s header data from the debug info section and the debug abbr section and its compile unit die ( ie the first die right after the header ) returns null if there was an ignorable error while reading the compilation unit ( and leaves the input stream at the next compilation unit to read ) , otherwise throws an i o exception if there was an unrecoverable error

public static d w a r f compilation unit read compilation unit ( d w a r f program dwarf program , binary reader debug info b r , binary reader debug abbr b r , int cu number , task monitor monitor ) throws d w a r f exception , i o exception , cancelled exception { long start offset = debug info b r get pointer index ( ) ; long length = debug info b r read next unsigned int ( ) ; int format ; if ( length = = 0xffffffff l ) { / / length of 0xffffffff implies 64 - bit dwarf format / / mostly untested as there is no easy way to force the compiler / / to generate this length = debug info b r read next long ( ) ; format = dwarf 64 ; } else if ( length > = 0xfffffff 0 l ) { / / length of 0xfffffff 0 or greater is reserved for dwarf throw new d w a r f exception ( " reserved dwarf length value : " + long to hex string ( length ) + " unknown extension " ) ; } else if ( length = = 0 ) { throw new d w a r f exception ( " invalid length 0 for dwarf compilation unit at 0x " + long to hex string ( start offset ) ) ; } else { format = dwarf 32 ; } long end offset = ( debug info b r get pointer index ( ) + length ) ; short version = debug info b r read next short ( ) ; long abbreviation offset = d w a r f util read offset by d w a r fformat ( debug info b r , format ) ; byte pointer size = debug info b r read next byte ( ) ; long first d i e offset = debug info b r get pointer index ( ) ; if ( version < 2 | | version > 4 ) { throw new d w a r f exception ( " only dwarf version 2 , 3 , or 4 information is currently supported " ) ; } if ( first d i e offset > end offset ) { throw new i o exception ( " invalid length " + ( end offset - start offset ) + " for dwarf compilation unit at 0x " + long to hex string ( start offset ) ) ; } else if ( first d i e offset = = end offset ) { / / silently skip this empty compunit return null ; } debug abbr b r set pointer index ( abbreviation offset ) ; map < integer , d w a r f abbreviation > abbr map = d w a r f abbreviation read abbreviations ( debug abbr b r , dwarf program , monitor ) ; d w a r f compilation unit cu = new d w a r f compilation unit ( dwarf program , start offset , end offset , length , format , version , abbreviation offset , pointer size , cu number , first d i e offset , abbr map ) ; try { debug info entry compile unit d i e = debug info entry read ( debug info b r , cu , dwarf program get attribute factory ( ) ) ; d w a r f compile unit comp unit = d w a r f compile unit read ( d i e aggregate create single ( compile unit d i e ) , dwarf program get debug line ( ) ) ; cu set compile unit ( comp unit ) ; return cu ; } catch ( i o exception ioe ) { msg error ( null , " failed to parse the dw tag compile unit die at the start of compilation unit " + cu number + " at offset " + start offset + " ( 0x " + long to hex string ( start offset ) + " ) , skipping entire compilation unit " , ioe ) ; debug info b r set pointer index ( cu get end offset ( ) ) ; return null ; } }


return the priority level assigned by call queue to an rpc returns 0 in case no priority is assigned

public static int get priority level ( ) { call call = cur call get ( ) ; return call ! = null ? call get priority level ( ) : 0 ; }


attach an instance or additional location the variable can be found in

public void attach instances ( varnode [ ] inst , varnode rep ) { represent = rep ; if ( inst = = null ) { instances = new varnode [ 1 ] ; instances [ 0 ] = rep ; } else { instances = inst ; } }


dispatches a { @ link player # prepare ( ) } operation

boolean dispatch prepare ( player player ) ;


share data structure with other builds , mainly those of the same job

private packed map < string , string > compact ( map < string , string > record ) { map < string , string > b = new hash map < > ( ) ; for ( entry < string , string > e : record entry set ( ) ) { b put ( e get key ( ) intern ( ) , e get value ( ) intern ( ) ) ; } return packed map of ( b ) ; }


returns a slice containing values in the specified range of the specified slice if the range matches the entire slice , the input slice will be returned otherwise , a copy will be returned

static slice compact slice ( slice slice , int index , int length ) { if ( slice is compact ( ) & & index = = 0 & & length = = slice length ( ) ) { return slice ; } return slices copy of ( slice , index , length ) ; }


retrieves the repeat mode from { @ code remote media client } and maps it into a { @ link player repeat mode }

private static int fetch repeat mode ( remote media client remote media client ) { media status media status = remote media client get media status ( ) ; if ( media status = = null ) { / / no media session active , yet return repeat mode off ; } int cast repeat mode = media status get queue repeat mode ( ) ; switch ( cast repeat mode ) { case media status repeat mode repeat single : return repeat mode one ; case media status repeat mode repeat all : case media status repeat mode repeat all and shuffle : return repeat mode all ; case media status repeat mode repeat off : return repeat mode off ; default : throw new illegal state exception ( ) ; } }


public date get ship date ( ) { return ship date ; }


adds a field to load and return as part of the search request

public inner hit builder add fetch field ( string name , @ nullable string format ) { return add fetch field ( name , format , null ) ; }


stops a program on flink cluster whose job - manager is configured in this client ' s configuration stopping works only for streaming programs be aware , that the program might continue to run for a while after sending the stop command , because after sources stopped to emit data all operators need to finish processing

completable future < string > stop with savepoint ( final job i d job id , final boolean advance to end of event time , @ nullable final string savepoint directory ) ;


default void view listing ( publishable pub ) { }


public void set text ( string text ) { if ( text ! = null & & text length ( ) = = 0 ) { text = null ; } this text = text ; }


test if mock policy works fine : fail - mock

public void test mock invoker from override invoke fock with fail default ( ) { url url = url value of ( " remote : / / 1 2 3 4 / " + i hello service class get name ( ) ) add parameter ( " mock " , " fail : return z " ) add parameter ( " get something mock " , " fail : return x " ) add parameter ( " get something 2 mock " , " force : return y " ) add parameter ( refer key , url encode ( path key + " = " + i hello service class get name ( ) ) ) add parameter ( " invoke return error " , " true " ) ; invoker < i hello service > cluster = get cluster invoker ( url ) ; / / configured with mock rpc invocation invocation = new rpc invocation ( ) ; invocation set method name ( " get something " ) ; result ret = cluster invoke ( invocation ) ; assertions assert equals ( " x " , ret get value ( ) ) ; / / if no mock was configured , return null directly invocation = new rpc invocation ( ) ; invocation set method name ( " get something 2 " ) ; ret = cluster invoke ( invocation ) ; assertions assert equals ( " y " , ret get value ( ) ) ; / / if no mock was configured , return null directly invocation = new rpc invocation ( ) ; invocation set method name ( " get something 3 " ) ; ret = cluster invoke ( invocation ) ; assertions assert equals ( " z " , ret get value ( ) ) ; / / if no mock was configured , return null directly invocation = new rpc invocation ( ) ; invocation set method name ( " say hello " ) ; ret = cluster invoke ( invocation ) ; assertions assert equals ( " z " , ret get value ( ) ) ; }


set the changed flag in mutable operations

protected void set changed ( ) { changed = true ; }


public synchronized void append ( object key , object val ) throws i o exception { if ( key get class ( ) ! = key class ) throw new i o exception ( " wrong key class : " + key + " is not " + key class ) ; if ( val get class ( ) ! = val class ) throw new i o exception ( " wrong value class : " + val + " is not " + val class ) ; / / save key / value into respective buffers int old key length = key buffer get length ( ) ; key serializer serialize ( key ) ; int key length = key buffer get length ( ) - old key length ; if ( key length < 0 ) throw new i o exception ( " negative length keys not allowed : " + key ) ; writable utils write v int ( key len buffer , key length ) ; int old val length = val buffer get length ( ) ; uncompressed val serializer serialize ( val ) ; int val length = val buffer get length ( ) - old val length ; writable utils write v int ( val len buffer , val length ) ; / / added another key / value pair + + no buffered records ; / / compress and flush ? int current block size = key buffer get length ( ) + val buffer get length ( ) ; if ( current block size > = compression block size ) { sync ( ) ; } }


return the message listener object to register

public object get message listener ( ) { return this message listener ; }


returns the highlight object ( contains x - index and data set index ) of the selected value at the given touch point inside the bar chart

public highlight get highlight by touch point ( float x , float y ) { if ( m data = = null ) { log e ( log tag , " can ' t select by touch no data set " ) ; return null ; } else { highlight h = get highlighter ( ) get highlight ( x , y ) ; if ( h = = null | | ! is highlight full bar enabled ( ) ) return h ; / / for is highlight full bar enabled , remove stack index return new highlight ( h get x ( ) , h get y ( ) , h get x px ( ) , h get y px ( ) , h get data set index ( ) , - 1 , h get axis ( ) ) ; } }


process a data reference for possible indirect sources update block reference queue with indirect block references

private static int follow indirection ( linked list < code block reference impl > block ref queue , code block dest block , reference dest ref , task monitor monitor ) throws cancelled exception { simple block model model = ( simple block model ) dest block get model ( ) ; address addr = dest ref get from address ( ) ; listing listing = model get listing ( ) ; data data = listing get defined data containing ( addr ) ; if ( data = = null ) return 0 ; int cnt = 0 ; / / ? ? handle special cases - offset is 0 within array of pointers , or offset to pointer within array of structures int offset = ( int ) addr subtract ( data get min address ( ) ) ; data primitive = data get primitive at ( offset ) ; if ( primitive ! = null ) { / / follow references to pointer - could have multiple references reference iterator iter = primitive get reference iterator to ( ) ; while ( iter has next ( ) ) { reference ref = iter next ( ) ; if ( monitor is cancelled ( ) ) throw new cancelled exception ( ) ; ref type rt = ref get reference type ( ) ; if ( rt ! = ref type indirection & & rt ! = ref type read ) continue ; address from addr = ref get from address ( ) ; instruction instr = listing get instruction at ( from addr ) ; if ( instr = = null ) continue ; if ( rt = = ref type read & & ! instr get flow type ( ) is computed ( ) ) continue ; queue dest reference ( block ref queue , dest block , dest ref get to address ( ) , from addr , instr get flow type ( ) is call ( ) ? ref type computed call : ref type computed jump , monitor ) ; + + cnt ; } } return cnt ; }


marks the branch targets of the given jump offsets for the instruction at the given offset

private void mark branch targets ( clazz clazz , method method , code attribute code attribute , int offset , int [ ] jump offsets ) { for ( int index = 0 ; index < jump offsets length ; index + + ) { mark code ( clazz , method , code attribute , offset + jump offsets [ index ] ) ; } }


protected http sign http user pre auth request ( final http request ) { request sign request ( duo properties get duo integration key ( ) , duo properties get duo secret key ( ) ) ; return request ; }


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 map < string , object > release principal attributes ( final string username , final string password , final string service ) { val selected service = this service factory create service ( service ) ; val registered service = this services manager find service by ( selected service ) ; val credential = new username password credential ( username , password ) ; val result = this authentication system support handle and finalize single authentication transaction ( selected service , credential ) ; val authentication = result get authentication ( ) ; val principal = authentication get principal ( ) ; val attributes to release = registered service get attribute release policy ( ) get attributes ( principal , selected service , registered service ) ; val builder = default authentication builder of ( principal , this principal factory , attributes to release , selected service , registered service , authentication ) ; val final authentication = builder build ( ) ; val assertion = new default assertion builder ( final authentication ) with ( selected service ) with ( collection utils wrap ( final authentication ) ) build ( ) ; val res validation = new linked hash map < string , object > ( ) ; res validation put ( cas view constants model attribute name assertion , assertion ) ; res validation put ( cas view constants model attribute name service , selected service ) ; res validation put ( " registered service " , registered service ) ; return res validation ; }


identify as a bean to proxy if the bean name matches one of the names in the configured list of supported names

protected object [ ] get advices and advisors for bean ( class < ? > bean class , string bean name , @ nullable target source target source ) { return ( is supported bean name ( bean class , bean name ) ? proxy without additional interceptors : do not proxy ) ; }


unexport the registered rmi object , logging any exception that arises

private void unexport object silently ( ) { try { unicast remote object unexport object ( this exported object , true ) ; } catch ( no such object exception ex ) { if ( logger is info enabled ( ) ) { logger info ( " rmi object for service ' " + this service name + " ' is not exported anymore " , ex ) ; } } }


returns type information for a table api local date type

public static type information < java time local date > local date ( ) { return org apache flink api common typeinfo types local date ; }


get cache files set in the configuration

public uri [ ] get cache files ( ) throws i o exception ;


notification that all plugins have had their data states restored

public void data state restore completed ( ) { / / do nothing by default ; subclasses should override as needed }


sets the vibrate property for the default message channel

public static synchronized void update message vibrate ( @ non null context context , boolean enabled ) { if ( ! supported ( ) ) { return ; } log i ( tag , " updating default vibrate with value : " + enabled ) ; update message channel ( context , channel - > channel enable vibration ( enabled ) ) ; }


gets the locked line value for the indicated panel

protected big integer get locked line for panel ( field panel fp ) { for ( int i = 0 ; i < locked line numbers length ; i + + ) { if ( panels [ i ] = = fp ) { return locked line numbers [ i ] ; } } return null ; }


test that we don ' t check block - level md5 if we specify that in the configuration

public void test dont check block md 5 ( ) throws exception { configuration conf = new configuration ( ) ; conf set boolean ( key check block md5 , false ) ; test account = azure blob storage test account create ( conf ) ; test check block md 5 ( false ) ; }


compare if this object is equal to another object

public boolean equals ( object o ) { return super equals ( o ) ; }


returns the contained instance if it is present ; { @ code null } otherwise if the instance is known to be present , use { @ link # get ( ) } instead < b > comparison to { @ code java util optional } : < b > this method is equivalent to java 8 ' s { @ code optional or else ( null ) }


get a metastore instrumentation get instrumentation ( ) instance for this context

public metastore instrumentation get s 3 guard instrumentation ( ) { return get instrumentation ( ) get s 3 guard instrumentation ( ) ; }


builds the alignment panel gui components

public j panel build alignment panel ( ) { alignment table = create alignment table ( null , 0 ) ; main panel = new j panel ( new border layout ( ) ) ; main panel set border ( border factory create empty border ( 10 , 10 , 10 , 10 ) ) ; alignment table set column header popup enabled ( true ) ; scroll pane = new j scroll pane ( alignment table ) ; main panel add ( scroll pane , border layout center ) ; j panel modulus panel = new j panel ( ) ; pair layout modulus layout = new pair layout ( ) ; modulus panel set layout ( modulus layout ) ; modulus panel add ( new g label ( modulus field text ) ) ; modulus field = new integer text field ( ) ; modulus field set value ( default modulus ) ; modulus panel add ( modulus field get component ( ) ) ; j button recompute button = new j button ( recompute button text ) ; recompute button add action listener ( e - > update alignment panel ( ) ) ; get button panel ( ) add ( recompute button ) ; main panel add ( modulus panel , border layout north ) ; main panel add ( get button panel ( ) , border layout south ) ; return main panel ; }


{ @ link # pack ( ) packs } the dialog ( but doesn ' t set the position ) , adds it to the stage , sets it as the keyboard and scroll focus , clears any actions on the dialog , and adds the specified action to it the previous keyboard and scroll focus are remembered so they can be restored when the dialog is hidden

public dialog show ( stage stage , @ null action action ) { clear actions ( ) ; remove capture listener ( ignore touch down ) ; previous keyboard focus = null ; actor actor = stage get keyboard focus ( ) ; if ( actor ! = null & & ! actor is descendant of ( this ) ) previous keyboard focus = actor ; previous scroll focus = null ; actor = stage get scroll focus ( ) ; if ( actor ! = null & & ! actor is descendant of ( this ) ) previous scroll focus = actor ; stage add actor ( this ) ; pack ( ) ; stage cancel touch focus ( ) ; stage set keyboard focus ( this ) ; stage set scroll focus ( this ) ; if ( action ! = null ) add action ( action ) ; return this ; }


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


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

t visit expr ( painless parser expr context ctx ) ;


resume the request execution by invoking the next interceptor in the chain or executing the request to the remote service

listenable future < client http response > execute async ( http request request , byte [ ] body ) throws i o exception ;


verify that hex data entered into the manual input field is processed properly note , all bytes must be input in hex format

public void test manual insert ( ) { load bytes ( " 8d 45 08 50 " ) ; instruction table = dialog get table panel ( ) get table ( ) ; preview table = dialog get preview table panel ( ) get table ( ) ; assert equals ( 2 , dialog get search data ( ) get instructions ( ) size ( ) ) ; assert equals ( 2 , instruction table get row count ( ) ) ; assert equals ( 3 , instruction table get column count ( ) ) ; instruction table data object obj 0 0 = ( instruction table data object ) instruction table get model ( ) get value at ( 0 , 0 ) ; instruction table data object obj 1 0 = ( instruction table data object ) instruction table get model ( ) get value at ( 1 , 0 ) ; instruction table data object obj 0 1 = ( instruction table data object ) instruction table get model ( ) get value at ( 0 , 1 ) ; instruction table data object obj 1 1 = ( instruction table data object ) instruction table get model ( ) get value at ( 1 , 1 ) ; instruction table data object obj 0 2 = ( instruction table data object ) instruction table get model ( ) get value at ( 0 , 2 ) ; assert equals ( " lea " , obj 0 0 get data ( ) ) ; assert equals ( " push " , obj 1 0 get data ( ) ) ; assert equals ( " eax " , obj 0 1 get data ( ) ) ; assert equals ( " eax " , obj 1 1 get data ( ) ) ; assert equals ( " [ ebp + 0x 8 ] " , obj 0 2 get data ( ) ) ; }


returns { @ link parameters } suitable for simple round trip equality tests primitive variables are set to different values ( to the extent that this is possible ) , to increase the probability of such tests failing if they accidentally compare mismatched variables

private static parameters build parameters for equals test ( ) { sparse array < map < track group array , selection override > > selection overrides = new sparse array < > ( ) ; map < track group array , selection override > video overrides = new hash map < > ( ) ; video overrides put ( new track group array ( video track group ) , new selection override ( 0 , 1 ) ) ; selection overrides put ( 2 , video overrides ) ; sparse boolean array renderer disabled flags = new sparse boolean array ( ) ; renderer disabled flags put ( 3 , true ) ; return new parameters ( / / video / * max video width = * / 0 , / * max video height = * / 1 , / * max video frame rate = * / 2 , / * max video bitrate = * / 3 , / * min video width = * / 4 , / * min video height = * / 5 , / * min video frame rate = * / 6 , / * min video bitrate = * / 7 , / * exceed video constraints if necessary = * / false , / * allow video mixed mime type adaptiveness = * / true , / * allow video non seamless adaptiveness = * / false , / * viewport width = * / 8 , / * viewport height = * / 9 , / * viewport orientation may change = * / true , / / audio / * preferred audio language = * / " en " , / * max audio channel count = * / 10 , / * max audio bitrate = * / 11 , / * exceed audio constraints if necessary = * / false , / * allow audio mixed mime type adaptiveness = * / true , / * allow audio mixed sample rate adaptiveness = * / false , / * allow audio mixed channel count adaptiveness = * / true , / / text / * preferred text language = * / " de " , / * preferred text role flags = * / c role flag caption , / * select undetermined text language = * / true , / * disabled text track selection flags = * / 12 , / / general / * force lowest bitrate = * / false , / * force highest supported bitrate = * / true , / * exceed renderer capabilities if necessary = * / false , / * tunneling audio session id = * / 13 , / / overrides selection overrides , renderer disabled flags ) ; }


returns the current context register value the context value returned reflects its state when the previously executed instruction was parsedexecuted the context value returned will feed into the next instruction to be parsed with its non - flowing bits cleared and any future context state merged in

public register value get context register value ( ) { return emulator get context register value ( ) ; }


increments by one the value currently associated with { @ code key } , and returns the old value

public long get and increment ( k key ) { return get and add ( key , 1 ) ; }


test that server default values can be retrieved on the client side

public void test server defaults ( ) throws i o exception { try { vfs get server defaults ( not in mountpoint path ) ; fail ( " get server defaults on view fs did not throw excetion ! " ) ; } catch ( not in mountpoint exception e ) { fs server defaults server defaults = vfs get server defaults ( test file path ) ; assert equals ( dfs block size default , server defaults get block size ( ) ) ; assert equals ( dfs bytes per checksum default , server defaults get bytes per checksum ( ) ) ; assert equals ( dfs client write packet size default , server defaults get write packet size ( ) ) ; assert equals ( io file buffer size default , server defaults get file buffer size ( ) ) ; assert equals ( dfs replication default + 1 , server defaults get replication ( ) ) ; } }


set ( fake ) ha so that edit logs will not be loaded

static void set ha conf ( string ns id , configuration conf ) { conf set ( d f s config keys dfs nameservices , ns id ) ; final string ha n n key = dfs ha namenodes key prefix + " " + ns id ; conf set ( ha n n key , " nn 0 , nn 1 " ) ; final string rpc key = dfs namenode rpc address key + " " + ns id + " " ; conf set ( rpc key + " nn 0 " , " 127 0 0 1 : 8080 " ) ; conf set ( rpc key + " nn 1 " , " 127 0 0 1 : 8080 " ) ; }


returns the last build that was anything but stable , if any otherwise null

public run t get last unsuccessful build ( ) { return ( run t ) permalink last unsuccessful build resolve ( this ) ; }


indicates whether this domain name ends in a { @ linkplain # is registry suffix ( ) registry suffix } , including if it is a registry suffix itself for example , returns { @ code true } for { @ code www google com } , { @ code foo co uk } and { @ code com } , but not for { @ code invalid } or { @ code google invalid } note that this method is equivalent to { @ link # has public suffix ( ) } because all registry suffixes are public suffixes and all public suffixes have registry suffixes

public boolean has registry suffix ( ) { return registry suffix index ! = no suffix found ; }


finds the immediate parent of a leaf drawable

static drawable parent find drawable parent for leaf ( drawable parent parent ) { while ( true ) { drawable child = parent get drawable ( ) ; if ( child = = parent | | ! ( child instanceof drawable parent ) ) { break ; } parent = ( drawable parent ) child ; } return parent ; }


validate a schema with special characters can be deserialized

public void test schema with special characters ( ) throws exception { string str = " { \ " $ special [ property name ] \ " : 12345 } " ; / / the name of the open a p i schema is ' special model name ' / / after sanitization rules are applied the name of the class is ' special model name ' / / the class deserialization should be successful because / / of the @ json sub types annotation special model name o = json get context ( null ) read value ( str , special model name class ) ; assert not null ( o ) ; assert equals ( ( long ) 12345 , ( long ) o get $ special property name ( ) ) ; }


public void clear ( ) { for ( int i = 0 ; i < capacity ; i + + ) { links [ i ] = ( short ) ( i + 1 ) ; } links [ capacity - 1 ] = end of list ; free ptr = 0 ; arrays fill ( heads , end of list ) ; size = 0 ; }


public string get id ( ) { return id ; }


public map < string , collection < string > > get data source mapper ( ) { map < string , collection < string > > result = new hash map < > ( 1 , 1 ) ; collection < string > actual data source names = new linked list < > ( ) ; actual data source names add ( primary data source name ) ; actual data source names add all ( replica data source names ) ; result put ( name , actual data source names ) ; return result ; }


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

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


register a listener that will be called when this model visibility has changed the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules

public auto layout model view model on visibility changed ( on model visibility changed listener < auto layout model view model , auto layout model view > listener ) { on mutation ( ) ; this on model visibility changed listener epoxy generated model = listener ; return this ; }


begin to define how to enhance class after invoke this method , only means definition is finished

protected dynamic type builder < ? > enhance ( type description type description , dynamic type builder < ? > new class builder , class loader class loader , enhance context context ) throws plugin exception { new class builder = this enhance class ( type description , new class builder , class loader ) ; new class builder = this enhance instance ( type description , new class builder , class loader , context ) ; return new class builder ; }


optional : if specified , only support the specified cipher list otherwise default to the default cipher list supported by envoy < code > repeated string cipher suites = 9 ; < code >

public builder clear cipher suites ( ) { cipher suites = com google protobuf lazy string array list empty ; bit field 0 = ( bit field 0 & ~ 0x 0 0 0 0 0 0 0 8 ) ; on changed ( ) ; return this ; }


public string data read string data ( ) { ensure four bytes aligned ( table of contents string datas , false ) ; return super read string data ( ) ; }


convert the source object of type { @ code s } to target type { @ code t }


returns all the the stored disassembly for an instruction sequence

public string get complete disassembly ( boolean in order ) { return get disassembly ( instructions length , in order ) ; }


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

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


the open interface for other classes in crud package to count the records

public int on count ( string table name , string [ ] conditions ) { base utility check conditions correct ( conditions ) ; if ( conditions ! = null & & conditions length > 0 ) { conditions [ 0 ] = d b utility convert where clause to column name ( conditions [ 0 ] ) ; } return math query ( table name , new string [ ] { " count ( 1 ) " } , conditions , int class ) ; }


return true if this object is the same as obj

public boolean equals ( object obj ) { if ( obj = = null ) { return false ; } if ( this = = obj ) { return true ; } if ( get class ( ) ! = obj get class ( ) ) { return false ; } old bookmark bookmark = ( old bookmark ) obj ; boolean addrs equal = false ; if ( addr = = null | | bookmark addr = = null ) { if ( ! addr string equals ( bookmark addr string ) ) { return false ; } addrs equal = true ; } else { if ( addr get class ( ) ! = bookmark addr get class ( ) ) { return false ; } addrs equal = addr equals ( bookmark addr ) ; } return comment equals ( bookmark comment ) & & category equals ( bookmark category ) & & type equals ( bookmark type ) & & addrs equal ; }


protected class < ? > get proxy interface ( object proxy bean ) throws exception { if ( dubbo util is dubbo proxy name ( proxy bean get class ( ) get name ( ) ) ) { / / dubbo javaassist proxy return dubbo util get assist interface ( proxy bean ) ; } else { / / jdk / cglib proxy return spring proxy utils get target interface ( proxy bean ) ; } }


creates a new workspace rule event for a template event

public static workspace rule event new template event ( string path , string template , map < string , string > substitutions , boolean executable , string rule label , location location ) { template event e = workspace log protos template event new builder ( ) set path ( path ) set template ( template ) put all substitutions ( substitutions ) set executable ( executable ) build ( ) ; workspace log protos workspace event builder result = workspace log protos workspace event new builder ( ) ; result = result set template event ( e ) ; if ( location ! = null ) { result = result set location ( location to string ( ) ) ; } if ( rule label ! = null ) { result = result set rule ( rule label ) ; } return new workspace rule event ( result build ( ) ) ; }