signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class Manager { /** * in CBLManager . m
* - ( NSString * ) pathForDatabaseNamed : ( NSString * ) name
* @ exclude */
@ InterfaceAudience . Private private String pathForDatabaseNamed ( String name ) { } } | if ( ( name == null ) || ( name . length ( ) == 0 ) || Pattern . matches ( LEGAL_CHARACTERS , name ) ) return null ; // NOTE : CouchDB allows forward slash as part of database name .
// However , ' : ' is illegal character on Windows platform .
// For Windows , substitute with period ' . '
name = isWindows ( ) ? name .... |
public class LoganSquare { /** * Serialize a map of objects to a JSON String .
* @ param map The map of objects to serialize .
* @ param jsonObjectClass The @ JsonObject class of the list elements */
public static < E > String serialize ( Map < String , E > map , Class < E > jsonObjectClass ) throws IOException { }... | return mapperFor ( jsonObjectClass ) . serialize ( map ) ; |
public class Identity { /** * Reads this Function .
* @ param in source to read from */
private void readObject ( ObjectInputStream in ) throws ClassNotFoundException , NoSuchMethodException , IOException { } } | result = ClassRef . read ( in ) ; arg = ClassRef . read ( in ) ; name = in . readUTF ( ) ; |
public class RatelimitManager { /** * Queues the given request .
* This method is automatically called when using { @ link RestRequest # execute ( Function ) } !
* @ param request The request to queue . */
public void queueRequest ( RestRequest < ? > request ) { } } | final RatelimitBucket bucket ; final boolean alreadyInQueue ; synchronized ( buckets ) { // Search for a bucket that fits to this request
bucket = buckets . stream ( ) . filter ( b -> b . equals ( request . getEndpoint ( ) , request . getMajorUrlParameter ( ) . orElse ( null ) ) ) . findAny ( ) . orElseGet ( ( ) -> new... |
public class MatrixUtil { /** * Embed type information . On success , modify the matrix . */
static void embedTypeInfo ( ErrorCorrectionLevel ecLevel , int maskPattern , ByteMatrix matrix ) throws WriterException { } } | BitArray typeInfoBits = new BitArray ( ) ; makeTypeInfoBits ( ecLevel , maskPattern , typeInfoBits ) ; for ( int i = 0 ; i < typeInfoBits . getSize ( ) ; ++ i ) { // Place bits in LSB to MSB order . LSB ( least significant bit ) is the last value in
// " typeInfoBits " .
boolean bit = typeInfoBits . get ( typeInfoBits ... |
public class KeyVaultClientBaseImpl { /** * Gets the creation operation of a certificate .
* Gets the creation operation associated with a specified certificate . This operation requires the certificates / get permission .
* @ param vaultBaseUrl The vault name , for example https : / / myvault . vault . azure . net... | return getCertificateOperationWithServiceResponseAsync ( vaultBaseUrl , certificateName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class NamedPathPruner { /** * Simple recursive descent parser : */
static Tree parse ( String spec ) throws IllegalArgumentException { } } | Reader r = new Reader ( spec ) ; Tree t = new Tree ( ) ; list ( r , t ) ; r . expect ( Token . EOF ) ; return t ; |
public class FaceletCompositionContextImpl { /** * Remove a component from the last level of components marked to be deleted .
* @ param id */
private UIComponent removeComponentForDeletion ( String id ) { } } | UIComponent removedComponent = _componentsMarkedForDeletion . get ( _deletionLevel ) . remove ( id ) ; if ( removedComponent != null && _deletionLevel > 0 ) { _componentsMarkedForDeletion . get ( _deletionLevel - 1 ) . remove ( id ) ; } return removedComponent ; |
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertIfcRampTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class SecretDetector { /** * Find all the positions of aws key id and aws secret key .
* The time complexity is O ( n )
* @ param text the sql text which may contain aws key
* @ return Return a list of begin / end positions of aws key id and
* aws secret key . */
private static List < SecretRange > getAW... | // log before and after in case this is causing StackOverflowError
LOGGER . debug ( "pre-regex getAWSSecretPos" ) ; Matcher matcher = AWS_KEY_PATTERN . matcher ( text ) ; ArrayList < SecretRange > awsSecretRanges = new ArrayList < > ( ) ; while ( matcher . find ( ) ) { int beginPos = Math . min ( matcher . end ( ) + LO... |
public class StaticNodeIdManager { /** * Lasy - create staticNodeId for the given node id .
* @ param nodeId the node id generated by the node itself .
* @ return the staticNodeId eg . payment - - - 0 */
public static String getStaticNodeId ( String nodeId ) { } } | String application = NodeIdBean . parse ( nodeId ) . getApplication ( ) ; if ( nodeId_to_StaticFinalId_map . get ( nodeId ) == null ) { Instance < NodeStatus > instance = ApplicationDiscovery . singleton . instance ( nodeId ) ; if ( instance != null ) { LOG . debug ( "Instance with given nodeId is found online, then in... |
public class TypesResource { /** * Fetch the complete definition of a given type name which is unique .
* @ param typeName name of a type which is unique . */
@ GET @ Path ( "{typeName}" ) @ Produces ( Servlets . JSON_MEDIA_TYPE ) public Response getDefinition ( @ Context HttpServletRequest request , @ PathParam ( "t... | if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "==> TypesResource.getDefinition({})" , typeName ) ; } AtlasPerfTracer perf = null ; if ( AtlasPerfTracer . isPerfTraceEnabled ( PERF_LOG ) ) { perf = AtlasPerfTracer . getPerfTracer ( PERF_LOG , "TypesResource.getDefinition(" + typeName + ")" ) ; } JSONObject response = ... |
public class ExemptionMechanism { /** * Returns whether the result blob has been generated successfully by this
* exemption mechanism .
* < p > The method also makes sure that the key passed in is the same as
* the one this exemption mechanism used in initializing and generating
* phases .
* @ param key the k... | boolean ret = false ; if ( done && ( key != null ) ) { // Check if the key passed in is the same as the one
// this exemption mechanism used .
ret = keyStored . equals ( key ) ; } return ret ; |
public class IconicsDrawable { /** * Update the Padding Bounds */
private void updatePaddingBounds ( @ NonNull Rect viewBounds ) { } } | if ( mIconPadding >= 0 && mIconPadding * 2 <= viewBounds . width ( ) && mIconPadding * 2 <= viewBounds . height ( ) ) { mPaddingBounds . set ( viewBounds . left + mIconPadding , viewBounds . top + mIconPadding , viewBounds . right - mIconPadding , viewBounds . bottom - mIconPadding ) ; } |
public class PlatformDescription { /** * The programming languages supported by the platform .
* @ param programmingLanguages
* The programming languages supported by the platform . */
public void setProgrammingLanguages ( java . util . Collection < PlatformProgrammingLanguage > programmingLanguages ) { } } | if ( programmingLanguages == null ) { this . programmingLanguages = null ; return ; } this . programmingLanguages = new com . amazonaws . internal . SdkInternalList < PlatformProgrammingLanguage > ( programmingLanguages ) ; |
public class TraversalStep { /** * End the traversal of the domain object graph matching a specific type of domain objects
* @ param domainObjectType
* @ return a DomainObjectMatch */
public < T > DomainObjectMatch < T > TO ( Class < T > domainObjectType ) { } } | TraversalExpression te = ( TraversalExpression ) this . astObject ; DomainObjectMatch < T > ret = APIAccess . createDomainObjectMatch ( domainObjectType , te . getQueryExecutor ( ) . getDomainObjectMatches ( ) . size ( ) , te . getQueryExecutor ( ) . getMappingInfo ( ) ) ; te . getQueryExecutor ( ) . getDomainObjectMat... |
public class VarOptItemsSketch { /** * Returns a sketch instance of this class from the given srcMem ,
* which must be a Memory representation of this sketch class .
* @ param < T > The type of item this sketch contains
* @ param srcMem a Memory representation of a sketch of this class .
* < a href = " { @ docR... | final int numPreLongs = getAndCheckPreLongs ( srcMem ) ; final ResizeFactor rf = ResizeFactor . getRF ( extractResizeFactor ( srcMem ) ) ; final int serVer = extractSerVer ( srcMem ) ; final int familyId = extractFamilyID ( srcMem ) ; final int flags = extractFlags ( srcMem ) ; final boolean isEmpty = ( flags & EMPTY_F... |
public class TreeElement { /** * Helper routine that will recursively search the tree for the node .
* @ param fullName The full name that we are looking for
* @ param currentName The name of the current node .
* @ return The node matching the name or < code > null < / code > */
private TreeElement findNodeRecurs... | String remainingName = null ; if ( ( currentName == null ) || ( fullName == null ) ) { return null ; } if ( getName ( ) . equals ( fullName ) ) { return this ; } if ( currentName . indexOf ( '.' ) > 0 ) { remainingName = currentName . substring ( currentName . indexOf ( '.' ) + 1 ) ; int nextIndex = - 1 ; if ( remainin... |
public class TargetHttpsProxyClient { /** * Creates a TargetHttpsProxy resource in the specified project using the data included in the
* request .
* < p > Sample code :
* < pre > < code >
* try ( TargetHttpsProxyClient targetHttpsProxyClient = TargetHttpsProxyClient . create ( ) ) {
* ProjectName project = P... | InsertTargetHttpsProxyHttpRequest request = InsertTargetHttpsProxyHttpRequest . newBuilder ( ) . setProject ( project ) . setTargetHttpsProxyResource ( targetHttpsProxyResource ) . build ( ) ; return insertTargetHttpsProxy ( request ) ; |
public class AStatisticsSupporter { /** * TODO : refactor the code to move the engine - specific computation to the corresponding ddf - on - x */
@ Override public FiveNumSummary [ ] getFiveNumSummary ( List < String > columnNames ) throws DDFException { } } | FiveNumSummary [ ] fivenums = new FiveNumSummary [ columnNames . size ( ) ] ; List < String > numericColumns = new ArrayList < String > ( ) ; // Filter non - numeric columns
for ( String columnName : columnNames ) { if ( ColumnType . isNumeric ( this . getDDF ( ) . getColumn ( columnName ) . getType ( ) ) ) { numericCo... |
public class X509CRLEntryImpl { /** * get an extension
* @ param oid ObjectIdentifier of extension desired
* @ returns Extension of type < extension > or null , if not found */
public Extension getExtension ( ObjectIdentifier oid ) { } } | if ( extensions == null ) return null ; // following returns null if no such OID in map
// XXX consider cloning this
return extensions . get ( OIDMap . getName ( oid ) ) ; |
public class Arguments { /** * Gets the first value for the key .
* @ param key the key to check for the value
* @ return the value or { @ code null } if the key is not found or the value was { @ code null } */
public String get ( final String key ) { } } | final Collection < Argument > args = map . get ( key ) ; if ( args != null ) { return args . iterator ( ) . hasNext ( ) ? args . iterator ( ) . next ( ) . getValue ( ) : null ; } return null ; |
public class PerPartitionTable { /** * Synchronized so that when the a single batch is filled up , we only queue one task to
* drain the queue . The task will drain the queue until it doesn ' t contain a single batch . */
synchronized void insertRowInTable ( final VoltBulkLoaderRow nextRow ) throws InterruptedExcepti... | m_partitionRowQueue . put ( nextRow ) ; if ( m_partitionRowQueue . size ( ) == m_minBatchTriggerSize ) { m_es . execute ( new Runnable ( ) { @ Override public void run ( ) { try { while ( m_partitionRowQueue . size ( ) >= m_minBatchTriggerSize ) { loadTable ( buildTable ( ) , m_table ) ; } } catch ( Exception e ) { loa... |
public class EpanetWrapper { /** * Retrieves the value of a specific link ( node ? ) parameter .
* @ param index the node index .
* @ param code the parameter code .
* @ return the value at the node .
* @ throws EpanetException */
public float ENgetnodevalue ( int index , NodeParameters code ) throws EpanetExce... | float [ ] nodeValue = new float [ 1 ] ; int error = epanet . ENgetnodevalue ( index , code . getCode ( ) , nodeValue ) ; checkError ( error ) ; return nodeValue [ 0 ] ; |
public class Patterns { /** * Returns a { @ link Pattern } that matches 0 or more characters satisfying { @ code predicate } . */
public static Pattern many ( final CharPredicate predicate ) { } } | return new Pattern ( ) { @ Override public int match ( CharSequence src , int begin , int end ) { return matchMany ( predicate , src , end , begin , 0 ) ; } @ Override public String toString ( ) { return predicate + "*" ; } } ; |
public class KeyGenUtil { /** * Generates a cache key by aggregating ( concatenating ) the output of
* each of the cache key generators in the array .
* @ param request The request object
* @ param keyGens The array
* @ return The aggregated cache key */
static public String generateKey ( HttpServletRequest req... | StringBuffer sb = new StringBuffer ( ) ; for ( ICacheKeyGenerator keyGen : keyGens ) { String key = keyGen . generateKey ( request ) ; if ( key != null && key . length ( ) > 0 ) { sb . append ( sb . length ( ) > 0 ? ";" : "" ) . append ( key ) ; // $ NON - NLS - 1 $ / / $ NON - NLS - 2 $
} } return sb . toString ( ) ; |
public class ApiOvhCloud { /** * Create interface on an instance and attached it to a network
* REST : POST / cloud / project / { serviceName } / instance / { instanceId } / interface
* @ param instanceId [ required ] Instance id
* @ param ip [ required ] Static ip ( Can only be defined for private networks )
*... | String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/interface" ; StringBuilder sb = path ( qPath , serviceName , instanceId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "ip" , ip ) ; addBody ( o , "networkId" , networkId ) ; String resp = exec ( qPath , "POST" ,... |
public class BinaryHashPartition { /** * After build phase .
* @ return build spill return buffer , if have spilled , it returns the current write buffer ,
* because it was used all the time in build phase , so it can only be returned at this time . */
int finalizeBuildPhase ( IOManager ioAccess , FileIOChannel . E... | this . finalBufferLimit = this . buildSideWriteBuffer . getCurrentPositionInSegment ( ) ; this . partitionBuffers = this . buildSideWriteBuffer . close ( ) ; if ( ! isInMemory ( ) ) { // close the channel .
this . buildSideChannel . close ( ) ; this . probeSideBuffer = FileChannelUtil . createOutputView ( ioAccess , pr... |
public class PasswordCipher { /** * Use the key to produce a clear text String from the cipherText . If no key
* is provided , or if no type is specified , just return the text as is . */
public static String decipher ( String key , String cipherText , String cipherType ) { } } | if ( key == null || key == "" ) { return cipherText ; } if ( cipherText == null ) { return null ; } if ( cipherType == null || cipherType == "" ) { return cipherText ; } else if ( "1" . equalsIgnoreCase ( cipherType ) ) { byte [ ] keyBytes = convertKeyToByteArray ( key ) ; byte [ ] cipherBytes = Base64 . decode ( ciphe... |
public class ZoneMeta { /** * Parse a custom time zone identifier and return the normalized
* custom time zone identifier for the given custom id string .
* @ param id a string of the form GMT [ + - ] hh : mm , GMT [ + - ] hhmm , or
* GMT [ + - ] hh .
* @ return The normalized custom id string . */
public stati... | int [ ] fields = new int [ 4 ] ; if ( parseCustomID ( id , fields ) ) { return formatCustomID ( fields [ 1 ] , fields [ 2 ] , fields [ 3 ] , fields [ 0 ] < 0 ) ; } return null ; |
public class Job { /** * Signal exceptional cancellation of this job .
* @ param msg cancellation message explaining reason for cancelation */
public void cancel ( final String msg ) { } } | JobState js = msg == null ? JobState . CANCELLED : JobState . FAILED ; cancel ( msg , js ) ; |
public class AnimaCache { /** * User - > users
* User - > t _ users
* @ param className
* @ param prefix
* @ return */
public static String getTableName ( String className , String prefix ) { } } | boolean hasPrefix = prefix != null && prefix . trim ( ) . length ( ) > 0 ; return hasPrefix ? English . plural ( prefix + "_" + AnimaUtils . toUnderline ( className ) , 2 ) : English . plural ( AnimaUtils . toUnderline ( className ) , 2 ) ; |
public class CoverageMonitor { /** * Records the given file as a dependency after some filtering .
* @ param f
* File to record as a dependency */
public static void addFileURL ( File f ) { } } | String absolutePath = f . getAbsolutePath ( ) ; if ( ! filterFile ( absolutePath ) ) { try { recordURL ( f . toURI ( ) . toURL ( ) . toExternalForm ( ) ) ; } catch ( MalformedURLException e ) { // Never expected .
} } |
public class PartitionManagerImpl { /** * Auxiliary function to transform a PartitionEntry object into a plain map representation . */
private void add ( Map < String , List < String > > partition , PartitionEntry entry ) { } } | String tenantId = entry . getTenantId ( ) ; String triggerId = entry . getTriggerId ( ) ; if ( partition . get ( tenantId ) == null ) { partition . put ( tenantId , new ArrayList < > ( ) ) ; } partition . get ( tenantId ) . add ( triggerId ) ; |
public class TeasyExpectedConditions { /** * Trick with zero coordinates for not - displayed element works only in FF */
private static boolean isElementHiddenUnderScroll ( WebElement element ) { } } | return ExecutionUtils . isFF ( ) && element . getLocation ( ) . getX ( ) > 0 && element . getLocation ( ) . getY ( ) > 0 ; |
public class AbstractSampleRandomGroupsController { /** * Do some magic to turn request parameters into a context object */
private ProctorContext getProctorContext ( final HttpServletRequest request ) throws IllegalAccessException , InstantiationException { } } | final ProctorContext proctorContext = contextClass . newInstance ( ) ; final BeanWrapper beanWrapper = new BeanWrapperImpl ( proctorContext ) ; for ( final PropertyDescriptor descriptor : beanWrapper . getPropertyDescriptors ( ) ) { final String propertyName = descriptor . getName ( ) ; if ( ! "class" . equals ( proper... |
public class BpmnParse { /** * Parses the start events of a certain level in the process ( process ,
* subprocess or another scope ) .
* @ param parentElement
* The ' parent ' element that contains the start events ( process ,
* subprocess ) .
* @ param scope
* The { @ link ScopeImpl } to which the start ev... | List < Element > startEventElements = parentElement . elements ( "startEvent" ) ; List < ActivityImpl > startEventActivities = new ArrayList < ActivityImpl > ( ) ; for ( Element startEventElement : startEventElements ) { ActivityImpl startEventActivity = createActivityOnScope ( startEventElement , scope ) ; parseAsynch... |
public class Row { /** * Returns an entry from a given column name as a LocalDate ( possibly null ) . Throws an IllegalArgumentException if the name is not defined
* in the header definition . Throws a DateTimeParseException if the underlying data is not a date in ISO local date format ( YYYY - MM - DD ) .
* @ para... | int index = _headerDefinition . columnIndex ( column ) ; return getLocalDate ( index ) ; |
public class DateTime { /** * Parses the prefix of the duration , the interval and returns it as a number .
* E . g . if you supply " 1d " it will return " 1 " . If you supply " 60m " it will
* return " 60 " .
* @ param duration The duration to parse in the format # units , e . g . " 1d " or " 60m "
* @ return ... | if ( duration == null || duration . isEmpty ( ) ) { throw new IllegalArgumentException ( "Duration cannot be null or empty" ) ; } if ( duration . contains ( "." ) ) { throw new IllegalArgumentException ( "Floating point intervals are not supported" ) ; } int unit = 0 ; while ( Character . isDigit ( duration . charAt ( ... |
public class DFAState { /** * Returns a set of nfA states to where it is possible to move by nfa transitions .
* @ param condition
* @ return */
Set < NFAState < T > > nfaTransitsFor ( CharRange condition ) { } } | Set < NFAState < T > > nset = new NumSet < > ( ) ; for ( NFAState < T > nfa : nfaSet ) { nset . addAll ( nfa . transit ( condition ) ) ; } return nset ; |
public class Vector2d { /** * / * ( non - Javadoc )
* @ see org . joml . Vector2dc # mul ( org . joml . Vector2dc , org . joml . Vector2d ) */
public Vector2d mul ( Vector2dc v , Vector2d dest ) { } } | dest . x = x * v . x ( ) ; dest . y = y * v . y ( ) ; return dest ; |
public class Group { /** * Returns the group ' s hierarchy */
private Vector get_hierarchy ( ) { } } | synchronized ( this ) { final Vector h = new Vector ( ) ; final Iterator it = elements . iterator ( ) ; while ( it . hasNext ( ) ) { final GroupElement e = ( GroupElement ) it . next ( ) ; if ( e instanceof GroupDeviceElement ) { h . add ( e ) ; } else { h . add ( ( ( Group ) e ) . get_hierarchy ( ) ) ; } } return h ; ... |
public class LdapIdentityStore { /** * Get the groups for the caller
* @ param context The { @ link DirContext } to use when performing the search .
* @ param callerDn The caller ' s distinguished name .
* @ return The set of groups the caller is a member of . */
private Set < String > getGroups ( DirContext cont... | Set < String > groups = null ; String groupSearchBase = idStoreDefinition . getGroupSearchBase ( ) ; String groupSearchFilter = idStoreDefinition . getGroupSearchFilter ( ) ; if ( groupSearchBase . isEmpty ( ) || groupSearchFilter . isEmpty ( ) ) { groups = getGroupsByMembership ( context , callerDn ) ; } else { groups... |
public class ShamirSecretSharing { /** * Verify if all shares have the same prime . If they do not , then they are not from the same series and cannot
* possibly be joined .
* @ param shares to check
* @ return true if all shares have the same prime , false if not . */
private static boolean checkSamePrimes ( Lis... | boolean ret = true ; BigInteger prime = null ; for ( SecretShare share : shares ) { if ( prime == null ) { prime = share . getPrime ( ) ; } else if ( ! prime . equals ( share . getPrime ( ) ) ) { ret = false ; break ; } } return ret ; |
public class wisite_binding { /** * Use this API to fetch wisite _ binding resources of given names . */
public static wisite_binding [ ] get ( nitro_service service , String sitepath [ ] ) throws Exception { } } | if ( sitepath != null && sitepath . length > 0 ) { wisite_binding response [ ] = new wisite_binding [ sitepath . length ] ; wisite_binding obj [ ] = new wisite_binding [ sitepath . length ] ; for ( int i = 0 ; i < sitepath . length ; i ++ ) { obj [ i ] = new wisite_binding ( ) ; obj [ i ] . set_sitepath ( sitepath [ i ... |
public class AuditSparqlProcessor { /** * Returns the Audit event type based on fedora event type and properties .
* @ param eventType from Fedora
* @ param properties associated with the Fedora event
* @ return Audit event */
private static Optional < String > getAuditEventType ( final List < String > eventType ... | // mapping event type / properties to audit event type
if ( eventType . contains ( EVENT_NAMESPACE + "ResourceCreation" ) || eventType . contains ( AS_NAMESPACE + "Create" ) ) { if ( resourceType . contains ( REPOSITORY + "Binary" ) ) { return of ( CONTENT_ADD ) ; } else { return of ( OBJECT_ADD ) ; } } else if ( event... |
public class PropertiesTableModel { /** * { @ inheritDoc } */
@ Override public String getColumnName ( final int columnIndex ) { } } | final PropertiesColumns column = PropertiesColumns . values ( ) [ columnIndex ] ; switch ( column ) { case KEY : return "Key" ; case VALUE : return "Value" ; } return "" ; |
public class EuclidianDistance { /** * Get the distance between two data samples .
* @ param sample1
* the first sample of < code > double < / code > values
* @ param sample2
* the second sample of < code > double < / code > values
* @ return the distance between < code > sample1 < / code > and
* < code > s... | int n = sample1 . length ; if ( n != sample2 . length || n < 1 ) throw new IllegalArgumentException ( "Input arrays must have the same length." ) ; double sumOfSquares = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( Double . isNaN ( sample1 [ i ] ) || Double . isNaN ( sample2 [ i ] ) ) continue ; sumOfSquares += ( sample... |
public class DefaultGroovyMethods { /** * Iterates through the Array calling the given closure condition for each item but stopping once the first non - null
* result is found and returning that result . If all results are null , null is returned .
* @ param self an Array
* @ param condition a closure that return... | return findResult ( new ArrayIterator < S > ( self ) , condition ) ; |
public class CdnManager { /** * 刷新文件外链和目录 , 外链每次不超过100个 , 目录每次不超过10个
* 刷新目录需要额外开通权限 , 可以联系七牛技术支持处理
* 参考文档 : < a href = " http : / / developer . qiniu . com / fusion / api / cache - refresh " > 缓存刷新 < / a >
* @ param urls 待刷新文件外链列表
* @ param dirs 待刷新目录列表
* @ return 刷新请求的回复 */
public CdnResult . RefreshResult r... | // check params
if ( urls != null && urls . length > MAX_API_REFRESH_URL_COUNT ) { throw new QiniuException ( new Exception ( "url count exceeds the max refresh limit per request" ) ) ; } if ( dirs != null && dirs . length > MAX_API_REFRESH_DIR_COUNT ) { throw new QiniuException ( new Exception ( "dir count exceeds the... |
public class ProxyRepo { /** * { @ inheritDoc } */
public ArtifactStore newInstance ( ) { } } | if ( factoryHelper == null ) { throw new IllegalStateException ( "FactoryHelper has not been set" ) ; } return new ProxyArtifactStore ( factoryHelper . getRepositoryMetadataManager ( ) , factoryHelper . getRemoteArtifactRepositories ( ) , factoryHelper . getRemotePluginRepositories ( ) , factoryHelper . getLocalReposit... |
public class DescribeVpcClassicLinkRequest { /** * This method is intended for internal use only . Returns the marshaled request configured with additional
* parameters to enable operation dry - run . */
@ Override public Request < DescribeVpcClassicLinkRequest > getDryRunRequest ( ) { } } | Request < DescribeVpcClassicLinkRequest > request = new DescribeVpcClassicLinkRequestMarshaller ( ) . marshall ( this ) ; request . addParameter ( "DryRun" , Boolean . toString ( true ) ) ; return request ; |
public class SpringApplication { /** * Get the bean definition registry .
* @ param context the application context
* @ return the BeanDefinitionRegistry if it can be determined */
private BeanDefinitionRegistry getBeanDefinitionRegistry ( ApplicationContext context ) { } } | if ( context instanceof BeanDefinitionRegistry ) { return ( BeanDefinitionRegistry ) context ; } if ( context instanceof AbstractApplicationContext ) { return ( BeanDefinitionRegistry ) ( ( AbstractApplicationContext ) context ) . getBeanFactory ( ) ; } throw new IllegalStateException ( "Could not locate BeanDefinition... |
public class A_CmsXmlDocument { /** * Corrects the structure of this XML document . < p >
* @ param cms the current OpenCms user context
* @ return the file that contains the corrected XML structure
* @ throws CmsXmlException if something goes wrong */
public CmsFile correctXmlStructure ( CmsObject cms ) throws C... | // apply XSD schema translation
Attribute schema = m_document . getRootElement ( ) . attribute ( I_CmsXmlSchemaType . XSI_NAMESPACE_ATTRIBUTE_NO_SCHEMA_LOCATION ) ; if ( schema != null ) { String schemaLocation = schema . getValue ( ) ; String translatedSchema = OpenCms . getResourceManager ( ) . getXsdTranslator ( ) .... |
public class LinuxResource { /** * calculate the disk usage at current filesystem
* @ return disk usage , from 0.0 ~ 1.0 */
public static Double getDiskUsage ( ) { } } | if ( ! OSInfo . isLinux ( ) && ! OSInfo . isMac ( ) ) { return 0.0 ; } try { String output = SystemOperation . exec ( "df -h " + duHome ) ; if ( output != null ) { String [ ] lines = output . split ( "[\\r\\n]+" ) ; if ( lines . length >= 2 ) { String [ ] parts = lines [ 1 ] . split ( "\\s+" ) ; if ( parts . length >= ... |
public class SibRaManagedConnection { /** * Used to indicate that an application local transaction has been rolled
* back . Notifies the connection event listeners .
* @ param connection
* the connection on which the transaction was started */
void localTransactionRolledBack ( final SibRaConnection connection ) {... | if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "localTransactionRolledBack" , connection ) ; } final ConnectionEvent event = new ConnectionEvent ( this , ConnectionEvent . LOCAL_TRANSACTION_ROLLEDBACK ) ; event . setConnectionHandle ( connection ) ; for ( ... |
public class ApiOvhSms { /** * Attempt a new validation after moderation refusal
* REST : POST / sms / { serviceName } / templatesControl / { name } / relaunchValidation
* @ param description [ required ] Template description
* @ param message [ required ] Message pattern to be moderated . Use " # VALUE # " forma... | String qPath = "/sms/{serviceName}/templatesControl/{name}/relaunchValidation" ; StringBuilder sb = path ( qPath , serviceName , name ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "description" , description ) ; addBody ( o , "message" , message ) ; exec ( qPath , "POST" , sb .... |
public class Comparing { /** * Evaluates max of two comparable elements .
* @ param < T > the element type
* @ param lhs the left element
* @ param rhs the right element
* @ return the greater element */
public static < T extends Comparable < T > > T max ( T lhs , T rhs ) { } } | return BinaryOperator . maxBy ( new ComparableComparator < T > ( ) ) . apply ( lhs , rhs ) ; |
public class OfflinerQueryHandler { /** * Retrieve a value saved for offline access .
* @ param context context used to retrieve the content resolver .
* @ param url key .
* @ return retrieved value or null if no entry match the given key . */
public String get ( Context context , String url ) { } } | final Cursor cursor = context . getContentResolver ( ) . query ( getUri ( OfflinerDBHelper . TABLE_CACHE ) , OfflinerDBHelper . PARAMS_CACHE , OfflinerDBHelper . REQUEST_URL + " = '" + url + "'" , null , null ) ; String result = null ; if ( cursor != null ) { if ( cursor . getCount ( ) != 0 ) { cursor . moveToFirst ( )... |
public class PropertyChangeSupport { /** * Fires a property change event to listeners
* that have been registered to track updates of
* all properties or a property with the specified name .
* No event is fired if the given event ' s old and new values are equal and non - null .
* @ param event the { @ code Pro... | Object oldValue = event . getOldValue ( ) ; Object newValue = event . getNewValue ( ) ; if ( oldValue == null || newValue == null || ! oldValue . equals ( newValue ) ) { String name = event . getPropertyName ( ) ; PropertyChangeListener [ ] common = this . map . get ( null ) ; PropertyChangeListener [ ] named = ( name ... |
public class DictionaryMaker { /** * 读取所有条目
* @ param path
* @ return */
public static List < Item > loadAsItemList ( String path ) { } } | List < Item > itemList = new LinkedList < Item > ( ) ; try { BufferedReader br = new BufferedReader ( new InputStreamReader ( IOAdapter == null ? new FileInputStream ( path ) : IOAdapter . open ( path ) , "UTF-8" ) ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { Item item = Item . create ( line ) ; i... |
public class JQMButton { /** * Works in case of this button placed on Header , Popup , . . . */
public void setPosOnBand ( PosOnBand value ) { } } | if ( value == null ) { getElement ( ) . removeClassName ( STYLE_UI_BTN_RIGHT ) ; getElement ( ) . removeClassName ( STYLE_UI_BTN_LEFT ) ; } else { switch ( value ) { case LEFT : getElement ( ) . addClassName ( STYLE_UI_BTN_LEFT ) ; break ; case RIGHT : getElement ( ) . addClassName ( STYLE_UI_BTN_RIGHT ) ; break ; } } |
public class CollisionFormulaConfig { /** * Export the current formula data to the formula node .
* @ param root The root node ( must not be < code > null < / code > ) .
* @ param formula The formula reference ( must not be < code > null < / code > ) .
* @ throws LionEngineException If error on writing . */
publi... | Check . notNull ( root ) ; Check . notNull ( formula ) ; final Xml node = root . createChild ( NODE_FORMULA ) ; node . writeString ( ATT_NAME , formula . getName ( ) ) ; CollisionRangeConfig . exports ( node , formula . getRange ( ) ) ; CollisionFunctionConfig . exports ( node , formula . getFunction ( ) ) ; CollisionC... |
public class DefaultLibraryLoader { /** * Load classes then perform load native library . */
@ Override public void load ( Callback < Void > callback , Class [ ] loadClasses ) { } } | boolean doNotLoad = false ; for ( Class clazzes : loadClasses ) { try { Class . forName ( clazzes . getName ( ) ) ; } catch ( ClassNotFoundException e ) { callback . onFailure ( e ) ; doNotLoad = true ; } } if ( ! doNotLoad ) { doLoad ( callback ) ; } |
public class ElementMatchers { /** * Matches a { @ link NamedElement } for an infix of its name .
* @ param infix The expected infix of the name .
* @ param < T > The type of the matched object .
* @ return An element matcher for a named element ' s name ' s infix . */
public static < T extends NamedElement > Ele... | return new NameMatcher < T > ( new StringMatcher ( infix , StringMatcher . Mode . CONTAINS ) ) ; |
public class BaseAttribute { /** * Check whether value is of allowed type and convert to an allowed type if possible . */
public static Object checkValue ( Object value ) { } } | if ( null == value ) return null ; if ( value instanceof Tag ) return ( ( Tag ) value ) . getName ( ) ; // name instead of ordinal to make decoding easier
Object result = value ; if ( result instanceof GString ) result = value . toString ( ) ; if ( result instanceof BaseAttribute ) { if ( log . isLoggable ( Level . WAR... |
public class ForwardCurve { /** * Create a forward curve from given times and given forwards .
* @ param name The name of this curve .
* @ param referenceDate The reference date for this code , i . e . , the date which defines t = 0.
* @ param paymentOffsetCode The maturity of the index modeled by this curve .
... | ForwardCurve forwardCurve = new ForwardCurve ( name , referenceDate , paymentOffsetCode , paymentBusinessdayCalendar , paymentDateRollConvention , interpolationMethod , extrapolationMethod , interpolationEntity , interpolationEntityForward , discountCurveName ) ; for ( int timeIndex = 0 ; timeIndex < times . length ; t... |
public class Packer { /** * Get the sprite a given location on the current sheet
* @ param x The x coordinate to look for the sprite
* @ param y The y coordinate to look for the sprite
* @ return The sprite found at the given location or null if no sprite can be found */
public Sprite getSpriteAt ( int x , int y ... | for ( int i = 0 ; i < sprites . size ( ) ; i ++ ) { if ( ( ( Sprite ) sprites . get ( i ) ) . contains ( x , y ) ) { return ( ( Sprite ) sprites . get ( i ) ) ; } } return null ; |
public class EvaluatorImpl { /** * Make a NumericValue from a standard wrapper subclass of Number */
public static int getType ( Number val ) { } } | if ( val instanceof Integer ) { return INT ; } else if ( val instanceof Long ) { return LONG ; } else if ( val instanceof Short ) { return SHORT ; } else if ( val instanceof Byte ) { return BYTE ; } else if ( val instanceof Double ) { return DOUBLE ; } else if ( val instanceof Float ) { return FLOAT ; } else throw new ... |
public class srecLexer { /** * $ ANTLR start " NEWLINE " */
public final void mNEWLINE ( ) throws RecognitionException { } } | try { int _type = NEWLINE ; int _channel = DEFAULT_TOKEN_CHANNEL ; // / home / victor / srec / core / src / main / antlr / srec . g : 151:2 : ( ( ( ' \ \ r ' ) ? ' \ \ n ' ( ' ' ) * ) + )
// / home / victor / srec / core / src / main / antlr / srec . g : 151:4 : ( ( ' \ \ r ' ) ? ' \ \ n ' ( ' ' ) * ) +
{ // / home / v... |
public class xen_smx_gsbvpx_image { /** * < pre >
* Use this operation to delete smx _ gsb XVA file .
* < / pre > */
public static xen_smx_gsbvpx_image delete ( nitro_service client , xen_smx_gsbvpx_image resource ) throws Exception { } } | resource . validate ( "delete" ) ; return ( ( xen_smx_gsbvpx_image [ ] ) resource . delete_resource ( client ) ) [ 0 ] ; |
public class SLF4JLoggerImpl { /** * Log an exception ( throwable ) at the ERROR level with an accompanying message . If the exception is null , then this method
* calls { @ link org . modeshape . common . logging . Logger # error ( org . modeshape . common . i18n . I18nResource , Object . . . ) } .
* @ param t the... | if ( ! isErrorEnabled ( ) ) return ; if ( t == null ) { error ( message , params ) ; return ; } if ( message == null ) { logger . error ( null , t ) ; return ; } logger . error ( message . text ( getLoggingLocale ( ) , params ) , t ) ; |
public class BaseDataAdaptiveTableLayoutAdapter { /** * Switch 2 columns headers with data
* @ param columnIndex column header from
* @ param columnToIndex column header to */
void switchTwoColumnHeaders ( int columnIndex , int columnToIndex ) { } } | Object cellData = getColumnHeaders ( ) [ columnToIndex ] ; getColumnHeaders ( ) [ columnToIndex ] = getColumnHeaders ( ) [ columnIndex ] ; getColumnHeaders ( ) [ columnIndex ] = cellData ; |
public class PlanAssembler { /** * Add a limit , pushed - down if possible , and return the new root .
* @ param root top of the original plan
* @ return new plan ' s root node */
private AbstractPlanNode handleSelectLimitOperator ( AbstractPlanNode root ) { } } | // The coordinator ' s top limit graph fragment for a MP plan .
// If planning " order by . . . limit " , getNextSelectPlan ( )
// will have already added an order by to the coordinator frag .
// This is the only limit node in a SP plan
LimitPlanNode topLimit = m_parsedSelect . getLimitNodeTop ( ) ; assert ( topLimit !... |
public class GbmMojoModel { /** * Corresponds to ` hex . tree . gbm . GbmMojoModel . score0 ( ) ` */
@ Override public final double [ ] score0 ( double [ ] row , double offset , double [ ] preds ) { } } | super . scoreAllTrees ( row , preds ) ; return unifyPreds ( row , offset , preds ) ; |
public class CalendarDay { /** * Get a new instance set to the specified day
* @ param date { @ linkplain LocalDate } to pull date information from . Passing null will return null
* @ return CalendarDay set to the specified date */
public static CalendarDay from ( @ Nullable LocalDate date ) { } } | if ( date == null ) { return null ; } return new CalendarDay ( date ) ; |
public class RegisteredResources { /** * Generates a new XidImpl to represent a new branch of this
* transaction .
* @ return A new XidImpl representing a new branch of this transaction . */
protected Xid generateNewBranch ( ) { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "generateNewBranch" ) ; // Create a new Xid branch
final XidImpl result = new XidImpl ( _txServiceXid , ++ _branchCount ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "generateNewBranch" , result ) ; return result ; |
public class ChannelFrameworkImpl { /** * @ see
* com . ibm . wsspi . channelfw . ChannelFramework # updateChannelWeight ( java . lang .
* String , int ) */
@ Override public synchronized ChannelData updateChannelWeight ( String channelName , int newWeight ) throws ChannelException { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "updateChannelWeight" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "channelName=" + channelName + ", newWeight=" + newWeight ) ; } if ( null == channelName ) { throw new... |
public class Server { /** * Stops the server gracefully .
* Do not call in action thread to avoid deadlock ( start a new thread or use { @ link # stopAtShutdown } ) . */
public void stop ( ) { } } | Log . info ( serverName ( ) + " gracefully stopping..." ) ; for ( EventLoopGroup g : eventLoopGroups ) { g . shutdownGracefully ( ) . awaitUninterruptibly ( ) ; } Log . info ( serverName ( ) + " gracefully stopped" ) ; |
public class DefaultCosHttpClient { /** * 获得异常发生时的返回信息 */
private String getExceptionMsg ( HttpRequest httpRequest , String exceptionStr ) { } } | String errMsg = new StringBuilder ( "HttpRequest:" ) . append ( httpRequest . toString ( ) ) . append ( "\nException:" ) . append ( exceptionStr ) . toString ( ) ; LOG . error ( errMsg ) ; return errMsg ; |
public class StarRegexPathElement { /** * @ param key : String key that needs to be escaped before compiling into regex .
* @ return : Metachar escaped key .
* Regex has some special meaning for the metachars [ . ^ $ | * + ? ( ) [ { \ ] . If any of these metachars is present in the pattern key that was passed , it ... | char [ ] keyChars = key . toCharArray ( ) ; // String . replace replaces all instances of the char sequence . So , it would try to escape the occurrence as many times as the occurrence frequency .
// For ex : if a key as 2 ' 5star . rating . 1 ' , it would escape it twice resulting in 5star / / . rating / / . 1.
// So ... |
public class AddonDependencyEntry { /** * Create a new { @ link AddonDependencyEntry } with the given attributes . */
public static AddonDependencyEntry create ( String name , VersionRange range ) { } } | return create ( name , range , false , false ) ; |
public class FrozenProperties { /** * Set a header style property using its name as the key . Please ensure the style name and value
* are appropriately configured or it may result in unexpected behavior .
* @ param styleName the style name as seen here { @ link Style # STYLE _ Z _ INDEX } for example .
* @ param... | headerStyleProps . put ( styleName , value ) ; return this ; |
public class Matrices { /** * Creates a minus function that subtracts given { @ code value } from it ' s argument .
* @ param arg a value to be subtracted from function ' s argument
* @ return a closure that does { @ code _ - _ } */
public static MatrixFunction asMinusFunction ( final double arg ) { } } | return new MatrixFunction ( ) { @ Override public double evaluate ( int i , int j , double value ) { return value - arg ; } } ; |
public class ObjectWritable { /** * Retrieve byte [ ] for given name . This should be done only for
* class and method names . the return value represents length and
* name as a byte array . If the name is not present , cache it , if
* the map max capacity is not exceeded . */
private static byte [ ] getByteNameW... | byte [ ] name = cachedByteClassNames . get ( entityName ) ; if ( name == null ) { name = prepareCachedNameBytes ( entityName ) ; // if the cache max capacity is not exceeded , cache the name
if ( cachedByteClassNames . size ( ) < CACHE_MAX_SIZE ) { cachedByteClassNames . put ( entityName , name ) ; } } // this should n... |
public class Matrix4x3d { /** * / * ( non - Javadoc )
* @ see org . joml . Matrix4x3dc # getTransposedFloats ( int , java . nio . ByteBuffer ) */
public ByteBuffer getTransposedFloats ( int index , ByteBuffer buffer ) { } } | MemUtil . INSTANCE . putfTransposed ( this , index , buffer ) ; return buffer ; |
public class lbmetrictable_metric_binding { /** * Use this API to count the filtered set of lbmetrictable _ metric _ binding resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static long count_filtered ( nitro_service service , String metrictable , String filte... | lbmetrictable_metric_binding obj = new lbmetrictable_metric_binding ( ) ; obj . set_metrictable ( metrictable ) ; options option = new options ( ) ; option . set_count ( true ) ; option . set_filter ( filter ) ; lbmetrictable_metric_binding [ ] response = ( lbmetrictable_metric_binding [ ] ) obj . getfiltered ( service... |
public class MessagingSecurityUtility { /** * Create AuthenticationData Object from the UserName and Password passed
* @ param userName
* @ param password
* @ return */
public static AuthenticationData createAuthenticationData ( String userName , String password ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "createAuthenticationData" , new Object [ ] { userName , "Password Not Traced" } ) ; } AuthenticationData authData = new WSAuthenticationData ( ) ; if ( userName == null ) userName = "" ; if ( password == null... |
public class ByteArrayList { /** * Adds all the elements in the given array to the array list .
* @ param values The values to add to the array list . */
public void add ( byte [ ] values ) { } } | ensureCapacity ( size + values . length ) ; for ( byte element : values ) { this . add ( element ) ; } |
public class SyncPointInfo { /** * < code > optional string syncPointUri = 1 ; < / code > */
public java . lang . String getSyncPointUri ( ) { } } | java . lang . Object ref = syncPointUri_ ; if ( ref instanceof java . lang . String ) { return ( java . lang . String ) ref ; } else { com . google . protobuf . ByteString bs = ( com . google . protobuf . ByteString ) ref ; java . lang . String s = bs . toStringUtf8 ( ) ; if ( bs . isValidUtf8 ( ) ) { syncPointUri_ = s... |
public class TimestampUtils { /** * Parse a string and return a LocalTime representing its value .
* @ param s The ISO formated time string to parse .
* @ return null if s is null or a LocalTime of the parsed string s .
* @ throws SQLException if there is a problem parsing s . */
public LocalTime toLocalTime ( St... | if ( s == null ) { return null ; } if ( s . equals ( "24:00:00" ) ) { return LocalTime . MAX ; } try { return LocalTime . parse ( s ) ; } catch ( DateTimeParseException nfe ) { throw new PSQLException ( GT . tr ( "Bad value for type timestamp/date/time: {1}" , s ) , PSQLState . BAD_DATETIME_FORMAT , nfe ) ; } |
public class AddressDivisionGrouping { /** * this does not handle overflow , overflow should be checked before calling this */
protected static < R extends AddressSection , S extends AddressSegment > R increment ( R section , long increment , BigInteger bigIncrement , AddressCreator < ? , R , ? , S > addrCreator , Supp... | if ( ! section . isMultiple ( ) ) { return add ( section , bigIncrement , addrCreator , prefixLength ) ; } boolean isDecrement = increment <= 0 ; if ( isDecrement ) { return add ( lowerProducer . get ( ) , bigIncrement , addrCreator , prefixLength ) ; } BigInteger count = section . getCount ( ) ; BigInteger incrementPl... |
public class CmsFunctionRenderer { /** * Helper method for cached reading of resources under specific , fixed paths . < p >
* @ param cms the current CMS context
* @ param path the path to read
* @ return the resource which has been read */
private static CmsResource getDefaultResource ( CmsObject cms , String pa... | CmsResource resource = ( CmsResource ) CmsVfsMemoryObjectCache . getVfsMemoryObjectCache ( ) . getCachedObject ( cms , path ) ; if ( resource == null ) { try { resource = cms . readResource ( path ) ; CmsVfsMemoryObjectCache . getVfsMemoryObjectCache ( ) . putCachedObject ( cms , path , resource ) ; } catch ( CmsExcept... |
public class SibTr { /** * If debug level tracing is enabled then trace a byte array using formatted
* output with offsets . Duplicate output lines are suppressed to save space .
* @ param tc the non - null < code > TraceComponent < / code > the event is associated
* with .
* @ param data the byte array to be t... | int length = 0 ; if ( data != null ) length = data . length ; bytes ( null , tc , data , 0 , length , "" ) ; |
public class OrmReader { /** * COMPLEXITY : ON */
private static < T > T statementToObject ( final PreparedStatement stmt , final T target , final Object ... args ) throws SQLException { } } | populateStatementParameters ( stmt , args ) ; try ( final ResultSet resultSet = stmt . executeQuery ( ) ) { if ( resultSet . next ( ) ) { return resultSetToObject ( resultSet , target ) ; } return null ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } finally { stmt . close ( ) ; } |
public class AbstractAmazonDynamoDBAsync { /** * Simplified method form for invoking the UpdateTable operation .
* @ see # updateTableAsync ( UpdateTableRequest ) */
@ Override public java . util . concurrent . Future < UpdateTableResult > updateTableAsync ( String tableName , ProvisionedThroughput provisionedThrough... | return updateTableAsync ( new UpdateTableRequest ( ) . withTableName ( tableName ) . withProvisionedThroughput ( provisionedThroughput ) ) ; |
public class systemglobal_binding { /** * Use this API to fetch a systemglobal _ binding resource . */
public static systemglobal_binding get ( nitro_service service ) throws Exception { } } | systemglobal_binding obj = new systemglobal_binding ( ) ; systemglobal_binding response = ( systemglobal_binding ) obj . get_resource ( service ) ; return response ; |
public class GrammarInfo { /** * Extracts the declared package name from the specified grammar file .
* @ param grammar
* The contents of the grammar file , must not be < code > null < / code > .
* @ return The declared package name or an empty string if not found . */
private String findPackageName ( final Strin... | final String packageDeclaration = "package\\s+([^\\s.;]+(\\.[^\\s.;]+)*)\\s*;" ; final Matcher matcher = Pattern . compile ( packageDeclaration ) . matcher ( grammar ) ; if ( matcher . find ( ) ) { return matcher . group ( 1 ) ; } return "" ; |
public class PatchedBigQueryTableRowIterator { /** * Executes the specified query and returns a reference to the temporary BigQuery table created
* to hold the results .
* @ throws IOException if the query fails . */
private TableReference executeQueryAndWaitForCompletion ( ) throws IOException , InterruptedExcepti... | checkState ( projectId != null , "Unable to execute a query without a configured project id" ) ; checkState ( queryConfig != null , "Unable to execute a query without a configured query" ) ; // Dry run query to get source table location
Job dryRunJob = new Job ( ) . setConfiguration ( new JobConfiguration ( ) . setQuer... |
public class TaskManagerTabPanel { /** * Executes the Task */
public void runTask ( ) { } } | MainTask tasks [ ] = new MainTask [ jTableAlgorithms . getModel ( ) . getRowCount ( ) * jTableStreams . getModel ( ) . getRowCount ( ) ] ; int taskCount = 0 ; String dir = "" ; try { this . currentTask = ( MainTask ) ClassOption . cliStringToObject ( this . jTextFieldTask . getText ( ) , MainTask . class , null ) ; } c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.