signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcTendonAnchorType ( ) { } }
if ( ifcTendonAnchorTypeEClass == null ) { ifcTendonAnchorTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 707 ) ; } return ifcTendonAnchorTypeEClass ;
public class TaskManagementFunctionRequestParser { /** * { @ inheritDoc } */ @ Override protected final void deserializeBytes1to3 ( final int line ) throws InternetSCSIException { } }
functionCode = FunctionCode . valueOf ( ( byte ) ( line & Constants . SECOND_BYTE_MASK ) ) ; Utils . isReserved ( line & Constants . LAST_TWO_BYTES_MASK ) ;
public class AnchorageSimulator { /** * Starts simulating anchorige . * @ param locationSource * @ param period Update rate in millis . * @ param isDaemon Sets timer thread . In single thread this should be false . * This parament is used only if external Timer was not provided ! * @ throws IOException */ pub...
this . locationSource = locationSource ; dis = new DataInputStream ( new BufferedInputStream ( url . openStream ( ) ) ) ; if ( timer == null ) { timer = new Timer ( "AnchorageSimulator" , isDaemon ) ; } timer . scheduleAtFixedRate ( this , 0 , period ) ;
public class ProteinModificationXmlReader { /** * Read protein modifications from XML file and register them . * @ param isXml { @ link InputStream } of the XML file . * @ throws IOException if failed to read the XML file . * @ throws ParserConfigurationException if parse errors occur . * @ throws SAXException ...
if ( isXml == null ) { throw new IllegalArgumentException ( "Null argument." ) ; } DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; Document doc = builder . parse ( isXml ) ; NodeList modNodes = doc . getElementsByTagName ( "Entry" ...
public class DistributedCache { /** * Clear the entire contents of the cache and delete the backing files . This * should only be used when the server is reinitializing , because the users * are going to lose their files . */ public static void purgeCache ( Configuration conf , MRAsyncDiskService service ) throws I...
synchronized ( cachedArchives ) { LocalFileSystem localFs = FileSystem . getLocal ( conf ) ; for ( Map . Entry < String , CacheStatus > f : cachedArchives . entrySet ( ) ) { try { deleteLocalPath ( service , localFs , f . getValue ( ) . localizedLoadPath ) ; } catch ( IOException ie ) { LOG . debug ( "Error cleaning up...
public class GUIObjectDetails { /** * Method to validate the keys against the { @ link HtmlSeLionElementSet } or { @ link IOSSeLionElementSet } as per the * { @ link TestPlatform } * @ param keysToValidate * the keys from the Page Yaml input * @ param dataFileName * The file name containing the keys * @ par...
for ( String currentKey : keysToValidate ) { // For case : Invalid element inside a container , the key inside a container is split using delimiter . // It will be assigned to the currentKey to proceed with the validation . if ( currentKey . contains ( DELIMITER ) ) { String [ ] keyInContainer = currentKey . split ( DE...
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link PrimeMeridianType } { @ code > } * @ param value * Java instance representing xml element ' s value . * @ return * the new instance of { @ link JAXBElement } { @ code < } { @ link PrimeMeridianType } { @ code >...
return new JAXBElement < PrimeMeridianType > ( _PrimeMeridian_QNAME , PrimeMeridianType . class , null , value ) ;
public class DefaultPojoBindingFactory { @ Override @ SuppressWarnings ( "unchecked" ) public synchronized < P > PojoBinding < P > createPojoBinding ( Class < P > pojoType ) { } }
DefaultPojoBinding < P > binding = ( DefaultPojoBinding < P > ) bindingMap . get ( pojoType ) ; if ( binding == null ) { binding = new DefaultPojoBinding < > ( pojoType ) ; bindingMap . put ( pojoType , binding ) ; List < Facet > keyFacets = injectFacetBindings ( binding , pojoType ) ; injectKeyBinding ( binding , pojo...
public class StopWatch { /** * Stop ( or re - stop ) stopwatch * @ return */ public synchronized void stop ( ) { } }
if ( state != State . STOPPED ) { nanoTimeStop = System . nanoTime ( ) ; state = State . STOPPED ; }
public class ResolvedType { /** * Method that will try to find type parameterization this type * has for specified super type * @ return List of type parameters for specified supertype ( which may * be empty , if supertype is not a parametric type ) ; null if specified * type is not a super type of this type */...
ResolvedType type = findSupertype ( erasedSupertype ) ; if ( type != null ) { return type . typeParams ( ) ; } return null ;
public class SignUpRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( SignUpRequest signUpRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( signUpRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( signUpRequest . getClientId ( ) , CLIENTID_BINDING ) ; protocolMarshaller . marshall ( signUpRequest . getSecretHash ( ) , SECRETHASH_BINDING ) ; protocolMarshaller . mars...
public class ICalComponent { /** * Replaces all sub - components of a given class with the given component . * @ param component the component * @ return the replaced sub - components ( this list is immutable ) */ public List < ICalComponent > setComponent ( ICalComponent component ) { } }
return components . replace ( component . getClass ( ) , component ) ;
public class Accounts { /** * This method allows you to check if a person already has a Moip account , by it ' s tax document or e - mail . * The tax document must be write with punctuation , for example : 123.456.789-00. * @ param argument * { @ code String } the person ' s tax document or e - mail . * @ param...
this . requestMaker = new RequestMaker ( setup ) ; String argumentType ; if ( isTaxDocument ( argument ) ) argumentType = "tax_document" ; else argumentType = "email" ; RequestProperties props = new RequestPropertiesBuilder ( ) . method ( "GET" ) . endpoint ( String . format ( "%s/exists?%s=%s" , ENDPOINT , argumentTyp...
public class BaseVarExpander { /** * Expand a variable reference * @ param data multi context data * @ param viewMap factory of ViewTraverse type * @ param step step text * @ param group * @ param key * @ param node * @ param < T > * @ return */ public static < T extends ViewTraverse < T > > String expa...
Integer t = null ; if ( null != step ) { try { t = Integer . parseInt ( step ) ; } catch ( NumberFormatException e ) { return null ; } } T view = viewMap . apply ( t , node ) ; T mergedview = view . merge ( currentContext ) . getView ( ) ; return data . resolve ( mergedview , view , group , key , null ) ;
public class IIRFilter { /** * This will perform the filter on the samples * @ param ringBuffer * @ param preAmpedResultBuffer * @ param start * @ param length * @ since 12.01.2012 */ public int doFilter ( final float [ ] ringBuffer , final int start , final int length , final int useBands ) { } }
final float internalPreAmp = 1f / useBands ; final float rest = 1.0f - internalPreAmp ; final int end = start + length ; int index = start ; while ( index < end ) { for ( int c = 0 ; c < channels ; c ++ ) { final int sampleIndex = ( index ++ ) % sampleBufferSize ; float sample = 0 ; // Run the difference equation final...
public class OjbMetadataTransferable { /** * Returns whether or not the specified data flavor is supported for * this object . * @ param flavor the requested flavor for the data * @ return boolean indicating whether or not the data flavor is supported */ public boolean isDataFlavorSupported ( DataFlavor flavor ) ...
return java . util . Arrays . asList ( _flavors ) . contains ( flavor ) ;
public class WatchDir { /** * Process a single key queued to the watcher * @ param delayQueue */ void processEvent ( DelayQueue < Delayed > delayQueue ) { } }
// wait for key to be signaled WatchKey key ; try { key = watcher . poll ( 250 , TimeUnit . MILLISECONDS ) ; } catch ( InterruptedException | ClosedWatchServiceException x ) { return ; } if ( key == null ) { return ; } Path dir = keys . get ( key ) ; if ( dir == null ) { return ; } for ( WatchEvent < ? > event : key . ...
public class SyncGroupsInner { /** * Gets a collection of sync group logs . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the PagedList & lt ; SyncGroupLogPropertie...
return listLogsNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < SyncGroupLogPropertiesInner > > , Page < SyncGroupLogPropertiesInner > > ( ) { @ Override public Page < SyncGroupLogPropertiesInner > call ( ServiceResponse < Page < SyncGroupLogPropertiesInner > > response ) { ret...
public class ScrollHelper { /** * Will perform a detection whether the element is in the View Port Scope or not , providing * the { @ link # containerElement } as the wrapper or container of the target element . * Note : By default if you didn ' t provide a container , the html or body element should be * applied...
double elementTop = $ ( element ) . offset ( ) . top ; double elementBottom = elementTop + $ ( element ) . outerHeight ( ) ; JQueryElement target = getContainerElement ( ) ; double viewportTop = target . scrollTop ( ) ; if ( target . asElement ( ) != getDefaultContainer ( ) ) { viewportTop = target . offset ( ) . top ;...
public class Graphs { /** * Returns { @ code true } if { @ code graphA } and { @ code graphB } have the same elements ( including * edge values ) and the same relationships between elements , as exposed via the { @ link ValueGraph } * interface . * < p > Thus , two value graphs A and B are equivalent if both are ...
if ( graphA == graphB ) { return true ; } if ( graphA == null || graphB == null ) { return false ; } if ( graphA . isDirected ( ) != graphB . isDirected ( ) || ! graphA . nodes ( ) . equals ( graphB . nodes ( ) ) || ! graphA . edges ( ) . equals ( graphB . edges ( ) ) ) { return false ; } for ( EndpointPair < ? > edge ...
public class SSTableRewriter { /** * cleanup all our temporary readers and swap in our new ones */ private void replaceWithFinishedReaders ( List < SSTableReader > finished ) { } }
if ( isOffline ) { for ( SSTableReader reader : discard ) { if ( reader . getCurrentReplacement ( ) == reader ) reader . markObsolete ( ) ; reader . selfRef ( ) . release ( ) ; } } else { dataTracker . replaceEarlyOpenedFiles ( discard , finished ) ; dataTracker . unmarkCompacting ( discard ) ; } discard . clear ( ) ;
public class HttpChannelPool { /** * Adds a { @ link Channel } to this pool . */ private void addToPool ( SessionProtocol actualProtocol , PoolKey key , PooledChannel pooledChannel ) { } }
assert eventLoop . inEventLoop ( ) : Thread . currentThread ( ) . getName ( ) ; getOrCreatePool ( actualProtocol , key ) . addLast ( pooledChannel ) ;
public class AbstractMappableValidator { /** * Disconnects the specified result handler from all rules . * @ param resultHandler Result handler to be unmapped . */ private void unmapResultHandlerFromAllRules ( final RH resultHandler ) { } }
if ( resultHandler != null ) { for ( final List < RH > mappedResultHandlers : rulesToResultHandlers . values ( ) ) { mappedResultHandlers . remove ( resultHandler ) ; } }
public class DefaultWhenFileSystem { /** * Returns the path representing the file that the symbolic link specified by { @ code link } points to , asynchronously . * @ param link the link * @ return a promise for the path */ @ Override public Promise < String > readSymlink ( String link ) { } }
return adapter . toPromise ( handler -> vertx . fileSystem ( ) . readSymlink ( link , handler ) ) ;
public class ElementCollectionImpl { /** * If not already created , a new < code > map - key - class < / code > element with the given value will be created . * Otherwise , the existing < code > map - key - class < / code > element will be returned . * @ return a new or existing instance of < code > MapKeyClass < E...
Node node = childNode . getOrCreate ( "map-key-class" ) ; MapKeyClass < ElementCollection < T > > mapKeyClass = new MapKeyClassImpl < ElementCollection < T > > ( this , "map-key-class" , childNode , node ) ; return mapKeyClass ;
public class WindowsPreferencesBuilder { /** * Returns this java string as a null - terminated byte array */ private static byte [ ] stringToByteArray ( String str ) { } }
byte [ ] result = new byte [ str . length ( ) + 1 ] ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { result [ i ] = ( byte ) str . charAt ( i ) ; } result [ str . length ( ) ] = 0 ; return result ;
public class AttributeHelper { /** * Extract data from DeviceAttribute to a Long * @ param deviceAttributeRead * the DeviceAttribute attribute to read * @ return Long , the result in Long format * @ throws DevFailed */ public static Long extractToLong ( final DeviceAttribute deviceAttributeRead ) throws DevFail...
final Object value = AttributeHelper . extract ( deviceAttributeRead ) ; Long argout = null ; if ( value instanceof Short ) { argout = Long . valueOf ( ( ( Short ) value ) . longValue ( ) ) ; } else if ( value instanceof String ) { try { argout = Long . valueOf ( ( String ) value ) ; } catch ( final Exception e ) { Exc...
public class Op { /** * Creates an < i > operation expression < / i > on the specified target object . * @ param target the target object on which the expression will execute * @ return an operator , ready for chaining */ public static < T > Level0ListOperator < List < T > , T > on ( final List < T > target ) { } }
return onList ( target ) ;
public class PageFlowUtils { /** * Create a fully - rewritten URI given a path and parameters . * < p > Calls the rewriter service using a type of { @ link URLType # ACTION } . < / p > * @ param servletContext the current ServletContext . * @ param request the current HttpServletRequest . * @ param response the...
return rewriteResourceOrHrefURL ( servletContext , request , response , path , params , fragment , forXML , URLType . ACTION ) ;
public class HashUtil { /** * 对输入字符串进行sha1散列 , 带salt达到更高的安全性 . */ public static byte [ ] sha1 ( @ NotNull byte [ ] input , @ Nullable byte [ ] salt ) { } }
return digest ( input , get ( SHA_1_DIGEST ) , salt , 1 ) ;
public class vpnsessionaction { /** * Use this API to fetch vpnsessionaction resource of given name . */ public static vpnsessionaction get ( nitro_service service , String name ) throws Exception { } }
vpnsessionaction obj = new vpnsessionaction ( ) ; obj . set_name ( name ) ; vpnsessionaction response = ( vpnsessionaction ) obj . get_resource ( service ) ; return response ;
public class ParameterValue { /** * Adds environmental variables for the builds to the given map . * This provides a means for a parameter to pass the parameter * values to the build to be performed . * When this method is invoked , the map already contains the * current " planned export " list . The implementa...
if ( env instanceof EnvVars ) { if ( Util . isOverridden ( ParameterValue . class , getClass ( ) , "buildEnvironment" , Run . class , EnvVars . class ) ) { // if the subtype already derives buildEnvironment , then delegate to it buildEnvironment ( build , ( EnvVars ) env ) ; } else if ( Util . isOverridden ( ParameterV...
public class DescriptorList { /** * Creates a new instance of a { @ link Describable } * from the structured form submission data posted * by a radio button group . * @ param parent JSON , which contains the configuration entry for the radio list * @ param name Name of the configuration entry for the radio list...
return newInstanceFromRadioList ( parent . getJSONObject ( name ) ) ;
public class DescribeAccountModificationsResult { /** * The list of modifications to the configuration of BYOL . * @ return The list of modifications to the configuration of BYOL . */ public java . util . List < AccountModification > getAccountModifications ( ) { } }
if ( accountModifications == null ) { accountModifications = new com . amazonaws . internal . SdkInternalList < AccountModification > ( ) ; } return accountModifications ;
public class KeyField { /** * Get the field that this KeyField points to . * @ param areaDesc KeyArea type File / Temp / Start / End . * @ return The field . */ public BaseField getField ( int iAreaDesc ) { } }
switch ( iAreaDesc ) { default : case DBConstants . FILE_KEY_AREA : return m_field ; case DBConstants . TEMP_KEY_AREA : if ( m_fieldTempParam == null ) { try { m_fieldTempParam = ( BaseField ) m_field . clone ( ) ; // Buffer areas m_fieldTempParam . setFieldName ( new String ( m_field . getFieldName ( false , false ) +...
public class ConcurrentGrouper { /** * Merge dictionaries of { @ link Grouper . KeySerde } s of { @ link Grouper } s . The result dictionary contains unique string * keys . * @ return merged dictionary if its size does not exceed max dictionary size . Otherwise null . */ @ Nullable private List < String > tryMergeD...
final Set < String > mergedDictionary = new HashSet < > ( ) ; long totalDictionarySize = 0L ; for ( SpillingGrouper < KeyType > grouper : groupers ) { final List < String > dictionary = grouper . mergeAndGetDictionary ( ) ; for ( String key : dictionary ) { if ( mergedDictionary . add ( key ) ) { totalDictionarySize +=...
public class RemediationParameterValueMarshaller { /** * Marshall the given parameter object . */ public void marshall ( RemediationParameterValue remediationParameterValue , ProtocolMarshaller protocolMarshaller ) { } }
if ( remediationParameterValue == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( remediationParameterValue . getResourceValue ( ) , RESOURCEVALUE_BINDING ) ; protocolMarshaller . marshall ( remediationParameterValue . getStaticValue ( ) , S...
public class MethodInfoCache { /** * Put a method into the MethodCache . * @ param beanName the name of the bean * @ param clazz the class of the bean * @ param method the method * @ param context the Spring application context */ public void put ( String beanName , Class < ? > clazz , Method method , Applicati...
MethodInfo info = new MethodInfo ( clazz , context , beanName , method ) ; this . cache . put ( new Key ( beanName , method . getName ( ) ) , info ) ;
public class MtasSolrComponentPrefix { /** * ( non - Javadoc ) * @ see * mtas . solr . handler . component . util . MtasSolrComponent # create ( mtas . codec . util . * CodecComponent . BasicComponent , java . lang . Boolean ) */ public SimpleOrderedMap < Object > create ( ComponentPrefix prefix , Boolean encode ...
SimpleOrderedMap < Object > mtasPrefixResponse = new SimpleOrderedMap < > ( ) ; mtasPrefixResponse . add ( "key" , prefix . key ) ; if ( encode ) { mtasPrefixResponse . add ( "_encoded_singlePosition" , MtasSolrResultUtil . encode ( prefix . singlePositionList ) ) ; mtasPrefixResponse . add ( "_encoded_multiplePosition...
public class DateUtils { /** * Returns a String representation of a { @ code date } object * @ param date * as Date * @ return String representation of a { @ code date } object . The String is in the form { @ code 2010-02-28T16:11:08} */ public static String toLongFormatFromDate ( Date date ) { } }
if ( date == null ) { return null ; } return strategy . formatFor ( FACEBOOK_LONG_DATE_FORMAT_WITHOUT_TIMEZONE ) . format ( date ) ;
public class DataObjectFontDescriptorImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setEncID ( Integer newEncID ) { } }
Integer oldEncID = encID ; encID = newEncID ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . DATA_OBJECT_FONT_DESCRIPTOR__ENC_ID , oldEncID , encID ) ) ;
public class BaseCalendar { /** * Returns the end of the given day < code > { @ link Calendar } < / code > . This * calculation will take the < code > BaseCalendar < / code > time zone into account * if it is not < code > null < / code > . * @ param timeInMillis * a time containing the desired date for the end ...
final Calendar endOfDay = createJavaCalendar ( timeInMillis ) ; endOfDay . set ( Calendar . HOUR_OF_DAY , 23 ) ; endOfDay . set ( Calendar . MINUTE , 59 ) ; endOfDay . set ( Calendar . SECOND , 59 ) ; endOfDay . set ( Calendar . MILLISECOND , 999 ) ; return endOfDay ;
public class LocaleUtility { /** * A helper function to convert a string of the form * aa _ BB _ CC to a locale object . Why isn ' t this in Locale ? */ public static Locale getLocaleFromName ( String name ) { } }
String language = "" ; String country = "" ; String variant = "" ; int i1 = name . indexOf ( '_' ) ; if ( i1 < 0 ) { language = name ; } else { language = name . substring ( 0 , i1 ) ; ++ i1 ; int i2 = name . indexOf ( '_' , i1 ) ; if ( i2 < 0 ) { country = name . substring ( i1 ) ; } else { country = name . substring ...
public class CharsetEncoder { /** * Changes this encoder ' s action for unmappable - character errors . * < p > This method invokes the { @ link # implOnUnmappableCharacter * implOnUnmappableCharacter } method , passing the new action . < / p > * @ param newAction The new action ; must not be < tt > null < / tt >...
if ( newAction == null ) throw new IllegalArgumentException ( "Null action" ) ; unmappableCharacterAction = newAction ; implOnUnmappableCharacter ( newAction ) ; return this ;
public class CmsAppWorkplaceUi { /** * Navigates to the current URI fragment . < p > */ private void navigateToFragment ( ) { } }
String fragment = getPage ( ) . getUriFragment ( ) ; if ( fragment != null ) { getNavigator ( ) . navigateTo ( fragment ) ; } else { CmsObject cms = getCmsObject ( ) ; String target = CmsLoginHelper . getStartView ( cms ) ; if ( target != null ) { if ( target . startsWith ( "#" ) ) { getNavigator ( ) . navigateTo ( tar...
public class FilePath { /** * Creates a zip file from this directory by using the specified filter , * and sends the result to the given output stream . * @ param filter * Must be serializable since it may be executed remotely . Can be null to add all files . * @ since 1.315 */ public void zip ( OutputStream os...
archive ( ArchiverFactory . ZIP , os , filter ) ;
public class HQMessaging { /** * HornetQ 2.3 has single - arity destroy functions , 2.4 has double - arity */ private void invokeDestroy ( String method , String name ) { } }
Class clazz = this . jmsServerManager ( ) . getClass ( ) ; Method destroy = null ; for ( Method each : clazz . getMethods ( ) ) { if ( method . equals ( each . getName ( ) ) ) { destroy = each ; break ; } } if ( destroy == null ) { throw new IllegalStateException ( String . format ( "Class %s has no %s method" , clazz ...
public class AbstractMatcher { /** * Obtain all the matching resources that have a MatchTyoe with the URIs of { @ code origin } of the type provided ( inclusive ) or less . * @ param origins URIs to match * @ param maxType the maximum MatchType we want to obtain * @ return a { @ link com . google . common . colle...
return listMatchesWithinRange ( origins , this . matchTypesSupported . getLowest ( ) , maxType ) ;
public class Ec2MachineConfigurator { /** * Associates an elastic IP with the VM . * @ return true if there is nothing more to do about elastic IP configuration , false otherwise */ private boolean associateElasticIp ( ) { } }
String elasticIp = this . targetProperties . get ( Ec2Constants . ELASTIC_IP ) ; if ( ! Utils . isEmptyOrWhitespaces ( elasticIp ) ) { this . logger . fine ( "Associating an elastic IP with the instance. IP = " + elasticIp ) ; AssociateAddressRequest associateAddressRequest = new AssociateAddressRequest ( this . machin...
public class TagletWriterImpl { /** * { @ inheritDoc } */ public Content commentTagsToOutput ( DocTree holderTag , Element holder , List < ? extends DocTree > tags , boolean isFirstSentence ) { } }
return htmlWriter . commentTagsToContent ( holderTag , holder , tags , isFirstSentence ) ;
public class CliParser { /** * Adds the advanced command line options to the given options collection . * These are split out for purposes of being able to display two different * help messages . * @ param options a collection of command line arguments */ @ SuppressWarnings ( "static-access" ) private void addAdv...
final Option cveBase = Option . builder ( ) . argName ( "url" ) . hasArg ( ) . longOpt ( ARGUMENT . CVE_BASE_URL ) . desc ( "Base URL for each year’s CVE files (json.gz), the %d will be replaced with the year. " ) . build ( ) ; final Option cveModified = Option . builder ( ) . argName ( "url" ) . hasArg ( ) . longOpt (...
public class StructuredQueryBuilder { /** * Matches a path specifying a geospatial region , which is indexed via * geospatial region index , that has the relationship given by the operator * with at least one of the criteria regions . * @ param index the container for the geospatial regions * @ param operator t...
checkRegions ( regions ) ; return new GeospatialRegionQuery ( ( GeoRegionPathImpl ) index , operator , null , regions , null ) ;
public class SessionDataManager { /** * { @ inheritDoc } */ public List < PropertyData > listChildPropertiesData ( NodeData parent ) throws RepositoryException { } }
long start = 0 ; if ( LOG . isDebugEnabled ( ) ) { start = System . currentTimeMillis ( ) ; LOG . debug ( "listChildPropertiesData(" + parent . getQPath ( ) . getAsString ( ) + ") >>>>>" ) ; } try { return ( List < PropertyData > ) mergeProps ( parent , true , transactionableManager ) ; } finally { if ( LOG . isDebugEn...
public class DesignClockSkin { /** * * * * * * Graphics * * * * * */ @ Override public void updateTime ( final ZonedDateTime TIME ) { } }
double rotationAngle = 0.5 * ( 60 * TIME . getHour ( ) + TIME . getMinute ( ) + TIME . getSecond ( ) * 0.0166666667 + TIME . get ( ChronoField . MILLI_OF_SECOND ) * 0.0000166667 ) ; double rotationX = size * 0.5 + rotationRadius * Math . sin ( Math . toRadians ( rotationAngle + 180 ) ) ; double rotationY = size * 0.5 -...
public class SipParser { /** * Helper method that counts the number of bytes that are considered part of * the next token in the { @ link Buffer } . * @ param buffer * @ return a count of the number of bytes the next token contains or zero if * no token is to be found within the buffer . * @ throws IOExceptio...
boolean done = false ; int count = 0 ; buffer . markReaderIndex ( ) ; while ( buffer . hasReadableBytes ( ) && ! done ) { final byte b = buffer . readByte ( ) ; final boolean ok = isAlphaNum ( b ) || b == DASH || b == PERIOD || b == EXCLAMATIONPOINT || b == PERCENT || b == STAR || b == UNDERSCORE || b == PLUS || b == B...
public class UTCDateBox { /** * Converts a gwt Date in the timezone of the current browser to a time in * UTC . * @ return A Long corresponding to the number of milliseconds since January * 1 , 1970 , 00:00:00 GMT or null if the specified Date is null . */ public static final Long date2utc ( Date date ) { } }
// use null for a null date if ( date == null ) return null ; long time = date . getTime ( ) ; // remove the timezone offset time -= timezoneOffsetMillis ( date ) ; return time ;
public class CUjitInputType { /** * Returns the String identifying the given CUjitInputType * @ param n The CUjitInputType * @ return The String identifying the given CUjitInputType */ public static String stringFor ( int n ) { } }
switch ( n ) { case CU_JIT_INPUT_CUBIN : return "CU_JIT_INPUT_CUBIN" ; case CU_JIT_INPUT_PTX : return "CU_JIT_INPUT_PTX" ; case CU_JIT_INPUT_FATBINARY : return "CU_JIT_INPUT_FATBINARY" ; case CU_JIT_INPUT_OBJECT : return "CU_JIT_INPUT_OBJECT" ; case CU_JIT_INPUT_LIBRARY : return "CU_JIT_INPUT_LIBRARY" ; } return "INVAL...
public class EncodingUtilImpl { /** * This method gets the singleton instance of this { @ link EncodingUtilImpl } . < br > * < b > ATTENTION : < / b > < br > * Please prefer dependency - injection instead of using this method . * @ return the singleton instance . */ public static EncodingUtil getInstance ( ) { } ...
if ( instance == null ) { synchronized ( EncodingUtilImpl . class ) { if ( instance == null ) { EncodingUtilImpl util = new EncodingUtilImpl ( ) ; util . initialize ( ) ; instance = util ; } } } return instance ;
public class AbstractConsumerManager { /** * Get the BaseDestinationHandler object to which this CD belongs * @ return the BaseDestinationHandler object to which this CD belongs */ public BaseDestinationHandler getDestination ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestination" ) ; SibTr . exit ( tc , "getDestination" , _baseDestHandler ) ; } return _baseDestHandler ;
public class CoronaJobTrackerRunner { /** * Delete all of the temporary map output files . */ @ Override public void close ( ) throws IOException { } }
LOG . info ( getTask ( ) + " done; removing files." ) ; mapOutputFile . removeAll ( getTask ( ) . getTaskID ( ) ) ;
public class BsfUtils { /** * Selects the Date Pattern to use based on the given Locale if the input * format is null * @ param locale * Locale ( may be the result of a call to selectLocale ) * @ param format * Input format String * @ return Date Pattern eg . dd / MM / yyyy */ public static String selectDat...
String selFormat ; if ( format == null ) { selFormat = ( ( SimpleDateFormat ) DateFormat . getDateInstance ( DateFormat . SHORT , locale ) ) . toPattern ( ) ; // Since DateFormat . SHORT is silly , return a smart format if ( selFormat . equals ( "M/d/yy" ) ) { return "MM/dd/yyyy" ; } if ( selFormat . equals ( "d/M/yy" ...
public class RuleTreeRewriter { /** * Create a new rule based tree rewriter with the given parameters . * @ see TreeRewriteRule # compile ( String ) * @ param rule the rewriter rule applied for this rewriter * @ throws IllegalArgumentException if the rewrite { @ code rule } is invalid * @ throws NullPointerExce...
return new RuleTreeRewriter < > ( TreeRewriteRule . compile ( rule ) , Objects :: equals , Function . identity ( ) ) ;
public class HttpConnectorUtil { /** * Extract transport properties from transport configurations . * @ param transportsConfiguration transportsConfiguration { @ link TransportsConfiguration } which transport * properties should be extracted . * @ return Map of transport properties . */ public static Map < String...
Map < String , Object > transportProperties = new HashMap < > ( ) ; Set < TransportProperty > transportPropertiesSet = transportsConfiguration . getTransportProperties ( ) ; if ( transportPropertiesSet != null && ! transportPropertiesSet . isEmpty ( ) ) { transportProperties = transportPropertiesSet . stream ( ) . coll...
public class StorageAccountsInner { /** * Failover request can be triggered for a storage account in case of availability issues . The failover occurs from the storage account ' s primary cluster to secondary cluster for RA - GRS accounts . The secondary cluster will become primary after failover . * @ param resource...
return ServiceFuture . fromResponse ( failoverWithServiceResponseAsync ( resourceGroupName , accountName ) , serviceCallback ) ;
public class Value { /** * expects to be a json object named ' name ' , * so does not include name */ public JSONObject getJson ( ) throws JSONException { } }
JSONObject json = create ( ) ; if ( value != null ) json . put ( "value" , value ) ; if ( label != null ) json . put ( "label" , label ) ; if ( type != null ) json . put ( "type" , type ) ; if ( display != null ) json . put ( "display" , display . toString ( ) ) ; if ( sequence != 0 ) json . put ( "sequence" , sequence...
public class CssAtRule { /** * { @ inheritDoc } */ @ Override public void appendTo ( CssFormatter formatter ) { } }
if ( css . startsWith ( "@charset" ) ) { if ( formatter . isCharsetDirective ( ) ) { return ; // write charset only once } formatter . setCharsetDirective ( ) ; formatter = formatter . getHeader ( ) ; } else if ( css . startsWith ( "@import" ) ) { formatter = formatter . getHeader ( ) ; } formatter . getOutput ( ) ; Se...
public class DescribeParserFactory { /** * Create describe parser instance . * @ param dbType database type * @ param shardingRule databases and tables sharding rule * @ param lexerEngine lexical analysis engine . * @ return describe parser instance */ public static AbstractDescribeParser newInstance ( final Da...
switch ( dbType ) { case H2 : case MySQL : return new MySQLDescribeParser ( shardingRule , lexerEngine ) ; default : throw new UnsupportedOperationException ( String . format ( "Cannot support database [%s]." , dbType ) ) ; }
public class ServerControllerImpl { /** * Here ' s where Undertow is being rebuild at { @ link Undertow } level ( not { @ link ServletContainer } level ) . * This is were < em > global < / em > objects are configured ( listeners , global filters , . . . ) */ private void doConfigure ( ) { } }
Undertow . Builder builder = Undertow . builder ( ) ; // if no configuration method change root handler , simple path - > HttpHandler will be used // where each HttpHandler is created in separate org . ops4j . pax . web . service . undertow . internal . Context HttpHandler rootHandler = path ; URL undertowResource = de...
public class RouteDispatcher { /** * Removes a Flash instance from the session , binds it to the RouteContext , * and creates a new Flash instance . * @ param routeContext */ private void processFlash ( RouteContext routeContext ) { } }
Flash flash = null ; if ( routeContext . hasSession ( ) ) { // get flash from session flash = routeContext . removeSession ( "flash" ) ; // put an empty flash ( outgoing flash ) in session ; defense against session . get ( " flash " ) routeContext . setSession ( "flash" , new Flash ( ) ) ; } if ( flash == null ) { flas...
public class IPv4Address { /** * Produces an array of blocks that are sequential that cover the same set of addresses as this . * This array can be shorter than that produced by { @ link # spanWithPrefixBlocks ( ) } and is never longer . * Unlike { @ link # spanWithSequentialBlocks ( IPAddress ) } this method only ...
if ( isSequential ( ) ) { return new IPv4Address [ ] { withoutPrefixLength ( ) } ; } @ SuppressWarnings ( "unchecked" ) ArrayList < IPv4Address > list = ( ArrayList < IPv4Address > ) spanWithBlocks ( false ) ; return list . toArray ( new IPv4Address [ list . size ( ) ] ) ;
public class HtmlDocletWriter { /** * this is a hack to delay dealing with Annotations in the writers , the assumption * is that all necessary checks have been made to get here . */ public void addReceiverAnnotationInfo ( ExecutableElement method , TypeMirror rcvrTypeMirror , List < ? extends AnnotationMirror > annot...
TypeMirror rcvrType = method . getReceiverType ( ) ; List < ? extends AnnotationMirror > annotationMirrors1 = rcvrType . getAnnotationMirrors ( ) ; addAnnotationInfo ( 0 , method , annotationMirrors1 , false , htmltree ) ;
public class JniSocketImpl { /** * Returns a stream impl for the socket encapsulating the * input and output stream . */ @ Override public StreamImpl stream ( ) throws IOException { } }
if ( _stream == null ) { _stream = new JniStream ( this ) ; } _stream . init ( ) ; return _stream ;
public class UpdateLicenseSpecificationsForResourceRequest { /** * License configuration ARNs to be removed from a resource . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRemoveLicenseSpecifications ( java . util . Collection ) } or * { @ link # withR...
if ( this . removeLicenseSpecifications == null ) { setRemoveLicenseSpecifications ( new java . util . ArrayList < LicenseSpecification > ( removeLicenseSpecifications . length ) ) ; } for ( LicenseSpecification ele : removeLicenseSpecifications ) { this . removeLicenseSpecifications . add ( ele ) ; } return this ;
public class DisplayOptions { @ Nonnull public static DisplayOptions _default ( @ Nonnull DisplayNoOpts _default ) { } }
DisplayOptions self = new DisplayOptions ( ) ; self . type = DisplayType . _default ; self . _default = _default ; return self ;
public class PropertyToAttributePropertiesManager { /** * Convert a request attribute name to a portlet property name */ private String getPropertyName ( final String windowIdStr , final String fullAttributeName ) { } }
final String attributeName ; if ( this . nonNamespacedProperties . contains ( fullAttributeName ) ) { attributeName = fullAttributeName ; } else if ( fullAttributeName . startsWith ( windowIdStr ) ) { attributeName = fullAttributeName . substring ( windowIdStr . length ( ) ) ; } else { return null ; } final String mapp...
public class PackageManagerUtils { /** * Checks if the device has a location feature . * @ param manager the package manager . * @ return { @ code true } if the device has a location feature . */ @ TargetApi ( Build . VERSION_CODES . FROYO ) public static boolean hasLocationFeature ( PackageManager manager ) { } }
return manager . hasSystemFeature ( PackageManager . FEATURE_LOCATION ) ;
public class CmsDetailPageConfigurationWriter { /** * Helper method for getting the locale from which to read the configuration data . < p > * @ return the locale from which to read the configuration data * @ throws CmsException if something goes wrong */ private Locale getLocale ( ) throws CmsException { } }
getDocument ( ) ; List < Locale > locales = m_document . getLocales ( ) ; if ( locales . contains ( Locale . ENGLISH ) || locales . isEmpty ( ) ) { return Locale . ENGLISH ; } return locales . get ( 0 ) ;
public class Dataset { /** * Returns an array containing the timestamps of the elements in this * dataset in proper sequence ( from first to last element ) . If the dataset * fits in the specified array , it is returned therein . Otherwise , a new * array is allocated with the size of this dataset . * If the da...
int n = data . size ( ) ; if ( a . length < n ) { a = new Timestamp [ n ] ; } for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = data . get ( i ) . timestamp ; } for ( int i = n ; i < a . length ; i ++ ) { a [ i ] = null ; } return a ;
public class MoreAnnotations { /** * Converts the given attribute to an enum value . */ public static < T extends Enum < T > > Optional < T > asEnumValue ( Class < T > clazz , Attribute a ) { } }
class Visitor extends SimpleAnnotationValueVisitor8 < T , Void > { @ Override public T visitEnumConstant ( VariableElement c , Void unused ) { return Enum . valueOf ( clazz , c . getSimpleName ( ) . toString ( ) ) ; } } return Optional . ofNullable ( a . accept ( new Visitor ( ) , null ) ) ;
public class CmsDefaultWorkflowManager { /** * The implementation of the " publish " workflow action . < p > * @ param userCms the user CMS context * @ param options the publish options * @ param resources the resources which the action should process * @ return the workflow response * @ throws CmsException i...
final CmsPublish publish = new CmsPublish ( userCms , options ) ; // use FutureTask to get the broken links , because we can then use a different thread if it takes too long final FutureTask < List < CmsPublishResource > > brokenResourcesGetter = new FutureTask < List < CmsPublishResource > > ( new Callable < List < Cm...
public class DocIdResponseHandler { /** * The token is required to be on the START _ ARRAY value for rows . * @ param jp * @ param result * @ return The results found in the rows object */ private List < String > parseRows ( JsonParser jp , List < String > result ) throws IOException { } }
while ( jp . nextToken ( ) == JsonToken . START_OBJECT ) { while ( jp . nextToken ( ) == JsonToken . FIELD_NAME ) { String fieldName = jp . getCurrentName ( ) ; jp . nextToken ( ) ; if ( "id" . equals ( fieldName ) ) { result . add ( jp . getText ( ) ) ; } else { jp . skipChildren ( ) ; } } } return result ;
public class AppFramework { /** * ApplicationContextAware interface to allow container to inject itself . Sets the active * application context . * @ param appContext The active application context . */ @ Override public void setApplicationContext ( ApplicationContext appContext ) throws BeansException { } }
if ( this . appContext != null ) { throw new ApplicationContextException ( "Attempt to reinitialize application context." ) ; } this . appContext = appContext ;
public class ModifyVpcEndpointRequest { /** * ( Gateway endpoint ) One or more route table IDs to disassociate from the endpoint . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRemoveRouteTableIds ( java . util . Collection ) } or { @ link # withRemoveRo...
if ( this . removeRouteTableIds == null ) { setRemoveRouteTableIds ( new com . amazonaws . internal . SdkInternalList < String > ( removeRouteTableIds . length ) ) ; } for ( String ele : removeRouteTableIds ) { this . removeRouteTableIds . add ( ele ) ; } return this ;
public class ExpressRouteCircuitsInner { /** * Gets information about the specified express route circuit . * @ param resourceGroupName The name of the resource group . * @ param circuitName The name of express route circuit . * @ param serviceCallback the async ServiceCallback to handle successful and failed res...
return ServiceFuture . fromResponse ( getByResourceGroupWithServiceResponseAsync ( resourceGroupName , circuitName ) , serviceCallback ) ;
public class ValidationSession { /** * The clean method ensures that the object and its attached objects are up to date * ie that any mapping is updated . This means the getters on the object are safe to use * @ param object */ public void clean ( final ValidationObject object ) { } }
if ( m_enabled ) { m_validationEngine . clean ( object ) ; for ( ProxyField proxyField : m_history ) { proxyField . expire ( ) ; } }
public class BidiOrder { /** * 7 ) resolving implicit embedding levels * Rules I1 , I2. */ private void resolveImplicitLevels ( int start , int limit , byte level , byte sor , byte eor ) { } }
if ( ( level & 1 ) == 0 ) { // even level for ( int i = start ; i < limit ; ++ i ) { byte t = resultTypes [ i ] ; // Rule I1. if ( t == L ) { // no change } else if ( t == R ) { resultLevels [ i ] += 1 ; } else { // t = = AN | | t = = EN resultLevels [ i ] += 2 ; } } } else { // odd level for ( int i = start ; i < limi...
public class JCublasNDArrayFactory { /** * Symmetric in place shuffle of an ndarray * along a specified set of dimensions . Each array in list should have it ' s own dimension at the same index of dimensions array * @ param arrays the ndarrays to shuffle * @ param dimensions the dimensions to do the shuffle * @...
// no dimension - no shuffle if ( dimensions == null || dimensions . size ( ) == 0 ) throw new RuntimeException ( "Dimension can't be null or 0-length" ) ; if ( arrays == null || arrays . size ( ) == 0 ) throw new RuntimeException ( "No input arrays provided" ) ; if ( dimensions . size ( ) > 1 && arrays . size ( ) != d...
public class SerdesManagerImpl { /** * Register a serializer of the given type . * @ param serializer The serializer of T . * @ param < T > The type of the object to be serialized . * @ return The { @ link HandlerRegistration } object , capable of cancelling this HandlerRegistration * to the { @ link SerdesMana...
final HandlerRegistration reg = bindSerializerToType ( serializer , serializer . handledType ( ) ) ; if ( serializer instanceof HasImpl ) { Class [ ] impls = ( ( HasImpl ) serializer ) . implTypes ( ) ; final HandlerRegistration [ ] regs = new HandlerRegistration [ impls . length + 1 ] ; regs [ 0 ] = reg ; for ( int i ...
public class IndexedSet { /** * Gets the object from the set of objects with the specified field value . * @ param indexDefinition the field index definition * @ param value the field value * @ param < V > the field type * @ return the object or null if there is no such object */ public < V > T getFirstByField ...
FieldIndex < T , V > index = ( FieldIndex < T , V > ) mIndices . get ( indexDefinition ) ; if ( index == null ) { throw new IllegalStateException ( "the given index isn't defined for this IndexedSet" ) ; } return index . getFirst ( value ) ;
public class AbstractBooleanList { /** * Appends the part of the specified list between < code > from < / code > ( inclusive ) and < code > to < / code > ( inclusive ) to the receiver . * @ param other the list to be added to the receiver . * @ param from the index of the first element to be appended ( inclusive ) ...
beforeInsertAllOfFromTo ( size , other , from , to ) ;
public class ConnectedIconsProvider { /** * Determines the connections available at this position for the specified < b > side < / b > . * @ param world the world * @ param pos the pos * @ param facing the facing * @ return the connections */ private int getConnections ( IBlockAccess world , BlockPos pos , Enum...
Block block = world . getBlockState ( pos ) . getBlock ( ) ; int connection = 0 ; for ( int i = 0 ; i < 4 ; i ++ ) { if ( world . getBlockState ( pos . offset ( sides [ facing . getIndex ( ) ] [ i ] ) ) . getBlock ( ) == block ) connection |= ( 1 << i ) ; } return ~ connection & 15 ;
public class HierarchicalContextRunner { /** * Initializes all dependencies for the { @ link HierarchicalContextRunner } . * Note : Clients may override this method to provide other dependencies . */ protected void initialize ( ) { } }
final StatementExecutorFactory statementExecutorFactory = StatementExecutorFactory . getDefault ( ) ; final StatementBuilderFactory statementBuilderFactory = StatementBuilderFactory . getDefault ( ) ; methodResolver = new MethodResolver ( ) ; methodDescriber = new MethodDescriber ( ) ; methodRunner = new MethodExecutor...
public class Promises { /** * Returns a { @ link CompleteExceptionallyPromise } with { @ link StacklessException } , * since this method doesn ' t accept any { @ code Promise } s * @ see # any ( Iterator ) */ @ Contract ( pure = true ) @ NotNull public static < T > Promise < T > any ( ) { } }
return Promise . ofException ( new StacklessException ( Promises . class , "All promises completed exceptionally" ) ) ;
public class RSA { /** * 从KeyStore获取私钥 * @ param location * @ param alias * @ param keyStore * @ param storePass * @ param keyPass * @ return */ public static PrivateKey loadPrivateKeyFromKeyStore ( KeyStore keyStore , String alias , String keyPass ) { } }
try { return ( PrivateKey ) keyStore . getKey ( alias , keyPass . toCharArray ( ) ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; }
public class InternalSARLParser { /** * InternalSARL . g : 7516:1 : ruleAssertExpression returns [ EObject current = null ] : ( ( ) otherlv _ 1 = ' assert ' ( ( ' abstract ' | ' annotation ' | ' class ' | ' create ' | ' def ' | ' dispatch ' | ' enum ' | ' extends ' | ' final ' | ' implements ' | ' import ' | ' interfac...
EObject current = null ; Token otherlv_1 = null ; Token otherlv_3 = null ; Token lv_message_4_0 = null ; EObject lv_condition_2_0 = null ; enterRule ( ) ; try { // InternalSARL . g : 7522:2 : ( ( ( ) otherlv _ 1 = ' assert ' ( ( ' abstract ' | ' annotation ' | ' class ' | ' create ' | ' def ' | ' dispatch ' | ' enum ' ...
public class ByteArray { /** * 将本对象的内容引用复制给array * @ param array ByteArray */ public void directTo ( ByteArray array ) { } }
if ( array != null ) { array . content = this . content ; array . count = this . count ; }
public class WeldCollections { /** * Utility method for working with maps . Unlike { @ link Map # putIfAbsent ( Object , Object ) } this method always returns the value that ends up store in the map * which is either the old value ( if any was present ) or the new value ( if it was stored in the map ) . * @ param m...
V old = map . putIfAbsent ( key , value ) ; if ( old != null ) { return old ; } return value ;
public class Strings { /** * Converts a word sequence into a single camel - case sequence . * @ param text - a word sequence with the given separator * @ param separator - a word separator * @ param strict - if true , all letters following the first are forced into lower case in each word * @ return a single ca...
char [ ] chars = text . toCharArray ( ) ; int base = 0 , top = 0 ; while ( top < chars . length ) { while ( top < chars . length && chars [ top ] == separator ) { ++ top ; } if ( top < chars . length ) { chars [ base ++ ] = Character . toUpperCase ( chars [ top ++ ] ) ; } if ( strict ) { while ( top < chars . length &&...
public class IndianCalendar { /** * The following function is not needed for basic calendar functioning . * This routine converts a julian day ( jd ) to the corresponding date in Gregorian calendar " * @ param jd The Julian date in Julian Calendar which is to be converted to Indian date " */ private static int [ ] ...
double JULIAN_EPOCH = 1721425.5 ; double wjd , depoch , quadricent , dqc , cent , dcent , quad , dquad , yindex , yearday , leapadj ; int year , month , day ; wjd = Math . floor ( jd - 0.5 ) + 0.5 ; depoch = wjd - JULIAN_EPOCH ; quadricent = Math . floor ( depoch / 146097 ) ; dqc = depoch % 146097 ; cent = Math . floor...
public class Syncer { /** * Gets the { @ link ISyncHandler } for the specified object . * @ param < T > the generic type * @ param caller the caller * @ return the handler */ public < T > ISyncHandler < ? super T , ? extends ISyncableData > getHandler ( T caller ) { } }
@ SuppressWarnings ( "unchecked" ) ISyncHandler < ? super T , ? extends ISyncableData > handler = ( ISyncHandler < ? super T , ? extends ISyncableData > ) handlers . get ( caller . getClass ( ) ) ; if ( handler == null ) { MalisisCore . log . error ( "No ISyncHandler registered for type '{}'" , caller . getClass ( ) ) ...