signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class CPSpecificationOptionUtil { /** * Returns all the cp specification options where uuid = & # 63 ; and companyId = & # 63 ; . * @ param uuid the uuid * @ param companyId the company ID * @ return the matching cp specification options */ public static List < CPSpecificationOption > findByUuid_C ( String...
return getPersistence ( ) . findByUuid_C ( uuid , companyId ) ;
public class CassandraCpoAdapter { /** * The CpoAdapter will check to see if this object exists in the datasource . * @ param name The name which identifies which EXISTS , INSERT , and UPDATE Function Groups to execute to persist the * object . * @ param obj This is an object that has been defined within the meta...
long objCount = 0 ; Logger localLogger = logger ; if ( obj == null ) { throw new CpoException ( "NULL Object passed into existsObject" ) ; } try { CpoClass cpoClass = metaDescriptor . getMetaClass ( obj ) ; List < CpoFunction > cpoFunctions = cpoClass . getFunctionGroup ( CpoAdapter . EXIST_GROUP , name ) . getFunction...
public class OfflineDataUpload { /** * Gets the failureReason value for this OfflineDataUpload . * @ return failureReason * Processing failure reason for get , if status is FAILURE . Used * for upload level failures . * < span class = " constraint Selectable " > This field can * be selected using the value " Fa...
return failureReason ;
public class CommonMpJwtFat { /** * Set bad app check expectations - sets checks for a 401 status code and the expected error message in the server ' s messages . log * @ param errorMessage - the error message to search for in the server ' s messages . log file * @ return - newly created Expectations * @ throws E...
Expectations expectations = new Expectations ( ) ; expectations . addExpectation ( new ResponseStatusExpectation ( HttpServletResponse . SC_UNAUTHORIZED ) ) ; expectations . addExpectation ( new ResponseMessageExpectation ( MpJwtFatConstants . STRING_CONTAINS , errorMessage , "Did not find the error message: " + errorM...
public class CsvParser { /** * Parser file to list of T objects * Obs . : No read de first line . * @ return List of T object * @ throws IllegalAccessException IllegalAccessException * @ throws InstantiationException InstantiationException * @ throws InvocationTargetException InvocationTargetException * @ t...
List < T > list = new ArrayList < > ( ) ; Map < Method , TableCellMapping > cellMappingByMethod = ImporterUtils . getMappedMethods ( clazz , group ) ; final Constructor < T > constructor = clazz . getDeclaredConstructor ( ) ; constructor . setAccessible ( true ) ; for ( int i = 0 ; i < csvLines . size ( ) ; i ++ ) { fi...
public class Types { /** * Collect types into a new closure ( using a @ code { ClosureHolder } ) */ public Collector < Type , ClosureHolder , List < Type > > closureCollector ( boolean minClosure , BiPredicate < Type , Type > shouldSkip ) { } }
return Collector . of ( ( ) -> new ClosureHolder ( minClosure , shouldSkip ) , ClosureHolder :: add , ClosureHolder :: merge , ClosureHolder :: closure ) ;
public class AnnotationTypeBuilder { /** * Build the annotation type required member documentation . * @ param node the XML element that specifies which components to document * @ param memberDetailsTree the content tree to which the documentation will be added * @ throws DocletException if there is a problem bui...
configuration . getBuilderFactory ( ) . getAnnotationTypeRequiredMemberBuilder ( writer ) . buildChildren ( node , memberDetailsTree ) ;
public class Matrix { /** * Sets all elements of the specified row of this matrix to given { @ code value } . * @ param i the row index * @ param value the element ' s new value */ public void setRow ( int i , double value ) { } }
VectorIterator it = iteratorOfRow ( i ) ; while ( it . hasNext ( ) ) { it . next ( ) ; it . set ( value ) ; }
public class BranchLinkData { /** * < p > [ Optional ] You can set the duration manually . This is the time that * Branch allows a click to remain outstanding and be eligible to be matched * with a new app session . < / p > * @ param duration An { @ link Integer } value in seconds . * @ throws JSONException The...
if ( duration > 0 ) { this . duration = duration ; this . put ( Defines . LinkParam . Duration . getKey ( ) , duration ) ; }
public class DatabaseAccountsInner { /** * Creates or updates an Azure Cosmos DB database account . * @ param resourceGroupName Name of an Azure resource group . * @ param accountName Cosmos DB database account name . * @ param createUpdateParameters The parameters to provide for the current database account . ...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , accountName , createUpdateParameters ) . map ( new Func1 < ServiceResponse < DatabaseAccountInner > , DatabaseAccountInner > ( ) { @ Override public DatabaseAccountInner call ( ServiceResponse < DatabaseAccountInner > response ) { return response . bod...
public class RolloutHelper { /** * Verifies that the Rollout is in the required status . * @ param rollout * the Rollout * @ param status * the Status */ public static void verifyRolloutInStatus ( final Rollout rollout , final Rollout . RolloutStatus status ) { } }
if ( ! rollout . getStatus ( ) . equals ( status ) ) { throw new RolloutIllegalStateException ( "Rollout is not in status " + status . toString ( ) ) ; }
public class PravegaTablesStoreHelper { /** * Method to delete a table . The callers can supply a ` mustBeEmpty ` flag and the table is deleted only if it is empty . * Note : the mustBeEmpty flag is passed to segment store via segment helper and it is responsibility of segment store * table implementation to delete...
log . debug ( "delete table called for table: {}" , tableName ) ; return expectingDataNotFound ( withRetries ( ( ) -> segmentHelper . deleteTableSegment ( tableName , mustBeEmpty , authToken . get ( ) , RequestTag . NON_EXISTENT_ID ) , ( ) -> String . format ( "delete table: %s" , tableName ) ) , null ) . thenAcceptAsy...
public class ExclusionPreviewMarshaller { /** * Marshall the given parameter object . */ public void marshall ( ExclusionPreview exclusionPreview , ProtocolMarshaller protocolMarshaller ) { } }
if ( exclusionPreview == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( exclusionPreview . getTitle ( ) , TITLE_BINDING ) ; protocolMarshaller . marshall ( exclusionPreview . getDescription ( ) , DESCRIPTION_BINDING ) ; protocolMarshaller ....
public class MaxiCode { /** * Moves everything up so that the specified shift or latch character can be inserted . * @ param position the position beyond which everything needs to be shifted * @ param c the latch or shift character to insert at the specified position , after everything has been shifted */ private v...
for ( int i = 143 ; i > position ; i -- ) { set [ i ] = set [ i - 1 ] ; character [ i ] = character [ i - 1 ] ; } character [ position ] = c ;
public class ResultErrorHandler { /** * 数据错误检查 * @ param result 返回数据 * @ return boolean */ private boolean isError ( Object result ) { } }
if ( result != null ) { if ( result instanceof BaseResult ) { BaseResult baseResult = ( BaseResult ) result ; return ! baseResult . isSuccess ( ) ; } else if ( result instanceof MchBase ) { MchBase mchBase = ( MchBase ) result ; if ( "FAIL" . equalsIgnoreCase ( mchBase . getReturn_code ( ) ) || "FAIL" . equalsIgnoreCas...
public class RetryInterceptorBuilder { /** * Apply the back off policy . Cannot be used if a custom retry operations , or back off * policy has been applied . * @ param policy The policy . * @ return this . */ public RetryInterceptorBuilder < T > backOffPolicy ( BackOffPolicy policy ) { } }
Assert . isNull ( this . retryOperations , "cannot set the back off policy when a custom retryOperations has been set" ) ; Assert . isTrue ( ! this . backOffOptionsSet , "cannot set the back off policy when the back off policy options have been set" ) ; this . retryTemplate . setBackOffPolicy ( policy ) ; this . templa...
public class IPConfig { /** * Creates the property adapter to be used , depending on the supplied user * < code > options < / code > . * There are two types of property adapters . One uses KNXnet / IP local device * management to access KNX properties in an interface object , the other type uses * remote proper...
// create local and remote socket address for use in adapter final InetSocketAddress local = createLocalSocket ( ( InetAddress ) options . get ( "localhost" ) , ( Integer ) options . get ( "localport" ) ) ; final InetSocketAddress host = new InetSocketAddress ( ( InetAddress ) options . get ( "host" ) , ( ( Integer ) o...
public class DateFormatPool { /** * Retrieve a date format from the pool of free resources . * @ param format The date format to apply to the resource returned * @ return The next available date format from the pool of free resources */ public SimpleDateFormat getFormat ( String format ) { } }
SimpleDateFormat f = ( SimpleDateFormat ) get ( ) ; f . applyPattern ( format ) ; return f ;
public class CompositeComponentELUtils { /** * Tests if cc . attrs is used as a method expression in an expression String . This means * cc . attrs must occur , must stand before a ' ( ' , because otherwise it would be a method parameter * ( EL 2.2 ) , and there must be no ' . ' after cc . attrs unless there is a l...
if ( expression . contains ( CC_ATTRS ) ) { return CC_ATTRS_METHOD_EXPRESSION_REGEX . matcher ( expression ) . matches ( ) ; } else { return false ; }
public class DefaultRouteBuilder { /** * Build a route . * @ param httpMethod The HTTP method * @ param uri The URI * @ param type The type * @ param method The method * @ param parameterTypes Parameters * @ return an { @ link UriRoute } */ protected UriRoute buildRoute ( HttpMethod httpMethod , String uri ...
Optional < ? extends MethodExecutionHandle < ? , Object > > executionHandle = executionHandleLocator . findExecutionHandle ( type , method , parameterTypes ) ; MethodExecutionHandle < ? , Object > executableHandle = executionHandle . orElseThrow ( ( ) -> new RoutingException ( "No such route: " + type . getName ( ) + "...
public class AgentVersionMarshaller { /** * Marshall the given parameter object . */ public void marshall ( AgentVersion agentVersion , ProtocolMarshaller protocolMarshaller ) { } }
if ( agentVersion == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( agentVersion . getVersion ( ) , VERSION_BINDING ) ; protocolMarshaller . marshall ( agentVersion . getConfigurationManager ( ) , CONFIGURATIONMANAGER_BINDING ) ; } catch ( ...
public class GeometryUtilities { /** * Get the intersection coordinate between a line and plane . * < p > The line is defined by 2 3d coordinates and the plane by 3 3d coordinates . < / p > * < p > from http : / / paulbourke . net / geometry / pointlineplane / < / p > * @ param lC1 line coordinate 1. * @ param ...
double [ ] p = getPlaneCoefficientsFrom3Points ( pC1 , pC2 , pC3 ) ; double denominator = p [ 0 ] * ( lC1 . x - lC2 . x ) + p [ 1 ] * ( lC1 . y - lC2 . y ) + p [ 2 ] * ( lC1 . z - lC2 . z ) ; if ( denominator == 0.0 ) { return null ; } double u = ( p [ 0 ] * lC1 . x + p [ 1 ] * lC1 . y + p [ 2 ] * lC1 . z + p [ 3 ] ) /...
public class SFSession { /** * Returns true If authenticator is EXTERNALBROWSER . * @ return true if authenticator type is EXTERNALBROWSER */ boolean isExternalbrowserAuthenticator ( ) { } }
String authenticator = ( String ) connectionPropertiesMap . get ( SFSessionProperty . AUTHENTICATOR ) ; return ClientAuthnDTO . AuthenticatorType . EXTERNALBROWSER . name ( ) . equalsIgnoreCase ( authenticator ) ;
public class ViewGroupMixIn { /** * Gets a view by the specified name . * The method iterates through { @ link ViewGroup } s if required . * @ param name Name of the view * @ return View instance or { @ code null } if it is missing */ @ CheckForNull public View getView ( @ CheckForNull String name ) { } }
if ( name == null ) { return null ; } // Top level views returned first if match List < View > views = views ( ) ; for ( View v : views ) { if ( v . getViewName ( ) . equals ( name ) ) { return v ; } } for ( View v : views ) { // getAllViews ( ) cannot be used as it filters jobs by permission which is bad e . g . when ...
public class WarUtils { /** * Adds a context parameter to a web . xml file to override where the shiro config location is to be loaded from . * The location loaded from will be represented by the " com . meltmedia . cadmium . contentRoot " system property . * @ param doc The xml DOM document to create the new xml e...
Element ctxParam = doc . createElement ( "context-param" ) ; Element paramName = doc . createElement ( "param-name" ) ; paramName . appendChild ( doc . createTextNode ( "shiroConfigLocations" ) ) ; ctxParam . appendChild ( paramName ) ; Element paramValue = doc . createElement ( "param-value" ) ; paramValue . appendChi...
public class ZooKeeper { /** * Set the ACL for the node of the given path if such a node exists and the * given version matches the version of the node . Return the stat of the * node . * A KeeperException with error code KeeperException . NoNode will be thrown * if no node with the given path exists . * A Ke...
verbotenThreadCheck ( ) ; final String clientPath = path ; PathUtils . validatePath ( clientPath ) ; final String serverPath = prependChroot ( clientPath ) ; RequestHeader h = new RequestHeader ( ) ; h . setType ( ZooDefs . OpCode . setACL ) ; SetACLRequest request = new SetACLRequest ( ) ; request . setPath ( serverPa...
public class StpConnection { /** * Switches the wait state and wakes up the selector to process . */ public void close ( ) { } }
if ( socketChannel == null ) { return ; } monitor . remove ( socketChannel ) ; try { socketChannel . close ( ) ; } catch ( IOException ignored ) { /* nothing to be done */ } finally { socketChannel = null ; }
public class WeatherTileSkin { /** * * * * * * Initialization * * * * * */ @ Override protected void initGraphics ( ) { } }
super . initGraphics ( ) ; darkSky = tile . getDarkSky ( ) ; titleText = new Text ( tile . getTitle ( ) ) ; titleText . setFill ( tile . getTitleColor ( ) ) ; Helper . enableNode ( titleText , ! tile . getTitle ( ) . isEmpty ( ) ) ; valueText = new Text ( ) ; unitText = new Text ( darkSky . getUnit ( ) . temperatureUni...
public class DOInfoReader { /** * 获得所有有 @ Column注解的列 , 包括继承的父类中的 , 顺序父类先 * @ param clazz * @ throws NoColumnAnnotationException 当没有一个 @ Column注解时抛出 * @ return 不会返回null */ public static List < Field > getColumns ( Class < ? > clazz ) throws NoColumnAnnotationException { } }
if ( clazz == null ) { throw new NoColumnAnnotationException ( "class is null" ) ; } List < Field > result = _getAnnotationColumns ( clazz , Column . class ) ; if ( result . isEmpty ( ) ) { throw new NoColumnAnnotationException ( "class " + clazz . getName ( ) + " does not have any @Column fields" ) ; } return result ;
public class vpnintranetapplication { /** * Use this API to fetch all the vpnintranetapplication resources that are configured on netscaler . */ public static vpnintranetapplication [ ] get ( nitro_service service ) throws Exception { } }
vpnintranetapplication obj = new vpnintranetapplication ( ) ; vpnintranetapplication [ ] response = ( vpnintranetapplication [ ] ) obj . get_resources ( service ) ; return response ;
public class DiagnosticsInner { /** * Get Diagnostics Categories . * Get Diagnostics Categories . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param siteName Site Name * @ param slot Slot Name * @ param serviceCallback the async ServiceCallback to handle successfu...
return AzureServiceFuture . fromPageResponse ( listSiteDiagnosticCategoriesSlotSinglePageAsync ( resourceGroupName , siteName , slot ) , new Func1 < String , Observable < ServiceResponse < Page < DiagnosticCategoryInner > > > > ( ) { @ Override public Observable < ServiceResponse < Page < DiagnosticCategoryInner > > > ...
public class NbtAddress { /** * Retrieve all addresses of a host by it ' s address . NetBIOS hosts can * have many names for a given IP address . The name and IP address make the * NetBIOS address . This provides a way to retrieve the other names for a * host with the same IP address . * @ param addr the addres...
try { NbtAddress [ ] addrs = CLIENT . getNodeStatus ( addr ) ; cacheAddressArray ( addrs ) ; return addrs ; } catch ( UnknownHostException uhe ) { throw new UnknownHostException ( "no name with type 0x" + Hexdump . toHexString ( addr . hostName . hexCode , 2 ) + ( ( ( addr . hostName . scope == null ) || ( addr . hostN...
public class Router { /** * VIEW QUERIES : * */ private View compileView ( String viewName , Map < String , Object > viewProps ) { } }
String language = ( String ) viewProps . get ( "language" ) ; if ( language == null ) { language = "javascript" ; } String mapSource = ( String ) viewProps . get ( "map" ) ; if ( mapSource == null ) { return null ; } Mapper mapBlock = View . getCompiler ( ) . compileMap ( mapSource , language ) ; if ( mapBlock == null ...
public class XBlockExpressionImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case XbasePackage . XBLOCK_EXPRESSION__EXPRESSIONS : return getExpressions ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class HttpTracingFactory { /** * The { @ link HttpServerHandler } bean . * @ param httpTracing The { @ link HttpTracing } bean * @ return The { @ link HttpServerHandler } bean */ @ Singleton HttpServerHandler < HttpRequest < ? > , HttpResponse < ? > > httpServerHandler ( HttpTracing httpTracing ) { } }
return HttpServerHandler . create ( httpTracing , new HttpServerAdapter < HttpRequest < ? > , HttpResponse < ? > > ( ) { @ Override public String method ( HttpRequest < ? > request ) { return request . getMethod ( ) . name ( ) ; } @ Override public String url ( HttpRequest < ? > request ) { return request . getUri ( ) ...
public class SARLValidator { /** * Artifact keyword is reserved . * @ param artifact the artifact to check . */ @ Check public void checkArtifactUse ( SarlArtifact artifact ) { } }
error ( MessageFormat . format ( Messages . SARLValidator_0 , this . grammarAccess . getSpaceKeyword ( ) ) , artifact , null ) ;
public class SessionLogEntryRepository { /** * region > findRecentByUser */ @ Programmatic public List < SessionLogEntry > findRecentByUser ( final String user ) { } }
return repositoryService . allMatches ( new QueryDefault < > ( SessionLogEntry . class , "findRecentByUser" , "user" , user ) ) ;
public class Strman { /** * Removes trailing whitespace from string . * @ param input The string to trim . * @ return Returns the trimmed string . */ public static Optional < String > trimEnd ( final String input ) { } }
return Optional . ofNullable ( input ) . filter ( v -> ! v . isEmpty ( ) ) . map ( Strman :: rightTrim ) ;
public class CreateTapesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( CreateTapesRequest createTapesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( createTapesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createTapesRequest . getGatewayARN ( ) , GATEWAYARN_BINDING ) ; protocolMarshaller . marshall ( createTapesRequest . getTapeSizeInBytes ( ) , TAPESIZEINBYTES_BINDING ...
public class Content { /** * A map of image names to { “ url ” : < url > } image maps . * Use the name “ full ” to denote the full - sized image , and “ thumb ” to denote * the thumbnail - sized image . Other image names are not reserved . * Or use setFullImage and setThumbImage to set them separately . */ public...
this . images = images ; return this ;
public class DefaultFileStreamFactory { /** * { @ inheritDoc } */ @ Override public FileOutputStream createOutputStream ( File file , boolean append ) throws FileNotFoundException { } }
return new FileOutputStream ( file , append ) ;
public class CompletableFutures { /** * Combine an CompletableFuture with the provided Publisher ( selecting one element if present ) using the supplied BiFunction * < pre > * { @ code * CompletableFutures . zip ( Flux . just ( 10 ) , CompletableFuture . completedResult ( 10 ) , this : : add ) * / / Completable...
return narrow ( Future . of ( f ) . zip ( fn , p ) . getFuture ( ) ) ;
public class ClassLoaderFiles { /** * Add all elements items from the specified { @ link ClassLoaderFiles } to this * instance . * @ param files the files to add */ public void addAll ( ClassLoaderFiles files ) { } }
Assert . notNull ( files , "Files must not be null" ) ; for ( SourceFolder folder : files . getSourceFolders ( ) ) { for ( Map . Entry < String , ClassLoaderFile > entry : folder . getFilesEntrySet ( ) ) { addFile ( folder . getName ( ) , entry . getKey ( ) , entry . getValue ( ) ) ; } }
public class FirewallRulesInner { /** * Lists the Data Lake Store firewall rules within the specified Data Lake Store account . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the obse...
return listByAccountNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < FirewallRuleInner > > , Page < FirewallRuleInner > > ( ) { @ Override public Page < FirewallRuleInner > call ( ServiceResponse < Page < FirewallRuleInner > > response ) { return response . body ( ) ; } } ) ;
public class SagaLibModule { /** * { @ inheritDoc } */ @ Override protected void configure ( ) { } }
bindIfNotNull ( StateStorage . class , stateStorage , Scopes . SINGLETON ) ; bindIfNotNull ( TimeoutManager . class , timeoutManager , Scopes . SINGLETON ) ; bindIfNotNull ( TypeScanner . class , scanner , Scopes . SINGLETON ) ; bindIfNotNull ( SagaProviderFactory . class , providerFactory , Scopes . SINGLETON ) ; bind...
public class ObjectWritableCodec { /** * Encodes Hadoop Writable object into a byte array . * @ param writable the object to encode . * @ return serialized object as byte array . * @ throws RemoteRuntimeException if serialization fails . */ @ Override public byte [ ] encode ( final T writable ) { } }
try ( final ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; final DataOutputStream dos = new DataOutputStream ( bos ) ) { writable . write ( dos ) ; return bos . toByteArray ( ) ; } catch ( final IOException ex ) { LOG . log ( Level . SEVERE , "Cannot encode object " + writable , ex ) ; throw new RemoteRunt...
public class FieldData { /** * Add this key area description to the Record . */ public KeyArea setupKey ( int iKeyArea ) { } }
KeyArea keyArea = null ; if ( iKeyArea == 0 ) { keyArea = this . makeIndex ( DBConstants . UNIQUE , ID_KEY ) ; keyArea . addKeyField ( ID , DBConstants . ASCENDING ) ; } if ( iKeyArea == 1 ) { keyArea = this . makeIndex ( DBConstants . NOT_UNIQUE , FIELD_FILE_NAME_KEY ) ; keyArea . addKeyField ( FIELD_FILE_NAME , DBCon...
public class OnOffPropertyCoder { /** * @ see PropertyCoder # encodeProperty */ void encodeProperty ( ByteArrayOutputStream baos , Object value ) throws JMSException { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "encodeProperty" , new Object [ ] { baos , value } ) ; if ( value . equals ( ApiJmsConstants . ON ) ) { super . encodeProperty ( baos , SHORT_ON ) ; } else { super . encodeProperty ( baos , SHORT_OFF ) ; } if ( TraceC...
public class Point { /** * Returns XYZ coordinates of the point . Z will be set to 0 if Z is missing . */ public Point3D getXYZ ( ) { } }
if ( isEmptyImpl ( ) ) throw new GeometryException ( "This operation should not be performed on an empty geometry." ) ; Point3D pt = new Point3D ( ) ; pt . x = m_attributes [ 0 ] ; pt . y = m_attributes [ 1 ] ; if ( m_description . hasZ ( ) ) pt . z = m_attributes [ 2 ] ; else pt . z = VertexDescription . getDefaultVal...
public class CmsAfterPublishStaticExportHandler { /** * Does the actual static export . < p > * @ param resources a list of CmsPublishedREsources to start the static export with * @ param report an < code > { @ link I _ CmsReport } < / code > instance to print output message , or < code > null < / code > to write m...
boolean templatesFound ; // export must be done in the context of the export user // this will always use the root site CmsObject cmsExportObject = OpenCms . initCmsObject ( OpenCms . getDefaultUsers ( ) . getUserExport ( ) ) ; List < CmsPublishedResource > resourcesToExport = getRelatedResources ( cmsExportObject , re...
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcControl ( ) { } }
if ( ifcControlEClass == null ) { ifcControlEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 116 ) ; } return ifcControlEClass ;
public class UpdateBuilder { /** * Updates the fields in the document referred to by this DocumentReference . If the document * doesn ' t exist yet , the update will fail . * @ param documentReference The DocumentReference to update . * @ param options Preconditions to enforce on this update . * @ param field T...
Preconditions . checkArgument ( ! options . hasExists ( ) , "Precondition 'exists' cannot be specified for update() calls." ) ; return performUpdate ( documentReference , options , FieldPath . fromDotSeparatedString ( field ) , value , moreFieldsAndValues ) ;
public class EditsLoaderCurrent { /** * Visit OP _ RENAME */ private void visit_OP_RENAME ( ) throws IOException { } }
visitTxId ( ) ; if ( ! LayoutVersion . supports ( Feature . EDITLOG_OP_OPTIMIZATION , editsVersion ) ) { v . visitInt ( EditsElement . LENGTH ) ; } v . visitStringUTF8 ( EditsElement . SOURCE ) ; v . visitStringUTF8 ( EditsElement . DESTINATION ) ; if ( LayoutVersion . supports ( Feature . EDITLOG_OP_OPTIMIZATION , edi...
public class dnsmxrec { /** * Use this API to update dnsmxrec . */ public static base_response update ( nitro_service client , dnsmxrec resource ) throws Exception { } }
dnsmxrec updateresource = new dnsmxrec ( ) ; updateresource . domain = resource . domain ; updateresource . mx = resource . mx ; updateresource . pref = resource . pref ; updateresource . ttl = resource . ttl ; return updateresource . update_resource ( client ) ;
public class Pitch { /** * Function enc _ lag3 ( ) * * Encoding of fractional pitch lag with 1/3 resolution . * * The pitch range for the first subframe is divided as follows : * * 19 1/3 to 84 2/3 resolution 1/3 * * 85 to 143 resolution 1 * * The period in the first subframe is encoded with 8 bits . * * Fo...
int index ; if ( pit_flag == 0 ) /* if 1st subframe */ { /* encode pitch delay ( with fraction ) */ if ( T0 <= 85 ) index = T0 * 3 - 58 + T0_frac ; else index = T0 + 112 ; /* find T0 _ min and T0 _ max for second subframe */ T0_min . value = T0 - 5 ; if ( T0_min . value < pit_min ) T0_min . value = pit_min ; T0_max . v...
public class AutoDisposeEndConsumerHelper { /** * Atomically updates the target upstream AtomicReference from null to the non - null * next Disposable , otherwise disposes next and reports a ProtocolViolationException * if the AtomicReference doesn ' t contain the shared disposed indicator . * @ param upstream th...
AutoDisposeUtil . checkNotNull ( next , "next is null" ) ; if ( ! upstream . compareAndSet ( null , next ) ) { next . dispose ( ) ; if ( upstream . get ( ) != AutoDisposableHelper . DISPOSED ) { reportDoubleSubscription ( observer ) ; } return false ; } return true ;
public class DoubleClickInteraction { /** * ( non - Javadoc ) * @ see com . vilt . minium . actions . DefaultInteraction # doPerform ( ) */ @ Override protected void doPerform ( ) { } }
if ( isSourceDocumentRoot ( ) ) { getActions ( ) . doubleClick ( ) . perform ( ) ; } else { getActions ( ) . doubleClick ( getFirstElement ( ) ) . perform ( ) ; }
public class CmsFlexResponse { /** * Returns the bytes that have been written on the current writers output stream . < p > * @ return the bytes that have been written on the current writers output stream */ public byte [ ] getWriterBytes ( ) { } }
if ( isSuspended ( ) ) { // No output whatsoever if the response is suspended return new byte [ 0 ] ; } if ( m_cacheBytes != null ) { // Optimization for cached " leaf " nodes , here I re - use the array from the cache return m_cacheBytes ; } if ( m_out == null ) { // No output was written so far , just return an empty...
public class CPDefinitionOptionRelPersistenceImpl { /** * Removes all the cp definition option rels where groupId = & # 63 ; from the database . * @ param groupId the group ID */ @ Override public void removeByGroupId ( long groupId ) { } }
for ( CPDefinitionOptionRel cpDefinitionOptionRel : findByGroupId ( groupId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( cpDefinitionOptionRel ) ; }
public class CmsUrlNameMappingFilter { /** * Checks whether this is a filter which only filters by name . < p > * @ return true if this is a filter which only filters by name */ public boolean isNameFilter ( ) { } }
return ( m_structureId == null ) && ( m_name != null ) && ( m_namePattern == null ) && ( m_states == null ) && ( m_rejectStructureId == null ) && ( m_locale == null ) ;
public class CheckArg { /** * Check that the array contains no more than the supplied number of elements * @ param argument the array * @ param maximumSize the maximum size * @ param name The name of the argument * @ throws IllegalArgumentException If the array has a size smaller than the supplied value */ publ...
isNotNull ( argument , name ) ; if ( argument . length > maximumSize ) { throw new IllegalArgumentException ( CommonI18n . argumentMustBeOfMinimumSize . text ( name , Object [ ] . class . getSimpleName ( ) , argument . length , maximumSize ) ) ; }
public class AbstractAuthorizedOnly { /** * Sets the Commons HttpComponents to accept all SSL Certificates . * @ throws Exception * @ return An instance of HttpClient that will accept all . */ protected static HttpClient httpClient ( ) throws Exception { } }
return HttpClients . custom ( ) . setHostnameVerifier ( new AllowAllHostnameVerifier ( ) ) . setSslcontext ( SSLContexts . custom ( ) . loadTrustMaterial ( null , new TrustStrategy ( ) { @ Override public boolean isTrusted ( X509Certificate [ ] x509Certificates , String s ) throws CertificateException { return true ; }...
public class LDAPClient { /** * sets username password for the connection * @ param username * @ param password */ public void setCredential ( String username , String password ) { } }
if ( username != null ) { env . put ( "java.naming.security.principal" , username ) ; env . put ( "java.naming.security.credentials" , password ) ; } else { env . remove ( "java.naming.security.principal" ) ; env . remove ( "java.naming.security.credentials" ) ; }
public class ExpressionToken { /** * Set a list of values on a { @ link List } . The behavior of this method is different given * the type of < code > value < / code > : < br / > * - value is java . lang . String [ ] : add each item in the String [ ] to the list * - value is a String : add the value to the list ...
if ( list == null ) { String msg = "Can not add a value to a null java.util.List" ; LOGGER . error ( msg ) ; throw new RuntimeException ( msg ) ; } if ( value instanceof String [ ] ) { String [ ] ary = ( String [ ] ) value ; for ( int i = 0 ; i < ary . length ; i ++ ) list . add ( ary [ i ] ) ; } else if ( value instan...
public class CodeBuilder { /** * the cName of the extended template */ protected String extended ( ) { } }
String defClass = TagBase . class . getName ( ) ; return null == extended ? defClass : extended ;
public class DatasetRepositories { /** * Load a { @ link DatasetRepository } for the given dataset , view or repository URI . * URI formats are defined by { @ code Dataset } implementations , but must begin * with " dataset : " or " view : " . * @ param uri a { @ code Dataset } or { @ code View } URI . * @ para...
boolean isRepoUri = URIBuilder . REPO_SCHEME . equals ( uri . getScheme ( ) ) ; Preconditions . checkArgument ( isRepoUri || URIBuilder . DATASET_SCHEME . equals ( uri . getScheme ( ) ) || URIBuilder . VIEW_SCHEME . equals ( uri . getScheme ( ) ) , "Not a repository, dataset, or view URI: " + uri ) ; Pair < DatasetRepo...
public class TrafficForecastAdjustment { /** * Sets the filterCriteria value for this TrafficForecastAdjustment . * @ param filterCriteria * Filter criteria defining the slice of inventory to which the * adjustment is assigned . */ public void setFilterCriteria ( com . google . api . ads . admanager . axis . v20190...
this . filterCriteria = filterCriteria ;
public class ResourceMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Resource resource , ProtocolMarshaller protocolMarshaller ) { } }
if ( resource == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( resource . getId ( ) , ID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
public class Transforms { /** * Element wise minimum function between 2 INDArrays * @ param first * @ param second * @ return */ public static INDArray min ( INDArray first , INDArray second ) { } }
return min ( first , second , true ) ;
public class TypeConversion { /** * Reads a long from the byte array in the Varint format . * @ param bytes - byte buffer to read * @ param offset - the offset within the bytes buffer to start reading * @ return - returns the long value */ public static long varIntBytesToLong ( byte [ ] bytes , int offset ) { } }
int shift = 0 ; long result = 0 ; while ( shift < 64 ) { final byte b = bytes [ offset ++ ] ; result |= ( long ) ( b & 0x7F ) << shift ; if ( ( b & 0x80 ) == 0 ) { return result ; } shift += 7 ; } throw new IllegalStateException ( "Varint representation is invalid or exceeds 64-bit value" ) ;
public class JavaScriptEscape { /** * Perform a ( configurable ) JavaScript < strong > escape < / strong > operation on a < tt > char [ ] < / tt > input . * This method will perform an escape operation according to the specified * { @ link org . unbescape . javascript . JavaScriptEscapeType } and * { @ link org ....
if ( writer == null ) { throw new IllegalArgumentException ( "Argument 'writer' cannot be null" ) ; } if ( type == null ) { throw new IllegalArgumentException ( "The 'type' argument cannot be null" ) ; } if ( level == null ) { throw new IllegalArgumentException ( "The 'level' argument cannot be null" ) ; } final int te...
public class StringUtils { /** * Converts a tab delimited string into an object with given fields * Requires the object has public access for the specified fields * @ param objClass Class of object to be created * @ param str string to convert * @ param delimiterPattern delimiter * @ param fieldNames fieldnam...
String [ ] fields = delimiterPattern . split ( str ) ; T item = ErasureUtils . < T > uncheckedCast ( objClass . newInstance ( ) ) ; for ( int i = 0 ; i < fields . length ; i ++ ) { try { Field field = objClass . getDeclaredField ( fieldNames [ i ] ) ; field . set ( item , fields [ i ] ) ; } catch ( IllegalAccessExcepti...
public class MachineMetricFactory { /** * Returns the set of memory metrics and the corresponding values based on * the default and the customized set of metrics , if any . * @ param customSet * a non - null customized set of metrics * @ param values * a non - null list of values corresponding to the list of ...
return metricValues ( customSet , MachineMetricFactory . memoryMetrics , values ) ;
public class Index { /** * Browse all index content * @ param page Pagination parameter used to select the page to retrieve . * Page is zero - based and defaults to 0 . Thus , to retrieve the 10th page you need to set page = 9 * @ param hitsPerPage Pagination parameter used to select the number of hits per page ....
return client . getRequest ( "/1/indexes/" + encodedIndexName + "/browse?page=" + page + "&hitsPerPage=" + hitsPerPage , false , requestOptions ) ;
public class ScaleFilter { /** * Reads the image from the requested URL , scales it , and returns it in the * Servlet stream . See above for details on parameters . */ protected RenderedImage doFilter ( BufferedImage pImage , ServletRequest pRequest , ImageServletResponse pResponse ) { } }
// Get quality setting // SMOOTH | FAST | REPLICATE | DEFAULT | AREA _ AVERAGING // See Image ( mHints ) int quality = getQuality ( pRequest . getParameter ( PARAM_SCALE_QUALITY ) ) ; // Get units , default is pixels // PIXELS | PERCENT | METRIC | INCHES int units = getUnits ( pRequest . getParameter ( PARAM_SCALE_UNIT...
public class GetObjectProperties { /** * Retrieve contents for a single object based on the property collector * registered with the service . * @ param mor Managed Object Reference to get contents for * @ param properties names of properties of object to retrieve * @ return retrieved object contents */ @ NotNu...
if ( mor == null ) { return new ObjectContent [ 0 ] ; } PropertyFilterSpec spec = new PropertyFilterSpec ( ) ; spec . getPropSet ( ) . add ( new PropertySpec ( ) ) ; if ( ( properties == null || properties . length == 0 ) ) { spec . getPropSet ( ) . get ( 0 ) . setAll ( true ) ; } else { spec . getPropSet ( ) . get ( 0...
public class JobsInner { /** * Terminates a job . * @ 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 ( - ) and underscore ( _ ) . The name...
return ServiceFuture . fromResponse ( beginTerminateWithServiceResponseAsync ( resourceGroupName , workspaceName , experimentName , jobName ) , serviceCallback ) ;
public class GetServiceLastAccessedDetailsResult { /** * A < code > ServiceLastAccessed < / code > object that contains details about the most recent attempt to access the * service . * @ param servicesLastAccessed * A < code > ServiceLastAccessed < / code > object that contains details about the most recent atte...
if ( servicesLastAccessed == null ) { this . servicesLastAccessed = null ; return ; } this . servicesLastAccessed = new com . amazonaws . internal . SdkInternalList < ServiceLastAccessed > ( servicesLastAccessed ) ;
public class ClientInstallationServiceImpl { /** * When an installation is created or updated , the categories are passed without IDs . * This method solve this issue by checking for existing categories and updating them ( otherwise it would * persist a new object ) . * @ param entity to merge the categories for ...
if ( entity . getCategories ( ) != null ) { final List < String > categoryNames = convertToNames ( categoriesToMerge ) ; final List < Category > existingCategoriesFromDB = categoryDao . findByNames ( categoryNames ) ; // Replace json dematerialised categories with their persistent counter parts ( see Category . equals ...
public class DartSuperAccessorsPass { /** * Transforms ` a + = b ` to ` a = a + b ` . */ private static Node normalizeAssignmentOp ( Node n ) { } }
Node lhs = n . getFirstChild ( ) ; Node rhs = n . getLastChild ( ) ; Node newRhs = new Node ( NodeUtil . getOpFromAssignmentOp ( n ) , lhs . cloneTree ( ) , rhs . cloneTree ( ) ) . srcrefTree ( n ) ; return replace ( n , IR . assign ( lhs . cloneTree ( ) , newRhs ) . srcrefTree ( n ) ) ;
public class druidGLexer { /** * $ ANTLR start " BREAK " */ public final void mBREAK ( ) throws RecognitionException { } }
try { int _type = BREAK ; int _channel = DEFAULT_TOKEN_CHANNEL ; // druidG . g : 639:7 : ( ( ' BREAK ' | ' break ' ) ) // druidG . g : 639:9 : ( ' BREAK ' | ' break ' ) { // druidG . g : 639:9 : ( ' BREAK ' | ' break ' ) int alt28 = 2 ; int LA28_0 = input . LA ( 1 ) ; if ( ( LA28_0 == 'B' ) ) { alt28 = 1 ; } else if ( ...
public class ContainerDefinition { /** * The type and amount of a resource to assign to a container . The only supported resource is a GPU . * @ param resourceRequirements * The type and amount of a resource to assign to a container . The only supported resource is a GPU . */ public void setResourceRequirements ( j...
if ( resourceRequirements == null ) { this . resourceRequirements = null ; return ; } this . resourceRequirements = new com . amazonaws . internal . SdkInternalList < ResourceRequirement > ( resourceRequirements ) ;
public class StaticTypeCheckingVisitor { /** * Given a field node , checks if we are accessing or setting a public or protected field from an inner class . */ private String checkOrMarkInnerFieldAccess ( Expression source , FieldNode fn , boolean lhsOfAssignment , String delegationData ) { } }
if ( fn == null || fn . isStatic ( ) ) return delegationData ; ClassNode enclosingClassNode = typeCheckingContext . getEnclosingClassNode ( ) ; ClassNode declaringClass = fn . getDeclaringClass ( ) ; // private handled elsewhere if ( ( fn . isPublic ( ) || fn . isProtected ( ) ) && ( declaringClass != enclosingClassNod...
public class Berkeley { /** * Returns a new { @ link BerkeleyStore } instance , { @ link Environment } with { @ link Berkeley # defaultEnvironmentConfig ( ) * and { @ link EntityStore } with { @ link Berkeley # defaultStoreConfig ( ) } */ public static BerkeleyStore of ( String envHomePath , String storeName ) { } }
return env ( envHomePath ) . connection ( storeName , null ) ;
public class ApnsServiceBuilder { /** * Specify the address of the SOCKS proxy the connection should * use . * < p > Read the < a href = " http : / / java . sun . com / javase / 6 / docs / technotes / guides / net / proxies . html " > * Java Networking and Proxies < / a > guide to understand the * proxies compl...
Proxy proxy = new Proxy ( Proxy . Type . SOCKS , new InetSocketAddress ( host , port ) ) ; return withProxy ( proxy ) ;
public class FileSetMaker { /** * Unbind reference added automatically from addFactory annotation */ public void removeFactory ( FileSetProvider factory ) { } }
if ( logger . isLoggable ( Level . FINER ) ) { logger . finer ( "Removing factory: " + factory ) ; } filters . remove ( factory ) ;
public class SelectBuilder { /** * Left joins this entity to the previous entity given to the builder . * entityClass becomes the current entity . */ public SelectBuilder leftJoin ( Class < ? > entityClass ) { } }
currentTable = rootTable . leftJoin ( entityClass , currentTable . entityClass ) ; return this ;
public class DecimalType { /** * Method to parse a localized String to an BigDecimal . * @ param _ value value to be parsed * @ return BigDecimal * @ throws EFapsException on error */ public static BigDecimal parseLocalized ( final String _value ) throws EFapsException { } }
final DecimalFormat format = ( DecimalFormat ) NumberFormat . getInstance ( Context . getThreadContext ( ) . getLocale ( ) ) ; format . setParseBigDecimal ( true ) ; try { return ( BigDecimal ) format . parse ( _value ) ; } catch ( final ParseException e ) { throw new EFapsException ( DecimalType . class , "ParseExcept...
public class ExternFunctionAnnotationAnalyzer { /** * Return whether { @ code type } is guaranteed to be a that of a " local value " . * < p > For the purposes of purity analysis we really only care whether a return value is * immutable and identity - less ; such values can ' t contribute to side - effects . Theref...
checkNotNull ( typei ) ; JSType nativeObj = compiler . getTypeRegistry ( ) . getNativeType ( JSTypeNative . OBJECT_TYPE ) ; JSType subtype = typei . meetWith ( nativeObj ) ; // If the type includes anything related to a object type , don ' t assume // anything about the locality of the value . return subtype . isEmptyT...
public class CPDefinitionOptionValueRelLocalServiceBaseImpl { /** * Adds the cp definition option value rel to the database . Also notifies the appropriate model listeners . * @ param cpDefinitionOptionValueRel the cp definition option value rel * @ return the cp definition option value rel that was added */ @ Inde...
cpDefinitionOptionValueRel . setNew ( true ) ; return cpDefinitionOptionValueRelPersistence . update ( cpDefinitionOptionValueRel ) ;
public class AutoCompletionCandidates { /** * Auto - completes possible job names . * @ param type * Limit the auto - completion to the subtype of this type . * @ param value * The value the user has typed in . Matched as a prefix . * @ param self * The contextual item for which the auto - completion is pro...
if ( self == container ) container = self . getParent ( ) ; return ofJobNames ( type , value , container ) ;
public class Level { /** * Adds a Child Element to the Level . If the Child Element already has a parent , then it is removed from that parent and * added to this level . * @ param child A Child element to be added to the Level . */ public void appendChild ( final Node child ) { } }
if ( child instanceof Level ) { // Append the level levels . add ( ( Level ) child ) ; nodes . add ( child ) ; if ( child . getParent ( ) != null ) { child . removeParent ( ) ; } child . setParent ( this ) ; } else if ( child instanceof SpecTopic ) { appendSpecTopic ( ( SpecTopic ) child ) ; } else if ( child instanceo...
public class SoftwareTokenMfaConfigTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( SoftwareTokenMfaConfigType softwareTokenMfaConfigType , ProtocolMarshaller protocolMarshaller ) { } }
if ( softwareTokenMfaConfigType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( softwareTokenMfaConfigType . getEnabled ( ) , ENABLED_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON...
public class Precision { /** * Compares two numbers given some amount of allowed error . * Two float numbers are considered equal if there are { @ code ( maxUlps - 1 ) } * ( or fewer ) floating point numbers between them , i . e . two adjacent floating * point numbers are considered equal . * Adapted from < a ...
if ( equals ( x , y , maxUlps ) ) { return 0 ; } else if ( x < y ) { return - 1 ; } return 1 ;
import java . util . * ; class CountOccurrences { /** * A function to calculate how many times a certain number appears in a specified list . * > > > countOccurrences ( [ 1 , 2 , 3 ] , 4) * > > > countOccurrences ( [ 1 , 2 , 2 , 3 , 3 , 3 , 4 ] , 3) * > > > countOccurrences ( [ 0 , 1 , 2 , 3 , 1 , 2 ] , 1) */ pub...
int count = 0 ; for ( int i : lst ) { if ( i == num ) { count ++ ; } } return count ;
public class Bits { /** * Data compare int . * @ param left the left * @ param right the right * @ return the int */ public static int dataCompare ( final Bits left , final Bits right ) { } }
for ( int i = 0 ; i < left . bytes . length ; i ++ ) { if ( right . bytes . length <= i ) { return 1 ; } final int a = left . bytes [ i ] & 0xFF ; final int b = right . bytes [ i ] & 0xFF ; if ( a < b ) { return - 1 ; } if ( a > b ) { return 1 ; } } if ( left . bitLength < right . bitLength ) { return - 1 ; } if ( left...
public class GoogleCloudStorageFileSystem { /** * Indicates whether the given item exists . * @ param path Path of the item to check . * @ return true if the given item exists , false otherwise . * @ throws IOException */ public boolean exists ( URI path ) throws IOException { } }
logger . atFine ( ) . log ( "exists(%s)" , path ) ; return getFileInfo ( path ) . exists ( ) ;
public class ITunesUtils { /** * Constructs and returns a osascript command . */ private static String [ ] createOSAScriptCommand ( final File file ) { } }
final String path = file . getAbsolutePath ( ) ; final String playlist = "LittleShoot" ; final String [ ] command = new String [ ] { "osascript" , "-e" , "tell application \"Finder\"" , "-e" , "set hfsFile to (POSIX file \"" + path + "\")" , "-e" , "set thePlaylist to \"" + playlist + "\"" , "-e" , "tell application \"...
public class TrainableBundle { /** * { @ inheritDoc } */ @ Override public void delete ( ) { } }
for ( Trainable t : bundle . values ( ) ) { if ( t != null ) { t . delete ( ) ; } } bundle . clear ( ) ;
public class DayPickerView { /** * When scroll forward / backward events are received , announce the newly scrolled - to month . */ @ SuppressLint ( "NewApi" ) @ Override public boolean performAccessibilityAction ( int action , Bundle arguments ) { } }
if ( action != AccessibilityNodeInfo . ACTION_SCROLL_FORWARD && action != AccessibilityNodeInfo . ACTION_SCROLL_BACKWARD ) { return super . performAccessibilityAction ( action , arguments ) ; } // Figure out what month is showing . int firstVisiblePosition = getFirstVisiblePosition ( ) ; int month = firstVisiblePositio...