signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Container { /** * Initializes { @ code Container } instance . * Sets up built - in { @ link Singleton } , { @ link Application } , { @ link Thread } , * { @ link Session } , { @ link Request } and { @ link Prototype } contexts and makes * { @ code Container } instance available in application . This ...
Class < ? extends Context > context = Singleton . class . getAnnotation ( Scope . class ) . value ( ) ; install ( context ) ; contexts . put ( Singleton . class , ( Descriptor < ? extends Context > ) components . get ( context ) . get ( 0 ) ) ; SingletonContext singleton = new SingletonContext ( ) ; singleton . put ( (...
public class Jersey2Module { /** * When HK2 management for jersey extensions is enabled by default , then guice bridge must be enabled . * Without it guice beans could not be used in resources and other jersey extensions . If this is * expected then guice support is not needed at all . */ private void checkHkFirstM...
final boolean guiceyFirstMode = context . option ( JerseyExtensionsManagedByGuice ) ; if ( ! guiceyFirstMode ) { Preconditions . checkState ( context . option ( UseHkBridge ) , "HK2 management for jersey extensions is enabled by default " + "(InstallersOptions.JerseyExtensionsManagedByGuice), but HK2-guice bridge is no...
public class FlowNode { /** * Gets all surrounding { @ link FlowNode nodes } that < b > DO < / b > flow into this node . * @ return the nodes that flow into this node . */ public List < FlowNode > getEnteringNodes ( ) { } }
if ( enteringNodes == null ) { enteringNodes = new ArrayList < FlowNode > ( ) ; Direction [ ] orderedDirs = Direction . getOrderedDirs ( ) ; for ( Direction direction : orderedDirs ) { switch ( direction ) { case E : if ( eFlow == Direction . E . getEnteringFlow ( ) ) { int newCol = col + direction . col ; int newRow =...
public class BitfinexApiCallbackListeners { /** * registers listener for subscribe events * @ param listener of event * @ return hook of this listener */ public Closeable onSubscribeChannelEvent ( final Consumer < BitfinexStreamSymbol > listener ) { } }
subscribeChannelConsumers . offer ( listener ) ; return ( ) -> subscribeChannelConsumers . remove ( listener ) ;
public class AuditEncryptionImpl { /** * The < code > getInstance < / code > method returns initializes the AuditEncryption implementation * @ param String representing the non - fully qualified keystore name * @ param String representing the path to the keystore * @ param String representing the keystore type ...
try { if ( ae == null ) ae = new AuditEncryptionImpl ( keyStoreName , keyStorePath , keyStoreType , keyStoreProvider , keyStorePassword , keyAlias ) ; return ae ; } catch ( AuditEncryptionException e ) { throw new AuditEncryptionException ( e ) ; }
public class RulesConfigurationTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RulesConfigurationType rulesConfigurationType , ProtocolMarshaller protocolMarshaller ) { } }
if ( rulesConfigurationType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( rulesConfigurationType . getRules ( ) , RULES_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . ge...
public class VisualizeBinaryData { /** * Draws contours . Internal and external contours are different user specified colors . * @ param contours List of contours * @ param colorExternal RGB color * @ param colorInternal RGB color * @ param width Image width * @ param height Image height * @ param out ( Opt...
if ( out == null ) { out = new BufferedImage ( width , height , BufferedImage . TYPE_INT_RGB ) ; } else { Graphics2D g2 = out . createGraphics ( ) ; g2 . setColor ( Color . BLACK ) ; g2 . fillRect ( 0 , 0 , width , height ) ; } for ( Contour c : contours ) { for ( Point2D_I32 p : c . external ) { out . setRGB ( p . x ,...
public class MessageRouterConfigurator { /** * Compare the incoming list of message IDs to be associated with the given handler , * adding and removing as needed to match the new config . * @ param msgIds * @ param handlerId */ public void updateMessageListForHandler ( String msgIds , String handlerId ) { } }
if ( msgIds == null ) { return ; // Should never happen , but avoid NPEs } String [ ] msgStr = msgIds . split ( "," ) ; ArrayList < String > newMsgList = new ArrayList < String > ( Arrays . asList ( msgStr ) ) ; newMsgList . remove ( "" ) ; // Ignore blank value // Get the list of existing handlers mapped to this messa...
public class SQLMultiScopeRecoveryLog { /** * Called when logs fail . Provides more comprehensive FFDC - PI45254. * this is NOT synchronized to avoid deadlocks . */ @ Override public void provideServiceability ( ) { } }
Exception e = new Exception ( ) ; try { FFDCFilter . processException ( e , "com.ibm.ws.recoverylog.custom.jdbc.impl.SQLMultiScopeRecoveryLog.provideServiceability" , "3624" , this ) ; HashMap < Long , RecoverableUnit > rus = _recoverableUnits ; if ( rus != null ) FFDCFilter . processException ( e , "com.ibm.ws.recover...
public class LeastRecentlyUsedCache { /** * Fetches an object from the cache . Synchronization at cache level is kept to minimum . The provider is called upon cache miss . * @ param key the identity of the object * @ param functor a functor to provide the object upon cache miss * @ param argument the sole argumen...
return locate ( key ) . get ( functor , argument ) ;
public class JDBC4CallableStatement { /** * Retrieves the value of a JDBC DATE parameter as a java . sql . Date object , using the given Calendar object to construct the date . */ @ Override public Date getDate ( String parameterName , Calendar cal ) throws SQLException { } }
checkClosed ( ) ; throw SQLError . noSupport ( ) ;
public class MediaHttpDownloader { /** * Sets the content range of the next download request . Eg : bytes = firstBytePos - lastBytePos . * < p > If a download was aborted mid - way due to a connection failure then users can resume the * download from the point where it left off . * < p > Use { @ link # setBytesDo...
Preconditions . checkArgument ( lastBytePos >= firstBytePos ) ; setBytesDownloaded ( firstBytePos ) ; this . lastBytePos = lastBytePos ; return this ;
public class QueryLexer { /** * $ ANTLR start " FLOAT " */ public final void mFLOAT ( ) throws RecognitionException { } }
try { int _type = FLOAT ; int _channel = DEFAULT_TOKEN_CHANNEL ; // src / riemann / Query . g : 92:5 : ( ( ' - ' ) ? ( ' 0 ' . . ' 9 ' ) + ( ' . ' ( ' 0 ' . . ' 9 ' ) * ) ? ( EXPONENT ) ? ) // src / riemann / Query . g : 92:9 : ( ' - ' ) ? ( ' 0 ' . . ' 9 ' ) + ( ' . ' ( ' 0 ' . . ' 9 ' ) * ) ? ( EXPONENT ) ? { // src ...
public class StringTools { /** * Case - aware version of startsWith ( ) */ public static int indexOf ( String text , String needle , int fromIndex , boolean ignoreCase ) { } }
if ( ignoreCase ) return indexOfIgnoreCase ( text , needle , fromIndex ) ; else return text . indexOf ( needle , fromIndex ) ;
public class StitchingFromMotion2D { /** * Sets the current image to be the origin of the stitched coordinate system . The background is filled * with a value of 0. * Must be called after { @ link # process ( boofcv . struct . image . ImageBase ) } . */ public void setOriginToCurrent ( ) { } }
IT currToWorld = ( IT ) worldToCurr . invert ( null ) ; IT oldWorldToNewWorld = ( IT ) worldToInit . concat ( currToWorld , null ) ; PixelTransform < Point2D_F32 > newToOld = converter . convertPixel ( oldWorldToNewWorld , null ) ; // fill in the background color GImageMiscOps . fill ( workImage , 0 ) ; // render the t...
public class Wagging { /** * Sets the weak learner used for classification . If it also supports * regressions that will be set as well . * @ param weakL the weak learner to use */ public void setWeakLearner ( Classifier weakL ) { } }
if ( weakL == null ) throw new NullPointerException ( ) ; this . weakL = weakL ; if ( weakL instanceof Regressor ) this . weakR = ( Regressor ) weakL ;
public class DoubleClickCrypto { /** * Encodes data , from binary form to string . * The default implementation performs websafe - base64 encoding ( RFC 3548 ) . */ @ Nullable protected String encode ( @ Nullable byte [ ] data ) { } }
return data == null ? null : Base64 . getUrlEncoder ( ) . encodeToString ( data ) ;
public class Parser { /** * a FunctionCallExpression . Token passed in must be an identifier . */ private FunctionCallExpression parseFunctionCallExpression ( Token token ) throws IOException { } }
Token next = peek ( ) ; if ( next . getID ( ) != Token . LPAREN ) { return null ; } SourceInfo info = token . getSourceInfo ( ) ; Name target = new Name ( info , token . getStringValue ( ) ) ; // parse remainder of call expression return parseCallExpression ( FunctionCallExpression . class , null , target , info ) ;
public class ExternalServiceAlertConditionService { /** * Creates the given external service alert condition . * @ param policyId The id of the policy to add the alert condition to * @ param condition The alert condition to create * @ return The alert condition that was created */ public Optional < ExternalServic...
return HTTP . POST ( String . format ( "/v2/alerts_external_service_conditions/policies/%d.json" , policyId ) , condition , EXTERNAL_SERVICE_ALERT_CONDITION ) ;
public class Materialize { /** * a helper method to enable the keyboardUtil for a specific activity * or disable it . note this will cause some frame drops because of the * listener . * @ param activity * @ param enable */ public void keyboardSupportEnabled ( Activity activity , boolean enable ) { } }
if ( getContent ( ) != null && getContent ( ) . getChildCount ( ) > 0 ) { if ( mKeyboardUtil == null ) { mKeyboardUtil = new KeyboardUtil ( activity , getContent ( ) . getChildAt ( 0 ) ) ; mKeyboardUtil . disable ( ) ; } if ( enable ) { mKeyboardUtil . enable ( ) ; } else { mKeyboardUtil . disable ( ) ; } }
public class RedisCounterFactory { /** * { @ inheritDoc } */ @ Override protected ICounter createCounter ( String name ) { } }
RedisCounter counter = new RedisCounter ( name , ttlSeconds ) ; counter . setCounterFactory ( this ) . init ( ) ; return counter ;
public class DRConsumerDrIdTracker { /** * Truncate the tracker to the given safe point . After truncation , the new * safe point will be the first DrId of the tracker . If the new safe point * is before the first DrId of the tracker , it ' s a no - op . * @ param newTruncationPoint New safe point */ public void ...
if ( newTruncationPoint < getFirstDrId ( ) ) { return ; } final Iterator < Range < Long > > iter = m_map . asRanges ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { final Range < Long > next = iter . next ( ) ; if ( end ( next ) < newTruncationPoint ) { iter . remove ( ) ; } else if ( next . contains ( newTruncation...
public class Matrix4f { /** * Set this matrix to a rotation transformation about the Z axis . * When used with a right - handed coordinate system , the produced rotation will rotate a vector * counter - clockwise around the rotation axis , when viewing along the negative axis direction towards the origin . * When...
float sin , cos ; sin = ( float ) Math . sin ( ang ) ; cos = ( float ) Math . cosFromSin ( sin , ang ) ; if ( ( properties & PROPERTY_IDENTITY ) == 0 ) MemUtil . INSTANCE . identity ( this ) ; this . _m00 ( cos ) ; this . _m01 ( sin ) ; this . _m10 ( - sin ) ; this . _m11 ( cos ) ; _properties ( PROPERTY_AFFINE | PROPE...
public class HttpURL { /** * Gets the last URL path segment without the query string . * If there are segment to return , * an empty string will be returned instead . * @ return the last URL path segment */ public String getLastPathSegment ( ) { } }
if ( StringUtils . isBlank ( path ) ) { return StringUtils . EMPTY ; } String segment = path ; segment = StringUtils . substringAfterLast ( segment , "/" ) ; return segment ;
public class BitsUtil { /** * NOTAND o onto v in - place , i . e . v & amp ; = ~ o * @ param v Primary object * @ param o data to and * @ return v */ public static long [ ] nandI ( long [ ] v , long [ ] o ) { } }
int i = 0 ; for ( ; i < o . length ; i ++ ) { v [ i ] &= ~ o [ i ] ; } return v ;
public class AbstractQueryHandler { /** * This default implementation calls the individual { @ link # deleteNode ( String ) } * and { @ link # addNode ( NodeData ) } methods * for each entry in the iterators . First the nodes to remove are processed * then the nodes to add . * @ param remove uuids of nodes to r...
while ( remove . hasNext ( ) ) { deleteNode ( remove . next ( ) ) ; } while ( add . hasNext ( ) ) { addNode ( add . next ( ) ) ; }
public class SQLiteExecutor { /** * Insert multiple records into data store . * @ param table * @ param records * @ param withTransaction * @ return */ @ Deprecated < T > long [ ] insert ( String table , T [ ] records , boolean withTransaction ) { } }
if ( N . isNullOrEmpty ( records ) ) { return N . EMPTY_LONG_ARRAY ; } final long [ ] ret = new long [ records . length ] ; table = formatName ( table ) ; if ( withTransaction ) { beginTransaction ( ) ; } try { for ( int i = 0 , len = records . length ; i < len ; i ++ ) { ret [ i ] = insert ( table , records [ i ] ) ; ...
public class InternalJSONUtil { /** * 默认情况下是否忽略null值的策略选择 < br > * JavaBean默认忽略null值 , 其它对象不忽略 * @ param obj 需要检查的对象 * @ return 是否忽略null值 * @ since 4.3.1 */ protected static boolean defaultIgnoreNullValue ( Object obj ) { } }
if ( obj instanceof CharSequence || obj instanceof JSONTokener || obj instanceof Map ) { return false ; } return true ;
public class PagedBitMap { /** * Bitwise < br / > * < code > this = this | that < / code > */ public void add ( PagedBitMap that ) { } }
LongArray ta = that . array ; long n = 0 ; while ( true ) { n = ta . seekNext ( n ) ; if ( n < 0 ) { break ; } long v = array . get ( n ) | ta . get ( n ) ; array . set ( n , v ) ; ++ n ; }
public class NoiseInstance { /** * Compute turbulence using Perlin noise . * @ param x the x value * @ param y the y value * @ param octaves number of octaves of turbulence * @ return turbulence value at ( x , y ) */ public float turbulence3 ( float x , float y , float z , float octaves ) { } }
float t = 0.0f ; for ( float f = 1.0f ; f <= octaves ; f *= 2 ) t += Math . abs ( noise3 ( f * x , f * y , f * z ) ) / f ; return t ;
public class Period { /** * Returns a new period plus the specified number of weeks added . * This period instance is immutable and unaffected by this method call . * @ param weeks the amount of weeks to add , may be negative * @ return the new period plus the increased weeks * @ throws UnsupportedOperationExce...
if ( weeks == 0 ) { return this ; } int [ ] values = getValues ( ) ; // cloned getPeriodType ( ) . addIndexedField ( this , PeriodType . WEEK_INDEX , values , weeks ) ; return new Period ( values , getPeriodType ( ) ) ;
public class FamilyVisitor { /** * Visit a Family . This is the primary focus of the visitation . From * here , interesting information is gathered from the attributes . * @ see GedObjectVisitor # visit ( Family ) */ @ Override public void visit ( final Family family ) { } }
for ( final GedObject gob : family . getAttributes ( ) ) { gob . accept ( this ) ; }
public class SessionDataManager { /** * Returns true if the item with < code > identifier < / code > is a new item , meaning that it exists * only in transient storage on the Session and has not yet been saved . Within a transaction , * isNew on an Item may return false ( because the item has been saved ) even if t...
ItemState lastState = changesLog . getItemState ( identifier ) ; if ( lastState == null || lastState . isDeleted ( ) ) { return false ; } return changesLog . getItemState ( identifier , ItemState . ADDED ) != null ;
public class Sc68Format { /** * Get the library , or void format if not found . * @ return The audio format . */ public static AudioFormat getFailsafe ( ) { } }
try { return new Sc68Format ( ) ; } catch ( final LionEngineException exception ) { Verbose . exception ( exception , ERROR_LOAD_LIBRARY ) ; return new AudioVoidFormat ( FORMATS ) ; }
public class GPARCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setMFR ( Integer newMFR ) { } }
Integer oldMFR = mfr ; mfr = newMFR ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . GPARC__MFR , oldMFR , mfr ) ) ;
public class ScoredValue { /** * Returns a { @ link ScoredValue } consisting of the results of applying the given function to the score of this element . * Mapping is performed only if a { @ link # hasValue ( ) value is present } . * @ param mapper a stateless function to apply to each element * @ return the new ...
LettuceAssert . notNull ( mapper , "Mapper function must not be null" ) ; if ( hasValue ( ) ) { return new ScoredValue < V > ( mapper . apply ( score ) . doubleValue ( ) , getValue ( ) ) ; } return this ;
public class CachedRemoteTable { /** * Move or get this record and cache multiple records if possible . * @ param iRowOrRelative For get the row to retrieve , for move the relative row to retrieve . * @ param iRowCount The number of rows to retrieve ( Used only by EjbCachedTable ) . * @ param iAbsoluteRow The abs...
m_bhtGet = bGet ; m_objCurrentPhysicalRecord = NONE ; m_objCurrentCacheRecord = NONE ; m_iCurrentLogicalPosition = iAbsoluteRow ; if ( ( m_iPhysicalLastRecordPlusOne != - 1 ) && ( m_iCurrentLogicalPosition >= m_iPhysicalLastRecordPlusOne ) ) return FieldTable . EOF_RECORD ; try { Object objData = null ; if ( ( m_mapCac...
public class WsByteBufferUtils { /** * Expand an existing wsbb [ ] to include a new wsbb [ ] * @ param oldList * @ param newBuffers * @ return WsByteBuffer [ ] */ public static WsByteBuffer [ ] expandBufferArray ( WsByteBuffer [ ] oldList , WsByteBuffer [ ] newBuffers ) { } }
if ( null == oldList && null == newBuffers ) { // if both are null then just exit return null ; } int oldLen = ( null != oldList ? oldList . length : 0 ) ; int newLen = ( null != newBuffers ? newBuffers . length : 0 ) ; WsByteBuffer [ ] bb = new WsByteBuffer [ oldLen + newLen ] ; if ( 0 < oldLen ) { System . arraycopy ...
public class TokenService { /** * GET / tokens * < p > Returns the list of the tokens generated before . */ @ Get ( "/tokens" ) public CompletableFuture < Collection < Token > > listTokens ( User loginUser ) { } }
if ( loginUser . isAdmin ( ) ) { return mds . getTokens ( ) . thenApply ( tokens -> tokens . appIds ( ) . values ( ) ) ; } else { return mds . getTokens ( ) . thenApply ( Tokens :: withoutSecret ) . thenApply ( tokens -> tokens . appIds ( ) . values ( ) ) ; }
public class RythmConfiguration { /** * Return { @ link RythmConfigurationKey # ENGINE _ LOAD _ PRECOMPILED _ ENABLED } * without lookup * @ return true if load precompiled */ public boolean loadPrecompiled ( ) { } }
if ( null == _loadPrecompiled ) { Boolean b = get ( ENGINE_LOAD_PRECOMPILED_ENABLED ) ; _loadPrecompiled = b || gae ( ) ; } return _loadPrecompiled ;
public class TaskManagerService { /** * Attempt to start the given task by creating claim and see if we win it . */ private void attemptToExecuteTask ( ApplicationDefinition appDef , Task task , TaskRecord taskRecord ) { } }
Tenant tenant = Tenant . getTenant ( appDef ) ; String taskID = taskRecord . getTaskID ( ) ; String claimID = "_claim/" + taskID ; long claimStamp = System . currentTimeMillis ( ) ; writeTaskClaim ( tenant , claimID , claimStamp ) ; if ( taskClaimedByUs ( tenant , claimID ) ) { startTask ( appDef , task , taskRecord ) ...
public class ApiOvhIpLoadbalancing { /** * Get this object properties * REST : GET / ipLoadbalancing / { serviceName } / tcp / frontend / { frontendId } * @ param serviceName [ required ] The internal name of your IP load balancing * @ param frontendId [ required ] Id of your frontend */ public OvhFrontendTcp ser...
String qPath = "/ipLoadbalancing/{serviceName}/tcp/frontend/{frontendId}" ; StringBuilder sb = path ( qPath , serviceName , frontendId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhFrontendTcp . class ) ;
public class ReservoirItemsUnion { /** * Union the given Memory image of the sketch . * < p > This method can be repeatedly called . If the given sketch is null it is interpreted as an * empty sketch . < / p > * @ param mem Memory image of sketch to be merged * @ param serDe An instance of ArrayOfItemsSerDe */ ...
if ( mem == null ) { return ; } ReservoirItemsSketch < T > ris = ReservoirItemsSketch . heapify ( mem , serDe ) ; ris = ( ris . getK ( ) <= maxK_ ? ris : ris . downsampledCopy ( maxK_ ) ) ; if ( gadget_ == null ) { createNewGadget ( ris , true ) ; } else { twoWayMergeInternal ( ris , true ) ; }
public class VdmEvaluationContextManager { /** * Removes an evaluation context for the given page , and determines if any valid execution context remain . * @ param page */ private void removeContext ( IWorkbenchPage page ) { } }
// pageToContextMap . remove ( page ) ; // if ( pageToContextMap . isEmpty ( ) ) // System . setProperty ( DEBUGGER _ ACTIVE , " false " ) ; / / $ NON - NLS - 1 $ // / / System . setProperty ( INSTANCE _ OF _ IJAVA _ STACK _ FRAME , " false " ) ; // / / / / $ NON - NLS - 1 $ // / / System . setProperty ( SUPPORTS _ FOR...
public class InputLine { /** * Read line from terminal . * @ param initial The initial ( default ) value . * @ return The resulting line . */ public String readLine ( String initial ) { } }
this . before = initial == null ? "" : initial ; this . after = "" ; this . printedError = null ; if ( initial != null && initial . length ( ) > 0 && ! lineValidator . validate ( initial , e -> { } ) ) { throw new IllegalArgumentException ( "Invalid initial value: " + initial ) ; } terminal . formatln ( "%s: %s" , mess...
public class DefaultNodeManager { /** * Checks if a module is installed . */ private void doInstalled ( final Message < JsonObject > message ) { } }
String moduleName = message . body ( ) . getString ( "module" ) ; if ( moduleName == null ) { message . reply ( new JsonObject ( ) . putString ( "status" , "error" ) . putString ( "message" , "No module specified." ) ) ; return ; } platform . getModuleInfo ( moduleName , new Handler < AsyncResult < ModuleInfo > > ( ) {...
public class Install { /** * Reads all XML update files and parses them . * @ see # initialised * @ throws InstallationException on error */ protected void initialise ( ) throws InstallationException { } }
if ( ! this . initialised ) { this . initialised = true ; this . cache . clear ( ) ; AppDependency . initialise ( ) ; for ( final FileType fileType : FileType . values ( ) ) { if ( fileType == FileType . XML ) { for ( final InstallFile file : this . files ) { if ( file . getType ( ) == fileType ) { final SaxHandler han...
public class ClusterStreamManagerImpl { /** * TODO : we could have this method return a Stream etc . so it doesn ' t have to iterate upon keys multiple times ( helps rehash and tx ) */ private Set < K > determineExcludedKeys ( IntFunction < Set < K > > keysToExclude , IntSet segmentsToUse ) { } }
if ( keysToExclude == null ) { return Collections . emptySet ( ) ; } // Special map only supports get operations return segmentsToUse . intStream ( ) . mapToObj ( s -> { Set < K > keysForSegment = keysToExclude . apply ( s ) ; if ( keysForSegment != null ) { return keysForSegment . stream ( ) ; } return null ; } ) . fl...
public class AbstractCreator { /** * Build a { @ link JDeserializerType } that instantiate a { @ link JsonSerializer } for the given type . If the type is a bean , * the implementation of { @ link AbstractBeanJsonSerializer } will be created . * @ param type type * @ param subtype true if the deserializer is for ...
JDeserializerType . Builder builder = new JDeserializerType . Builder ( ) . type ( type ) ; if ( null != type . isWildcard ( ) ) { // For wildcard type , we use the base type to find the deserializer . type = type . isWildcard ( ) . getBaseType ( ) ; } if ( null != type . isRawType ( ) ) { // For raw type , we use the ...
public class IntCounter { /** * Returns the set of keys whose counts are at or above the given threshold . * This set may have 0 elements but will not be null . */ public Set < E > keysAbove ( int countThreshold ) { } }
Set < E > keys = new HashSet < E > ( ) ; for ( E key : map . keySet ( ) ) { if ( getIntCount ( key ) >= countThreshold ) { keys . add ( key ) ; } } return keys ;
public class CPTaxCategoryServiceBaseImpl { /** * Sets the cp option remote service . * @ param cpOptionService the cp option remote service */ public void setCPOptionService ( com . liferay . commerce . product . service . CPOptionService cpOptionService ) { } }
this . cpOptionService = cpOptionService ;
public class KeyVaultClientBaseImpl { /** * Updates the specified attributes associated with the given certificate . * The UpdateCertificate operation applies the specified update on the given certificate ; the only elements updated are the certificate ' s attributes . This operation requires the certificates / updat...
return ServiceFuture . fromResponse ( updateCertificateWithServiceResponseAsync ( vaultBaseUrl , certificateName , certificateVersion ) , serviceCallback ) ;
public class MtasDataDoubleAdvanced { /** * ( non - Javadoc ) * @ see * mtas . codec . util . DataCollector . MtasDataCollector # minimumForComputingSegment ( */ @ Override protected Double lastForComputingSegment ( ) throws IOException { } }
if ( segmentRegistration . equals ( SEGMENT_SORT_ASC ) || segmentRegistration . equals ( SEGMENT_BOUNDARY_ASC ) ) { return Collections . max ( segmentValueTopList ) ; } else if ( segmentRegistration . equals ( SEGMENT_SORT_DESC ) || segmentRegistration . equals ( SEGMENT_BOUNDARY_DESC ) ) { return Collections . min ( s...
public class WAttribute { void set_write_value ( Any any ) throws DevFailed { } }
switch ( data_type ) { case Tango_DEV_STATE : // Check data type inside the any DevState [ ] st = null ; try { st = DevVarStateArrayHelper . extract ( any ) ; } catch ( BAD_OPERATION ex ) { Except . throw_exception ( "API_IncompatibleAttrDataType" , "Incompatible attribute type, expected type is : Tango_DevBoolean" , "...
public class BaseLogger { /** * Creates a new instance of the { @ link BaseLogger Logger } . * @ param loggerClass the type of the logger * @ param projectCode the unique code for a complete project . * @ param name the name of the slf4j logger to use . * @ param componentId the unique id of the component . */ ...
try { T logger = loggerClass . newInstance ( ) ; logger . projectCode = projectCode ; logger . componentId = componentId ; logger . delegateLogger = LoggerFactory . getLogger ( name ) ; return logger ; } catch ( InstantiationException e ) { throw new RuntimeException ( "Unable to instantiate logger '" + loggerClass . g...
public class DefaultEquationSupport { /** * { @ inheritDoc } */ @ Override public void clear ( ) { } }
final Enumeration < Variable > varIter = getVariables ( ) . elements ( ) ; while ( varIter . hasMoreElements ( ) ) { final Variable var = varIter . nextElement ( ) ; if ( var . systemGenerated ) continue ; removeVariable ( var . name ) ; }
public class KdTreeSearchNStandard { /** * Recursive step for finding the closest point */ private void stepClosest ( KdTree . Node node , FastQueue < KdTreeResult > neighbors ) { } }
if ( node == null ) return ; checkBestDistance ( node , neighbors ) ; if ( node . isLeaf ( ) ) { return ; } // select the most promising branch to investigate first KdTree . Node nearer , further ; double splitValue = distance . valueAt ( ( P ) node . point , node . split ) ; double targetAtSplit = distance . valueAt (...
public class NormOps_DDRM { /** * This implementation of the Frobenius norm is a straight forward implementation and can * be susceptible for overflow / underflow issues . A more resilient implementation is * { @ link # normF } . * @ param a The matrix whose norm is computed . Not modified . */ public static doub...
double total = 0 ; int size = a . getNumElements ( ) ; for ( int i = 0 ; i < size ; i ++ ) { double val = a . get ( i ) ; total += val * val ; } return Math . sqrt ( total ) ;
public class JobListFromJobScheduleOptions { /** * Set the time the request was issued . Client libraries typically set this to the current system clock time ; set it explicitly if you are calling the REST API directly . * @ param ocpDate the ocpDate value to set * @ return the JobListFromJobScheduleOptions object ...
if ( ocpDate == null ) { this . ocpDate = null ; } else { this . ocpDate = new DateTimeRfc1123 ( ocpDate ) ; } return this ;
public class Application { /** * This option is for advanced users only . This is meta information about third - party applications that third - party * vendors use for testing purposes . * @ param additionalInfo * This option is for advanced users only . This is meta information about third - party applications ...
setAdditionalInfo ( additionalInfo ) ; return this ;
public class HttpRequestFactory { /** * Builds a { @ code PUT } request for the given URL and content . * @ param url HTTP request URL or { @ code null } for none * @ param content HTTP request content or { @ code null } for none * @ return new HTTP request */ public HttpRequest buildPutRequest ( GenericUrl url ,...
return buildRequest ( HttpMethods . PUT , url , content ) ;
public class PolymerPassStaticUtils { /** * Gets the JSTypeExpression for a given property using its " type " key . * @ see https : / / github . com / Polymer / polymer / blob / 0.8 - preview / PRIMER . md # configuring - properties */ static JSTypeExpression getTypeFromProperty ( MemberDefinition property , Abstract...
if ( property . info != null && property . info . hasType ( ) ) { return property . info . getType ( ) ; } String typeString ; if ( property . value . isObjectLit ( ) ) { Node typeValue = NodeUtil . getFirstPropMatchingKey ( property . value , "type" ) ; if ( typeValue == null || ! typeValue . isName ( ) ) { compiler ....
public class GenericOAuth20ProfileDefinition { /** * Add an attribute as a primary one and its converter . * @ param name name of the attribute * @ param converter converter */ public void profileAttribute ( final String name , final AttributeConverter < ? extends Object > converter ) { } }
profileAttribute ( name , name , converter ) ;
public class CompletionKey { /** * Cleanup resources held by CompletionKey */ protected void destroy ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "CompletionKey::destroy entered for:" + this ) ; } // Free existing ByteBuffer objects . if ( this . rawData != null ) { if ( this . wsByteBuf != null ) { this . wsByteBuf . release ( ) ; this . wsByteBuf = null ; } this . ra...
public class CouchDBClientFactory { /** * ( non - Javadoc ) * @ see * com . impetus . kundera . loader . GenericClientFactory # initialize ( java . util . Map ) */ @ Override public void initialize ( Map < String , Object > externalProperty ) { } }
reader = new CouchDBEntityReader ( kunderaMetadata ) ; initializePropertyReader ( ) ; setExternalProperties ( externalProperty ) ;
public class DataSet { /** * Writes a DataSet to the standard output stream ( stdout ) . * < p > For each element of the DataSet the result of { @ link Object # toString ( ) } is written . * @ param sinkIdentifier The string to prefix the output with . * @ return The DataSink that writes the DataSet . * @ depre...
return output ( new PrintingOutputFormat < T > ( sinkIdentifier , false ) ) ;
public class SessionApi { /** * Get configuration settings * Get all configuration items needed by the user interface . This includes action codes , business attributes , transactions , and settings . * @ param types A comma delimited list of types used to specify what content should be returned . If not specified ...
com . squareup . okhttp . Call call = getConfigurationValidateBeforeCall ( types , null , null ) ; Type localVarReturnType = new TypeToken < ConfigResponse > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ;
public class ChildWorkflowExecutionFailedEventAttributesMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ChildWorkflowExecutionFailedEventAttributes childWorkflowExecutionFailedEventAttributes , ProtocolMarshaller protocolMarshaller ) { } }
if ( childWorkflowExecutionFailedEventAttributes == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( childWorkflowExecutionFailedEventAttributes . getWorkflowExecution ( ) , WORKFLOWEXECUTION_BINDING ) ; protocolMarshaller . marshall ( childW...
public class JsHdrsImpl { /** * Helper method used by the JMO to rewrite any transient data back into the * underlying JMF message . * Package level visibility as used by the JMO . * @ param why The reason why updateDataFields is being called */ @ Override void updateDataFields ( int why ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "updateDataFields" ) ; super . updateDataFields ( why ) ; setFlags ( ) ; /* If the cachedMessageWaitTime transient has ever been set , write it back */ if ( cachedMessageWaitTime != null ) { getHdr2 ( ) . setField ( J...
public class RecurlyClient { /** * Lookup an account ' s transactions history * Returns the account ' s transaction history * @ param accountCode recurly account id * @ return the transaction history associated with this account on success , null otherwise */ public Transactions getAccountTransactions ( final Str...
return doGET ( Accounts . ACCOUNTS_RESOURCE + "/" + accountCode + Transactions . TRANSACTIONS_RESOURCE , Transactions . class , new QueryParams ( ) ) ;
public class Vector3f { /** * Set the x , y and z components to match the supplied vector . * @ param v * contains the values of x , y and z to set * @ return this */ public Vector3f set ( Vector3ic v ) { } }
return set ( v . x ( ) , v . y ( ) , v . z ( ) ) ;
public class Path3dfx { /** * Replies the path length property . * @ return the length property . */ public DoubleProperty lengthProperty ( ) { } }
if ( this . length == null ) { this . length = new ReadOnlyDoubleWrapper ( ) ; this . length . bind ( Bindings . createDoubleBinding ( ( ) -> Path3afp . computeLength ( getPathIterator ( ) ) , innerTypesProperty ( ) , innerCoordinatesProperty ( ) ) ) ; } return this . length ;
public class EAN13Reader { /** * Based on pattern of odd - even ( ' L ' and ' G ' ) patterns used to encoded the explicitly - encoded * digits in a barcode , determines the implicitly encoded first digit and adds it to the * result string . * @ param resultString string to insert decoded first digit into * @ pa...
for ( int d = 0 ; d < 10 ; d ++ ) { if ( lgPatternFound == FIRST_DIGIT_ENCODINGS [ d ] ) { resultString . insert ( 0 , ( char ) ( '0' + d ) ) ; return ; } } throw NotFoundException . getNotFoundInstance ( ) ;
public class ColorValidator { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public boolean validateDocumentRoot ( DocumentRoot documentRoot , DiagnosticChain diagnostics , Map < Object , Object > context ) { } }
return validate_EveryDefaultConstraint ( documentRoot , diagnostics , context ) ;
public class CardPayment { /** * Primary account number that uniquely identifies this card . * @ return pan */ @ ApiModelProperty ( required = true , value = "Primary account number that uniquely identifies this card." ) @ JsonProperty ( "pan" ) @ NotNull @ Pattern ( regexp = "[0-9]{1,19}" ) @ Masked public String ge...
return pan ;
public class SemanticHighlightingRegistry { /** * Returns with the internal scope index for the argument . Returns { @ code - 1 } if the scopes * argument is < code > null < / code > , the { @ link SemanticHighlightingRegistry # UNKNOWN _ SCOPES unknown scopes } * or is not registered to this manager . */ public in...
this . checkInitialized ( ) ; boolean _isNullOrUnknown = this . isNullOrUnknown ( scopes ) ; if ( _isNullOrUnknown ) { return ( - 1 ) ; } final Integer index = this . scopes . inverse ( ) . get ( scopes ) ; Integer _xifexpression = null ; if ( ( index == null ) ) { _xifexpression = Integer . valueOf ( ( - 1 ) ) ; } els...
public class DefaultApplicationObjectConfigurer { /** * Sets the { @ link CommandButtonLabelInfo } of the given object . The label * info is created after loading the encoded label string from this * instance ' s { @ link MessageSource } using a message code in the format * < pre > * & lt ; objectName & gt ; . ...
Assert . notNull ( configurable , "configurable" ) ; Assert . notNull ( objectName , "objectName" ) ; String labelStr = loadMessage ( objectName + "." + LABEL_KEY ) ; if ( StringUtils . hasText ( labelStr ) ) { CommandButtonLabelInfo labelInfo = CommandButtonLabelInfo . valueOf ( labelStr ) ; configurable . setLabelInf...
public class RequestBuilder { /** * Adds an ContentBody object . */ public RequestBuilder < Resource > set ( final String name , final ContentBody contentBody ) { } }
if ( contentBody != null ) files . put ( name , contentBody ) ; else files . remove ( name ) ; return this ;
public class SimplifySpanBuild { /** * Build * @ return SpannableStringBuilder */ public SpannableStringBuilder build ( ) { } }
if ( mBeforeStringBuilder . length ( ) > 0 ) { mStringBuilder . insert ( 0 , mBeforeStringBuilder ) ; // reset SpecialUnit start pos if ( ! mFinalSpecialUnit . isEmpty ( ) ) { for ( BaseSpecialUnit specialUnit : mFinalSpecialUnit ) { int [ ] tempStartPoss = specialUnit . getStartPoss ( ) ; if ( null == tempStartPoss ||...
public class FFmpegUtils { /** * Convert the duration to " hh : mm : ss " timecode representation , where ss ( seconds ) can be decimal . * @ param duration the duration . * @ param units the unit the duration is in . * @ return the timecode representation . */ public static String toTimecode ( long duration , Ti...
// FIXME Negative durations are also supported . // https : / / www . ffmpeg . org / ffmpeg - utils . html # Time - duration checkArgument ( duration >= 0 , "duration must be positive" ) ; long nanoseconds = units . toNanos ( duration ) ; // TODO This will clip at Long . MAX _ VALUE long seconds = units . toSeconds ( d...
public class CreateNetworkAclRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional * parameters to enable operation dry - run . */ @ Override public Request < CreateNetworkAclRequest > getDryRunRequest ( ) { } }
Request < CreateNetworkAclRequest > request = new CreateNetworkAclRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ;
public class SimonUtils { /** * method is extracted , so the stack trace index is always right */ private static String generatePrivate ( String suffix , boolean includeMethodName ) { } }
StackTraceElement stackElement = Thread . currentThread ( ) . getStackTrace ( ) [ CLIENT_CODE_STACK_INDEX ] ; StringBuilder nameBuilder = new StringBuilder ( stackElement . getClassName ( ) ) ; if ( includeMethodName ) { nameBuilder . append ( '.' ) . append ( stackElement . getMethodName ( ) ) ; } if ( suffix != null ...
public class Classification { /** * classify an observation . * @ param cps contains a list of context predicates * @ return label */ public String classify ( String cps ) { } }
// cps contains a list of context predicates String modelLabel = "" ; int i ; intCps . clear ( ) ; StringTokenizer strTok = new StringTokenizer ( cps , " \t\r\n" ) ; int count = strTok . countTokens ( ) ; for ( i = 0 ; i < count ; i ++ ) { String cpStr = strTok . nextToken ( ) ; Integer cpInt = ( Integer ) data . cpStr...
public class AnimatorModel { /** * Animator */ @ Override public void play ( Animation anim ) { } }
Check . notNull ( anim ) ; final int firstFrame = anim . getFirst ( ) ; final int lastFrame = anim . getLast ( ) ; final double animSpeed = anim . getSpeed ( ) ; final boolean animReverse = anim . hasReverse ( ) ; final boolean animRepeat = anim . hasRepeat ( ) ; first = firstFrame ; last = lastFrame ; speed = animSpee...
public class JWSHeader { /** * Sets the array listing the header parameter names that define extensions that are used in the * JWS header that MUST be understood and processed or { @ code null } for none . * Overriding is only supported for the purpose of calling the super implementation and changing * the return...
this . critical = critical ; this . put ( HeaderConstants . CRITICAL , critical ) ; return this ;
public class DruidLeaderClient { /** * Executes the request object aimed at the leader and process the response with given handler * Note : this method doesn ' t do retrying on errors or handle leader changes occurred during communication */ public < Intermediate , Final > ListenableFuture < Final > goAsync ( final R...
return httpClient . go ( request , handler ) ;
public class WebhooksInner { /** * Create the webhook identified by webhook name . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param webhookName The webhook name . * @ param parameters The create or update parameters for ...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , automationAccountName , webhookName , parameters ) . toBlocking ( ) . single ( ) . body ( ) ;
public class AccSessionFactoryImpl { @ Override public void doAccRequestEvent ( ServerAccSession appSession , AccountRequest acr ) throws InternalException , IllegalDiameterStateException , RouteException , OverloadException { } }
logger . info ( "Diameter Base AccountingSessionFactory :: doAccRequestEvent :: appSession[" + appSession + "], Request[" + acr + "]" ) ;
public class PtoPXmitMsgsItemStream { /** * Complete recovery of a ItemStream retrieved from the MessageStore . * @ param destinationHandler to use in reconstitution */ public void reconstitute ( BaseDestinationHandler destinationHandler ) throws SIResourceException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "reconstitute" , destinationHandler ) ; super . reconstitute ( destinationHandler ) ; _destHighMsgs = destinationHandler . getMessageProcessor ( ) . getHighMessageThreshold ( ) ; if ( TraceComponent . isAnyTracingEnabled ( )...
public class FindBugsWorker { /** * Updates given outputFiles map with class name patterns matching given * java source names * @ param resources * java sources * @ param outLocations * key is src root , value is output location this directory * @ param fbProject */ private void collectClassFiles ( List < W...
for ( WorkItem workItem : resources ) { workItem . addFilesToProject ( fbProject , outLocations ) ; }
public class DDataSource { /** * Get an in memory representation of broken SQL query . This may require * contacting druid for resolving dimensions Vs metrics for SELECT queries * hence it also optionally accepts HTTP request headers to be sent out . * @ param sqlQuery * @ param namedParams * @ param reqHeade...
Program < BaseStatementMeta > pgm = DCompiler . compileSql ( preprocessSqlQuery ( sqlQuery , namedParams ) ) ; for ( BaseStatementMeta stmnt : pgm . getAllStmnts ( ) ) { if ( stmnt instanceof QueryMeta ) { QueryMeta query = ( QueryMeta ) stmnt ; if ( query . queryType == RequestType . SELECT ) { // classifyColumnsToDim...
public class RangeMember { /** * / * ( non - Javadoc ) * @ see org . archive . wayback . resourceindex . RemoteResourceIndex # query ( org . archive . wayback . core . WaybackRequest ) */ public SearchResults query ( WaybackRequest wbRequest ) throws ResourceIndexNotAvailableException , ResourceNotInArchiveException ...
return index . query ( wbRequest ) ;
public class CachingTemplate { /** * Clears the entire contents of the { @ link Cache } . * The { @ link Cache } operation acquires a write lock . * @ param lock { @ link ReadWriteLock } used to coordinate the { @ link Cache } clear operation * with possibly other concurrent { @ link Cache } operations . * @ se...
Lock writeLock = lock . writeLock ( ) ; try { writeLock . lock ( ) ; getCache ( ) . clear ( ) ; } finally { writeLock . unlock ( ) ; }
public class HamcrestMatchers { /** * Creates a matcher of { @ link Comparable } object that matches when the examined object is before the given < code > * value < / code > , as reported by the < code > compareTo < / code > method of the < b > examined < / b > object . * < p > E . g . : < code > Date past ; Date n...
return Matchers . lessThan ( value ) ;
public class InternalXtextParser { /** * InternalXtext . g : 895:1 : entryRuleAssignment : ruleAssignment EOF ; */ public final void entryRuleAssignment ( ) throws RecognitionException { } }
try { // InternalXtext . g : 896:1 : ( ruleAssignment EOF ) // InternalXtext . g : 897:1 : ruleAssignment EOF { before ( grammarAccess . getAssignmentRule ( ) ) ; pushFollow ( FollowSets000 . FOLLOW_1 ) ; ruleAssignment ( ) ; state . _fsp -- ; after ( grammarAccess . getAssignmentRule ( ) ) ; match ( input , EOF , Foll...
public class Exceptions { /** * Runs a throwable and , sneakily , re - throws any exceptions it encounters . * @ param runnable the runnable * @ param < E > the exception type * @ return the runnable */ public static < E extends Throwable > @ NonNull Runnable rethrowRunnable ( final @ NonNull ThrowingRunnable < E...
return runnable ;
public class CPDefinitionOptionValueRelPersistenceImpl { /** * Returns the cp definition option value rel where CPDefinitionOptionRelId = & # 63 ; and key = & # 63 ; or returns < code > null < / code > if it could not be found , optionally using the finder cache . * @ param CPDefinitionOptionRelId the cp definition o...
Object [ ] finderArgs = new Object [ ] { CPDefinitionOptionRelId , key } ; Object result = null ; if ( retrieveFromCache ) { result = finderCache . getResult ( FINDER_PATH_FETCH_BY_C_K , finderArgs , this ) ; } if ( result instanceof CPDefinitionOptionValueRel ) { CPDefinitionOptionValueRel cpDefinitionOptionValueRel =...
public class N1qlQuery { /** * Create a new query with positional parameters . Note that the { @ link JsonArray } * should not be mutated until { @ link # n1ql ( ) } is called since it backs the * creation of the query string . * Positional parameters have the form of ` $ n ` , where the ` n ` represents the posi...
return new ParameterizedN1qlQuery ( statement , positionalParams , null ) ;
public class CPDefinitionOptionValueRelUtil { /** * Returns the last cp definition option value rel in the ordered set where groupId = & # 63 ; . * @ param groupId the group ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching cp de...
return getPersistence ( ) . fetchByGroupId_Last ( groupId , orderByComparator ) ;
public class GVRTextureCapturer { /** * Starts or stops capturing . * @ param capture If true , capturing is started . If false , it is stopped . * @ param fps Capturing FPS ( frames per second ) . */ public void setCapture ( boolean capture , float fps ) { } }
capturing = capture ; NativeTextureCapturer . setCapture ( getNative ( ) , capture , fps ) ;