determines if the mouse is hovering on a column resizer and changes the pointer and sets field appropriately also checks if mouse if hovering on a column sorter control

private void handle hover on column header ( int x , int y ) { boolean over sorter = false , over resizer = false , over filter = false ; hovering on header = false ; boolean over icon = false ; if ( y < = header height ) { int x 2 = 0 ; if ( row header visible ) { x 2 + = row header width ; } x 2 - = get h scroll selection in pixels ( ) ; if ( x < x 2 ) { int lt sort = get content provider ( ) get sort order ( null ) ; if ( lt sort ! = swt none & & x > x 2 - grid column renderer sort width - grid column renderer arrow margin & & x < x 2 - grid column renderer arrow margin & & y > grid column renderer top margin ) { column being sorted = null ; over sorter = true ; } } else { if ( x > get row header width ( ) ) { for ( grid column column : columns ) { if ( x > = x 2 & & x < = x 2 + column get width ( ) ) { hovering on header = true ; if ( column is over sort arrow ( x - x 2 , y ) ) { over sorter = true ; column being sorted = column ; break ; } if ( column is over filter button ( x - x 2 , y ) ) { column being filtered = column ; over filter = true ; break ; } if ( column is over icon ( x , y ) ) { over icon = true ; break ; } x 2 + = column get width ( ) ; if ( x 2 > = ( x - column resizer threshold ) & & x 2 < = ( x + column resizer threshold ) ) { over resizer = true ; column being resized = column ; break ; } } else { x 2 + = column get width ( ) ; } } } } / / redraw header / / gc gc = new gc ( this ) ; / / try { / / paint header ( gc ) ; / / } catch ( exception e ) { / / gc dispose ( ) ; / / } } else if ( x < = row header width ) { / / hover in row header } if ( over sorter ! = hovering on column sorter ) { if ( over sorter ) { set cursor ( sort cursor ) ; } else { column being sorted = null ; set cursor ( null ) ; } hovering on column sorter = over sorter ; } else if ( over icon ! = hovering on column icon ) { set cursor ( over icon ? sort cursor : null ) ; hovering on column icon = over icon ; } if ( over filter ! = hovering on column filter ) { if ( over filter ) set cursor ( sort cursor ) ; else if ( ! over sorter ) { column being filtered = null ; set cursor ( null ) ; } hovering on column filter = over filter ; } if ( over resizer ! = hovering on column resizer ) { if ( over resizer ) { set cursor ( get display ( ) get system cursor ( swt cursor sizewe ) ) ; } else { column being resized = null ; if ( ! hovering on column sorter ) { set cursor ( null ) ; } } hovering on column resizer = over resizer ; } if ( hovering on header & & ! over sorter & & ! over resizer & & ! over filter ) { hovering on header drag area = true ; } else { hovering on header drag area = false ; } }


assert that { @ code super type is assignable from ( sub type ) } is { @ code true } < pre class = " code " > assert is assignable ( number class , my class ) ;

public static void is assignable ( class < ? > super type , class < ? > sub type ) { is assignable ( super type , sub type , " " ) ; }


removes and returns all { @ link response context } instances that match the predicate

public list < response context < ? extends transport response > > prune ( predicate < response context < ? extends transport response > > predicate ) { final list < response context < ? extends transport response > > holders = new array list < > ( ) ; for ( map entry < long , response context < ? extends transport response > > entry : handlers entry set ( ) ) { response context < ? extends transport response > holder = entry get value ( ) ; if ( predicate test ( holder ) ) { response context < ? extends transport response > remove = handlers remove ( entry get key ( ) ) ; if ( remove ! = null ) { holders add ( holder ) ; } } } return holders ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit function name ( sql base parser function name context ctx ) { }


attempt to capture the view with the given pointer id the callback will be involved this will put us into the " dragging " state if we ' ve already captured this view with this pointer this method will immediately return true without consulting the callback

boolean try capture view for drag ( view to capture , int pointer id ) { if ( to capture = = m captured view & & m active pointer id = = pointer id ) { / / already done ! return true ; } if ( to capture ! = null & & m callback try capture view ( to capture , pointer id ) ) { m active pointer id = pointer id ; capture child view ( to capture , pointer id ) ; return true ; } return false ; }


public static void notify system to scan ( final string file path ) { notify system to scan ( get file by path ( file path ) ) ; }


create property matches for the given field property

public static property matches for field ( string property name , class < ? > bean class , int max distance ) { return new field property matches ( property name , bean class , max distance ) ; }


this will timeout immediately and raise a timeout exception

public void test intercept future timeout ( ) throws throwable { completable future < string > future = new completable future < > ( ) ; intercept ( timeout exception class , " " , ( ) - > intercept future ( i o exception class , " oops " , 1 , time unit nanoseconds , future ) ) ; }


this is how the i ds were formed in v 5 4

public static string v 5 4 document id ( string job id ) { return job id + " - " + type ; }


returns the row containing the given field location

private int find row ( field location loc ) { for ( int i = 0 ; i < layouts length ; i + + ) { if ( loc field num < offsets [ i + 1 ] ) { return i ; } } return 0 ; }


public void test seek and read past end of file ( ) throws throwable { instream = fs open ( read file ) ; assert equals ( 0 , instream get pos ( ) ) ; / / expect that seek to 0 works / / go just before the end instream seek ( seek file len - 2 ) ; assert true ( " premature eof " , instream read ( ) ! = - 1 ) ; assert true ( " premature eof " , instream read ( ) ! = - 1 ) ; assert minus one ( " read past end of file " , instream read ( ) ) ; }


returns true if the this data object has a filter that is a suitable starting point for the given filter

private boolean has parent filter of ( table filter < row object > filter ) { if ( table filter = = null ) { return false ; / / no filter - - can ' t be a sub - filter } if ( filter = = null ) { return false ; / / no previous filter - - can ' t be a sub - filter } boolean is sub filter = filter is sub filter of ( table filter ) ; return is sub filter ; }


evaluates this argument fragment into an argument string and adds it into { @ code builder } the enclosed tree artifact will be expanded using { @ code artifact expander }

abstract void eval ( immutable list builder < string > builder , artifact expander artifact expander ) ;


returns a { @ code spliterator } over the elements of { @ code from spliterator } mapped by { @ code function }

static < in element t , out element t > spliterator < out element t > map ( spliterator < in element t > from spliterator , function < ? super in element t , ? extends out element t > function ) { check not null ( from spliterator ) ; check not null ( function ) ; return new spliterator < out element t > ( ) { @ override public boolean try advance ( consumer < ? super out element t > action ) { return from spliterator try advance ( from element - > action accept ( function apply ( from element ) ) ) ; } @ override public void for each remaining ( consumer < ? super out element t > action ) { from spliterator for each remaining ( from element - > action accept ( function apply ( from element ) ) ) ; } @ override public spliterator < out element t > try split ( ) { spliterator < in element t > from split = from spliterator try split ( ) ; return ( from split ! = null ) ? map ( from split , function ) : null ; } @ override public long estimate size ( ) { return from spliterator estimate size ( ) ; } @ override public int characteristics ( ) { return from spliterator characteristics ( ) & ~ ( spliterator distinct | spliterator nonnull | spliterator sorted ) ; } } ; }


returns the name of this dimensioned array

public string get name ( ) { return name ; }


returns an array containing each value of { @ code collection } , converted to a { @ code short } value in the manner of { @ link number # short value } elements are copied from the argument collection as if by { @ code collection to array ( ) } calling this method is as thread - safe as calling that method

public static short [ ] to array ( collection < ? extends number > collection ) { if ( collection instanceof short array as list ) { return ( ( short array as list ) collection ) to short array ( ) ; } object [ ] boxed array = collection to array ( ) ; int len = boxed array length ; short [ ] array = new short [ len ] ; for ( int i = 0 ; i < len ; i + + ) { / / check not null for gwt ( do not optimize ) array [ i ] = ( ( number ) check not null ( boxed array [ i ] ) ) short value ( ) ; } return array ; }


method called when the action is invoked

public void action performed ( action context context ) { int user choice = option dialog show option dialog ( panel , " remove all fields ? " , " there is no undo for this action \ n " + " are you sure you want to remove all fields ? " , " continue " , option dialog warning message ) ; if ( user choice = = option dialog cancel option ) { return ; } panel set tab lock ( true ) ; field header location loc = ( field header location ) context get context object ( ) ; field format model model at location = loc get model ( ) ; model at location remove all factories ( ) ; }


removes the embedded console notes in the given log lines

public static list < string > remove notes ( collection < string > log lines ) { list < string > r = new array list < > ( log lines size ( ) ) ; for ( string l : log lines ) r add ( remove notes ( l ) ) ; return r ; }


edge - case when there are no spans , or instrumentation isn ' t logging annotations properly

@ test protected void empty ( ) throws exception { assert that ( store ( ) get dependencies ( today , day ) execute ( ) ) is empty ( ) ; }


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


select the accept header ' s value from the given accepts array : if json exists in the given array , use it ; otherwise use all of them ( joining into a string )

public string select header accept ( string [ ] accepts ) { if ( accepts length = = 0 ) { return null ; } for ( string accept : accepts ) { if ( is json mime ( accept ) ) { return accept ; } } return string util join ( accepts , " , " ) ; }


test a getters of task attempt finished event and task attempt finished

public void test task attempt finished event ( ) throws exception { job i d jid = new job i d ( " 001 " , 1 ) ; task i d tid = new task i d ( jid , task type reduce , 2 ) ; task attempt i d task attempt id = new task attempt i d ( tid , 3 ) ; counters counters = new counters ( ) ; task attempt finished event test = new task attempt finished event ( task attempt id , task type reduce , " test " , 123l , " rakname " , " hostname " , " status " , counters , 234 ) ; assert that ( test get attempt id ( ) to string ( ) ) is equal to ( task attempt id to string ( ) ) ; assert that ( test get counters ( ) ) is equal to ( counters ) ; assert that ( test get finish time ( ) ) is equal to ( 123l ) ; assert that ( test get hostname ( ) ) is equal to ( " hostname " ) ; assert that ( test get rack name ( ) ) is equal to ( " rakname " ) ; assert that ( test get state ( ) ) is equal to ( " status " ) ; assert that ( test get task id ( ) ) is equal to ( tid ) ; assert that ( test get task status ( ) ) is equal to ( " test " ) ; assert that ( test get task type ( ) ) is equal to ( task type reduce ) ; assert equals ( 234 , test get start time ( ) ) ; }


returns the expected content encoding of the decoded content this get method returns { @ code " identity " } by default , which is the case for most decompressors

protected char sequence get target content encoding ( @ suppress warnings ( " unused parameters " ) char sequence content encoding ) throws http 2 exception { return identity ; }


evaluates the mapping rule using the provided variable context for placement results we check if the placement is valid , and in case of invalid placements we use the rule ' s fallback settings to get the result

private mapping rule result evaluate rule ( mapping rule rule , variable context variables ) { mapping rule result result = rule evaluate ( variables ) ; if ( result get result ( ) = = mapping rule result type place ) { try { result update normalized queue ( validate and normalize queue ( result get queue ( ) , result is create allowed ( ) ) ) ; } catch ( exception e ) { log info ( " cannot place to queue ' { } ' returned by mapping rule " + " reason : { } " , result get queue ( ) , e get message ( ) ) ; result = rule get fallback ( ) ; } } return result ; }


retrieve the batch size for the { @ link hystrix collapser } being invoked at a given percentile percentile capture and calculation is configured via { @ link hystrix collapser properties # metrics rolling statistical window in milliseconds ( ) } and other related properties

public int get batch size percentile ( double percentile ) { return rolling collapser batch size distribution stream get latest percentile ( percentile ) ; }


public map < string , serialized value < optional failure < object > > > get accumulators serialized ( ) { return aggregate user accumulators ( ) entry set ( ) stream ( ) collect ( collectors to map ( map entry : : get key , entry - > serialize accumulator ( entry get key ( ) , entry get value ( ) ) ) ) ; }


static path get snapshot file ( path snapshot root , path file ) { path root parent = snapshot root get parent ( ) ; if ( root parent ! = null & & root parent get name ( ) equals ( " snapshot " ) ) { path snapshot dir = root parent get parent ( ) ; if ( file to string ( ) contains ( snapshot dir to string ( ) ) & & ! file equals ( snapshot dir ) ) { string file name = file to string ( ) substring ( snapshot dir to string ( ) length ( ) + 1 ) ; path snapshot file = new path ( snapshot root , file name ) ; return snapshot file ; } } return null ; }


the sink node making the request < code > istio mcp v 1alpha 1 sink node sink node = 2 ; < code >

public builder clear sink node ( ) { if ( sink node builder = = null ) { sink node = null ; on changed ( ) ; } else { sink node = null ; sink node builder = null ; } return this ; }


returns a function that accepts a supplier and returns the result of invoking { @ link supplier # get } on that supplier < b > java 8 users : < b > use the method reference { @ code supplier : : get } instead

public static < t > function < supplier < t > , t > supplier function ( ) { @ suppress warnings ( " unchecked " ) / / implementation is " fully variant " supplier function < t > sf = ( supplier function < t > ) supplier function impl instance ; return sf ; }


returns the value of this { @ code unsigned long } as an { @ code int }

public int int value ( ) { return ( int ) value ; }


protected result check ( ) throws exception { try ( connection connection = pool get connection ( check timeout ms ) ) { return result healthy ( ) ; } catch ( s q l exception e ) { return result unhealthy ( e ) ; } }


submits the provided request , performs the provided { @ code action } and returns a { @ link listenable future } that can be used to cancel the request or monitor its status cancellation is best effort and may result in some resources not being returned back to glide ' s pool in particular , if the request is cancelled after the resource is loaded by glide , but before { @ code action } is run on { @ code executor } , the resource will not be returned we have the unfortunate choice between unsafely returning resources to the pool immediately when cancel is called while they may still be in use via { @ link com google common util concurrent closing future } or occasionally failing to return resources to the pool because failing to return resources to the pool is inefficient , but safe , that ' s the route we ' ve chosen a more sophisticated implementation may allow us to avoid the resource inefficiency if you do not need to interact with resource , use { @ link # preload ( request manager , request builder , executor ) } { @ code preload } is more efficient because it knows that the resource is never used and can always clear the resource immediately on cancellation , unlike this method an example usage : { @ code listenable future < void > future = submit and execute ( request manager , request builder , ( bitmap ) - > do something with bitmap ( bitmap ) , background executor ) ; ; }

public static < t > listenable future < void > submit and execute ( final request manager request manager , request builder < t > request builder , final resource consumer < t > action , executor executor ) { / / if the request completes normally , then the target is cleared and the resource is returned / / if the request fails while loading the image , there ' s no need to clear / / if the request fails while calling the action , the target is cleared and the resource is / / returned / / if the request is cancelled before the resource is loaded , then the resource is returned / / if the request is cancelled after the resource is loaded but before the transform runs , / / then the resource is dropped ( but not leaked ) / / if the request is cancelled after the transform method starts , then the resource is returned return fluent future from ( submit internal ( request builder ) ) transform ( new function < target and result < t > , void > ( ) { @ override public void apply ( target and result < t > target and result ) { try { action act ( target and result result ) ; } finally { request manager clear ( target and result target ) ; } return null ; } } , executor ) ; }


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


return { @ code true } if this method is a meta method otherwise , return { @ code false }

public static boolean is meta method ( method method ) { string name = method get name ( ) ; if ( ! ( name starts with ( " get " ) | | name starts with ( " is " ) ) ) { return false ; } if ( " get " equals ( name ) ) { return false ; } if ( " get class " equals ( name ) ) { return false ; } if ( ! modifier is public ( method get modifiers ( ) ) ) { return false ; } if ( method get parameter types ( ) length ! = 0 ) { return false ; } if ( ! class utils is primitive ( method get return type ( ) ) ) { return false ; } return true ; }


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

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


returns a function that computes the toolchains that should be registered for a repository function

public function < ? super rule , ? extends list < string > > get toolchains to register function ( ) { return toolchains to register function ; }


register a custom version strategy to apply to resource u r ls that match the given path patterns

public version resource resolver add version strategy ( version strategy strategy , string path patterns ) { for ( string pattern : path patterns ) { get strategy map ( ) put ( pattern , strategy ) ; } return this ; }


to test special tags to test special tags and operation id starting with number

public void call 1 2 3test special tags test ( ) throws i o exception { client client = null ; client response = api call 1 2 3test special tags ( client ) ; / / todo : test validations }


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


invoked when a ping fails the given argument is the cause of the failure


returns a new { @ link charset decoder } for the { @ link charset } with specified error actions

public static charset decoder decoder ( charset charset , coding error action malformed input action , coding error action unmappable character action ) { check not null ( charset , " charset " ) ; charset decoder d = charset new decoder ( ) ; d on malformed input ( malformed input action ) on unmappable character ( unmappable character action ) ; return d ; }


returns a scheduler exception wrapping an expected error , e g an error describing an expected build failure when trying to evaluate the given value , that should cause skyframe to produce useful error information to the user

static scheduler exception of error ( error info error info , sky key failed value , set < sky key > rdeps to bubble up to ) { preconditions check not null ( error info ) ; preconditions check not null ( rdeps to bubble up to , " null rdeps : % s % s " , error info , failed value ) ; return new scheduler exception ( error info get exception ( ) , error info , failed value , rdeps to bubble up to ) ; }


applies the given visitor to all parameters

public void parameters accept ( clazz clazz , method method , parameter info visitor parameter info visitor ) { / / loop over all parameters for ( int index = 0 ; index < u 1parameters count ; index + + ) { / / we don ' t need double dispatching here , since there is only one / / type of parameter info parameter info visitor visit parameter info ( clazz , method , index , parameters [ index ] ) ; } }


create user this can only be done by the logged in user < b > 0 < b > - successful operation

public void create user ( user body ) throws rest client exception { create user with http info ( body ) ; }


get the maximum number of elements that will fit this means the undefined bytes available up to the next instruction or end of defined memory

private int get max elements ignore existing ( program program , address addr , int element size ) { / / can ' t go past the end of a block to start with address set view asv = program get memory ( ) ; address range range = asv get range containing ( addr ) ; if ( range = = null ) { return 0 ; } address max address = range get max address ( ) ; instruction instruction after = program get listing ( ) get instruction after ( addr ) ; if ( instruction after ! = null & & max address compare to ( instruction after get address ( ) ) > 0 ) { max address = instruction after get address ( ) previous ( ) ; } int length = ( int ) max address subtract ( addr ) + 1 ; if ( length < 0 ) { return 0 ; } return ( length / element size ) ; }


the series of types defined by the package < code > repeated aapt pb type type = 3 ; < code >

public com android aapt resources type get type ( int index ) { return type get ( index ) ; }


remove the cached session bean instance , if necessary

public void destroy ( ) { if ( this cache session bean ) { synchronized ( this bean instance monitor ) { if ( this bean instance instanceof e j b object ) { remove session bean instance ( ( e j b object ) this bean instance ) ; } } } }


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


create a new jms session for this jms invoker

protected session create session ( connection con ) throws j m s exception { return con create session ( false , session auto acknowledge ) ; }


get a stored checkpoint , requires the transform id as well as the checkpoint id

void get transform checkpoint ( string transform id , long checkpoint , action listener < transform checkpoint > result listener ) ;


sets the active state of the fid file fid files that are not active will not be used when function id analysis is performed

public void set active ( boolean b ) { this is active = b ; fid file manager active state changed ( this ) ; }


invoked with the command is unsubscribed before a terminal state

public < t > void on unsubscribe ( hystrix invokable < t > command instance ) { / / do nothing by default }


return the number of bytes that large input files should be optimally be split into to minimize io time the given path will be used to locate the actual filesystem the full path does not have to exist

public long get default block size ( path f ) { return get default block size ( ) ; }


add the given scope to this configurer ' s map of scopes

public void add scope ( string scope name , scope scope ) { if ( this scopes = = null ) { this scopes = new linked hash map < > ( 1 ) ; } this scopes put ( scope name , scope ) ; }


test that non - positive numbers are not counted

public void test add non positive stats ( ) throws exception { min max avg stats mma = new min max avg stats ( ) ; mma add ( - 1 ) ; assert equals ( 0 , mma get minimum ( ) ) ; assert equals ( 0 , mma get maximum ( ) ) ; assert equals ( 0 , mma get sum ( ) ) ; assert equals ( 0 , mma get count ( ) ) ; assert equals ( 0 , mma get average ( ) ) ; mma add ( 0 ) ; assert equals ( 0 , mma get minimum ( ) ) ; assert equals ( 0 , mma get maximum ( ) ) ; assert equals ( 0 , mma get sum ( ) ) ; assert equals ( 1 , mma get count ( ) ) ; assert equals ( 0 , mma get average ( ) ) ; }


public user get user ( ) throws i o exception { synchronized ( server adapter ) { check repository ( ) ; try { if ( user = = null ) { user = repository get user ( ) ; } return user ; } catch ( not connected exception | remote exception e ) { if ( recover connection ( e ) ) { return get user ( ) ; } throw e ; } } }


formats the given date into a string this is in contrast to { @ link # format date timestamp ( date ) } , which will also return the time portion of the date

public static string format date ( date date ) { return date formatter format ( to local date ( date ) ) ; }


private void set options for split large file ( ) { if ( blocks per chunk < = 0 ) { return ; } log info ( " enabling preserving blocksize since " + dist cp option switch blocks per chunk get switch ( ) + " is passed " ) ; preserve ( file attribute blocksize ) ; log info ( " set " + dist cp option switch append get switch ( ) + " to false since " + dist cp option switch blocks per chunk get switch ( ) + " is passed " ) ; this append = false ; }


swallow - result - > background - thread hand - off - > multiplex - > encoded cache - > disk cache - > ( webp transcode ) - > network fetch

private synchronized producer < void > get network fetch to encoded memory prefetch sequence ( ) { if ( fresco systrace is tracing ( ) ) { fresco systrace begin section ( " producer sequence factory # get network fetch to encoded memory prefetch sequence " ) ; } if ( m network fetch to encoded memory prefetch sequence = = null ) { if ( fresco systrace is tracing ( ) ) { fresco systrace begin section ( " producer sequence factory # get network fetch to encoded memory prefetch sequence : init " ) ; } m network fetch to encoded memory prefetch sequence = m producer factory new swallow result producer ( get background network fetch to encoded memory sequence ( ) ) ; if ( fresco systrace is tracing ( ) ) { fresco systrace end section ( ) ; } } if ( fresco systrace is tracing ( ) ) { fresco systrace end section ( ) ; } return m network fetch to encoded memory prefetch sequence ; }


public void write ( data output output ) throws i o exception { text write string ( output , this lower bound clause ) ; text write string ( output , this upper bound clause ) ; }


returns the version the index was created on

public version get index version created ( ) { return version ; }


public list < t > get records ( ) { return this records ; }


calls the { @ link # detect handlers ( ) } method in addition to the superclass ' s initialization

public void init application context ( ) throws application context exception { super init application context ( ) ; detect handlers ( ) ; }


convert a long value to a { @ link offset date time }

public static offset date time offset date time from timestamp ( final long value ) { return value = = null ? null : offset date time of instant ( instant of epoch milli ( value ) , zone offset utc ) ; }


finds or creates a methodref constant constant pool entry with the given class name , method name , and descriptor

public int add methodref constant ( string class name , string name , string descriptor , clazz referenced class , member referenced member ) { return add methodref constant ( class name , add name and type constant ( name , descriptor ) , referenced class , referenced member ) ; }


register a { @ link data binding method resolver } for instance method invocation purposes ( i e not supporting static methods ) in addition to the specified property accessors , typically in combination with a { @ link data binding property accessor }

public builder with instance methods ( ) { this resolvers = collections singleton list ( data binding method resolver for instance method invocation ( ) ) ; return this ; }


set the first incoming edge of v to be e it is assumed that v has already been added to the graph

void set first incoming edge ( vertex v , edge e ) { try { first incoming edge [ index ( v ) ] = e ; } catch ( array index out of bounds exception exc ) { msg error ( this , " no value exception in set first incoming edge ( ) " + " \ t vertex : " + v to string ( ) + " \ t edge : " + e to string ( ) , exc ) ; } }


remove a node update node counter and rack counter if necessary

public void remove ( node node ) { if ( node = = null ) return ; if ( node instanceof inner node ) { throw new illegal argument exception ( " not allow to remove an inner node : " + node base get path ( node ) ) ; } log info ( " removing a node : " + node base get path ( node ) ) ; netlock write lock ( ) lock ( ) ; try { if ( cluster map remove ( node ) ) { node node group = get node ( node get network location ( ) ) ; if ( node group = = null ) { node group = factory new inner node ( node get network location ( ) ) ; } inner node rack = ( inner node ) get node ( node group get network location ( ) ) ; if ( rack = = null ) { num of racks - - ; } } if ( log is debug enabled ( ) ) { log debug ( " network topology became : \ n " + this to string ( ) ) ; } } finally { netlock write lock ( ) unlock ( ) ; } }


sets next field with volatile write semantics ( see above about use of put ordered object )

final void set next ( hash entry < k , v > n ) { unsafe put ordered object ( this , next offset , n ) ; }


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


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


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


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


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

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


following aspect j semantics , if a returning clause was specified , then the advice is only invoked if the returned value is an instance of the given returning type and generic type parameters , if any , match the assignment rules if the returning type is object , the advice is always invoked

private boolean should invoke on return value of ( method method , @ nullable object return value ) { class < ? > type = get discovered returning type ( ) ; type generic type = get discovered returning generic type ( ) ; / / if we aren ' t dealing with a raw type , check if generic parameters are assignable return ( matches return value ( type , method , return value ) & & ( generic type = = null | | generic type = = type | | type utils is assignable ( generic type , method get generic return type ( ) ) ) ) ; }


return whether existing transactions should be validated before participating in them

public final boolean is validate existing transaction ( ) { return this validate existing transaction ; }


public void set user limit factor ( float user limit factor ) { this user limit factor = user limit factor ; }


public list < integer > get prefix ns wrapped array ( ) { return prefix ns wrapped array ; }


the directory lock dir lock provided redundant locking it has been used whenever namesystem fs lock was used dir lock is now removed and utility methods to acquire and release dir lock remain as placeholders only

void read lock ( ) { assert namesystem has read lock ( ) : " should hold namesystem read lock " ; }


gets the base address of the type table the base address is the last byte ( maximum address ) of the type table the type table is ordered in reverse

public address get t type base address ( ) { return ttype addr ; }


start an assertion chain on a required minimum statistic

public static abstract long assert < ? > assert that statistic minimum ( final i o statistics stats , final string key ) { return assert that statistic long ( minimum , key , verify statistics not null ( stats ) minimums ( ) ) ; }


returns the string representation of this { @ code locale } it consists of the language code , country code and variant separated by underscores if the language is missing the string begins with an underscore if the country is missing there are 2 underscores between the language and the variant the variant cannot stand alone without a language andor country code : in this case this method would return the empty string examples : " en " , " en us " , " us " , " en posix " , " en us posix "

public final string to string ( ) { string result = cached to string result ; if ( result = = null ) { result = cached to string result = to new string ( language code , country code , variant code ) ; } return result ; }


finds the index of the entry greater or equal to v

public int ceil ( int v ) { return boundary ceil apply ( find ( v ) ) ; }


tries to set name of the given { @ link thread } , returns true if successful

private static boolean try set name ( final string thread name , thread current thread ) { / * * set name should usually succeed , but the security manager can prohibit it is there a way to * see if we have the modify thread permission without catching an exception ? * / try { current thread set name ( thread name ) ; return true ; } catch ( security exception e ) { return false ; } }


returns the integer array of < code > n elements < code > starting at < code > index < code >

public int [ ] read int array ( long index , int n elements ) throws i o exception { if ( n elements < 0 ) { throw new i o exception ( " invalid number of elements specified : " + n elements ) ; } int [ ] arr = new int [ n elements ] ; for ( int i = 0 ; i < n elements ; + + i ) { arr [ i ] = read int ( index ) ; index + = sizeof int ; } return arr ; }


returns whether this instance matches the provided http request

boolean is for ( http method method , immutable list < string > parts ) { if ( ! this method equals ( method ) ) { return false ; } if ( parts size ( ) ! = this path segments size ( ) ) { return false ; } for ( int i = 0 ; i < parts size ( ) ; + + i ) { string req part = parts get ( i ) ; string spec part = path segments get ( i ) ; if ( ! ( spec part starts with ( " : " ) | | spec part equals ( req part ) ) ) { return false ; } } return true ; }


returns { @ code true } if { @ code tcp fastopen connect } is enabled , { @ code false } otherwise

public boolean is tcp fast open connect ( ) { try { return ( ( epoll socket channel ) channel ) socket is tcp fast open connect ( ) ; } catch ( i o exception e ) { throw new channel exception ( e ) ; } }


start writing to the log segment with the given txid transitions from between log segments state to in log segment state

private void start log segment ( final long segment tx id , int layout version ) throws i o exception { assert thread holds lock ( this ) ; log info ( " starting log segment at " + segment tx id ) ; preconditions check argument ( segment tx id > 0 , " bad txid : % s " , segment tx id ) ; preconditions check state ( state = = state between log segments , " bad state : % s " , state ) ; preconditions check state ( segment tx id > cur segment tx id , " cannot start writing to log segment " + segment tx id + " when previous log segment started at " + cur segment tx id ) ; preconditions check argument ( segment tx id = = txid + 1 , " cannot start log segment at txid % s when next expected " + " txid is % s " , segment tx id , txid + 1 ) ; num transactions = 0 ; total time transactions = 0 ; num transactions batched in sync set ( 0l ) ; / / todo no need to link this back to storage anymore ! / / see hdfs - 2174 storage attempt restore removed storage ( ) ; try { edit log stream = journal set start log segment ( segment tx id , layout version ) ; } catch ( i o exception ex ) { final string msg = " unable to start log segment " + segment tx id + " : too few journals successfully started " ; log error ( msg , ex ) ; synchronized ( journal set lock ) { i o utils cleanup with logger ( log , journal set ) ; } terminate ( 1 , msg ) ; } cur segment tx id = segment tx id ; state = state in segment ; }


public void set ocsp response ( byte [ ] response ) { if ( ! enable ocsp ) { throw new illegal state exception ( " ocsp stapling is not enabled " ) ; } if ( client mode ) { throw new illegal state exception ( " not a server s s l engine " ) ; } synchronized ( this ) { if ( ! is destroyed ( ) ) { ssl set ocsp response ( ssl , response ) ; } } }


returns how the scores from the matching child documents are mapped into the parent document

public score mode score mode ( ) { return score mode ; }


see { @ link mutable configuration # add cache entry listener configuration }

public void add cache entry listener configuration ( cache entry listener configuration < k , v > cache entry listener configuration ) { delegate add cache entry listener configuration ( cache entry listener configuration ) ; }


tests that saslscram clients with invalid password fail authentication with connection close delay if configured

public void test invalid password sasl scram ( ) throws exception { string node = " 0 " ; security protocol security protocol = security protocol sasl ssl ; test jaas config jaas config = configure mechanisms ( " scram - sha - 256 " , collections singleton list ( " scram - sha - 256 " ) ) ; jaas config set client options ( " scram - sha - 256 " , test jaas config username , " invalidpassword " ) ; server = create echo server ( security protocol ) ; create and check client authentication failure ( security protocol , node , " scram - sha - 256 " , null ) ; server verify authentication metrics ( 0 , 1 ) ; }


public final path create snapshot ( path path ) throws i o exception { return create snapshot ( path , null ) ; }


declares that instances of this rule are compatible with the specified environments , in addition to the defaults declared by their environment groups this can be overridden by rule - specific declarations see { @ link com google devtools build lib analysis constraints constraint semantics } for details

public < type > builder compatible with ( label environments ) { add ( attr ( default compatible environment attr , label list ) value ( immutable list copy of ( environments ) ) ) ; return this ; }


get the effective function to which changes will be made this will be the same as function unless it is a thunk in which case the returned function will be the ultimate non - thunk function

private function get affective function ( ) { return function is thunk ( ) ? function get thunked function ( true ) : function ; }


does case - insensitive comparison { @ inherit doc }

@ override public final int compare to ( virtual file o ) { return get name ( ) compare to ignore case ( o get name ( ) ) ; }


returns the { @ link range } that combines two ranges

public range combine ( range that ) { assert ! is independent ( that ) ; return new range ( math min ( this start , that start ) , math max ( this end , that end ) ) ; }


{ @ inherit doc } the default implementation does nothing

@ override public void exit boolean literal ( eql base parser boolean literal context ctx ) { }


protected void place 0 ( section added to , int offset ) { / / encode the data and note the size byte array annotated output out = new byte array annotated output ( ) ; value encoder encoder = new value encoder ( added to get file ( ) , out ) ; encoder write annotation ( annotation , false ) ; encoded form = out to byte array ( ) ; / / add one for the visibility byte in front of the encoded annotation set write size ( encoded form length + 1 ) ; }


get the value of the < code > name < code > property as a < code > class < code > if no such property is specified , then < code > default value < code > is returned

public class < ? > get class ( string name , class < ? > default value ) { string value string = get trimmed ( name ) ; if ( value string = = null ) return default value ; try { return get class by name ( value string ) ; } catch ( class not found exception e ) { throw new runtime exception ( e ) ; } }


iterate over all primary keys sorted based upon the associated index key the iterator is limited to range of index keys of min field through max field , inclusive if at min is true , the iterator is initially positioned before the first index buffer whose index key is greater than or equal to the specified min field value if at min is false , the iterator is initially positioned after the first index buffer whose index key is less than or equal to the specified max field value

public d b field iterator index key iterator ( int column index , field min field , field max field , boolean at min ) throws i o exception { synchronized ( db ) { index table index table = secondary indexes get ( column index ) ; if ( index table = = null ) { throw new i o exception ( " index required ( " + get name ( ) + " , " + column index + " ) " ) ; } return index table key iterator ( min field , max field , at min ) ; } }


public int length ( ) { return value ! = null ? redis constants type length : 0 ; }


parses a string as a date rfc 2445 allows the start and end fields to be of type date ( e g 20081021 ) or date - time ( e g 20081021t123000 for local time , or 20081021t123000z for utc )

private static long parse date ( string when ) throws parse exception { if ( ! date time matcher ( when ) matches ( ) ) { throw new parse exception ( when , 0 ) ; } if ( when length ( ) = = 8 ) { / / show only year / month / day date format format = new simple date format ( " yyyy m mdd " , locale english ) ; / / for dates without a time , for purposes of interacting with android , the resulting timestamp / / needs to be midnight of that day in gmt see : / / http : / / code google com / p / android / issues / detail ? id = 8330 format set time zone ( time zone get time zone ( " gmt " ) ) ; return format parse ( when ) get time ( ) ; } / / the when string can be local time , or utc if it ends with a z if ( when length ( ) = = 16 & & when char at ( 15 ) = = ' z ' ) { long milliseconds = parse date time string ( when substring ( 0 , 15 ) ) ; calendar calendar = new gregorian calendar ( ) ; / / account for time zone difference milliseconds + = calendar get ( calendar zone offset ) ; / / might need to correct for daylight savings time , but use target time since / / now might be in dst but not then , or vice versa calendar set time ( new date ( milliseconds ) ) ; return milliseconds + calendar get ( calendar dst offset ) ; } return parse date time string ( when ) ; }


we only rebuild the journal when it will halve the size of the journal and eliminate at least 2000 ops

private boolean journal rebuild required ( ) { final int redundant op compact threshold = 2000 ; return redundant op count > = redundant op compact threshold / / & & redundant op count > = lru entries size ( ) ; }


reads a long value encoded by utf - 8 encoding

public long read utf 8 encoded long ( ) { int length = 0 ; long value = data [ position ] ; / / find the high most 0 bit for ( int j = 7 ; j > = 0 ; j - - ) { if ( ( value & ( 1 < < j ) ) = = 0 ) { if ( j < 6 ) { value & = ( 1 < < j ) - 1 ; length = 7 - j ; } else if ( j = = 7 ) { length = 1 ; } break ; } } if ( length = = 0 ) { throw new number format exception ( " invalid utf - 8 sequence first byte : " + value ) ; } for ( int i = 1 ; i < length ; i + + ) { int x = data [ position + i ] ; if ( ( x & 0x c 0 ) ! = 0x 8 0 ) { / / if the high most 0 bit not 7th throw new number format exception ( " invalid utf - 8 sequence continuation byte : " + value ) ; } value = ( value < < 6 ) | ( x & 0x 3 f ) ; } position + = length ; return value ; }


constructs certificate validation context from pem file path and sets contents as inline - bytes

private static final certificate validation context get cert context from path as inline bytes ( string pem file path ) throws i o exception , certificate exception { x 5 0 9 certificate x 5 0 9 cert = test utils load x 5 0 9 cert ( pem file path ) ; return certificate validation context new builder ( ) set trusted ca ( data source new builder ( ) set inline bytes ( byte string copy from ( x 5 0 9 cert get encoded ( ) ) ) ) build ( ) ; }


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

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


private boolean is sticky bit violated ( i node attributes parent , i node attributes inode ) { / / if this user is the directory owner , return if ( parent get user name ( ) equals ( get user ( ) ) ) { return false ; } / / if this user is the file owner , return if ( inode get user name ( ) equals ( get user ( ) ) ) { return false ; } return true ; }


sorts the elements of { @ code array } between { @ code from index } inclusive and { @ code to index } exclusive in descending order

public static void sort descending ( short [ ] array , int from index , int to index ) { check not null ( array ) ; check position indexes ( from index , to index , array length ) ; arrays sort ( array , from index , to index ) ; reverse ( array , from index , to index ) ; }


creates the program ' s { @ link plan } the plan is a description of all data sources , data sinks , and operations and how they interact , as an isolated unit that can be executed with an { @ link pipeline executor } obtaining a plan and starting it with an executor is an alternative way to run a program and is only possible if the program consists only of distributed operations

public plan create program plan ( string job name , boolean clear sinks ) { check not null ( job name ) ; if ( this sinks is empty ( ) ) { if ( was executed ) { throw new runtime exception ( " no new data sinks have been defined since the " + " last execution the last execution refers to the latest call to " + " ' execute ( ) ' , ' count ( ) ' , ' collect ( ) ' , or ' print ( ) ' " ) ; } else { throw new runtime exception ( " no data sinks have been created yet " + " a program needs at least one sink that consumes data " + " examples are writing the data set or printing it " ) ; } } final plan generator generator = new plan generator ( sinks , config , get parallelism ( ) , cache file , job name ) ; final plan plan = generator generate ( ) ; / / clear all the sinks such that the next execution does not redo everything if ( clear sinks ) { this sinks clear ( ) ; was executed = true ; } return plan ; }


set a click listener that will provide the parent view , model , and adapter position of the clicked view this will clear the normal view on click listener if one has been set

public model with view click listener click listener ( final on model click listener < model with view click listener , object > click listener ) { on mutation ( ) ; if ( click listener = = null ) { super click listener = null ; } else { super click listener = new wrapped epoxy model click listener ( click listener ) ; } return this ; }


collects all target patterns that are referenced anywhere within this query expression and adds them to the given collection , which must be mutable

public abstract void collect target patterns ( collection < string > literals ) ; / * implementations should just be { @ code return visitor visit ( this , context ) }


a reference implementation for { @ code try parse } that just catches the exception from { @ link double # value of }

private static double reference try parse ( string input ) { if ( input trim ( ) length ( ) < input length ( ) ) { return null ; } try { return double value of ( input ) ; } catch ( number format exception e ) { return null ; } }


public static long next long ( random random , long min , long max ) { validate is true ( max > = min , " start value must be smaller or equal to end value " ) ; more validate non negative ( " min " , min ) ; if ( min = = max ) { return min ; } return ( long ) ( min + ( ( max - min ) * random next double ( ) ) ) ; }


get the default reservation system corresponding to the scheduler

public static string get default reservation system ( resource scheduler scheduler ) { if ( scheduler instanceof capacity scheduler ) { return capacity reservation system class get name ( ) ; } else if ( scheduler instanceof fair scheduler ) { return fair reservation system class get name ( ) ; } return null ; }


checks the acquisition - ordering between { @ code this } , which is about to be acquired , and the specified { @ code acquired lock } when this method returns , the { @ code acquired lock } should be in either the { @ code pre acquire locks } map , for the case in which it is safe to acquire { @ code this } after the { @ code acquired lock } , or in the { @ code disallowed prior locks } map , in which case it is not safe

void check acquired lock ( policy policy , lock graph node acquired lock ) { / / check acquired lock ( ) should never be invoked by a lock that has already / / been acquired for unordered locks , about to acquire ( ) ensures this by / / checking is acquired by current thread ( ) for ordered locks , however , this / / can happen because multiple locks may share the same lock graph node in / / this situation , throw an illegal state exception as defined by contract / / described in the documentation of with explicit ordering preconditions check state ( this ! = acquired lock , " attempted to acquire multiple locks with the same rank % s " , acquired lock get lock name ( ) ) ; if ( allowed prior locks contains key ( acquired lock ) ) { / / the acquisition ordering from " acquired lock " to " this " has already / / been verified as safe in a properly written application , this is / / the common case return ; } potential deadlock exception previous deadlock exception = disallowed prior locks get ( acquired lock ) ; if ( previous deadlock exception ! = null ) { / / previously determined to be an unsafe lock acquisition / / create a new potential deadlock exception with the same causal chain / / ( the example cycle ) as that of the cached exception potential deadlock exception exception = new potential deadlock exception ( acquired lock , this , previous deadlock exception get conflicting stack trace ( ) ) ; policy handle potential deadlock ( exception ) ; return ; } / / otherwise , it ' s the first time seeing this lock relationship look for / / a path from the acquired lock to this set < lock graph node > seen = sets new identity hash set ( ) ; example stack trace path = acquired lock find path to ( this , seen ) ; if ( path = = null ) { / / this can be safely acquired after the acquired lock / / / / note that there is a race condition here which can result in missing / / a cyclic edge : it ' s possible for two threads to simultaneous find / / " safe " edges which together form a cycle preventing this race / / condition efficiently without introducing deadlock is probably / / tricky for now , just accept the race condition - - - missing a warning / / now and then is still better than having no deadlock detection allowed prior locks put ( acquired lock , new example stack trace ( acquired lock , this ) ) ; } else { / / unsafe acquisition order detected create and cache a / / potential deadlock exception potential deadlock exception exception = new potential deadlock exception ( acquired lock , this , path ) ; disallowed prior locks put ( acquired lock , exception ) ; policy handle potential deadlock ( exception ) ; } }


return whether this { @ code scheduled task registrar } has any tasks registered

public boolean has tasks ( ) { return ( ! collection utils is empty ( this trigger tasks ) | | ! collection utils is empty ( this cron tasks ) | | ! collection utils is empty ( this fixed rate tasks ) | | ! collection utils is empty ( this fixed delay tasks ) ) ; }


find rule chains by tenant id and page link

page data < rule chain > find rule chains by tenant id ( uuid tenant id , page link page link ) ;


public api client get api client ( ) { return api client ; }


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

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


notifies the header that an action was removed

void action removed ( docking action if action ) { header action removed ( action ) ; }


turns off chaining for this operator so thread co - location will not be used as an optimization chaining can be turned off for the whole job by { @ link org apache flink streaming api environment stream execution environment # disable operator chaining ( ) } however it is not advised for performance considerations

public cassandra sink < in > disable chaining ( ) { if ( use data stream sink ) { sink 1 disable chaining ( ) ; } else { sink 2 disable chaining ( ) ; } return this ; }


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


returns the local address to which the socket is bound

socket address get local socket address ( ) { return local socket address ; }


cleanup lock resources and tasks invoking this method could prevent stale locks from being removed if create lock was invoked with a very short timeout use of dispose is optional - the associated wait task should stop by it self allowing the lock file object to be finalized

public synchronized void dispose ( ) { hold lock ( false ) ; if ( wait timer monitor ! = null ) { wait timer monitor cancel ( ) ; wait timer monitor = null ; wait task = null ; } if ( lock count ! = 0 ) { remove lock ( ) ; } }


public void delete role ( string role , string username ) { string sql = " delete from roles where role = ? and username = ? " ; try { jt update ( sql , role , username ) ; } catch ( cannot get jdbc connection exception e ) { log util fatal log error ( " [ db - error ] " + e to string ( ) , e ) ; throw e ; } }


resolve the argument from the model or if not found instantiate it with its default if it is available the model attribute is then populated with request values via data binding and optionally validated if { @ code @ java validation valid } is present on the argument

public final object resolve argument ( method parameter parameter , @ nullable model and view container mav container , native web request web request , @ nullable web data binder factory binder factory ) throws exception { assert state ( mav container ! = null , " model attribute method processor requires model and view container " ) ; assert state ( binder factory ! = null , " model attribute method processor requires web data binder factory " ) ; string name = model factory get name for parameter ( parameter ) ; model attribute ann = parameter get parameter annotation ( model attribute class ) ; if ( ann ! = null ) { mav container set binding ( name , ann binding ( ) ) ; } object attribute = null ; binding result binding result = null ; if ( mav container contains attribute ( name ) ) { attribute = mav container get model ( ) get ( name ) ; } else { / / create attribute instance try { attribute = create attribute ( name , parameter , binder factory , web request ) ; } catch ( bind exception ex ) { if ( is bind exception required ( parameter ) ) { / / no binding result parameter - > fail with bind exception throw ex ; } / / otherwise , expose null / empty value and associated binding result if ( parameter get parameter type ( ) = = optional class ) { attribute = optional empty ( ) ; } else { attribute = ex get target ( ) ; } binding result = ex get binding result ( ) ; } } if ( binding result = = null ) { / / bean property binding and validation ; / / skipped in case of binding failure on construction web data binder binder = binder factory create binder ( web request , attribute , name ) ; if ( binder get target ( ) ! = null ) { if ( ! mav container is binding disabled ( name ) ) { bind request parameters ( binder , web request ) ; } validate if applicable ( binder , parameter ) ; if ( binder get binding result ( ) has errors ( ) & & is bind exception required ( binder , parameter ) ) { throw new bind exception ( binder get binding result ( ) ) ; } } / / value type adaptation , also covering java util optional if ( ! parameter get parameter type ( ) is instance ( attribute ) ) { attribute = binder convert if necessary ( binder get target ( ) , parameter get parameter type ( ) , parameter ) ; } binding result = binder get binding result ( ) ; } / / add resolved attribute and binding result at the end of the model map < string , object > binding result model = binding result get model ( ) ; mav container remove attributes ( binding result model ) ; mav container add all attributes ( binding result model ) ; return attribute ; }


sets the minimum and preferred resources for this contract instance the resource denotes how many memories and cpu cores of the user function will be consumed during the execution

public void set resources ( resource spec min resources , resource spec preferred resources ) { this min resources = min resources ; this preferred resources = preferred resources ; }


test the property ' map of enum string '

public void map of enum string test ( ) { / / todo : test map of enum string }


runs the specified script with the specified state

private boolean run script ( ghidra state script state , ghidra script script ) { resource file src file = script get source file ( ) ; string script name = src file ! = null ? src file get absolute path ( ) : ( script get class ( ) get name ( ) + " class " ) ; try { print writer writer = new print writer ( system out ) ; msg info ( this , " script : " + script name ) ; script execute ( script state , task monitor dummy , writer ) ; writer flush ( ) ; } catch ( exception exc ) { program prog = script state get current program ( ) ; string path = ( prog ! = null ? prog get executable path ( ) : " current program is null " ) ; string log error msg = path + " \ n r e p o r t script error : " + script name + " : " + exc get message ( ) ; msg error ( this , log error msg , exc ) ; return false ; } return true ; }


exposes any bind status error messages under { @ link # messages attribute this key } in the { @ link page context # page scope } only called if { @ link # should render ( ) } returns { @ code true }

protected void expose attributes ( ) throws jsp exception { list < string > error messages = new array list < > ( arrays as list ( get bind status ( ) get error messages ( ) ) ) ; this old messages = this page context get attribute ( messages attribute , page context page scope ) ; this page context set attribute ( messages attribute , error messages , page context page scope ) ; this error messages were exposed = true ; }


removes the mapping from the specified key , if there was any

public void delete ( long key ) { int i = binary search ( m keys , 0 , m size , key ) ; if ( i > = 0 ) { if ( m values [ i ] ! = deleted ) { m values [ i ] = deleted ; m garbage = true ; } } }


expect bazel to fail this method is needed when the exact error code can not be specified

public builder runner should fail ( ) { this should fail = true ; return this ; }


tell all the tasks that they are canceled

public synchronized void cancel queued tasks ( ) { while ( ! queue is empty ( ) ) { background command cmd = queue get first ( ) ; if ( cmd instanceof analysis worker command ) { analysis worker command worker cmd = ( analysis worker command ) cmd ; if ( ! worker cmd can cancel ( ) ) { return ; } } cmd = queue remove first ( ) ; cmd dispose ( ) ; } }


read the body of the given response ( for inclusion in a status exception )

protected byte [ ] get response body ( client http response response ) { try { return file copy utils copy to byte array ( response get body ( ) ) ; } catch ( i o exception ex ) { / / ignore } return new byte [ 0 ] ; }


get a required annotation array attribute value from the annotation

< t extends annotation > merged annotation < t > [ ] get annotation array ( string attribute name , class < t > type ) throws no such element exception ;


get a long option not smaller than the minimum allowed value , supporting memory prefixes k , m , g , t , p

static long long bytes option ( final configuration conf , final string key , final long def val , final long min ) { long v = conf get long bytes ( key , def val ) ; preconditions check argument ( v > = min , string format ( " value of % s : % d is below the minimum value % d " , key , v , min ) ) ; log debug ( " value of { } is { } " , key , v ) ; return v ; }


main method for processing server admin command line arguments the following properties may be set : user admin invocation - identifies the name of the application used when displaying usage text user admin server dir - identifies the server directory instead of passing on command line

public void execute ( string [ ] args ) { file server dir = null ; int ix = 0 ; if ( args length ! = 0 & & ! args [ 0 ] starts with ( " - " ) ) { server dir = new file ( args [ ix + + ] ) ; } else { server dir = get server dir from config ( ) ; } if ( server dir = = null | | ( args length - ix ) = = 0 ) { display usage ( " " ) ; system exit ( - 1 ) ; return ; } try { server dir = server dir get canonical file ( ) ; } catch ( i o exception e 1 ) { system err println ( " failed to resolve server directory : " + server dir ) ; system exit ( - 1 ) ; } if ( property used ) { system out println ( " using server directory : " + server dir ) ; } file user file = new file ( server dir , user manager user password file ) ; if ( ! server dir is directory ( ) | | ! user file is file ( ) ) { system err println ( " invalid ghidra server directory ! " ) ; system exit ( - 1 ) ; } file cmd dir = new file ( server dir , user admin admin cmd dir ) ; if ( ! cmd dir is directory ( ) | | ! cmd dir can write ( ) ) { system err println ( " insufficient privilege or server not started ! " ) ; system exit ( - 1 ) ; } / / process command line boolean list repositories = false ; boolean list users = false ; boolean migration confirmed = false ; boolean migration abort = false ; array list < string > cmd list = new array list < > ( ) ; int cmd len = 1 ; for ( ; ix < args length ; ix + = cmd len ) { boolean queue cmd = true ; string pwd hash = null ; if ( user admin add user command equals ( args [ ix ] ) ) { / / add user cmd len = 2 ; validate s i d ( args , ix + 1 ) ; if ( has optional arg ( args , ix + 2 , user admin password option ) ) { + + cmd len ; pwd hash = prompt for password and get salted hash ( args [ ix + 1 ] ) ; } } else if ( user admin remove user command equals ( args [ ix ] ) ) { / / remove user cmd len = 2 ; validate s i d ( args , ix + 1 ) ; } else if ( user admin reset user command equals ( args [ ix ] ) ) { / / reset user cmd len = 2 ; validate s i d ( args , ix + 1 ) ; if ( has optional arg ( args , ix + 2 , user admin password option ) ) { + + cmd len ; pwd hash = prompt for password and get salted hash ( args [ ix + 1 ] ) ; } } else if ( user admin set user dn command equals ( args [ ix ] ) ) { / / set / add user with dn for pki cmd len = 3 ; validate s i d ( args , ix + 1 ) ; validate d n ( args , ix + 2 ) ; } else if ( user admin set admin command equals ( args [ ix ] ) ) { / / set / add repository admin cmd len = 3 ; validate s i d ( args , ix + 1 ) ; validate rep name ( args , ix + 2 , server dir ) ; } else if ( list command equals ( args [ ix ] ) ) { / / list repositories cmd len = 1 ; queue cmd = false ; list repositories = true ; } else if ( users command equals ( args [ ix ] ) ) { / / list users ( also affects list repositories ) cmd len = 1 ; queue cmd = false ; list users = true ; } else if ( migrate all command equals ( args [ ix ] ) ) { / / list repositories cmd len = 1 ; queue cmd = false ; if ( ! migration confirmed & & ! confirm migration ( ) ) { migration abort = true ; } migration confirmed = true ; if ( ! migration abort ) { repository manager mark all repositories for index migration ( server dir ) ; } } else if ( migrate command equals ( args [ ix ] ) ) { / / list repositories cmd len = 2 ; queue cmd = false ; if ( ix = = ( args length - 1 ) ) { system err println ( " missing " + migrate command + " repository name argument " ) ; } else { string repository name = args [ ix + 1 ] ; if ( ! migration confirmed & & ! confirm migration ( ) ) { migration abort = true ; } migration confirmed = true ; if ( ! migration abort ) { repository mark repository for index migration ( server dir , repository name , false ) ; } } } else { display usage ( " invalid usage ! " ) ; system exit ( - 1 ) ; } if ( queue cmd ) { add command ( cmd list , args , ix , cmd len , pwd hash ) ; } } try { user admin write commands ( cmd list , cmd dir ) ; } catch ( i o exception e ) { system err println ( " failed to queue commands : " + e to string ( ) ) ; system exit ( - 1 ) ; } system out println ( cmd list size ( ) + " command ( s ) queued " ) ; if ( list users ) { user manager list users ( server dir ) ; } if ( list repositories ) { repository manager list repositories ( server dir , list users ) ; } system out println ( ) ; }


returns true iff { @ code target } is a { @ code test suite } rule

public static boolean is test suite rule ( target target ) { return target instanceof rule & & is test suite rule name ( ( ( rule ) target ) get rule class ( ) ) ; }


creates a { @ link pattern layout base } of type e

pattern layout base < e > build ( logger context context , time zone time zone ) ;


return the request body , or an error stream if the body was never set or when { @ link # set write handler } is configured

public flux < data buffer > get body ( ) { return this body ; }


test interruption handling when the evaluator is in - between running sky functions this is the point in time after a sky function requested a dependency which is not yet built so the builder returned null to the evaluator , and the latter is about to schedule evaluation of the missing dependency but gets interrupted before the dependency ' s sky function could start

public void interrupted evaluator thread ( ) throws exception { run interruption test ( new sky function factory ( ) { @ override public sky function create ( final semaphore thread started , final string [ ] error message ) { return new sky function ( ) { / / no need to synchronize access to this field ; we always request just one more / / dependency , so it ' s only one sky function running at any time private int value id counter = 0 ; @ override public sky value compute ( sky key key , environment env ) throws interrupted exception { / / signal the waiting test thread that the evaluator thread has really started thread started release ( ) ; / / keep the evaluator busy until the test ' s thread gets scheduled and can / / interrupt the evaluator ' s thread env get value ( graph tester to sky key ( " a " + value id counter + + ) ) ; / / this method never throws interrupted exception , therefore it ' s the responsibility / / of the evaluator to detect the interrupt and avoid calling subsequent / / sky functions return null ; } @ nullable @ override public string extract tag ( sky key sky key ) { return null ; } } ; } } ) ; }


general project utility that brings up a file chooser for the user to specify a directory and filename that are used for the project location and name

project locator choose project ( ghidra file chooser file chooser , string mode , string preference name ) { boolean create = ( mode equals ( " create " ) ) ? true : false ; file chooser set title ( mode + " a ghidra project " ) ; file chooser set approve button text ( mode + " project " ) ; file chooser set approve button tool tip text ( mode + " a ghidra project " ) ; file chooser set selected file ( null ) ; boolean valid input = false ; while ( ! valid input ) { file file = file chooser get selected file ( ) ; if ( file ! = null ) { string path = file get absolute file ( ) get parent ( ) ; string filename = file get name ( ) ; / / strip off extension since the local root folder takes care of it if ( filename ends with ( project extension ) ) { filename = filename substring ( 0 , filename last index of ( project extension ) - 1 ) ; } / / if user enters the name of the project manually and leaves off / / the extension , try to open or create using the extension else if ( ! create & & filename last index of ( " " ) > path last index of ( file separator ) ) { / / treat opening a file without the ghidra extension as an error msg show error ( get class ( ) , tool get tool frame ( ) , " invalid project file " , " cannot open ' " + file get name ( ) + " ' as a ghidra project " ) ; continue ; } if ( ! naming utilities is valid project name ( filename ) ) { msg show error ( get class ( ) , tool get tool frame ( ) , " invalid project name " , filename + " is not a valid project name " ) ; continue ; } preferences set property ( preference name , path ) ; try { preferences store ( ) ; } catch ( exception e ) { msg debug ( this , " unexpected exception storing preferences to " + preferences get filename ( ) , e ) ; } return new project locator ( path , filename ) ; } return null ; } return null ; }


setup the kdc for testing a secure hdfs cluster

public static void init kdc ( ) throws exception { properties kdc conf = mini kdc create conf ( ) ; kdc = new mini kdc ( kdc conf , root test dir ) ; kdc start ( ) ; file sink keytab file = new file ( root test dir , " sink keytab " ) ; sink keytab = sink keytab file get absolute path ( ) ; kdc create principal ( sink keytab file , " sink / localhost " ) ; sink principal = " sink / localhost @ " + kdc get realm ( ) ; file hdfs keytab file = new file ( root test dir , " hdfs keytab " ) ; hdfs keytab = hdfs keytab file get absolute path ( ) ; kdc create principal ( hdfs keytab file , " hdfs / localhost " , " http / localhost " ) ; hdfs principal = " hdfs / localhost @ " + kdc get realm ( ) ; spnego principal = " http / localhost @ " + kdc get realm ( ) ; }


public string get library version ( ) { return record get string ( library version col ) ; }


regression test : error on clear maybe dirty value we do an evaluation of top key , which registers dependencies on mid key and error key mid key enqueues slow key , and waits error key throws an error , which bubbles up to top key if top key does not unregister its dependence on mid key , it will have a dangling reference to mid key after unfinished values are cleaned from the graph note that slow key will wait until error key has thrown and the threadpool has caught the exception before returning , so the evaluator will already have stopped enqueuing new jobs , so mid key is not evaluated

public void incomplete direct deps are cleared before invalidation ( ) throws exception { count down latch slow start = new count down latch ( 1 ) ; count down latch error finish = new count down latch ( 1 ) ; sky key error key = graph tester non hermetic key ( " error " ) ; tester get or create ( error key ) set builder ( new chained function ( / * notify start = * / null , / * wait to finish = * / slow start , / * notify finish = * / error finish , / * wait for exception = * / false , / * value = * / null , / * deps = * / immutable list < sky key > of ( ) ) ) ; sky key slow key = graph tester to sky key ( " slow " ) ; tester get or create ( slow key ) set builder ( new chained function ( / * notify start = * / slow start , / * wait to finish = * / error finish , / * notify finish = * / null , / * wait for exception = * / true , new string value ( " slow " ) , / * deps = * / immutable list < sky key > of ( ) ) ) ; sky key mid key = graph tester to sky key ( " mid " ) ; tester get or create ( mid key ) add dependency ( slow key ) set computed value ( copy ) ; sky key top key = graph tester to sky key ( " top " ) ; tester get or create ( top key ) add dependency ( mid key ) add dependency ( error key ) set computed value ( concatenate ) ; / / slow key starts - > error key finishes , written to graph - > slow key finishes & ( visitor aborts ) / / - > top key builds evaluation result < string value > result = tester eval ( / * keep going = * / false , top key ) ; assert that evaluation result ( result ) has singleton error that ( top key ) ; / / make sure mid key didn ' t finish building assert that ( tester get existing value ( mid key ) ) is null ( ) ; / / give slow key a nice ordinary builder tester get or create ( slow key , / * mark as modified = * / false ) set builder ( null ) set constant value ( new string value ( " slow " ) ) ; / / put mid key into the graph it won ' t have a reverse dependence on top key tester eval and get ( / * keep going = * / false , mid key ) ; tester differencer invalidate ( immutable list of ( error key ) ) ; / / top key should not access mid key as if it were already registered as a dependency tester eval ( / * keep going = * / false , top key ) ; }


return a target instance invoked immediately before the aop framework calls the " target " of an aop method invocation

object get target ( ) throws exception ;


copies the content of this string to a byte array

public void copy ( int src idx , byte [ ] dst , int dst idx , int length ) { if ( is out of bounds ( src idx , length , length ( ) ) ) { throw new index out of bounds exception ( " expected : " + " 0 < = src idx ( " + src idx + " ) < = src idx + length ( " + length + " ) < = src len ( " + length ( ) + ' ) ' ) ; } system arraycopy ( value , src idx + offset , check not null ( dst , " dst " ) , dst idx , length ) ; }


returns < code > true < code > if the search execution should skip this shard since it can not match any documents given the query


creates a class loader with the given base url as its classpath

u r l class loader new loader ( url base ) { / / we use the bootstrap class loader as the parent because finalizer by design uses / / only standard java classes that also means that finalizable reference queue test / / doesn ' t pick up the wrong version of the finalizer class return new u r l class loader ( new url [ ] { base } , null ) ; }


resolve the given v 2 template into an ordered list of aliases

public static list < map < string , alias metadata > > resolve aliases ( final metadata metadata , final string template name ) { final composable index template template = metadata templates v 2 ( ) get ( template name ) ; assert template ! = null : " attempted to resolve aliases for a template [ " + template name + " ] that did not exist in the cluster state " ; if ( template = = null ) { return list of ( ) ; } final map < string , component template > component templates = metadata component templates ( ) ; list < map < string , alias metadata > > aliases = template composed of ( ) stream ( ) map ( component templates : : get ) filter ( objects : : non null ) map ( component template : : template ) map ( template : : aliases ) filter ( objects : : non null ) collect ( collectors to list ( ) ) ; / / add the actual index template ' s aliases to the end if they exist optional of nullable ( template template ( ) ) map ( template : : aliases ) if present ( aliases : : add ) ; / / aliases are applied in order , but subsequent alias configuration from the same name is / / ignored , so in order for the order to be correct , alias configuration should be in order / / of precedence ( with the index template first ) collections reverse ( aliases ) ; return collections unmodifiable list ( aliases ) ; }


generate the setter method name by field , following the android studio rule

protected string make setter method name ( field field ) { string setter method name ; string setter method prefix = " set " ; if ( is primitive boolean type ( field ) & & field get name ( ) matches ( " ^ is [ a - z ] { 1 } * $ " ) ) { setter method name = setter method prefix + field get name ( ) substring ( 2 ) ; } else if ( field get name ( ) matches ( " ^ [ a - z ] { 1 } [ a - z ] { 1 } * " ) ) { setter method name = setter method prefix + field get name ( ) ; } else { setter method name = setter method prefix + base utility capitalize ( field get name ( ) ) ; } return setter method name ; }


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

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


reset the lists of keys and paths so that a new batch of entries can built up

private void reset delete list ( ) { keys = new array list < > ( page size ) ; paths = new array list < > ( page size ) ; }


load the { @ code application context } for the supplied merged context configuration supports both the { @ link smart context loader } and { @ link context loader } s p is

protected application context load context internal ( merged context configuration merged context configuration ) throws exception { context loader context loader = merged context configuration get context loader ( ) ; assert not null ( context loader , " cannot load an application context with a null ' context loader ' " + " consider annotating your test class with @ context configuration or @ context hierarchy " ) ; application context application context ; if ( context loader instanceof smart context loader ) { smart context loader smart context loader = ( smart context loader ) context loader ; application context = smart context loader load context ( merged context configuration ) ; } else { string [ ] locations = merged context configuration get locations ( ) ; assert not null ( locations , " cannot load an application context with a null ' locations ' array " + " consider annotating your test class with @ context configuration or @ context hierarchy " ) ; application context = context loader load context ( locations ) ; } return application context ; }


return true if the system id denotes an absolute uri the same algorithm can be seen in { @ link uri } , but implementing this by ourselves allow it to be more lenient about escaping of uri

public static boolean is absolute uri ( @ non null string uri ) { int idx = uri index of ( ' : ' ) ; if ( idx < 0 ) return false ; / / no ' : ' can ' t be absolute / / # , ? , and / must not be before ' : ' return idx < index of ( uri , ' # ' ) & & idx < index of ( uri , ' ? ' ) & & idx < index of ( uri , ' / ' ) ; }


the { @ link reservation list request } will use the reservation id to search for reservations to list if it is provided otherwise , it will select active reservations within the start time and end time ( inclusive )

public static reservation list request new instance ( string queue , string reservation id , boolean include reservation allocations ) { return new instance ( queue , reservation id , - 1 , - 1 , include reservation allocations ) ; }


set the value of the specified index of the array

public static void set ( object array , int index , object value ) { if ( array = = null ) return ; array set ( array , index , value ) ; }


normalize type by wrapping primitive types with single quotes

public string normalize type ( string type ) { return type replace all ( " \ \ b ( boolean | integer | number | string | date ) \ \ b " , " ' $ 1 ' " ) ; }


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


builds use list and unmodifiable use list

private void build use list ( ) { if ( back mode ) { throw new runtime exception ( " no use list in back mode " ) ; } use list = new array list [ register count ] ; for ( int i = 0 ; i < register count ; i + + ) { use list [ i ] = new array list ( ) ; } for each insn ( new ssa insn visitor ( ) { / * * { @ inherit doc } * / public void visit move insn ( normal ssa insn insn ) { add to uses ( insn ) ; } / * * { @ inherit doc } * / public void visit phi insn ( phi insn phi ) { add to uses ( phi ) ; } / * * { @ inherit doc } * / public void visit non move insn ( normal ssa insn insn ) { add to uses ( insn ) ; } / * * * adds specified insn to the uses list for all of its sources * @ param insn { @ code non - null ; } insn to process * / private void add to uses ( ssa insn insn ) { register spec list rl = insn get sources ( ) ; int sz = rl size ( ) ; for ( int i = 0 ; i < sz ; i + + ) { use list [ rl get ( i ) get reg ( ) ] add ( insn ) ; } } } ) ; unmodifiable use list = new list [ register count ] ; for ( int i = 0 ; i < register count ; i + + ) { unmodifiable use list [ i ] = collections unmodifiable list ( use list [ i ] ) ; } }


test method for { @ link org apache dubbo registry multicast multicast registry # multicast registry ( url ) }

public void test default port ( ) { multicast registry multicast registry = new multicast registry ( url value of ( " multicast : / / 224 5 6 7 " ) ) ; try { multicast socket multicast socket = multicast registry get multicast socket ( ) ; assertions assert equals ( 1234 , multicast socket get local port ( ) ) ; } finally { multicast registry destroy ( ) ; } }


set the value of this attribute for the specified keyed object

public boolean set value ( t o , object value ) { if ( value = = null ) { return false ; } if ( owning set ( ) contains ( o ) ) { / / values [ owning set ( ) index ( o ) ] = value ; values put ( o key ( ) , value ) ; update ( ) ; return true ; } return false ; }


source line and column info < code > optional aapt pb source position source = 3 ; < code >

com android aapt resources source position get source ( ) ;


gets the store exception when trying to read the store , if there was an error if there was no error , returns { @ code null }

public exception get store exception ( ) { return store exception ; }


public get request id ( string id ) { this id = id ; return this ; }


returns an iterable that applies { @ code convert } to each element of { @ code from iterable } the conversion is done lazily the returned iterable ' s iterator supports { @ code remove ( ) } if the input iterator does after a successful { @ code remove ( ) } call , { @ code from iterable } no longer contains the corresponding element

public iterable < b > convert all ( final iterable < ? extends a > from iterable ) { check not null ( from iterable , " from iterable " ) ; return new iterable < b > ( ) { @ override public iterator < b > iterator ( ) { return new iterator < b > ( ) { private final iterator < ? extends a > from iterator = from iterable iterator ( ) ; @ override public boolean has next ( ) { return from iterator has next ( ) ; } @ override public b next ( ) { return convert ( from iterator next ( ) ) ; } @ override public void remove ( ) { from iterator remove ( ) ; } } ; } } ; }


called when the client wishes to save configuration state features can add any state they wish to be persisted over tool launches

public void write config state ( save state state ) ;


sets a built - in watermark strategy which indicates the watermarks should be preserved from the underlying data stream api and thus preserves the assigned watermarks from the source

public rowtime watermarks from source ( ) { internal properties put string ( rowtime watermarks type , rowtime watermarks type value from source ) ; return this ; }


the classpath plugins this node was constructed with

public collection < class < ? extends plugin > > get classpath plugins ( ) { return classpath plugins ; }


guaranteed to throw an exception and leave the list unmodified

public final void sort ( comparator < ? super e > c ) { throw new unsupported operation exception ( ) ; }


checks that the passed argument is positive , and ceils it to a multiple of 32

static int check positive and make multiple of 3 2 ( int bits ) { check argument ( bits > 0 , " number of bits must be positive " ) ; return ( bits + 31 ) & ~ 31 ; }


creates the actions needed to generate this target ' s " debug info package " ( i e its dwp file )

private static void create debug packager actions ( rule context context , cc toolchain provider toolchain , artifact dwp output , nested set < artifact > dwo files ) throws rule error exception { / / no inputs ? just generate a trivially empty dwp / / / / note this condition automatically triggers for any build where fission is disabled / / because rules referencing dwp targets may be invoked with or without fission , we need / / to support dwp generation even when fission is disabled since no actual functionality / / is expected then , an empty file is appropriate if ( dwo files is empty ( ) ) { context register action ( file write action create ( context , dwp output , " " , false ) ) ; return ; } / / get the tool inputs necessary to run the dwp command nested set < artifact > dwp files = toolchain get dwp files ( ) ; preconditions check state ( ! dwp files is empty ( ) ) ; / / we apply a hierarchical action structure to limit the maximum number of inputs to any / / single action / / / / while the dwp tool consumes dwo files , it can also consume intermediate dwp files , / / allowing us to split a large input set into smaller batches of arbitrary size and order / / aside from the parallelism performance benefits this offers , this also reduces input / / size requirements : if a dwo , b dwo , c dwo , and e dwo are each 1 kb files , we can apply / / two intermediate actions dwp ( a dwo , b dwo ) - - > i 1 dwp and dwp ( c dwo , e dwo ) - - > i 2 dwp / / when we then apply the final action dwp ( i 1 dwp , i 2 dwp ) - - > final output dwp , the inputs / / to this action will usually total far less than 4 kb / / / / the actions form an n - ary tree with n = = max inputs per dwp action the tree is fuller / / at the leaves than the root , but that both increases parallelism and reduces the final / / action ' s input size packager packager = create intermediate dwp packagers ( context , dwp output , toolchain , dwp files , dwo files to list ( ) , 1 ) ; packager spawn action set mnemonic ( " cc generate dwp " ) add output ( dwp output ) ; packager command line add exec path ( " - o " , dwp output ) ; context register action ( packager build ( context ) ) ; }


public void execute ( file system fs ) throws i o exception { fs set acl ( path , acl entries ) ; return null ; }


utility method for getting a hostname resolved to a node in the network topology this method initializes the class with the right resolver implementation

public static node resolve ( configuration conf , string host name ) { init ( conf ) ; return core resolve ( host name ) ; }


returns a new instance of { @ link class name } that represents the owner class of a single adapter method for an android sdk api the implementation has to guarantee generating different class names for different target methods to be adapted , including overloaded api methods , in order to avoid adapter class name clashing from separate compilation units

final class name type adapter owner ( int invocation site tag ) { check state ( ! has in process label ( ) & & ! has immutable label ( ) , " expected a label - free type : actual ( % s ) " , this ) ; check state ( is android domain type ( ) , " expected an android sdk type to have an adapter : actual ( % s ) " , this ) ; string binary name = string format ( " % s % s $ % x $ % s " , type adapter package root , binary name ( ) , invocation site tag , type adapter suffix ) ; return class name create ( binary name ) ; }


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


returns the whole range relative to the specified comparator

static < t > general range < t > all ( comparator < ? super t > comparator ) { return new general range < t > ( comparator , false , null , open , false , null , open ) ; }


public void test type holder example ( ) { / / todo : test type holder example }


disable write by cancelling the execute permission of the source path todo : disable the super user from writing

protected void disable write ( fed balance context fbcontext ) throws i o exception { / / save and cancel permission file status status = src fs get file status ( src ) ; f perm = status get permission ( ) ; acl = src fs get acl status ( src ) ; src fs set permission ( src , fs permission create immutable ( ( short ) 0 ) ) ; update stage ( stage final distcp ) ; }


add a search request to execute note , the order is important , the search response will be returned in the same order as the search requests

public multi search request add ( search request request ) { requests add ( request ) ; return this ; }


marks the producing instructions of the variable consumer at the given offset

private void mark variable producers ( int consumer offset , int variable index ) { instruction offset value producer offsets = partial evaluator get variables before ( consumer offset ) get producer value ( variable index ) instruction offset value ( ) ; if ( producer offsets ! = null ) { int offset count = producer offsets instruction offset count ( ) ; for ( int offset index = 0 ; offset index < offset count ; offset index + + ) { / / make sure the variable and the instruction are marked / / at the producing offset int offset = producer offsets instruction offset ( offset index ) ; mark instruction ( offset ) ; } } }


set the body of the request and build it the string is assumed to be utf - 8 encoded unless the request has a " content - type " header with a charset attribute

mock server http request body ( string body ) ;


public void set text ( string text ) { this text = text ; }


returns this long value , shifted left by the given integer value

public long value shift left ( integer value other ) { return other shift left of ( this ) ; }


public response entity register resource set ( @ request body final string body , final http servlet request request , final http servlet response response ) { try { val profile result = get authenticated profile ( request , response , o auth 2 0 constants uma protection scope ) ; val uma request = mapper read value ( json value read hjson ( body ) to string ( ) , uma resource registration request class ) ; if ( uma request = = null | | string utils is blank ( uma request get name ( ) ) ) { val model = build response entity error model ( http status not found , " uma request cannot be found or parsed " ) ; return new response entity ( model , model , http status bad request ) ; } val resource set = uma request as resource set ( profile result ) ; resource set validate ( profile result ) ; val saved = get uma configuration context ( ) get uma resource set repository ( ) save ( resource set ) ; val location = get resource set uri location ( saved ) ; val model = collection utils wrap ( " entity " , saved , " code " , http status created , " resource id " , saved get id ( ) , " location " , location ) ; return new response entity < > ( model , http status ok ) ; } catch ( final exception e ) { logging utils error ( logger , e ) ; } return new response entity < > ( " unable to complete the resource - set registration request " , http status bad request ) ; }


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


returns true if { @ code rule } is visible from { @ code prerequisite } this only computes the logic as implemented by the visibility system the final decision whether a dependency is allowed is made by { @ link prerequisite validator }

public static boolean is visible ( rule rule , transitive info collection prerequisite ) { return is visible ( rule get label ( ) , prerequisite ) ; }


public long get doc version ( ) { return doc version ; }


returns dividend % divisor , where the dividend and divisor are treated as unsigned 32 - bit quantities < b > java 8 users : < b > use { @ link integer # remainder unsigned ( int , int ) } instead

public static int remainder ( int dividend , int divisor ) { return ( int ) ( to long ( dividend ) % to long ( divisor ) ) ; }


implementation of record reader : : get current value ( )

public v get current value ( ) throws i o exception , interrupted exception { return chunk get reader ( ) get current value ( ) ; }


additional metadata on why the shard iswas unassigned the metadata is kept around until the shard moves to started

public unassigned info unassigned info ( ) { return unassigned info ; }


sets the number of entries expected to be in the zip file this value should be set by reading the end of central directory record see < a href = " http : www pkware comdocumentscasestudies a p p n o t e txt " > zip format section 4 4 22

public void set expected entries ( long count ) { this expected entries = count ; if ( expected entries > 0xffff ) { set zip 6 4 ( true ) ; } }


returns next occurrence of % s skips any % %

private static int next occurrence ( string format str , int n , int idx ) { while ( idx < n ) { idx = format str index of ( ' % ' , idx ) ; if ( idx = = - 1 ) { break ; } if ( ( idx + 1 ) < n ) { char c = format str char at ( idx + 1 ) ; if ( c = = ' s ' ) { return idx ; } if ( c ! = ' % ' ) { / / illegal sequence found return - 2 ; } idx + = 2 ; } else { / / terminating ' % ' found , illegal return - 2 ; } } return - 1 ; }


duration of percentile rolling window in milliseconds this is passed into { @ link hystrix rolling percentile } inside { @ link hystrix collapser metrics }

public hystrix property < integer > metrics rolling percentile window in milliseconds ( ) { return metrics rolling percentile window in milliseconds ; }


public cancellable put job async ( put job request request , request options options , action listener < put job response > listener ) { return rest high level client perform request async and parse entity ( request , m l request converters : : put job , options , put job response : : from x content , listener , collections empty set ( ) ) ; }


completable update pet ( @ retrofit 2 http body pet body ) ;


public time value get time ( ) { return time value ; }


creates bounded blocking subpartition of this type

public abstract bounded blocking subpartition create ( int index , result partition parent , file temp file , int read buffer size , boolean ssl enabled ) throws i o exception ;


returns whether the current event is a start tag

public static boolean is start tag ( xml pull parser xpp ) throws xml pull parser exception { return xpp get event type ( ) = = xml pull parser start tag ; }


public void add contents ( dex file file ) { mixed item section word data = file get word data ( ) ; if ( class annotations ! = null ) { class annotations = word data intern ( class annotations ) ; } if ( field annotations ! = null ) { for ( field annotation struct item : field annotations ) { item add contents ( file ) ; } } if ( method annotations ! = null ) { for ( method annotation struct item : method annotations ) { item add contents ( file ) ; } } if ( parameter annotations ! = null ) { for ( parameter annotation struct item : parameter annotations ) { item add contents ( file ) ; } } }


advances the time by the given duration time can also move backwards by supplying a negative value this method performs no overflow check

public void advance time ( long duration , time unit time unit ) { current time add and get ( time unit to nanos ( duration ) ) ; }


returns whether binaries must be compiled with position independent code

public static boolean use pic for binaries ( cc toolchain provider toolchain , cpp configuration cpp configuration , feature configuration feature configuration ) { return cpp configuration force pic ( ) | | ( toolchain use pic for dynamic libraries ( cpp configuration , feature configuration ) & & cpp configuration get compilation mode ( ) ! = compilation mode opt ) ; }


request to disconnect from the remote peer and notify the { @ link channel future } once the operation completes , either because the operation was successful or because of an error this will result in having the { @ link channel outbound handler # disconnect ( channel handler context , channel promise ) } method called of the next { @ link channel outbound handler } contained in the { @ link channel pipeline } of the { @ link channel }


protected void stop job acquisition thread ( ) { if ( async job acquisition thread ! = null ) { try { async job acquisition thread join ( ) ; } catch ( interrupted exception e ) { log warn ( " interrupted while waiting for the async job acquisition thread to terminate " , e ) ; } async job acquisition thread = null ; } }


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


tries to write into a { @ link byte buffer } instance which is read - only this should fail with a { @ link read only buffer exception }

private void test byte buffer get read only ( boolean direct buffer ) throws read only buffer exception { memory segment seg = create segment ( page size ) ; byte buffer target = ( direct buffer ? byte buffer allocate direct ( page size ) : byte buffer allocate ( page size ) ) as read only buffer ( ) ; seg get ( 0 , target , page size ) ; }


iterate over the records in ascending sorted order starting at the specified start key

public d b field iterator field key iterator ( field min key , field max key , boolean before ) throws i o exception { synchronized ( db ) { if ( schema use long key nodes ( ) ) { throw new assert exception ( ) ; } return new field key iterator ( min key , max key , before ) ; } }


invoked when a processing - time timer fires

void on processing time ( internal timer < k , n > timer ) throws exception ;