signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class LruCache { /** * Returns the value for { @ code key } if it exists in the cache or can be
* created by { @ code # create } . If a value was returned , it is moved to the
* head of the queue . This returns null if a value is not cached and cannot
* be created . */
public final V get ( K key ) { } }
|
if ( key == null ) { throw new NullPointerException ( "key == null" ) ; } V mapValue ; synchronized ( this ) { mapValue = map . get ( key ) ; if ( mapValue != null ) { hitCount ++ ; return mapValue ; } missCount ++ ; } /* * Attempt to create a value . This may take a long time , and the map
* may be different when create ( ) returns . If a conflicting value was
* added to the map while create ( ) was working , we leave that value in
* the map and release the created value . */
V createdValue = create ( key ) ; if ( createdValue == null ) { return null ; } synchronized ( this ) { createCount ++ ; mapValue = map . put ( key , createdValue ) ; if ( mapValue != null ) { // There was a conflict so undo that last put
map . put ( key , mapValue ) ; } else { size += safeSizeOf ( key , createdValue ) ; } } if ( mapValue != null ) { entryRemoved ( false , key , createdValue , mapValue ) ; return mapValue ; } else { trimToSize ( maxSize ) ; return createdValue ; }
|
public class MonetaryFormats { /** * Checks if a { @ link MonetaryAmountFormat } is available for the given { @ link javax . money . format . AmountFormatQuery } .
* @ param formatQuery the required { @ link AmountFormatQuery } , not { @ code null } . If the query does not define
* any explicit provider chain , the providers as defined by # getDefaultCurrencyProviderChain ( )
* are used .
* @ return true , if a corresponding { @ link MonetaryAmountFormat } is accessible . */
public static boolean isAvailable ( AmountFormatQuery formatQuery ) { } }
|
return Optional . ofNullable ( getMonetaryFormatsSpi ( ) ) . orElseThrow ( ( ) -> new MonetaryException ( "No MonetaryFormatsSingletonSpi " + "loaded, query functionality is not available." ) ) . isAvailable ( formatQuery ) ;
|
public class DependencyTable { /** * Determines if the specified target needs to be rebuilt .
* This task may result in substantial IO as files are parsed to determine
* their dependencies */
public boolean needsRebuild ( final CCTask task , final TargetInfo target , final int dependencyDepth ) { } }
|
// look at any files where the compositeLastModified
// is not known , but the includes are known
boolean mustRebuild = false ; final CompilerConfiguration compiler = ( CompilerConfiguration ) target . getConfiguration ( ) ; final String includePathIdentifier = compiler . getIncludePathIdentifier ( ) ; final File [ ] sources = target . getSources ( ) ; final DependencyInfo [ ] dependInfos = new DependencyInfo [ sources . length ] ; final long outputLastModified = target . getOutput ( ) . lastModified ( ) ; // try to solve problem using existing dependency info
// ( not parsing any new files )
DependencyInfo [ ] stack = new DependencyInfo [ 50 ] ; boolean rebuildOnStackExhaustion = true ; if ( dependencyDepth >= 0 ) { if ( dependencyDepth < 50 ) { stack = new DependencyInfo [ dependencyDepth ] ; } rebuildOnStackExhaustion = false ; } final TimestampChecker checker = new TimestampChecker ( outputLastModified , rebuildOnStackExhaustion ) ; for ( int i = 0 ; i < sources . length && ! mustRebuild ; i ++ ) { final File source = sources [ i ] ; final String relative = CUtil . getRelativePath ( this . baseDirPath , source ) ; DependencyInfo dependInfo = getDependencyInfo ( relative , includePathIdentifier ) ; if ( dependInfo == null ) { task . log ( "Parsing " + relative , Project . MSG_VERBOSE ) ; dependInfo = parseIncludes ( task , compiler , source ) ; } walkDependencies ( task , dependInfo , compiler , stack , checker ) ; mustRebuild = checker . getMustRebuild ( ) ; } return mustRebuild ;
|
public class RunbookDraftsInner { /** * Replaces the runbook draft content .
* @ param resourceGroupName Name of an Azure Resource group .
* @ param automationAccountName The name of the automation account .
* @ param runbookName The runbook name .
* @ param runbookContent The runbook draft content .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable for the request */
public Observable < String > replaceContentAsync ( String resourceGroupName , String automationAccountName , String runbookName , String runbookContent ) { } }
|
return replaceContentWithServiceResponseAsync ( resourceGroupName , automationAccountName , runbookName , runbookContent ) . map ( new Func1 < ServiceResponseWithHeaders < String , RunbookDraftReplaceContentHeaders > , String > ( ) { @ Override public String call ( ServiceResponseWithHeaders < String , RunbookDraftReplaceContentHeaders > response ) { return response . body ( ) ; } } ) ;
|
public class ClassReader { /** * Reads a numeric or string constant pool item in { @ link # b b } . < i > This
* method is intended for { @ link Attribute } sub classes , and is normally not
* needed by class generators or adapters . < / i >
* @ param item the index of a constant pool item .
* @ param buf buffer to be used to read the item . This buffer must be
* sufficiently large . It is not automatically resized .
* @ return the { @ link Integer } , { @ link Float } , { @ link Long } ,
* { @ link Double } , { @ link String } or { @ link Type } corresponding to
* the given constant pool item . */
public Object readConst ( final int item , final char [ ] buf ) { } }
|
int index = items [ item ] ; switch ( b [ index - 1 ] ) { case ClassWriter . INT : return new Integer ( readInt ( index ) ) ; case ClassWriter . FLOAT : return new Float ( Float . intBitsToFloat ( readInt ( index ) ) ) ; case ClassWriter . LONG : return new Long ( readLong ( index ) ) ; case ClassWriter . DOUBLE : return new Double ( Double . longBitsToDouble ( readLong ( index ) ) ) ; case ClassWriter . CLASS : return Type . getObjectType ( readUTF8 ( index , buf ) ) ; // case ClassWriter . STR :
default : return readUTF8 ( index , buf ) ; }
|
public class SparkDataHandler { /** * Load data and populate results .
* @ param dataFrame
* the data frame
* @ param m
* the m
* @ param kunderaQuery
* the kundera query
* @ return the list */
public List < ? > loadDataAndPopulateResults ( DataFrame dataFrame , EntityMetadata m , KunderaQuery kunderaQuery ) { } }
|
if ( kunderaQuery != null && kunderaQuery . isAggregated ( ) ) { return dataFrame . collectAsList ( ) ; } // TODO : handle the case of specific field selection
else { return populateEntityObjectsList ( dataFrame , m ) ; }
|
public class Autoencoder { /** * Initializes the Autoencoder classifier on the argument trainingPoints .
* @ param trainingPoints the Collection of instances on which to initialize the Autoencoder classifier . */
@ Override public void initialize ( Collection < Instance > trainingPoints ) { } }
|
Iterator < Instance > trgPtsIterator = trainingPoints . iterator ( ) ; if ( trgPtsIterator . hasNext ( ) && this . reset ) { Instance inst = ( Instance ) trgPtsIterator . next ( ) ; this . numAttributes = inst . numAttributes ( ) - 1 ; this . initializeNetwork ( ) ; } while ( trgPtsIterator . hasNext ( ) ) { this . trainOnInstance ( ( Instance ) trgPtsIterator . next ( ) ) ; }
|
public class DescribeCommand { /** * < pre > - - dirty [ = mark ] < / pre >
* Describe the working tree . It means describe HEAD and appends mark ( < pre > - dirty < / pre > by default ) if the
* working tree is dirty .
* @ param dirtyMarker the marker name to be appended to the describe output when the workspace is dirty
* @ return itself , to allow fluent configuration */
@ Nonnull public DescribeCommand dirty ( @ Nullable String dirtyMarker ) { } }
|
Optional < String > option = Optional . ofNullable ( dirtyMarker ) ; log . info ( "--dirty = {}" , option . orElse ( "" ) ) ; this . dirtyOption = option ; return this ;
|
public class AbstractChannelFactory { /** * Configures the security options that should be used by the channel .
* @ param builder The channel builder to configure .
* @ param name The name of the client to configure . */
protected void configureSecurity ( final T builder , final String name ) { } }
|
final GrpcChannelProperties properties = getPropertiesFor ( name ) ; final Security security = properties . getSecurity ( ) ; if ( properties . getNegotiationType ( ) != NegotiationType . TLS // non - default
|| isNonNullAndNonBlank ( security . getAuthorityOverride ( ) ) || isNonNullAndNonBlank ( security . getCertificateChainPath ( ) ) || isNonNullAndNonBlank ( security . getPrivateKeyPath ( ) ) || isNonNullAndNonBlank ( security . getTrustCertCollectionPath ( ) ) ) { throw new IllegalStateException ( "Security is configured but this implementation does not support security!" ) ; }
|
public class TrmMessageFactoryImpl { /** * Create a new , empty TrmMeBridgeBootstrapReply message
* @ return The new TrmMeBridgeBootstrapReply .
* @ exception MessageCreateFailedException Thrown if such a message can not be created */
public TrmMeBridgeBootstrapReply createNewTrmMeBridgeBootstrapReply ( ) throws MessageCreateFailedException { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createNewTrmMeBridgeBootstrapReply" ) ; TrmMeBridgeBootstrapReply msg = null ; try { msg = new TrmMeBridgeBootstrapReplyImpl ( ) ; } catch ( MessageDecodeFailedException e ) { /* No need to FFDC this as JsMsgObject will already have done so */
// No FFDC code needed
throw new MessageCreateFailedException ( e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createNewTrmMeBridgeBootstrapReply" ) ; return msg ;
|
public class IO { /** * Static factory method for creating an { @ link IO } from an externally managed source of
* { @ link CompletableFuture completable futures } .
* Note that constructing an { @ link IO } this way results in no intermediate futures being constructed by either
* { @ link IO # unsafePerformAsyncIO ( ) } or { @ link IO # unsafePerformAsyncIO ( Executor ) } , and { @ link IO # unsafePerformIO ( ) }
* is synonymous with invoking { @ link CompletableFuture # get ( ) } on the externally managed future .
* @ param supplier the source of externally managed { @ link CompletableFuture completable futures }
* @ param < A > the result type
* @ return the { @ link IO } */
public static < A > IO < A > externallyManaged ( Supplier < CompletableFuture < A > > supplier ) { } }
|
return new IO < A > ( ) { @ Override public A unsafePerformIO ( ) { return checked ( ( ) -> unsafePerformAsyncIO ( ) . get ( ) ) . get ( ) ; } @ Override public CompletableFuture < A > unsafePerformAsyncIO ( Executor executor ) { return supplier . get ( ) ; } } ;
|
public class ReUtil { /** * 获得匹配的字符串 , 对应分组0表示整个匹配内容 , 1表示第一个括号分组内容 , 依次类推
* @ param pattern 编译后的正则模式
* @ param content 被匹配的内容
* @ param groupIndex 匹配正则的分组序号 , 0表示整个匹配内容 , 1表示第一个括号分组内容 , 依次类推
* @ return 匹配后得到的字符串 , 未匹配返回null */
public static String get ( Pattern pattern , CharSequence content , int groupIndex ) { } }
|
if ( null == content || null == pattern ) { return null ; } final Matcher matcher = pattern . matcher ( content ) ; if ( matcher . find ( ) ) { return matcher . group ( groupIndex ) ; } return null ;
|
public class DataUtil { /** * big - endian or motorola format . */
public static void writeUnsignedShortBigEndian ( byte [ ] buffer , int offset , int value ) { } }
|
buffer [ offset ++ ] = ( byte ) ( ( value >> 8 ) & 0xFF ) ; buffer [ offset ] = ( byte ) ( value & 0xFF ) ;
|
public class XYChartLabelFormatter { /** * Formats the label Text shapes in the given axis by cutting text value . */
private void cut ( XYChartLabel label , double maxWidth , double maxHeight , double rotation ) { } }
|
String text = label . getLabel ( ) . getText ( ) ; // Cut text .
cutLabelText ( label , maxWidth - 5 , maxHeight - 5 , rotation ) ; String cutText = label . getLabel ( ) . getText ( ) ; // If text is cut , add suffix characters .
if ( text . length ( ) != cutText . length ( ) ) { label . getLabel ( ) . setText ( label . getLabel ( ) . getText ( ) + "..." ) ; } // TODO : Animate .
// animate ( label , text , cutText , originalRotation ) ;
// Move label to top .
label . getLabelContainer ( ) . moveToTop ( ) ;
|
public class StopCriterionChecker { /** * Start checking the stop criteria , in a separate background thread . If the stop criterion checker is
* already active , or if no stop criteria have been added , calling this method does not have any effect . */
public void startChecking ( ) { } }
|
// synchronize with other attempts to update the running task
synchronized ( runningTaskLock ) { // check if not already active
if ( runningTask == null ) { // only activate if at least one stop criterion has been set
if ( ! stopCriteria . isEmpty ( ) ) { // schedule periodical check
runningTask = new StopCriterionCheckTask ( ) ; runningTaskFuture = SCHEDULER . scheduleWithFixedDelay ( runningTask , period , period , periodTimeUnit ) ; // log
LOGGER . debug ( "Stop criterion checker for search {} activated" , search ) ; } } else { // issue a warning
LOGGER . warn ( "Attempted to activate already active stop criterion checker for search {}" , search ) ; } }
|
public class StringSearch { /** * TODO : We probably do not need Pattern CE table . */
private int initializePatternCETable ( ) { } }
|
int [ ] cetable = new int [ INITIAL_ARRAY_SIZE_ ] ; int cetablesize = cetable . length ; int patternlength = pattern_ . text_ . length ( ) ; CollationElementIterator coleiter = utilIter_ ; if ( coleiter == null ) { coleiter = new CollationElementIterator ( pattern_ . text_ , collator_ ) ; utilIter_ = coleiter ; } else { coleiter . setText ( pattern_ . text_ ) ; } int offset = 0 ; int result = 0 ; int ce ; while ( ( ce = coleiter . next ( ) ) != CollationElementIterator . NULLORDER ) { int newce = getCE ( ce ) ; if ( newce != CollationElementIterator . IGNORABLE ) { int [ ] temp = addToIntArray ( cetable , offset , cetablesize , newce , patternlength - coleiter . getOffset ( ) + 1 ) ; offset ++ ; cetable = temp ; } result += ( coleiter . getMaxExpansion ( ce ) - 1 ) ; } cetable [ offset ] = 0 ; pattern_ . CE_ = cetable ; pattern_ . CELength_ = offset ; return result ;
|
public class TagsBenchmarksUtil { /** * Adds ' numTags ' tags to ' tagsBuilder ' and returns the associated tag context . */
@ VisibleForTesting public static TagContext createTagContext ( TagContextBuilder tagsBuilder , int numTags ) { } }
|
for ( int i = 0 ; i < numTags ; i ++ ) { tagsBuilder . put ( TAG_KEYS . get ( i ) , TAG_VALUES . get ( i ) , UNLIMITED_PROPAGATION ) ; } return tagsBuilder . build ( ) ;
|
public class StatViewFeature { /** * 读取配置参数 .
* @ param key 配置参数名
* @ return 配置参数值 , 如果不存在当前配置参数 , 或者为配置参数长度为0 , 将返回null */
private static String readInitParam ( Configuration configuration , String key ) { } }
|
String value = null ; try { String param = ( String ) configuration . getProperty ( key ) ; if ( param != null ) { param = param . trim ( ) ; if ( param . length ( ) > 0 ) { value = param ; } } } catch ( Exception e ) { String msg = "initParameter config [" + key + "] error" ; logger . warn ( msg , e ) ; } return value ;
|
public class StartAndStopSQL { /** * Check if the database is in a specific condition by checking the result of a SQL statement loaded as a resource .
* @ param resource the resource containing the SQL statement that would return a number
* @ return true if the returned number is greater than 0 */
protected boolean isInConditionResource ( String resource ) { } }
|
Resource sqlResource = context . getResource ( resource ) ; InputStream in = null ; String sql = null ; try { in = sqlResource . getInputStream ( ) ; sql = IOUtils . toString ( in ) ; } catch ( IOException ioe ) { throw new RuntimeException ( "Failed to get condition SQL (" + ioe . getMessage ( ) + ") from: " + resource , ioe ) ; } finally { IOUtils . closeQuietly ( in ) ; } if ( StringUtils . isNotBlank ( sql ) ) { return isInCondition ( sql ) ; } else { return true ; }
|
public class EventDispatcher { protected int subscribe_data_ready_event ( String attr_name , String [ ] filters , boolean stateless ) throws DevFailed { } }
|
return event_supplier . subscribe_event ( attr_name , DATA_READY_EVENT , this , filters , stateless ) ;
|
public class JMapperCache { /** * Returns an instance of JMapper from cache if exists , in alternative a new instance .
* < br > Taking as input the path to the xml file or the content .
* @ param destination the Destination Class
* @ param source the Source Class
* @ param xml xml configuration as content or path format
* @ param < D > Destination class
* @ param < S > Source Class
* @ return the mapper instance */
public static < D , S > IJMapper < D , S > getMapper ( final Class < D > destination , final Class < S > source , final String xml ) { } }
|
return getMapper ( destination , source , null , xml ) ;
|
public class DocTreeScanner { /** * { @ inheritDoc } This implementation scans the children in left to right order .
* @ param node { @ inheritDoc }
* @ param p { @ inheritDoc }
* @ return the result of scanning */
@ Override public R visitUnknownBlockTag ( UnknownBlockTagTree node , P p ) { } }
|
return scan ( node . getContent ( ) , p ) ;
|
public class PropertiesStringField { /** * DoGetData Method . */
public Object doGetData ( ) { } }
|
String data = ( String ) super . doGetData ( ) ; FileListener listener = this . getRecord ( ) . getListener ( PropertiesStringFileListener . class ) ; if ( this . getComponent ( 0 ) == null ) // Don ' t convert if this is linked to a screen
if ( enableConversion ) if ( listener != null ) if ( listener . isEnabled ( ) ) data = Utility . replaceResources ( data , null , null , this . getRecord ( ) . getRecordOwner ( ) , true ) ; return data ;
|
public class VircurexMarketDataServiceRaw { /** * get _ lowest _ ask APIs : https : / / vircurex . com / welcome / api ? locale = en */
public VircurexLastTrade getVircurexTicker ( CurrencyPair currencyPair ) throws IOException { } }
|
VircurexLastTrade vircurexLastTrade = vircurexAuthenticated . getLastTrade ( currencyPair . base . getCurrencyCode ( ) . toLowerCase ( ) , currencyPair . counter . getCurrencyCode ( ) . toLowerCase ( ) ) ; return vircurexLastTrade ;
|
public class LittleEndianDataInputStream { /** * Reads a string of no more than 65,535 characters
* from the underlying input stream using UTF - 8
* encoding . This method first reads a two byte short
* in < b > big < / b > endian order as required by the
* UTF - 8 specification . This gives the number of bytes in
* the UTF - 8 encoded version of the string .
* Next this many bytes are read and decoded as UTF - 8
* encoded characters .
* @ return the decoded string
* @ throws UTFDataFormatException if the string cannot be decoded
* @ throws IOException if the underlying stream throws an IOException . */
public String readUTF ( ) throws IOException { } }
|
int byte1 = in . read ( ) ; int byte2 = in . read ( ) ; if ( byte2 < 0 ) { throw new EOFException ( ) ; } int numbytes = ( byte1 << 8 ) + byte2 ; char result [ ] = new char [ numbytes ] ; int numread = 0 ; int numchars = 0 ; while ( numread < numbytes ) { int c1 = readUnsignedByte ( ) ; int c2 , c3 ; // The first four bits of c1 determine how many bytes are in this char
int test = c1 >> 4 ; if ( test < 8 ) { // one byte
numread ++ ; result [ numchars ++ ] = ( char ) c1 ; } else if ( test == 12 || test == 13 ) { // two bytes
numread += 2 ; if ( numread > numbytes ) { throw new UTFDataFormatException ( ) ; } c2 = readUnsignedByte ( ) ; if ( ( c2 & 0xC0 ) != 0x80 ) { throw new UTFDataFormatException ( ) ; } result [ numchars ++ ] = ( char ) ( ( ( c1 & 0x1F ) << 6 ) | ( c2 & 0x3F ) ) ; } else if ( test == 14 ) { // three bytes
numread += 3 ; if ( numread > numbytes ) { throw new UTFDataFormatException ( ) ; } c2 = readUnsignedByte ( ) ; c3 = readUnsignedByte ( ) ; if ( ( ( c2 & 0xC0 ) != 0x80 ) || ( ( c3 & 0xC0 ) != 0x80 ) ) { throw new UTFDataFormatException ( ) ; } result [ numchars ++ ] = ( char ) ( ( ( c1 & 0x0F ) << 12 ) | ( ( c2 & 0x3F ) << 6 ) | ( c3 & 0x3F ) ) ; } else { // malformed
throw new UTFDataFormatException ( ) ; } } // end while
return new String ( result , 0 , numchars ) ;
|
public class WAB { /** * state should only transition while the terminated lock is held .
* @ param newState
* @ return */
private boolean setState ( State newState ) { } }
|
switch ( newState ) { case DEPLOYED : return changeState ( State . DEPLOYING , State . DEPLOYED ) ; case DEPLOYING : // can move from either UNDEPLOYED or FAILED into DEPLOYING state
return ( changeState ( State . UNDEPLOYED , State . DEPLOYING ) || changeState ( State . FAILED , State . DEPLOYING ) ) ; case UNDEPLOYING : return changeState ( State . DEPLOYED , State . UNDEPLOYING ) ; case UNDEPLOYED : return changeState ( State . UNDEPLOYING , State . UNDEPLOYED ) ; case FAILED : return changeState ( State . DEPLOYING , State . FAILED ) ; default : return false ; }
|
public class CmsUserEditDialog { /** * Sets up the validators . < p > */
protected void setupValidators ( ) { } }
|
if ( m_loginname . getValidators ( ) . size ( ) == 0 ) { m_loginname . addValidator ( new LoginNameValidator ( ) ) ; m_pw . getPassword1Field ( ) . addValidator ( new PasswordValidator ( ) ) ; m_site . addValidator ( new StartSiteValidator ( ) ) ; m_startview . addValidator ( new StartViewValidator ( ) ) ; m_startfolder . addValidator ( new StartPathValidator ( ) ) ; }
|
public class Projections { /** * Create an appending factory expression which serializes all the arguments but the uses
* the base value as the return value
* @ param base first argument
* @ param rest additional arguments
* @ param < T > type of projection
* @ return factory expression */
public static < T > AppendingFactoryExpression < T > appending ( Expression < T > base , Expression < ? > ... rest ) { } }
|
return new AppendingFactoryExpression < T > ( base , rest ) ;
|
public class LocalePreference { /** * A safe , cross - platform way of converting serialized locale string to { @ link Locale } instance . Matches
* { @ link # toString ( Locale ) } serialization implementation .
* @ param locale locale converted to string .
* @ return { @ link Locale } stored the deserialized data . */
public static Locale fromString ( final String locale ) { } }
|
final String [ ] data = Strings . split ( locale , '_' ) ; if ( data . length == 1 ) { return new Locale ( data [ 0 ] ) ; } else if ( data . length == 2 ) { return new Locale ( data [ 0 ] , data [ 1 ] ) ; } else if ( data . length == 3 ) { return new Locale ( data [ 0 ] , data [ 1 ] , data [ 2 ] ) ; } throw new IllegalArgumentException ( "Invalid locale string: " + locale ) ;
|
public class ProcessContext { /** * Checks if the given activity is executable , i . e . there is at least
* one subject which is authorized to execute it . < br >
* This method delegates the call to the access control model .
* @ param activity The activity in question .
* @ return < code > true < / code > if the given activity is executable ; < br >
* < code > false < / code > otherwise .
* @ throws ParameterException
* @ throws CompatibilityException */
public boolean isExecutable ( String activity ) throws CompatibilityException { } }
|
validateActivity ( activity ) ; return acModel != null && acModel . isExecutable ( activity ) ;
|
public class ByteToMessageDecoder { /** * Called when the input of the channel was closed which may be because it changed to inactive or because of
* { @ link ChannelInputShutdownEvent } . */
void channelInputClosed ( ChannelHandlerContext ctx , List < Object > out ) throws Exception { } }
|
if ( cumulation != null ) { callDecode ( ctx , cumulation , out ) ; decodeLast ( ctx , cumulation , out ) ; } else { decodeLast ( ctx , Unpooled . EMPTY_BUFFER , out ) ; }
|
public class BigtableVeneerSettingsFactory { /** * To build BigtableDataSettings # sampleRowKeysSettings with default Retry settings . */
private static void buildSampleRowKeysSettings ( Builder builder , BigtableOptions options ) { } }
|
RetrySettings retrySettings = buildIdempotentRetrySettings ( builder . sampleRowKeysSettings ( ) . getRetrySettings ( ) , options ) ; builder . sampleRowKeysSettings ( ) . setRetrySettings ( retrySettings ) . setRetryableCodes ( buildRetryCodes ( options . getRetryOptions ( ) ) ) ;
|
public class ProtocolDataUnit { /** * Calculates the needed size ( in bytes ) of serializing this object .
* @ return The needed size to store this object . */
private final int calcSize ( ) { } }
|
int size = BasicHeaderSegment . BHS_FIXED_SIZE ; size += basicHeaderSegment . getTotalAHSLength ( ) * AdditionalHeaderSegment . AHS_FACTOR ; // plus the sizes of the used digests
size += headerDigest . getSize ( ) ; size += dataDigest . getSize ( ) ; size += AbstractDataSegment . getTotalLength ( basicHeaderSegment . getDataSegmentLength ( ) ) ; return size ;
|
public class SimpleMisoSceneRuleSet { /** * documentation inherited from interface */
public void addRuleInstances ( String prefix , Digester dig ) { } }
|
// this creates the appropriate instance when we encounter our
// prefix tag
dig . addRule ( prefix , new Rule ( ) { @ Override public void begin ( String namespace , String name , Attributes attributes ) throws Exception { digester . push ( createMisoSceneModel ( ) ) ; } @ Override public void end ( String namespace , String name ) throws Exception { digester . pop ( ) ; } } ) ; // set up rules to parse and set our fields
dig . addRule ( prefix + "/width" , new SetFieldRule ( "width" ) ) ; dig . addRule ( prefix + "/height" , new SetFieldRule ( "height" ) ) ; dig . addRule ( prefix + "/viewwidth" , new SetFieldRule ( "vwidth" ) ) ; dig . addRule ( prefix + "/viewheight" , new SetFieldRule ( "vheight" ) ) ; dig . addRule ( prefix + "/base" , new SetFieldRule ( "baseTileIds" ) ) ; dig . addObjectCreate ( prefix + "/objects" , ArrayList . class . getName ( ) ) ; dig . addObjectCreate ( prefix + "/objects/object" , ObjectInfo . class . getName ( ) ) ; dig . addSetNext ( prefix + "/objects/object" , "add" , Object . class . getName ( ) ) ; dig . addRule ( prefix + "/objects/object" , new SetPropertyFieldsRule ( ) ) ; dig . addRule ( prefix + "/objects" , new CallMethodSpecialRule ( ) { @ Override public void parseAndSet ( String bodyText , Object target ) throws Exception { @ SuppressWarnings ( "unchecked" ) ArrayList < ObjectInfo > ilist = ( ArrayList < ObjectInfo > ) target ; ArrayList < ObjectInfo > ulist = Lists . newArrayList ( ) ; SimpleMisoSceneModel model = ( SimpleMisoSceneModel ) digester . peek ( 1 ) ; // filter interesting and uninteresting into two lists
for ( int ii = 0 ; ii < ilist . size ( ) ; ii ++ ) { ObjectInfo info = ilist . get ( ii ) ; if ( ! info . isInteresting ( ) ) { ilist . remove ( ii -- ) ; ulist . add ( info ) ; } } // now populate the model
SimpleMisoSceneModel . populateObjects ( model , ilist , ulist ) ; } } ) ;
|
public class CmsVfsIndexer { /** * Updates ( writes ) a single resource in the index . < p >
* @ param writer the index writer to use
* @ param threadManager the thread manager to use when extracting the document text
* @ param resource the resource to update
* @ throws CmsIndexException if something goes wrong */
protected void updateResource ( I_CmsIndexWriter writer , CmsIndexingThreadManager threadManager , CmsResource resource ) throws CmsIndexException { } }
|
if ( resource . isFolder ( ) || resource . isTemporaryFile ( ) ) { // don ' t ever index folders or temporary files
return ; } try { // create the index thread for the resource
threadManager . createIndexingThread ( this , writer , resource ) ; } catch ( Exception e ) { if ( m_report != null ) { m_report . println ( Messages . get ( ) . container ( Messages . RPT_SEARCH_INDEXING_FAILED_0 ) , I_CmsReport . FORMAT_WARNING ) ; } if ( LOG . isWarnEnabled ( ) ) { LOG . warn ( Messages . get ( ) . getBundle ( ) . key ( Messages . ERR_INDEX_RESOURCE_FAILED_2 , resource . getRootPath ( ) , m_index . getName ( ) ) , e ) ; } throw new CmsIndexException ( Messages . get ( ) . container ( Messages . ERR_INDEX_RESOURCE_FAILED_2 , resource . getRootPath ( ) , m_index . getName ( ) ) ) ; }
|
public class DeviceClass { /** * Export a device .
* Send device network parameter to TANGO database . The main parameter sent
* to database is the CORBA stringified device IOR .
* @ param dev The device to be exported
* @ throws DevFailed If the command sent to the database failed . Click < a
* href = " . . / . . / tango _ basic / idl _ html / Tango . html # DevFailed "
* > here < / a > to read < b > DevFailed < / b > exception specification */
protected void export_device ( final DeviceImpl dev ) throws DevFailed { } }
|
Util . out4 . println ( "DeviceClass::export_device() arrived" ) ; Device d ; // Activate the CORBA object incarnated by the Java object
final Util tg = Util . instance ( ) ; final ORB orb = tg . get_orb ( ) ; d = dev . _this ( orb ) ; // Get the object id and store it
byte [ ] oid = null ; final POA r_poa = tg . get_poa ( ) ; try { oid = r_poa . reference_to_id ( d ) ; } catch ( final Exception ex ) { final StringBuffer o = new StringBuffer ( "Can't get CORBA reference ID for device " ) ; o . append ( dev . get_name ( ) ) ; Except . throw_exception ( "API_CantGetDevObjectID" , o . toString ( ) , "DeviceClass.export_device()" ) ; } dev . set_obj_id ( oid ) ; // Before exporting , check if database is used
if ( Util . _UseDb == false ) { return ; // Prepare sent parameters
} final DbDevExportInfo exp_info = new DbDevExportInfo ( dev . get_name ( ) , orb . object_to_string ( d ) , tg . get_host_name ( ) , tg . get_version_str ( ) ) ; // Call db server
tg . get_database ( ) . export_device ( exp_info ) ; Util . out4 . println ( "Leaving DeviceClass::export_device method()" ) ; // Mark the device as exported
dev . set_exported_flag ( true ) ;
|
public class TextParams { /** * Set text parameters from properties
* @ param context Valid Android { @ link Context }
* @ param properties JSON text properties */
public void setFromJSON ( Context context , JSONObject properties ) { } }
|
String backgroundResStr = optString ( properties , Properties . background ) ; if ( backgroundResStr != null && ! backgroundResStr . isEmpty ( ) ) { final int backgroundResId = getId ( context , backgroundResStr , "drawable" ) ; setBackGround ( context . getResources ( ) . getDrawable ( backgroundResId , null ) ) ; } setBackgroundColor ( getJSONColor ( properties , Properties . background_color , getBackgroundColor ( ) ) ) ; setGravity ( optInt ( properties , TextContainer . Properties . gravity , getGravity ( ) ) ) ; setRefreshFrequency ( optEnum ( properties , Properties . refresh_freq , getRefreshFrequency ( ) ) ) ; setTextColor ( getJSONColor ( properties , Properties . text_color , getTextColor ( ) ) ) ; setText ( optString ( properties , Properties . text , ( String ) getText ( ) ) ) ; setTextSize ( optFloat ( properties , Properties . text_size , getTextSize ( ) ) ) ; final JSONObject typefaceJson = optJSONObject ( properties , Properties . typeface ) ; if ( typefaceJson != null ) { try { Typeface typeface = WidgetLib . getTypefaceManager ( ) . getTypeface ( typefaceJson ) ; setTypeface ( typeface ) ; } catch ( Throwable e ) { Log . e ( TAG , e , "Couldn't set typeface from properties: %s" , typefaceJson ) ; } }
|
public class FileSystemGroupStore { /** * Returns an EntityIdentifier [ ] of groups of the given leaf type whose names match the query
* string according to the search method .
* < p > Treats case sensitive and case insensitive searches the same .
* @ param query String the string used to match group names .
* @ param searchMethod see org . apereo . portal . groups . IGroupConstants .
* @ param leafType the leaf type of the groups we are searching for .
* @ return EntityIdentifier [ ] */
@ Override public EntityIdentifier [ ] searchForGroups ( String query , SearchMethod searchMethod , Class leafType ) throws GroupsException { } }
|
List ids = new ArrayList ( ) ; File baseDir = getFileRoot ( leafType ) ; if ( log . isDebugEnabled ( ) ) log . debug ( DEBUG_CLASS_NAME + "searchForGroups(): " + query + " method: " + searchMethod + " type: " + leafType ) ; if ( baseDir != null ) { String nameFilter = null ; switch ( searchMethod ) { case DISCRETE : case DISCRETE_CI : nameFilter = query ; break ; case STARTS_WITH : case STARTS_WITH_CI : nameFilter = query + ".*" ; break ; case ENDS_WITH : case ENDS_WITH_CI : nameFilter = ".*" + query ; break ; case CONTAINS : case CONTAINS_CI : nameFilter = ".*" + query + ".*" ; break ; default : throw new GroupsException ( DEBUG_CLASS_NAME + ".searchForGroups(): Unknown search method: " + searchMethod ) ; } final Pattern namePattern = Pattern . compile ( nameFilter ) ; final FilenameFilter filter = new FilenameFilter ( ) { @ Override public boolean accept ( File dir , String name ) { return namePattern . matcher ( name ) . matches ( ) ; } } ; Set allDirs = getAllDirectoriesBelow ( baseDir ) ; allDirs . add ( baseDir ) ; for ( Iterator itr = allDirs . iterator ( ) ; itr . hasNext ( ) ; ) { File [ ] files = ( ( File ) itr . next ( ) ) . listFiles ( filter ) ; for ( int filesIdx = 0 ; filesIdx < files . length ; filesIdx ++ ) { String key = getKeyFromFile ( files [ filesIdx ] ) ; EntityIdentifier ei = new EntityIdentifier ( key , ICompositeGroupService . GROUP_ENTITY_TYPE ) ; ids . add ( ei ) ; } } } if ( log . isDebugEnabled ( ) ) log . debug ( DEBUG_CLASS_NAME + ".searchForGroups(): found " + ids . size ( ) + " files." ) ; return ( EntityIdentifier [ ] ) ids . toArray ( new EntityIdentifier [ ids . size ( ) ] ) ;
|
public class GVRWebViewSceneObject { /** * Draws the { @ link WebView } onto { @ link # mSurfaceTexture } */
private void refresh ( ) { } }
|
try { Canvas canvas = mSurface . lockCanvas ( null ) ; mWebView . draw ( canvas ) ; mSurface . unlockCanvasAndPost ( canvas ) ; } catch ( Surface . OutOfResourcesException t ) { Log . e ( "GVRWebBoardObject" , "lockCanvas failed" ) ; } mSurfaceTexture . updateTexImage ( ) ;
|
public class DefaultCurieProvider { /** * ( non - Javadoc )
* @ see org . springframework . hateoas . hal . CurieProvider # getCurieInformation ( ) */
@ Override public Collection < ? extends Object > getCurieInformation ( Links links ) { } }
|
return curies . entrySet ( ) . stream ( ) . map ( it -> new Curie ( it . getKey ( ) , getCurieHref ( it . getKey ( ) , it . getValue ( ) ) ) ) . collect ( Collectors . collectingAndThen ( Collectors . toList ( ) , Collections :: unmodifiableCollection ) ) ;
|
public class Specification { /** * Specifies that no exception should be thrown , failing with a
* { @ link UnallowedExceptionThrownError } otherwise . */
public void noExceptionThrown ( ) { } }
|
Throwable thrown = getSpecificationContext ( ) . getThrownException ( ) ; if ( thrown == null ) return ; throw new UnallowedExceptionThrownError ( null , thrown ) ;
|
public class XmlJobDefExporter { /** * Exports several ( given ) job def to a XML file . */
static void export ( String xmlPath , List < JobDef > jobDefList , DbConn cnx ) throws JqmXmlException { } }
|
// Argument tests
if ( xmlPath == null ) { throw new IllegalArgumentException ( "file path cannot be null" ) ; } // Create XML into file
OutputStream os = null ; try { os = new FileOutputStream ( xmlPath ) ; export ( os , jobDefList , cnx ) ; } catch ( FileNotFoundException e ) { throw new JqmXmlException ( e ) ; } finally { try { os . close ( ) ; } catch ( IOException e ) { // Who cares .
} }
|
public class JavaProcessSession { /** * normally just increments , but for Integration , defers to the run object */
public void incrementCurrentSection ( ) { } }
|
if ( runner_controlled_sections ) { // assume the current run object is at least a JavaProcessRunner !
rollback_section = current_section ; current_section = getCurrentSection ( ) . incrementCurrentSection ( current_section ) ; } else { // as previously
rollback_section = current_section ; current_section ++ ; }
|
public class PropertyUtils { /** * Returns the value of an optional property , if the property is
* set . If it is not set defval is returned . */
public static String get ( Properties props , String name , String defval ) { } }
|
String value = props . getProperty ( name ) ; if ( value == null ) value = defval ; return value ;
|
public class BufferParallelAggregation { /** * Computes the bitwise union of the input bitmaps
* @ param bitmaps the input bitmaps
* @ return the union of the bitmaps */
public static MutableRoaringBitmap or ( ImmutableRoaringBitmap ... bitmaps ) { } }
|
SortedMap < Short , List < MappeableContainer > > grouped = groupByKey ( bitmaps ) ; short [ ] keys = new short [ grouped . size ( ) ] ; MappeableContainer [ ] values = new MappeableContainer [ grouped . size ( ) ] ; List < List < MappeableContainer > > slices = new ArrayList < > ( grouped . size ( ) ) ; int i = 0 ; for ( Map . Entry < Short , List < MappeableContainer > > slice : grouped . entrySet ( ) ) { keys [ i ++ ] = slice . getKey ( ) ; slices . add ( slice . getValue ( ) ) ; } IntStream . range ( 0 , i ) . parallel ( ) . forEach ( position -> values [ position ] = or ( slices . get ( position ) ) ) ; return new MutableRoaringBitmap ( new MutableRoaringArray ( keys , values , i ) ) ;
|
public class ElementNameQualifier { /** * Strip any namespace information off a node name
* @ param node
* @ return the localName if the node is namespaced , or the name otherwise */
protected String getNonNamespacedNodeName ( Node node ) { } }
|
String name = node . getLocalName ( ) ; if ( name == null ) { return node . getNodeName ( ) ; } return name ;
|
public class Accounts { /** * Generate Financial Reports for an owned Account
* @ param freelancerReference Freelancer ' s reference
* @ param params Parameters
* @ throwsJSONException If error occurred
* @ return { @ link JSONObject } */
public JSONObject getOwned ( String freelancerReference , HashMap < String , String > params ) throws JSONException { } }
|
return oClient . get ( "/finreports/v2/financial_account_owner/" + freelancerReference , params ) ;
|
public class JXMapViewer { /** * A property indicating the center position of the map
* @ param geoPosition the new property value */
public void setCenterPosition ( GeoPosition geoPosition ) { } }
|
GeoPosition oldVal = getCenterPosition ( ) ; setCenter ( getTileFactory ( ) . geoToPixel ( geoPosition , zoomLevel ) ) ; repaint ( ) ; GeoPosition newVal = getCenterPosition ( ) ; firePropertyChange ( "centerPosition" , oldVal , newVal ) ;
|
public class NodeUtil { /** * Returns true if this is a literal value . We define a literal value
* as any node that evaluates to the same thing regardless of when or
* where it is evaluated . So / xyz / and [ 3 , 5 ] are literals , but
* the name a is not .
* < p > Function literals do not meet this definition , because they
* lexically capture variables . For example , if you have
* < code >
* function ( ) { return a ; }
* < / code >
* If it is evaluated in a different scope , then it
* captures a different variable . Even if the function did not read
* any captured variables directly , it would still fail this definition ,
* because it affects the lifecycle of variables in the enclosing scope .
* < p > However , a function literal with respect to a particular scope is
* a literal .
* @ param includeFunctions If true , all function expressions will be
* treated as literals . */
public static boolean isLiteralValue ( Node n , boolean includeFunctions ) { } }
|
switch ( n . getToken ( ) ) { case CAST : return isLiteralValue ( n . getFirstChild ( ) , includeFunctions ) ; case ARRAYLIT : for ( Node child = n . getFirstChild ( ) ; child != null ; child = child . getNext ( ) ) { if ( ( ! child . isEmpty ( ) ) && ! isLiteralValue ( child , includeFunctions ) ) { return false ; } } return true ; case REGEXP : // Return true only if all descendants are const .
for ( Node child = n . getFirstChild ( ) ; child != null ; child = child . getNext ( ) ) { if ( ! isLiteralValue ( child , includeFunctions ) ) { return false ; } } return true ; case OBJECTLIT : for ( Node child = n . getFirstChild ( ) ; child != null ; child = child . getNext ( ) ) { switch ( child . getToken ( ) ) { case MEMBER_FUNCTION_DEF : case GETTER_DEF : case SETTER_DEF : // { methodName ( ) { . . . } }
// { get propertyName ( ) { . . . } }
// { set propertyName ( value ) { . . . } }
if ( ! includeFunctions ) { return false ; } break ; case COMPUTED_PROP : // { [ key _ expression ] : value , . . . }
// { [ key _ expression ] ( args ) { . . . } , . . . }
// { get [ key _ expression ] ( ) { . . . } , . . . }
// { set [ key _ expression ] ( args ) { . . . } , . . . }
if ( ! isLiteralValue ( child . getFirstChild ( ) , includeFunctions ) || ! isLiteralValue ( child . getLastChild ( ) , includeFunctions ) ) { return false ; } break ; case SPREAD : if ( ! isLiteralValue ( child . getOnlyChild ( ) , includeFunctions ) ) { return false ; } break ; case STRING_KEY : // { key : value , . . . }
// { " quoted _ key " : value , . . . }
if ( ! isLiteralValue ( child . getOnlyChild ( ) , includeFunctions ) ) { return false ; } break ; default : throw new IllegalArgumentException ( "Unexpected child of OBJECTLIT: " + child . toStringTree ( ) ) ; } } return true ; case FUNCTION : return includeFunctions && ! NodeUtil . isFunctionDeclaration ( n ) ; case TEMPLATELIT : for ( Node child = n . getFirstChild ( ) ; child != null ; child = child . getNext ( ) ) { if ( child . isTemplateLitSub ( ) ) { if ( ! isLiteralValue ( child . getFirstChild ( ) , includeFunctions ) ) { return false ; } } } return true ; default : return isImmutableValue ( n ) ; }
|
public class MiniTemplatorParser { /** * Completes the main block registration . */
private void endMainBlock ( ) { } }
|
BlockTabRec btr = blockTab [ 0 ] ; btr . tPosContentsEnd = templateText . length ( ) ; btr . tPosEnd = templateText . length ( ) ; btr . definitionIsOpen = false ; currentNestingLevel -- ;
|
public class CascadingPersonAttributeDao { /** * If this is the first call , or there are no results in the resultPeople Set and stopIfFirstDaoReturnsNull = false ,
* the seed map is used . If not the attributes of the first user in the resultPeople Set are used for each child
* dao . If stopIfFirstDaoReturnsNull = true and the first query returned no results in the resultPeopleSet ,
* return null .
* @ see AbstractAggregatingDefaultQueryPersonAttributeDao # getAttributesFromDao ( java . util . Map , boolean , IPersonAttributeDao , java . util . Set , IPersonAttributeDaoFilter ) */
@ Override protected Set < IPersonAttributes > getAttributesFromDao ( final Map < String , List < Object > > seed , final boolean isFirstQuery , final IPersonAttributeDao currentlyConsidering , final Set < IPersonAttributes > resultPeople , final IPersonAttributeDaoFilter filter ) { } }
|
if ( isFirstQuery || ( ! stopIfFirstDaoReturnsNull && ( resultPeople == null || resultPeople . size ( ) == 0 ) ) ) { return currentlyConsidering . getPeopleWithMultivaluedAttributes ( seed , filter ) ; } else if ( stopIfFirstDaoReturnsNull && ! isFirstQuery && ( resultPeople == null || resultPeople . size ( ) == 0 ) ) { return null ; } Set < IPersonAttributes > mergedPeopleResults = null ; for ( final IPersonAttributes person : resultPeople ) { final Map < String , List < Object > > queryAttributes = new LinkedHashMap < > ( ) ; // Add the userName into the query map
final String userName = person . getName ( ) ; if ( userName != null ) { final Map < String , List < Object > > userNameMap = this . toSeedMap ( userName ) ; queryAttributes . putAll ( userNameMap ) ; } // Add the rest of the attributes into the query map
final Map < String , List < Object > > personAttributes = person . getAttributes ( ) ; queryAttributes . putAll ( personAttributes ) ; final Set < IPersonAttributes > newResults = currentlyConsidering . getPeopleWithMultivaluedAttributes ( queryAttributes , filter ) ; if ( newResults != null ) { if ( mergedPeopleResults == null ) { // If this is the first valid result set just use it .
mergedPeopleResults = new LinkedHashSet < > ( newResults ) ; } else { // Merge the Sets of IPersons
mergedPeopleResults = this . attrMerger . mergeResults ( mergedPeopleResults , newResults ) ; } } } return mergedPeopleResults ;
|
public class PathHelper { /** * Simply removes all relative parts of a path ( meaning " . . " and " . " )
* @ param path
* @ return path without relative parts */
public static String removeRelativeParts ( final String path ) { } }
|
String partialPath = "" ; for ( String part : PathHelper . getParts ( path ) ) { // ignore " . . " and " . " in paths
if ( ".." . equals ( part ) || "." . equals ( part ) ) { continue ; } partialPath += PathHelper . PATH_SEP + part ; } return partialPath ;
|
public class CmsWorkplaceManager { /** * Sets the Workplace default locale . < p >
* @ param locale the locale to set */
public void setDefaultLocale ( String locale ) { } }
|
try { m_defaultLocale = CmsLocaleManager . getLocale ( locale ) ; } catch ( Exception e ) { if ( CmsLog . INIT . isWarnEnabled ( ) ) { CmsLog . INIT . warn ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_NONCRIT_ERROR_0 ) , e ) ; } } if ( CmsLog . INIT . isInfoEnabled ( ) ) { CmsLog . INIT . info ( Messages . get ( ) . getBundle ( ) . key ( Messages . INIT_DEFAULT_LOCALE_1 , m_defaultLocale ) ) ; }
|
public class Metrics { /** * Register a gauge that reports the size of the { @ link java . util . Collection } . The registration
* will keep a weak reference to the collection so it will not prevent garbage collection .
* The collection implementation used should be thread safe . Note that calling
* { @ link java . util . Collection # size ( ) } can be expensive for some collection implementations
* and should be considered before registering .
* @ param name Name of the gauge being registered .
* @ param tags Sequence of dimensions for breaking down the name .
* @ param collection Thread - safe implementation of { @ link Collection } used to access the value .
* @ param < T > The type of the state object from which the gauge value is extracted .
* @ return The number that was passed in so the registration can be done as part of an assignment
* statement . */
@ Nullable public static < T extends Collection < ? > > T gaugeCollectionSize ( String name , Iterable < Tag > tags , T collection ) { } }
|
return globalRegistry . gaugeCollectionSize ( name , tags , collection ) ;
|
public class JstormMaster { /** * Setup the request that will be sent to the RM for the container ask .
* @ return the setup ResourceRequest to be sent to RM */
public ContainerRequest setupContainerAskForRM ( int containerMemory , int containerVirtualCores , int priority , String [ ] racks , String [ ] hosts ) { } }
|
Priority pri = Priority . newInstance ( priority ) ; Resource capability = Resource . newInstance ( containerMemory , containerVirtualCores ) ; ContainerRequest request = new ContainerRequest ( capability , hosts , racks , pri , false ) ; LOG . info ( "By Thrift Server Requested container ask: " + request . toString ( ) ) ; return request ;
|
public class DependsFileParser { /** * Converts a SortedMap received from a { @ code getVersionMap } call to hold DependencyInfo values ,
* and keys on the form { @ code groupId / artifactId } .
* @ param versionMap A non - null Map , as received from a call to { @ code getVersionMap } .
* @ return a SortedMap received from a { @ code getVersionMap } call to hold DependencyInfo values ,
* and keys on the form { @ code groupId / artifactId } . */
public static SortedMap < String , DependencyInfo > createDependencyInfoMap ( final SortedMap < String , String > versionMap ) { } }
|
// Check sanity
Validate . notNull ( versionMap , "anURL" ) ; final SortedMap < String , DependencyInfo > toReturn = new TreeMap < String , DependencyInfo > ( ) ; // First , only find the version lines .
for ( Map . Entry < String , String > current : versionMap . entrySet ( ) ) { final String currentKey = current . getKey ( ) . trim ( ) ; if ( currentKey . contains ( VERSION_LINE_INDICATOR ) ) { final StringTokenizer tok = new StringTokenizer ( currentKey , GROUP_ARTIFACT_SEPARATOR , false ) ; Validate . isTrue ( tok . countTokens ( ) == 3 , "Expected key on the form [groupId]" + GROUP_ARTIFACT_SEPARATOR + "[artifactId]" + VERSION_LINE_INDICATOR + ", but got [" + currentKey + "]" ) ; final String groupId = tok . nextToken ( ) ; final String artifactId = tok . nextToken ( ) ; final DependencyInfo di = new DependencyInfo ( groupId , artifactId , current . getValue ( ) ) ; toReturn . put ( di . getGroupArtifactKey ( ) , di ) ; } } for ( Map . Entry < String , DependencyInfo > current : toReturn . entrySet ( ) ) { final String currentKey = current . getKey ( ) ; final DependencyInfo di = current . getValue ( ) ; final String scope = versionMap . get ( currentKey + SCOPE_LINE_INDICATOR ) ; final String type = versionMap . get ( currentKey + TYPE_LINE_INDICATOR ) ; if ( scope != null ) { di . setScope ( scope ) ; } if ( type != null ) { di . setType ( type ) ; } } // All done .
return toReturn ;
|
public class Query { /** * Allows filtering values in a ArrayNode as per passed ComparisonExpression
* @ param expression
* @ return */
public ArrayNode filter ( ComparisonExpression expression ) { } }
|
ArrayNode result = new ObjectMapper ( ) . createArrayNode ( ) ; if ( node . isArray ( ) ) { Iterator < JsonNode > iterator = node . iterator ( ) ; int validObjectsCount = 0 ; int topCount = 0 ; while ( iterator . hasNext ( ) ) { JsonNode curNode = iterator . next ( ) ; if ( expression == null || ( expression != null && new Query ( curNode ) . is ( expression ) ) ) { validObjectsCount ++ ; if ( this . skip != null && this . skip . intValue ( ) > 0 && this . skip . intValue ( ) >= validObjectsCount ) { continue ; } if ( this . top != null && topCount >= this . top . intValue ( ) ) { break ; } result . add ( curNode ) ; topCount ++ ; } } } else { throw new UnsupportedExprException ( "Filters are only supported on ArrayNode objects" ) ; } return result ;
|
public class StashReader { /** * Get the splits for a record stored in stash . Each split corresponds to a file in the Stash table ' s directory . */
public List < StashSplit > getSplits ( String table ) throws StashNotAvailableException , TableNotStashedException { } }
|
ImmutableList . Builder < StashSplit > splitsBuilder = ImmutableList . builder ( ) ; Iterator < S3ObjectSummary > objectSummaries = getS3ObjectSummariesForTable ( table ) ; while ( objectSummaries . hasNext ( ) ) { S3ObjectSummary objectSummary = objectSummaries . next ( ) ; String key = objectSummary . getKey ( ) ; // Strip the common root path prefix from the split since it is constant .
splitsBuilder . add ( new StashSplit ( table , key . substring ( _rootPath . length ( ) + 1 ) , objectSummary . getSize ( ) ) ) ; } return splitsBuilder . build ( ) ;
|
public class VariableUtilImpl { /** * used by generated bytecode */
public static Object recordcount ( PageContext pc , Object obj ) throws PageException { } }
|
if ( obj instanceof Query ) return Caster . toDouble ( ( ( Query ) obj ) . getRecordcount ( ) ) ; return pc . getCollection ( obj , KeyConstants . _RECORDCOUNT ) ;
|
public class Template { /** * Writes to the supplied Writer .
* Note : Does NOT close the writer . */
public void writeTo ( Writer writer ) throws IOException { } }
|
JsonSerializer . write ( Json . jObject ( "template" , asJson ( ) ) , writer ) ; writer . flush ( ) ;
|
public class Bpmn2JsonUnmarshaller { /** * Revisit message to set their item ref to a item definition
* @ param def Definitions */
private void revisitMessages ( Definitions def ) { } }
|
List < RootElement > rootElements = def . getRootElements ( ) ; List < ItemDefinition > toAddDefinitions = new ArrayList < ItemDefinition > ( ) ; for ( RootElement root : rootElements ) { if ( root instanceof Message ) { if ( ! existsMessageItemDefinition ( rootElements , root . getId ( ) ) ) { ItemDefinition itemdef = Bpmn2Factory . eINSTANCE . createItemDefinition ( ) ; itemdef . setId ( root . getId ( ) + "Type" ) ; toAddDefinitions . add ( itemdef ) ; ( ( Message ) root ) . setItemRef ( itemdef ) ; } } } for ( ItemDefinition id : toAddDefinitions ) { def . getRootElements ( ) . add ( id ) ; }
|
public class PlainTextChainingRenderer { /** * { @ inheritDoc }
* @ since 2.0RC1 */
@ Override public void beginDefinitionList ( Map < String , String > parameters ) { } }
|
if ( getBlockState ( ) . getDefinitionListDepth ( ) == 1 && ! getBlockState ( ) . isInList ( ) ) { printEmptyLine ( ) ; } else { getPrinter ( ) . print ( NL ) ; }
|
public class Error { /** * Thrown when there is an error in mapper generated class .
* @ param destination destination class
* @ param source source class
* @ param path xml path configuration
* @ param e exception captured */
public static void illegalCode ( Class < ? > destination , Class < ? > source , String path , Throwable e ) { } }
|
String additionalInformation = e . getMessage ( ) . split ( "," ) [ 1 ] ; throw new IllegalCodeException ( MSG . INSTANCE . message ( illegalCodePath , destination . getSimpleName ( ) , source . getSimpleName ( ) , path , additionalInformation ) ) ;
|
public class EntityCapsManager { /** * Returns the local entity ' s NodeVer ( e . g .
* " http : / / www . igniterealtime . org / projects / smack / # 66/0NaeaBKkwk85efJTGmU47vXI =
* @ return the local NodeVer */
public String getLocalNodeVer ( ) { } }
|
CapsVersionAndHash capsVersionAndHash = getCapsVersionAndHash ( ) ; if ( capsVersionAndHash == null ) { return null ; } return entityNode + '#' + capsVersionAndHash . version ;
|
public class ApiOvhDedicatednasha { /** * Get this object properties
* REST : GET / dedicated / nasha / { serviceName } / partition / { partitionName } / options
* @ param serviceName [ required ] The internal name of your storage
* @ param partitionName [ required ] the given name of partition */
public OvhOptions serviceName_partition_partitionName_options_GET ( String serviceName , String partitionName ) throws IOException { } }
|
String qPath = "/dedicated/nasha/{serviceName}/partition/{partitionName}/options" ; StringBuilder sb = path ( qPath , serviceName , partitionName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhOptions . class ) ;
|
public class CheckMethodAdapter { /** * Checks a stack frame value .
* @ param value
* the value to be checked . */
void checkFrameValue ( final Object value ) { } }
|
if ( value == Opcodes . TOP || value == Opcodes . INTEGER || value == Opcodes . FLOAT || value == Opcodes . LONG || value == Opcodes . DOUBLE || value == Opcodes . NULL || value == Opcodes . UNINITIALIZED_THIS ) { return ; } if ( value instanceof String ) { checkInternalName ( ( String ) value , "Invalid stack frame value" ) ; return ; } if ( ! ( value instanceof Label ) ) { throw new IllegalArgumentException ( "Invalid stack frame value: " + value ) ; } else { usedLabels . add ( ( Label ) value ) ; }
|
public class JdbiMappers { /** * Returns an array of Strings or null if the input is null . Null is intentional ( not empty list ) , to be
* able to distinguish between null value and empty list in the db . */
public static List < String > getStringList ( final ResultSet rs , final String columnName ) throws SQLException { } }
|
final Array ary = rs . getArray ( columnName ) ; if ( ary != null ) { Preconditions . checkArgument ( ary . getBaseType ( ) == Types . VARCHAR || ary . getBaseType ( ) == Types . CHAR ) ; return Arrays . asList ( ( String [ ] ) ary . getArray ( ) ) ; } return null ;
|
public class GenericUrl { /** * Adds query parameters from the provided entrySet into the buffer . */
static void addQueryParams ( Set < Entry < String , Object > > entrySet , StringBuilder buf ) { } }
|
// ( similar to UrlEncodedContent )
boolean first = true ; for ( Map . Entry < String , Object > nameValueEntry : entrySet ) { Object value = nameValueEntry . getValue ( ) ; if ( value != null ) { String name = CharEscapers . escapeUriQuery ( nameValueEntry . getKey ( ) ) ; if ( value instanceof Collection < ? > ) { Collection < ? > collectionValue = ( Collection < ? > ) value ; for ( Object repeatedValue : collectionValue ) { first = appendParam ( first , buf , name , repeatedValue ) ; } } else { first = appendParam ( first , buf , name , value ) ; } } }
|
public class NativeCursors { /** * Convert a cursor in 32 - bit BYTE _ ARGB _ PRE format to a 16 - bit or 32 - bit
* color - keyed format
* @ param source the cursor pixels
* @ param dest a target ShortBuffer or IntBuffer
* @ param targetDepth the depth of the target format ( 16 or 32)
* @ param transparentPixel the color key used for transparent pixels */
static void colorKeyCursor ( byte [ ] source , Buffer dest , int targetDepth , int transparentPixel ) { } }
|
switch ( targetDepth ) { case 32 : colorKeyCursor32 ( source , ( IntBuffer ) dest , transparentPixel ) ; break ; case 16 : colorKeyCursor16 ( source , ( ShortBuffer ) dest , transparentPixel ) ; break ; default : throw new UnsupportedOperationException ( ) ; }
|
public class sms_server { /** * Use this API to fetch filtered set of sms _ server resources .
* filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */
public static sms_server [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } }
|
sms_server obj = new sms_server ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; sms_server [ ] response = ( sms_server [ ] ) obj . getfiltered ( service , option ) ; return response ;
|
public class Bits { /** * Exclude [ start . . . end ] from this set . */
public void excludeFrom ( int start ) { } }
|
Assert . check ( currentState != BitsState . UNKNOWN ) ; Bits temp = new Bits ( ) ; temp . sizeTo ( bits . length ) ; temp . inclRange ( 0 , start ) ; internalAndSet ( temp ) ; currentState = BitsState . NORMAL ;
|
public class SchemaManager { /** * Returns the specified session context table .
* Returns null if the table does not exist in the context . */
public Table findSessionTable ( Session session , String name , String schemaName ) { } }
|
return session . findSessionTable ( name ) ;
|
public class AbstractRepository { /** * Default implementation checks if Repository implements Capability
* interface , and if so , returns the Repository . */
@ SuppressWarnings ( "unchecked" ) public < C extends Capability > C getCapability ( Class < C > capabilityType ) { } }
|
if ( capabilityType . isInstance ( this ) ) { return ( C ) this ; } return null ;
|
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcMeasureWithUnit ( ) { } }
|
if ( ifcMeasureWithUnitEClass == null ) { ifcMeasureWithUnitEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 375 ) ; } return ifcMeasureWithUnitEClass ;
|
public class Command { /** * Get the command output and if the command hasn ' t completed
* yet , wait until it does .
* @ return The command output . */
@ Override public T get ( ) { } }
|
try { latch . await ( ) ; return output . get ( ) ; } catch ( InterruptedException e ) { throw new RedisCommandInterruptedException ( e ) ; }
|
public class CobWeb { /** * public void updateClusterer ( Instance newInstance ) throws Exception { */
@ Override public void trainOnInstanceImpl ( Instance newInstance ) { } }
|
// throws Exception {
m_numberOfClustersDetermined = false ; if ( m_cobwebTree == null ) { m_cobwebTree = new CNode ( newInstance . numAttributes ( ) , newInstance ) ; } else { m_cobwebTree . addInstance ( newInstance ) ; }
|
public class NLS { /** * Not sure why this is here . Looks like it is a replacement for
* Integer . getInteger . */
public int getInteger ( String key ) throws MissingResourceException { } }
|
String result = getString ( key ) ; try { return Integer . parseInt ( result ) ; } catch ( NumberFormatException nfe ) { if ( tc . isEventEnabled ( ) ) { Tr . event ( tc , "Unable to parse " + result + " as Integer." ) ; } // DGH20040823 : Begin fix for defect 218797 - Source provided by Tom Musta
// String msg = messages . getString ( " NLS . integerParseError " ,
// " Unable to parse as integer . " ) ;
String msg = getMessages ( ) . getString ( "NLS.integerParseError" , "Unable to parse as integer." ) ; // DGH20040823 : End fix for defect 218797 - Source provided by Tom Musta
throw new MissingResourceException ( msg , bundleName , key ) ; }
|
public class KeyAgreement { /** * Choose the Spi from the first provider available . Used if
* delayed provider selection is not possible because init ( )
* is not the first method called . */
void chooseFirstProvider ( ) { } }
|
if ( spi != null ) { return ; } synchronized ( lock ) { if ( spi != null ) { return ; } /* Android - removed : this debugging mechanism is not used in Android .
if ( debug ! = null ) {
int w = - - warnCount ;
if ( w > = 0 ) {
debug . println ( " KeyAgreement . init ( ) not first method "
+ " called , disabling delayed provider selection " ) ;
if ( w = = 0 ) {
debug . println ( " Further warnings of this type will "
+ " be suppressed " ) ;
new Exception ( " Call trace " ) . printStackTrace ( ) ; */
Exception lastException = null ; for ( Service s : GetInstance . getServices ( "KeyAgreement" , algorithm ) ) { if ( JceSecurity . canUseProvider ( s . getProvider ( ) ) == false ) { continue ; } try { Object obj = s . newInstance ( null ) ; if ( obj instanceof KeyAgreementSpi == false ) { continue ; } spi = ( KeyAgreementSpi ) obj ; provider = s . getProvider ( ) ; // not needed any more
return ; } catch ( Exception e ) { lastException = e ; } } ProviderException e = new ProviderException ( "Could not construct KeyAgreementSpi instance" ) ; if ( lastException != null ) { e . initCause ( lastException ) ; } throw e ; }
|
public class Operation { /** * < pre >
* Service - specific metadata associated with the operation . It typically
* contains progress information and common metadata such as create time .
* Some services might not provide such metadata . Any method that returns a
* long - running operation should document the metadata type , if any .
* < / pre >
* < code > . google . protobuf . Any metadata = 2 ; < / code > */
public com . google . protobuf . Any getMetadata ( ) { } }
|
return metadata_ == null ? com . google . protobuf . Any . getDefaultInstance ( ) : metadata_ ;
|
public class SparseBitmap { /** * Reverseflatand .
* @ param bitmap
* the bitmap
* @ return the skippable iterator */
public static SkippableIterator reverseflatand ( SkippableIterator ... bitmap ) { } }
|
if ( bitmap . length == 0 ) throw new RuntimeException ( "nothing to process" ) ; SkippableIterator answer = bitmap [ bitmap . length - 1 ] ; for ( int k = bitmap . length - 1 ; k > 0 ; -- k ) { answer = and2by2 ( answer , bitmap [ k ] ) ; } return answer ;
|
public class AngleCalc { /** * Change the representation of an orientation , so the difference to the given baseOrientation
* will be smaller or equal to PI ( 180 degree ) . This is achieved by adding or subtracting a
* 2 * PI , so the direction of the orientation will not be changed */
public double alignOrientation ( double baseOrientation , double orientation ) { } }
|
double resultOrientation ; if ( baseOrientation >= 0 ) { if ( orientation < - Math . PI + baseOrientation ) resultOrientation = orientation + 2 * Math . PI ; else resultOrientation = orientation ; } else if ( orientation > + Math . PI + baseOrientation ) resultOrientation = orientation - 2 * Math . PI ; else resultOrientation = orientation ; return resultOrientation ;
|
public class GanttChartView12 { /** * { @ inheritDoc } */
@ Override protected void processDefaultBarStyles ( Props props ) { } }
|
GanttBarStyleFactory f = new GanttBarStyleFactoryCommon ( ) ; m_barStyles = f . processDefaultStyles ( props ) ;
|
public class AbstractAppender { /** * Sends a configuration message . */
protected void sendConfigureRequest ( Connection connection , MemberState member , ConfigureRequest request ) { } }
|
logger . trace ( "{} - Sending {} to {}" , context . getCluster ( ) . member ( ) . address ( ) , request , member . getMember ( ) . serverAddress ( ) ) ; connection . < ConfigureRequest , ConfigureResponse > sendAndReceive ( request ) . whenComplete ( ( response , error ) -> { context . checkThread ( ) ; // Complete the configure to the member .
member . completeConfigure ( ) ; if ( open ) { if ( error == null ) { logger . trace ( "{} - Received {} from {}" , context . getCluster ( ) . member ( ) . address ( ) , response , member . getMember ( ) . serverAddress ( ) ) ; handleConfigureResponse ( member , request , response ) ; } else { logger . warn ( "{} - Failed to configure {}" , context . getCluster ( ) . member ( ) . address ( ) , member . getMember ( ) . serverAddress ( ) ) ; handleConfigureResponseFailure ( member , request , error ) ; } } } ) ;
|
public class ChartJs { /** * Method injecting native chart . js code into the browser < br / >
* In case code already been injected do nothing */
public static void ensureInjected ( ) { } }
|
// TODO : do real injection ( lazy loading )
if ( injected ) return ; Resources res = GWT . create ( Resources . class ) ; String source = res . chartJsSource ( ) . getText ( ) ; ScriptElement scriptElement = Document . get ( ) . createScriptElement ( ) ; scriptElement . setId ( "_chartjs" ) ; scriptElement . setInnerText ( source ) ; Document . get ( ) . getBody ( ) . appendChild ( scriptElement ) ; injected = true ;
|
public class Client { /** * Gets a client instance on the roboremote port
* @ return */
public static Client getInstance ( ) { } }
|
if ( instance == null ) { instance = new Client ( ) ; } instance . API_PORT = PortSingleton . getInstance ( ) . getPort ( ) ; return instance ;
|
public class SchemaModifier { /** * Create the tables over the connection .
* @ param connection to use
* @ param mode creation mode .
* @ param createIndexes true to also create indexes , false otherwise */
public void createTables ( Connection connection , TableCreationMode mode , boolean createIndexes ) { } }
|
ArrayList < Type < ? > > sorted = sortTypes ( ) ; try ( Statement statement = connection . createStatement ( ) ) { if ( mode == TableCreationMode . DROP_CREATE ) { ArrayList < Type < ? > > reversed = sortTypes ( ) ; Collections . reverse ( reversed ) ; executeDropStatements ( statement , reversed ) ; } for ( Type < ? > type : sorted ) { String sql = tableCreateStatement ( type , mode ) ; statementListeners . beforeExecuteUpdate ( statement , sql , null ) ; statement . execute ( sql ) ; statementListeners . afterExecuteUpdate ( statement , 0 ) ; } if ( createIndexes ) { for ( Type < ? > type : sorted ) { createIndexes ( connection , mode , type ) ; } } } catch ( SQLException e ) { throw new TableModificationException ( e ) ; }
|
public class RhinoScriptEngine { /** * The sync function creates a synchronized function ( in the sense
* of a Java synchronized method ) from an existing function . The
* new function synchronizes on the < code > this < / code > object of
* its invocation .
* js > var o = { f : sync ( function ( x ) {
* print ( " entry " ) ;
* Packages . java . lang . Thread . sleep ( x * 1000 ) ;
* print ( " exit " ) ;
* js > thread ( function ( ) { o . f ( 5 ) ; } ) ;
* entry
* js > thread ( function ( ) { o . f ( 5 ) ; } ) ;
* js >
* exit
* entry
* exit */
public static Object sync ( Context cx , Scriptable thisObj , Object [ ] args , Function funObj ) { } }
|
if ( args . length == 1 && args [ 0 ] instanceof Function ) { return new Synchronizer ( ( Function ) args [ 0 ] ) ; } else { throw Context . reportRuntimeError ( "wrong argument(s) for sync" ) ; }
|
public class AbstractItemLink { /** * ( non - Javadoc )
* @ see com . ibm . ws . sib . msgstore . cache . xalist . Task # postAbort ( com . ibm . ws . sib . msgstore . Transaction ) */
public final void postAbortAdd ( final PersistentTransaction transaction ) throws SevereMessageStoreException { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "postAbortAdd" , transaction ) ; releaseItem ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "postAbortAdd" ) ;
|
public class CryptoConfidentialKey { /** * Returns a { @ link javax . crypto . Cipher } object for encrypting with this key . */
@ Override public Cipher encrypt ( ) { } }
|
try { Cipher cipher = Cipher . getInstance ( ALGORITHM ) ; cipher . init ( Cipher . ENCRYPT_MODE , getKey ( ) ) ; return cipher ; } catch ( GeneralSecurityException e ) { throw new AssertionError ( e ) ; }
|
public class ProjectFilterSettings { /** * Create a string containing the encoded form of the ProjectFilterSettings .
* @ return an encoded string */
public String toEncodedString ( ) { } }
|
// Priority threshold
StringBuilder buf = new StringBuilder ( ) ; buf . append ( getMinPriority ( ) ) ; // Encode enabled bug categories . Note that these aren ' t really used for
// much .
// They only come in to play when parsed by a version of FindBugs older
// than 1.1.
buf . append ( FIELD_DELIMITER ) ; for ( Iterator < String > i = activeBugCategorySet . iterator ( ) ; i . hasNext ( ) ; ) { buf . append ( i . next ( ) ) ; if ( i . hasNext ( ) ) { buf . append ( LISTITEM_DELIMITER ) ; } } // Whether to display false warnings
buf . append ( FIELD_DELIMITER ) ; buf . append ( displayFalseWarnings ? "true" : "false" ) ; buf . append ( FIELD_DELIMITER ) ; buf . append ( getMinRank ( ) ) ; return buf . toString ( ) ;
|
public class ResourceGroovyMethods { /** * Read the content of this URL and returns it as a byte [ ] .
* The default connection parameters can be modified by adding keys to the
* < i > parameters map < / i > :
* < ul >
* < li > connectTimeout : the connection timeout < / li >
* < li > readTimeout : the read timeout < / li >
* < li > useCaches : set the use cache property for the URL connection < / li >
* < li > allowUserInteraction : set the user interaction flag for the URL connection < / li >
* < li > requestProperties : a map of properties to be passed to the URL connection < / li >
* < / ul >
* @ param url URL to read content from
* @ param parameters connection parameters
* @ return the byte [ ] from that URL
* @ throws IOException if an IOException occurs .
* @ since 2.4.4 */
public static byte [ ] getBytes ( URL url , Map parameters ) throws IOException { } }
|
return IOGroovyMethods . getBytes ( configuredInputStream ( parameters , url ) ) ;
|
public class AsynchronousRequest { /** * For more info on achievements groups API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / achievements / groups " > here < / a > < br / >
* Give user the access to { @ link Callback # onResponse ( Call , Response ) } and { @ link Callback # onFailure ( Call , Throwable ) } methods for custom interactions
* @ param callback callback that is going to be used for { @ link Call # enqueue ( Callback ) }
* @ throws NullPointerException if given { @ link Callback } is empty
* @ see AchievementGroup achievement group info */
public void getAllAchievementGroupID ( Callback < List < String > > callback ) throws NullPointerException { } }
|
gw2API . getAllAchievementGroupIDs ( ) . enqueue ( callback ) ;
|
public class ApiOvhIp { /** * List services available as a destination
* REST : GET / ip / { ip } / move
* @ param ip [ required ]
* API beta */
public OvhDestinations ip_move_GET ( String ip ) throws IOException { } }
|
String qPath = "/ip/{ip}/move" ; StringBuilder sb = path ( qPath , ip ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhDestinations . class ) ;
|
public class HttpStream { /** * Opens a new HTTP stream for reading , i . e . a GET request .
* @ param path the URL for the stream
* @ return the opened stream */
static HttpStreamWrapper openRead ( HttpPath path ) throws IOException { } }
|
HttpStream stream = createStream ( path ) ; stream . _isPost = false ; HttpStreamWrapper wrapper = new HttpStreamWrapper ( stream ) ; String status = ( String ) wrapper . getAttribute ( "status" ) ; // ioc / 23p0
if ( "404" . equals ( status ) ) { throw new FileNotFoundException ( L . l ( "'{0}' returns a HTTP 404." , path . getURL ( ) ) ) ; } return wrapper ;
|
public class UpdatableResultSet { /** * { inheritDoc } . */
public void updateBinaryStream ( int columnIndex , InputStream inputStream ) throws SQLException { } }
|
updateBinaryStream ( columnIndex , inputStream , Long . MAX_VALUE ) ;
|
public class FilterMandates { /** * Gets map of fields and values .
* @ return Collection of field name - field value pairs . */
@ Override public Map < String , String > getValues ( ) { } }
|
HashMap < String , String > result = new HashMap < > ( ) ; if ( status != null && status != MandateStatus . NotSpecified ) { result . put ( "status" , status . name ( ) ) ; } if ( beforeDate != null ) result . put ( "beforeDate" , Long . toString ( beforeDate ) ) ; if ( afterDate != null ) result . put ( "afterDate" , Long . toString ( afterDate ) ) ; return result ;
|
public class SparseMatrix { /** * long型索引转换为int [ ] 索引
* @ param idx
* @ return 索引 */
public int [ ] getIndices ( long idx ) { } }
|
int xIndices = ( int ) idx % dim1 ; int yIndices = ( int ) ( idx - xIndices ) / dim1 ; int [ ] Indices = { xIndices , yIndices } ; return Indices ;
|
public class SqlServerParser { /** * 处理PlainSelect类型的selectBody
* @ param plainSelect */
protected void processPlainSelect ( PlainSelect plainSelect , int level ) { } }
|
if ( level > 1 ) { if ( isNotEmptyList ( plainSelect . getOrderByElements ( ) ) ) { if ( plainSelect . getTop ( ) == null ) { plainSelect . setTop ( TOP100_PERCENT ) ; } } } if ( plainSelect . getFromItem ( ) != null ) { processFromItem ( plainSelect . getFromItem ( ) , level + 1 ) ; } if ( plainSelect . getJoins ( ) != null && plainSelect . getJoins ( ) . size ( ) > 0 ) { List < Join > joins = plainSelect . getJoins ( ) ; for ( Join join : joins ) { if ( join . getRightItem ( ) != null ) { processFromItem ( join . getRightItem ( ) , level + 1 ) ; } } }
|
public class Gen { /** * Generate code to call all finalizers of structures aborted by
* a non - local
* exit . Return target environment of the non - local exit .
* @ param target The tree representing the structure that ' s aborted
* @ param env The environment current at the non - local exit . */
Env < GenContext > unwind ( JCTree target , Env < GenContext > env ) { } }
|
Env < GenContext > env1 = env ; while ( true ) { genFinalizer ( env1 ) ; if ( env1 . tree == target ) break ; env1 = env1 . next ; } return env1 ;
|
public class DocumentRootImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public NotificationChain basicSetNegativeExponentialDistribution ( NegativeExponentialDistributionType newNegativeExponentialDistribution , NotificationChain msgs ) { } }
|
return ( ( FeatureMap . Internal ) getMixed ( ) ) . basicAdd ( BpsimPackage . Literals . DOCUMENT_ROOT__NEGATIVE_EXPONENTIAL_DISTRIBUTION , newNegativeExponentialDistribution , msgs ) ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.