signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class FileServersInner { /** * Creates a File Server in the given workspace . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param workspaceName The name of the workspace . Workspace names can only contain a combination of alphanumeric characters along with dash ( ...
return createWithServiceResponseAsync ( resourceGroupName , workspaceName , fileServerName , parameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class ApiOvhOrder { /** * Get allowed durations for ' backupStorage ' option * REST : GET / order / dedicated / server / { serviceName } / backupStorage * @ param capacity [ required ] The capacity in gigabytes of your backup storage * @ param serviceName [ required ] The internal name of your dedicated se...
String qPath = "/order/dedicated/server/{serviceName}/backupStorage" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "capacity" , capacity ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t1 ) ;
public class SessionManagerConfigurationException { /** * Converts a Throwable to a SessionManagerConfigurationException . If the Throwable is a * SessionManagerConfigurationException , it will be passed through unmodified ; otherwise , it will be wrapped * in a new SessionManagerConfigurationException . * @ para...
return ( cause instanceof SessionManagerConfigurationException ) ? ( SessionManagerConfigurationException ) cause : new SessionManagerConfigurationException ( cause ) ;
public class Matrix { /** * Updates all elements of the specified column in this matrix by applying given { @ code function } . * @ param j the column index * @ param function the vector function */ public void updateColumn ( int j , VectorFunction function ) { } }
VectorIterator it = iteratorOfColumn ( j ) ; while ( it . hasNext ( ) ) { double x = it . next ( ) ; int i = it . index ( ) ; it . set ( function . evaluate ( i , x ) ) ; }
public class MemoryPersistenceManagerImpl { /** * It might seems like this should delete related partition - level step executions as well . * However these are owned by the job execution , not the step thread instance . * @ param stepThreadInstanceKey */ @ Override public void deleteStepThreadInstanceOfRelatedPart...
long compareInstanceId = stepInstanceKey . getJobInstance ( ) ; for ( StepThreadInstanceEntity stepThreadInstance : data . stepThreadInstanceData . values ( ) ) { if ( ( stepThreadInstance . getJobInstance ( ) . getInstanceId ( ) == compareInstanceId ) && ( stepThreadInstance . getStepName ( ) . equals ( stepInstanceKe...
public class BufferUtil { /** * 拷贝ByteBuffer * @ param src 源ByteBuffer * @ param srcStart 源开始的位置 * @ param dest 目标ByteBuffer * @ param destStart 目标开始的位置 * @ param length 长度 * @ return 目标ByteBuffer */ public static ByteBuffer copy ( ByteBuffer src , int srcStart , ByteBuffer dest , int destStart , int length...
System . arraycopy ( src . array ( ) , srcStart , dest . array ( ) , destStart , length ) ; return dest ;
public class KbTermWrapper { /** * @ Override * public Collection < String > getComments ( String ctxStr ) { * return wrapped ( ) . getComments ( ctxStr ) ; */ @ Override public Fact addComment ( String comment , Context ctx ) throws KbTypeException , CreateException { } }
return wrapped ( ) . addComment ( comment , ctx ) ;
public class KuraCloudConsumer { /** * Helpers */ private void onInternalMessageArrived ( String deviceId , String appTopic , KuraPayload message , int qos , boolean retain , boolean control ) { } }
log . debug ( "Received message with deviceId {}, application topic {}." , deviceId , appTopic ) ; Exchange exchange = anExchange ( getEndpoint ( ) . getCamelContext ( ) ) . withBody ( message ) . withHeader ( CAMEL_KURA_CLOUD_TOPIC , appTopic ) . withHeader ( CAMEL_KURA_CLOUD_DEVICEID , deviceId ) . withHeader ( CAMEL...
public class ServletContexConfigSupport { /** * Load config . * @ param servletContext * the servlet context * @ return the configuration */ Configuration loadConfig ( ServletContext servletContext ) { } }
String handlers = servletContext . getInitParameter ( ContextConfigParams . PARAM_HANDLERS ) ; String layout = servletContext . getInitParameter ( ContextConfigParams . PARAM_LAYOUT ) ; String filters = servletContext . getInitParameter ( ContextConfigParams . PARAM_FILTERS ) ; String options = servletContext . getInit...
public class CmsStringUtil { /** * Escapes a String so it may be printed as text content or attribute * value in a HTML page or an XML file . < p > * This method replaces the following characters in a String : * < ul > * < li > < b > & lt ; < / b > with & amp ; lt ; * < li > < b > & gt ; < / b > with & amp ; ...
if ( source == null ) { return null ; } StringBuffer result = new StringBuffer ( source . length ( ) * 2 ) ; for ( int i = 0 ; i < source . length ( ) ; ++ i ) { char ch = source . charAt ( i ) ; switch ( ch ) { case '<' : result . append ( "&lt;" ) ; break ; case '>' : result . append ( "&gt;" ) ; break ; case '&' : /...
public class FileEncryptor { /** * < p > Reads data from the < code > InputStream < / code > and writes it to the < code > OutputStream < / code > . < / p > * @ param is the input stream * @ param os the output stream * @ throws IOException */ private void copy ( InputStream is , OutputStream os ) throws IOExcept...
byte [ ] buffer = new byte [ bufferSize ] ; int nRead ; while ( ( nRead = is . read ( buffer ) ) != - 1 ) { os . write ( buffer , 0 , nRead ) ; } os . flush ( ) ;
public class PayloadReader { /** * Make the request to the Twilio API to perform the read . * @ param client TwilioRestClient with which to make the request * @ return Payload ResourceSet */ @ Override public ResourceSet < Payload > read ( final TwilioRestClient client ) { } }
return new ResourceSet < > ( this , client , firstPage ( client ) ) ;
public class HBaseBackfillMergeMapper { /** * Given a multimap returned by the merge iterator , return an Op that should be the new value in the * live production cube , or null if the value in the live production cube should be deleted . * @ return an ActionRowKeyAndOp telling what action should be taken for this ...
Op liveCubeOp = null ; Op snapshotOp = null ; Op backfilledOp = null ; byte [ ] rowKey = null ; if ( ! liveCubeResults . isEmpty ( ) ) { Result result = liveCubeResults . iterator ( ) . next ( ) ; liveCubeOp = deserializer . fromBytes ( result . value ( ) ) ; rowKey = result . getRow ( ) ; } if ( ! snapshotResults . is...
public class XMLEncodingDetector { /** * Convenience function used in all XML scanners . */ private void reportFatalError ( String msgId , String arg ) throws JspCoreException { } }
throw new JspCoreException ( msgId , new Object [ ] { arg } ) ; // err . jspError ( msgId , arg ) ;
public class PhoenixInputStream { /** * Read the header from the Phoenix file . * @ param stream input stream * @ return raw header data */ private String readHeaderString ( BufferedInputStream stream ) throws IOException { } }
int bufferSize = 100 ; stream . mark ( bufferSize ) ; byte [ ] buffer = new byte [ bufferSize ] ; stream . read ( buffer ) ; Charset charset = CharsetHelper . UTF8 ; String header = new String ( buffer , charset ) ; int prefixIndex = header . indexOf ( "PPX!!!!|" ) ; int suffixIndex = header . indexOf ( "|!!!!XPP" ) ; ...
public class AbstractRestExceptionHandler { /** * / / / / Template methods / / / / / */ public ResponseEntity < T > handleException ( E ex , HttpServletRequest req ) { } }
logException ( ex , req ) ; T body = createBody ( ex , req ) ; HttpHeaders headers = createHeaders ( ex , req ) ; return new ResponseEntity < > ( body , headers , getStatus ( ) ) ;
public class NavigationView { /** * Updates the visibility of the way name view that is show below * the navigation icon . * If you ' d like to use this method without being overridden by the default visibility values * values we provide , please disabled auto - query with * { @ link NavigationMapboxMap # updat...
wayNameView . updateVisibility ( isVisible ) ; if ( navigationMap != null ) { navigationMap . updateWaynameQueryMap ( isVisible ) ; }
public class ConsumerMonitorRegistrar { /** * Method addConsumerToRegisteredMonitors * This method adds a new consumer to the appropriate places in each of the monitor * maps . * @ param mc * @ param exactMonitorList * @ param wildcardMonitorList */ public void addConsumerToRegisteredMonitors ( MonitoredConsu...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addConsumerToRegisteredMonitors" , new Object [ ] { mc , exactMonitorList , wildcardMonitorList } ) ; // Add consumer to correct places in the maps addConsumerToRegisteredMonitorMap ( mc , exactMonitorList , _registeredExac...
public class Operator { /** * Sets the name of this operator . This overrides the default name , which is either * a generated description of the operation ( such as for example " Aggregate ( 1 : SUM , 2 : MIN ) " ) * or the name the user - defined function or input / output format executed by the operator . * @ ...
this . name = newName ; @ SuppressWarnings ( "unchecked" ) O returnType = ( O ) this ; return returnType ;
public class AmazonSageMakerClient { /** * Updates a notebook instance . NotebookInstance updates include upgrading or downgrading the ML compute instance * used for your notebook instance to accommodate changes in your workload requirements . You can also update the VPC * security groups . * @ param updateNotebo...
request = beforeClientExecution ( request ) ; return executeUpdateNotebookInstance ( request ) ;
public class GeomUtil { /** * Adds the target rectangle to the bounds of the source rectangle . If the source rectangle is * null , a new rectangle is created that is the size of the target rectangle . * @ return the source rectangle . */ public static Rectangle grow ( Rectangle source , Rectangle target ) { } }
if ( target == null ) { log . warning ( "Can't grow with null rectangle [src=" + source + ", tgt=" + target + "]." , new Exception ( ) ) ; } else if ( source == null ) { source = new Rectangle ( target ) ; } else { source . add ( target ) ; } return source ;
public class RepositoryXmlHandler { /** * startElement callback . * Only some Elements need special start operations . * @ throws MetadataException indicating mapping errors */ public void startElement ( String uri , String name , String qName , Attributes atts ) { } }
boolean isDebug = logger . isDebugEnabled ( ) ; m_CurrentString = null ; try { switch ( getLiteralId ( qName ) ) { case MAPPING_REPOSITORY : { if ( isDebug ) logger . debug ( " > " + tags . getTagById ( MAPPING_REPOSITORY ) ) ; this . m_CurrentAttrContainer = m_repository ; String defIso = atts . getValue ( tags . getT...
public class AbortVaultLockRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AbortVaultLockRequest abortVaultLockRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( abortVaultLockRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( abortVaultLockRequest . getAccountId ( ) , ACCOUNTID_BINDING ) ; protocolMarshaller . marshall ( abortVaultLockRequest . getVaultName ( ) , VAULTNAME_BINDING ) ; }...
public class EntityDescFactory { /** * エンティティの名前を指定してエンティティ記述を作成します 。 * @ param tableMeta テーブルメタデータ * @ param entityPrefix エンティティクラスのプリフィックス * @ param entitySuffix エンティティクラスのサフィックス * @ param simpleName エンティティ名 * @ return エンティティ記述 */ public EntityDesc createEntityDesc ( TableMeta tableMeta , String entityPr...
EntityDesc entityDesc = new EntityDesc ( ) ; entityDesc . setNamingType ( namingType ) ; entityDesc . setOriginalStatesPropertyName ( originalStatesPropertyName ) ; entityDesc . setCatalogName ( tableMeta . getCatalogName ( ) ) ; entityDesc . setSchemaName ( tableMeta . getSchemaName ( ) ) ; entityDesc . setTableName (...
public class CommerceShippingMethodUtil { /** * Returns a range of all the commerce shipping methods where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are inde...
return getPersistence ( ) . findByGroupId ( groupId , start , end ) ;
public class InnerJoinNodeImpl { /** * TODO : explain */ private IQTree liftBindingAfterPropagatingCondition ( ImmutableList < IQTree > initialChildren , VariableGenerator variableGenerator , IQProperties currentIQProperties ) { } }
final ImmutableSet < Variable > projectedVariables = getProjectedVariables ( initialChildren ) ; // Non - final ImmutableList < IQTree > currentChildren = initialChildren ; ImmutableSubstitution < ImmutableTerm > currentSubstitution = substitutionFactory . getSubstitution ( ) ; Optional < ImmutableExpression > currentJ...
public class DelegatingLifecycleProvider { /** * Returns a LifecycleProvider that delegates to an existing provider . The provider is managed by Guice * and injected . */ public static < U > LifecycleProvider < U > of ( @ Nonnull final Class < ? extends Provider < U > > providerClass ) { } }
return new DelegatingLifecycleProvider < U > ( providerClass , null ) ;
public class OffsetDateTime { /** * Returns a copy of this { @ code OffsetDateTime } with the specified number of years subtracted . * This method subtracts the specified amount from the years field in three steps : * < ol > * < li > Subtract the input years from the year field < / li > * < li > Check if the re...
return ( years == Long . MIN_VALUE ? plusYears ( Long . MAX_VALUE ) . plusYears ( 1 ) : plusYears ( - years ) ) ;
public class GetRegionsResult { /** * An array of key - value pairs containing information about your get regions request . * @ param regions * An array of key - value pairs containing information about your get regions request . */ public void setRegions ( java . util . Collection < Region > regions ) { } }
if ( regions == null ) { this . regions = null ; return ; } this . regions = new java . util . ArrayList < Region > ( regions ) ;
public class DTMDefaultBase { /** * Given an expanded name , return an ID . If the expanded - name does not * exist in the internal tables , the entry will be created , and the ID will * be returned . Any additional nodes that are created that have this * expanded name will use this ID . * @ param type The simp...
ExpandedNameTable ent = m_expandedNameTable ; return ent . getExpandedTypeID ( namespace , localName , type ) ;
public class FunctionRegistry { /** * Check if variable expression is a custom function . * Expression has to start with one of the registered function library prefix . * @ param variableExpression to be checked * @ return flag ( true / false ) */ public boolean isFunction ( final String variableExpression ) { } ...
if ( variableExpression == null || variableExpression . length ( ) == 0 ) { return false ; } for ( int i = 0 ; i < functionLibraries . size ( ) ; i ++ ) { FunctionLibrary lib = ( FunctionLibrary ) functionLibraries . get ( i ) ; if ( variableExpression . startsWith ( lib . getPrefix ( ) ) ) { return true ; } } return f...
public class Feature { /** * Set attribute value of given type . * @ param name attribute name * @ param value attribute value */ public void setIntegerAttribute ( String name , Integer value ) { } }
Attribute attribute = getAttributes ( ) . get ( name ) ; if ( ! ( attribute instanceof IntegerAttribute ) ) { throw new IllegalStateException ( "Cannot set integer value on attribute with different type, " + attribute . getClass ( ) . getName ( ) + " setting value " + value ) ; } ( ( IntegerAttribute ) attribute ) . se...
public class USCImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eSet ( int featureID , Object newValue ) { } }
switch ( featureID ) { case AfplibPackage . USC__BYPSIDEN : setBYPSIDEN ( ( Integer ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
public class WaveformDetailComponent { /** * Change the waveform preview being drawn . This will be quickly overruled if a player is being monitored , but * can be used in other contexts . * @ param waveform the waveform detail to display * @ param cueList used to draw cue and memory points * @ param beatGrid t...
this . waveform . set ( waveform ) ; this . cueList . set ( cueList ) ; this . beatGrid . set ( beatGrid ) ; clearPlaybackState ( ) ; repaint ( ) ; if ( ! autoScroll . get ( ) ) { invalidate ( ) ; }
public class SearchDevicesResult { /** * The devices that meet the specified set of filter criteria , in sort order . * @ param devices * The devices that meet the specified set of filter criteria , in sort order . */ public void setDevices ( java . util . Collection < DeviceData > devices ) { } }
if ( devices == null ) { this . devices = null ; return ; } this . devices = new java . util . ArrayList < DeviceData > ( devices ) ;
public class PluginArgument { /** * Resolves this plugin argument to an argument resolver . * @ return An argument resolver that represents this plugin argument . */ public Plugin . Factory . UsingReflection . ArgumentResolver toArgumentResolver ( ) { } }
return new Plugin . Factory . UsingReflection . ArgumentResolver . ForIndex . WithDynamicType ( index , value ) ;
public class Route { /** * Matches / index to / index or / me / 1 to / person / { id } . * @ param method the method * @ param uri the uri * @ return True if the actual route matches a raw rout . False if not . */ public boolean matches ( HttpMethod method , String uri ) { } }
if ( this . httpMethod == method ) { Matcher matcher = regex . matcher ( uri ) ; return matcher . matches ( ) ; } else { return false ; }
public class TileSetColorImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setSIZE3 ( Integer newSIZE3 ) { } }
Integer oldSIZE3 = size3 ; size3 = newSIZE3 ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . TILE_SET_COLOR__SIZE3 , oldSIZE3 , size3 ) ) ;
public class EmbeddedNeo4jDialect { /** * When dealing with some scenarios like , for example , a bidirectional association , OGM calls this method twice : * the first time with the information related to the owner of the association and the { @ link RowKey } , * the second time using the same { @ link RowKey } but...
switch ( associationKey . getMetadata ( ) . getAssociationKind ( ) ) { case EMBEDDED_COLLECTION : return createRelationshipWithEmbeddedNode ( associationKey , associationRow , associatedEntityKeyMetadata ) ; case ASSOCIATION : return findOrCreateRelationshipWithEntityNode ( associationKey , associationRow , associatedE...
public class AbstractRedisStorage { /** * Attempt to acquire a lock * @ return true if lock was successfully acquired ; false otherwise */ public boolean lock ( T jedis ) { } }
UUID lockId = UUID . randomUUID ( ) ; final String setResponse = jedis . set ( redisSchema . lockKey ( ) , lockId . toString ( ) , "NX" , "PX" , lockTimeout ) ; boolean lockAcquired = ! isNullOrEmpty ( setResponse ) && setResponse . equals ( "OK" ) ; if ( lockAcquired ) { // save the random value used to lock so that w...
public class SocketReceiver { /** * Returns a Vector of SocketDetail representing the IP / Domain name * of the currently connected sockets that this receiver has * been responsible for creating . * @ return Vector of SocketDetails */ public Vector getConnectedSocketDetails ( ) { } }
Vector details = new Vector ( socketList . size ( ) ) ; for ( Enumeration enumeration = socketList . elements ( ) ; enumeration . hasMoreElements ( ) ; ) { Socket socket = ( Socket ) enumeration . nextElement ( ) ; details . add ( new SocketDetail ( socket , ( SocketNode13 ) socketMap . get ( socket ) ) ) ; } return de...
public class Strings { /** * Test if the given String ends with the specified suffix , * ignoring upper / lower case . * @ param str the String to check * @ param suffix the suffix to look for * @ see java . lang . String # endsWith */ public static boolean endsWithIgnoreCase ( String str , String suffix ) { } ...
if ( str == null || suffix == null ) { return false ; } if ( str . endsWith ( suffix ) ) { return true ; } if ( str . length ( ) < suffix . length ( ) ) { return false ; } String lcStr = str . substring ( str . length ( ) - suffix . length ( ) ) . toLowerCase ( ) ; String lcSuffix = suffix . toLowerCase ( ) ; return lc...
public class JvmSpecializedTypeReferenceImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case TypesPackage . JVM_SPECIALIZED_TYPE_REFERENCE__EQUIVALENT : return getEquivalent ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class JaxWsUtils { /** * Get serviceName ' s QName of Web Service * @ param classInfo * @ return */ public static QName getServiceQName ( ClassInfo classInfo , String seiClassName , String targetNamespace ) { } }
AnnotationInfo annotationInfo = getAnnotationInfoFromClass ( classInfo , "Service QName" ) ; if ( annotationInfo == null ) { return null ; } // serviceName can only be defined in implementation bean , targetNamespace should be the implemented one . return getQName ( classInfo , targetNamespace , annotationInfo . getVal...
public class CmsHtmlConverter { /** * Converts the given HTML code according to the settings of this converter . < p > * If an any error occurs during the conversion process , the original input is returned unmodified . < p > * @ param htmlInput HTML input stored in an array of bytes * @ return array of bytes con...
try { return convertToByte ( htmlInput ) ; } catch ( Exception e ) { if ( LOG . isWarnEnabled ( ) ) { LOG . warn ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_CONVERSION_BYTE_FAILED_0 ) , e ) ; } return htmlInput ; }
public class DriverFactory { /** * Loads all instances according to default configuration file . */ public static void configure ( ) { } }
InputStream inputStream = null ; try { URL configUrl = getConfigUrl ( ) ; if ( configUrl == null ) { throw new ConfigurationException ( "esigate.properties configuration file " + "was not found in the classpath" ) ; } inputStream = configUrl . openStream ( ) ; Properties merged = new Properties ( ) ; if ( inputStream !...
public class ClassUtils { /** * Determines whether the given Object is an instance of the specified Class . Note , an Object cannot be an * instance of null , so this method returns false if the Class type is null or the Object is null . * @ param obj the Object to test as an instance of the specified Class type . ...
return type != null && type . isInstance ( obj ) ;
public class VfsStringWriter { /** * Opens a write stream using this StringWriter as the resulting string */ public WriteStreamOld openWrite ( ) { } }
if ( _cb != null ) _cb . clear ( ) ; else _cb = CharBuffer . allocate ( ) ; if ( _ws == null ) _ws = new WriteStreamOld ( this ) ; else _ws . init ( this ) ; try { _ws . setEncoding ( "utf-8" ) ; } catch ( UnsupportedEncodingException e ) { } return _ws ;
public class TraceImpl { /** * Internal implementation of info NLS message tracing . * @ param source * @ param sourceClass * @ param methodName * @ param messageIdentifier * @ param object */ private final void internalInfo ( Object source , Class sourceClass , String methodName , String messageIdentifier , ...
if ( usePrintWriterForTrace ) { java . io . PrintWriter printWriter = traceFactory . getPrintWriter ( ) ; if ( printWriter != null ) { StringBuffer stringBuffer = new StringBuffer ( new java . util . Date ( ) . toString ( ) ) ; stringBuffer . append ( " I " ) ; stringBuffer . append ( sourceClass . getName ( ) ) ; stri...
public class TumblingProcessingTimeWindows { /** * Creates a new { @ code TumblingProcessingTimeWindows } { @ link WindowAssigner } that assigns * elements to time windows based on the element timestamp and offset . * < p > For example , if you want window a stream by hour , but window begins at the 15th minutes ...
return new TumblingProcessingTimeWindows ( size . toMilliseconds ( ) , offset . toMilliseconds ( ) ) ;
public class LongBuffer { /** * Writes all the remaining longs of the { @ code src } long buffer to this buffer ' s current * position , and increases both buffers ' position by the number of longs copied . * @ param src the source long buffer . * @ return this buffer . * @ exception BufferOverflowException if ...
if ( src == this ) { throw new IllegalArgumentException ( ) ; } if ( src . remaining ( ) > remaining ( ) ) { throw new BufferOverflowException ( ) ; } long [ ] contents = new long [ src . remaining ( ) ] ; src . get ( contents ) ; put ( contents ) ; return this ;
public class CommerceWarehousePersistenceImpl { /** * Returns a range of all the commerce warehouses . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . T...
return findAll ( start , end , null ) ;
public class CPDefinitionVirtualSettingPersistenceImpl { /** * Returns the first cp definition virtual setting in the ordered set where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ param orderByComparator the comparator to order the set by ( optionally ...
CPDefinitionVirtualSetting cpDefinitionVirtualSetting = fetchByUuid_C_First ( uuid , companyId , orderByComparator ) ; if ( cpDefinitionVirtualSetting != null ) { return cpDefinitionVirtualSetting ; } StringBundler msg = new StringBundler ( 6 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "uuid=" ) ; ms...
public class TCAPProviderImpl { public Future createOperationTimer ( Runnable operationTimerTask , long invokeTimeout ) { } }
return this . _EXECUTOR . schedule ( operationTimerTask , invokeTimeout , TimeUnit . MILLISECONDS ) ;
public class Settings { /** * load the files from - Dcom . pahakia . settings . dir = directory */ public static final void init ( ) { } }
String settingDir = System . getProperty ( SETTINGS_DIR ) ; if ( settingDir == null ) { settingDir = System . getenv ( SETTINGS_DIR ) ; } if ( settingDir == null ) { throw Fault . create ( SettingsFaultCodes . SettingsDirNotSpecified , SETTINGS_DIR ) ; } init ( settingDir ) ;
public class EnvelopesApi { /** * Creates an envelope . * Creates an envelope . Using this function you can : * Create an envelope and send it . * Create an envelope from an existing template and send it . In either case , you can choose to save the envelope as a draft envelope instead of sending it by setting the re...
return createEnvelope ( accountId , envelopeDefinition , null ) ;
public class ViewFetcher { /** * Returns true if the view is sufficiently shown * @ param view the view to check * @ return true if the view is sufficiently shown */ public final boolean isViewSufficientlyShown ( View view ) { } }
final int [ ] xyView = new int [ 2 ] ; final int [ ] xyParent = new int [ 2 ] ; if ( view == null ) return false ; final float viewHeight = view . getHeight ( ) ; final View parent = getScrollOrListParent ( view ) ; view . getLocationOnScreen ( xyView ) ; if ( parent == null ) { xyParent [ 1 ] = 0 ; } else { parent . g...
public class CredentialFactory { /** * Initializes OAuth2 credential using preconfigured ServiceAccount settings on the local GCE VM . * See : < a href = " https : / / developers . google . com / compute / docs / authentication " > Authenticating from * Google Compute Engine < / a > . */ public Credential getCreden...
logger . atFine ( ) . log ( "getCredentialFromMetadataServiceAccount()" ) ; Credential cred = new ComputeCredentialWithRetry ( new ComputeCredential . Builder ( getStaticHttpTransport ( ) , JSON_FACTORY ) . setRequestInitializer ( new CredentialHttpRetryInitializer ( ) ) ) ; try { cred . refreshToken ( ) ; } catch ( IO...
public class GrafeasV1Beta1Client { /** * Gets the specified occurrence . * < p > Sample code : * < pre > < code > * try ( GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client . create ( ) ) { * OccurrenceName name = OccurrenceName . of ( " [ PROJECT ] " , " [ OCCURRENCE ] " ) ; * Occurrence respo...
GetOccurrenceRequest request = GetOccurrenceRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . build ( ) ; return getOccurrence ( request ) ;
public class AABBUtils { /** * Offsets the passed { @ link AxisAlignedBB } by the { @ link BlockPos } coordinates . * @ param pos the pos * @ param aabb the aabb * @ return the axis aligned bb */ public static AxisAlignedBB offset ( BlockPos pos , AxisAlignedBB aabb ) { } }
if ( aabb == null || pos == null ) return aabb ; return aabb . offset ( pos . getX ( ) , pos . getY ( ) , pos . getZ ( ) ) ;
public class PHPMethods { /** * Shuffles the values of any array in place using the provided random generator . * @ param < T > * @ param array * @ param rnd */ public static < T > void shuffle ( T [ ] array , Random rnd ) { } }
// Implementing Fisher - Yates shuffle T tmp ; for ( int i = array . length - 1 ; i > 0 ; -- i ) { int index = rnd . nextInt ( i + 1 ) ; tmp = array [ index ] ; array [ index ] = array [ i ] ; array [ i ] = tmp ; }
public class JavaCompiler { /** * Attribute a parse tree . * @ return the attributed parse tree */ public Env < AttrContext > attribute ( Env < AttrContext > env ) { } }
if ( compileStates . isDone ( env , CompileState . ATTR ) ) return env ; if ( verboseCompilePolicy ) printNote ( "[attribute " + env . enclClass . sym + "]" ) ; if ( verbose ) log . printVerbose ( "checking.attribution" , env . enclClass . sym ) ; if ( ! taskListener . isEmpty ( ) ) { TaskEvent e = new TaskEvent ( Task...
public class HeapQuickSelectSketch { /** * array stays the same size . Changes theta and thus count */ private final void quickSelectAndRebuild ( ) { } }
final int arrLongs = 1 << lgArrLongs_ ; final int pivot = ( 1 << lgNomLongs_ ) + 1 ; // pivot for QS thetaLong_ = selectExcludingZeros ( cache_ , curCount_ , pivot ) ; // messes up the cache _ // now we rebuild to clean up dirty data , update count , reconfigure as a hash table final long [ ] tgtArr = new long [ arrLon...
public class ApiOvhStore { /** * Create a new product for partner * REST : POST / store / partner / { partnerId } / product * @ param partnerId [ required ] Id of the partner * @ param description [ required ] Description of product * @ param name [ required ] Name of product * @ param otherDetails [ required...
String qPath = "/store/partner/{partnerId}/product" ; StringBuilder sb = path ( qPath , partnerId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "category" , category ) ; addBody ( o , "description" , description ) ; addBody ( o , "name" , name ) ; addBody ( o , "otherDetails" ,...
public class CertPathValidator { /** * Returns the default { @ code CertPathValidator } type as specified by * the { @ code certpathvalidator . type } security property , or the string * { @ literal " PKIX " } if no such property exists . * < p > The default { @ code CertPathValidator } type can be used by * ap...
String cpvtype = AccessController . doPrivileged ( new PrivilegedAction < String > ( ) { public String run ( ) { return Security . getProperty ( CPV_TYPE ) ; } } ) ; return ( cpvtype == null ) ? "PKIX" : cpvtype ;
public class CmsRpcAction { /** * Shows the ' loading message ' . < p > * Overwrite to customize the message . < p > * @ param blocking shows an blocking overlay if < code > true < / code > */ protected void show ( boolean blocking ) { } }
if ( blocking ) { m_notification = CmsNotification . get ( ) . sendBusy ( CmsNotification . Type . NORMAL , m_loadingMessage ) ; } else { m_notification = CmsNotification . get ( ) . sendSticky ( CmsNotification . Type . NORMAL , m_loadingMessage ) ; }
public class Utilities { /** * Replies the fully qualified name with generic parameters . * @ param type the type . Never < code > null < / code > . * @ return the qualified name . */ public static String getNameWithTypeParameters ( IType type ) { } }
assert type != null ; final String superName = type . getFullyQualifiedName ( '.' ) ; if ( ! JavaModelUtil . is50OrHigher ( type . getJavaProject ( ) ) ) { return superName ; } try { final ITypeParameter [ ] typeParameters = type . getTypeParameters ( ) ; if ( typeParameters != null && typeParameters . length > 0 ) { f...
public class MapMaker { /** * Guides the allowed concurrency among update operations . Used as a hint for internal sizing . The * table is internally partitioned to try to permit the indicated number of concurrent updates * without contention . Because assignment of entries to these partitions is not necessarily ...
checkState ( this . concurrencyLevel == UNSET_INT , "concurrency level was already set to %s" , this . concurrencyLevel ) ; checkArgument ( concurrencyLevel > 0 ) ; this . concurrencyLevel = concurrencyLevel ; return this ;
public class HostCertificateManager { /** * Installs a given SSL certificate on the server . * @ param cert SSL certificate in PEM format * @ throws HostConfigFault * @ throws RuntimeFault * @ throws RemoteException */ public void installServerCertificate ( String cert ) throws HostConfigFault , RuntimeFault , ...
getVimService ( ) . installServerCertificate ( getMOR ( ) , cert ) ;
public class MediaExceptionProcessor { /** * ( non - Javadoc ) * @ see * com . microsoft . windowsazure . services . media . entityoperations . EntityContract * # update ( com . microsoft . windowsazure . services . media . entityoperations . * EntityUpdateOperation ) */ @ Override public String update ( Entity...
try { return service . update ( updater ) ; } catch ( UniformInterfaceException e ) { throw processCatch ( new ServiceException ( e ) ) ; } catch ( ClientHandlerException e ) { throw processCatch ( new ServiceException ( e ) ) ; }
public class CmsSitemapNavPosCalculator { /** * Helper method to generate a list of floats between two given values . < p > * @ param min the lower bound * @ param max the upper bound * @ param steps the number of floats to generate * @ return the generated floats */ private List < Float > interpolateBetween ( ...
float delta = ( max - min ) / ( steps + 1 ) ; List < Float > result = new ArrayList < Float > ( ) ; float num = min ; for ( int i = 0 ; i < steps ; i ++ ) { num += delta ; result . add ( new Float ( num ) ) ; } return result ;
public class Formatter { /** * Writes a formatted string to this object ' s destination using the * specified locale , format string , and arguments . * @ param l * The { @ linkplain java . util . Locale locale } to apply during * formatting . If { @ code l } is { @ code null } then no localization * is appli...
ensureOpen ( ) ; // index of last argument referenced int last = - 1 ; // last ordinary index int lasto = - 1 ; FormatString [ ] fsa = parse ( format ) ; for ( int i = 0 ; i < fsa . length ; i ++ ) { FormatString fs = fsa [ i ] ; int index = fs . index ( ) ; try { switch ( index ) { case - 2 : // fixed string , " % n "...
public class FLVReader { /** * { @ inheritDoc } */ @ Override public void close ( ) { } }
log . debug ( "Reader close: {}" , file . getName ( ) ) ; try { lock . lock ( ) ; if ( in != null ) { in . free ( ) ; in = null ; } if ( channel != null ) { try { channel . close ( ) ; fis . close ( ) ; } catch ( IOException e ) { log . error ( "FLVReader close" , e ) ; } } log . debug ( "Reader closed: {}" , file . ge...
public class Configuration { /** * Get the configuration string as a content . * @ param key the key to look for in the configuration file * @ param o string or content argument added to configuration text * @ return a content tree for the text */ public Content getResource ( String key , Object o1 , Object o2 ) ...
return getResource ( key , o1 , o2 , null ) ;
public class ShellActivity { /** * Read required input attributes . */ private void readAttributes ( ) { } }
ItemRuleMap attributeItemRuleMap = getRequestRule ( ) . getAttributeItemRuleMap ( ) ; if ( attributeItemRuleMap != null && ! attributeItemRuleMap . isEmpty ( ) ) { ItemRuleList attributeItemRuleList = new ItemRuleList ( attributeItemRuleMap . values ( ) ) ; determineSimpleMode ( attributeItemRuleList ) ; if ( procedura...
public class CmsElementRename { /** * Returns a list of xml pages from the specified folder . < p > * @ return a list of xml pages from the specified folder */ private List getXmlPages ( ) { } }
boolean isRecursive = Boolean . valueOf ( getParamRecursive ( ) ) . booleanValue ( ) ; // filter definition to read only the required resources int xmlPageId ; try { xmlPageId = OpenCms . getResourceManager ( ) . getResourceType ( CmsResourceTypeXmlPage . getStaticTypeName ( ) ) . getTypeId ( ) ; } catch ( CmsLoaderExc...
public class ExecutionTimesReport { /** * Read hints from all resources in a collection , retaining * < code > suiteNames < / code > . If < code > suiteNames < / code > is null , * everything is retained . */ public static Map < String , List < Long > > mergeHints ( Collection < ResourceCollection > resources , Col...
final Map < String , List < Long > > hints = new HashMap < > ( ) ; for ( ResourceCollection rc : resources ) { Iterator < Resource > i = rc . iterator ( ) ; while ( i . hasNext ( ) ) { InputStream is = null ; Resource r = i . next ( ) ; try { is = r . getInputStream ( ) ; mergeHints ( is , hints ) ; // Early prune the ...
public class OrmElf { /** * Load an object by it ' s ID . The @ Id annotated field ( s ) of the object is used to * set query parameters . * @ param connection a SQL Connection object * @ param clazz the class of the object to load * @ param args the query parameter used to find the object by it ' s ID * @ pa...
return OrmReader . objectById ( connection , clazz , args ) ;
public class ExtensionsInner { /** * Enables the Operations Management Suite ( OMS ) on the HDInsight cluster . * @ param resourceGroupName The name of the resource group . * @ param clusterName The name of the cluster . * @ param parameters The Operations Management Suite ( OMS ) workspace parameters . * @ thr...
return enableMonitoringWithServiceResponseAsync ( resourceGroupName , clusterName , parameters ) . map ( new Func1 < ServiceResponse < Void > , Void > ( ) { @ Override public Void call ( ServiceResponse < Void > response ) { return response . body ( ) ; } } ) ;
public class SPX { /** * / * [ deutsch ] * < p > Implementierungsmethode des Interface { @ link Externalizable } . < / p > * < p > Das erste Byte enth & auml ; lt um 4 Bits nach links verschoben den * Typ des zu serialisierenden Objekts . Danach folgen die Daten - Bits * in einer bit - komprimierten Darstellung...
switch ( this . type ) { case DATE_TYPE : this . writeDate ( out ) ; break ; case TIME_TYPE : this . writeTime ( out ) ; break ; case WEEKMODEL_TYPE : this . writeWeekmodel ( out ) ; break ; case MOMENT_TYPE : this . writeMoment ( out ) ; break ; case MACHINE_TIME_TYPE : this . writeMachineTime ( out ) ; break ; case D...
public class ApiOvhOrder { /** * Create order * REST : POST / order / dedicated / server / { serviceName } / firewall / { duration } * @ param firewallModel [ required ] Firewall type * @ param serviceName [ required ] The internal name of your dedicated server * @ param duration [ required ] Duration */ public...
String qPath = "/order/dedicated/server/{serviceName}/firewall/{duration}" ; StringBuilder sb = path ( qPath , serviceName , duration ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "firewallModel" , firewallModel ) ; String resp = exec ( qPath , "POST" , sb . toString ( ) , o ) ...
public class AgentFilter { /** * The current health state of the agent . Values can be set to < b > HEALTHY < / b > or < b > UNHEALTHY < / b > . * @ param agentHealths * The current health state of the agent . Values can be set to < b > HEALTHY < / b > or < b > UNHEALTHY < / b > . * @ see AgentHealth */ public vo...
if ( agentHealths == null ) { this . agentHealths = null ; return ; } this . agentHealths = new java . util . ArrayList < String > ( agentHealths ) ;
public class N { /** * Mostly it ' s designed for one - step operation to complete the operation in one step . * < code > java . util . stream . Stream < / code > is preferred for multiple phases operation . * @ param c * @ return */ public static < T > List < T > distinct ( final Collection < ? extends T > c ) {...
if ( N . isNullOrEmpty ( c ) ) { return new ArrayList < > ( ) ; } return distinct ( c , 0 , c . size ( ) ) ;
public class Subtypes2 { /** * Get the first common superclass of arrays with different numbers of * dimensions . * @ param aArrType * an ArrayType * @ param bArrType * another ArrayType * @ return ReferenceType representing first common superclass */ private ReferenceType computeFirstCommonSuperclassOfDiff...
assert aArrType . getDimensions ( ) != bArrType . getDimensions ( ) ; boolean aBaseTypeIsPrimitive = ( aArrType . getBasicType ( ) instanceof BasicType ) ; boolean bBaseTypeIsPrimitive = ( bArrType . getBasicType ( ) instanceof BasicType ) ; if ( aBaseTypeIsPrimitive || bBaseTypeIsPrimitive ) { int minDimensions , maxD...
public class Jarafe { /** * Process a text string as input and return a List of LightAnnot objects that serve as * stand - off annotations over the input text . * @ param s Input string * @ return a list of LightAnnot objects */ public List < LightAnnot > processRawStringAsAnnotList ( String s ) { } }
Annotation [ ] annots = decoderPipeline . processRawStringAsAnnotList ( s ) ; List < LightAnnot > alist = new ArrayList < LightAnnot > ( ) ; int i = 0 ; for ( i = 0 ; i < annots . length ; i ++ ) { Annotation ann = annots [ i ] ; alist . add ( new LightAnnot ( ann . st ( ) , ann . en ( ) , ann . typ ( ) . toString ( ) ...
public class Fastpath { /** * Send a function call to the PostgreSQL backend . * @ param fnId Function id * @ param resultType True if the result is a numeric ( Integer or Long ) * @ param args FastpathArguments to pass to fastpath * @ return null if no data , Integer if an integer result , Long if a long resul...
// Run it . byte [ ] returnValue = fastpath ( fnId , args ) ; // Interpret results . if ( ! resultType || returnValue == null ) { return returnValue ; } if ( returnValue . length == 4 ) { return ByteConverter . int4 ( returnValue , 0 ) ; } else if ( returnValue . length == 8 ) { return ByteConverter . int8 ( returnValu...
public class SimpleNwwViewer { /** * A way to open the NWW viewer and get the tools panel , which has reference to the rest . * @ param appName * @ return */ public static ToolsPanelController openNww ( String appName , int onCloseAction ) { } }
try { if ( appName == null ) { appName = APPNAME ; } if ( onCloseAction < 0 ) { onCloseAction = JFrame . EXIT_ON_CLOSE ; } Class < SimpleNwwViewer > class1 = SimpleNwwViewer . class ; ImageIcon icon = new ImageIcon ( class1 . getResource ( "/org/hortonmachine/images/hm150.png" ) ) ; Component nwwComponent = NwwPanel . ...
public class DocBrowserTable { /** * Retrieves date from the cache or from the annis rest service for a specific * document . * @ param document The document the data are fetched for . * @ return The a list of meta data . Can be empty but never null . */ private List < Annotation > getDocMetaData ( String documen...
// lookup up meta data in the cache if ( ! docMetaDataCache . containsKey ( docBrowserPanel . getCorpus ( ) ) ) { // get the metadata for the corpus WebResource res = Helper . getAnnisWebResource ( ) ; res = res . path ( "meta/corpus/" ) . path ( urlPathEscape . escape ( docBrowserPanel . getCorpus ( ) ) ) . path ( "cl...
public class StringUtils { /** * Convert a list of token objects ( e . g . a tokenized sentence ) into an array * containing the token strings . * @ param tokenizedSentence * the list of token objects * @ return the array of token strings */ public static String [ ] convertListTokenToArrayStrings ( final List <...
final List < String > tokensList = new ArrayList < > ( ) ; for ( final Token token : tokenizedSentence ) { tokensList . add ( token . getTokenValue ( ) ) ; } return tokensList . toArray ( new String [ tokensList . size ( ) ] ) ;
public class WebUtils { /** * Gets in progress authentication . * @ return the in progress authentication */ public static Authentication getInProgressAuthentication ( ) { } }
val context = RequestContextHolder . getRequestContext ( ) ; val authentication = context != null ? WebUtils . getAuthentication ( context ) : null ; if ( authentication == null ) { return AuthenticationCredentialsThreadLocalBinder . getInProgressAuthentication ( ) ; } return authentication ;
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcOccupantTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class GetJobStatusPRequest { /** * < code > optional . alluxio . grpc . job . GetJobStatusPOptions options = 2 ; < / code > */ public alluxio . grpc . GetJobStatusPOptionsOrBuilder getOptionsOrBuilder ( ) { } }
return options_ == null ? alluxio . grpc . GetJobStatusPOptions . getDefaultInstance ( ) : options_ ;
public class EntryTreeNode { /** * TreeNode Interfaces */ public TreeNode getChildAt ( int childIndex ) { } }
if ( entry instanceof GroupEntry ) { Entry childEntry = ( ( GroupEntry ) entry ) . getEntries ( ) . get ( childIndex ) ; return new EntryTreeNode ( this , childEntry , editors ) ; } else if ( entry instanceof NextCatalogEntry && childIndex == 0 ) { try { if ( childCatalog == null ) { childCatalog = CatalogUtilities . p...
public class MpscLinkedQueue { /** * $ gen : ignore */ public static < E > MpscLinkedQueue < E > newMpscLinkedQueue ( ) { } }
if ( UnsafeAccess . SUPPORTS_GET_AND_SET ) { return new MpscLinkedQueue8 < E > ( ) ; } else { return new MpscLinkedQueue7 < E > ( ) ; }
public class ConcurrentLinkedQueue { /** * Returns the first live ( non - deleted ) node on list , or null if none . * This is yet another variant of poll / peek ; here returning the * first node , not element . We could make peek ( ) a wrapper around * first ( ) , but that would cost an extra volatile read of it...
restartFromHead : for ( ; ; ) { for ( Node < E > h = head , p = h , q ; ; ) { boolean hasItem = ( p . item != null ) ; if ( hasItem || ( q = p . next ) == null ) { updateHead ( h , p ) ; return hasItem ? p : null ; } else if ( sentinel ( ) == q ) continue restartFromHead ; else p = q ; } }
public class OsmLayerParam { /** * Validate the properties have the correct values . */ public void postConstruct ( ) { } }
Assert . equals ( NUMBER_OF_EXTENT_COORDS , this . maxExtent . length , "maxExtent must have exactly 4 elements to the array. Was: " + Arrays . toString ( this . maxExtent ) ) ; Assert . equals ( 2 , this . tileSize . length , "tileSize must have exactly 2 elements to the array. Was: " + Arrays . toString ( this . ti...
public class Input { /** * Remove a controller listener that will no longer be notified * @ param listener The listen to be removed */ public void removeControllerListener ( ControllerListener listener ) { } }
controllerListeners . remove ( listener ) ; if ( ! mouseListeners . contains ( listener ) && ! keyListeners . contains ( listener ) ) { allListeners . remove ( listener ) ; }
public class ApiOvhMe { /** * List of all the orders the logged account has * REST : GET / me / order * @ param date _ to [ required ] Filter the value of date property ( < = ) * @ param date _ from [ required ] Filter the value of date property ( > = ) */ public ArrayList < Long > order_GET ( Date date_from , Da...
String qPath = "/me/order" ; StringBuilder sb = path ( qPath ) ; query ( sb , "date.from" , date_from ) ; query ( sb , "date.to" , date_to ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ;
public class Expressions { /** * Create a new Operation expression * @ param type type of expression * @ param operator operator * @ param args operation arguments * @ return operation expression */ public static < T extends Comparable < ? > > TimeOperation < T > timeOperation ( Class < ? extends T > type , Ope...
return new TimeOperation < T > ( type , operator , args ) ;
public class VersionValues { /** * Find the enumerated object matching the input name . If this name has * never been seen prior , then a new object is created by this call . * @ param name * @ return VersionValues * @ throws IllegalArgumentException * - if format is incorrect * @ throws NullPointerExceptio...
return myMatcher . match ( name , 0 , name . length ( ) , true ) ;