signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class EqualityInference { /** * Attempts to rewrite an Expression in terms of the symbols allowed by the symbol scope * given the known equalities . Returns null if unsuccessful . * This method allows rewriting non - deterministic expressions . */ public Expression rewriteExpressionAllowNonDeterministic ( Ex...
return rewriteExpression ( expression , symbolScope , true ) ;
public class TokenInputStream { /** * main function */ public void putToken ( byte [ ] buf , int off , int len ) { } }
if ( buf == null || len <= 0 ) { return ; } if ( logger . isDebugEnabled ( ) ) { logger . debug ( "put token: " + len ) ; } byte [ ] localBuf = buf ; if ( off != 0 ) { localBuf = new byte [ len ] ; System . arraycopy ( buf , off , localBuf , 0 , len ) ; } synchronized ( this ) { if ( this . buff == null || this . buff ...
public class NodeSequence { /** * If this NodeSequence has a cache , and that cache is * fully populated then this method returns true , otherwise * if there is no cache or it is not complete it returns false . */ private boolean cacheComplete ( ) { } }
final boolean complete ; if ( m_cache != null ) { complete = m_cache . isComplete ( ) ; } else { complete = false ; } return complete ;
public class DescribeDirectConnectGatewayAssociationsRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeDirectConnectGatewayAssociationsRequest describeDirectConnectGatewayAssociationsRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeDirectConnectGatewayAssociationsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeDirectConnectGatewayAssociationsRequest . getAssociationId ( ) , ASSOCIATIONID_BINDING ) ; protocolMarshaller . marshall ( descri...
public class PageFlowUtils { /** * Get a URI for the " begin " action in the PageFlowController associated with the given * request URI . * @ return a String that is the URI for the " begin " action in the PageFlowController associated * with the given request URI . */ public static String getBeginActionURI ( Str...
// Translate this to a request for the begin action ( " begin . do " ) for this PageFlowController . InternalStringBuilder retVal = new InternalStringBuilder ( ) ; int lastSlash = requestURI . lastIndexOf ( '/' ) ; if ( lastSlash != - 1 ) { retVal . append ( requestURI . substring ( 0 , lastSlash ) ) ; } retVal . appen...
public class PlatformBitmapFactory { /** * Creates a bitmap with the specified width and height . Its initial density is * determined from the given DisplayMetrics . * @ param display Display metrics for the display this bitmap will be drawn on * @ param width The width of the bitmap * @ param height The height...
checkWidthHeight ( width , height ) ; CloseableReference < Bitmap > bitmapRef = createBitmapInternal ( width , height , config ) ; Bitmap bitmap = bitmapRef . get ( ) ; if ( display != null ) { bitmap . setDensity ( display . densityDpi ) ; } if ( Build . VERSION . SDK_INT >= 12 ) { bitmap . setHasAlpha ( hasAlpha ) ; ...
public class TinyUUID { /** * Liefert eine verkuerzte Darstellung einer UUID als String . Die Laenge * reduziert sich dadurch auf 22 Zeichen . Diese kann z . B . dazu genutzt * werden , um eine UUID platzsparend abzuspeichern , wenn man dazu nicht * das Ergebnis aus { @ link # toBytes ( ) } ( 16 Bytes ) verwenden...
String s = Base64 . getEncoder ( ) . withoutPadding ( ) . encodeToString ( toBytes ( ) ) ; return s . replace ( '/' , '_' ) . replace ( '+' , '-' ) ;
public class BoxWebHook { /** * Adds a { @ link BoxWebHook } to a provided { @ link BoxResource } . * @ param target * { @ link BoxResource } web resource * @ param address * { @ link URL } where the notification should send to * @ param triggers * events this { @ link BoxWebHook } is interested in * @ re...
return create ( target , address , new HashSet < Trigger > ( Arrays . asList ( triggers ) ) ) ;
public class ArrayPropertiesDetail { /** * A summary of the number of array job children in each available job status . This parameter is returned for parent * array jobs . * @ param statusSummary * A summary of the number of array job children in each available job status . This parameter is returned for * par...
setStatusSummary ( statusSummary ) ; return this ;
public class MappedParametrizedObjectEntry { /** * Parse named parameter as Double . * @ param name * parameter name * @ param defaultValue * default Double value * @ return Double value */ public Double getParameterDouble ( String name , Double defaultValue ) { } }
String value = getParameterValue ( name , null ) ; if ( value != null ) { try { return StringNumberParser . parseDouble ( value ) ; } catch ( NumberFormatException e ) { if ( LOG . isTraceEnabled ( ) ) { LOG . trace ( "An exception occurred: " + e . getMessage ( ) ) ; } } } return defaultValue ;
public class WriterUtils { /** * Get the staging { @ link Path } for { @ link org . apache . gobblin . writer . DataWriter } that has attemptId in the path . */ public static Path getWriterStagingDir ( State state , int numBranches , int branchId , String attemptId ) { } }
Preconditions . checkArgument ( attemptId != null && ! attemptId . isEmpty ( ) , "AttemptId cannot be null or empty: " + attemptId ) ; return new Path ( getWriterStagingDir ( state , numBranches , branchId ) , attemptId ) ;
public class GeneralStorable { /** * Returns the value belonging to the given field as long * @ param index * the index of the requested field * @ return the requested value * @ throws IOException */ public double getValueAsDouble ( int index ) throws IOException { } }
if ( index >= structure . valueSizes . size ( ) ) { throw new IOException ( "Index " + index + " is out of range." ) ; } return Bytes . toDouble ( value , structure . valueByteOffsets . get ( index ) ) ;
public class XDMClientChildSbb { /** * SUBSCRIBE callbacks */ public void onNotify ( Notify ntfy , SubscriptionClientChildSbbLocalObject subscriptionChild ) { } }
// compile diff if ( ntfy . getStatus ( ) . equals ( SubscriptionStatus . terminated ) ) { try { final String notifier = ntfy . getNotifier ( ) ; subscriptionChild . remove ( ) ; getParent ( ) . subscriptionTerminated ( ( XDMClientChildSbbLocalObject ) this . sbbContext . getSbbLocalObject ( ) , notifier , ntfy . getTe...
public class VdmUILabelProvider { /** * ( non - Javadoc ) * @ see IBaseLabelProvider # dispose */ public void dispose ( ) { } }
if ( fLabelDecorators != null ) { for ( int i = 0 ; i < fLabelDecorators . size ( ) ; i ++ ) { ILabelDecorator decorator = ( ILabelDecorator ) fLabelDecorators . get ( i ) ; decorator . dispose ( ) ; } fLabelDecorators = null ; } // fStorageLabelProvider . dispose ( ) ; fImageLabelProvider . dispose ( ) ; // for ( Imag...
public class Base64Util { /** * public static void encode ( StringBuilder cb , long data ) * cb . append ( Base64Util . encode ( data > > 60 ) ) ; * cb . append ( Base64Util . encode ( data > > 54 ) ) ; * cb . append ( Base64Util . encode ( data > > 48 ) ) ; * cb . append ( Base64Util . encode ( data > > 42 ) )...
for ( int i = 58 ; i > 0 ; i -= 6 ) { sb . append ( encode ( data >> i ) ) ; } sb . append ( encode ( data << 2 ) ) ;
public class FunctionTypeBuilder { /** * Infer whether the function is a normal function , a constructor , or an interface . */ FunctionTypeBuilder inferKind ( @ Nullable JSDocInfo info ) { } }
if ( info != null ) { if ( ! NodeUtil . isMethodDeclaration ( errorRoot ) ) { isConstructor = info . isConstructor ( ) ; isInterface = info . isInterface ( ) ; isRecord = info . usesImplicitMatch ( ) ; makesStructs = info . makesStructs ( ) ; makesDicts = info . makesDicts ( ) ; } isAbstract = info . isAbstract ( ) ; }...
public class AbstractFileClient { /** * Given a ZipInputStream to an asset within the repo get an input stream to the license attachment within the * asset . * @ param zis ZipInputStream to the container for the asset ( i . e . ZipInputStream to an ESA file inside a repo ) . * @ param assetId The id of the asset ...
InputStream is = null ; try { ZipEntry ze = zis . getNextEntry ( ) ; while ( ze != null ) { if ( ze . isDirectory ( ) ) { // do nothing } else { String name = getName ( ze . getName ( ) . replace ( "/" , File . separator ) ) ; String licId = assetId . concat ( String . format ( "#licenses" + File . separator + "%s" , n...
public class ExecHandler { /** * Extract a list of operation signatures which match a certain operation name . The returned list * can contain multiple signature in case of overloaded JMX operations . * @ param pServer server from where to fetch the MBean info for a given request ' s object name * @ param pReques...
try { MBeanInfo mBeanInfo = pServer . getMBeanInfo ( pRequest . getObjectName ( ) ) ; List < MBeanParameterInfo [ ] > paramInfos = new ArrayList < MBeanParameterInfo [ ] > ( ) ; for ( MBeanOperationInfo opInfo : mBeanInfo . getOperations ( ) ) { if ( opInfo . getName ( ) . equals ( pOperation ) ) { paramInfos . add ( o...
public class PathNormalizer { /** * Removes the URL prefix defined in the configuration from a path . If the * prefix contains a variant information , it adds it to the name . * @ param path * the path * @ return the path without the prefix */ public static String removeVariantPrefixFromPath ( String path ) { }...
String resultPath = path ; // Remove first slash if ( path . charAt ( 0 ) == '/' ) { resultPath = path . substring ( 1 ) ; } // eval the existence of a suffix String prefix = resultPath . substring ( 0 , resultPath . indexOf ( "/" ) ) ; // The prefix also contains variant information after a ' . ' if ( prefix . indexOf...
public class IntegerToOneHotTransform { /** * The output column names * This will often be the same as the input * @ return the output column names */ @ Override public String [ ] outputColumnNames ( ) { } }
List < String > l = transform ( inputSchema ) . getColumnNames ( ) ; return l . toArray ( new String [ l . size ( ) ] ) ;
public class DrawerUIUtils { /** * Util method to theme the drawer item view ' s background ( and foreground if possible ) * @ param ctx the context to use * @ param view the view to theme * @ param selected _ color the selected color to use * @ param animate true if we want to animate the StateListDrawable */ ...
boolean legacyStyle = getBooleanStyleable ( ctx , R . styleable . MaterialDrawer_material_drawer_legacy_style , false ) ; Drawable selected ; Drawable unselected ; if ( legacyStyle ) { // Material 1.0 styling selected = new ColorDrawable ( selected_color ) ; unselected = UIUtils . getSelectableBackground ( ctx ) ; } el...
public class PhoneNumberUtil { /** * format phone number in common national format with cursor position handling . * @ param pphoneNumberData phone number to format with cursor position * @ return formated phone number as String with new cursor position */ public final ValueWithPos < String > formatCommonNationalWi...
if ( pphoneNumberData == null ) { return null ; } int cursor = pphoneNumberData . getPos ( ) ; final StringBuilder resultNumber = new StringBuilder ( ) ; if ( isPhoneNumberNotEmpty ( pphoneNumberData . getValue ( ) ) ) { PhoneCountryData phoneCountryData = null ; for ( final PhoneCountryCodeData country : CreatePhoneCo...
public class CmsSitemapToolbar { /** * Enables / disables the new clipboard button . < p > * @ param enabled < code > true < / code > to enable the button * @ param disabledReason the reason , why the button is disabled */ public void setClipboardEnabled ( boolean enabled , String disabledReason ) { } }
if ( m_clipboardButton != null ) { if ( enabled ) { m_clipboardButton . enable ( ) ; } else { m_clipboardButton . disable ( disabledReason ) ; } }
public class SizeRange { /** * Used to build out a string a http box api friendly range string . * @ return String that is uses as a rest parameter . */ public String buildRangeString ( ) { } }
String lowerBoundString = "" ; if ( this . lowerBoundBytes > - 1 ) { lowerBoundString = String . valueOf ( this . lowerBoundBytes ) ; } String upperBoundString = "" ; if ( this . upperBoundBytes > - 1 ) { upperBoundString = String . valueOf ( this . upperBoundBytes ) ; } String rangeString = String . format ( "%s,%s" ,...
public class App { /** * Initializes the app in non - atomic way . * Then starts serving requests immediately when routes are configured . */ public static synchronized void run ( String [ ] args , String ... extraArgs ) { } }
AppStarter . startUp ( args , extraArgs ) ; // no implicit classpath scanning here boot ( ) ; // finish initialization and start the application onAppReady ( ) ; boot ( ) ;
public class LocalDate { /** * Returns a copy of this date with the specified field set to a new value . * For example , if the field type is < code > monthOfYear < / code > then the * month of year field will be changed in the returned instance . * If the field type is null , then < code > this < / code > is ret...
if ( fieldType == null ) { throw new IllegalArgumentException ( "Field must not be null" ) ; } if ( isSupported ( fieldType ) == false ) { throw new IllegalArgumentException ( "Field '" + fieldType + "' is not supported" ) ; } long instant = fieldType . getField ( getChronology ( ) ) . set ( getLocalMillis ( ) , value ...
public class DescribeGameSessionQueuesRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeGameSessionQueuesRequest describeGameSessionQueuesRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeGameSessionQueuesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeGameSessionQueuesRequest . getNames ( ) , NAMES_BINDING ) ; protocolMarshaller . marshall ( describeGameSessionQueuesRequest . getLimit ( ) , LI...
public class ClassReader { /** * Read a class file . */ private void readClassFile ( ClassSymbol c ) throws IOException { } }
int magic = nextInt ( ) ; if ( magic != JAVA_MAGIC ) throw badClassFile ( "illegal.start.of.class.file" ) ; minorVersion = nextChar ( ) ; majorVersion = nextChar ( ) ; int maxMajor = Target . MAX ( ) . majorVersion ; int maxMinor = Target . MAX ( ) . minorVersion ; if ( majorVersion > maxMajor || majorVersion * 1000 + ...
public class Shape { /** * Sets the dash array with individual dash lengths . * @ param dash length of dash * @ param dashes if specified , length of remaining dashes * @ return this Line */ public T setDashArray ( final double dash , final double ... dashes ) { } }
getAttributes ( ) . setDashArray ( new DashArray ( dash , dashes ) ) ; return cast ( ) ;
public class Messenger { /** * Send Audio message * @ param peer destination peer * @ param duration audio duration * @ param descriptor File Descriptor */ @ ObjectiveCName ( "sendAudioWithPeer:withName:withDuration:withDescriptor:" ) public void sendAudio ( @ NotNull Peer peer , @ NotNull String fileName , int d...
modules . getMessagesModule ( ) . sendAudio ( peer , fileName , duration , descriptor ) ;
public class DefaultJsonReader { /** * { @ inheritDoc } */ @ Override public void nextNull ( ) { } }
int p = peeked ; if ( p == PEEKED_NONE ) { p = doPeek ( ) ; } if ( p == PEEKED_NULL ) { peeked = PEEKED_NONE ; } else { throw new IllegalStateException ( "Expected null but was " + peek ( ) + " at line " + getLineNumber ( ) + " column " + getColumnNumber ( ) ) ; }
public class Pages { /** * Remove count pages from the beginning */ public void shrink ( int count ) { } }
char [ ] keepAllocated ; if ( count == 0 ) { throw new IllegalArgumentException ( ) ; } if ( count > lastNo ) { throw new IllegalArgumentException ( count + " vs " + lastNo ) ; } lastNo -= count ; keepAllocated = pages [ 0 ] ; System . arraycopy ( pages , count , pages , 0 , lastNo + 1 ) ; pages [ lastNo + 1 ] = keepAl...
public class InternalSARLParser { /** * InternalSARL . g : 13217:1 : ruleOpPostfix returns [ AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ] : ( kw = ' + + ' | kw = ' - - ' ) ; */ public final AntlrDatatypeRuleToken ruleOpPostfix ( ) throws RecognitionException { } }
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken ( ) ; Token kw = null ; enterRule ( ) ; try { // InternalSARL . g : 13223:2 : ( ( kw = ' + + ' | kw = ' - - ' ) ) // InternalSARL . g : 13224:2 : ( kw = ' + + ' | kw = ' - - ' ) { // InternalSARL . g : 13224:2 : ( kw = ' + + ' | kw = ' - - ' ) int alt315 = 2 ;...
public class CPOptionValueUtil { /** * Returns a range of all the cp option values where companyId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the resul...
return getPersistence ( ) . findByCompanyId ( companyId , start , end ) ;
public class JAASSystem { /** * Method to initialize the cache of JAAS systems . * @ throws CacheReloadException on error */ public static void initialize ( ) throws CacheReloadException { } }
if ( InfinispanCache . get ( ) . exists ( JAASSystem . IDCACHE ) ) { InfinispanCache . get ( ) . < Long , JAASSystem > getCache ( JAASSystem . IDCACHE ) . clear ( ) ; } else { InfinispanCache . get ( ) . < Long , JAASSystem > getCache ( JAASSystem . IDCACHE ) . addListener ( new CacheLogListener ( JAASSystem . LOG ) ) ...
public class GrpcTransportOptions { /** * Returns a channel provider from the given default provider . */ @ BetaApi public static TransportChannelProvider setUpChannelProvider ( InstantiatingGrpcChannelProvider . Builder providerBuilder , ServiceOptions < ? , ? > serviceOptions ) { } }
providerBuilder . setEndpoint ( serviceOptions . getHost ( ) ) ; return providerBuilder . build ( ) ;
public class WktConversionUtils { /** * Converts the given Well - Known Text and SRID to the appropriate function * call for the database . * @ param wkt * the Well - Known Text string . * @ param srid * the SRID string which may be an empty string . * @ param database * the database instance . * @ para...
if ( wkt == null || wkt . equals ( "" ) ) { throw new IllegalArgumentException ( "The Well-Known Text cannot be null or empty" ) ; } if ( generator == null ) { throw new IllegalArgumentException ( "The generator cannot be null or empty" ) ; } final String geomFromTextFunction = generator . getGeomFromWktFunction ( ) ; ...
public class UtlProperties { /** * < p > Evaluate null if value is string " null " . < / p > * @ param pProperties properties * @ param pPropName properties * @ return String string or NULL */ public final String evalPropVal ( final LinkedProperties pProperties , final String pPropName ) { } }
String result = pProperties . getProperty ( pPropName ) ; if ( constNull ( ) . equals ( result ) ) { return null ; } return result ;
public class EventsHelper { /** * Bind a function to the mouseenter event of each matched element . * @ param jsScope * Scope to use * @ return the jQuery code */ public static ChainableStatement mouseenter ( JsScope jsScope ) { } }
return new DefaultChainableStatement ( MouseEvent . MOUSEENTER . getEventLabel ( ) , jsScope . render ( ) ) ;
public class DateTimeFormatter { /** * Returns a copy of this formatter with a new override chronology . * This returns a formatter with similar state to this formatter but * with the override chronology set . * By default , a formatter has no override chronology , returning null . * If an override is added , t...
if ( Jdk8Methods . equals ( this . chrono , chrono ) ) { return this ; } return new DateTimeFormatter ( printerParser , locale , decimalStyle , resolverStyle , resolverFields , chrono , zone ) ;
public class EnableSarlMavenNatureAction { /** * Enable the SARL Maven nature . * @ param project the project . */ protected void enableNature ( IProject project ) { } }
final IFile pom = project . getFile ( IMavenConstants . POM_FILE_NAME ) ; final Job job ; if ( pom . exists ( ) ) { job = createJobForMavenProject ( project ) ; } else { job = createJobForJavaProject ( project ) ; } if ( job != null ) { job . schedule ( ) ; }
public class CxDxServerSessionImpl { /** * ( non - Javadoc ) * @ see org . jdiameter . api . cxdx . ServerCxDxSession # sendRegistrationTerminationRequest ( org . jdiameter . api . cxdx . events . JRegistrationTerminationRequest ) */ @ Override public void sendRegistrationTerminationRequest ( JRegistrationTermination...
send ( Event . Type . SEND_MESSAGE , request , null ) ;
public class GroovyScript2RestLoader { /** * Get working repository name . Returns the repository name from configuration * if it previously configured and returns the name of current repository in other case . * @ return String * repository name * @ throws RepositoryException */ private String getWorkingReposi...
if ( observationListenerConfiguration . getRepository ( ) == null ) { return repositoryService . getCurrentRepository ( ) . getConfiguration ( ) . getName ( ) ; } else { return observationListenerConfiguration . getRepository ( ) ; }
public class AbstractMain { /** * This method should be invoked from the static main - method . * @ param args are the commandline - arguments . * @ return the exit code or { @ code 0 } on success . */ public int run ( String ... args ) { } }
CliParser parser = getParserBuilder ( ) . build ( this ) ; try { CliModeObject mode = parser . parseParameters ( args ) ; if ( this . help ) { assert ( mode . getId ( ) . equals ( CliMode . ID_HELP ) ) ; printHelp ( parser ) ; return 0 ; } validate ( mode ) ; return run ( mode ) ; } catch ( Exception e ) { return handl...
public class Tracers { /** * 0 : 开始 * @ param request 调用请求 */ public static void startRpc ( SofaRequest request ) { } }
if ( openTrace ) { try { tracer . startRpc ( request ) ; } catch ( Exception e ) { if ( LOGGER . isWarnEnabled ( ) ) { LOGGER . warn ( "" , e ) ; } } }
public class UserPreferences { /** * Gets the file chooser with the given id . Its current directory will be * tracked and restored on subsequent calls . * @ param id * @ return the file chooser with the given id */ public static JFileChooser getFileChooser ( final String id ) { } }
JFileChooser chooser = new JFileChooser ( ) ; track ( chooser , "FileChooser." + id + ".path" ) ; return chooser ;
public class TypeExtractor { /** * Infers the cast types for one intensional predicate * No side - effect on alreadyKnownCastTypes */ private ImmutableList < TermType > inferCastTypes ( Predicate predicate , Collection < CQIE > samePredicateRules , ImmutableMap < CQIE , ImmutableList < Optional < TermType > > > termT...
if ( samePredicateRules . isEmpty ( ) ) { ImmutableList . Builder < TermType > defaultTypeBuilder = ImmutableList . builder ( ) ; RelationID tableId = relation2Predicate . createRelationFromPredicateName ( metadata . getQuotedIDFactory ( ) , predicate ) ; Optional < RelationDefinition > td = Optional . ofNullable ( met...
public class CmsJspTagFormatter { /** * Initializes this formatter tag . < p > * @ throws JspException in case something goes wrong */ protected void init ( ) throws JspException { } }
// initialize OpenCms access objects m_controller = CmsFlexController . getController ( pageContext . getRequest ( ) ) ; m_cms = m_controller . getCmsObject ( ) ; try { // get the resource name from the selected container m_element = OpenCms . getADEManager ( ) . getCurrentElement ( pageContext . getRequest ( ) ) ; m_e...
public class DeleteHapgRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteHapgRequest deleteHapgRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteHapgRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteHapgRequest . getHapgArn ( ) , HAPGARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessa...
public class KrakenImpl { /** * Parse and execute SQL . */ public Object execSync ( String sql , Object [ ] params ) { } }
QueryBuilderKraken query = QueryParserKraken . parse ( this , sql ) ; return _services . run ( 10 , TimeUnit . SECONDS , result -> query . build ( result . then ( ( q , r ) -> q . exec ( r , params ) ) ) ) ;
public class PathTrie { /** * delete a path from the trie * @ param path the path to be deleted */ public void deletePath ( String path ) { } }
if ( path == null ) { return ; } String [ ] pathComponents = path . split ( "/" ) ; TrieNode parent = rootNode ; String part = null ; if ( pathComponents . length <= 1 ) { throw new IllegalArgumentException ( "Invalid path " + path ) ; } for ( int i = 1 ; i < pathComponents . length ; i ++ ) { part = pathComponents [ i...
public class UpdateGlobalTableSettingsRequest { /** * Represents the settings for a global table in a region that will be modified . * @ param replicaSettingsUpdate * Represents the settings for a global table in a region that will be modified . */ public void setReplicaSettingsUpdate ( java . util . Collection < R...
if ( replicaSettingsUpdate == null ) { this . replicaSettingsUpdate = null ; return ; } this . replicaSettingsUpdate = new java . util . ArrayList < ReplicaSettingsUpdate > ( replicaSettingsUpdate ) ;
public class CmsSerialDateValue { /** * Convert the information from the wrapper to a JSON object . * @ return the serial date information as JSON . */ public JSONObject toJson ( ) { } }
try { JSONObject result = new JSONObject ( ) ; if ( null != getStart ( ) ) { result . put ( JsonKey . START , dateToJson ( getStart ( ) ) ) ; } if ( null != getEnd ( ) ) { result . put ( JsonKey . END , dateToJson ( getEnd ( ) ) ) ; } if ( isWholeDay ( ) ) { result . put ( JsonKey . WHOLE_DAY , true ) ; } JSONObject pa...
public class JsonPath { /** * Parses the given JSON input using the provided { @ link Configuration } and * returns a { @ link DocumentContext } for path evaluation * @ param json input * @ return a read context */ public static DocumentContext parse ( InputStream json , Configuration configuration ) { } }
return new ParseContextImpl ( configuration ) . parse ( json ) ;
public class TldScanner { /** * Scan for TLDs in JARs in / WEB - INF / lib . * @ throws IOException */ public void scanJars ( ) throws IOException { } }
ClassLoader webappLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; ClassLoader parentLoader = webappLoader . getParent ( ) ; ResourceDelegatingBundleClassLoader classLoader = null ; if ( webappLoader instanceof ResourceDelegatingBundleClassLoader ) { classLoader = ( ResourceDelegatingBundleClassLoader ...
public class JBEANBOX { /** * Equal to " @ VALUE " annotation */ public static BeanBox value ( Object value ) { } }
return new BeanBox ( ) . setTarget ( value ) . setPureValue ( true ) . setRequired ( true ) ;
public class FeatureState { /** * The list of users associated with the feature state . * @ return The user list , never < code > null < / code > * @ deprecated This method will be removed soon . Use { @ link # getParameter ( String ) } instead to read the corresponding * strategy parameter . */ @ Deprecated publ...
String value = getParameter ( UsernameActivationStrategy . PARAM_USERS ) ; if ( Strings . isNotBlank ( value ) ) { return Strings . splitAndTrim ( value , "," ) ; } return Collections . emptyList ( ) ;
public class DbxRequestUtil { /** * Convenience function for making HTTP POST requests . Like startPostNoAuth but takes byte [ ] instead of params . */ public static HttpRequestor . Response startPostRaw ( DbxRequestConfig requestConfig , String sdkUserAgentIdentifier , String host , String path , byte [ ] body , /* @ ...
String uri = buildUri ( host , path ) ; headers = copyHeaders ( headers ) ; headers = addUserAgentHeader ( headers , requestConfig , sdkUserAgentIdentifier ) ; headers . add ( new HttpRequestor . Header ( "Content-Length" , Integer . toString ( body . length ) ) ) ; try { HttpRequestor . Uploader uploader = requestConf...
public class LineOptions { /** * Creates LineOptions out of a Feature . * @ param feature feature to be converted */ @ Nullable static LineOptions fromFeature ( @ NonNull Feature feature ) { } }
if ( feature . geometry ( ) == null ) { throw new RuntimeException ( "geometry field is required" ) ; } if ( ! ( feature . geometry ( ) instanceof LineString ) ) { return null ; } LineOptions options = new LineOptions ( ) ; options . geometry = ( LineString ) feature . geometry ( ) ; if ( feature . hasProperty ( PROPER...
public class IterableOfProtosSubject { /** * Specifies that extra repeated field elements for these explicitly specified top - level field * numbers should be ignored . Sub - fields must be specified explicitly ( via { @ link * FieldDescriptor } ) if their extra elements are to be ignored as well . * < p > Use { ...
return usingConfig ( config . ignoringExtraRepeatedFieldElementsOfFields ( asList ( firstFieldNumber , rest ) ) ) ;
public class AnnotationMappingInfo { /** * XML ( テキスト ) として返す 。 * < p > JAXB標準の設定でXMLを作成します 。 < / p > * @ since 1.1 * @ return XML情報 。 */ public String toXml ( ) { } }
StringWriter writer = new StringWriter ( ) ; JAXB . marshal ( this , writer ) ; writer . flush ( ) ; return writer . toString ( ) ;
public class EventImpl { /** * Fire an event containing a DevFailed . * @ param devFailed the failed object to be sent . * @ param eventSocket * @ throws DevFailed */ protected void pushDevFailedEvent ( final DevFailed devFailed , ZMQ . Socket eventSocket ) throws DevFailed { } }
xlogger . entry ( ) ; eventTrigger . updateProperties ( ) ; eventTrigger . setError ( devFailed ) ; if ( isSendEvent ( ) ) { try { synchronized ( eventSocket ) { EventUtilities . sendToSocket ( eventSocket , fullName , counter ++ , true , EventUtilities . marshall ( devFailed ) ) ; } } catch ( final org . zeromq . ZMQE...
public class ConfigReference { /** * any failure to resolve has to start with a ConfigReference . */ @ Override AbstractConfigValue resolveSubstitutions ( ResolveContext context ) { } }
context . source ( ) . replace ( this , ResolveReplacer . cycleResolveReplacer ) ; try { AbstractConfigValue v ; try { v = context . source ( ) . lookupSubst ( context , expr , prefixLength ) ; } catch ( NotPossibleToResolve e ) { if ( expr . optional ( ) ) v = null ; else throw new ConfigException . UnresolvedSubstitu...
public class BucketTimeSeries { /** * Resets the values from [ fromIndex , endIndex ) . * @ param fromIndex the index to start from ( included ) * @ param endIndex the index to end ( excluded ) */ protected void fill ( int fromIndex , int endIndex ) { } }
fromIndex = fromIndex == - 1 ? 0 : fromIndex ; endIndex = endIndex == - 1 || endIndex > this . timeSeries . length ? this . timeSeries . length : endIndex ; final T val ; if ( applyZero ( ) ) { val = zero ( ) ; } else { val = null ; } // set the values for ( int i = fromIndex ; i < endIndex ; i ++ ) { set ( i , val ) ;...
public class BinaryErrorLogger { /** * Creates a { @ code BinaryErrorLogger } . The { @ code stringifier } is a means of rendering the * aligned items as strings . If you don ' t care , choose { @ link Functions # toStringFunction ( ) } . */ public static < ItemT extends HasDocID > BinaryErrorLogger < ItemT , ItemT >...
outputDirectory . mkdirs ( ) ; return new BinaryErrorLogger < ItemT , ItemT > ( outputDirectory , stringifier , stringifier ) ;
public class UserManager { /** * If a user is already known to be authenticated for one reason or other , this method can be * used to give them the appropriate authentication cookies to effect their login . * @ param expires the number of days in which to expire the session cookie , 0 means expire at * the end o...
String authcode = _repository . registerSession ( user , Math . max ( expires , 1 ) ) ; Cookie acookie = new Cookie ( _userAuthCookie , authcode ) ; // strip the hostname from the server and use that as the domain unless configured not to if ( ! "false" . equalsIgnoreCase ( _config . getProperty ( "auth_cookie.strip_ho...
public class LogRecordServiceImpl { /** * < pre > * 用于DO对象转化为Model对象 * < / pre > * @ param channelDO * @ return Channel */ private LogRecord doToModel ( LogRecordDO logRecordDo ) { } }
LogRecord logRecord = new LogRecord ( ) ; try { logRecord . setId ( logRecordDo . getId ( ) ) ; if ( logRecordDo . getPipelineId ( ) > 0 && logRecordDo . getChannelId ( ) > 0 ) { try { Channel channel = channelService . findByPipelineId ( logRecordDo . getPipelineId ( ) ) ; logRecord . setChannel ( channel ) ; for ( Pi...
public class Response { /** * Resolve the { @ link URI } s of the href elements of this response object against the given { @ link URI } . * < strong > Note : < / strong > This will only resolve the href URIs of the response object itself . It will not resolve any URI value of any property . If you need * to resolv...
if ( mLocation != null && ! mLocation . isAbsolute ( ) ) { mLocation = uri . resolve ( mLocation ) ; } List < URI > hrefs = mHrefs ; for ( int i = 0 , count = hrefs . size ( ) ; i < count ; ++ i ) { URI href = hrefs . get ( i ) ; if ( ! href . isAbsolute ( ) ) { hrefs . set ( i , uri . resolve ( href ) ) ; } }
public class FloatList { /** * This is equivalent to : * < pre > * < code > * if ( isEmpty ( ) ) { * return identity ; * float result = identity ; * for ( int i = 0 ; i < size ; i + + ) { * result = accumulator . applyAsFloat ( result , elementData [ i ] ) ; * return result ; * < / code > * < / pre ...
if ( isEmpty ( ) ) { return identity ; } float result = identity ; for ( int i = 0 ; i < size ; i ++ ) { result = accumulator . applyAsFloat ( result , elementData [ i ] ) ; } return result ;
public class DotmlMojo { /** * when we are using DOTML files , we need to transform them to DOT files first . */ protected File transformInputFile ( File from ) throws MojoExecutionException { } }
// create a temp file File tempFile ; try { tempFile = File . createTempFile ( "dotml-tmp" , ".xml" ) ; } catch ( IOException e ) { throw new MojoExecutionException ( "error creating temp file to hold DOTML to DOT translation" , e ) ; } // perform an XSLT transform from the input file to the temp file Source xml = new ...
public class PrimitiveCastExtensions { /** * Decodes a { @ code CharSequence } into a { @ code byte } . * < p > In opposite to the functions of { @ link Byte } , this function is * null - safe and does not generate a { @ link NumberFormatException } . * If the given string cannot by parsed , { @ code 0 } is repli...
try { return Byte . decode ( value . toString ( ) ) ; } catch ( Throwable exception ) { // Silent exception . } return 0 ;
public class FilterBuilder { /** * Adds the specified Filter to the composition of Filters joined using the OR operator . * @ param filter the Filter to add to the composition joined using the OR operator . * @ return this FilterBuilder instance . * @ see org . cp . elements . lang . Filter */ public FilterBuilde...
filterInstance = ComposableFilter . or ( filterInstance , filter ) ; return this ;
public class BrokerHelper { /** * Returns an Array with an Objects PK VALUES if convertToSql is true , any * associated java - to - sql conversions are applied . If the Object is a Proxy * or a VirtualProxy NO conversion is necessary . * @ param objectOrProxy * @ param convertToSql * @ return Object [ ] * @...
IndirectionHandler handler = ProxyHelper . getIndirectionHandler ( objectOrProxy ) ; if ( handler != null ) { return getKeyValues ( cld , handler . getIdentity ( ) , convertToSql ) ; // BRJ : convert Identity } else { ClassDescriptor realCld = getRealClassDescriptor ( cld , objectOrProxy ) ; return getValuesForObject (...
public class RunInstancesRequest { /** * The license configurations . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setLicenseSpecifications ( java . util . Collection ) } or * { @ link # withLicenseSpecifications ( java . util . Collection ) } if you wan...
if ( this . licenseSpecifications == null ) { setLicenseSpecifications ( new com . amazonaws . internal . SdkInternalList < LicenseConfigurationRequest > ( licenseSpecifications . length ) ) ; } for ( LicenseConfigurationRequest ele : licenseSpecifications ) { this . licenseSpecifications . add ( ele ) ; } return this ...
public class UserSettingsImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ SuppressWarnings ( "unchecked" ) @ Override public EList < ObjectIDMPluginConfiguration > getObjectIDMs ( ) { } }
return ( EList < ObjectIDMPluginConfiguration > ) eGet ( StorePackage . Literals . USER_SETTINGS__OBJECT_ID_MS , true ) ;
public class AmazonElasticLoadBalancingClient { /** * Describes the certificates for the specified HTTPS listener . * @ param describeListenerCertificatesRequest * @ return Result of the DescribeListenerCertificates operation returned by the service . * @ throws ListenerNotFoundException * The specified listene...
request = beforeClientExecution ( request ) ; return executeDescribeListenerCertificates ( request ) ;
public class CollectionLiteralsTypeComputer { /** * Entry point from the { @ link XbaseTypeComputer } . */ public void computeType ( XSetLiteral literal , ITypeComputationState state ) { } }
JvmGenericType setType = findDeclaredType ( Set . class , state ) ; if ( setType == null ) { handleCollectionTypeNotAvailable ( literal , state , Set . class ) ; return ; } JvmGenericType mapType = findDeclaredType ( Map . class , state ) ; for ( ITypeExpectation expectation : state . getExpectations ( ) ) { computeTyp...
public class ConstantInterfaceMethodInfo { /** * Will return either a new ConstantInterfaceMethodInfo object or * one already in the constant pool . * If it is a new ConstantInterfaceMethodInfo , it will be inserted * into the pool . */ static ConstantInterfaceMethodInfo make ( ConstantPool cp , ConstantClassInfo...
ConstantInfo ci = new ConstantInterfaceMethodInfo ( parentClass , nameAndType ) ; return ( ConstantInterfaceMethodInfo ) cp . addConstant ( ci ) ;
public class EurekaLoadBalancer { /** * This function is called from ConnectionPool to retrieve which server to * communicate * @ param key can bel null * @ return */ @ Override public Server chooseServer ( Object key ) { } }
Server server = super . chooseServer ( key ) ; if ( server == null ) { return null ; } server . setPort ( port ) ; return server ;
public class DefaultDispatchChallengeHandler { /** * Return the Node corresponding to ( " matching " ) a location , or < code > null < / code > if none can be found . * @ param location the location at which to find a Node * @ return the Node corresponding to ( " matching " ) a location , or < code > null < / code ...
List < Token < UriElement > > tokens = tokenize ( location ) ; int tokenIdx = 0 ; return rootNode . findBestMatchingNode ( tokens , tokenIdx ) ;
public class Constraint { /** * Generates the foreign key declaration for a given Constraint object . */ private void getFKStatement ( StringBuffer a ) { } }
if ( ! getName ( ) . isReservedName ( ) ) { a . append ( Tokens . T_CONSTRAINT ) . append ( ' ' ) ; a . append ( getName ( ) . statementName ) ; a . append ( ' ' ) ; } a . append ( Tokens . T_FOREIGN ) . append ( ' ' ) . append ( Tokens . T_KEY ) ; int [ ] col = getRefColumns ( ) ; getColumnList ( getRef ( ) , col , co...
public class RuleFactory { /** * Create rule from applying operator to stack . * @ param symbol symbol * @ param stack stack * @ return new instance */ public Rule getRule ( final String symbol , final Stack stack ) { } }
if ( AND_RULE . equals ( symbol ) ) { return AndRule . getRule ( stack ) ; } if ( OR_RULE . equals ( symbol ) ) { return OrRule . getRule ( stack ) ; } if ( NOT_RULE . equals ( symbol ) ) { return NotRule . getRule ( stack ) ; } if ( NOT_EQUALS_RULE . equals ( symbol ) ) { return NotEqualsRule . getRule ( stack ) ; } i...
public class AmazonRoute53Client { /** * Gets information about a specified hosted zone including the four name servers assigned to the hosted zone . * @ param getHostedZoneRequest * A request to get information about a specified hosted zone . * @ return Result of the GetHostedZone operation returned by the servi...
request = beforeClientExecution ( request ) ; return executeGetHostedZone ( request ) ;
public class ReferenceCountedOpenSslEngine { /** * Attempt to call { @ link SSL # shutdownSSL ( long ) } . * @ return { @ code false } if the call to { @ link SSL # shutdownSSL ( long ) } was not attempted or returned an error . */ private boolean doSSLShutdown ( ) { } }
if ( SSL . isInInit ( ssl ) != 0 ) { // Only try to call SSL _ shutdown if we are not in the init state anymore . // Otherwise we will see ' error : 140E0197 : SSL routines : SSL _ shutdown : shutdown while in init ' in our logs . // See also http : / / hg . nginx . org / nginx / rev / 062c189fee20 return false ; } int...
public class Model { /** * Sets attribute value as < code > java . sql . Time < / code > . * If there is a { @ link Converter } registered for the attribute that converts from Class < code > S < / code > to Class * < code > java . sql . Time < / code > , given the value is an instance of < code > S < / code > , the...
Converter < Object , Time > converter = modelRegistryLocal . converterForValue ( attributeName , value , Time . class ) ; return setRaw ( attributeName , converter != null ? converter . convert ( value ) : Convert . toTime ( value ) ) ;
public class ServletWrapper { /** * Method setUnavailableUntil . * @ param time * @ param isInit */ private void setUnavailableUntil ( long time , boolean isInit ) // PM01373 { } }
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) logger . logp ( Level . FINE , CLASS_NAME , "setUnavailableUntil" , "setUnavailableUntil() : " + time ) ; if ( isInit ) { state = UNINITIALIZED_STATE ; // PM01373 } else { state = UNAVAILABLE_STATE ; } unavai...
public class XVariableDeclarationImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setWriteable ( boolean newWriteable ) { } }
boolean oldWriteable = writeable ; writeable = newWriteable ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , XbasePackage . XVARIABLE_DECLARATION__WRITEABLE , oldWriteable , writeable ) ) ;
public class EnumDictionary { /** * Convenience method to be invoked by JNI . */ static < T extends Enum < T > > T get ( Class < T > clazz , int v ) { } }
return get ( clazz ) . constant ( v ) ;
public class OnlineLDAsvi { /** * Performs the main iteration to determine the topic distribution of the * given document against the current model parameters . The non zero values * of phi will be stored in { @ code indexMap } and { @ code phiCols } * @ param doc the document to get the topic assignments for *...
// φ ^ k _ dn ∝ exp { E [ logθdk ] + E [ logβk , wdn ] } , k ∈ { 1 , . . . , K } /* * we have the exp versions of each , and exp ( log ( x ) + log ( y ) ) = x y * so we can just use the doc product between the vectors per * document to get the normalization constan Z * When we update γ we multiply by the word , s...
public class GrailsLocaleUtils { /** * Returns the set of available locale suffixes * @ return the set of available locale suffixes */ public static Set < String > getAvailableLocaleSuffixes ( ) { } }
Set < String > availableLocaleSuffixes = new HashSet < String > ( ) ; Locale [ ] availableLocales = Locale . getAvailableLocales ( ) ; for ( int i = 0 ; i < availableLocales . length ; i ++ ) { Locale locale = availableLocales [ i ] ; StringBuffer sb = new StringBuffer ( ) ; if ( locale != null ) { String language = lo...
public class DataStatistics { /** * Caches the given statistics . They are later retrievable under the given identifier . * @ param statistics The statistics to cache . * @ param identifier The identifier which may be later used to retrieve the statistics . */ public void cacheBaseStatistics ( BaseStatistics statis...
synchronized ( this . baseStatisticsCache ) { this . baseStatisticsCache . put ( identifier , statistics ) ; }
public class JDBC4CallableStatement { /** * Returns an object representing the value of OUT parameter parameterName and uses map for the custom mapping of the parameter value . */ @ Override public Object getObject ( String parameterName , Map < String , Class < ? > > map ) throws SQLException { } }
checkClosed ( ) ; throw SQLError . noSupport ( ) ;
public class CQJDBCStorageConnection { /** * { @ inheritDoc } */ @ Override public void rename ( NodeData data ) throws RepositoryException , UnsupportedOperationException , InvalidItemStateException , IllegalStateException { } }
currentItem = data ; try { setOperationType ( TYPE_RENAME ) ; super . rename ( data ) ; } finally { currentItem = null ; }
public class Matrix4x3d { /** * Exchange the values of < code > this < / code > matrix with the given < code > other < / code > matrix . * @ param other * the other matrix to exchange the values with * @ return this */ public Matrix4x3d swap ( Matrix4x3d other ) { } }
double tmp ; tmp = m00 ; m00 = other . m00 ; other . m00 = tmp ; tmp = m01 ; m01 = other . m01 ; other . m01 = tmp ; tmp = m02 ; m02 = other . m02 ; other . m02 = tmp ; tmp = m10 ; m10 = other . m10 ; other . m10 = tmp ; tmp = m11 ; m11 = other . m11 ; other . m11 = tmp ; tmp = m12 ; m12 = other . m12 ; other . m12 = t...
public class AutoPrefixerPostProcessor { /** * ( non - Javadoc ) * @ see net . jawr . web . resource . bundle . postprocess . * AbstractChainedResourceBundlePostProcessor * # doPostProcessBundle ( net . jawr . web * . resource . bundle . postprocess . BundleProcessingStatus , * java . lang . StringBuffer ) */...
if ( jsEngine == null ) { initialize ( status . getJawrConfig ( ) ) ; } StopWatch stopWatch = new StopWatch ( ) ; stopWatch . start ( "Processing Autoprefixer on '" + status . getLastPathAdded ( ) + "'" ) ; String cssSource = bundleData . toString ( ) ; String res = null ; try { res = ( String ) jsEngine . invokeFuncti...
public class RegisteredServicesEndpoint { /** * Fetch service either by numeric id or service id pattern . * @ param id the id * @ return the registered service */ @ ReadOperation ( produces = { } }
ActuatorMediaType . V2_JSON , "application/vnd.cas.services+yaml" , MediaType . APPLICATION_JSON_VALUE } ) public RegisteredService fetchService ( @ Selector final String id ) { if ( NumberUtils . isDigits ( id ) ) { return this . servicesManager . findServiceBy ( Long . parseLong ( id ) ) ; } return this . servicesMan...
public class ProcessDefinitionEntity { /** * Updates all modifiable fields from another process definition entity . * @ param updatingProcessDefinition */ @ Override public void updateModifiableFieldsFromEntity ( ProcessDefinitionEntity updatingProcessDefinition ) { } }
if ( this . key . equals ( updatingProcessDefinition . key ) && this . deploymentId . equals ( updatingProcessDefinition . deploymentId ) ) { // TODO : add a guard once the mismatch between revisions in deployment cache and database has been resolved this . revision = updatingProcessDefinition . revision ; this . suspe...
public class ListManagementImageListsImpl { /** * Returns the details of the image list with list Id equal to list Id passed . * @ param listId List Id of the image list . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the ImageList object */ public Obser...
return getDetailsWithServiceResponseAsync ( listId ) . map ( new Func1 < ServiceResponse < ImageList > , ImageList > ( ) { @ Override public ImageList call ( ServiceResponse < ImageList > response ) { return response . body ( ) ; } } ) ;
class Main { /** * Identify the greatest prime divisor of a given integer . It assumes that input is greater than 1 and is not a prime number . * @ param num An integer that is greater than 1 and is not a prime number . * @ return The largest prime factor of num . */ public static int greatestPrimeDivisor ( int num...
int highestPrime = 1 ; for ( int i = 2 ; i <= num ; i ++ ) { if ( num % i == 0 && checkPrime ( i ) ) { highestPrime = Math . max ( highestPrime , i ) ; } } return highestPrime ;
public class ResourceGeneratorReaderProxyFactory { /** * Returns the array of interfaces implemented by the ResourceGenerator * @ param generator * the generator * @ return the array of interfaces implemented by the ResourceGenerator */ private static Class < ? > [ ] getGeneratorInterfaces ( ResourceGenerator gen...
Set < Class < ? > > interfaces = new HashSet < > ( ) ; addInterfaces ( generator , interfaces ) ; return ( Class [ ] ) interfaces . toArray ( new Class [ ] { } ) ;