signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class OntopMappingConfigurationImpl { /** * Can be overloaded by sub - classes */
@ Override protected ImmutableMap < Class < ? extends QueryOptimizationProposal > , Class < ? extends ProposalExecutor > > generateOptimizationConfigurationMap ( ) { } } | ImmutableMap . Builder < Class < ? extends QueryOptimizationProposal > , Class < ? extends ProposalExecutor > > internalExecutorMapBuilder = ImmutableMap . builder ( ) ; internalExecutorMapBuilder . putAll ( super . generateOptimizationConfigurationMap ( ) ) ; internalExecutorMapBuilder . putAll ( optimizationConfigura... |
public class AbstractNeo4jDatastore { /** * Ensures that an index exists for the given label and property .
* @ param session
* The datastore session
* @ param label
* The label .
* @ param propertyMethodMetadata
* The property metadata .
* @ param unique
* if < code > true < / code > create a unique co... | PropertyMetadata propertyMetadata = propertyMethodMetadata . getDatastoreMetadata ( ) ; String statement ; if ( unique ) { LOGGER . debug ( "Creating constraint for label {} on property '{}'." , label , propertyMetadata . getName ( ) ) ; statement = String . format ( "CREATE CONSTRAINT ON (n:%s) ASSERT n.%s IS UNIQUE" ... |
public class ExecutionTransitioner { /** * Used for job and flow .
* @ return */
public ExecutionStatus doExecutionLoop ( ) { } } | final String methodName = "doExecutionLoop" ; // Before we do anything else , see if we ' re already in STOPPING state .
if ( runtimeExecution . getBatchStatus ( ) . equals ( BatchStatus . STOPPING ) ) { logger . fine ( methodName + " Exiting execution loop as job is now in stopping state." ) ; return new ExecutionStat... |
public class AbstractSetVisible { /** * Apply the action against the target .
* @ param target the target of the action
* @ param value is the evaluated value . */
@ Override protected void applyAction ( final SubordinateTarget target , final Object value ) { } } | if ( value instanceof Boolean ) { boolean visible = ( ( Boolean ) value ) ; target . setValidate ( visible ) ; ( ( AbstractWComponent ) target ) . setHidden ( ! visible ) ; } |
public class ComparatorCompat { /** * Adds the comparator , that uses a function for extract
* a { @ code double } sort key , to the chain .
* @ param keyExtractor the function that extracts the sort key
* @ return the new { @ code ComparatorCompat } instance */
@ NotNull public ComparatorCompat < T > thenCompari... | return thenComparing ( comparingDouble ( keyExtractor ) ) ; |
public class ServerInstanceLogRecordListImpl { /** * / * ( non - Javadoc )
* @ see com . ibm . websphere . logging . hpel . reader . ServerInstanceLogRecordList # getChildren ( ) */
public Map < String , ServerInstanceLogRecordList > getChildren ( ) { } } | HashMap < String , ServerInstanceLogRecordList > map = new HashMap < String , ServerInstanceLogRecordList > ( ) ; if ( traceBrowser == null ) { for ( Map . Entry < String , LogRepositoryBrowser > entry : logBrowser . getSubProcesses ( ) . entrySet ( ) ) { ServerInstanceLogRecordList value = new ServerInstanceLogRecordL... |
public class GroupDefImpl { /** * / * ( non - Javadoc )
* @ see org . jboss . arquillian . impl . configuration . ArquillianDescriptorImpl # container ( java . lang . String ) */
@ Override public ContainerDef container ( String name ) { } } | return new GroupContainerDefImpl ( getDescriptorName ( ) , getRootNode ( ) , group , group . getOrCreate ( "container@qualifier=" + name ) ) ; |
public class VirtualNetworkGatewaysInner { /** * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group .
* @ param resourceGroupName The name of the resource group .
* @ param virtualNetworkGatewayName The name of the virtual network gateway .
* @ param paramet... | return generatevpnclientpackageWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName , parameters ) . map ( new Func1 < ServiceResponse < String > , String > ( ) { @ Override public String call ( ServiceResponse < String > response ) { return response . body ( ) ; } } ) ; |
public class TangoUtil { /** * Get the list of device names which matches the pattern p
* @ param deviceNamePattern
* The pattern . The wild char is *
* @ return A list of device names
* @ throws DevFailed */
public static String [ ] getDevicesForPattern ( final String deviceNamePattern ) throws DevFailed { } } | String [ ] devices ; // is p a device name or a device name pattern ?
if ( ! deviceNamePattern . contains ( "*" ) ) { // p is a pure device name
devices = new String [ 1 ] ; devices [ 0 ] = TangoUtil . getfullNameForDevice ( deviceNamePattern ) ; } else { // ask the db the list of device matching pattern p
final Databa... |
public class AbstractBehavioredComponent { /** * { @ inheritDoc } */
@ Override @ SuppressWarnings ( "unchecked" ) protected void manageOptionalData ( ) { } } | // Parse optional data provided to search Behavior Class or BehaviorData
for ( final Object data : key ( ) . optionalData ( ) ) { if ( data instanceof BehaviorData ) { addBehavior ( ( BehaviorData ) data ) ; } else if ( data instanceof Class && ( ( Class < ? > ) data ) . isAssignableFrom ( Behavior . class ) ) { addBeh... |
public class BinderExtension { /** * / * @ Override */
public < S , T > FromUnmarshaller < S , T > findUnmarshaller ( Class < S > source , Class < T > target , Class < ? extends Annotation > qualifier ) { } } | return BINDING . findUnmarshaller ( source , target , qualifier ) ; |
public class DescribeIamInstanceProfileAssociationsResult { /** * Information about the IAM instance profile associations .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setIamInstanceProfileAssociations ( java . util . Collection ) } or
* { @ link # with... | if ( this . iamInstanceProfileAssociations == null ) { setIamInstanceProfileAssociations ( new com . amazonaws . internal . SdkInternalList < IamInstanceProfileAssociation > ( iamInstanceProfileAssociations . length ) ) ; } for ( IamInstanceProfileAssociation ele : iamInstanceProfileAssociations ) { this . iamInstanceP... |
public class ErrorDetectingWrapper { /** * The basic graph error looks like this :
* < pre >
* error : {
* type : " OAuthException "
* message : " Error validating application . "
* < / pre > */
protected void checkForStandardGraphError ( JsonNode node ) { } } | JsonNode errorNode = node . get ( "error" ) ; if ( errorNode != null ) { // If we ' re missing type or message , it must be some other kind of error
String type = errorNode . path ( "type" ) . textValue ( ) ; if ( type == null ) return ; String msg = errorNode . path ( "message" ) . textValue ( ) ; if ( msg == null ) r... |
public class Criteria { /** * Creates new { @ link Predicate } for { @ code ! geodist } .
* @ param circle
* @ return
* @ since 1.2 */
public Criteria within ( Circle circle ) { } } | Assert . notNull ( circle , "Circle for 'within' must not be 'null'." ) ; return within ( circle . getCenter ( ) , circle . getRadius ( ) ) ; |
public class XMLUtils { /** * Returns a String in which some the XML special characters have been
* escaped : just the ones that need escaping in an element content .
* @ param in The String to escape
* @ return The escaped String */
public static String escapeElementXML ( String in ) { } } | int leng = in . length ( ) ; StringBuilder sb = new StringBuilder ( leng ) ; for ( int i = 0 ; i < leng ; i ++ ) { char c = in . charAt ( i ) ; if ( c == '&' ) { sb . append ( "&" ) ; } else if ( c == '<' ) { sb . append ( "<" ) ; } else if ( c == '>' ) { sb . append ( ">" ) ; } else { sb . append ( c ) ; } }... |
public class BoxFile { /** * Uploads a new version of this file , replacing the current version , while reporting the progress to a
* ProgressListener . Note that only users with premium accounts will be able to view and recover previous versions
* of the file .
* @ param fileContent a stream containing the new f... | return this . uploadNewVersion ( fileContent , null , modified , fileSize , listener ) ; |
public class FieldDefinition { /** * Parse the field definition rooted at the given UNode and store the definition in
* this object . The given UNode is the field node , hence its name is the field name
* and its chuildren are field attributes such as " type " and and " inverse " . An
* exception is thrown if the... | assert fieldNode != null ; // Set field name .
setName ( fieldNode . getName ( ) ) ; // Parse the nodes child nodes . If we find a " fields " definition , just save it
// for later .
for ( String childName : fieldNode . getMemberNames ( ) ) { // See if we recognize it .
UNode childNode = fieldNode . getMember ( childNa... |
public class HadoopLogParser { /** * Parse a date found in the Hadoop log .
* @ return a Calendar representing the date */
protected Calendar parseDate ( String strDate , String strTime ) { } } | Calendar retval = Calendar . getInstance ( ) ; // set date
String [ ] fields = strDate . split ( "-" ) ; retval . set ( Calendar . YEAR , Integer . parseInt ( fields [ 0 ] ) ) ; retval . set ( Calendar . MONTH , Integer . parseInt ( fields [ 1 ] ) ) ; retval . set ( Calendar . DATE , Integer . parseInt ( fields [ 2 ] )... |
public class BELParser { /** * Parses a { @ link Statement } from a BEL statement { @ link String } . Returns
* the { @ link Statement } if parse succeeded , { @ code null } if parse failed .
* @ param belStatementSyntax { @ link String }
* @ return { @ link Statement } if parse succeeded ; { @ code null } if par... | if ( noLength ( belStatementSyntax ) ) return null ; CharStream stream = new ANTLRStringStream ( belStatementSyntax ) ; BELStatementLexer lexer = new BELStatementLexer ( stream ) ; TokenStream tokenStream = new CommonTokenStream ( lexer ) ; BELStatementParser bsp = new BELStatementParser ( tokenStream ) ; try { return ... |
public class ProcessEngineConfigurationImpl { /** * session factories / / / / / */
public void initSessionFactories ( ) { } } | if ( sessionFactories == null ) { sessionFactories = new HashMap < Class < ? > , SessionFactory > ( ) ; if ( usingRelationalDatabase ) { initDbSqlSessionFactory ( ) ; } addSessionFactory ( new GenericManagerFactory ( EntityCache . class , EntityCacheImpl . class ) ) ; } if ( customSessionFactories != null ) { for ( Ses... |
public class ComputerVisionImpl { /** * This operation generates a description of an image in human readable language with complete sentences . The description is based on a collection of content tags , which are also returned by the operation . More than one description can be generated for each image . Descriptions a... | return ServiceFuture . fromResponse ( describeImageWithServiceResponseAsync ( url , describeImageOptionalParameter ) , serviceCallback ) ; |
public class ZonedDateTime { /** * Obtains an instance of { @ code ZonedDateTime } from the instant formed by combining
* the local date - time and offset .
* This creates a zoned date - time by { @ link LocalDateTime # toInstant ( ZoneOffset ) combining }
* the { @ code LocalDateTime } and { @ code ZoneOffset } ... | Objects . requireNonNull ( localDateTime , "localDateTime" ) ; Objects . requireNonNull ( offset , "offset" ) ; Objects . requireNonNull ( zone , "zone" ) ; if ( zone . getRules ( ) . isValidOffset ( localDateTime , offset ) ) { return new ZonedDateTime ( localDateTime , offset , zone ) ; } return create ( localDateTim... |
public class sslvserver_sslciphersuite_binding { /** * Use this API to count the filtered set of sslvserver _ sslciphersuite _ binding resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static long count_filtered ( nitro_service service , String vservername , St... | sslvserver_sslciphersuite_binding obj = new sslvserver_sslciphersuite_binding ( ) ; obj . set_vservername ( vservername ) ; options option = new options ( ) ; option . set_count ( true ) ; option . set_filter ( filter ) ; sslvserver_sslciphersuite_binding [ ] response = ( sslvserver_sslciphersuite_binding [ ] ) obj . g... |
public class RecommendationsInner { /** * Disables the specified rule so it will not apply to a subscription in the future .
* Disables the specified rule so it will not apply to a subscription in the future .
* @ param name Rule name
* @ param serviceCallback the async ServiceCallback to handle successful and fa... | return ServiceFuture . fromResponse ( disableRecommendationForSubscriptionWithServiceResponseAsync ( name ) , serviceCallback ) ; |
public class InterconnectAttachmentClient { /** * Updates the specified interconnect attachment with the data included in the request . This
* method supports PATCH semantics and uses the JSON merge patch format and processing rules .
* < p > Sample code :
* < pre > < code >
* try ( InterconnectAttachmentClient... | PatchInterconnectAttachmentHttpRequest request = PatchInterconnectAttachmentHttpRequest . newBuilder ( ) . setInterconnectAttachment ( interconnectAttachment == null ? null : interconnectAttachment . toString ( ) ) . setInterconnectAttachmentResource ( interconnectAttachmentResource ) . addAllFieldMask ( fieldMask ) . ... |
public class NIOTool { /** * See { @ link Files # getAttribute ( Path , String , LinkOption . . . ) } .
* @ param path See { @ link Files # getAttribute ( Path , String , LinkOption . . . ) }
* @ param attribute See { @ link Files # getAttribute ( Path , String , LinkOption . . . ) }
* @ param options See { @ lin... | try { return Files . getAttribute ( path , attribute , options ) ; } catch ( IOException e ) { return null ; } |
public class SQLUtils { /** * 获得软删除SQL
* @ param t
* @ param values
* @ return */
public static < T > String getSoftDeleteSQL ( T t , Column softDeleteColumn , List < Object > values ) { } } | String setSql = getColumnName ( softDeleteColumn ) + "=" + softDeleteColumn . softDelete ( ) [ 1 ] ; return getCustomDeleteSQL ( t , values , setSql ) ; |
public class IdentityMap { /** * Removes the mapping for this key from this map if present .
* @ param key key whose mapping is to be removed from the map .
* @ return previous value associated with specified key , or < tt > null < / tt >
* if there was no mapping for key . A < tt > null < / tt > return can
* a... | Entry tab [ ] = mTable ; int hash = System . identityHashCode ( key ) ; int index = ( hash & 0x7FFFFFFF ) % tab . length ; for ( Entry e = tab [ index ] , prev = null ; e != null ; e = e . mNext ) { Object entryKey = e . getKey ( ) ; if ( entryKey == null ) { // Clean up after a cleared Reference .
mModCount ++ ; if ( ... |
public class CmsHelpTemplateBean { /** * Generates the HTML for the online help frameset or redirects to the help body , depending on the build frameset flag . < p >
* @ return the HTML for the online help frameset or an empty String ( redirect )
* @ throws IOException if redirection fails */
public String displayH... | String result = "" ; // change to online project to allow static export / export links
try { getJsp ( ) . getRequestContext ( ) . setCurrentProject ( m_onlineProject ) ; if ( isBuildFrameset ( ) ) { // build the online help frameset
result = displayFrameset ( ) ; } else { // redirect to the help body
StringBuffer bodyL... |
public class CPDefinitionSpecificationOptionValuePersistenceImpl { /** * Returns all the cp definition specification option values where CPDefinitionId = & # 63 ; and CPOptionCategoryId = & # 63 ; .
* @ param CPDefinitionId the cp definition ID
* @ param CPOptionCategoryId the cp option category ID
* @ return the... | return findByC_COC ( CPDefinitionId , CPOptionCategoryId , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ; |
public class NetworkServiceDescriptorAgent { /** * Returns a specific PhysicalNetworkFunctionDescriptor that is contained in a particular
* NetworkServiceDescriptor .
* @ param idNsd the NetworkServiceDescriptr ' s ID
* @ param idPnf the PhysicalNetworkFunctionDescriptor ' s ID
* @ return the PhysicalNetworkFun... | String url = idNsd + "/pnfdescriptors" + "/" + idPnf ; return ( PhysicalNetworkFunctionDescriptor ) requestGetWithStatusAccepted ( url , PhysicalNetworkFunctionDescriptor . class ) ; |
public class EscapeProcessor { /** * Process the text
* @ param source the sourcetext
* @ return the result of text processing
* @ see TextProcessor # process ( CharSequence ) */
public CharSequence process ( CharSequence source ) { } } | if ( source != null && source . length ( ) > 0 ) { String stringSource = source instanceof String ? ( String ) source : source . toString ( ) ; // Array to cache founded indexes of sequences
int [ ] indexes = new int [ escape . length ] ; Arrays . fill ( indexes , - 1 ) ; int length = source . length ( ) ; int offset =... |
public class MultiPart { /** * 将文件流读进bytes , 如果超出max指定的值则返回null
* @ param max 最大长度限制
* @ return 内容
* @ throws IOException 异常 */
public byte [ ] getContentBytes ( long max ) throws IOException { } } | ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; return save ( max , out ) ? out . toByteArray ( ) : null ; |
public class BootPropsTranslator { public Properties readConfigProps ( String propFile ) { } } | final InputStream ins = getClass ( ) . getClassLoader ( ) . getResourceAsStream ( propFile ) ; if ( ins == null ) { throw new IllegalStateException ( "Not found the config file in classpath: " + propFile ) ; } final Properties props = new Properties ( ) ; try { props . load ( ins ) ; } catch ( IOException e ) { throw n... |
public class MockiEbean { /** * Set a mock implementation of EbeanServer as the default server .
* Typically the mock instance passed in is created by Mockito or similar tool .
* The default EbeanSever is the instance returned by { @ link Ebean # getServer ( String ) } when the
* server name is null .
* @ param... | // using $ mock as the server name
EbeanServer original = Ebean . mock ( "$mock" , mock , true ) ; if ( mock instanceof DelegateAwareEbeanServer ) { ( ( DelegateAwareEbeanServer ) mock ) . withDelegateIfRequired ( original ) ; } return new MockiEbean ( mock , original ) ; |
public class JPartLabel { /** * / * ( non - Javadoc )
* @ see abc . ui . swing . JText # render ( java . awt . Graphics2D ) */
public double render ( Graphics2D g2 ) { } } | double labelSize = ( double ) getMetrics ( ) . getTextFontWidth ( ScoreElements . PART_LABEL , getText ( ) ) ; Font previousFont = g2 . getFont ( ) ; Color previousColor = g2 . getColor ( ) ; setColor ( g2 , ScoreElements . PART_LABEL ) ; Rectangle2D bb = getBoundingBox ( ) ; g2 . setFont ( getTemplate ( ) . getTextFon... |
public class FlowController { /** * Add a property - related message as an expression that will be evaluated and shown with the Errors and Error tags .
* @ param propertyName the name of the property with which to associate this error .
* @ param expression the expression that will be evaluated to generate the erro... | PageFlowUtils . addActionErrorExpression ( getRequest ( ) , propertyName , expression , messageArgs ) ; |
public class ThriftClientFactory { /** * Gets the pool using policy .
* @ return pool an the basis of LoadBalancing policy . */
private ConnectionPool getPoolUsingPolicy ( ) { } } | if ( ! hostPools . isEmpty ( ) ) { return ( ConnectionPool ) loadBalancingPolicy . getPool ( hostPools . values ( ) ) ; } throw new KunderaException ( "All hosts are down. please check servers manully." ) ; |
public class Search { /** * Returns for given parameter < i > _ name < / i > the instance of class
* { @ link Command } .
* @ param _ name name to search in the cache
* @ return instance of class { @ link Command }
* @ throws CacheReloadException on error */
public static Search get ( final String _name ) throw... | return AbstractUserInterfaceObject . < Search > get ( _name , Search . class , CIAdminUserInterface . Search . getType ( ) ) ; |
public class CompositeParsedAttribute { /** * Creates internal representation of the attribute value .
* @ param name name of the attribute
* @ param value list of child attribute values of the attribute within the environment
* @ return internal representation of the composite attribute value */
private static C... | final Map < String , Value > map = new HashMap < > ( value . size ( ) ) ; for ( final ParsedAttribute < ? > attr : value ) { map . put ( attr . getName ( ) , attr . getValue ( ) ) ; } return new CompositeValue ( name , map ) ; |
public class ServerRequestQueue { /** * < p > Gets the queued { @ link ServerRequest } object at position with index specified in the supplied
* parameter , within the queue . Like { @ link # peek ( ) } , the item is not removed from the queue . < / p >
* @ param index An { @ link Integer } that specifies the posit... | ServerRequest req = null ; synchronized ( reqQueueLockObject ) { try { req = queue . get ( index ) ; } catch ( IndexOutOfBoundsException | NoSuchElementException ignored ) { } } return req ; |
public class Field { /** * Returns true if this message is generated by parser as a
* holder for a map entries . */
public boolean isMap ( ) { } } | if ( type instanceof Message ) { Message message = ( Message ) type ; return message . isMapEntry ( ) ; } return false ; |
public class CmsJspElFunctions { /** * Returns an OpenCms user context created from an Object . < p >
* < ul >
* < li > If the input is already a { @ link CmsObject } , it is casted and returned unchanged .
* < li > If the input is a { @ link ServletRequest } , the OpenCms user context is read from the request co... | CmsObject result ; if ( input instanceof CmsObject ) { result = ( CmsObject ) input ; } else if ( input instanceof ServletRequest ) { result = CmsFlexController . getCmsObject ( ( ServletRequest ) input ) ; } else if ( input instanceof PageContext ) { result = CmsFlexController . getCmsObject ( ( ( PageContext ) input ... |
public class Descriptor { /** * Replace all the service calls provided by this descriptor with the the given service calls .
* @ param calls The calls to replace the existing ones with .
* @ return A copy of this descriptor with the new calls . */
public Descriptor replaceAllCalls ( PSequence < Call < ? , ? > > cal... | return new Descriptor ( name , calls , pathParamSerializers , messageSerializers , serializerFactory , exceptionSerializer , autoAcl , acls , headerFilter , locatableService , circuitBreaker , topicCalls ) ; |
public class DateContext { /** * Check if all values in the given data are valid and that the result will
* be a valid date .
* @ param month The month ( 1-12)
* @ param day The day ( 1-31)
* @ param year The year ( 4 - digit )
* @ param hour The hour ( 0-23)
* @ param minute The minutes ( 0-59)
* @ param... | boolean valid = true ; try { valid = isValidDate ( Integer . parseInt ( month ) , Integer . parseInt ( day ) , Integer . parseInt ( year ) , Integer . parseInt ( hour ) , Integer . parseInt ( minute ) , Integer . parseInt ( second ) , Integer . parseInt ( millisecond ) ) ; } catch ( NumberFormatException nfe ) { valid ... |
public class SrvFieldShoppingCartWriterXml { /** * Write standard field of entity into a stream
* ( writer - file or pass it through network ) .
* @ param pAddParam additional params ( e . g . exclude fields set )
* @ param pField value
* @ param pFieldName Field Name
* @ param pWriter writer
* @ throws Exc... | String fieldValue ; if ( pField == null ) { fieldValue = "NULL" ; } else { if ( Cart . class != pField . getClass ( ) ) { throw new ExceptionWithCode ( ExceptionWithCode . CONFIGURATION_MISTAKE , "It's wrong service to write that field: " + pField + "/" + pFieldName ) ; } fieldValue = ( ( Cart ) pField ) . getBuyer ( )... |
public class ZipkinExporter { /** * Registers the { @ code ZipkinExporter } .
* @ param spanExporter the instance of the { @ code SpanExporter } where this service is registered . */
@ VisibleForTesting static void register ( SpanExporter spanExporter , Handler handler ) { } } | ZipkinTraceExporter . register ( spanExporter , handler ) ; |
public class PearClockSkin { /** * * * * * * Canvas * * * * * */
private void drawTicks ( ) { } } | double sinValue ; double cosValue ; double startAngle = 180 ; double angleStep = 360 / 240 + 0.5 ; Point2D center = new Point2D ( size * 0.5 , size * 0.5 ) ; Color hourTickMarkColor = clock . getHourTickMarkColor ( ) ; Color minuteTickMarkColor = clock . getMinuteTickMarkColor ( ) ; Color tickLabelColor = clock . getTi... |
public class NotifierBase { /** * Display dynamically an Ui model . < br >
* This method is called from the JIT ( JRebirth Internal Thread ) < br >
* Creates the model and its root node . < br >
* Then attach it according to the placeholder defined into the wave : < br >
* < ul >
* < li > JRebirthWaves . ATTA... | if ( wave . componentClass ( ) == null ) { LOGGER . error ( MODEL_NOT_FOUND_ERROR , wave . toString ( ) ) ; // When developer mode is activated an error will be thrown by logger
// Otherwise the wave will be managed by UnprocessedWaveHandler
this . unprocessedWaveHandler . manageUnprocessedWave ( MODEL_NOT_FOUND_MESSAG... |
public class JQMList { /** * Ignores dividers , only counts JQMListItem bands .
* @ return - logical index of this item among other items ( can be useful for matching / sync
* between underlying data structure and UI in case of dynamic / multiple dividers
* and JQMListItem ' s click handlers ) . */
public int fin... | if ( item == null ) return - 1 ; List < JQMListItem > items = getItems ( ) ; if ( items == null ) return - 1 ; int i = items . indexOf ( item ) ; if ( i == - 1 ) return - 1 ; int j = 0 ; for ( JQMListItem k : items ) { if ( k == null ) continue ; if ( k == item ) return j ; j ++ ; } return - 1 ; |
public class LocaleUtil { /** * Handles Locales that can be passed to tags as instances of String or Locale .
* If the parameter is an instance of Locale , it is simply returned .
* If the parameter is a String and is not empty , then it is parsed to a Locale
* using { @ link LocaleUtil # parseLocale ( String ) }... | if ( stringOrLocale instanceof Locale ) { return ( Locale ) stringOrLocale ; } else if ( stringOrLocale instanceof String ) { String string = ( String ) stringOrLocale ; if ( string . length ( ) == 0 ) { return null ; } else { return parseLocale ( string . trim ( ) ) ; } } else { return null ; } |
public class diff_match_patch { /** * Look through the patches and break up any which are longer than the
* maximum limit of the match algorithm . Intended to be called only from
* within patch _ apply .
* @ param patches
* LinkedList of Patch objects . */
public void patch_splitMax ( LinkedList < Patch > patch... | short patch_size = Match_MaxBits ; String precontext , postcontext ; Patch patch ; int start1 , start2 ; boolean empty ; Operation diff_type ; String diff_text ; ListIterator < Patch > pointer = patches . listIterator ( ) ; Patch bigpatch = pointer . hasNext ( ) ? pointer . next ( ) : null ; while ( bigpatch != null ) ... |
public class MetricsUtil { /** * Utility method to return the named context .
* If the desired context cannot be created for any reason , the exception
* is logged , and a null context is returned . */
public static MetricsContext getContext ( String refName , String contextName ) { } } | MetricsContext metricsContext ; try { metricsContext = ContextFactory . getFactory ( ) . getContext ( refName , contextName ) ; if ( ! metricsContext . isMonitoring ( ) ) { metricsContext . startMonitoring ( ) ; } } catch ( Exception ex ) { LOG . error ( "Unable to create metrics context " + contextName , ex ) ; metric... |
public class DatePanel { /** * Refresh day btn tables */
@ SuppressWarnings ( "deprecation" ) private void refreshDayBtns ( ) { } } | remove ( daysPanel ) ; daysPanel = new JPanel ( ) ; daysPanel . removeAll ( ) ; daysPanel . setLayout ( new GridLayout ( 0 , 7 ) ) ; int displayYear = getDisplayYear ( ) ; int displayMonth = getDisplayMonth ( ) ; String [ ] days = getDays ( displayYear , displayMonth - 1 ) ; addDayHeadLabels ( ) ; Date d = picker . get... |
public class HibernateAdapter { /** * Hibernate adapter initialization . Read Hibernate properties from configuration object and create the session
* factory ; also configure connections pool . All properties from configuration object are passed as they are to
* Hibernate session factory builder .
* Scan and regi... | log . trace ( "config(Config)" ) ; // Hibernate configuration class is the session factory builder
Configuration configuration = null ; // Hibernate configuration resource is not null if config parameter is null - for zero - config , or provided by config
// parameter itself as attribute
String configResource = config ... |
public class SimpleTriggerBuilder { /** * Build the actual Trigger - - NOT intended to be invoked by end users , but will rather be invoked
* by a TriggerBuilder which this ScheduleBuilder is given to . */
@ Override public OperableTrigger instantiate ( ) { } } | SimpleTriggerImpl st = new SimpleTriggerImpl ( ) ; st . setRepeatInterval ( interval ) ; st . setRepeatCount ( repeatCount ) ; st . setMisfireInstruction ( misfireInstruction ) ; return st ; |
public class KenBurnsView { /** * Fires an end event on { @ link # mTransitionListener } ;
* @ param transition the transition that just ended . */
private void fireTransitionEnd ( Transition transition ) { } } | if ( mTransitionListener != null && transition != null ) { mTransitionListener . onTransitionEnd ( transition ) ; } |
public class ModelsImpl { /** * Updates one of the closed list ' s sublists .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param clEntityId The closed list entity extractor ID .
* @ param subListId The sublist ID .
* @ param wordListBaseUpdateObject A sublist update object con... | return updateSubListWithServiceResponseAsync ( appId , versionId , clEntityId , subListId , wordListBaseUpdateObject ) . map ( new Func1 < ServiceResponse < OperationStatus > , OperationStatus > ( ) { @ Override public OperationStatus call ( ServiceResponse < OperationStatus > response ) { return response . body ( ) ; ... |
public class NumberMap { /** * Creates a NumberMap for Longs .
* @ param < K >
* @ return NumberMap < K > */
public static < K > NumberMap < K , Long > newLongMap ( ) { } } | return new NumberMap < K , Long > ( ) { @ Override public void add ( K key , Long addend ) { put ( key , containsKey ( key ) ? ( get ( key ) + addend ) : addend ) ; } @ Override public void sub ( K key , Long subtrahend ) { put ( key , ( containsKey ( key ) ? get ( key ) : 0l ) - subtrahend ) ; } } ; |
public class ImageMiscOps { /** * Inserts a single band into a multi - band image overwriting the original band
* @ param input Single band image
* @ param band Which band the image is to be inserted into
* @ param output The multi - band image which the input image is to be inserted into */
public static void in... | final int numBands = output . numBands ; for ( int y = 0 ; y < input . height ; y ++ ) { int indexIn = input . getStartIndex ( ) + y * input . getStride ( ) ; int indexOut = output . getStartIndex ( ) + y * output . getStride ( ) + band ; int end = indexOut + output . width * numBands - band ; for ( ; indexOut < end ; ... |
public class RecoveryManager { /** * Informs the RecoveryManager that the transaction service is being shut
* down .
* The shutdown method can be driven in one of two ways : -
* 1 . Real server shutdown . The TxServiceImpl . destroy method runs through
* all its FailureScopeControllers and calls shutdown on the... | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "preShutdown" , transactionsLeft ) ; try { // Terminate partner log activity
getPartnerLogTable ( ) . terminate ( ) ; // 172471
// If the tranlog is null then we ' re using in memory logging and
// the work the shutdown the log is not required .
if ( _tranLog != null ) {... |
public class ManagedCompletableFuture { /** * Because CompletableFuture . supplyAsync is static , this is not a true override .
* It will be difficult for the user to invoke this method because they would need to get the class
* of the CompletableFuture implementation and locate the static supplyAsync method on tha... | throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.supplyAsync" ) ) ; |
public class DescribeSecurityGroupReferencesRequest { /** * The IDs of the security groups in your account .
* @ return The IDs of the security groups in your account . */
public java . util . List < String > getGroupId ( ) { } } | if ( groupId == null ) { groupId = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return groupId ; |
public class JTune { /** * apply stemming policy to an element */
private void applyStemmingPolicy ( JScoreElementAbstract element ) { } } | if ( element != null && element instanceof JStemmableElement ) { JStemmableElement stemmable = ( JStemmableElement ) element ; if ( stemmable . isFollowingStemmingPolicy ( ) ) { byte noteStemPolicy = ( byte ) getTemplate ( ) . getAttributeNumber ( ScoreAttribute . NOTE_STEM_POLICY ) ; if ( noteStemPolicy == STEMS_AUTO ... |
public class ClassLoaderUtil { /** * Load a given resource .
* This method will try to load the resource using the following methods ( in
* order ) :
* < ul >
* < li > From Thread . currentThread ( ) . getContextClassLoader ( )
* < li > From ClassLoaderUtil . class . getClassLoader ( )
* < li > callingClass... | URL url = Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( resourceName ) ; if ( url == null ) { url = ClassLoaderUtil . class . getClassLoader ( ) . getResource ( resourceName ) ; } if ( url == null ) { ClassLoader cl = callingClass . getClassLoader ( ) ; if ( cl != null ) { url = cl . getResourc... |
public class TypeUtil { /** * JDK 5.0 has a bug of creating { @ link GenericArrayType } where it shouldn ' t .
* fix that manually to work around the problem .
* See bug 6202725. */
private static Type fix ( Type t ) { } } | if ( ! ( t instanceof GenericArrayType ) ) return t ; GenericArrayType gat = ( GenericArrayType ) t ; if ( gat . getGenericComponentType ( ) instanceof Class ) { Class c = ( Class ) gat . getGenericComponentType ( ) ; return Array . newInstance ( c , 0 ) . getClass ( ) ; } return t ; |
public class CmsJspInstanceDateBean { /** * Returns a flag , indicating if the current event is a multi - day event .
* The method is only called if the single event has an explicitely set end date
* or an explicitely changed whole day option .
* @ return a flag , indicating if the current event takes lasts over ... | long duration = getEnd ( ) . getTime ( ) - getStart ( ) . getTime ( ) ; if ( duration > I_CmsSerialDateValue . DAY_IN_MILLIS ) { return true ; } if ( isWholeDay ( ) && ( duration <= I_CmsSerialDateValue . DAY_IN_MILLIS ) ) { return false ; } Calendar start = new GregorianCalendar ( ) ; start . setTime ( getStart ( ) ) ... |
public class HttpOutboundServiceContextImpl { /** * Method to start an asynchronous read for the first response message on
* this exchange . It must be only called once per request / response . This
* contains the logic to handle request verification , read - ahead handling ,
* etc .
* @ return VirtualConnectio... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "startResponseRead" ) ; } HttpInvalidMessageException inv = checkRequestValidity ( ) ; if ( null != inv ) { getAppWriteCallback ( ) . error ( getVC ( ) , inv ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEn... |
public class Props { /** * Return value if available in current Props otherwise return from parent */
public String get ( final Object key ) { } } | if ( this . _current . containsKey ( key ) ) { return this . _current . get ( key ) ; } else if ( this . _parent != null ) { return this . _parent . get ( key ) ; } else { return null ; } |
public class PresenceSubscriber { /** * This method removes this buddy from the SipPhone buddy list and initiates a SUBSCRIBE / NOTIFY
* sequence to terminate the subscription unless the subscription is already terminated .
* Regardless , this buddy is taken out of the active buddy list and put into the retired bud... | if ( parent . getBuddyList ( ) . get ( targetUri ) == null ) { setReturnCode ( SipSession . INVALID_ARGUMENT ) ; setErrorMessage ( "Buddy removal for URI " + targetUri + " failed, not found in buddy list." ) ; return false ; } Request req = createSubscribeMessage ( 0 , eventId ) ; if ( req == null ) { return false ; } ... |
public class CardNumberEditText { /** * Updates the selection index based on the current ( pre - edit ) index , and
* the size change of the number being input .
* @ param newLength the post - edit length of the string
* @ param editActionStart the position in the string at which the edit action starts
* @ para... | int newPosition , gapsJumped = 0 ; Set < Integer > gapSet = Card . AMERICAN_EXPRESS . equals ( mCardBrand ) ? SPACE_SET_AMEX : SPACE_SET_COMMON ; boolean skipBack = false ; for ( Integer gap : gapSet ) { if ( editActionStart <= gap && editActionStart + editActionAddition > gap ) { gapsJumped ++ ; } // editActionAdditio... |
public class FilenameUtil { /** * Determines whether the { @ code parent } directory contains the { @ code child } element ( a file or directory ) .
* The files names are expected to be normalized .
* Edge cases :
* < ul >
* < li > A { @ code directory } must not be null : if null , throw IllegalArgumentExcepti... | // Fail fast against NullPointerException
if ( canonicalParent == null ) { throw new IllegalArgumentException ( "Directory must not be null" ) ; } if ( canonicalChild == null ) { return false ; } if ( IOCase . SYSTEM . checkEquals ( canonicalParent , canonicalChild ) ) { return false ; } return IOCase . SYSTEM . checkS... |
public class Parameter { /** * サブパラメータを生成する 。 パラメータ値がBeanの場合 、 プロパティ名に対応するフィールド値をパラメータ値とする サブパラメータを作成して返す 。
* @ param propertyName プロパティ名
* @ return パラメータ */
@ SuppressWarnings ( "rawtypes" ) public Parameter createSubParameter ( final String propertyName ) { } } | String subParameterName = parameterName + "." + propertyName ; Object subValue = null ; if ( value != null ) { if ( value instanceof Map ) { subValue = ( ( Map ) value ) . get ( propertyName ) ; if ( subValue == null ) { LOG . warn ( "Set subparameter value to NULL because property can not be accessed.[{}]" , subParame... |
public class JavacState { /** * For all packages , find all sources belonging to the package , group the sources
* based on their transformers and apply the transformers on each source code group . */
private boolean perform ( CompilationService sjavac , File outputDir , Map < String , Transformer > suffixRules ) { }... | boolean rc = true ; // Group sources based on transforms . A source file can only belong to a single transform .
Map < Transformer , Map < String , Set < URI > > > groupedSources = new HashMap < > ( ) ; for ( Source src : now . sources ( ) . values ( ) ) { Transformer t = suffixRules . get ( src . suffix ( ) ) ; if ( t... |
public class DeviceProxyDAODefaultImpl { public void write_attribute_reply ( final DeviceProxy deviceProxy , final int id ) throws DevFailed { } } | final Request request = ApiUtil . get_async_request ( id ) ; try { if ( deviceProxy . device_5 != null || deviceProxy . device_4 != null ) { check_asynch_reply ( deviceProxy , request , id , "write_attributes_4" ) ; } else if ( deviceProxy . device_3 != null ) { check_asynch_reply ( deviceProxy , request , id , "write_... |
public class FactoryDerivative { /** * Filters for computing the gradient of { @ link Planar } images .
* @ param type Which gradient to compute
* @ param numBands Number of bands in the image
* @ param inputType Type of data on input
* @ param derivType Type of data on output ( null for default )
* @ param <... | ImageGradient < I , D > g = gradientSB ( type , inputType , derivType ) ; return new ImageGradient_PL < > ( g , numBands ) ; |
public class ImagesInner { /** * Gets an image .
* @ param resourceGroupName The name of the resource group .
* @ param imageName The name of the image .
* @ param expand The expand expression to apply on the operation .
* @ param serviceCallback the async ServiceCallback to handle successful and failed respons... | return ServiceFuture . fromResponse ( getByResourceGroupWithServiceResponseAsync ( resourceGroupName , imageName , expand ) , serviceCallback ) ; |
public class ClassWriter { /** * Adds a number or string constant to the constant pool of the class being
* build . Does nothing if the constant pool already contains a similar item .
* @ param cst
* the value of the constant to be added to the constant pool .
* This parameter must be an { @ link Integer } , a ... | if ( cst instanceof Integer ) { int val = ( ( Integer ) cst ) . intValue ( ) ; return newInteger ( val ) ; } else if ( cst instanceof Byte ) { int val = ( ( Byte ) cst ) . intValue ( ) ; return newInteger ( val ) ; } else if ( cst instanceof Character ) { int val = ( ( Character ) cst ) . charValue ( ) ; return newInte... |
public class Check { /** * Ensures that a passed map as a parameter of the calling method is not empty .
* @ param array
* a map which should not be empty
* @ param name
* name of object reference ( in source code )
* @ return the passed reference that is not empty
* @ throws IllegalNullArgumentException
... | IllegalNullArgumentException . class , IllegalEmptyArgumentException . class } ) public static < T > T [ ] notEmpty ( @ Nonnull final T [ ] array , @ Nullable final String name ) { notNull ( array ) ; notEmpty ( array , array . length == 0 , EMPTY_ARGUMENT_NAME ) ; return array ; |
public class MutableRoaringBitmap { /** * If present remove the specified integer ( effectively , sets its bit value to false )
* @ param x integer value representing the index in a bitmap
* @ return true if the unset bit was already in the bitmap */
public boolean checkedRemove ( final int x ) { } } | final short hb = BufferUtil . highbits ( x ) ; final int i = highLowContainer . getIndex ( hb ) ; if ( i < 0 ) { return false ; } MappeableContainer C = highLowContainer . getContainerAtIndex ( i ) ; int oldcard = C . getCardinality ( ) ; C . remove ( BufferUtil . lowbits ( x ) ) ; int newcard = C . getCardinality ( ) ... |
public class Formatter { /** * Formats the description into a String using format specific tags .
* @ param description description to be formatted
* @ return string representation of the description */
public String format ( Description description ) { } } | for ( BlockElement blockElement : description . getBlocks ( ) ) { blockElement . format ( this ) ; } return finalizeFormatting ( ) ; |
public class JvmTypeParameterImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setDeclarator ( JvmTypeParameterDeclarator newDeclarator ) { } } | if ( newDeclarator != eInternalContainer ( ) || ( eContainerFeatureID ( ) != TypesPackage . JVM_TYPE_PARAMETER__DECLARATOR && newDeclarator != null ) ) { if ( EcoreUtil . isAncestor ( this , newDeclarator ) ) throw new IllegalArgumentException ( "Recursive containment not allowed for " + toString ( ) ) ; NotificationCh... |
public class UnorderedListPanel { /** * { @ inheritDoc } */
@ Override protected Component newListComponent ( final String id , final ListItem < ResourceBundleKey > item ) { } } | return ComponentFactory . newLabel ( id , ResourceModelFactory . newResourceModel ( item . getModel ( ) . getObject ( ) , this ) ) ; |
public class XQuery { /** * Returns the text content of this node .
* @ return this { @ link XQuery } node ' s text content , non recursively . */
public @ Nonnull String text ( ) { } } | return new NodeListSpliterator ( node . getChildNodes ( ) ) . stream ( ) . filter ( it -> it instanceof Text ) . map ( it -> ( ( Text ) it ) . getNodeValue ( ) ) . collect ( joining ( ) ) ; |
public class IOUtils { /** * Write object to temp file which is destroyed when the program exits .
* @ param o
* object to be written to file
* @ param filename
* name of the temp file
* @ throws IOException
* If file cannot be written
* @ return File containing the object */
public static File writeObjec... | File file = File . createTempFile ( filename , ".tmp" ) ; file . deleteOnExit ( ) ; ObjectOutputStream oos = new ObjectOutputStream ( new BufferedOutputStream ( new GZIPOutputStream ( new FileOutputStream ( file ) ) ) ) ; oos . writeObject ( o ) ; oos . close ( ) ; return file ; |
public class WebServer { /** * Start
* @ exception Throwable If an error occurs */
public void start ( ) throws Throwable { } } | stop ( ) ; if ( executorService != null ) { server = new Server ( new ExecutorThreadPool ( executorService ) ) ; } else { server = new Server ( ) ; } MBeanContainer jmx = new MBeanContainer ( mbeanServer != null ? mbeanServer : ManagementFactory . getPlatformMBeanServer ( ) ) ; server . addBean ( jmx ) ; Configuration ... |
public class SystemKeyspace { /** * Record tokens being used by another node */
public static synchronized void updateTokens ( InetAddress ep , Collection < Token > tokens ) { } } | if ( ep . equals ( FBUtilities . getBroadcastAddress ( ) ) ) { removeEndpoint ( ep ) ; return ; } String req = "INSERT INTO system.%s (peer, tokens) VALUES (?, ?)" ; executeInternal ( String . format ( req , PEERS_CF ) , ep , tokensAsSet ( tokens ) ) ; |
public class StringBuilderFutureAppendable { /** * ( non - Javadoc )
* @ see java . util . concurrent . Future # get ( ) */
@ Override public CharSequence get ( ) throws ExecutionException { } } | try { this . futureBuilder . performAppends ( ) ; } catch ( IOException | HttpErrorPage e ) { throw new ExecutionException ( e ) ; } return this . builder . toString ( ) ; |
public class ToPojo { /** * Returns the string representation of the code that reads an object property from a reference using a getter .
* @ param ref The reference .
* @ param source The type of the reference .
* @ param property The property to read .
* @ return The code . */
private static String readObject... | return ref + "." + getterOf ( source , property ) . getName ( ) + "()" ; |
public class TimeUtils { /** * Creates a date string in the format specified for this instance of the class .
* @ param date
* @ return */
public String createDateString ( Date date ) { } } | if ( date == null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Null Date object provided; returning null" ) ; } return null ; } if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Creating date string based on date: " + date ) ; } String formatted = simpleDateFormat . format ( date ) ; return formatted ; |
public class FutureUtil { /** * Check if all futures are done
* @ param futures the list of futures
* @ return { @ code true } if all futures are done */
public static boolean allDone ( Collection < Future > futures ) { } } | for ( Future f : futures ) { if ( ! f . isDone ( ) ) { return false ; } } return true ; |
public class GCMBaseIntentService { /** * Called from the broadcast receiver .
* Will process the received intent , call handleMessage ( ) , registered ( ) ,
* etc . in background threads , with a wake lock , while keeping the service
* alive . */
static void runIntentInService ( Context context , Intent intent ,... | synchronized ( LOCK ) { if ( sWakeLock == null ) { // This is called from BroadcastReceiver , there is no init .
PowerManager pm = ( PowerManager ) context . getSystemService ( Context . POWER_SERVICE ) ; sWakeLock = pm . newWakeLock ( PowerManager . PARTIAL_WAKE_LOCK , WAKELOCK_KEY ) ; } } Log . v ( TAG , "Acquiring w... |
public class RsWithCookie { /** * Build cookie string .
* @ param name Cookie name
* @ param value Value of it
* @ param attrs Optional attributes , for example " Path = / "
* @ return Text */
private static String make ( final CharSequence name , final CharSequence value , final CharSequence ... attrs ) { } } | final StringBuilder text = new StringBuilder ( String . format ( "%s=%s;" , name , value ) ) ; for ( final CharSequence attr : attrs ) { text . append ( attr ) . append ( ';' ) ; } return text . toString ( ) ; |
public class NamingCodecFactory { /** * Creates a codec only for registration .
* @ param factory an identifier factory
* @ return a codec */
static Codec < NamingMessage > createRegistryCodec ( final IdentifierFactory factory ) { } } | final Map < Class < ? extends NamingMessage > , Codec < ? extends NamingMessage > > clazzToCodecMap = new HashMap < > ( ) ; clazzToCodecMap . put ( NamingRegisterRequest . class , new NamingRegisterRequestCodec ( factory ) ) ; clazzToCodecMap . put ( NamingRegisterResponse . class , new NamingRegisterResponseCodec ( ne... |
public class HttpSimulatorConfig { /** * Configures the HttpSimulator running on the specified serverURL ( e . g . http : / / localhost : 8080 ) with the specified
* root path and useRootRelativePath .
* @ param rootPath the rootPath
* @ param useRootRelativePath the useRootRelativePath
* @ param serverURL the ... | HttpURLConnection con = null ; try { String urlString = new StringBuilder ( ) . append ( serverURL ) . append ( "/?" ) . append ( Constants . ROOT_PATH ) . append ( "=" ) . append ( rootPath ) . append ( "&" ) . append ( Constants . USE_ROOT_RELATIVE_PATH ) . append ( "=" ) . append ( String . valueOf ( useRootRelative... |
public class UCharacterIterator { /** * Retreat to the start of the previous code point in the text , and return it ( pre - decrement semantics ) . If the
* index is not preceeded by a valid surrogate pair , the behavior is the same as < code > previous ( ) < / code > . Otherwise
* the iterator is decremented to th... | int ch1 = previous ( ) ; if ( UTF16 . isTrailSurrogate ( ( char ) ch1 ) ) { int ch2 = previous ( ) ; if ( UTF16 . isLeadSurrogate ( ( char ) ch2 ) ) { return Character . toCodePoint ( ( char ) ch2 , ( char ) ch1 ) ; } else if ( ch2 != DONE ) { // unmatched trail surrogate so back out
next ( ) ; } } return ch1 ; |
public class ESFilterBuilder { /** * Gets the or filter builder .
* @ param logicalExp
* the logical exp
* @ param m
* the m
* @ param entity
* the entity
* @ return the or filter builder */
private OrQueryBuilder getOrFilterBuilder ( Expression logicalExp , EntityMetadata m ) { } } | OrExpression orExp = ( OrExpression ) logicalExp ; Expression leftExpression = orExp . getLeftExpression ( ) ; Expression rightExpression = orExp . getRightExpression ( ) ; return new OrQueryBuilder ( populateFilterBuilder ( leftExpression , m ) , populateFilterBuilder ( rightExpression , m ) ) ; |
public class JedisUtils { /** * Create a new { @ link JedisCluster } with default pool configs .
* @ param hostsAndPorts
* format { @ code host1 : port1 , host2 : port2 , . . . } , default Redis port is used if not
* specified
* @ param password
* @ return */
public static JedisCluster newJedisCluster ( Strin... | return newJedisCluster ( defaultJedisPoolConfig ( ) , hostsAndPorts , password ) ; |
public class GeoShapeBase { /** * This is used to fix Kryo serialization issues with lists generated from methods such as
* { @ link java . util . Arrays # asList ( Object [ ] ) } */
protected < T > List < ? extends List < T > > toArrayLists ( List < List < T > > lists ) { } } | for ( int i = 0 ; i < lists . size ( ) ; i ++ ) { List < T > list = lists . get ( i ) ; lists . set ( i , toArrayList ( list ) ) ; } return lists ; |
public class TimestampStreamReader { /** * This comes from the Apache Hive ORC code */
private static int parseNanos ( long serialized ) { } } | int zeros = ( ( int ) serialized ) & 0b111 ; int result = ( int ) ( serialized >>> 3 ) ; if ( zeros != 0 ) { for ( int i = 0 ; i <= zeros ; ++ i ) { result *= 10 ; } } return result ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.