simple , insecure method for deleting the contents of a directory for file systems that don ' t support { @ code secure directory stream } returns a collection of exceptions that occurred or null if no exceptions were thrown

private static @ nullable collection < i o exception > delete directory contents insecure ( directory stream < path > dir ) { collection < i o exception > exceptions = null ; try { for ( path entry : dir ) { exceptions = concat ( exceptions , delete recursively insecure ( entry ) ) ; } return exceptions ; } catch ( directory iterator exception e ) { return add exception ( exceptions , e get cause ( ) ) ; } }


public void prefix boolean test ( ) { / / todo : test prefix boolean }


returns { @ code true } for non - bridge default methods not in { @ link # instance methods }

private boolean should stub as default method ( int access , string name , string desc ) { / / ignore private methods , which technically aren ' t default methods and can only be called from / / other methods defined in the interface this also ignores lambda body methods , which is fine / / as we don ' t want or need to stub those also ignore bridge methods as javac adds them to / / concrete classes as needed anyway and we handle them separately for generated lambda classes / / note that an exception is that , if a bridge method is for a default interface method , javac / / will not generate the bridge method in the implementing class so we need extra logic to / / handle these bridge methods return is non bridge default method ( access ) & & ! recorded instance method ( name , desc ) ; }


return the command line argument for this option

public string get arg ( ) { return command line argument ; }


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

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


join records of this stream with another { @ code k stream } ' s records using windowed left equi join using the { @ link joined } instance for configuration of the { @ link serde key serde } , { @ link serde this stream ' s value serde } , and { @ link serde the other stream ' s value serde } in contrast to { @ link # join ( k stream , value joiner , join windows ) inner - join } , all records from this stream will produce at least one output record ( cf below ) the join is computed on the records ' key with join attribute { @ code this k stream key = = other k stream key } furthermore , two records are only joined if their timestamps are close to each other as defined by the given { @ link join windows } , i e , the window defines an additional join predicate on the record timestamps for each pair of records meeting both join predicates the provided { @ link value joiner } will be called to compute a value ( with arbitrary type ) for the result record the key of the result record is the same as for both joining input records furthermore , for each input record of this { @ code k stream } that does not satisfy the join predicate the provided { @ link value joiner } will be called with a { @ code null } value for the other stream if an input record key or value is { @ code null } the record will not be included in the join operation and thus no output record will be added to the resulting { @ code k stream } example ( assuming all input records belong to the correct windows ) : < table border = ' 1 ' > < tr > < th > this < th > < th > other < th > < th > result < th > < tr > < tr > < td > & lt ; k1 : a & gt ; < td > < td > < td > < td > & lt ; k1 : value joiner ( a , null ) & gt ; < td > < tr > < tr > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : b & gt ; < td > < td > & lt ; k2 : value joiner ( b , b ) & gt ; < td > < tr > < tr > < td > < td > < td > & lt ; k3 : c & gt ; < td > < td > < td > < tr > < table > both input streams ( or to be more precise , their underlying source topics ) need to have the same number of partitions if this is not the case , you would need to call { @ link # repartition ( repartitioned ) } ( for one input stream ) before doing the join and specify the " correct " number of partitions via { @ link repartitioned } parameter furthermore , both input streams need to be co - partitioned on the join key ( i e , use the same partitioner ) if this requirement is not met , kafka streams will automatically repartition the data , i e , it will create an internal repartitioning topic in kafka and write and re - read the data via this topic before the actual join the repartitioning topic will be named " $ { application id } - & lt ; name & gt ; - repartition " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " & lt ; name & gt ; " is an internally generated name , and " - repartition " is a fixed suffix repartitioning can happen for one or both of the joining { @ code k stream } s for this case , all data of the stream will be redistributed through the repartitioning topic by writing all records to it , and rereading all records from it , such that the join input { @ code k stream } is partitioned correctly on its key both of the joining { @ code k stream } s will be materialized in local state stores with auto - generated store names for failure and recovery each store will be backed by an internal changelog topic that will be created in kafka the changelog topic will be named " $ { application id } - & lt ; storename & gt ; - changelog " , where " application id " is user - specified in { @ link streams config } via parameter { @ link streams config # application id config application id config } , " store name " is an internally generated name , and " - changelog " is a fixed suffix you can retrieve all generated internal topic names via { @ link topology # describe ( ) }

< vo , vr > k stream < k , vr > left join ( final k stream < k , vo > other stream , final value joiner < ? super v , ? super vo , ? extends vr > joiner , final join windows windows , final joined < k , v , vo > joined ) ;


returns the corresponding wrapper type of { @ code type } if it is a primitive type ; otherwise returns { @ code type } itself idempotent wrap ( int class ) = = integer class wrap ( integer class ) = = integer class wrap ( string class ) = = string class

public static < t > class < t > wrap ( class < t > type ) { check not null ( type ) ; / / cast is safe : long class and long class are both of type class < long > @ suppress warnings ( " unchecked " ) class < t > wrapped = ( class < t > ) primitive to wrapper type get ( type ) ; return ( wrapped = = null ) ? type : wrapped ; }


register the given list of transaction synchronizations with the existing transaction invoked when the control of the spring transaction manager and thus all spring transaction synchronizations end , without the transaction being completed yet this is for example the case when participating in an existing jta or ejb cmt transaction the default implementation simply invokes the { @ code after completion } methods immediately , passing in " status unknown " this is the best we can do if there ' s no chance to determine the actual outcome of the outer transaction

protected void register after completion with existing transaction ( object transaction , list < transaction synchronization > synchronizations ) throws transaction exception { logger debug ( " cannot register spring after - completion synchronization with existing transaction - " + " processing spring after - completion callbacks immediately , with outcome status ' unknown ' " ) ; invoke after completion ( synchronizations , transaction synchronization status unknown ) ; }


sets the continuation option for this script the continuation option specifies whether to continue or abort follow - on processing , and whether to delete or keep the current program

public void set headless continuation option ( headless continuation option option ) { script set option = option ; }


sets the current { @ link com bumptech glide request manager }

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


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


test for { @ link jms listener repeatable bean } and { @ link jms listeners bean } that validates that the { @ code @ jms listener } annotation is repeatable and generate one specific container per annotation

protected void test jms listener repeatable ( application context context ) { jms listener container test factory simple factory = context get bean ( " jms listener container factory " , jms listener container test factory class ) ; assert that ( simple factory get listener containers ( ) size ( ) ) is equal to ( 2 ) ; method jms listener endpoint first = ( method jms listener endpoint ) simple factory get listener container ( " first " ) get endpoint ( ) ; assert that ( first get id ( ) ) is equal to ( " first " ) ; assert that ( first get destination ( ) ) is equal to ( " my queue " ) ; assert that ( first get concurrency ( ) ) is equal to ( null ) ; method jms listener endpoint second = ( method jms listener endpoint ) simple factory get listener container ( " second " ) get endpoint ( ) ; assert that ( second get id ( ) ) is equal to ( " second " ) ; assert that ( second get destination ( ) ) is equal to ( " another queue " ) ; assert that ( second get concurrency ( ) ) is equal to ( " 2 - 10 " ) ; }


persist a checkpoint in the internal index

void put transform checkpoint ( transform checkpoint checkpoint , action listener < boolean > listener ) ;


return the name of the target scope for the bean

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


capture the full page screenshot and store it in the specified location

public < x > x get full page screenshot as ( output type < x > output type ) throws web driver exception { response response = execute ( extra commands full page screenshot ) ; object result = response get value ( ) ; if ( result instanceof string ) { string base 6 4 encoded png = ( string ) result ; return output type convert from base 6 4 png ( base 6 4 encoded png ) ; } else if ( result instanceof byte [ ] ) { string base 6 4 encoded png = new string ( ( byte [ ] ) result , utf 8 ) ; return output type convert from base 6 4 png ( base 6 4 encoded png ) ; } else { throw new runtime exception ( string format ( " unexpected result for % s command : % s " , extra commands full page screenshot , result = = null ? " null " : result get class ( ) get name ( ) + " instance " ) ) ; } }


returns the reversed view of this converter , which converts { @ code this convert ( a ) } back to a value roughly equivalent to { @ code a } the returned converter is serializable if { @ code this } converter is < b > note : < b > you should not override this method it is non - final for legacy reasons

public converter < b , a > reverse ( ) { converter < b , a > result = reverse ; return ( result = = null ) ? reverse = new reverse converter < > ( this ) : result ; }


public term vectors request builder set id ( string id ) { request id ( id ) ; return this ; }


gets the string representation of the agent log

public string get log ( ) throws i o exception { return util load file ( get log file ( ) ) ; }


this is used primarily when the object is listed in the breadcrumb , in the user management screen

public string get display name ( ) { return messages hudson private security realm display name ( ) ; }


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


return the connection factory that the underlying { @ link jms template } uses

public connection factory get connection factory ( ) { return ( this jms template ! = null ? this jms template get connection factory ( ) : null ) ; }


whether to include the full model definition the full model definition can be very large

public get trained models request set include definition ( boolean include definition ) { if ( include definition ! = null & & include definition ) { return this include definition ( ) ; } return this ; }


get all default formats supported by fresco does not include { @ link image format # unknown }

public static list < image format > get default formats ( ) { if ( s all default formats = = null ) { list < image format > m default formats = new array list < > ( 9 ) ; m default formats add ( jpeg ) ; m default formats add ( png ) ; m default formats add ( gif ) ; m default formats add ( bmp ) ; m default formats add ( ico ) ; m default formats add ( webp simple ) ; m default formats add ( webp lossless ) ; m default formats add ( webp extended ) ; m default formats add ( webp extended with alpha ) ; m default formats add ( webp animated ) ; m default formats add ( heif ) ; s all default formats = immutable list copy of ( m default formats ) ; } return s all default formats ; }


sets the strategy for inferring the final output data type of a function call required

public builder output type strategy ( type strategy output type strategy ) { this output type strategy = preconditions check not null ( output type strategy , " output type strategy must not be null " ) ; return this ; }


hook method called by the blaze command dispatcher after the dispatch of each command returns a new exit code in case exceptions were encountered during cleanup

public blaze command result after command ( command environment env , blaze command result command result ) { / / remove any filters that the command might have added to the reporter env get reporter ( ) set output filter ( output filter output everything ) ; blaze command result after command result = null ; for ( blaze module module : blaze modules ) { try ( silent closeable c = profiler instance ( ) profile ( module + " after command " ) ) { module after command ( ) ; } catch ( abrupt exit exception e ) { env get reporter ( ) handle ( event error ( e get message ( ) ) ) ; / / it ' s not ideal but we can only return one exit code , so we just pick the code of the / / last exception after command result = blaze command result detailed exit code ( e get detailed exit code ( ) ) ; } } env get event bus ( ) post ( new after command event ( ) ) ; / / wipe the dependency graph if requested note that this method always runs at the end of / / a commands unless the server crashes , in which case no inmemory state will linger for the / / next build anyway common command options common options = preconditions check not null ( env get options ( ) get options ( common command options class ) ) ; if ( ! common options keep state after build ) { workspace get skyframe executor ( ) reset evaluator ( ) ; } / / build - related commands already call this hook in build tool # stop request , but non - build / / commands might also need to notify the skyframe executor it ' s called in # stop request so that / / timing metrics for builds can be more accurate ( since this call can be slow ) try { workspace get skyframe executor ( ) notify command complete ( env get reporter ( ) ) ; } catch ( interrupted exception e ) { logger at info ( ) with cause ( e ) log ( " interrupted in after command " ) ; after command result = blaze command result detailed exit code ( interrupted failure details detailed exit code ( " executor completion interrupted " ) ) ; thread current thread ( ) interrupt ( ) ; } blaze command result final command result ; if ( ! command result get exit code ( ) is infrastructure failure ( ) & & after command result ! = null ) { final command result = after command result ; } else { final command result = command result ; } detailed exit code other thread won exit code = notify command complete ( final command result get detailed exit code ( ) ) ; if ( other thread won exit code ! = null ) { final command result = blaze command result detailed exit code ( other thread won exit code ) ; } env get blaze workspace ( ) clear event bus ( ) ; for ( blaze module module : blaze modules ) { try ( silent closeable closeable = profiler instance ( ) profile ( module + " command complete " ) ) { module command complete ( ) ; } } env get reporter ( ) clear event bus ( ) ; retained heap limiter reset event handler ( ) ; action key context clear ( ) ; debug logger configurator flush server log ( ) ; stored exit code set ( null ) ; return final command result ; }


moves a queue item at the source index to the target index if the item being moved is the currently playing , then the current playing index is set to that of the target if the moved item is not the currently playing and moves to an index < b > after < b > the current playing index , then the current playing index is decremented vice versa if the an item after the currently playing is moved < b > before < b >

public synchronized void move ( final int source , final int target ) { if ( source < 0 | | target < 0 ) { return ; } if ( source > = streams size ( ) | | target > = streams size ( ) ) { return ; } final int current = get index ( ) ; if ( source = = current ) { queue index set ( target ) ; } else if ( source < current & & target > = current ) { queue index decrement and get ( ) ; } else if ( source > current & & target < = current ) { queue index increment and get ( ) ; } final play queue item play queue item = streams remove ( source ) ; play queue item set auto queued ( false ) ; streams add ( target , play queue item ) ; broadcast ( new move event ( source , target ) ) ; }


restart an application @ api group app detail controller @ api name restart app @ api { post } app detailsrestart { id } restart one instance of application @ api param { string } id application id to restart @ api success { string } text give deployment status @ api error bad request requested application does not restart

public response restart app ( @ path param ( " id " ) string id ) { app catalog solr client sc = new app catalog solr client ( ) ; app entry app = sc find app entry ( id ) ; service yarn app = app get yarnfile ( ) ; yarn app set state ( service state started ) ; try { yarn service client yc = new yarn service client ( ) ; yc restart app ( yarn app ) ; } catch ( json processing exception e ) { return response status ( status bad request ) build ( ) ; } return response ok ( ) build ( ) ; }


left - multiplies the vector by the given matrix , assuming the fourth ( w ) component of the vector is 1

public vector 3 mul ( final matrix 4 matrix ) { final float l mat [ ] = matrix val ; return this set ( x * l mat [ matrix 4 m00 ] + y * l mat [ matrix 4 m01 ] + z * l mat [ matrix 4 m02 ] + l mat [ matrix 4 m03 ] , x * l mat [ matrix 4 m10 ] + y * l mat [ matrix 4 m11 ] + z * l mat [ matrix 4 m12 ] + l mat [ matrix 4 m13 ] , x * l mat [ matrix 4 m20 ] + y * l mat [ matrix 4 m21 ] + z * l mat [ matrix 4 m22 ] + l mat [ matrix 4 m23 ] ) ; }


is the system in startup safe mode , i e the system is starting up with safe mode turned on automatically ?

public boolean is in startup safe mode ( ) ;


get the time at which the key was generated

public long creation timestamp ( ) { return creation timestamp ; }


clears any object associations within the given range

public synchronized void clear range ( long start , long end ) { last range = null ; / / check for range before that extends into cleared area int pos = get position of range before ( new object value range < t > ( start , end , null ) ) ; if ( pos > = 0 ) { object value range < t > range = ranges get ( pos ) ; if ( range get end ( ) > = start ) { / / truncate previous range if it needed ranges set ( pos , new object value range < t > ( range get start ( ) , start - 1 , range get value ( ) ) ) ; } if ( range get end ( ) > end ) { / / create leftover if previous range extends / / beyond cleared area ranges add ( pos + 1 , new object value range < t > ( end + 1 , range get end ( ) , range get value ( ) ) ) ; } } / / now clear ranges until we find one past the cleared area pos = math max ( 0 , pos + 1 ) ; / / start at 0 or 1 past the previous range while ( pos < ranges size ( ) ) { object value range < t > range = ranges get ( pos ) ; if ( range get end ( ) < = end ) { / / range totally inside cleared area ranges remove ( pos ) ; } else if ( range get start ( ) > end ) { / / range totally past clear area - done break ; } else { / / intersects , fixup start ranges set ( pos , new object value range < t > ( end + 1 , range get end ( ) , range get value ( ) ) ) ; } } }


public static void namespace get ( ) { return 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 " ) ; }


public list < list < big decimal > > get array array number ( ) { return array array number ; }


sets the number of times to repeat serialization and deserialization

public serialization tester set repetitions ( int repetitions ) { this repetitions = repetitions ; return this ; }


see { @ link d w a r f expression op codes } for list of opcodes

public int get op code ( ) { return opcode ; }


when used in conjunction with { @ link flush job request # calc interim } , specifies the end of the range of buckets on which to calculate interim results

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


public int solve ( ) { return dancer solve ( printer ) ; }


public static string intern ( @ check for null string s ) { return s = = null ? s : s intern ( ) ; }


tests compatibility with pre - 0 21 versions of tuple writable

public void test pre version 2 1 compatibility ( ) throws exception { writable [ ] many writs = make random writables ( 64 ) ; pre version 2 1 tuple writable old tuple = new pre version 2 1 tuple writable ( many writs ) ; for ( int i = 0 ; i < many writs length ; i + + ) { if ( i % 3 = = 0 ) { old tuple set written ( i ) ; } } byte array output stream out = new byte array output stream ( ) ; old tuple write ( new data output stream ( out ) ) ; byte array input stream in = new byte array input stream ( out to byte array ( ) ) ; tuple writable d tuple = new tuple writable ( ) ; d tuple read fields ( new data input stream ( in ) ) ; assert true ( " tuple writable is unable to read pre - 0 21 versions of tuple writable " , old tuple is compatible ( d tuple ) ) ; assert equals ( " all tuple data has not been read from the stream " , - 1 , in read ( ) ) ; }


offer a limited view ( including offset ) for the given list

public < e > list < e > view ( list < e > values ) { if ( values = = null | | values is empty ( ) ) { return values ; } if ( limit = = 0 ) { return empty list ( ) ; } if ( limit < 0 ) { values = new array list < > ( values ) ; collections reverse ( values ) ; } int size = values size ( ) ; if ( size > = total ) { return values sub list ( offset , total ) ; } int l = abs limit ( ) ; if ( size < = l ) { return values ; } return values sub list ( size - l , values size ( ) ) ; }


calls { @ link # act ( float ) } with { @ link graphics # get delta time ( ) } , limited to a minimum of 3 0fps

public void act ( ) { act ( math min ( gdx graphics get delta time ( ) , 1 / 3 0f ) ) ; }


returns an { @ code immutable range set } containing the ranges added to this builder

public immutable range set < c > build ( ) { immutable list builder < range < c > > merged ranges builder = new immutable list builder < > ( ranges size ( ) ) ; collections sort ( ranges , range < c > range lex ordering ( ) ) ; peeking iterator < range < c > > peeking itr = iterators peeking iterator ( ranges iterator ( ) ) ; while ( peeking itr has next ( ) ) { range < c > range = peeking itr next ( ) ; while ( peeking itr has next ( ) ) { range < c > next range = peeking itr peek ( ) ; if ( range is connected ( next range ) ) { check argument ( range intersection ( next range ) is empty ( ) , " overlapping ranges not permitted but found % s overlapping % s " , range , next range ) ; range = range span ( peeking itr next ( ) ) ; } else { break ; } } merged ranges builder add ( range ) ; } immutable list < range < c > > merged ranges = merged ranges builder build ( ) ; if ( merged ranges is empty ( ) ) { return of ( ) ; } else if ( merged ranges size ( ) = = 1 & & iterables get only element ( merged ranges ) equals ( range all ( ) ) ) { return all ( ) ; } else { return new immutable range set < c > ( merged ranges ) ; } }


returns the timestamp before which data is not accepted by the job this is the latest record timestamp minus the job latency

public long earliest valid timestamp ( data counts data counts ) { long current time = 0 ; date latest record timestamp = data counts get latest record time stamp ( ) ; if ( latest record timestamp ! = null ) { time value latency = analysis config get latency ( ) ; long latency millis = latency = = null ? 0 : latency millis ( ) ; current time = latest record timestamp get time ( ) - latency millis ; } return current time ; }


gets the width of the arguments ( where a category - 2 value counts as two )

protected final int arg width ( ) { int result = 0 ; for ( int i = 0 ; i < arg count ; i + + ) { result + = args [ i ] get type ( ) get category ( ) ; } return result ; }


public static int get app uid ( string pkg name ) { try { return utils get app ( ) get package manager ( ) get application info ( pkg name , 0 ) uid ; } catch ( exception e ) { e print stack trace ( ) ; return - 1 ; } }


visits a while statement with error checking for an extraneous loop checks : control flow

public void visit while ( s while user while node , semantic scope semantic scope ) { semantic scope = semantic scope new local scope ( ) ; a expression user condition node = user while node get condition node ( ) ; semantic scope set condition ( user condition node , read class ) ; semantic scope put decoration ( user condition node , new target type ( boolean class ) ) ; checked visit ( user condition node , semantic scope ) ; decorate with cast ( user condition node , semantic scope ) ; s block user block node = user while node get block node ( ) ; boolean continuous = false ; if ( user condition node instanceof e boolean constant ) { continuous = ( ( e boolean constant ) user condition node ) get bool ( ) ; if ( continuous = = false ) { throw user while node create error ( new illegal argument exception ( " extraneous while loop " ) ) ; } else { semantic scope set condition ( user while node , continuous loop class ) ; } if ( user block node = = null ) { throw user while node create error ( new illegal argument exception ( " no paths escape from while loop " ) ) ; } } if ( user block node ! = null ) { semantic scope set condition ( user block node , begin loop class ) ; semantic scope set condition ( user block node , in loop class ) ; visit ( user block node , semantic scope ) ; if ( semantic scope get condition ( user block node , loop escape class ) & & semantic scope get condition ( user block node , any continue class ) = = false ) { throw user while node create error ( new illegal argument exception ( " extraneous while loop " ) ) ; } if ( continuous & & semantic scope get condition ( user block node , any break class ) = = false ) { semantic scope set condition ( user while node , method escape class ) ; semantic scope set condition ( user while node , all escape class ) ; } } }


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


returns the name assigned to the job graph

public string get name ( ) { return this job name ; }


add all of the elements in the given collection to this list

public boolean add all ( collection < ? extends e > c ) { iterator < ? extends e > i = c iterator ( ) ; boolean changed = false ; while ( i has next ( ) ) { boolean ret = add ( i next ( ) ) ; if ( ! changed ) { changed = ret ; } } return changed ; }


a duration > 1h is forbidden client - side in aws sdk 1 11 271 ; with the ability to extend durations deployed in march 2018 , duration checks will need to go server - side , and , presumably , later s d ks will remove the client side checks this code exists to see when this happens

public void test assume role three hour session duration ( ) throws exception { describe ( " try to authenticate with a long session duration " ) ; configuration conf = create assumed role config ( ) ; / / add a duration of three hours conf set int ( assumed role session duration , 3 * 60 * 60 ) ; try { new path ( get file system ( ) get uri ( ) ) get file system ( conf ) close ( ) ; log info ( " successfully created token of a duration > 3h " ) ; } catch ( i o exception ioe ) { assert exception contains ( validation error , ioe ) ; } }


public set < string > get photo urls ( ) { return photo urls ; }


selects the source shards for a local shard recovery this might either be a split or a shrink operation

public static set < shard id > select recover from shards ( int shard id , index metadata source index metadata , int num target shards ) { if ( source index metadata get number of shards ( ) > num target shards ) { return select shrink shards ( shard id , source index metadata , num target shards ) ; } else if ( source index metadata get number of shards ( ) < num target shards ) { return collections singleton ( select split shard ( shard id , source index metadata , num target shards ) ) ; } else { return collections singleton ( select clone shard ( shard id , source index metadata , num target shards ) ) ; } }


try to find the pcode op representing the call the user has selected

private static pcode op get call op ( program program , clang token token at cursor ) { if ( token at cursor = = null ) { return null ; } if ( token at cursor instanceof clang func name token ) { return ( ( clang func name token ) token at cursor ) get pcode op ( ) ; } address addr = token at cursor get min address ( ) ; if ( addr ! = null ) { pcode op op = get op for address ( program , addr , token at cursor ) ; if ( op ! = null ) { return op ; } } clang node parent = token at cursor parent ( ) ; if ( parent instanceof clang statement ) { pcode op op = ( ( clang statement ) parent ) get pcode op ( ) ; if ( is call op ( op ) ) { return op ; } } return null ; }


does the supplied content contain an xml opening tag if the parse state is currently in an xml comment then this method always returns false it is expected that all comment tokens will have consumed for the supplied content before passing the remainder to this method

private boolean has opening tag ( string content ) { if ( this in comment ) { return false ; } int open tag index = content index of ( ' < ' ) ; return ( open tag index > - 1 & & ( content length ( ) > open tag index + 1 ) & & character is letter ( content char at ( open tag index + 1 ) ) ) ; }


constructs a value from a compiled bzl program

public static bzl compile value with program ( program prog , byte [ ] digest ) { return new success ( prog , digest ) ; }


sets new values to all fields of the tuple


specify the ssl configuration to load this api provides an alternative to key storekey passwordtrust store

public builder set s s l conf ( configuration ssl cnf ) { this ssl conf = ssl cnf ; return this ; }


given one or more sample records , find a timestamp field that is consistently present in them all to be returned the timestamp field : - must exist in every record - must have the same timestamp format in every record if multiple fields meet these criteria then the one that occurred first in the first sample record is chosen

static tuple < string , timestamp format finder > guess timestamp field ( list < string > explanation , list < map < string , ? > > sample records , file structure overrides overrides , timeout checker timeout checker ) { if ( sample records is empty ( ) ) { return null ; } string builder exception msg = null ; / / accept the first match from the first sample that is compatible with all the other samples for ( tuple < string , timestamp format finder > candidate : find candidates ( explanation , sample records , overrides , timeout checker ) ) { string field name = candidate v 1 ( ) ; timestamp format finder timestamp format finder = candidate v 2 ( ) ; boolean all good = true ; for ( map < string , ? > sample record : sample records sub list ( 1 , sample records size ( ) ) ) { object field value = sample record get ( field name ) ; if ( field value = = null ) { if ( overrides get timestamp field ( ) ! = null ) { throw new illegal argument exception ( " specified timestamp field [ " + overrides get timestamp field ( ) + " ] is not present in record [ " + sample record + " ] " ) ; } explanation add ( " first sample match [ " + field name + " ] ruled out because record [ " + sample record + " ] doesn ' t have field " ) ; all good = false ; break ; } timeout checker check ( " timestamp field determination " ) ; try { timestamp format finder add sample ( field value to string ( ) ) ; } catch ( illegal argument exception e ) { if ( overrides get timestamp format ( ) ! = null ) { if ( exception msg = = null ) { exception msg = new string builder ( " specified timestamp format [ " + overrides get timestamp format ( ) + " ] does not match " ) ; } else { exception msg append ( " , nor " ) ; } exception msg append ( " for record [ " ) append ( sample record ) append ( " ] in field [ " ) append ( field name ) append ( " ] " ) ; } explanation add ( " first sample match " + timestamp format finder get raw java timestamp formats ( ) + " ruled out because record [ " + sample record + " ] does not match " ) ; all good = false ; break ; } } if ( all good ) { explanation add ( ( ( overrides get timestamp field ( ) = = null ) ? " guessing timestamp " : " timestamp " ) + " field is [ " + field name + " ] with format " + timestamp format finder get java timestamp formats ( ) ) ; return candidate ; } } if ( exception msg ! = null ) { throw new illegal argument exception ( exception msg to string ( ) ) ; } return null ; }


determines if the content of the specified buffer is identical to the content of this array ' identical ' here means : the size of the contents of the two buffers are same and every single byte of the content of the two buffers are same please note that it does not compare { @ link # reader index ( ) } nor { @ link # writer index ( ) } this method also returns { @ code false } for { @ code null } and an object which is not an instance of { @ link channel buffer } type


adds the blob key to the given { @ link message digest }

public void add to message digest ( message digest md ) { md update ( this key ) ; }


this method is deprecated and will be removed in the future releases handle async db operation in your own logic instead

public static update or delete executor update async ( final class < ? > model class , final content values values , final long id ) { final update or delete executor executor = new update or delete executor ( ) ; runnable runnable = new runnable ( ) { @ override public void run ( ) { synchronized ( lite pal support class ) { final int rows affected = update ( model class , values , id ) ; if ( executor get listener ( ) ! = null ) { operator get handler ( ) post ( new runnable ( ) { @ override public void run ( ) { executor get listener ( ) on finish ( rows affected ) ; } } ) ; } } } } ; executor submit ( runnable ) ; return executor ; }


sets the upper boundary for the query ( inclusive ) can be removed through null

public boxed query request to ( ordinal end ) { to = end ; timestamp range lte ( end ! = null ? end timestamp ( ) : null ) ; return this ; }


public static void start activity for result ( @ non null final fragment fragment , @ non null final class < ? extends activity > clz , final int request code , final view shared elements ) { start activity for result ( fragment , null , utils get app ( ) get package name ( ) , clz get name ( ) , request code , get options bundle ( fragment , shared elements ) ) ; }


sets the factory to create composite { @ link sequenceable loader } s for when this media source loads data from multiple streams ( video , audio etc ) the default is an instance of { @ link default composite sequenceable loader factory }

public factory set composite sequenceable loader factory ( @ nullable composite sequenceable loader factory composite sequenceable loader factory ) { this composite sequenceable loader factory = composite sequenceable loader factory ! = null ? composite sequenceable loader factory : new default composite sequenceable loader factory ( ) ; return this ; }


public float get border width ( ) { return m border width ; }


public static double dot ( vector vec 1 , vector vec 2 ) { return vec 1 dot ( vec 2 ) ; }


initiates a left outer join transformation an outer join transformation joins two elements of two { @ link data set data sets } on key equality and provides multiple ways to combine joining elements into one data set elements of the < b > left < b > data set ( i e { @ code this } ) that do not have a matching element on the other side are joined with { @ code null } and emitted to the resulting data set

public < r > join operator sets base < t , r > left outer join ( data set < r > other , join hint strategy ) { switch ( strategy ) { case optimizer chooses : case repartition sort merge : case repartition hash first : case repartition hash second : case broadcast hash second : return new join operator sets base < > ( this , other , strategy , join type left outer ) ; default : throw new invalid program exception ( " invalid join hint for left outer join : " + strategy ) ; } }


uses a { @ link tree set } ordered by the specified comparator to store value collections multimaps generated by the resulting builder will not be serializable if { @ code comparator } is not serializable

public < v0 > sorted set multimap builder < k0 , v0 > tree set values ( final comparator < v0 > comparator ) { check not null ( comparator , " comparator " ) ; return new sorted set multimap builder < k0 , v0 > ( ) { @ override public < k extends k0 , v extends v0 > sorted set multimap < k , v > build ( ) { return multimaps new sorted set multimap ( multimap builder with keys this < k , v > create map ( ) , new tree set supplier < v > ( comparator ) ) ; } } ; }


sets the paging maximum paging max page search size that transform can use when pulling the data from the source index if oom is triggered , the paging max page search size is dynamically reduced so that the transform can continue to gather data

public builder set max page search size ( integer max page search size ) { this max page search size = max page search size = = null ? default max page search size : max page search size ; return this ; }


gets the location of the log file for a job if no task attempt id is specified , otherwise gets the log location for the task attempt id

public log params get log file params ( job i d job i d , task attempt i d task attempt i d ) throws i o exception , interrupted exception ;


returns true if there is a pending request that hasn ' t started yet any currently executing requests will not affect this call

public synchronized boolean has pending updates ( ) { if ( disposed ) { return false ; } return request time ! = none ; }


see original { @ link stubber # do nothing ( ) }


void set loads ( immutable map < string , module > loads ) { pkg loads = preconditions check not null ( loads ) ; }


async observable and semaphore isolation with functioning request context use hystrix context scheduler to make the user provided scheduler capture context

public void test successful request context with thread isolated asynchronous observable and captured context scheduler ( ) { request context test results results = test request context on success ( execution isolation strategy thread , new hystrix context scheduler ( schedulers new thread ( ) ) ) ; assert true ( results is context initialized get ( ) ) ; / / the user scheduler captures context assert true ( results origin thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / the user provided thread / scheduler assert true ( results is context initialized observe on get ( ) ) ; / / the user scheduler captures context assert true ( results observe on thread get ( ) get name ( ) starts with ( " rx new thread " ) ) ; / / thread isolated assert true ( results command is executed in thread ( ) ) ; }


public void directory created ( ) { increment counter ( directories created , 1 ) ; }


public void test find pdb 3 ( ) throws exception { created files = create files ( pdb location symbols subdir , pdb xml location same as pdb ) ; file pdb = pdb parser find p d b ( test program , false , symbols folder ) ; assert not null ( pdb ) ; if ( pdb parser on windows ) { assert equals ( pdb file , pdb ) ; } else { assert equals ( pdb xml file , pdb ) ; } }


public static string get address from channel ( channel channel ) { socket address socket address = channel remote address ( ) ; string address = socket address to string ( ) ; if ( socket address to string ( ) index of ( constants endpoint begin char ) = = 0 ) { address = socket address to string ( ) substring ( constants endpoint begin char length ( ) ) ; } return address ; }


returns the path fragment that is either absolute or relative to the execution root that can be used to execute the given tool

public string get tool path string or null ( tool tool ) { path fragment tool path fragment = get tool path fragment or null ( tool ) ; return tool path fragment = = null ? null : tool path fragment get path string ( ) ; }


returns true if this is a relocatable file < br > e type = = new elf header constants et rel

public boolean is relocatable ( ) { return e type = = elf constants et rel ; }


build the { @ code r socket strategies } instance


get the checksum over the hash ( ) of elements

public long get checksum ( ) { return checksum ; }


get the location that corresponds to the entry point of the function if there is only a single location , assume it applies to whole function

private static d w a r f location get top location ( list < d w a r f location > loc list , long func addr ) { if ( loc list size ( ) = = 1 ) { return loc list get ( 0 ) ; } for ( d w a r f location loc : loc list ) { if ( loc get range ( ) get from ( ) = = func addr ) { return loc ; } } return null ; }


the interface used by clients to get a report of an container from the < code > resource manager < code > or < code > application history server < code > the client , via { @ link get container report request } provides the { @ link container id } of the container in secure mode , the < code > resource manager < code > or < code > application history server < code > verifies access to the method before accepting the request the < code > resource manager < code > or < code > application history server < code > responds with a { @ link get container report response } which includes the { @ link container report } for the container

public get container report response get container report ( get container report request request ) throws yarn exception , i o exception ;


called once if the deferred computation ' throws ' an exception

void on error ( @ non null throwable e ) ;


checks if a simple naming context builder is active

public static simple naming context builder get current context builder ( ) { return activated ; }


cancels and removes a pending slot request with the given allocation id if there is no such pending request , then nothing is done

public boolean unregister slot request ( allocation i d allocation id ) { check init ( ) ; pending slot request pending slot request = pending slot requests remove ( allocation id ) ; if ( null ! = pending slot request ) { log debug ( " cancel slot request { } " , allocation id ) ; cancel pending slot request ( pending slot request ) ; return true ; } else { log debug ( " no pending slot request with allocation id { } found ignoring unregistration request " , allocation id ) ; return false ; } }


public sorted map < string , meter > get meters ( metric filter filter ) { return collections empty sorted map ( ) ; }


for a given partition { @ code topic - partition } the { @ code i } - th records looks like following { @ code topic : topic partition : partition timestamp : 1000 partition key : topic - partition value : i }

public static list < producer record < string , integer > > get records for partition ( topic partition tp ) { list < producer record < string , integer > > records = new array list < > ( ) ; for ( int i = 0 ; i < num records per partition ; i + + ) { records add ( new producer record < > ( tp topic ( ) , tp partition ( ) , i * 1000l , tp to string ( ) , i ) ) ; } return records ; }


returns the count of the statistic using the specified time value as the current time

final long get ( long now ) { long interval end = get slot end time ( now ) ; long interval start = interval end - interval ; / / this is the point at which increments to new slots will be ignored int index = current index ; long accumulated = 0l ; long prev slot end = long max value ; for ( int i = 0 ; i < num slots ; i + + ) { if ( index < 0 ) { index = num slots - 1 ; } slot current slot = slots get ( index ) ; index - - ; long current slot end = current slot end nanos ; if ( current slot end < = interval start | | current slot end > prev slot end ) { break ; } prev slot end = current slot end ; if ( current slot end > interval end ) { continue ; } accumulated = accumulated + current slot count ; } return accumulated ; }


using an import map created via { @ link # get all imports mappings ( set ) } to build a list import objects the import objects have two keys : import and classname which hold the key and value of the initial map entry

private set < map < string , string > > to imports objects ( map < string , string > mapped imports ) { set < map < string , string > > result = new tree set < map < string , string > > ( ( comparator < map < string , string > > ) ( o 1 , o 2 ) - > { string s 1 = o 1 get ( " classname " ) ; string s 2 = o 2 get ( " classname " ) ; return s 1 compare to ( s 2 ) ; } ) ; mapped imports entry set ( ) for each ( mapping - > { map < string , string > im = new linked hash map < > ( ) ; im put ( " import " , mapping get key ( ) ) ; im put ( " classname " , mapping get value ( ) ) ; result add ( im ) ; } ) ; return result ; }


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

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


validates the output records data with input as xml containing whitespaces fix : issue # 1095 : : open xml file from url generates lots of empty lines

public void process records from xml with white spaces before tags test ( ) throws i o exception { load data ( get xml data from file ( " xml - sample - format - 1 xml " ) ) ; create xml parser ( ) ; parser skip ( ) ; try { sut process record wrapper ( project , parser , column group , false , false , false ) ; } catch ( exception e ) { assert fail ( " failed to parse records from the given xml data reason : " + e get message ( ) , e ) ; } assert assert not null ( project rows , " checks the record count of project " ) ; assert assert equals ( project rows size ( ) , 3 , " checks the number of records parsed from xml " ) ; row row = project rows get ( 0 ) ; assert assert not null ( row , " checks the row instance with index ' 0 ' " ) ; assert assert equals ( row cells size ( ) , 4 , " checks the row cells count " ) ; assert assert not null ( row get cell ( 1 ) , " checks the cell instance at index ' 1 ' " ) ; assert assert equals ( row get cell ( 1 ) value , " author 1 " , " checks the value for ' author - name ' " ) ; assert assert not null ( row get cell ( 2 ) , " checks the cell instance at index ' 2 ' " ) ; assert assert equals ( row get cell ( 2 ) value , " a date " , " checks the value for ' author - dob ' " ) ; }


returns a file for the given name inside the log directory

private static file get log file ( string name ) { return new file ( system get property ( " hadoop log dir " ) , name ) ; }


returns the next token in the string as an { @ code object } this method is implemented in order to satisfy the { @ code enumeration } interface

public object next element ( ) { return next token ( ) ; }


disposes this index array and all its associated open g l resources

public void dispose ( ) { buffer utils dispose unsafe byte buffer ( byte buffer ) ; }


check if we should fail the next incoming request if so , decrement the remaining requests to fail

public synchronized boolean should fail next request ( ) { if ( remaining requests to fail = = 0 ) { return false ; } / / value < 0 indicates fail all requests if ( remaining requests to fail > 0 ) { remaining requests to fail - - ; } return true ; }


it ' s not ok to drop tombstones for non - final - results windowed streams , since we may have emitted some results for the window before getting the tombstone ( see the { @ link suppressed internal } javadoc )

public void suppress should not drop tombstones for session windows ( ) { final harness < windowed < string > , long > harness = new harness < > ( until time limit ( of millis ( 0 ) , max records ( 0 ) ) , session windowed serde from ( string class ) , long ( ) ) ; final mock internal processor context context = harness context ; final long timestamp = 100l ; context set record metadata ( " " , 0 , 0l , null , timestamp ) ; final windowed < string > key = new windowed < > ( " hey " , new session window ( 0l , 0l ) ) ; final change < long > value = new change < > ( null , arbitrary long ) ; harness processor process ( key , value ) ; assert that ( context forwarded ( ) , has size ( 1 ) ) ; final mock processor context captured forward captured forward = context forwarded ( ) get ( 0 ) ; assert that ( captured forward key value ( ) , is ( new key value < > ( key , value ) ) ) ; assert that ( captured forward timestamp ( ) , is ( timestamp ) ) ; }


get the message to write to the log before the request

private string get before message ( http servlet request request ) { return create message ( request , this before message prefix , this before message suffix ) ; }


whether this { @ link sort buffer } is finished or not


determine whether the given descriptor declares a qualifier beyond the type ( typically - but not necessarily - a specific kind of annotation ) the default implementation returns { @ code false }

default boolean has qualifier ( dependency descriptor descriptor ) { return false ; }


find a ( possibly unqualified ) type reference - first using the type name as - is , then trying any registered prefixes if the type name cannot be found

public class < ? > find type ( string type name ) throws evaluation exception { string name to lookup = type name ; try { return class utils for name ( name to lookup , this class loader ) ; } catch ( class not found exception ey ) { / / try any registered prefixes before giving up } for ( string prefix : this known package prefixes ) { try { name to lookup = prefix + ' ' + type name ; return class utils for name ( name to lookup , this class loader ) ; } catch ( class not found exception ex ) { / / might be a different prefix } } throw new spel evaluation exception ( spel message type not found , type name ) ; }


returns the name of the main component registered from java script this is used to schedule rendering of the component

protected string get main component name ( ) { return " example " ; }


test that deprecated flags touched via use default in the invocation policy don ' t elicit a deprecation warning

public void test dont print deprecation warning use default ( ) throws exception { invocation policy builder invocation policy builder = invocation policy new builder ( ) ; invocation policy builder add flag policies builder ( ) set flag name ( " test deprecated " ) get use default builder ( ) ; invocation policy enforcer enforcer = create options policy enforcer ( invocation policy builder ) ; enforcer enforce ( parser , build command ) ; assert that ( parser get warnings ( ) ) is empty ( ) ; }


initialize the cipher with the public key and then start to encrypt select attributes

protected abstract void encode attributes internal ( map < string , object > attributes , map < string , string > cached attributes to encode , registered service cipher executor cipher , registered service registered service , web application service web application service ) ;


returns the default block tolerance if the plan does not have value of tolerance specified

private long get block tolerance percentage ( disk balancer work item item ) { return item get tolerance percent ( ) < = 0 ? this block tolerance : item get tolerance percent ( ) ; }


returns a method handle to do an array store

static method handle lookup array store ( class < ? > receiver class ) { if ( receiver class is array ( ) ) { return method handles array element setter ( receiver class ) ; } else if ( map class is assignable from ( receiver class ) ) { / / maps allow access like mymap [ key ] return map put ; } else if ( list class is assignable from ( receiver class ) ) { return list set ; } throw new illegal argument exception ( " attempting to address a non - array type " + " [ " + receiver class get canonical name ( ) + " ] as an array " ) ; }


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

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


returns the closest target enemy first , units are checked , then tile entities

public static teamc closest target ( team team , float x , float y , float range , boolf < unit > unit pred , boolf < building > tile pred ) { if ( team = = team derelict ) return null ; unit unit = closest enemy ( team , x , y , range , unit pred ) ; if ( unit ! = null ) { return unit ; } else { return find enemy tile ( team , x , y , range , tile pred ) ; } }


determine if values from the given annotation can be safely accessed without causing any { @ link type not present exception type not present exceptions }

boolean is valid ( annotation annotation ) { assert annotation ( annotation ) ; for ( int i = 0 ; i < size ( ) ; i + + ) { if ( can throw type not present exception ( i ) ) { try { get ( i ) invoke ( annotation ) ; } catch ( throwable ex ) { return false ; } } } return true ; }


sub sup sup ( string selector , string cdata ) ;


public timer timer ( string name ) { return noop timer instance ; }


indicates whether the receiving node should operate based on local index information or forward requests , where needed , to other nodes if running locally , request will not raise errors if local index information is missing

public get mappings request local ( boolean local ) { this local = local ; return this ; }


return the string representation of the object in the output format if h option is false file sizes are returned in bytes if h option is true file sizes are returned in human readable

public string to string ( boolean h option , boolean t option , list < storage type > types ) { if ( t option ) { return get types quota usage ( h option , types ) ; } return get quota usage ( h option ) ; }


public void clear ( ) { msg label set text ( no status ) ; }


get raw data bytes from a { @ link writable }

public byte [ ] get raw bytes ( writable writable ) { return writable to string ( ) get bytes ( ) ; }


returns the value from the right map ( possibly null )


return if there are property values values defined for this bean

public boolean has property values ( ) { return ( this property values ! = null & & ! this property values is empty ( ) ) ; }


public boolean is directory ( ) { return false ; }


builds a predicate that will accept a cluster state only if it was generated after the current has ( re - ) joined the master

public static predicate < cluster state > build ( cluster state current state ) { final long current version = current state version ( ) ; final discovery node master node = current state nodes ( ) get master node ( ) ; final string current master id = master node = = null ? null : master node get ephemeral id ( ) ; return new state - > { final discovery node new master = new state nodes ( ) get master node ( ) ; final boolean accept ; if ( new master = = null ) { accept = false ; } else if ( new master get ephemeral id ( ) equals ( current master id ) = = false ) { accept = true ; } else { accept = new state version ( ) > current version ; } return accept ; } ; }


add an " s - maxage " directive this directive indicates that , in shared caches , the maximum age specified by this directive overrides the maximum age specified by other directives

public cache control s max age ( long s max age , time unit unit ) { return s max age ( duration of seconds ( unit to seconds ( s max age ) ) ) ; }


calculate managed memory fraction for each operator wrapper

private void calculate managed memory fraction ( ) { for ( map entry < transformation < ? > , table operator wrapper < ? > > entry : visited transforms entry set ( ) ) { double fraction = 0 ; if ( managed memory weight ! = 0 ) { fraction = entry get key ( ) get managed memory operator scope use case weights ( ) get or default ( managed memory use case operator , 0 ) * 1 0 / this managed memory weight ; } entry get value ( ) set managed memory fraction ( fraction ) ; } }


returns an element greater than the { @ link # samples ( ) } and greater than { @ link # above samples lesser ( ) }


resolve schema compatibility given an instance of a { @ code type serializer config snapshot } this method should redirect the compatibility check to the new { @ code type serializer snapshot } class along with the relevant information as present in the given { @ code deprecated config snapshot }

type serializer schema compatibility < e > resolve schema compatibility via redirecting to new snapshot class ( type serializer config snapshot < e > deprecated config snapshot ) ;


returns group settings for the given setting prefix

public map < string , settings > get groups ( string setting prefix , boolean ignore non grouped ) throws settings exception { if ( ! strings has length ( setting prefix ) ) { throw new illegal argument exception ( " illegal setting prefix " + setting prefix ) ; } if ( setting prefix char at ( setting prefix length ( ) - 1 ) ! = ' ' ) { setting prefix = setting prefix + " " ; } return get groups internal ( setting prefix , ignore non grouped ) ; }


validates that the method call happens in the rpc endpoint ' s main thread < b > important : < b > this check only happens when assertions are enabled , such as when running tests this can be used for additional checks , like { @ code protected void concurrency critical method ( ) { validate runs in main thread ( ) ; some critical stuff } }

public void validate runs in main thread ( ) { assert main thread validator util is running in expected thread ( current main thread get ( ) ) ; }


returns the total number of rows in the file this count includes rows for stripes that were completely excluded due to stripe statistics

public long get file row count ( ) { return file row count ; }


we manually handle the timeout instead of using j unit ' s timeout to return failure instead of timeout error after timeout we assume that there are missing records and there is a bug , not that the test has run out of time

public void assert at least once for topic ( properties properties , string topic , int partition , set < integer > expected elements , long timeout millis ) throws exception { long start millis = system current time millis ( ) ; set < integer > actual elements = new hash set < > ( ) ; / / until we timeout while ( system current time millis ( ) < start millis + timeout millis ) { properties put ( " key deserializer " , " org apache kafka common serialization integer deserializer " ) ; properties put ( " value deserializer " , " org apache kafka common serialization integer deserializer " ) ; / / we need to set these two properties so that they are lower than request timeout ms / / this is / / required for some old kafka consumer versions properties put ( " session timeout ms " , " 2000 " ) ; properties put ( " heartbeat interval ms " , " 500 " ) ; / / query kafka for new records collection < consumer record < integer , integer > > records = kafka server get all records from topic ( properties , topic , partition , 100 ) ; for ( consumer record < integer , integer > record : records ) { actual elements add ( record value ( ) ) ; } / / succeed if we got all expected elements if ( actual elements contains all ( expected elements ) ) { return ; } } fail ( string format ( " expected to contain all of : < % s > , but was : < % s > " , expected elements , actual elements ) ) ; }


< code > optional aapt pb plural plural = 5 ; < code >

public builder set plural ( com android aapt resources plural builder builder for value ) { copy on write ( ) ; instance set plural ( builder for value ) ; return this ; }


searches for a function by primary key , then pops up a table with the result ( or empty )

public static fid search result frame search by function i d ( long id , fid service service , fid query service fid query service ) { function record function record = fid query service get function by i d ( id ) ; return new fid search result frame ( string format ( " function id : 0x % x " , id ) , function record = = null ? new array list < function record > ( ) : new array list < function record > ( collections singleton list ( function record ) ) , service , fid query service ) ; }


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

default completable future < response entity < void > > test group parameters ( @ not null @ api param ( value = " required string in group parameters " , required = true ) @ valid @ request param ( value = " required string group " , required = true ) integer required string group , @ api param ( value = " required boolean in group parameters " , required = true ) @ request header ( value = " required boolean group " , required = true ) boolean required boolean group , @ not null @ api param ( value = " required integer in group parameters " , required = true ) @ valid @ request param ( value = " required int 6 4 group " , required = true ) long required int 6 4 group , @ api param ( value = " string in group parameters " ) @ valid @ request param ( value = " string group " , required = false ) integer string group , @ api param ( value = " boolean in group parameters " ) @ request header ( value = " boolean group " , required = false ) boolean boolean group , @ api param ( value = " integer in group parameters " ) @ valid @ request param ( value = " int 6 4 group " , required = false ) long int 6 4 group ) { return completable future completed future ( new response entity < > ( http status not implemented ) ) ; }


write headers via { @ link http 2 frame writer } if { @ code has priority } is { @ code false } it will ignore the { @ code stream dependency } , { @ code weight } and { @ code exclusive } parameters

private static channel future send headers ( http 2 frame writer frame writer , channel handler context ctx , int stream id , http 2 headers headers , final boolean has priority , int stream dependency , final short weight , boolean exclusive , final int padding , boolean end of stream , channel promise promise ) { if ( has priority ) { return frame writer write headers ( ctx , stream id , headers , stream dependency , weight , exclusive , padding , end of stream , promise ) ; } return frame writer write headers ( ctx , stream id , headers , padding , end of stream , promise ) ; }


returns a dummy object for wrapping a job submission result

public static job execution result from job submission result ( job submission result result ) { return new job execution result ( result get job i d ( ) , - 1 , null ) ; }


a helper method that wraps the { @ code future # get } call and rethrows any thrown exception as a streams exception

public static map < topic partition , list offsets result info > get end offsets ( final kafka future < map < topic partition , list offsets result info > > end offsets future ) { try { return end offsets future get ( ) ; } catch ( final runtime exception | interrupted exception | execution exception e ) { log warn ( " the list offsets request failed " , e ) ; throw new streams exception ( " unable to obtain end offsets from kafka " , e ) ; } }


move the image back to the center zoom factor is unmodified

public void reset image translation ( ) { label reset translation ( ) ; }


open a session for the session factory that this filter uses the default implementation delegates to the { @ link session factory # open session } method and sets the { @ link session } ' s flush mode to " manual "

protected session open session ( session factory session factory ) throws data access resource failure exception { try { session session = session factory open session ( ) ; session set hibernate flush mode ( flush mode manual ) ; return session ; } catch ( hibernate exception ex ) { throw new data access resource failure exception ( " could not open hibernate session " , ex ) ; } }


creates a new program with specified name and language name the actual language object is located using the language name provided please note : the program is not automatically saved into the program

public program create program ( string program name , language i d language i d , compiler spec i d compiler spec i d ) throws exception { language language = get language ( language i d ) ; return create program ( program name , language , language get compiler spec by i d ( compiler spec i d ) ) ; }


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


get the number of task trackers in the cluster

public int get task trackers ( ) { return num active trackers ; }


public void set resource group id ( string resource group id ) { this resource group id = resource group id ; }


test serialization of outer number types

big decimal fake outer number serialize ( big decimal body ) ;


indicates whether the user has an hdfs delegation token

public static boolean has h d f s delegation token ( user group information ugi ) { collection < token < ? extends token identifier > > usr tok = ugi get tokens ( ) ; for ( token < ? extends token identifier > token : usr tok ) { if ( token get kind ( ) equals ( hdfs delegation token kind ) ) { return true ; } } return false ; }


public boolean is constant ( ) { return false ; }


gets standalone profile configuration directory

public file get standalone profile configuration directory ( ) { val values = new linked hash set < > ( relaxed property names for camel case ( property cas standalone configuration directory ) get values ( ) ) ; values add ( property cas standalone configuration directory ) ; val file = values stream ( ) map ( key - > environment get property ( key , file class ) ) filter ( objects : : non null ) find first ( ) or else ( null ) ; if ( file ! = null & & file exists ( ) ) { logger trace ( " received standalone configuration directory [ { } ] " , file ) ; return file ; } return arrays stream ( default cas config directories ) filter ( file : : exists ) find first ( ) or else ( null ) ; }


add this constraint value to the given fingerprint

public void add to ( fingerprint fp ) { this constraint add to ( fp ) ; fp add string ( label get canonical form ( ) ) ; }


test inline additional properties < b > 200 < b > - successful operation

public mono < void > test inline additional properties ( map < string , string > param ) throws web client response exception { object post body = param ; / / verify the required parameter ' param ' is set if ( param = = null ) { throw new web client response exception ( " missing the required parameter ' param ' when calling test inline additional properties " , http status bad request value ( ) , http status bad request get reason phrase ( ) , null , null , null ) ; } / / create path and map variables final map < string , object > path params = new hash map < string , object > ( ) ; final multi value map < string , string > query params = new linked multi value map < string , string > ( ) ; final http headers header params = new http headers ( ) ; final multi value map < string , string > cookie params = new linked multi value map < string , string > ( ) ; final multi value map < string , object > form params = new linked multi value map < string , object > ( ) ; final string [ ] local var accepts = { } ; final list < media type > local var accept = api client select header accept ( local var accepts ) ; final string [ ] local var content types = { " application / json " } ; final media type local var content type = api client select header content type ( local var content types ) ; string [ ] local var auth names = new string [ ] { } ; parameterized type reference < void > local var return type = new parameterized type reference < void > ( ) { } ; return api client invoke a p i ( " / fake / inline - additional properties " , http method post , path params , query params , post body , header params , cookie params , form params , local var accept , local var content type , local var auth names , local var return type ) ; }


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

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


scale d by m , checking for overflow this has a short name to make above code more readable

static long x ( long d , long m , long over ) { if ( d > over ) return long max value ; if ( d < - over ) return long min value ; return d * m ; }


changes the size of the popup based on the width

public void change popup size ( final int width ) { if ( debug ) { log d ( tag , " change popup size ( ) called with : width = [ " + width + " ] " ) ; } if ( any popup view is null ( ) ) { return ; } final float minimum width = context get resources ( ) get dimension ( r dimen popup minimum width ) ; final int actual width = ( int ) ( width > screen width ? screen width : ( width < minimum width ? minimum width : width ) ) ; final int actual height = ( int ) get minimum video height ( width ) ; if ( debug ) { log d ( tag , " update popup size ( ) updated values : " + " width = [ " + actual width + " ] , height = [ " + actual height + " ] " ) ; } popup layout params width = actual width ; popup layout params height = actual height ; binding surface view set heights ( popup layout params height , popup layout params height ) ; objects require non null ( window manager ) update view layout ( binding get root ( ) , popup layout params ) ; }


sets the field names serialization format the first parameter defines how to read the format of the proto field names you are converting to json the second parameter defines which format to use when serializing them for example , if you use the following parameters : { @ link case format # lower underscore } , { @ link case format # lower camel } , the following conversion will occur : proto < - > json my field my field foo foo n id ct n id ct

public builder set field name serialization format ( case format from field name format , case format to field name format ) { this proto format = from field name format ; this json format = to field name format ; return this ; }


creates a matcher that matches iff : 1 the examined tuple ' s < code > v 1 ( ) < code > matches the specified < code > v 1 matcher < code > and 2 the examined tuple ' s < code > v 2 ( ) < code > matches the specified < code > v 2 matcher < code > for example : assert that ( tuple tuple ( " my value 1 " , " my value 2 " ) , is tuple ( starts with ( " my " ) , contains string ( " val " ) ) )

public static < v1 , v2 > tuple matcher < ? extends v1 , ? extends v2 > is tuple ( matcher < ? super v1 > v 1 matcher , matcher < ? super v2 > v 2 matcher ) { return new tuple matcher ( v 1 matcher , v 2 matcher ) ; }


removes the given change listener from the list of listeners to be notified of changes

public void remove change listener ( change listener listener ) ;


invoked after transaction commit can perform further operations right after the main transaction has successfully committed can e g commit further operations that are supposed to follow on a successful commit of the main transaction , like confirmation messages or emails < b > note : < b > the transaction will have been committed already , but the transactional resources might still be active and accessible as a consequence , any data access code triggered at this point will still " participate " in the original transaction , allowing to perform some cleanup ( with no commit following anymore ! ) , unless it explicitly declares that it needs to run in a separate transaction hence : < b > use { @ code propagation requires new } for any transactional operation that is called from here < b >


encodes up to the first three bytes of array < var > three bytes < var > and returns a four - byte array in base 6 4 notation the actual number of significant bytes in your array is given by < var > num sig bytes < var > the array < var > three bytes < var > needs only be as big as < var > num sig bytes < var > code can reuse a byte array by passing a four - byte array as < var > b 4 < var >

private static byte [ ] encode 3to 4 ( byte [ ] b 4 , byte [ ] three bytes , int num sig bytes , int options ) { encode 3to 4 ( three bytes , 0 , num sig bytes , b 4 , 0 , options ) ; return b 4 ; }


analyze storage directories recover from previous transitions if required perform fs state transition if necessary depending on the namespace info read storage info

boolean recover transition read ( startup option start opt , f s namesystem target , meta recovery context recovery ) throws i o exception { assert start opt ! = startup option format : " name node formatting should be performed before reading the image " ; collection < uri > image dirs = storage get image directories ( ) ; collection < uri > edits dirs = edit log get edit u r is ( ) ; / / none of the data dirs exist if ( ( image dirs size ( ) = = 0 | | edits dirs size ( ) = = 0 ) & & start opt ! = startup option import ) throw new i o exception ( " all specified directories are not accessible or do not exist " ) ; / / 1 for each data directory calculate its state and / / check whether all is consistent before transitioning map < storage directory , storage state > data dir states = new hash map < storage directory , storage state > ( ) ; boolean is formatted = recover storage dirs ( start opt , storage , data dir states ) ; if ( log is trace enabled ( ) ) { log trace ( " data dir states : \ n " + joiner on ( " \ n " ) with key value separator ( " : " ) join ( data dir states ) ) ; } if ( ! is formatted & & start opt ! = startup option rollback & & start opt ! = startup option import ) { throw new i o exception ( " name node is not formatted " ) ; } int layout version = storage get layout version ( ) ; if ( start opt = = startup option metadataversion ) { system out println ( " hdfs image version : " + layout version ) ; system out println ( " software format version : " + hdfs server constants namenode layout version ) ; return false ; } if ( layout version < storage last pre upgrade layout version ) { n n storage check version upgradable ( storage get layout version ( ) ) ; } if ( start opt ! = startup option upgrade & & start opt ! = startup option upgradeonly & & ! rolling upgrade startup option started matches ( start opt ) & & layout version < storage last pre upgrade layout version & & layout version ! = hdfs server constants namenode layout version ) { throw new i o exception ( " \ n file system image contains an old layout version " + storage get layout version ( ) + " \ n an upgrade to version " + hdfs server constants namenode layout version + " is required \ n " + " please restart name node with the \ " " + rolling upgrade startup option started get option string ( ) + " \ " option if a rolling upgrade is already started ; " + " or restart name node with the \ " " + startup option upgrade get name ( ) + " \ " option to start " + " a new upgrade " ) ; } storage process startup options for upgrade ( start opt , layout version ) ; / / 2 format unformatted dirs for ( iterator < storage directory > it = storage dir iterator ( ) ; it has next ( ) ; ) { storage directory sd = it next ( ) ; storage state cur state = data dir states get ( sd ) ; switch ( cur state ) { case non existent : throw new i o exception ( storage state non existent + " state cannot be here " ) ; case not formatted : / / create a dir structure , but not the version file the presence of / / version is checked in the inspector ' s need to save ( ) method and / / save namespace is triggered if it is absent this will bring / / the storage state uptodate along with a new version file / / if ha is enabled , n ns start up as standby so save namespace is not / / triggered log info ( " storage directory " + sd get root ( ) + " is not formatted " ) ; log info ( " formatting " ) ; sd clear directory ( ) ; / / create empty current dir / / for non - ha , no further action is needed here , as save namespace will / / take care of the rest if ( ! target is ha enabled ( ) ) { continue ; } / / if ha is enabled , save the dirs to create a version file later when / / a checkpoint image is saved if ( new dirs = = null ) { new dirs = new hash set < storage directory > ( ) ; } new dirs add ( sd ) ; break ; default : break ; } } / / 3 do transitions switch ( start opt ) { case upgrade : case upgradeonly : do upgrade ( target ) ; return false ; / / upgrade saved image already case import : do import checkpoint ( target ) ; return false ; / / import checkpoint saved image already case rollback : throw new assertion error ( " rollback is now a standalone command , " + " name node should not be starting with this option " ) ; case regular : default : / / just load the image } return load f s image ( target , start opt , recovery ) ; }


finds multiple records by an id array list & lt ; person & gt ; people = lite pal find all ( person class , 1 , 2 , 3 ) ; long [ ] book ids = { 10 , 18 } ; list & lt ; book & gt ; books = lite pal find all ( book class , book ids ) ; of course you can find all records by passing nothing to the ids parameter list & lt ; book & gt ; all books = lite pal find all ( book class ) ; note that the associated models won ' t be loaded by default considering the efficiency , but you can do that by using { @ link lite pal # find all ( class , boolean , long ) } the model class determines which table to query and the object type to return

public static < t > list < t > find all ( class < t > model class , long ids ) { return operator find all ( model class , ids ) ; }


writes the given int value ( 3 2bit , 4 bytes ) to the given position in big endian byte order this method ' s speed depends on the system ' s native byte order , and it is possibly slower than { @ link # put int ( int , int ) } for most cases ( such as transient storage in memory or serialization for io and network ) , it suffices to know that the byte order in which the value is written is the same as the one in which it is read , and { @ link # put int ( int , int ) } is the preferable choice

public final void put int big endian ( int index , int value ) { if ( little endian ) { put int ( index , integer reverse bytes ( value ) ) ; } else { put int ( index , value ) ; } }


returns a save file if available returns null if a save can not be performed this method may block for an extended period of time if the pre - save process has not already completed this method does not accept a monitor since a remote task monitor does not yet exist

public synchronized local managed buffer file get save file ( task monitor monitor ) throws i o exception , cancelled exception { if ( save file ! = null ) { throw new i o exception ( " save already in progress " ) ; } wait for pre save ( monitor ) ; save file = pre save file ; pre save file = null ; if ( save file ! = null ) { if ( get buffer count ( ) ! = save file get buffer count ( ) ) { throw new assert exception ( ) ; } file vfile = bf mgr get version file ( version ) ; if ( vfile ! = null ) { / / records changes made to pre - save file for reverse reconstruction / / if vfile already exists , modifications will be added to it save file version out file = new version file ( this , save file , vfile ) ; } file m file = bf mgr get change map file ( ) ; if ( m file ! = null ) { / / tracks buffers written since checkout / / if mfile already exists , modifications will be added to it save file change map = new change map file ( m file , this , save file ) ; } file change file = bf mgr get change data file ( version ) ; if ( change file ! = null ) { change file = new file ( change file get parent file ( ) , change file get name ( ) + temp file ext ) ; change file delete ( ) ; save change file = new local buffer file ( change file , get buffer size ( ) ) ; } } return save file ; }


get the variable associated with this variable location

public variable get variable ( ) { function function = program get function manager ( ) get function at ( function addr ) ; if ( function = = null ) { return null ; } if ( is parameter ) { / / return or parameter return function get parameter ( ordinal orfirst use offset ) ; } if ( variable address = = null | | ! variable address is variable address ( ) ) { return null ; } for ( variable var : function get local variables ( ) ) { if ( var get first use offset ( ) = = ordinal orfirst use offset & & var get symbol ( ) get address ( ) equals ( variable address ) ) { return var ; } } return null ; }


pull a slot out of a preexisting shared memory segment must be called with the manager lock held

private slot alloc slot from existing shm ( extended block id block id ) { if ( not full is empty ( ) ) { return null ; } entry < shm id , dfs client shm > entry = not full first entry ( ) ; dfs client shm shm = entry get value ( ) ; shm id shm id = shm get shm id ( ) ; slot slot = shm alloc and register slot ( block id ) ; if ( shm is full ( ) ) { log trace ( " { } : pulled the last slot { } out of { } " , this , slot get slot idx ( ) , shm ) ; dfs client shm removed shm = not full remove ( shm id ) ; preconditions check state ( removed shm = = shm ) ; full put ( shm id , shm ) ; } else { log trace ( " { } : pulled slot { } out of { } " , this , slot get slot idx ( ) , shm ) ; } return slot ; }


return an empty target source for the given target class

public static empty target source for class ( @ nullable class < ? > target class ) { return for class ( target class , true ) ; }


public void prefix number test ( ) { / / todo : test prefix number }


creates an returns a new { @ link object } that can be used and later recycled via { @ link handle # recycle ( object ) }


return the index of the last component that would be overwritten by a new datatype , if we started overwriting with at a specific component all components , except the first , must be undefined datatypes or we return - 1

private static int get end component index ( structure struct , data type component comp , data type newtype ) { int newlen = newtype get length ( ) ; if ( newlen < = 0 ) { return - 1 ; / / don ' t support variable length types } data type curtype = comp get data type ( ) ; newlen - = curtype get length ( ) ; int index = comp get ordinal ( ) ; while ( newlen > 0 ) { index + = 1 ; if ( index > = struct get num components ( ) ) { return - 1 ; / / not enough space in the structure } comp = struct get component ( index ) ; / / string nm = comp get field name ( ) ; / / if ( ( nm ! = null ) & & ( nm length ( ) ! = 0 ) ) / / return - 1 ; curtype = comp get data type ( ) ; / / if ( ! undefined is undefined ( curtype ) ) / / return - 1 ; / / overlaps non - undefined datatype if ( curtype ! = data type default ) { return - 1 ; / / only allow overwrite of placeholder components } newlen - = curtype get length ( ) ; } return index ; }


checks if an item ' s range bottom is below the top range if true , it means the item is inside range

private static boolean is below viewport top ( rect visible rect , incremental module item item ) { return visible rect top < item get enter range bottom ( ) | | ( visible rect top = = item get enter range bottom ( ) & & item get bounds ( ) bottom > visible rect top ) ; }


public string get error details ( ) { string builder buf = new string builder ( " < html > " + get error header ( ) ) ; int error count = 0 ; buf append ( " < blockquote > < br > " ) ; for ( string error : errors ) { buf append ( error ) append ( " < br > " ) ; if ( + + error count > max errors ) { buf append ( " and " + ( errors size ( ) - error count ) + " more ! " ) ; break ; } } return buf to string ( ) ; }


registers stream consumers for the given streams if efo is enabled with eager registration strategy

public static void eagerly register stream consumers ( final properties config props , final list < string > streams ) { if ( ! is using efo record publisher ( config props ) | | ! is eager efo registration type ( config props ) ) { return ; } register stream consumers ( config props , streams ) ; }


simulate the { @ link d f s config keys # dfs datanode data dir key } of a populated dfs filesystem this method populates for each parent directory , < code > parentdir name < code > with the content of block pool storage directory that comes from a singleton datanode master ( that contains version and block files ) if the destination directory does not exist , it will be created if the directory already exists , it will first be deleted

public static file [ ] create block pool storage dirs ( string [ ] parents , string dir name , string bpid ) throws exception { file [ ] ret val = new file [ parents length ] ; path bp cur dir = new path ( mini d f s cluster get b p dir ( datanode storage , bpid , storage storage dir current ) ) ; for ( int i = 0 ; i < parents length ; i + + ) { file new dir = new file ( parents [ i ] + " / current / " + bpid , dir name ) ; create empty dirs ( new string [ ] { new dir to string ( ) } ) ; local file system local f s = file system get local ( new hdfs configuration ( ) ) ; local f s copy to local file ( bp cur dir , new path ( new dir to string ( ) ) , false ) ; ret val [ i ] = new dir ; } return ret val ; }


a sensible definition of { @ link # to string } in terms of { @ link # iterator } if you override { @ link # iterator } , you may wish to override { @ link # to string } to forward to this implementation

protected string standard to string ( ) { return collections 2 to string impl ( this ) ; }


public void logout user ( ) { / / todo : implement }


returns property object class associated with this set

public class < ? > get object class ( ) { return object class ; }


if the inner stream supports { @ link stream capabilities } , forward the probe to it otherwise : return false

public boolean has capability ( final string capability ) { if ( out instanceof stream capabilities ) { return ( ( stream capabilities ) out ) has capability ( capability ) ; } else { return false ; } }


returns the largest key in the set that is less than the given key returns - 1 if there are not keys less than the given key

public short get previous ( short key ) { if ( ( key < 0 ) | | ( key > max key ) ) { throw new index out of bounds exception ( ) ; } boolean found value = false ; short bestkey = 0 ; r b node node = root ; while ( node ! = null ) { if ( key < = node key ) { node = node left ; } else { found value = true ; bestkey = node key ; node = node right ; } } if ( found value ) { return bestkey ; } return - 1 ; }


handle the response - received event from azure sdk

public void event occurred ( response received event event arg ) { instrumentation web response ( ) ; if ( ! ( event arg get connection object ( ) instanceof http u r l connection ) ) { / / typically this shouldn ' t happen , but just let it pass return ; } http u r l connection connection = ( http u r l connection ) event arg get connection object ( ) ; request result current result = event arg get request result ( ) ; if ( current result = = null ) { / / again , typically shouldn ' t happen , but let it pass return ; } long request latency = current result get stop date ( ) get time ( ) - current result get start date ( ) get time ( ) ; if ( current result get status code ( ) = = http u r l connection http created & & connection get request method ( ) equals ignore case ( " put " ) ) { / / if it ' s a put with an http created status then it ' s a successful / / block upload long length = get request content length ( connection ) ; if ( length > 0 ) { block upload gauge updater block uploaded ( current result get start date ( ) , current result get stop date ( ) , length ) ; instrumentation raw bytes uploaded ( length ) ; instrumentation block uploaded ( request latency ) ; } } else if ( current result get status code ( ) = = http u r l connection http partial & & connection get request method ( ) equals ignore case ( " get " ) ) { / / if it ' s a get with an http partial status then it ' s a successful / / block download long length = get response content length ( connection ) ; if ( length > 0 ) { block upload gauge updater block downloaded ( current result get start date ( ) , current result get stop date ( ) , length ) ; instrumentation raw bytes downloaded ( length ) ; instrumentation block downloaded ( request latency ) ; } } }


input stream backed by the internal byte array

byte array input stream get input stream ( ) { byte array input stream bin = new byte array input stream ( this buf , 0 , count ) ; this reset ( ) ; this buf = null ; return bin ; }


get the entries that are restored to a key value store when it is constructed with this driver ' s { @ link # context ( ) processor context }

public iterable < key value < byte [ ] , byte [ ] > > restored entries ( ) { return restorable entries ; }


returns a { @ link bitmap transition options } object that enables a cross fade animation

public static bitmap transition options with cross fade ( ) { return new bitmap transition options ( ) cross fade ( ) ; }


enabledisable checking parameters for constant references

public void set param ref check ( boolean check param refs option ) { check for param refs = check param refs option ; }


extremely important : keep this up to date with find internal function above ! ! ! determine if the given identifier is a sleigh internal function used to prevent user - defined p - code names from colliding with internal names

public boolean is internal function ( string name ) { if ( " zext " equals ( name ) ) { return true ; } if ( " carry " equals ( name ) ) { return true ; } if ( " sext " equals ( name ) ) { return true ; } if ( " scarry " equals ( name ) ) { return true ; } if ( " sborrow " equals ( name ) ) { return true ; } if ( " abs " equals ( name ) ) { return true ; } if ( " nan " equals ( name ) ) { return true ; } if ( " sqrt " equals ( name ) ) { return true ; } if ( " ceil " equals ( name ) ) { return true ; } if ( " floor " equals ( name ) ) { return true ; } if ( " round " equals ( name ) ) { return true ; } if ( " int 2float " equals ( name ) ) { return true ; } if ( " float 2float " equals ( name ) ) { return true ; } if ( " trunc " equals ( name ) ) { return true ; } if ( " delayslot " equals ( name ) ) { return true ; } if ( " cpool " equals ( name ) ) { return true ; } if ( " newobject " equals ( name ) ) { return true ; } if ( " popcount " equals ( name ) ) { return true ; } return false ; }


check that the no parameter constructor works correctly

public void constructor blank ( ) throws i o exception { file status file status = new file status ( ) ; validate accessors ( file status , 0 , false , 0 , 0 , 0 , 0 , fs permission get file default ( ) , " " , " " , null , null ) ; }


selects subroutines that are not directly referenced this is commonly referred to as dead code

private address set select dead subroutines ( task monitor monitor , program program , address set start addresses ) throws cancelled exception { / / create a new address set to hold the entire selection address set new address set = new address set ( ) ; / / if we don ' t have any addresses simply return if ( ( start addresses = = null ) | | ( start addresses get num addresses ( ) < = 0 ) ) { return new address set ; } monitor initialize ( start addresses get num addresses ( ) ) ; reference manager rm = program get reference manager ( ) ; code block model cbm = block model service get active subroutine model ( ) ; code block iterator cb iter = cbm get code blocks containing ( start addresses , monitor ) ; while ( cb iter has next ( ) ) { if ( monitor is cancelled ( ) ) { return new address set ; } code block block = cb iter next ( ) ; monitor set message ( block get name ( ) ) ; if ( ! block has references ( rm , block ) ) { new address set add ( block ) ; } monitor increment progress ( block get num addresses ( ) ) ; } return new address set ; }


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


given two addresses , indicate whether there is an address in that range ( inclusive ) having the property

public boolean intersects ( address start , address end ) { return property mgr intersects ( addr map get key ( start ) , addr map get key ( end ) ) ; }


public string get pathname ( ) { synchronized ( file system ) { string buffer buf = new string buffer ( parent ! = null ? parent get pathname ( ) : " " ) ; if ( buf length ( ) ! = 1 ) { buf append ( file system separator char ) ; } buf append ( name ) ; return buf to string ( ) ; } }


opens a file for reading and returns an input stream

input stream get input stream ( string filename ) throws i o exception ;


connect to the server and set up the io streams it then sends a header to the server and starts the connection thread that waits for responses

private synchronized void setup i ostreams ( atomic boolean fallback to simple auth ) { if ( socket ! = null | | should close connection get ( ) ) { return ; } user group information ticket = remote id get ticket ( ) ; if ( ticket ! = null ) { final user group information real user = ticket get real user ( ) ; if ( real user ! = null ) { ticket = real user ; } } try { connecting thread set ( thread current thread ( ) ) ; if ( log is debug enabled ( ) ) { log debug ( " connecting to " + server ) ; } span span = tracer get current span ( ) ; if ( span ! = null ) { span add timeline annotation ( " ipc client connecting to " + server ) ; } short num retries = 0 ; random rand = null ; while ( true ) { setup connection ( ticket ) ; ipc streams = new ipc streams ( socket , max response length ) ; write connection header ( ipc streams ) ; if ( auth protocol = = auth protocol sasl ) { try { auth method = ticket do as ( new privileged exception action < auth method > ( ) { @ override public auth method run ( ) throws i o exception , interrupted exception { return setup sasl connection ( ipc streams ) ; } } ) ; } catch ( i o exception ex ) { if ( sasl rpc client = = null ) { / / whatever happened - it can ' t be handled , so rethrow throw ex ; } / / otherwise , assume a connection problem auth method = sasl rpc client get auth method ( ) ; if ( rand = = null ) { rand = new random ( ) ; } handle sasl connection failure ( num retries + + , max retries on sasl , ex , rand , ticket ) ; continue ; } if ( auth method ! = auth method simple ) { / / sasl connect is successful let ' s set up sasl i / o streams ipc streams set sasl client ( sasl rpc client ) ; / / for testing remote id sasl qop = ( string ) sasl rpc client get negotiated property ( sasl qop ) ; log debug ( " negotiated qop is : " + remote id sasl qop ) ; if ( fallback to simple auth ! = null ) { fallback to simple auth set ( false ) ; } } else if ( user group information is security enabled ( ) ) { if ( ! fallback allowed ) { throw new access control exception ( " server asks us to fall back to simple " + " auth , but this client is configured to only allow secure " + " connections " ) ; } if ( fallback to simple auth ! = null ) { fallback to simple auth set ( true ) ; } } } if ( do ping ) { ipc streams set input stream ( new ping input stream ( ipc streams in ) ) ; } write connection context ( remote id , auth method ) ; / / update last activity time touch ( ) ; span = tracer get current span ( ) ; if ( span ! = null ) { span add timeline annotation ( " ipc client connected to " + server ) ; } / / start the receiver thread after the socket connection has been set / / up start ( ) ; return ; } } catch ( throwable t ) { if ( t instanceof i o exception ) { mark closed ( ( i o exception ) t ) ; } else { mark closed ( new i o exception ( " couldn ' t set up io streams : " + t , t ) ) ; } close ( ) ; } finally { connecting thread set ( null ) ; } }


set whether this bean definition is ' synthetic ' , that is , not defined by the application itself ( for example , an infrastructure bean such as a helper for auto - proxying , created through { @ code < aop : config > } )

public void set synthetic ( boolean synthetic ) { this synthetic = synthetic ; }


accessible for { @ link ast visitor } , use { @ link ast visitor # process ( node , object ) } instead

protected < r , c > r accept ( ast visitor < r , c > visitor , c context ) { return visitor visit expression ( this , context ) ; }


private list < filler function > install fill pattern 01 ( string search pattern ) throws exception { list < filler function > result = new array list < > ( ) ; / / / / 00 filler byte / / int count = 2 ; function f 1 = builder create empty function ( " function 1 " , " 0x 1 0 " , 10 , new void data type ( ) ) ; address set view body = f 1 get body ( ) ; address max = body get max address ( ) ; string actual pattern = " 01 " ; boolean is filler found = search pattern equals ( actual pattern ) ; result add ( new filler function ( f 1 , count , is filler found ) ) ; address filler address = max next ( ) ; set bytes ( filler address , actual pattern , count ) ; return result ; }