searches the specified list for the specified object using the binary search algorithm the list must be sorted into ascending order according to the specified comparator ( as by the { @ link collections # sort ( list , comparator ) collections sort ( list , comparator ) } method ) , prior to making this call if it is not sorted , the results are undefined if there are elements in the list which compare as equal to the key , the choice of { @ link key present behavior } decides which index is returned if no elements compare as equal to the key , the choice of { @ link key absent behavior } decides which index is returned this method runs in log ( n ) time on random - access lists , which offer near - constant - time access to each list element

public static < e > int binary search ( list < ? extends e > list , @ nullable e key , comparator < ? super e > comparator , key present behavior present behavior , key absent behavior absent behavior ) { check not null ( comparator ) ; check not null ( list ) ; check not null ( present behavior ) ; check not null ( absent behavior ) ; if ( ! ( list instanceof random access ) ) { list = lists new array list ( list ) ; } / / todo ( lowasser ) : benchmark when it ' s best to do a linear search int lower = 0 ; int upper = list size ( ) - 1 ; while ( lower < = upper ) { int middle = ( lower + upper ) > > > 1 ; int c = comparator compare ( key , list get ( middle ) ) ; if ( c < 0 ) { upper = middle - 1 ; } else if ( c > 0 ) { lower = middle + 1 ; } else { return lower + present behavior result index ( comparator , key , list sub list ( lower , upper + 1 ) , middle - lower ) ; } } return absent behavior result index ( lower ) ; }


public static byte [ ] read file 2 bytes by map ( final string file path ) { return read file 2 bytes by map ( utils bridge get file by path ( file path ) ) ; }


sets the document to index in bytes form ( assumed to be safe to be used from different threads )

public index request source ( byte [ ] source , int offset , int length , x content type x content type ) { return source ( new bytes array ( source , offset , length ) , x content type ) ; }


register a listener that will be called when this model is unbound from a view the listener will contribute to this model ' s hash code state per the { @ link com airbnb epoxy epoxy attribute option # do not hash } rules you may clear the listener by setting a null value , or by calling { @ link # reset ( ) }

public model with annotated class on unbind ( on model unbound listener < model with annotated class , object > listener ) { on mutation ( ) ; this on model unbound listener epoxy generated model = listener ; return this ; }


protected void create remember me authn webflow config ( final flow flow ) { if ( cas properties get ticket ( ) get tgt ( ) get remember me ( ) is enabled ( ) ) { create flow variable ( flow , cas webflow constants var id credential , remember me username password credential class ) ; val state = get state ( flow , cas webflow constants state id view login form , view state class ) ; val cfg = get view state binder configuration ( state ) ; cfg add binding ( new binder configuration binding ( " remember me " , null , false ) ) ; } else { create flow variable ( flow , cas webflow constants var id credential , username password credential class ) ; } }


set the timeout for reads from this stream note : the behavior here can differ subtly depending on whether the underlying socket has an associated channel in particular , if there is no channel , then this call will affect the socket timeout for all readers of this socket if there is a channel , then this call will affect the timeout only for this stream as such , it is recommended to only create one { @ link socket input wrapper } instance per socket

public void set timeout ( long timeout ms ) throws socket exception { if ( has channel ) { ( ( socket input stream ) in ) set timeout ( timeout ms ) ; } else { socket set so timeout ( ( int ) timeout ms ) ; } }


returns a { @ link request options } object with { @ link # skip memory cache ( boolean ) } set

public static request options skip memory cache of ( boolean skip memory cache ) { if ( skip memory cache ) { if ( skip memory cache true options = = null ) { skip memory cache true options = new request options ( ) skip memory cache ( true ) auto clone ( ) ; } return skip memory cache true options ; } else { if ( skip memory cache false options = = null ) { skip memory cache false options = new request options ( ) skip memory cache ( false ) auto clone ( ) ; } return skip memory cache false options ; } }


makes sure that { @ link alternative ui text provider } actually works with a parameterized job

public void basics with parameter ( ) throws exception { impl oldschool = false ; free style project p = j create free style project ( " aaa " ) ; p add property ( new parameters definition property ( new string parameter definition ( " foo " , null ) ) ) ; string page text = j create web client ( ) get page ( p ) as text ( ) ; assert that ( page text , contains string ( " newschool : aaa " ) ) ; impl oldschool = true ; page text = j create web client ( ) get page ( p ) as text ( ) ; assert that ( page text , contains string ( " oldschool : aaa " ) ) ; }


the filesystem path to where the source file originated mainly used to display helpful error messages < code > optional string source path = 3 ; < code >

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


public void set gravity scale ( float gravity scale ) { this m gravity scale = gravity scale ; }


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


public static < t > t not null ( t obj , string name ) { if ( obj = = null ) { throw new illegal argument exception ( name + " cannot be null " ) ; } return obj ; }


protected void build entity criteria for signing credential ( final request abstract type profile request , final criteria set criteria set ) { criteria set add ( new entity id criterion ( saml id p utils get issuer from saml object ( profile request ) ) ) ; criteria set add ( new entity role criterion ( s p s s o descriptor default element name ) ) ; }


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


public kerberos principal get kerberos principal ( ) { return kerberos principal ; }


removes relocation source of an initializing non - primary shard this allows the replica shard to continue recovery from the primary even though its non - primary relocation source has failed

private shard routing remove relocation source ( shard routing shard ) { assert shard is relocation target ( ) : " only relocation target shards can have their relocation source removed ( " + shard + " ) " ; shard routing relocation marker removed = shard remove relocation source ( ) ; update assigned ( shard , relocation marker removed ) ; inactive shard count + + ; / / relocation targets are not counted as inactive shards whereas initializing shards are return relocation marker removed ; }


get all disabled { @ linkplain exporter config } s

public collection < exporter config > get disabled exporter configs ( ) { return disabled exporter configs get ( ) values ( ) ; }


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


constructs an empty { @ code linked hash multimap } with enough capacity to hold the specified numbers of keys and values without rehashing

public static < k , v > linked hash multimap < k , v > create ( int expected keys , int expected values per key ) { return new linked hash multimap < > ( maps capacity ( expected keys ) , maps capacity ( expected values per key ) ) ; }


private void run ( ) { / / this will contain the definition specs for each parameter final register spec [ ] param specs = new register spec [ ssa meth get param width ( ) ] ; / / insns to delete when all done final hash set < ssa insn > deleted insns = new hash set ( ) ; ssa meth for each insn ( new ssa insn visitor ( ) { public void visit move insn ( normal ssa insn insn ) { } public void visit phi insn ( phi insn phi ) { } public void visit non move insn ( normal ssa insn insn ) { if ( insn get opcode ( ) get opcode ( ) ! = reg ops move param ) { return ; } int param = get param index ( insn ) ; if ( param specs [ param ] = = null ) { param specs [ param ] = insn get result ( ) ; } else { final register spec spec a = param specs [ param ] ; final register spec spec b = insn get result ( ) ; local item local a = spec a get local item ( ) ; local item local b = spec b get local item ( ) ; local item new local ; / * * is there local information to preserve ? * / if ( local a = = null ) { new local = local b ; } else if ( local b = = null ) { new local = local a ; } else if ( local a equals ( local b ) ) { new local = local a ; } else { / * * oddly , these two identical move - params have distinct * debug info we ' ll just keep them distinct * / return ; } ssa meth get definition for register ( spec a get reg ( ) ) set result local ( new local ) ; / * * map all uses of spec b to spec a * / register mapper mapper = new register mapper ( ) { / * * @ inherit doc * / public int get new register count ( ) { return ssa meth get reg count ( ) ; } / * * @ inherit doc * / public register spec map ( register spec register spec ) { if ( register spec get reg ( ) = = spec b get reg ( ) ) { return spec a ; } return register spec ; } } ; list < ssa insn > uses = ssa meth get use list for register ( spec b get reg ( ) ) ; / / use list is modified by map source registers for ( int i = uses size ( ) - 1 ; i > = 0 ; i - - ) { ssa insn use = uses get ( i ) ; use map source registers ( mapper ) ; } deleted insns add ( insn ) ; } } } ) ; ssa meth delete insns ( deleted insns ) ; }


return the compressed data using quality

public static byte [ ] compress by quality ( final bitmap src , final long max byte size ) { return compress by quality ( src , max byte size , false ) ; }


create a query for matching indexed ip ranges that { @ code intersect } the defined range

public static query new intersects query ( string field , byte [ ] encoded range ) { return new relation query ( field , encoded range , range field query query type intersects ) ; }


returns the member specification instances currently represented in this panel , referring to fields or to methods

public list get member specifications ( boolean is field ) { int size = list model size ( ) ; if ( size = = 0 ) { return null ; } list member specifications = new array list ( size ) ; for ( int index = 0 ; index < size ; index + + ) { my member specification wrapper wrapper = ( my member specification wrapper ) list model get ( index ) ; if ( wrapper is field = = is field ) { member specifications add ( wrapper member specification ) ; } } return member specifications ; }


resets variables maintaining the sum to zero this method may be a useful alternative to creating a new adder , but is only effective if there are no concurrent updates because this method is intrinsically racy , it should only be used when it is known that no threads are concurrently updating

public void reset ( ) { internal reset ( 0l ) ; }


main entry point runs the class via the { @ link tool runner } , then exits with an appropriate exit code

public static void main ( string [ ] args ) { try { int result = tool runner run ( new find class ( ) , args ) ; system exit ( result ) ; } catch ( exception e ) { print stack ( e , " running find class " ) ; system exit ( e generic ) ; } }


public api response < model api response > upload file with http info ( long pet id , string additional metadata , file file ) throws api exception { okhttp 3 call local var call = upload file validate before call ( pet id , additional metadata , file , null ) ; type local var return type = new type token < model api response > ( ) { } get type ( ) ; return local var api client execute ( local var call , local var return type ) ; }


ensure that all end of superstep event related methods throw an exception when used with a non - iterative reader

public void test exceptions non iterative reader ( ) throws exception { final abstract reader reader = new mock reader ( create input gate ( 4 ) ) ; / / non - iterative reader cannot reach end of superstep assert false ( reader has reached end of superstep ( ) ) ; try { reader start next superstep ( ) ; fail ( " did not throw expected exception when starting next superstep with non - iterative reader " ) ; } catch ( throwable t ) { / / all good , expected exception } try { reader handle event ( end of superstep event instance ) ; fail ( " did not throw expected exception when handling end of superstep event with non - iterative reader " ) ; } catch ( throwable t ) { / / all good , expected exception } }


encode the given uri user info with the given encoding

public static string encode user info ( string user info , string encoding ) { return encode ( user info , encoding , hierarchical uri components type user info ) ; }


given a class , determine if it is flaky

public static boolean is flaky ( class < ? > clazz ) { return get annotation element or default ( clazz , " flaky " ) ; }


tests that if an index structure creation fails on relocation to a new node , the shard is not stuck but properly failed

public void test index shard failed on relocation ( ) throws throwable { string node 1 = internal cluster ( ) start node ( ) ; client ( ) admin ( ) indices ( ) prepare create ( " index 1 " ) set settings ( settings builder ( ) put ( setting number of shards , 1 ) put ( setting number of replicas , 0 ) ) get ( ) ; ensure green ( " index 1 " ) ; string node 2 = internal cluster ( ) start node ( ) ; internal cluster ( ) get instance ( mock index event listener test event listener class , node 2 ) set new delegate ( new index shard state change listener ( ) { @ override public void before index created ( index index , settings index settings ) { throw new runtime exception ( " fail " ) ; } } ) ; client ( ) admin ( ) cluster ( ) prepare reroute ( ) add ( new move allocation command ( " index 1 " , 0 , node 1 , node 2 ) ) get ( ) ; ensure green ( " index 1 " ) ; cluster state state = client ( ) admin ( ) cluster ( ) prepare state ( ) get ( ) get state ( ) ; list < shard routing > shard = state get routing nodes ( ) shards with state ( shard routing state started ) ; assert that ( shard , has size ( 1 ) ) ; assert that ( state nodes ( ) resolve node ( shard get ( 0 ) current node id ( ) ) get name ( ) , matchers equal to ( node 1 ) ) ; }


performs single argument substitution for the ' message pattern ' passed as parameter < p > for example , < p > message formatter format ( & quot ; hi { } & quot ; , & quot ; there & quot ; ) ; < p > will return the string " hi there " < p >

static formatting tuple format ( string message pattern , object arg ) { return array format ( message pattern , new object [ ] { arg } ) ; }


return a hash code derived from the { @ code name } property of this { @ code property source } object

public int hash code ( ) { return object utils null safe hash code ( get name ( ) ) ; }


this is populated when the previous incremental mesh config responses failed to update configuration the message field in error details provides the client internal exception related to the failure < code > google rpc status error detail = 5 ; < code >

public boolean has error detail ( ) { return error detail ! = null ; }


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

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


asks the camera hardware to begin drawing preview frames to the screen

public synchronized void start preview ( ) { open camera the camera = camera ; if ( the camera ! = null & & ! previewing ) { the camera get camera ( ) start preview ( ) ; previewing = true ; auto focus manager = new auto focus manager ( context , the camera get camera ( ) ) ; } }


note that this is just a basic check whether the file is zlib compressed other checks ( e g the magic bytes of the binary profile file ) are done later

private static boolean is old binary profile ( file profile ) { try ( input stream input stream = new file input stream ( profile ) ) { byte [ ] magic bytes = new byte [ 2 ] ; int num bytes read = input stream read ( magic bytes ) ; if ( num bytes read = = 2 & & magic bytes [ 0 ] = = ( byte ) 0x 7 8 & & ( magic bytes [ 1 ] = = ( byte ) 0x 0 1 | | magic bytes [ 1 ] = = ( byte ) 0x 9 c | | magic bytes [ 1 ] = = ( byte ) 0x d a ) ) { return true ; } } catch ( exception e ) { / / silently ignore any exception } return false ; }


creates a { @ link org apache http protocol http request executor } intended for use by subclasses to provide a customized request executor the default implementation is an { @ link com codahale metrics httpclient instrumented http request executor }

protected http request executor create request executor ( string name ) { return new instrumented http request executor ( metric registry , metric name strategy , name ) ; }


implementations of { @ link # compute next } < b > must < b > invoke this method when there are no elements left in the iteration

protected final t end of data ( ) { state = state done ; return null ; }


public static funnel < long > long funnel ( ) { return long funnel instance ; }


sets a new { @ link render tree host } which should render the next { @ link render tree } using the { @ link # render with render tree host ( ) } method

public render core test rule use render tree host ( render tree host render tree host ) { this render tree host = render tree host ; check render tree host ( ) ; context = ( ( view ) render tree host ) get context ( ) ; return this ; }


when set code factor alue equal or smaller than 1 , get value in sentinel config cold factor ( ) will return default cold factor see { @ link sentinel config # cold factor ( ) }

public void test cold factor equal or smaller than one ( ) { sentinel config set config ( sentinel config cold factor , " 0 5 " ) ; assert equals ( sentinel config default cold factor , sentinel config cold factor ( ) ) ; sentinel config set config ( sentinel config cold factor , " 1 " ) ; assert equals ( sentinel config default cold factor , sentinel config cold factor ( ) ) ; }


returns a configured s s l server socket factory

public s s l server socket factory create s s l server socket factory ( ) throws general security exception , i o exception { if ( mode ! = mode server ) { throw new illegal state exception ( " factory is not in server mode actual mode is " + mode to string ( ) ) ; } return context get server socket factory ( ) ; }


test the property ' prefix namespace integer '

public void prefix namespace integer test ( ) { / / todo : test prefix namespace integer }


return a future which succeeds only if all the alter configs operations succeed

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


creates a tags list field to be show at the beginning of each function that shows the tags assigned to that function

protected list < field element > create function tag elements ( function d b function ) { collection < string > tag names = get tags ( function ) ; if ( tag names = = null | | tag names is empty ( ) ) { return null ; } array list < field element > text elements = new array list < > ( ) ; attributed string as ; int element index = 0 ; as = new attributed string ( " tags : " , literal color , get metrics ( ) ) ; text elements add ( new text field element ( as , element index + + , 0 ) ) ; string tag names str = string utils join ( tag names , " , " ) ; as = new attributed string ( tag names str , color , get metrics ( ) ) ; text elements add ( new text field element ( as , element index + + , 0 ) ) ; return text elements ; }


returns < code > true < code > iff nodes have been added from the cluster since the last cluster state

public boolean nodes added ( ) { return nodes delta added ( ) ; }


set the jdbc url to use for connecting through the driver

public void set url ( @ nullable string url ) { this url = ( url ! = null ? url trim ( ) : null ) ; }


returns the number of bytes corresponding to the provided input for a particular unit of memory

public double to bytes ( final long input ) { double bytes ; switch ( this ) { case bytes : bytes = input ; break ; case kilobytes : bytes = input * bytes per kilobyte ; break ; case megabytes : bytes = input * bytes per kilobyte * kilobytes per megabyte ; break ; case gigabytes : bytes = input * bytes per kilobyte * kilobytes per megabyte * megabytes per gigabyte ; break ; default : throw new runtime exception ( " no value ' " + this + " ' recognized for enum memory unit " ) ; } return bytes ; }


variant of { @ link # to entity ( class ) } with a { @ link parameterized type reference }

< t > mono < response entity < list < t > > > to entity list ( parameterized type reference < t > element type ref ) ;


create an button that has an icon created from the given image file

public static j button create image button ( string image file , string alternate text , dimension preferred size ) { image icon button icon = resource manager load image ( image file ) ; return create image button ( button icon , alternate text , preferred size ) ; }


checks whether the first configuration is equal to or a subset of the second by calling the configuration comparer

private configuration comparer result compare configurations ( configuration t left , configuration t right ) { return configuration comparer apply ( left , right ) ; }


creates a view of the event dispatcher with pre - configured window index , media period id , and media time offset

public event dispatcher with parameters ( int window index , @ nullable media period id media period id , long media time offset ms ) { return new event dispatcher ( listener and handlers , window index , media period id , media time offset ms ) ; }


public static cluster health status read from ( stream input in ) throws i o exception { byte value = in read byte ( ) ; switch ( value ) { case 0 : return green ; case 1 : return yellow ; case 2 : return red ; default : throw new illegal argument exception ( " no cluster health status for value [ " + value + " ] " ) ; } }


public void set permission ( path p , fs permission permission ) throws i o exception { if ( native i o is available ( ) ) { native i o posix chmod ( path to file ( p ) get canonical path ( ) , permission to short ( ) ) ; } else { string perm = string format ( " % 0 4o " , permission to short ( ) ) ; shell exec command ( shell get set permission command ( perm , false , file util make shell path ( path to file ( p ) , true ) ) ) ; } }


get a string parameter , or { @ code null } if not present

public static string get string parameter ( servlet request request , string name ) throws servlet request binding exception { if ( request get parameter ( name ) = = null ) { return null ; } return get required string parameter ( request , name ) ; }


verifies that s 3 : delete object version is not required for rename see hadoop - 17621 this test will only show a regression if the bucket has versioning enabled and s 3 guard is enabled

public void test rename permission requirements ( ) throws throwable { describe ( " verify rename ( ) only needs s 3 : delete object permission " ) ; / / close the existing role f s i o utils cleanup with logger ( log , role f s ) ; / / create an assumed role config which doesn ' t have / / s 3 : delete object version permission , and attempt rename / / and then delete configuration role config = create assumed role config ( ) ; bind role policy statements ( role config , statement s3guard client , statement allow sse kms rw , statement all bucket read access , / / root : r - x new statement ( effects allow ) / / dest : rwx add actions ( s3 path rw operations ) add resources ( directory ( base path ) ) , new statement ( effects deny ) add actions ( s3 delete object version ) add resources ( directory ( base path ) ) ) ; role f s = ( s 3 a file system ) base path get file system ( role config ) ; path src dir = new path ( base path , " src " ) ; path dest dir = new path ( base path , " dest " ) ; role f s mkdirs ( src dir ) ; / / the role fs has everything but that delete object version permission , so / / must be able to create files list < path > created files = create files ( role f s , src dir , dir depth , file count , dir count ) ; role f s rename ( src dir , dest dir ) ; role f s rename ( dest dir , src dir ) ; role f s delete ( src dir , true ) ; }


build cookie header keeps a single value per cookie ( as per < a href = " https : tools ietf orghtmlrfc 6 2 6 5 # section - 5 3 " > rfc6265 section 5 3 )

private string build cookie header ( multi value map < string , string > cookies ) { final string builder cookie value = new string builder ( ) ; string delimiter = " " ; for ( final map entry < string , list < string > > entry : cookies entry set ( ) ) { final string value = entry get value ( ) get ( entry get value ( ) size ( ) - 1 ) ; cookie value append ( string format ( " % s % s = % s " , delimiter , entry get key ( ) , value ) ) ; delimiter = " ; " ; } return cookie value to string ( ) ; }


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


public static string get o s s access key ( ) { if ( access key ! = null ) { return access key ; } else { throw new illegal state exception ( " oss access key is not available " ) ; } }


all of the infrastructure of split and split to string is identical , so we do one test of split to string all other cases should be covered by testing of split todo ( user ) : it would be good to make all the relevant tests run on both split and split to string automatically

public void test character simple split to list ( ) { string simple = " a , b , c " ; list < string > letters = comma splitter split to list ( simple ) ; assert that ( letters ) contains exactly ( " a " , " b " , " c " ) in order ( ) ; }


begins a new object container to finish the object call { @ link # pop ( ) }

public u b json writer object ( ) throws i o exception { if ( current ! = null ) { if ( ! current array ) { if ( ! named ) throw new illegal state exception ( " name must be set " ) ; named = false ; } } stack add ( current = new json object ( false ) ) ; return this ; }


removes and return the { @ link response context } for the given request id or returns < code > null < code > if no context is associated with this request id

public response context < ? extends transport response > remove ( long request id ) { return handlers remove ( request id ) ; }


public void write ( data output out ) throws i o exception { jobid write ( out ) ; }


set the ip address that spark should listen on if not called the default address is ' 0 0 0 0 ' this has to be called before any route mapping is done

public static void set ip address ( string ip address ) { get instance ( ) ip address ( ip address ) ; }


public static void put ( @ non null final string key , final string value , final int save time , @ non null final cache double utils cache double utils ) { cache double utils put ( key , value , save time ) ; }


get storeinventory : returns pet inventories by status returns a map of status codes to quantities

default response entity < map < string , integer > > get inventory ( ) { return new response entity < > ( http status not implemented ) ; }


query that the state is in a specific state

public boolean is in state ( service state proposed ) { return state equals ( proposed ) ; }


allows for special handling for ignored missing placeholders that may be resolved elsewhere

boolean should remove missing placeholder ( string placeholder name ) ;


set the jndi template to use for jndi lookups

public void set jndi template ( jndi template jndi template ) { this jndi locator set jndi template ( jndi template ) ; }


public void test resilience to filesystem inconsistencies directory existence ( ) throws exception { / / our custom filesystem says " pkg path / build " exists but " pkg path " does not exist fs stub stat ( pkg path , null ) ; rooted path pkg rooted path = rooted path to rooted path ( root from path ( root ) , pkg path ) ; file state value pkg dir file state value = file state value create ( pkg rooted path , null ) ; file value pkg dir value = file value value ( immutable list of ( pkg rooted path ) , null , null , pkg rooted path , pkg dir file state value , pkg rooted path , pkg dir file state value ) ; differencer inject ( immutable map of ( file value key ( pkg rooted path ) , pkg dir value ) ) ; string expected message = " / root / workspace / pkg is no longer an existing directory " ; sky key sky key = glob value key ( pkg id , root from path ( root ) , " * / foo " , false , path fragment empty fragment ) ; evaluation result < glob value > result = driver evaluate ( immutable list of ( sky key ) , evaluation options ) ; assert that ( result has error ( ) ) is true ( ) ; error info error info = result get error ( sky key ) ; assert that ( error info get exception ( ) ) is instance of ( inconsistent filesystem exception class ) ; assert that ( error info get exception ( ) ) has message that ( ) contains ( expected message ) ; }


marks task execution failed for an external reason ( a reason other than the task code itself throwing an exception ) if the task is already in a terminal state ( such as finished , canceled , failed ) , or if the task is already canceling this does nothing otherwise it sets the state to failed , and , if the invokable code is running , starts an asynchronous thread that aborts that code this method never blocks

public void fail externally ( throwable cause ) { log info ( " attempting to fail task externally { } ( { } ) " , task name with subtask , execution id ) ; cancel or fail and cancel invokable ( execution state failed , cause ) ; }


visit all nodes in the given node so that all nodes representing modules are fully populated

private void visit all nodes ( program node node ) { if ( ! node is module ( ) ) { return ; } visit node ( node ) ; int nchild = node get child count ( ) ; for ( int i = 0 ; i < nchild ; i + + ) { program node child = ( program node ) node get child at ( i ) ; visit all nodes ( child ) ; } }


sets the action for which to discover inputs

public builder set action ( action action ) { this action = action ; return this ; }


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

public static long from bytes ( byte b 1 , byte b 2 , byte b 3 , byte b 4 , byte b 5 , byte b 6 , byte b 7 , byte b 8 ) { return ( b 1 & 0x f f l ) < < 56 | ( b 2 & 0x f f l ) < < 48 | ( b 3 & 0x f f l ) < < 40 | ( b 4 & 0x f f l ) < < 32 | ( b 5 & 0x f f l ) < < 24 | ( b 6 & 0x f f l ) < < 16 | ( b 7 & 0x f f l ) < < 8 | ( b 8 & 0x f f l ) ; }


test low - level failure handling with low level delete request

public void test multi object delete no permissions ( ) throws throwable { describe ( " delete the landsat csv file and expect it to fail " ) ; path csv path = maybe get csv path ( ) ; s 3 a file system fs = ( s 3 a file system ) csv path get file system ( get configuration ( ) ) ; list < delete objects request key version > keys = build delete request ( new string [ ] { fs path to key ( csv path ) , " missing - key csv " } ) ; multi object delete exception ex = intercept ( multi object delete exception class , ( ) - > fs remove keys ( keys , false , null ) ) ; final list < path > undeleted = extract undeleted paths ( ex , fs : : key to qualified path ) ; string undeleted files = join ( undeleted ) ; fail if ( undeleted size ( ) ! = 2 , " undeleted list size wrong : " + undeleted files , ex ) ; assert true ( " no csv in " + undeleted files , undeleted contains ( csv path ) ) ; / / and a full split , after adding a new key string marker = " / marker " ; path marker path = fs key to qualified path ( marker ) ; keys add ( new delete objects request key version ( marker ) ) ; pair < list < key path > , list < key path > > pair = new multi object delete support ( fs create store context ( ) , null ) split undeleted keys ( ex , keys ) ; assert equals ( undeleted , to path list ( pair get left ( ) ) ) ; list < key path > right = pair get right ( ) ; assertions assert that ( right ) has size ( 1 ) ; assert equals ( marker path , right get ( 0 ) get path ( ) ) ; }


delete the content with the specified uri

public synchronized void delete ( @ non null context context , @ non null uri uri ) { if ( ! is authority ( uri ) ) { log d ( tag , " can ' t delete not the authority for uri : " + uri ) ; return ; } try { storage type storage type = storage type decode ( uri get path segments ( ) get ( storage type path segment ) ) ; if ( storage type is memory ( ) ) { memory blobs remove ( uri ) ; } else { string id = uri get path segments ( ) get ( id path segment ) ; string directory = get directory ( storage type ) ; file file = new file ( get or create cache directory ( context , directory ) , build file name ( id ) ) ; if ( ! file delete ( ) ) { throw new i o exception ( " file wasn ' t deleted " ) ; } } } catch ( i o exception e ) { log w ( tag , " failed to delete uri : " + uri , e ) ; } }


returns a single function record given its id , or null if no such record exists

public function record get function by i d ( long function i d ) throws i o exception { function record function record = function cache get ( function i d ) ; if ( function record = = null ) { d b record record = table get record ( function i d ) ; if ( record ! = null ) { function record = new function record ( fid db , function cache , record ) ; } } return function record ; }


add an entity to the existing related entity map

public void add related entity ( string entity type , string entity id ) { set < string > this related entity = related entities get ( entity type ) ; if ( this related entity = = null ) { this related entity = new hash set < string > ( ) ; related entities put ( entity type , this related entity ) ; } this related entity add ( entity id ) ; }


returns true if - - fission contains the current compilation mode

public boolean fission is active for current compilation mode ( ) { return cpp options fission modes contains ( compilation mode ) ; }


returns the next available extracted data note that it is possible for the extracted data to be empty the last time this method can be called

optional < input stream > next ( ) throws i o exception ;


verify that locked bytes are correctly updated when a block is finalized at less than its max length

public void test short block finalized ( ) throws i o exception , timeout exception , interrupted exception { get cluster builder ( ) set num datanodes ( 1 ) build ( ) ; final string method name = generic test utils get method name ( ) ; final fs dataset spi < ? > fsd = cluster get data nodes ( ) get ( 0 ) get f s dataset ( ) ; path path = new path ( " / " + method name + " dat " ) ; make test file ( path , 1 , true ) ; assert that ( fsd get cache used ( ) , is ( os page size ) ) ; / / delete the file and ensure locked ram usage goes to zero fs delete ( path , false ) ; wait for locked bytes used ( fsd , 0 ) ; }


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

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


trims the given string if it ends with { @ link # archive file extension }

private static string trim full archive name ( string archive name ) { if ( archive name ends with ( archive file extension ) ) { int end index = archive name index of ( archive file extension ) ; return archive name substring ( 0 , end index ) ; } return archive name ; }


public string get job queue name ( ) { if ( datum job queue name ! = null ) { return datum job queue name to string ( ) ; } return null ; }


combines the two bit arrays using bitwise or note : because of the use of atomics , if the other lock free bit array is being mutated while this operation is executing , not all of those new 1 ' s may be set in the final state of this lock free bit array the only guarantee provided is that all the bits that were set in the other lock free bit array at the start of this method will be set in this lock free bit array at the end of this method

void put all ( lock free bit array other ) { check argument ( data length ( ) = = other data length ( ) , " bit arrays must be of equal length ( % s ! = % s ) " , data length ( ) , other data length ( ) ) ; for ( int i = 0 ; i < data length ( ) ; i + + ) { long other long = other data get ( i ) ; long our long old ; long our long new ; boolean changed any bits = true ; do { our long old = data get ( i ) ; our long new = our long old | other long ; if ( our long old = = our long new ) { changed any bits = false ; break ; } } while ( ! data compare and set ( i , our long old , our long new ) ) ; if ( changed any bits ) { int bits added = long bit count ( our long new ) - long bit count ( our long old ) ; bit count add ( bits added ) ; } } }


allocates a byte [ ] of the specified size for use as a temporary buffer and calls { @ link # copy stream ( input stream , byte buffer , byte [ ] ) }

public static void copy stream ( input stream input , byte buffer output , int buffer size ) throws i o exception { copy stream ( input , output , new byte [ buffer size ] ) ; }


returns an unmodifiable list containing the specified first element and backed by the specified array of additional elements changes to the { @ code rest } array will be reflected in the returned list unlike { @ link arrays # as list } , the returned list is unmodifiable this is useful when a varargs method needs to use a signature such as { @ code ( foo first foo , foo more foos ) } , in order to avoid overload ambiguity or to enforce a minimum argument count the returned list is serializable and implements { @ link random access }

public static < e > list < e > as list ( @ nullable decl e first , e [ ] rest ) { return new one plus array list < > ( first , rest ) ; }


public static void put ( @ non null final string key , final bitmap value ) { put ( key , value , get default cache double utils ( ) ) ; }


get the start offset of file associated with this block

public long get offset ( ) { return offset ; }


returns { @ link opaque options data } suitable for passing along to { @ link builder # options data ( opaque options data options data ) } this is useful when you want to do the work of analyzing the given { @ code options classes } exactly once , but you want to parse lots of different lists of strings ( and thus need to construct lots of different { @ link options parser } instances )

public static opaque options data get options data ( list < class < ? extends options base > > options classes ) { return get options data internal ( options classes ) ; }


cancels the current load but does not release any resources held by the request and continues to display the loaded resource if the load completed before the call to cancel cancelled requests can be restarted with a subsequent call to { @ link # begin ( ) }

private void cancel ( ) { assert not calling callbacks ( ) ; state verifier throw if recycled ( ) ; target remove callback ( this ) ; if ( load status ! = null ) { load status cancel ( ) ; load status = null ; } }


set the http status code to the given value ( potentially non - standard and not resolvable through the { @ link http status } enum ) as an integer

default boolean set raw status code ( @ nullable integer value ) { if ( value = = null ) { return set status code ( null ) ; } else { http status http status = http status resolve ( value ) ; if ( http status = = null ) { throw new illegal state exception ( " unresolvable http status for general server http response : " + value ) ; } return set status code ( http status ) ; } }


returns a new instrumentation spec with the given attribute names replacing the ones stored in this object

public instrumentation spec with source attributes ( collection < string > attributes ) { return new instrumentation spec ( instrumented file types , immutable list copy of ( attributes ) , dependency attributes ) ; }


get the number of matches which are false positives since they occur in defined data

public int get num f p data ( ) { return fp data ; }


url encode a string in the utf - 8 encoding

public static string url encode ( string s ) { return u r l encoder encode ( s , utf 8 ) ; }


test parsing various types of java heap options

public void test parse maximum heap size m b ( ) { / / happy cases assert assert equals ( 4096 , job conf parse maximum heap size m b ( " - xmx 4 2 9 4 9 6 7 2 9 6 " ) ) ; assert assert equals ( 4096 , job conf parse maximum heap size m b ( " - xmx 4 1 9 4 3 0 4k " ) ) ; assert assert equals ( 4096 , job conf parse maximum heap size m b ( " - xmx 4 0 9 6m " ) ) ; assert assert equals ( 4096 , job conf parse maximum heap size m b ( " - xmx 4g " ) ) ; / / sad cases assert assert equals ( - 1 , job conf parse maximum heap size m b ( " - xmx 4 ? " ) ) ; assert assert equals ( - 1 , job conf parse maximum heap size m b ( " " ) ) ; }


callback that is invoked after a record is written to cassandra successfully subclass can override to provide its own logic


determine if the referenced variable corresponds to the specified register

private boolean is register associated with referenced variable ( variable variable , register register ) { if ( variable = = null | | ! variable is register variable ( ) ) { return false ; } return ( register = = variable get register ( ) ) ; }


executes a query on provided csv connection the supplied table name is only used for the test identification

public static result set execute csv query ( connection csv , string csv table name ) throws s q l exception { result set expected = csv create statement ( result set type scroll insensitive , result set concur read only ) execute query ( " select * from " + csv table name ) ; / / trigger data loading for type inference expected before first ( ) ; return expected ; }


this will be called to inform implementations that the next layout has been computed implementations should use the widthheight to determine whether they still need more views to fill their initial viewport ( which should be reflected in the next call to { @ link # wants more ( ) }

void add ( render info render info , int width , int height ) ;


default optional < connector new table layout > get new table layout ( connector session session , connector table metadata table metadata ) { return optional empty ( ) ; }


like the above test , but with a strict server socket ( closes non - tls connections after seeing that there is no handshake )

public void test t l s detection non blocking strict server idle client ( final x 5 0 9 key type ca key type , final x 5 0 9 key type cert key type , final boolean hostname verification , final integer param index ) throws exception { init ( ca key type , cert key type , hostname verification , param index ) ; set up ( ) ; socket bad client socket = null ; socket secure client socket = null ; unified server thread server thread = new unified server thread ( x 5 0 9 util , local server address , false , data to client ) ; server thread start ( ) ; try { bad client socket = connect without s s l ( ) ; / / leave the bad client socket idle secure client socket = connect with s s l ( ) ; secure client socket get output stream ( ) write ( data from client ) ; secure client socket get output stream ( ) flush ( ) ; byte [ ] buf = new byte [ data to client length ] ; int bytes read = secure client socket get input stream ( ) read ( buf , 0 , buf length ) ; assert equals ( buf length , bytes read ) ; assert array equals ( data to client , buf ) ; synchronized ( handshake completed lock ) { if ( ! handshake completed ) { handshake completed lock wait ( timeout ) ; } assert true ( handshake completed ) ; } assert array equals ( data from client , server thread get data from client ( 0 ) ) ; } finally { force close ( bad client socket ) ; force close ( secure client socket ) ; server thread shutdown ( timeout ) ; } }


similar to block report 03 ( ) but works with two d ns test writes a file and closes it the second datanode is started in the cluster as soon as the replication process is completed test finds a block from the second dn and sets its gs to be < of original one this is the mark block as corrupt case 3 so we expect one pending deletion block report is forced and the check for # of currupted blocks is performed another block is chosen and its length is set to a lesser than original a check for another corrupted block is performed after yet another block report

public void block report 07 ( ) throws exception { final string method name = generic test utils get method name ( ) ; path file path = new path ( " / " + method name + " dat " ) ; final int dn n1 = dn n0 + 1 ; / / write file and start second node to be " older " than the original write file ( method name , file size , file path ) ; start d nand wait ( file path , true ) ; / / all blocks belong to the same file , hence same bp data node dn = cluster get data nodes ( ) get ( dn n1 ) ; string pool id = cluster get namesystem ( ) get block pool id ( ) ; datanode registration dn r = dn get d n registration for b p ( pool id ) ; storage block report [ ] reports = get block reports ( dn , pool id , true , false ) ; send block reports ( dn r , pool id , reports ) ; print stats ( ) ; assert that ( " wrong number of corrupt blocks " , cluster get namesystem ( ) get corrupt replica blocks ( ) , is ( 0l ) ) ; assert that ( " wrong number of pending deletion blocks " , cluster get namesystem ( ) get pending deletion blocks ( ) , is ( 1l ) ) ; assert that ( " wrong number of pending replication blocks " , cluster get namesystem ( ) get pending replication blocks ( ) , is ( 0l ) ) ; reports = get block reports ( dn , pool id , false , true ) ; send block reports ( dn r , pool id , reports ) ; print stats ( ) ; assert that ( " wrong number of corrupt blocks " , cluster get namesystem ( ) get corrupt replica blocks ( ) , is ( 1l ) ) ; assert that ( " wrong number of pending deletion blocks " , cluster get namesystem ( ) get pending deletion blocks ( ) , is ( 1l ) ) ; assert that ( " wrong number of pending replication blocks " , cluster get namesystem ( ) get pending replication blocks ( ) , is ( 0l ) ) ; print stats ( ) ; }


reads a constant class , constant string , constant method type , constant module or constant package constant pool entry in { @ link # class file buffer } this method is intended for { @ link attribute } sub classes , and is normally not needed by class generators or adapters

private string read stringish ( final int offset , final char [ ] char buffer ) { / / get the start offset of the cp info structure ( plus one ) , and read the constant utf 8 entry / / designated by the first two bytes of this cp info return read u t f 8 ( cp info offsets [ read unsigned short ( offset ) ] , char buffer ) ; }


public bit set compatible regs ( dalv insn insn ) { register spec list regs = insn get registers ( ) ; bit set bits = new bit set ( 2 ) ; bits set ( 0 , unsigned fits in nibble ( regs get ( 0 ) get reg ( ) ) ) ; bits set ( 1 , unsigned fits in nibble ( regs get ( 1 ) get reg ( ) ) ) ; return bits ; }


private completable future < string > execute command ( string ip , int port , string api , map < string , string > params , boolean use http post ) { return execute command ( null , ip , port , api , params , use http post ) ; }


public enum string required enum get enum string required ( ) { return enum string required ; }


deserialize the { @ link abstract symbol information } from the appropriate stream in the pdb

void deserialize ( int stream number , task monitor monitor ) throws i o exception , pdb exception , cancelled exception { if ( pdb has minimal debug info ( ) ) { hash records bit map length = 0x 8 0 0 0 ; num extra bytes = 0 ; / / i believe ; num hash records = 0x 3ffff ; } else { hash records bit map length = 0x 2 0 0 ; num extra bytes = 4 ; num hash records = 0x 1 0 0 0 ; } }


perform a rollback , handling rollback exceptions properly

private mono < void > rollback on exception ( reactive transaction status , throwable ex ) throws transaction exception { logger debug ( " initiating transaction rollback on application exception " , ex ) ; return this transaction manager rollback ( status ) on error map ( ex 2 - > { logger error ( " application exception overridden by rollback exception " , ex ) ; if ( ex 2 instanceof transaction system exception ) { ( ( transaction system exception ) ex 2 ) init application exception ( ex ) ; } return ex 2 ; } ) ; }


indicates whether the given view should be cached the name and locale used to resolve the view are also provided

boolean filter ( view view , string view name , locale locale ) ;


returns the custom token filters used for analysis , if defined

public list < name or definition > token filters ( ) { return this token filters ; }


returns human - friendly help for the generator provide the consumer with help tips , parameters here

public string get help ( ) { return " generates a rust client / server library ( beta ) using the openapi - generator project " ; }


periodically analyzes a snapshot of the blob storage metrics and updates the sleep duration in order to appropriately throttle storage operations

public void run ( ) { boolean do work = false ; try { do work = doing work compare and set ( 0 , 1 ) ; / / prevent concurrent execution of this task if ( ! do work ) { return ; } long now = system current time millis ( ) ; if ( now - blob metrics get ( ) start time > = analysis period ms ) { abfs operation metrics old metrics = blob metrics get and set ( new abfs operation metrics ( now ) ) ; old metrics end time = now ; sleep duration = analyze metrics and update sleep duration ( old metrics , sleep duration ) ; } } finally { if ( do work ) { doing work set ( 0 ) ; } } }


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


map the given response to a { @ code response entity < list < t > > }

public static < t > mono < response entity < list < t > > > map to entity list ( client response response , publisher < t > body ) { return flux from ( body ) collect list ( ) map ( list - > new response entity < > ( list , response headers ( ) as http headers ( ) , response raw status code ( ) ) ) ; }


public static string get default unit ( string resource type ) { resource information ri = get resource types ( ) get ( resource type ) ; if ( ri ! = null ) { return ri get units ( ) ; } return " " ; }


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


determine if the specified annotation is either directly present or meta - present equivalent to calling { @ code get ( annotation type ) is present ( ) }

< a extends annotation > boolean is present ( class < a > annotation type ) ;


generates a fixed format of application tags given one or more of application name , version and description this allows subsequent query for an application with a name only , version only or description only or any combination of those as filters

public static final set < string > create application tags ( string app name , string app version , string app description ) { set < string > tags = new hash set < > ( ) ; tags add ( service utils create name tag ( app name ) ) ; if ( app version ! = null ) { tags add ( service utils create version tag ( app version ) ) ; } if ( app description ! = null ) { tags add ( service utils create description tag ( app description ) ) ; } return tags ; }


gets the slot sharing group that this vertex is associated with different vertices in the same slot sharing group can run one subtask each in the same slot

public slot sharing group get slot sharing group ( ) { if ( slot sharing group = = null ) { / / create a new slot sharing group for this vertex if it was in no other slot sharing / / group / / this should only happen in testing cases at the moment because production code path / / will / / always set a value to it before used set slot sharing group ( new slot sharing group ( ) ) ; } return slot sharing group ; }


returns true if field corresponding to field i d is set ( has been assigned a value ) and false otherwise

public boolean is set ( fields field ) { if ( field = = null ) { throw new illegal argument exception ( ) ; } switch ( field ) { case task start : return is set task start ( ) ; case task end : return is set task end ( ) ; } throw new illegal state exception ( ) ; }


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


recover the structure associated with the given pointer variable , or if there is no structure , create it resize the structure to be at least as large as the max offset seen so far

private structure create structure ( structure struct d t , high variable var , function f , boolean is this param ) { if ( struct d t = = null ) { struct d t = create new struct ( var , ( int ) component map get size ( ) , f , is this param ) ; } else { int len ; if ( struct d t is not yet defined ( ) ) { len = 0 ; } else { len = struct d t get length ( ) ; } if ( component map get size ( ) > len ) { struct d t grow structure ( ( int ) component map get size ( ) - len ) ; } } return struct d t ; }


sets the exception from failed execution and executes callback if available notifies any thread waiting for completion

void set exception ( exception exception ) { this exception = exception ; this state = failed ; this callback if present ( ac - > ac on complete ( null , optional of ( exception ) ) ) ; synchronized ( lock ) { lock notify all ( ) ; } }


dispose of targets if necessary ; clear thread local

public void destroy ( ) { logger debug ( " destroying thread local target source bindings " ) ; synchronized ( this target set ) { for ( object target : this target set ) { destroy prototype instance ( target ) ; } this target set clear ( ) ; } / / clear thread local , just in case this target in thread remove ( ) ; }


returns a list of the longest common subsequence this result will be empty if the { @ link # get size limit ( ) } has been reached

public list < t > get lcs ( task monitor monitor ) throws cancelled exception { calculate l c s ( monitor ) ; return do get lcs ( monitor ) ; }


creates a { @ code priority queue } containing the given elements < b > note : < b > if the specified iterable is a { @ code sorted set } or a { @ code priority queue } , this priority queue will be ordered according to the same ordering

public static < e extends comparable > priority queue < e > new priority queue ( iterable < ? extends e > elements ) { if ( elements instanceof collection ) { return new priority queue < e > ( ( collection < ? extends e > ) elements ) ; } priority queue < e > queue = new priority queue < e > ( ) ; iterables add all ( queue , elements ) ; return queue ; } / / synchronous queue


public int get symbol data 2 ( ) { lock acquire ( ) ; try { check is valid ( ) ; if ( record ! = null ) { return record get int value ( symbol database adapter symbol data2 col ) ; } return 0 ; } finally { lock release ( ) ; } }


@ t c description : ， @ test step : @ expect result :

public void multiple tenant select one healthy instance ( ) throws exception { string service name = random domain name ( ) ; naming 1 register instance ( service name , " 11 11 11 11 " , test port , " c 1 " ) ; naming 1 register instance ( service name , " 22 22 22 22 " , test port , " c 2 " ) ; naming 2 register instance ( service name , " 22 22 22 22 " , test port , " c 3 " ) ; list < instance > instances = naming 1 get all instances ( service name ) ; verify instance list for naming ( naming 1 , 2 , service name ) ; assert assert equals ( 2 , naming 1 get all instances ( service name ) size ( ) ) ; instance instance = naming 1 select one healthy instance ( service name , arrays as list ( " c 1 " ) ) ; assert assert equals ( " 11 11 11 11 " , instance get ip ( ) ) ; naming 1 deregister instance ( service name , " 11 11 11 11 " , test port , " c 1 " ) ; time unit seconds sleep ( 12 ) ; instance = naming 1 select one healthy instance ( service name ) ; assert assert equals ( " 22 22 22 22 " , instance get ip ( ) ) ; }


returns a live view of this network as a { @ link graph } the resulting { @ link graph } will have an edge connecting node a to node b if this { @ link network } has an edge connecting a to b if this network { @ link # allows parallel edges ( ) allows parallel edges } , parallel edges will be treated as if collapsed into a single edge for example , the { @ link # degree ( object ) } of a node in the { @ link graph } view may be less than the degree of the same node in this { @ link network }

graph < n > as graph ( ) ; / / / / network properties / /


returns true if restore process completed ( either successfully or with failure )

public boolean completed ( ) { return this = = success | | this = = failure ; }


format a long integer type into a date string

private static string format date ( long date ) { date format df = date format get date time instance ( date format short , date format short ) ; return df format ( new date ( date ) ) ; }


interns all the strings in the given array in place , returning the same array

public static string [ ] intern strings in array ( string [ ] strings ) { for ( int i = 0 ; i < strings length ; i + + ) { strings [ i ] = weak intern ( strings [ i ] ) ; } return strings ; }


process a { @ link stream record } from the left stream whenever an { @ link stream record } arrives at the left stream , it will get added to the left buffer possible join candidates for that element will be looked up from the right buffer and if the pair lies within the user defined boundaries , it gets passed to the { @ link process join function }

public void process element 1 ( stream record < t1 > record ) throws exception { process element ( record , left buffer , right buffer , lower bound , upper bound , true ) ; }


declare local transactions will use global lock check for updatedeleteinsertselect for update sql

public static void bind global lock flag ( ) { if ( logger is debug enabled ( ) ) { logger debug ( " local transaction global lock support enabled " ) ; } / / just put something not null context holder put ( key global lock flag , value global lock flag ) ; }


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

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


gets the stack depth change value that has been set at the indicated address

public static integer get stack depth change ( program program , address address ) { property map manager pmm = program get usr property manager ( ) ; int property map ipm = pmm get int property map ( stack depth change name ) ; if ( ipm = = null | | ! ipm has property ( address ) ) { return null ; } try { return ipm get int ( address ) ; } catch ( no value exception e ) { throw new assert exception ( " already checked that it has a property " ) ; } }


decrements reference count for the shared reference returns value of m ref count after decrementing

private synchronized int decrease ref count ( ) { ensure valid ( ) ; preconditions check argument ( m ref count > 0 ) ; m ref count - - ; return m ref count ; }


callback for post - processing the job detail to be exposed by this factory bean the default implementation is empty can be overridden in subclasses

protected void post process job detail ( job detail job detail ) { }


sets the partial solution for this bulk iteration node

public void set partial solution ( bulk partial solution node partial solution ) { this partial solution = partial solution ; }


creates all the mappings of a sandbox this lambda runs holding a big lock around sandboxfs and is called in the critical path of all running actions as a result , this lambda should not block ( which includes not doing any io other than writing to the sandboxfs stream via { @ code mapper } )

void create ( sandbox mapper mapper ) throws i o exception ;


whitens the children of v it is only called after v has no more children left and we have backtracked to the calling parent of v this is to ensure that we don ' t miss out on any paths that contain a child of v which has other parents

public void whiten children ( vertex v ) { iterator < vertex > it = this get children ( v ) iterator ( ) ; while ( it has next ( ) ) { vertex next = it next ( ) ; if ( this get calling parent ( next ) equals ( v ) ) { this set color ( next , white ) ; } } }


reads the next token in backward direction from the heuristic scanner and sets the fields < code > f token , f previous position < code > and < code > f position < code > accordingly

private void next token ( ) { next token ( position ) ; }


sets the < code > ghidra file chooser < code > to allow the user to just select files , just select directories , or select both files and directories the default is < code > j files chooser files only < code >

public void set file selection mode ( int mode ) { this file selection mode = ghidra file chooser mode values ( ) [ mode ] ; }


this will be used by the uncaught exception handler and make the system exit

protected void handle exception ( string thread name , throwable e ) { log error ( " severe unrecoverable error , from thread : { } " , thread name , e ) ; listener notify stopping ( thread name , exit code unexpected error get value ( ) ) ; server metrics get metrics ( ) unrecoverable error count add ( 1 ) ; }


public static hystrix timer get instance ( ) { return instance ; }


returns true if this is a string constraint or a type converting constraint where the type is converted to a string constraint ( i e uses a string editor )

private static boolean is string based constraint ( column constraint < ? > constraint ) { if ( constraint instanceof mapped column constraint ) { constraint = ( ( mapped column constraint < ? , ? > ) constraint ) get delegate ( ) ; return is string based constraint ( constraint ) ; } return constraint get column type ( ) equals ( string class ) ; }


add update the under construction feature

public void convert to block under construction ( block u c state s , datanode storage info [ ] targets ) { if ( is complete ( ) ) { uc = new block under construction feature ( this , s , targets , this get block type ( ) ) ; } else { / / the block is already under construction uc set block u c state ( s ) ; uc set expected locations ( this , targets , this get block type ( ) ) ; } }


sets the provider that should get the default focus when no component has focus

public void set default component ( component provider provider ) { win mgr set default component ( provider ) ; }


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


extract a unique bean for the given type from the given map of matching beans

private static < t > t unique bean ( class < t > type , map < string , t > matching beans ) { int count = matching beans size ( ) ; if ( count = = 1 ) { return matching beans values ( ) iterator ( ) next ( ) ; } else if ( count > 1 ) { throw new no unique bean definition exception ( type , matching beans key set ( ) ) ; } else { throw new no such bean definition exception ( type ) ; } }


the short usage suitable for the synopsis

public string get usage ( ) { string cmd = " - " + get name ( ) ; string usage = is deprecated ( ) ? " " : get command field ( command usage field ) ; return usage is empty ( ) ? cmd : cmd + " " + usage ; }


returns a copy of this instance with the given values

public item data copy with new values ( long duration us , long default position us , boolean is live ) { if ( duration us = = this duration us & & default position us = = this default position us & & is live = = this is live ) { return this ; } return new item data ( duration us , default position us , is live ) ; }


go over all the mounted items from the leaves to the root and unmount only the items that are not present in the new layout outputs if an item is still present but in a new position move the item inside its host the condition where an item changed host doesn ' t need any special treatment here since we mark them as removed and re - added when calculating the new layout outputs

private void unmount or move old items ( ) { if ( m render unit ids = = null ) { return ; } / / traversing from the beginning since m render unit ids unmounting won ' t remove entries there / / but only from m index to mounted item map if an host changes we ' re going to unmount it and / / recursively / / all its mounted children for ( int i = 0 ; i < m render unit ids length ; i + + ) { final int new position = m render tree get render tree node index ( m render unit ids [ i ] ) ; final render tree node render tree node = new position > - 1 ? m render tree get render tree node at index ( new position ) : null ; final mount item old item = get item at ( i ) ; final boolean has unmount delegate = m unmount delegate extension ! = null & & old item ! = null ? m unmount delegate extension should delegate unmount ( m mount delegate get unmount delegate extension state ( ) , old item ) : false ; if ( has unmount delegate ) { continue ; } if ( new position = = - 1 ) { / / if old item is null it was previously unmounted so there is nothing we need to do if ( old item ! = null ) { unmount item recursively ( old item get render tree node ( ) ) ; } } else { final long new host marker = render tree node get parent ( ) = = null ? 0l : render tree node get parent ( ) get render unit ( ) get id ( ) ; final host new host = m index to mounted item map get ( new host marker ) = = null ? null : ( host ) m index to mounted item map get ( new host marker ) get content ( ) ; if ( old item = = null ) { / / this was previously unmounted } else if ( old item get host ( ) ! = new host ) { / / if the id is the same but the parent host is different we simply unmount the item and / / re - mount it later if the item to unmount is a component host , all the children will be / / recursively unmounted unmount item recursively ( old item get render tree node ( ) ) ; } else if ( old item get render tree node ( ) get position in parent ( ) ! = render tree node get position in parent ( ) ) { / / if a mount item for this id exists and its host has not changed but its position / / in the host has changed we need to update the position in the host to ensure / / the z - ordering old item get host ( ) move item ( old item , old item get render tree node ( ) get position in parent ( ) , render tree node get position in parent ( ) ) ; } } } }


reads the first 4 bytes of len buffer , which could be true length or four letter word

private boolean read length ( selection key k ) throws i o exception { / / read the length , now get the buffer int len = len buffer get int ( ) ; if ( ! initialized & & check four letter word ( sk , len ) ) { return false ; } if ( len < 0 | | len > binary input archive max buffer ) { throw new i o exception ( " len error " + len ) ; } if ( ! is z k server running ( ) ) { throw new i o exception ( " zoo keeper server not running " ) ; } / / check request size will throw i o exception if request is rejected zk server check request size when receiving message ( len ) ; incoming buffer = byte buffer allocate ( len ) ; return true ; }


format url template using default server variables

public string url ( ) { return url ( null ) ; }


creates a new chm with an aggressive concurrency level , aimed at high concurrent update rate long living maps

public static < k , v > concurrent map < k , v > new concurrent map with aggressive concurrency ( ) { return new concurrent map with aggressive concurrency ( 16 ) ; }


set the various timestamp fields to the supplied value

public void touch ( long millis ) { created = millis ; saved = millis ; date = new date ( millis ) to string ( ) ; }


public map < string , object > get params ( ) { return params ; }


void on search complete ( search result result ) ;


developers might use standalone mode ( which is the default for one server ) this test checks metrics for authz failure in standalone server

public void test secure standalone server auth n failure ( ) throws exception { final integer client port = port assignment unique ( ) ; final integer secure client port = port assignment unique ( ) ; zoo keeper server main test main thread mt = new zoo keeper server main test main thread ( client port , secure client port , true , null ) ; mt start ( ) ; try { zoo keeper zk = create z k clnt ( " 127 0 0 1 : " + secure client port ) ; fail ( " should not be reached " ) ; } catch ( exception e ) { / / expected } server stats server stats = mt get secure cnxn factory ( ) get zoo keeper server ( ) server stats ( ) ; assert true ( server stats get auth failed count ( ) > = 1 ) ; mt shutdown ( ) ; }


verify if the thief uses the provided stealing method

public void test steal ( ) { final var method = mock ( stealing method class ) ; final var thief = new halfling thief ( method ) ; thief steal ( ) ; verify ( method ) steal ( ) ; verify no more interactions ( method ) ; }


represents a file path pattern to get the item icon in different sizes for example : pluginplugin - shortnameimages : sizeitem png , where { @ code : size } represents the different icon sizes used commonly in jenkins project : 1 6x 1 6 , 2 4x 2 4 , 3 2x 3 2 or 4 8x 4 8

public string get icon file path pattern ( ) { return null ; }


returns the { @ link rel modified monotonicity } statistic

public rel modified monotonicity get rel modified monotonicity ( rel node rel ) { for ( ; ; ) { try { return modified monotonicity handler get rel modified monotonicity ( rel , this ) ; } catch ( janino rel metadata provider no handler e ) { modified monotonicity handler = revise ( e rel class , flink metadata modified monotonicity def ) ; } } }


public void test big cat all of ( ) { / / todo : test big cat all of }


public < t > t time supplier ( supplier < t > event ) { return event get ( ) ; }


a human - readable representation of this value


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

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


test to verify the behavior of { @ link f s queue # assign container ( f s scheduler node ) } ) create two queues under root ( fifo queue and fair parent ) , and two queues under fair parent ( fair child 1 and fair child 2 ) submit two apps to the fifo queue and one each to the fair child queues , all apps requiring 4 containers each of the total 16 container capacity assert the number of containers for each app after 4 , 8 , 12 and 16 updates

public void test assign container ( ) throws exception { scheduler init ( conf ) ; scheduler start ( ) ; scheduler reinitialize ( conf , resource manager get r m context ( ) ) ; final string user = " user 1 " ; final string fifo queue = " fifo " ; final string fair parent = " fair parent " ; final string fair child 1 = fair parent + " fair child 1 " ; final string fair child 2 = fair parent + " fair child 2 " ; r m node node 1 = mock nodes new node info ( 1 , resources create resource ( 8192 , 8 ) , 1 , " 127 0 0 1 " ) ; r m node node 2 = mock nodes new node info ( 1 , resources create resource ( 8192 , 8 ) , 2 , " 127 0 0 2 " ) ; node added scheduler event node event 1 = new node added scheduler event ( node 1 ) ; node added scheduler event node event 2 = new node added scheduler event ( node 2 ) ; scheduler handle ( node event 1 ) ; scheduler handle ( node event 2 ) ; application attempt id att id 1 = create scheduling request ( 1024 , fifo queue , user , 4 ) ; application attempt id att id 2 = create scheduling request ( 1024 , fair child 1 , user , 4 ) ; application attempt id att id 3 = create scheduling request ( 1024 , fair child 2 , user , 4 ) ; application attempt id att id 4 = create scheduling request ( 1024 , fifo queue , user , 4 ) ; f s app attempt app 1 = scheduler get scheduler app ( att id 1 ) ; f s app attempt app 2 = scheduler get scheduler app ( att id 2 ) ; f s app attempt app 3 = scheduler get scheduler app ( att id 3 ) ; f s app attempt app 4 = scheduler get scheduler app ( att id 4 ) ; scheduler get queue manager ( ) get leaf queue ( fifo queue , true ) set policy ( scheduling policy parse ( " fifo " ) ) ; scheduler update ( ) ; node update scheduler event update event 1 = new node update scheduler event ( node 1 ) ; node update scheduler event update event 2 = new node update scheduler event ( node 2 ) ; for ( int i = 0 ; i < 8 ; i + + ) { scheduler handle ( update event 1 ) ; scheduler handle ( update event 2 ) ; if ( ( i + 1 ) % 2 = = 0 ) { / / 4 node updates : fifo queue should have received 2 , and fair child * / / should have received one each string err = " wrong number of assigned containers after " + ( i + 1 ) + " updates " ; if ( i < 4 ) { / / app 1 req still not met assert equals ( err , ( i + 1 ) , app 1 get live containers ( ) size ( ) ) ; assert equals ( err , 0 , app 4 get live containers ( ) size ( ) ) ; } else { / / app 1 req has been met , app 4 should be served now assert equals ( err , 4 , app 1 get live containers ( ) size ( ) ) ; assert equals ( err , ( i - 3 ) , app 4 get live containers ( ) size ( ) ) ; } assert equals ( err , ( i + 1 ) / 2 , app 2 get live containers ( ) size ( ) ) ; assert equals ( err , ( i + 1 ) / 2 , app 3 get live containers ( ) size ( ) ) ; } } }


filter { @ link rated search hit } s that do not have a rating

static list < document key > filter unrated documents ( list < rated search hit > rated hits ) { return rated hits stream ( ) filter ( hit - > hit get rating ( ) is present ( ) = = false ) map ( hit - > new document key ( hit get search hit ( ) get index ( ) , hit get search hit ( ) get id ( ) ) ) collect ( collectors to list ( ) ) ; }


x 5 0 9 certificate [ ] extract ( http servlet request request ) ;


public static dense matrix eye ( int n ) { return eye ( n , n ) ; }


guaranteed to throw an exception and leave the collection unmodified

public final boolean remove if ( java util function predicate < ? super e > filter ) { throw new unsupported operation exception ( ) ; }


return a variant of this { @ code method parameter } which refers to the given containing class

public method parameter with containing class ( @ nullable class < ? > containing class ) { method parameter result = clone ( ) ; result containing class = containing class ; result parameter type = null ; return result ; }


merges the references from the same program that had its code units chosen in the code unit merge phase

private void auto merge where code units merged ( task monitor monitor ) throws cancelled exception { replace references ( picked latest code units , keep latest , monitor ) ; replace references ( picked my code units , keep my , monitor ) ; replace references ( picked original code units , keep original , monitor ) ; }


gets type literal for the given { @ code class } instance

public static < t > type token < t > get ( class < t > type ) { return new type token < t > ( type ) ; }


increment and then return the next value


this test checks that if a node is re - registered with a new software version after the heartbeat expiry interval but before the heartbeat manager has a chance to detect this and remove it , the node ' s version will still be correctly decremented

public void test num versions correct after reregister ( ) throws i o exception , interrupted exception { / / create the datanode manager which will be tested f s namesystem fsn = mockito mock ( f s namesystem class ) ; mockito when ( fsn has write lock ( ) ) then return ( true ) ; configuration conf = new configuration ( ) ; conf set long ( d f s config keys dfs heartbeat interval key , 0 ) ; conf set long ( d f s config keys dfs namenode heartbeat recheck interval key , 10 ) ; datanode manager dm = mock datanode manager ( fsn , conf ) ; string storage i d = " some storage i d 1 " ; string ip = " some i p " + storage i d ; / / register then reregister the same node but with a different version for ( int i = 0 ; i < = 1 ; i + + ) { dm register datanode ( new datanode registration ( new datanode i d ( ip , " " , storage i d , 9000 , 0 , 0 , 0 ) , null , null , " version " + i ) ) ; if ( i = = 0 ) { thread sleep ( 25 ) ; } } / / verify datanode manager has the correct count map < string , integer > map to check = dm get datanodes software versions ( ) ; assert null ( " should be no more version 0 nodes " , map to check get ( " version 0 " ) ) ; assert equals ( " should be one version 1 node " , map to check get ( " version 1 " ) int value ( ) , 1 ) ; }


{ @ inherit doc } comparisons for this class are defined to be type - major ( if the types don ' t match then the objects are not equal ) , with { @ link # compare to 0 } deciding same - type comparisons

public final boolean equals ( object other ) { if ( this = = other ) { return true ; } offsetted item other item = ( offsetted item ) other ; item type this type = item type ( ) ; item type other type = other item item type ( ) ; if ( this type ! = other type ) { return false ; } return ( compare to 0 ( other item ) = = 0 ) ; }


clear all of this session ' s attributes

public void clear attributes ( ) { for ( iterator < map entry < string , object > > it = this attributes entry set ( ) iterator ( ) ; it has next ( ) ; ) { map entry < string , object > entry = it next ( ) ; string name = entry get key ( ) ; object value = entry get value ( ) ; it remove ( ) ; if ( value instanceof http session binding listener ) { ( ( http session binding listener ) value ) value unbound ( new http session binding event ( this , name , value ) ) ; } } }


default void on video decoder initialized ( string decoder name , long initialized timestamp ms , long initialization duration ms ) { }


public nodes stats request builder set process ( boolean process ) { add or remove metric ( process , nodes stats request metric process ) ; return this ; }


void force check ( ) { status checker run ( ) ; }


remove an action note : calls to { @ link # get all actions ( ) } that happen before calls to this method may not see the update note : this method does not affect transient actions contributed by a { @ link transient action factory } note : this method cannot provide concurrency control due to the backing storage being a { @ link copy on write array list } so concurrent calls to any of the mutation methods may produce surprising results though technically consistent from the concurrency contract of { @ link copy on write array list } ( we would need some form of transactions or a different backing type )

public boolean remove action ( @ nullable action a ) { if ( a = = null ) { return false ; } / / copy on write array list does not support iterator remove , so need to do it this way : return get actions ( ) remove all ( collections singleton ( a ) ) ; }


get the type name of a random occludee entity

private string get random occludee type ( boolean dynamic ) { int i = rng next int ( occludee paths static length ) ; return ( dynamic ) ? occludee paths dynamic [ i ] : occludee paths static [ i ] ; }


get a connection form the connection pool

public connection get connection ( database configuration database configuration , boolean force new connection ) throws database service exception { try { if ( connection ! = null & & ! force new connection ) { / / logger info ( " connection closed : : { } " , connection is closed ( ) ) ; if ( ! connection is closed ( ) ) { if ( logger is debug enabled ( ) ) { logger debug ( " returning existing connection : : { } " , connection ) ; } return connection ; } } string db u r l = get database url ( database configuration ) ; class for name ( type get class path ( ) ) ; / / logger info ( " * * * type get class path ( ) : : { } , { } * * * * " , type get class path ( ) ) ; driver manager set login timeout ( 10 ) ; connection = driver manager get connection ( db u r l , database configuration get database user ( ) , database configuration get database password ( ) ) ; if ( logger is debug enabled ( ) ) { logger debug ( " * * * acquired new connection for : : { } * * * * " , db u r l ) ; } return connection ; } catch ( class not found exception e ) { logger error ( " jdbc driver not found " , e ) ; throw new database service exception ( e get message ( ) ) ; } catch ( s q l exception e ) { logger error ( " s q l exception : : couldn ' t get a connection ! " , e ) ; throw new database service exception ( true , e get s q l state ( ) , e get error code ( ) , e get message ( ) ) ; } }


indicate whether non - empty contents of this resource can be read via { @ link # get input stream ( ) } will be { @ code true } for typical resource descriptors that exist since it strictly implies { @ link # exists ( ) } semantics as of 5 1 note that actual content reading may still fail when attempted however , a value of { @ code false } is a definitive indication that the resource content cannot be read

default boolean is readable ( ) { return exists ( ) ; }


if one instance is empty , the other " wins " if both instances have conditions , compare them in the order in which they were provided

public int compare to ( composite request condition other , server web exchange exchange ) { if ( is empty ( ) & & other is empty ( ) ) { return 0 ; } else if ( is empty ( ) ) { return 1 ; } else if ( other is empty ( ) ) { return - 1 ; } else { assert number of conditions ( other ) ; for ( int i = 0 ; i < get length ( ) ; i + + ) { int result = this request conditions [ i ] compare to ( other request conditions [ i ] , exchange ) ; if ( result ! = 0 ) { return result ; } } return 0 ; } }


public void set binary stream ( int parameter index , input stream x , int length ) throws s q l exception { }


this method returns the mock object registered under the provided key or null if there is no object for the provided key

public static object get ( object key ) { return get mocks ( ) get ( key ) ; }


estimation of the memory usage by index writer

public long get index writer memory in bytes ( ) { return this index writer memory in bytes ; }


deletes all temporary files created for contained packaged libraries

public void delete extracted libraries ( ) { delete extracted libraries ( this extracted temp libraries ) ; this extracted temp libraries clear ( ) ; }


public status enum get status ( ) { return status ; }


peeks into the cache ' s internals to verify that its eviction queue is consistent verifies that the prevnext links are correct , and that all items in each segment are also in that segment ' s eviction ( recency ) queue

static void check eviction ( cache < ? , ? > cache ) { if ( has local cache ( cache ) ) { check eviction ( to local cache ( cache ) ) ; } }


gets the length or remaining length of the current split

public long get split length ( ) { return split length ; }


assume following scenario : indexing request is written to primary , but fails to be replicated to active replica the primary instructs master to fail replica before acknowledging write to client in the meanwhile , the node of the replica was removed from the cluster ( disassociate dead nodes ) this means that the shard routing of the replica was failed , but it ' s allocation id is still part of the in - sync set we have to make sure that the fail shard request from the primary removes the allocation id from the in - sync set

public void test dead nodes before replica failed ( ) throws exception { cluster state cluster state = create one primary one replica cluster state ( allocation ) ; logger info ( " remove replica node " ) ; index shard routing table shard routing table = cluster state routing table ( ) index ( " test " ) shard ( 0 ) ; shard routing replica shard = shard routing table replica shards ( ) get ( 0 ) ; cluster state = cluster state builder ( cluster state ) nodes ( discovery nodes builder ( cluster state nodes ( ) ) remove ( replica shard current node id ( ) ) ) build ( ) ; cluster state = allocation disassociate dead nodes ( cluster state , true , " reroute " ) ; assert that ( cluster state metadata ( ) index ( " test " ) in sync allocation ids ( 0 ) size ( ) , equal to ( 2 ) ) ; logger info ( " fail replica ( for which there is no shard routing in the cs anymore ) " ) ; assert null ( cluster state get routing nodes ( ) get by allocation id ( replica shard shard id ( ) , replica shard allocation id ( ) get id ( ) ) ) ; shard state action shard failed cluster state task executor failed cluster state task executor = new shard state action shard failed cluster state task executor ( allocation , null , logger ) ; long primary term = cluster state metadata ( ) index ( " test " ) primary term ( 0 ) ; cluster state = failed cluster state task executor execute ( cluster state , arrays as list ( new failed shard entry ( shard routing table shard id ( ) , replica shard allocation id ( ) get id ( ) , primary term , " dummy " , null , true ) ) ) resulting state ; assert that ( cluster state metadata ( ) index ( " test " ) in sync allocation ids ( 0 ) size ( ) , equal to ( 1 ) ) ; }


subscribes to the source and calls the given actions on the current thread

public static < t > void subscribe ( publisher < ? extends t > o , final consumer < ? super t > on next , final consumer < ? super throwable > on error , final action on complete ) { objects require non null ( on next , " on next is null " ) ; objects require non null ( on error , " on error is null " ) ; objects require non null ( on complete , " on complete is null " ) ; subscribe ( o , new lambda subscriber < t > ( on next , on error , on complete , functions request max ) ) ; }


set the list of acceptable { @ linkplain locale locales } , as specified by the { @ code accept - languages } header

b accept language as locales ( locale acceptable locales ) ;


sleep a bit between the tests ( we are re - using the yarn cluster for the tests )

public void shutdown yarn client ( ) { yarn client stop ( ) ; }


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


decommission or perform maintenance for data nodes and wait for them to reach the expected state

protected datanode info take node outof service ( int nn index , string datanode uuid , long maintenance expiration in m s , array list < datanode info > decommissioned nodes , admin states wait for state ) throws i o exception { return take node outof service ( nn index , datanode uuid , maintenance expiration in m s , decommissioned nodes , null , wait for state ) ; }


create an object for the given class and initialize it from conf

public static < t > t new instance ( class < t > the class , configuration conf ) { return new instance ( the class , conf , empty array ) ; }


this method ignores signs of the left and right returns overflow value

private static long add unsigned return overflow ( slice left , slice right , slice result , boolean result negative ) { / / todo : consider two 7 bytes operations int l 0 = get int ( left , 0 ) ; int l 1 = get int ( left , 1 ) ; int l 2 = get int ( left , 2 ) ; int l 3 = get int ( left , 3 ) ; int r 0 = get int ( right , 0 ) ; int r 1 = get int ( right , 1 ) ; int r 2 = get int ( right , 2 ) ; int r 3 = get int ( right , 3 ) ; long intermediate result ; intermediate result = ( l 0 & long mask ) + ( r 0 & long mask ) ; int z 0 = ( int ) intermediate result ; intermediate result = ( l 1 & long mask ) + ( r 1 & long mask ) + ( intermediate result > > > 32 ) ; int z 1 = ( int ) intermediate result ; intermediate result = ( l 2 & long mask ) + ( r 2 & long mask ) + ( intermediate result > > > 32 ) ; int z 2 = ( int ) intermediate result ; intermediate result = ( l 3 & long mask ) + ( r 3 & long mask ) + ( intermediate result > > > 32 ) ; int z 3 = ( int ) intermediate result & ( ~ sign int mask ) ; pack ( result , z 0 , z 1 , z 2 , z 3 , result negative ) ; return intermediate result > > 31 ; }


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


protected int get normal layout res id ( ) { return item common binder layout ; }


public void set result message ( object obj ) { origin complete ( obj ) ; }


v2 list api variant of { @ link # restore list objects ( list objects request , object listing ) }

private list objects v 2 result restore list objects v 2 ( list objects v 2 request request , list objects v 2 result result ) { list < s 3 object summary > output list = result get object summaries ( ) ; list < string > output prefixes = result get common prefixes ( ) ; / / recursive list has no delimiter , returns everything that matches a / / prefix boolean recursive object list = ! ( " / " equals ( request get delimiter ( ) ) ) ; string prefix = request get prefix ( ) ; restore deleted ( output list , output prefixes , recursive object list , prefix ) ; return new custom list objects v 2 result ( result , output list , output prefixes ) ; }


clear the cancellation so that this task monitor may be reused


public int compare to ( prototype other ) { if ( this = = other ) { return 0 ; } / * * the return type is the major order , and then args in order , * and then the shorter list comes first ( similar to string * sorting ) * / int result = return type compare to ( other return type ) ; if ( result ! = 0 ) { return result ; } int this size = parameter types size ( ) ; int other size = other parameter types size ( ) ; int size = math min ( this size , other size ) ; for ( int i = 0 ; i < size ; i + + ) { type this type = parameter types get ( i ) ; type other type = other parameter types get ( i ) ; result = this type compare to ( other type ) ; if ( result ! = 0 ) { return result ; } } if ( this size < other size ) { return - 1 ; } else if ( this size > other size ) { return 1 ; } else { return 0 ; } }


public static configuration create server s s l config ( string server k s , string password , string key password , string trust k s , string trust password , string exclude ciphers ) throws i o exception { return create s s l config ( s s l factory mode server , server k s , password , key password , trust k s , trust password , exclude ciphers ) ; }


starts all test threads that have been added so far

public void start threads ( ) { for ( testing thread t : test threads ) { t start ( ) ; } }


called when the view switches from an idle state to a dragged state , as the user begins a drag interaction with it you can use this callback to modify the view to indicate it is being dragged this is the first callback in the lifecycle of a drag event

void on drag started ( t model , view item view , int adapter position ) ;


returns { @ code true } if key names present at @ left , appearing in prefix order at @ right

public boolean is ordered subset ( ) { return is ordered subset ; }


boolean can convert ( class < t > target type ) ;


build a { @ link mock mvc } instance by registering one or more { @ code @ controller } instances and configuring spring mvc infrastructure programmatically this allows full control over the instantiation and initialization of controllers and their dependencies , similar to plain unit tests while also making it possible to test one controller at a time when this builder is used , the minimum infrastructure required by the { @ link org springframework web servlet dispatcher servlet dispatcher servlet } to serve requests with annotated controllers is created automatically and can be customized , resulting in configuration that is equivalent to what mvc java configuration provides except using builder - style methods if the spring mvc configuration of an application is relatively straight - forward & mdash ; for example , when using the mvc namespace in xml or mvc java config & mdash ; then using this builder might be a good option for testing a majority of controllers in such cases , a much smaller number of tests can be used to focus on testing and verifying the actual spring mvc configuration

public static standalone mock mvc builder standalone setup ( object controllers ) { return new standalone mock mvc builder ( controllers ) ; }


protected message context decode soap request ( final http servlet request request ) { try { val decoder = new h t t p s o a p 1 1 decoder ( ) ; decoder set parser pool ( saml profile handler configuration context get open saml config bean ( ) get parser pool ( ) ) ; decoder set http servlet request ( request ) ; val binding = new binding descriptor ( ) ; binding set id ( get class ( ) get name ( ) ) ; binding set short name ( get class ( ) get name ( ) ) ; binding set signature capable ( true ) ; binding set synchronous ( true ) ; decoder set binding descriptor ( binding ) ; decoder initialize ( ) ; decoder decode ( ) ; return decoder get message context ( ) ; } catch ( final exception e ) { logging utils error ( logger , e ) ; } return null ; }


the value of the this class item must be a valid index into the constant pool table the constant pool entry at that index must be a constant class info ( ? 4 4 1 ) structure representing the class or interface defined by this class file

public int get this class ( ) { return this class & 0xffff ; }


returns an execution decorator that synchronizes each invocation on a given object

static synchronized stream task action executor synchronized executor ( object mutex ) { return new synchronized stream task action executor ( mutex ) ; }


iterates over the user - supplied files and folders , saving the discovered files and subfolders and their files into { @ link # files to delete } and { @ link # folders to delete }

private boolean preprocess start files and folders ( task monitor monitor ) { try { long start ts = system current time millis ( ) ; monitor initialize ( start files size ( ) ) ; monitor set message ( " checking files " ) ; for ( domain file file : start files ) { monitor check canceled ( ) ; preprocess file ( file , monitor ) ; monitor increment progress ( 1 ) ; } / / recursively check all files in the folders given to this task monitor = new unknown progress wrapping task monitor ( monitor , math max ( start folders size ( ) , 1 ) ) ; monitor set message ( " checking folders " ) ; for ( domain folder folder : start folders ) { monitor check canceled ( ) ; preprocess folder ( folder , monitor ) ; } long end ts = system current time millis ( ) ; elapsed time + = ( end ts - start ts ) ; return true ; } catch ( cancelled exception ce ) { return false ; } }


equivalent to { @ code ! get successors ( ) is empty ( ) } but possibly more efficient

public boolean has successors ( ) { return ! this succs get ( ) is empty ( ) ; }


invalidate the active keystore and key manager

static synchronized void invalidate trust managers ( ) { trust manager = null ; ca error = null ; }


test if this { @ code profiles } instance matches against the given active profiles predicate

boolean matches ( predicate < string > active profiles ) ;


public void do map ( stapler request req , stapler response rsp ) throws i o exception { if ( req check if modified ( timestamp , rsp ) ) return ; chart rendering info info = new chart rendering info ( ) ; render ( req , info ) ; rsp set content type ( " text / plain ; charset = utf - 8 " ) ; rsp get writer ( ) println ( chart utilities get image map ( " map " , info ) ) ; }


< code > optional aapt pb string str = 2 ; < code >

public builder merge str ( com android aapt resources string value ) { copy on write ( ) ; instance merge str ( value ) ; return this ; }


public test enum parameters oper resp spec ( consumer < response spec builder > resp spec customizer ) { resp spec customizer accept ( resp spec ) ; return this ; }


begin connecting to the given node , return true if we are already connected and ready to send to that node

public boolean ready ( node node , long now ) { if ( node is empty ( ) ) throw new illegal argument exception ( " cannot connect to empty node " + node ) ; if ( is ready ( node , now ) ) return true ; if ( connection states can connect ( node id string ( ) , now ) ) / / if we are interested in sending to a node and we don ' t have a connection to it , initiate one initiate connect ( node , now ) ; return false ; }


get the names of all events produced by plugins in the tool

public string [ ] get events produced ( ) { return producer map key set ( ) to array ( new string [ producer map size ( ) ] ) ; }


destroys the singleton testing allocator and throws an error if any of the buffers allocated by it have been leaked attempts to print leak details to standard error before throwing , by using netty ' s built - in leak tracking note that this might not always work , since it only triggers when a buffer is garbage - collected and calling system gc ( ) does not guarantee that a buffer will actually be gc ' ed this should be called at the end of a unit test ' s tear down ( ) method

public static void check for leaks ( ) { test byte buf allocator result = instance get and set ( null ) ; if ( result ! = null ) { result check instance for leaks ( ) ; } }


protected void set output reader class ( class < ? extends output reader > output reader class ) { this output reader class = output reader class ; }


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


calculates the maximum size allowed before rehashing

private int calc max size ( int capacity ) { / / clip the upper bound so that there will always be at least one available slot int upper bound = capacity - 1 ; return math min ( upper bound , ( int ) ( capacity * load factor ) ) ; }


public immutable map < aspect key , configured aspect > get aspects map ( ) { return aspects ; }


the synthetic constructor for a private constructor

public final method key bridge of constructor ( class name nest companion ) { check state ( is constructor ( ) , " expect to use for a constructor but is % s " , this ) ; type companion class type = nest companion to asm object type ( ) ; immutable list < type > argument types = get argument types ( ) ; immutable list < type > bridge constructor arg types = immutable list < type > builder ( ) add all ( argument types ) add ( companion class type ) build ( ) ; return create ( owner ( ) , name ( ) , type get method descriptor ( get return type ( ) , bridge constructor arg types to array ( new type [ 0 ] ) ) ) ; }