signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SundialJobScheduler { /** * Triggers a Job interrupt on all Jobs matching the given Job Name . The Job termination mechanism * works by setting a flag that the Job should be terminated , but it is up to the logic in the Job * to decide at what point termination should occur . Therefore , in any long - ...
try { List < JobExecutionContext > currentlyExecutingJobs = getScheduler ( ) . getCurrentlyExecutingJobs ( ) ; for ( JobExecutionContext jobExecutionContext : currentlyExecutingJobs ) { String currentlyExecutingJobName = jobExecutionContext . getJobDetail ( ) . getName ( ) ; if ( currentlyExecutingJobName . equals ( jo...
public class PublicIPAddressesInner { /** * Gets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail th...
ServiceResponse < Page < PublicIPAddressInner > > response = listVirtualMachineScaleSetVMPublicIPAddressesNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) ; return new PagedList < PublicIPAddressInner > ( response . body ( ) ) { @ Override public Page < PublicIPAddressInner > nextPage ( String nextPag...
public class SocketChannelWrapperBar { /** * Closes the write half of the stream . */ @ Override public void closeWrite ( ) throws IOException { } }
if ( _isWriteClosed ) { return ; } _isWriteClosed = true ; StreamImpl stream = _streamImpl ; if ( stream != null ) { stream . closeWrite ( ) ; } else if ( _sslSocket != null ) { _sslSocket . getOutputStream ( ) . close ( ) ; } else if ( _channel != null ) { try { _channel . shutdownOutput ( ) ; } catch ( UnsupportedOpe...
public class RolloutSpecification { /** * { @ link Specification } for retrieving { @ link Rollout } s by its DELETED * attribute . Includes fetch for stuff that is required for { @ link Rollout } * queries . * @ param isDeleted * TRUE / FALSE are compared to the attribute DELETED . If NULL the * attribute is...
return ( root , query , cb ) -> { final Predicate predicate = cb . equal ( root . < Boolean > get ( JpaRollout_ . deleted ) , isDeleted ) ; root . fetch ( JpaRollout_ . distributionSet ) ; return predicate ; } ;
public class AdaptedAction { /** * ( non - Javadoc ) * @ see com . sporniket . libre . ui . action . UserInterfaceAction # setLabelDescription ( java . lang . String ) */ @ Override public void setLabelDescription ( String labelDescription ) { } }
myUserInterfaceAction . setLabelDescription ( labelDescription ) ; putValue ( Action . SHORT_DESCRIPTION , myMessageProvider . getMessage ( getLabelDescription ( ) , getLocale ( ) ) ) ;
public class ReconciliationLineItemReport { /** * Sets the grossRate value for this ReconciliationLineItemReport . * @ param grossRate * If this reconciliation data is for a { @ link ProposalLineItem } * and the { @ link # pricingModel } * is { @ link PricingModel # GROSS } , then this contains * the { @ link M...
this . grossRate = grossRate ;
public class LayerImpl { /** * Generates a cache key for the layer . * @ param request * the request object * @ param cacheKeyGenerators * map of cache key generator class names to instance objects * @ return the cache key * @ throws IOException */ protected String generateCacheKey ( HttpServletRequest requ...
String cacheKey = null ; if ( cacheKeyGenerators != null ) { // First , decompose any composite cache key generators into their // constituent cache key generators so that we can combine them // more effectively . Use TreeMap to get predictable ordering of // keys . Map < String , ICacheKeyGenerator > gens = new TreeMa...
public class InterpretedEntryImpl { /** * { @ inheritDoc } */ @ Override public String getPath ( ) { } }
if ( structureHelperLocalRootDelegate != null ) { String originalNodePath = super . getPath ( ) ; return originalNodePath . substring ( structureHelperLocalRootDelegate . getPath ( ) . length ( ) ) ; } else { return super . getPath ( ) ; }
public class MavenUtils { /** * Utility method for creating an artifact version resolver that will get the version out of * maven project . * @ return version resolver */ public static MavenArtifactUrlReference . VersionResolver asInProject ( ) { } }
return new MavenArtifactUrlReference . VersionResolver ( ) { @ Override public String getVersion ( final String groupId , final String artifactId ) { return getArtifactVersion ( groupId , artifactId ) ; } } ;
public class CodeableConcept { /** * syntactic sugar */ public Coding addCoding ( ) { } }
Coding t = new Coding ( ) ; if ( this . coding == null ) this . coding = new ArrayList < Coding > ( ) ; this . coding . add ( t ) ; return t ;
public class AbstractCSLToolCommand { /** * Outputs an error message * @ param msg the message */ protected void error ( String msg ) { } }
System . err . println ( CSLToolContext . current ( ) . getToolName ( ) + ": " + msg ) ;
public class BusinessProcess { /** * Returns the { @ link ProcessInstance } currently associated or ' null ' * @ throws ProcessEngineCdiException * if no { @ link Execution } is associated . Use * { @ link # isAssociated ( ) } to check whether an association exists . */ public ProcessInstance getProcessInstance (...
Execution execution = getExecution ( ) ; if ( execution != null && ! ( execution . getProcessInstanceId ( ) . equals ( execution . getId ( ) ) ) ) { return processEngine . getRuntimeService ( ) . createProcessInstanceQuery ( ) . processInstanceId ( execution . getProcessInstanceId ( ) ) . singleResult ( ) ; } return ( ...
public class EvaluationResultMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EvaluationResult evaluationResult , ProtocolMarshaller protocolMarshaller ) { } }
if ( evaluationResult == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( evaluationResult . getComplianceStatus ( ) , COMPLIANCESTATUS_BINDING ) ; protocolMarshaller . marshall ( evaluationResult . getViolatorCount ( ) , VIOLATORCOUNT_BINDIN...
public class PojoDescriptorBuilderImpl { /** * Makes all { @ link AccessibleObject } s in the given { @ link List } { @ link AccessibleObject # setAccessible ( boolean ) * accessible } . * @ param nonPublicAccessibleObjects is the { @ link List } where the non - public { @ link AccessibleObject } s have been * co...
if ( nonPublicAccessibleObjects . size ( ) > 0 ) { final AccessibleObject [ ] nonPublicAccessibles = new AccessibleObject [ nonPublicAccessibleObjects . size ( ) ] ; nonPublicAccessibleObjects . toArray ( nonPublicAccessibles ) ; // enable reflective access that violates visibility - this will // fail if disallowed by ...
public class InputStreamConfigurationProducer { /** * Returns an input stream , the first one found , for a given { @ link Configuration } * @ param injectionPoint * @ return */ @ Produces @ Configuration public InputStream getInputStream ( InjectionPoint injectionPoint ) { } }
// get configuration instance ConfigurationWrapper wrapper = this . getConfigurationWrapper ( injectionPoint ) ; // get input streams List < ISource > sources = this . locate ( wrapper ) ; // return first available source for ( ISource source : sources ) { if ( source . available ( ) ) { return source . stream ( ) ; } ...
public class ForeignHost { /** * Deliver a deserialized message from the network to a local mailbox */ private void deliverMessage ( long destinationHSId , VoltMessage message ) { } }
if ( ! m_hostMessenger . validateForeignHostId ( m_hostId ) ) { hostLog . warn ( String . format ( "Message (%s) sent to site id: %s @ (%s) at %d from %s " + "which is a known failed host. The message will be dropped\n" , message . getClass ( ) . getSimpleName ( ) , CoreUtils . hsIdToString ( destinationHSId ) , m_sock...
public class ExternalContextUtils { /** * Returns the request input stream if one is available * @ param ec the current external context * @ return the request ' s input stream * @ throws IOException if there was a problem getting the input stream */ public static InputStream getRequestInputStream ( ExternalConte...
RequestType type = getRequestType ( ec ) ; if ( type . isRequestFromClient ( ) ) { Object req = ec . getRequest ( ) ; if ( type . isPortlet ( ) ) { return ( InputStream ) _runMethod ( req , "getPortletInputStream" ) ; } else { return ( ( ServletRequest ) ec . getRequest ( ) ) . getInputStream ( ) ; } } return null ;
public class UnixResolverDnsServerAddressStreamProvider { /** * Parse a file of the format < a href = " https : / / linux . die . net / man / 5 / resolver " > / etc / resolv . conf < / a > and return the * list of search domains found in it or an empty list if not found . * @ param etcResolvConf a file of the forma...
String localDomain = null ; List < String > searchDomains = new ArrayList < String > ( ) ; FileReader fr = new FileReader ( etcResolvConf ) ; BufferedReader br = null ; try { br = new BufferedReader ( fr ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { if ( localDomain == null && line . startsWith ( D...
public class LogAnalyticsInner { /** * Export logs that show Api requests made by this subscription in the given time window to show throttling activities . * @ param location The location upon which virtual - machine - sizes is queried . * @ param parameters Parameters supplied to the LogAnalytics getRequestRateBy...
return ServiceFuture . fromResponse ( beginExportRequestRateByIntervalWithServiceResponseAsync ( location , parameters ) , serviceCallback ) ;
public class ReflectingConverter { /** * / * ( non - Javadoc ) * @ see com . google . code . siren4j . converter . ResourceConverter # toEntity ( java . lang . Object ) */ public Entity toEntity ( Object obj ) { } }
try { return toEntity ( obj , null , null , null ) ; } catch ( Siren4JException e ) { throw new Siren4JConversionException ( e ) ; }
public class Criteria { /** * Creates new { @ link Predicate } for { @ code ! circle } for a specified distance . The difference between this and * { @ link # within ( Circle ) } is this is approximate while { @ code within } is exact . * @ param circle * @ return * @ since 1.2 */ public Criteria near ( Circle ...
Assert . notNull ( circle , "Circle for 'near' must not be 'null'." ) ; return near ( circle . getCenter ( ) , circle . getRadius ( ) ) ;
public class SARLJvmModelInferrer { /** * Create an annotation with classes as values . * @ param type the type of the annotation . * @ param values the values . * @ return the reference to the JVM annotation . */ private JvmAnnotationReference annotationClassRef ( Class < ? extends Annotation > type , List < ? e...
try { final JvmAnnotationReference annot = this . _annotationTypesBuilder . annotationRef ( type ) ; final JvmTypeAnnotationValue annotationValue = this . services . getTypesFactory ( ) . createJvmTypeAnnotationValue ( ) ; for ( final JvmTypeReference value : values ) { annotationValue . getValues ( ) . add ( this . ty...
public class AbstractJcrNode { /** * Sets a multi valued property , skipping over protected ones . * @ param name the name of the property ; may not be null * @ param values the values of the property ; may not be null * @ param jcrPropertyType the expected property type ; may be { @ link PropertyType # UNDEFINED...
return setProperty ( name , values , jcrPropertyType , false , skipReferenceValidation , false , false ) ;
public class W1Master { /** * Get a list of devices that implement a certain interface . * @ param type * @ param < T > * @ return */ @ SuppressWarnings ( "unchecked" ) public < T > List < T > getDevices ( final Class < T > type ) { } }
final List < W1Device > allDevices = getDevices ( ) ; final List < T > filteredDevices = new ArrayList < > ( ) ; for ( final W1Device device : allDevices ) { if ( type . isAssignableFrom ( device . getClass ( ) ) ) { filteredDevices . add ( ( T ) device ) ; } } return filteredDevices ;
public class ApptentiveNotificationCenter { /** * Adds an entry to the receiver ’ s dispatch table with an observer . * @ param useWeakReference - weak reference is used if < code > true < / code > */ public synchronized void addObserver ( String notification , ApptentiveNotificationObserver observer , boolean useWea...
final ApptentiveNotificationObserverList list = resolveObserverList ( notification ) ; list . addObserver ( observer , useWeakReference ) ;
public class DirectoryRestore { /** * { @ inheritDoc } */ public void restore ( ) throws BackupException { } }
try { SecurityHelper . doPrivilegedIOExceptionAction ( new PrivilegedExceptionAction < Void > ( ) { public Void run ( ) throws IOException { for ( int i = 0 ; i < zipFiles . size ( ) ; i ++ ) { File zipFile = zipFiles . get ( i ) ; File dataDir = dataDirs . get ( i ) ; if ( zipFile . isDirectory ( ) ) { DirectoryHelper...
public class MessageMapTable { /** * Get an element from the table */ public MessageMap getMap ( BigInteger index ) { } }
if ( array != null ) return array [ index . intValue ( ) ] ; else return ( MessageMap ) hashtable . get ( index ) ;
public class DeleteVaultRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteVaultRequest deleteVaultRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteVaultRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteVaultRequest . getAccountId ( ) , ACCOUNTID_BINDING ) ; protocolMarshaller . marshall ( deleteVaultRequest . getVaultName ( ) , VAULTNAME_BINDING ) ; } catch ( ...
public class SafeTreeMarshallingStrategy { /** * If anything goes wrong with an element , don ' t serialize it */ @ Override protected TreeMarshaller createMarshallingContext ( HierarchicalStreamWriter writer , ConverterLookup converterLookup , Mapper mapper ) { } }
return new SafeTreeMarshaller ( writer , converterLookup , mapper , RELATIVE ) ;
public class StringListFlattener { /** * Joins the given list into a single string . */ public String join ( List < String > list ) { } }
if ( list == null ) { return null ; } StringBuilder sb = new StringBuilder ( ) ; boolean first = true ; for ( String s : list ) { if ( s == null ) { if ( convertEmptyToNull ) { s = "" ; } else { throw new IllegalArgumentException ( "StringListFlattener does not support null strings in the list. Consider calling setConv...
public class CommerceAccountUtil { /** * Returns the commerce account where companyId = & # 63 ; and externalReferenceCode = & # 63 ; or returns < code > null < / code > if it could not be found , optionally using the finder cache . * @ param companyId the company ID * @ param externalReferenceCode the external ref...
return getPersistence ( ) . fetchByC_ERC ( companyId , externalReferenceCode , retrieveFromCache ) ;
public class InvocationHandlerAdapter { /** * Applies an implementation that delegates to a invocation handler . * @ param methodVisitor The method visitor for writing the byte code to . * @ param implementationContext The implementation context for the current implementation . * @ param instrumentedMethod The me...
if ( instrumentedMethod . isStatic ( ) ) { throw new IllegalStateException ( "It is not possible to apply an invocation handler onto the static method " + instrumentedMethod ) ; } MethodConstant . CanCache methodConstant = privileged ? MethodConstant . ofPrivileged ( instrumentedMethod . asDefined ( ) ) : MethodConstan...
public class ConverterUtils { /** * Gets an instance of a Workbook ( { @ link ConverterUtils # newWorkbook ( InputStream ) } , creates copy of original file , * clears all the cell values , but preserves formatting . */ static Workbook clearContent ( final Workbook book ) { } }
ByteArrayOutputStream originalOut = new ByteArrayOutputStream ( ) ; try { book . write ( originalOut ) ; } catch ( IOException e ) { throw new CalculationEngineException ( e ) ; } InputStream originalIn = new ByteArrayInputStream ( copyOf ( originalOut . toByteArray ( ) , originalOut . size ( ) ) ) ; Workbook w = Conve...
public class GlobusGSSCredentialImpl { /** * Retrieves arbitrary data about this credential . * Currently supported oid : < UL > * < LI > * { @ link GSSConstants # X509 _ CERT _ CHAIN GSSConstants . X509 _ CERT _ CHAIN } * returns certificate chain of this credential * ( < code > X509Certificate [ ] < / code ...
if ( oid == null ) { throw new GlobusGSSException ( GSSException . FAILURE , GlobusGSSException . BAD_ARGUMENT , "nullOption" ) ; } if ( oid . equals ( GSSConstants . X509_CERT_CHAIN ) ) { return ( this . cred == null ) ? null : this . cred . getCertificateChain ( ) ; } return null ;
public class DateTimeParseContext { /** * Stores the parsed field . * This stores a field - value pair that has been parsed . * The value stored may be out of range for the field - no checks are performed . * @ param field the field to set in the field - value map , not null * @ param value the value to set in ...
Objects . requireNonNull ( field , "field" ) ; Long old = currentParsed ( ) . fieldValues . put ( field , value ) ; return ( old != null && old . longValue ( ) != value ) ? ~ errorPos : successPos ;
public class ContextLifeCycle { /** * Fires ContextStart to all registered event handlers . */ void start ( ) { } }
final ContextStart contextStart = new ContextStartImpl ( this . identifier ) ; for ( final EventHandler < ContextStart > startHandler : this . contextStartHandlers ) { startHandler . onNext ( contextStart ) ; }
public class Sequences { /** * This will materialize the entire sequence in memory . Use at your own risk . */ public static < T > Sequence < T > sort ( final Sequence < T > sequence , final Comparator < T > comparator ) { } }
List < T > seqList = sequence . toList ( ) ; Collections . sort ( seqList , comparator ) ; return simple ( seqList ) ;
public class LocationsInner { /** * Check Name Availability . * Checks whether the Media Service resource name is available . * @ param locationName the String value * @ param parameters The request parameters * @ param serviceCallback the async ServiceCallback to handle successful and failed responses . * @ ...
return ServiceFuture . fromResponse ( checkNameAvailabilityWithServiceResponseAsync ( locationName , parameters ) , serviceCallback ) ;
public class MetaDataResult { /** * Get a LocalDate field ( converted from a String internally ) . Throws a QuandlRuntimeException if it cannot find the field * @ param fieldName the name of the field * @ return the field value , or null if the field is null */ public LocalDate getLocalDate ( final String fieldName...
try { if ( _jsonObject . isNull ( fieldName ) ) { return null ; } else { return LocalDate . parse ( _jsonObject . getString ( fieldName ) , DATE_FORMATTER ) ; } } catch ( JSONException ex ) { throw new QuandlRuntimeException ( "Cannot find field" , ex ) ; }
public class RtfRow { /** * Imports a Row and copies all settings * @ param row The Row to import */ private void importRow ( Row row ) { } }
this . cells = new ArrayList ( ) ; this . width = this . document . getDocumentHeader ( ) . getPageSetting ( ) . getPageWidth ( ) - this . document . getDocumentHeader ( ) . getPageSetting ( ) . getMarginLeft ( ) - this . document . getDocumentHeader ( ) . getPageSetting ( ) . getMarginRight ( ) ; this . width = ( int ...
public class AbstractItem { /** * Check new name for job * @ param newName - New name for job . */ private void checkIfNameIsUsed ( @ Nonnull String newName ) throws Failure { } }
try { Item item = getParent ( ) . getItem ( newName ) ; if ( item != null ) { throw new Failure ( Messages . AbstractItem_NewNameInUse ( newName ) ) ; } try ( ACLContext ctx = ACL . as ( ACL . SYSTEM ) ) { item = getParent ( ) . getItem ( newName ) ; if ( item != null ) { if ( LOGGER . isLoggable ( Level . FINE ) ) { L...
public class Compiler { /** * Submits a task to one of the compiler ' s task queues for processing . Although public , this method should only be * called by tasks started by the compiler itself . * @ param task task to run on one of the compiler ' s task queues */ public void submit ( Task < ? extends TaskResult >...
// Increment the counter which indicates the number of results to // expect . This must be done BEFORE actually submitting the task for // execution . remainingTasks . incrementAndGet ( ) ; // Increment the statistics and put the task on the correct queue . stats . incrementStartedTasks ( task . resultType ) ; executor...
public class JmsMessageImpl { /** * @ see javax . jms . Message # setJMSMessageID ( String ) * Note that this method is used to change the MessageID once the * message has been received - it cannot be used to affect the assignment * of the message ID , which is supplied by the provider on send . * d255144 Metho...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setJMSMessageID" , newMsgId ) ; localJMSMessageID = newMsgId ; // Invalidate the toString cache cachedToString = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this ,...
public class CmsShellCommands { /** * Sleeps for a duration given in milliseconds . < p > * @ param sleepMillis a string containing the number of milliseconds to wait * @ throws NumberFormatException if the sleepMillis parameter is not a valid number */ public void sleep ( String sleepMillis ) throws NumberFormatEx...
try { Thread . sleep ( Long . parseLong ( sleepMillis ) ) ; } catch ( InterruptedException e ) { // ignore }
public class DatabaseHashMap { /** * updateNukerTimeStamp * When running in a clustered environment , there could be multiple machines processing invalidation . * This method updates the last time the invalidation was run . A server should not try to process invalidation if * it was already done within the specif...
if ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_WAS . isLoggable ( Level . FINE ) ) { LoggingUtil . SESSION_LOGGER_WAS . entering ( methodClassName , methodNames [ UPDATE_NUKER_TIME_STAMP ] , "appName=" + appName ) ; } PreparedStatement ps = null ; long now = ...
public class ExpressRouteCrossConnectionPeeringsInner { /** * Creates or updates a peering in the specified ExpressRouteCrossConnection . * @ param resourceGroupName The name of the resource group . * @ param crossConnectionName The name of the ExpressRouteCrossConnection . * @ param peeringName The name of the p...
return createOrUpdateWithServiceResponseAsync ( resourceGroupName , crossConnectionName , peeringName , peeringParameters ) . toBlocking ( ) . last ( ) . body ( ) ;
public class SiRNANotation { /** * this method converts nucleotide sequences into HELM2Notation * @ param senseSeq * 5-3 nucleotide sequence for default notation * @ param antiSenseSeq * 3-5 nucleotide sequence for default notation * @ return HELM2Notation for siRNA * @ throws NotationException * if notat...
return getSirnaNotation ( senseSeq , antiSenseSeq , NucleotideParser . RNA_DESIGN_NONE ) ;
public class CmsFileExplorer { /** * Expands the currently viewed folder in the tree . < p > */ void expandCurrentFolder ( ) { } }
if ( m_currentFolder != null ) { m_treeContainer . setChildrenAllowed ( m_currentFolder , true ) ; m_fileTree . expandItem ( m_currentFolder ) ; }
public class Dictionary { /** * Gets a property ' s value as a Date . * JSON does not directly support dates , so the actual property value must be a string , which is * then parsed according to the ISO - 8601 date format ( the default used in JSON . ) * Returns null if the value doesn ' t exist , is not a string...
if ( key == null ) { throw new IllegalArgumentException ( "key cannot be null." ) ; } return DateUtils . fromJson ( getString ( key ) ) ;
public class ComputationGraph { /** * Return an array of network outputs ( predictions ) , given the specified network inputs * Network outputs are for output layers only . < br > * If no memory workspace is provided , the output will be detached ( not in any workspace ) . < br > * If a memory workspace is provid...
return output ( train , input , inputMaskArrays , labelMaskArrays , outputWorkspace ) ;
public class HttpFileService { /** * Creates a new { @ link HttpService } that tries this { @ link HttpFileService } first and then the specified * { @ link HttpService } when this { @ link HttpFileService } does not have a requested resource . * @ param nextService the { @ link HttpService } to try secondly */ pub...
requireNonNull ( nextService , "nextService" ) ; return new OrElseHttpService ( this , nextService ) ;
public class SwaggerAnnotationsReader { /** * Scans a set of classes for Swagger annotations . * @ param swagger is the Swagger instance * @ param classes are a set of classes to scan */ public static void read ( Swagger swagger , Set < Class < ? > > classes ) { } }
final SwaggerAnnotationsReader reader = new SwaggerAnnotationsReader ( swagger ) ; for ( Class < ? > cls : classes ) { final ReaderContext context = new ReaderContext ( swagger , cls , "" , null , false , new ArrayList < > ( ) , new ArrayList < > ( ) , new ArrayList < > ( ) , new ArrayList < > ( ) ) ; reader . read ( c...
public class InternalXtextParser { /** * InternalXtext . g : 2698:1 : entryRuleCrossReferenceableTerminal returns [ EObject current = null ] : iv _ ruleCrossReferenceableTerminal = ruleCrossReferenceableTerminal EOF ; */ public final EObject entryRuleCrossReferenceableTerminal ( ) throws RecognitionException { } }
EObject current = null ; EObject iv_ruleCrossReferenceableTerminal = null ; try { // InternalXtext . g : 2698:67 : ( iv _ ruleCrossReferenceableTerminal = ruleCrossReferenceableTerminal EOF ) // InternalXtext . g : 2699:2 : iv _ ruleCrossReferenceableTerminal = ruleCrossReferenceableTerminal EOF { newCompositeNode ( gr...
public class IO { /** * Reads an object from the given file . * @ param < T > the type of the read object * @ param path the path to read from . * @ param type the type of the read object . * @ return the de - serialized object . * @ throws NullPointerException if the input stream { @ code in } is { @ code nu...
try ( final FileInputStream in = new FileInputStream ( new File ( path ) ) ) { return read ( type , in ) ; }
public class ContainerClassLoader { /** * Method to allow adding shared libraries to this classloader , currently using File . * @ param f the File to add as a shared lib . . can be a dir or a jar ( or a loose xml ; p ) */ @ FFDCIgnore ( NullPointerException . class ) protected void addLibraryFile ( File f ) { } }
if ( ! ! ! f . exists ( ) ) { if ( tc . isWarningEnabled ( ) ) { Tr . warning ( tc , "cls.library.archive" , f , new FileNotFoundException ( f . getName ( ) ) ) ; } return ; } // Skip files that are not archives of some sort . if ( ! f . isDirectory ( ) && ! isArchive ( f ) ) return ; // this area subject to refactor f...
public class JavaParser { @ SuppressSubnodes @ MemoMismatches Rule Identifier ( ) { } }
return Sequence ( TestNot ( Keyword ( ) ) , Letter ( ) , ZeroOrMore ( LetterOrDigit ( ) ) , Spacing ( ) ) ;
public class UserBuilder { /** * Adds to the extra data for the user . * @ param name Name of the data * @ param value Value of the data * @ return current instance of UserBuilder */ public UserBuilder withData ( String name , Object value ) { } }
if ( this . data == null ) { this . data = new HashMap < > ( ) ; } this . data . put ( name , value ) ; return this ;
public class ByteArrayMessage { /** * base - 64 encodes the message . */ @ Override public String encodeAsString ( ) { } }
if ( message . size == 0 ) return "" ; return new String ( Base64Coder . encode ( message . array , message . size ) ) ;
public class AbstractJSPExtensionProcessor { /** * PK81387 - added checkWEBINF param */ private boolean handleCaseSensitivityCheck ( String path , boolean checkWEBINF ) throws IOException { } }
if ( System . getSecurityManager ( ) != null ) { final String tmpPath = path ; final boolean tmpCheckWEBINF = checkWEBINF ; // PK81387 try { return ( ( Boolean ) AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws IOException { return _handleCaseSensitivityCheck ( tmpPath ...
public class IamCredentialsClient { /** * Generates an OpenID Connect ID token for a service account . * < p > Sample code : * < pre > < code > * try ( IamCredentialsClient iamCredentialsClient = IamCredentialsClient . create ( ) ) { * ServiceAccountName name = ServiceAccountName . of ( " [ PROJECT ] " , " [ SE...
GenerateIdTokenRequest request = GenerateIdTokenRequest . newBuilder ( ) . setName ( name == null ? null : name . toString ( ) ) . addAllDelegates ( delegates ) . setAudience ( audience ) . setIncludeEmail ( includeEmail ) . build ( ) ; return generateIdToken ( request ) ;
public class RingBuffer { /** * Add the supplied consumer , and have it start processing entries in a separate thread . * The consumer is automatically removed from the ring buffer when it returns { @ code false } from its * { @ link Consumer # consume ( Object , long , long ) } method . * @ param consumer the co...
if ( ! addEntries . get ( ) ) { throw new IllegalStateException ( ) ; } ConsumerRunner runner = new ConsumerRunner ( consumer , timesToRetryUponTimeout ) ; if ( gcConsumer != null ) gcConsumer . stayBehind ( runner . getPointer ( ) ) ; // Try to add the runner instance , with equality based upon consumer instance equal...
public class TTException { /** * Util method to provide StringBuilder functionality . * @ param message * to be concatenated * @ return the StringBuilder for the combined string */ public static StringBuilder concat ( final String ... message ) { } }
final StringBuilder builder = new StringBuilder ( ) ; for ( final String mess : message ) { builder . append ( mess ) ; builder . append ( " " ) ; } return builder ;
public class HawkContext { /** * Create a new RequestBuilder _ A , initialized with request data . * @ param method * @ param path * @ param host * @ param port * @ return */ public static HawkContextBuilder_B request ( String method , String path , String host , int port ) { } }
return new HawkContextBuilder ( ) . method ( method ) . path ( path ) . host ( host ) . port ( port ) ;
public class Node { /** * Sets reference to the graph owning this node . * @ param ownerGraph the owning graph */ public void setOwner ( Graph < DataT , NodeT > ownerGraph ) { } }
if ( this . ownerGraph != null ) { throw new RuntimeException ( "Changing owner graph is not allowed" ) ; } this . ownerGraph = ownerGraph ;
public class SoLoader { /** * This function ensure that every SoSources Abi is supported for at least one abi in * SysUtil . getSupportedAbis * @ return true if all SoSources have their Abis supported */ public static boolean areSoSourcesAbisSupported ( ) { } }
sSoSourcesLock . readLock ( ) . lock ( ) ; try { if ( sSoSources == null ) { return false ; } String supportedAbis [ ] = SysUtil . getSupportedAbis ( ) ; for ( int i = 0 ; i < sSoSources . length ; ++ i ) { String [ ] soSourceAbis = sSoSources [ i ] . getSoSourceAbis ( ) ; for ( int j = 0 ; j < soSourceAbis . length ; ...
public class EnglishGrammaticalStructure { /** * This method will collapse a referent relation such as follows . e . g . : * " The man that I love . . . " ref ( man , that ) dobj ( love , that ) - > dobj ( love , * man ) */ private static void collapseReferent ( Collection < TypedDependency > list ) { } }
// find typed deps of form ref ( gov , dep ) // put them in a List for processing ; remove them from the set of deps List < TypedDependency > refs = new ArrayList < TypedDependency > ( ) ; for ( Iterator < TypedDependency > iter = list . iterator ( ) ; iter . hasNext ( ) ; ) { TypedDependency td = iter . next ( ) ; if ...
public class SecurityModuleAppFixturesService { /** * region > runFixtureScript */ @ Override public List < FixtureResult > runFixtureScript ( final FixtureScript fixtureScript , @ Parameter ( optionality = Optionality . OPTIONAL ) @ ParameterLayout ( named = "Parameters" , describedAs = "Script-specific parameters (if...
return super . runFixtureScript ( fixtureScript , parameters ) ;
public class VelocityRendererImpl { /** * { @ inheritDoc } */ @ Override public void renderTemplate ( final String templateName , final Map < String , Object > context , final Map < String , WComponent > taggedComponents , final Writer writer , final Map < String , Object > options ) { } }
LOG . debug ( "Rendering velocity template [" + templateName + "]." ) ; // Velocity uses a ClassLoader so dont use an absolute path . String name = templateName . startsWith ( "/" ) ? templateName . substring ( 1 ) : templateName ; try { // Load template Template template = getVelocityEngine ( ) . getTemplate ( name ) ...
public class ElemTemplateElement { /** * NodeList method : Return the Nth immediate child of this node , or * null if the index is out of bounds . * @ param index Index of child to find * @ return org . w3c . dom . Node : the child node at given index */ public Node item ( int index ) { } }
// It is assumed that the getChildNodes call synchronized // the children . Therefore , we can access the first child // reference directly . ElemTemplateElement node = m_firstChild ; for ( int i = 0 ; i < index && node != null ; i ++ ) { node = node . m_nextSibling ; } return node ;
public class Logger { /** * Issue a log message with a level of DEBUG using { @ link java . text . MessageFormat } - style formatting . * @ param format the message format string * @ param params the parameters */ public void debugv ( String format , Object ... params ) { } }
doLog ( Level . DEBUG , FQCN , format , params , null ) ;
public class CmsHtmlParser { /** * Internally degrades Composite tags that do have children in the DOM tree * to simple single tags . This allows to avoid auto correction of unclosed HTML tags . < p > * @ return A node factory that will not autocorrect open tags specified via < code > { @ link # setNoAutoCloseTags ...
PrototypicalNodeFactory factory = new PrototypicalNodeFactory ( ) ; String tagName ; Iterator < String > it = m_noAutoCloseTags . iterator ( ) ; CmsNoAutoCloseTag noAutoCloseTag ; while ( it . hasNext ( ) ) { tagName = it . next ( ) ; noAutoCloseTag = new CmsNoAutoCloseTag ( new String [ ] { tagName } ) ; // TODO : Thi...
public class NavigationPresenter { /** * Makes the TreeItems ' text update when the description of a Category changes ( due to i18n ) . */ public void setupCellValueFactory ( ) { } }
navigationView . treeView . setCellFactory ( param -> new TreeCell < Category > ( ) { @ Override protected void updateItem ( Category category , boolean empty ) { super . updateItem ( category , empty ) ; textProperty ( ) . unbind ( ) ; if ( empty || category == null ) { setText ( null ) ; setGraphic ( null ) ; } else ...
public class AbstractMatcher { /** * A utility function to convert a string containing match options to the * associated integer with the appropriate bits set . * @ param opts * string containing matching flags * @ return integer with appropriate bits set */ protected int convertMatchFlags ( Element opts ) { } ...
int flags = 0 ; String sopts = ( ( StringProperty ) opts ) . getValue ( ) ; for ( int i = 0 ; i < sopts . length ( ) ; i ++ ) { char c = sopts . charAt ( i ) ; switch ( c ) { case 'i' : flags |= Pattern . CASE_INSENSITIVE ; break ; case 's' : flags |= Pattern . DOTALL ; break ; case 'm' : flags |= Pattern . MULTILINE ;...
public class GoogleV3MapWidget { /** * Add zoom handler , event is not exposed at present * @ param zoomHandler runnable zoom handler */ @ Override public HandlerRegistration addMapZoomEndHandler ( final Runnable zoomHandler ) { } }
return mapWidget . addZoomChangeHandler ( zoomChangeMapEvent -> zoomHandler . run ( ) ) ;
public class XLinkUtils { /** * Returns the Classobject to a given clazzString and a given version . * Throws a ClassNotFoundException if the Class / Version pair is not found . */ public static Class getClassOfOpenEngSBModel ( String clazz , String version , OsgiUtilsService serviceFinder ) throws ClassNotFoundExcep...
ModelRegistry registry = serviceFinder . getService ( ModelRegistry . class ) ; ModelDescription modelDescription = new ModelDescription ( clazz , version ) ; Class clazzObject = registry . loadModel ( modelDescription ) ; return clazzObject ;
public class RenderVisitor { /** * Check that the given { @ code paramValue } matches the static type of { @ code param } . */ private void checkStrictParamType ( final TemplateNode node , final TemplateParam param , @ Nullable SoyValueProvider paramValue ) { } }
Kind kind = param . type ( ) . getKind ( ) ; if ( kind == Kind . ANY || kind == Kind . UNKNOWN ) { // Nothing to check . ANY and UKNOWN match all types . return ; } if ( paramValue == null ) { paramValue = NullData . INSTANCE ; } else if ( paramValue instanceof SoyAbstractCachingValueProvider ) { SoyAbstractCachingValu...
public class SQLCommand { /** * available in non - interactive contexts . This function is available to enable that . */ private static boolean executesAsSimpleDirective ( String line ) throws Exception { } }
// SHOW or LIST < blah > statement String subcommand = SQLParser . parseShowStatementSubcommand ( line ) ; if ( subcommand != null ) { if ( subcommand . equals ( "proc" ) || subcommand . equals ( "procedures" ) ) { execListProcedures ( ) ; } else if ( subcommand . equals ( "functions" ) ) { execListFunctions ( ) ; } el...
public class PointSymbolizerWrapper { /** * / / / / / GETTERS / SETTERS */ public void setSize ( String size , boolean isProperty ) { } }
this . size = size ; if ( isProperty ) { graphic . setSize ( ff . property ( size ) ) ; } else { graphic . setSize ( ff . literal ( size ) ) ; }
public class ApplicationTemplateMngrImpl { /** * Unregisters targets . * @ param newTargetIds a non - null set of target IDs */ private void unregisterTargets ( Set < String > newTargetIds ) { } }
for ( String targetId : newTargetIds ) { try { this . targetsMngr . deleteTarget ( targetId ) ; } catch ( Exception e ) { this . logger . severe ( "A target ID that has just been registered could not be created. That's weird." ) ; Utils . logException ( this . logger , e ) ; } }
public class DescribeConfigurationRecorderStatusRequest { /** * The name ( s ) of the configuration recorder . If the name is not specified , the action returns the current status of * all the configuration recorders associated with the account . * @ return The name ( s ) of the configuration recorder . If the name...
if ( configurationRecorderNames == null ) { configurationRecorderNames = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return configurationRecorderNames ;
public class JmsJcaReferenceUtilsImpl { /** * Takes a map containing a set of properties , the keys of which are * Strings , and the values of which are immutable objects ( for instance * primitive wrapper classes ) , and returns a string encoded version of the * map in which the keys are the original keys prefix...
if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "getStringEncodedMap" , new Object [ ] { raw , defaults } ) ; } final Map < String , String > encodedMap = new HashMap < String , String > ( ) ; final Iterator propKeys = raw . keySet ( ) . iterator ( ) ; // L...
public class CPMeasurementUnitUtil { /** * Returns the last cp measurement unit in the ordered set where groupId = & # 63 ; . * @ param groupId the group ID * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ return the last matching cp measurement unit , or ...
return getPersistence ( ) . fetchByGroupId_Last ( groupId , orderByComparator ) ;
public class ComparableExpression { /** * Create a { @ code this < = right } expression * @ param right rhs of the comparison * @ return this & lt ; = right * @ see java . lang . Comparable # compareTo ( Object ) */ public final BooleanExpression loe ( T right ) { } }
return Expressions . booleanOperation ( Ops . LOE , mixin , ConstantImpl . create ( right ) ) ;
public class IntHashSet { /** * Contains method that does not box values . * @ param value to be check for if the set contains it . * @ return true if the value is contained in the set otherwise false . * @ see Collection # contains ( Object ) */ public boolean contains ( final int value ) { } }
if ( value == MISSING_VALUE ) { return containsMissingValue ; } final int [ ] values = this . values ; @ DoNotSub final int mask = values . length - 1 ; @ DoNotSub int index = Hashing . hash ( value , mask ) ; while ( values [ index ] != MISSING_VALUE ) { if ( values [ index ] == value ) { return true ; } index = next ...
public class A_CmsEditUserDialog { /** * Initializes the user object to work with depending on the dialog state and request parameters . < p > * Two initializations of the user object on first dialog call are possible : * < ul > * < li > edit an existing user < / li > * < li > create a new user < / li > * < /...
Object o = null ; try { if ( CmsStringUtil . isEmpty ( getParamAction ( ) ) || CmsDialog . DIALOG_INITIAL . equals ( getParamAction ( ) ) ) { // edit an existing user , get the user object from db m_user = getCms ( ) . readUser ( new CmsUUID ( getParamUserid ( ) ) ) ; m_pwdInfo = new CmsPasswordInfo ( ) ; CmsUserSettin...
public class BaseUtils { /** * Ensures that the directories in the given path exist , creating them if necessary . * < p > Note : If the path does not end with the separator char ( slash in Linux ) , then the name at * the end is assumed to be the file name , so directories are only created down to its parent . *...
if ( path == null || path . length ( ) == 0 ) { throw new AssertionError ( "ensureDirsExistInPath called with null or empty path." ) ; } String dirPath = ( path . charAt ( path . length ( ) - 1 ) == File . separatorChar ) ? path . substring ( 0 , path . length ( ) - 1 ) : ( new File ( path ) ) . getParent ( ) ; if ( di...
public class OfflineUpdateRequest { /** * The method generates the update request file . * @ param outputDir Directory where request file will be created . * @ param zip Whether or not to zip the request . * @ param prettyJson Whether or not to parse the json before writing to file ( only if zip is false ) . * ...
if ( request == null ) { throw new IllegalStateException ( "Update inventory request is null" ) ; } // prepare working directory File workDir = new File ( outputDir , "whitesource" ) ; if ( ! workDir . exists ( ) && ! workDir . mkdir ( ) ) { throw new IOException ( "Unable to make output directory: " + workDir ) ; } St...
public class RootFinder { /** * { @ inheritDoc } */ @ Override public String getDbName ( final FinderObject owner ) { } }
final Root root = ( Root ) owner ; return root . getTheDbName ( ) ;
public class Twilio { /** * Returns ( and initializes if not initialized ) the Twilio Rest Client . * @ return the TWilio Rest Client * @ throws AuthenticationException if initialization required and either accountSid or authToken is null */ public static TwilioRestClient getRestClient ( ) { } }
if ( Twilio . restClient == null ) { if ( Twilio . username == null || Twilio . password == null ) { throw new AuthenticationException ( "TwilioRestClient was used before AccountSid and AuthToken were set, please call Twilio.init()" ) ; } TwilioRestClient . Builder builder = new TwilioRestClient . Builder ( Twilio . us...
public class DirectoryRegistrationService { /** * Update the uri of the ProvidedServiceInstance by serviceName and providerId . * @ param serviceName * the serviceName of the ProvidedServiceInstance . * @ param providerId * the providerId of the ProvidedServiceInstance . * @ param uri * the new uri . */ pub...
getServiceDirectoryClient ( ) . updateServiceInstanceUri ( serviceName , providerId , uri ) ;
public class FessMessages { /** * Add the created action message for the key ' errors . failed _ to _ start _ job ' with parameters . * < pre > * message : Failed to start job { 0 } . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ param arg0 The parameter arg0 for message ....
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_failed_to_start_job , arg0 ) ) ; return this ;
public class CollectionUtil { /** * 返回无序集合中的最小值 , 使用元素默认排序 */ public static < T extends Object & Comparable < ? super T > > T min ( Collection < ? extends T > coll ) { } }
return Collections . min ( coll ) ;
public class CmsLock { /** * Sets the related Lock . < p > * @ param relatedLock the related Lock to set */ protected void setRelatedLock ( CmsLock relatedLock ) { } }
if ( this == NULL_LOCK ) { throw new RuntimeException ( "null lock" ) ; } if ( ( relatedLock == null ) || relatedLock . isUnlocked ( ) ) { m_relatedLock = null ; } else { m_relatedLock = relatedLock ; m_relatedLock . m_relatedLock = this ; }
public class PullFileLoader { /** * Find at most one * . properties file in the input { @ link Path } and load it using fallback as fallback . * @ return The { @ link Config } in path with sysProps as fallback . * @ throws IOException */ private Config findAndLoadGlobalConfigInDirectory ( Path path , Config fallbac...
FileStatus [ ] files = this . fs . listStatus ( path , GLOBAL_PATH_FILTER ) ; if ( files == null ) { log . warn ( "Could not list files at path " + path ) ; return ConfigFactory . empty ( ) ; } if ( files . length > 1 ) { throw new IOException ( "Found more than one global properties file at path " + path ) ; } if ( fi...
public class KamImpl { /** * { @ inheritDoc } */ @ Override public Set < KamEdge > getAdjacentEdges ( KamNode kamNode , EdgeFilter filter ) { } }
return getAdjacentEdges ( kamNode , EdgeDirectionType . BOTH , filter ) ;
public class PdfDocument { /** * Adds a < CODE > PdfWriter < / CODE > to the < CODE > PdfDocument < / CODE > . * @ param writer the < CODE > PdfWriter < / CODE > that writes everything * what is added to this document to an outputstream . * @ throws DocumentException on error */ public void addWriter ( PdfWriter ...
if ( this . writer == null ) { this . writer = writer ; annotationsImp = new PdfAnnotationsImp ( writer ) ; return ; } throw new DocumentException ( "You can only add a writer to a PdfDocument once." ) ;
public class AbstractFileSystem { /** * Initialize the { @ link alluxio . hadoop . FileSystem } . * @ param uri file system Uri * @ param conf hadoop configuration * @ param alluxioConfiguration [ optional ] alluxio configuration * @ throws IOException */ public synchronized void initialize ( URI uri , org . ap...
Preconditions . checkArgument ( uri . getScheme ( ) . equals ( getScheme ( ) ) , PreconditionMessage . URI_SCHEME_MISMATCH . toString ( ) , uri . getScheme ( ) , getScheme ( ) ) ; super . initialize ( uri , conf ) ; LOG . debug ( "initialize({}, {}). Connecting to Alluxio" , uri , conf ) ; HadoopUtils . addSwiftCredent...
public class XmlUtils { /** * 从request中获得参数Map , 并返回可读的Map * @ param request * @ return */ public static SortedMap getParameterMap ( HttpServletRequest request ) { } }
// 参数Map Map properties = request . getParameterMap ( ) ; // 返回值Map SortedMap returnMap = new TreeMap ( ) ; Iterator entries = properties . entrySet ( ) . iterator ( ) ; Map . Entry entry ; String name = "" ; String value = "" ; while ( entries . hasNext ( ) ) { entry = ( Map . Entry ) entries . next ( ) ; name = ( Str...
public class NetworkUtils { /** * Set the learning rate schedule for all layers in the network to the specified schedule . * This schedule will replace any / all existing schedules , and also any fixed learning rate values . < br > * Note that the iteration / epoch counts will < i > not < / i > be reset . Use { @ l...
setLearningRate ( net , Double . NaN , newLrSchedule ) ;
public class ProjectCalendar { /** * Retrieves the working hours on the given date . * @ param date required date * @ param cal optional calendar instance * @ param day optional day instance * @ return working hours */ private ProjectCalendarDateRanges getRanges ( Date date , Calendar cal , Day day ) { } }
ProjectCalendarDateRanges ranges = getException ( date ) ; if ( ranges == null ) { ProjectCalendarWeek week = getWorkWeek ( date ) ; if ( week == null ) { week = this ; } if ( day == null ) { if ( cal == null ) { cal = Calendar . getInstance ( ) ; cal . setTime ( date ) ; } day = Day . getInstance ( cal . get ( Calenda...