signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class DeltaEvictor { /** * Creates a { @ code DeltaEvictor } from the given threshold and { @ code DeltaFunction } .
* Eviction is done before the window function .
* @ param threshold The threshold
* @ param deltaFunction The { @ code DeltaFunction } */
public static < T , W extends Window > DeltaEvictor < T , W > of ( double threshold , DeltaFunction < T > deltaFunction ) { } }
|
return new DeltaEvictor < > ( threshold , deltaFunction ) ;
|
public class DistributedLogSession { /** * Returns the current primary term .
* @ return the current primary term */
private CompletableFuture < PrimaryTerm > term ( ) { } }
|
CompletableFuture < PrimaryTerm > future = new CompletableFuture < > ( ) ; threadContext . execute ( ( ) -> { if ( term != null ) { future . complete ( term ) ; } else { primaryElection . getTerm ( ) . whenCompleteAsync ( ( term , error ) -> { if ( term != null ) { this . term = term ; future . complete ( term ) ; } else { future . completeExceptionally ( new PrimitiveException . Unavailable ( ) ) ; } } ) ; } } ) ; return future ;
|
public class IPOImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setOvlyOrent ( Integer newOvlyOrent ) { } }
|
Integer oldOvlyOrent = ovlyOrent ; ovlyOrent = newOvlyOrent ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . IPO__OVLY_ORENT , oldOvlyOrent , ovlyOrent ) ) ;
|
public class ClusterState { /** * Returns a list of passive members .
* @ param comparator A comparator with which to sort the members list .
* @ return The sorted members list . */
List < MemberState > getPassiveMemberStates ( Comparator < MemberState > comparator ) { } }
|
List < MemberState > passiveMembers = new ArrayList < > ( getPassiveMemberStates ( ) ) ; Collections . sort ( passiveMembers , comparator ) ; return passiveMembers ;
|
public class WorkDuration { /** * Return the duration using the following format DDHHMM , where DD is the number of days , HH is the number of months , and MM the number of minutes .
* For instance , 3 days and 4 hours will return 030400 ( if hoursIndDay is 8 ) . */
public long toLong ( ) { } }
|
int workingDays = days ; int workingHours = hours ; if ( hours >= hoursInDay ) { int nbAdditionalDays = hours / hoursInDay ; workingDays += nbAdditionalDays ; workingHours = hours - ( nbAdditionalDays * hoursInDay ) ; } return 1L * workingDays * DAY_POSITION_IN_LONG + workingHours * HOUR_POSITION_IN_LONG + minutes * MINUTE_POSITION_IN_LONG ;
|
public class ISPNCacheableLockManagerImpl { /** * { @ inheritDoc } */
@ Override protected synchronized void internalLock ( String sessionId , String nodeIdentifier ) throws LockException { } }
|
CacheableSessionLockManager session = sessionLockManagers . get ( sessionId ) ; if ( session != null && session . containsPendingLock ( nodeIdentifier ) ) { LockData lockData = session . getPendingLock ( nodeIdentifier ) ; // this will return null if success . And old data if something exists . . .
LockData oldLockData = doPut ( lockData ) ; if ( oldLockData != null ) { throw new LockException ( "Unable to write LockData. Node [" + lockData . getNodeIdentifier ( ) + "] already has LockData!" ) ; } session . notifyLockPersisted ( nodeIdentifier ) ; } else { throw new LockException ( "No lock in pending locks" ) ; }
|
public class Long { /** * Returns the { @ code long } value of the system property with
* the specified name . The first argument is treated as the name
* of a system property . System properties are accessible through
* the { @ link java . lang . System # getProperty ( java . lang . String ) }
* method . The string value of this property is then interpreted
* as a { @ code long } value , as per the
* { @ link Long # decode decode } method , and a { @ code Long } object
* representing this value is returned ; in summary :
* < ul >
* < li > If the property value begins with the two ASCII characters
* { @ code 0x } or the ASCII character { @ code # } , not followed by
* a minus sign , then the rest of it is parsed as a hexadecimal integer
* exactly as for the method { @ link # valueOf ( java . lang . String , int ) }
* with radix 16.
* < li > If the property value begins with the ASCII character
* { @ code 0 } followed by another character , it is parsed as
* an octal integer exactly as by the method { @ link
* # valueOf ( java . lang . String , int ) } with radix 8.
* < li > Otherwise the property value is parsed as a decimal
* integer exactly as by the method
* { @ link # valueOf ( java . lang . String , int ) } with radix 10.
* < / ul >
* < p > Note that , in every case , neither { @ code L }
* ( { @ code ' \ u005Cu004C ' } ) nor { @ code l }
* ( { @ code ' \ u005Cu006C ' } ) is permitted to appear at the end
* of the property value as a type indicator , as would be
* permitted in Java programming language source code .
* < p > The second argument is the default value . The default value is
* returned if there is no property of the specified name , if the
* property does not have the correct numeric format , or if the
* specified name is empty or { @ code null } .
* @ param nm property name .
* @ param val default value .
* @ return the { @ code Long } value of the property .
* @ throws SecurityException for the same reasons as
* { @ link System # getProperty ( String ) System . getProperty }
* @ see System # getProperty ( java . lang . String )
* @ see System # getProperty ( java . lang . String , java . lang . String ) */
public static Long getLong ( String nm , Long val ) { } }
|
String v = null ; try { v = System . getProperty ( nm ) ; } catch ( IllegalArgumentException | NullPointerException e ) { } if ( v != null ) { try { return Long . decode ( v ) ; } catch ( NumberFormatException e ) { } } return val ;
|
public class CloseableIterables { /** * Creates a { @ link CloseableIterable } from a standard { @ link Iterable } . If { @ code iterable } is already
* a { @ link CloseableIterable } it will simply be returned as is . */
public static < T > CloseableIterable < T > fromIterable ( Iterable < T > iterable ) { } }
|
requireNonNull ( iterable ) ; if ( iterable instanceof CloseableIterable ) return ( CloseableIterable < T > ) iterable ; return new FluentCloseableIterable < T > ( ) { @ Override protected void doClose ( ) { if ( iterable instanceof AutoCloseable ) { try { ( ( AutoCloseable ) iterable ) . close ( ) ; } catch ( RuntimeException re ) { throw re ; } catch ( Exception e ) { throw new IllegalStateException ( e ) ; } } } @ Override protected Iterator < T > retrieveIterator ( ) { return iterable . iterator ( ) ; } } ;
|
public class WorkflowEngineOperationsProcessor { /** * Handle the state changes for the rule engine
* @ param changes */
private void processStateChanges ( final Map < String , String > changes ) { } }
|
workflowEngine . event ( WorkflowSystemEventType . WillProcessStateChange , String . format ( "saw state changes: %s" , changes ) , changes ) ; workflowEngine . getState ( ) . updateState ( changes ) ; boolean update = Rules . update ( workflowEngine . getRuleEngine ( ) , workflowEngine . getState ( ) ) ; workflowEngine . event ( WorkflowSystemEventType . DidProcessStateChange , String . format ( "applied state changes and rules (changed? %s): %s" , update , workflowEngine . getState ( ) ) , workflowEngine . getState ( ) ) ;
|
public class ModuleApiKeys { /** * Create a new delivery api key .
* @ param spaceId the id of the space this is valid on .
* @ param key the key to be created .
* @ return the just created key , containing the delivery token .
* @ throws IllegalArgumentException if spaceId is null .
* @ throws IllegalArgumentException if key is null . */
public CMAApiKey create ( String spaceId , CMAApiKey key ) { } }
|
assertNotNull ( spaceId , "spaceId" ) ; assertNotNull ( key , "key" ) ; return service . create ( spaceId , key ) . blockingFirst ( ) ;
|
public class PrcGoodsLossLineSave { /** * < p > Process entity request . < / p >
* @ param pAddParam additional param , e . g . return this line ' s
* document in " nextEntity " for farther process
* @ param pRequestData Request Data
* @ param pEntity Entity to process
* @ return Entity processed for farther process or null
* @ throws Exception - an exception */
@ Override public final GoodsLossLine process ( final Map < String , Object > pAddParam , final GoodsLossLine pEntity , final IRequestData pRequestData ) throws Exception { } }
|
if ( pEntity . getIsNew ( ) ) { if ( pEntity . getItsQuantity ( ) . doubleValue ( ) <= 0 && pEntity . getReversedId ( ) == null ) { throw new ExceptionWithCode ( ExceptionWithCode . WRONG_PARAMETER , "quantity_less_or_equal_zero::" + pAddParam . get ( "user" ) ) ; } // Beige - Orm refresh :
pEntity . setInvItem ( getSrvOrm ( ) . retrieveEntity ( pAddParam , pEntity . getInvItem ( ) ) ) ; pEntity . setItsOwner ( getSrvOrm ( ) . retrieveEntity ( pAddParam , pEntity . getItsOwner ( ) ) ) ; // optimistic locking ( dirty check ) :
Long ownerVersion = Long . valueOf ( pRequestData . getParameter ( GoodsLoss . class . getSimpleName ( ) + ".ownerVersion" ) ) ; pEntity . getItsOwner ( ) . setItsVersion ( ownerVersion ) ; pEntity . setItsQuantity ( pEntity . getItsQuantity ( ) . setScale ( getSrvAccSettings ( ) . lazyGetAccSettings ( pAddParam ) . getQuantityPrecision ( ) , getSrvAccSettings ( ) . lazyGetAccSettings ( pAddParam ) . getRoundingMode ( ) ) ) ; getSrvOrm ( ) . insertEntity ( pAddParam , pEntity ) ; pEntity . setIsNew ( false ) ; if ( pEntity . getReversedId ( ) != null ) { GoodsLossLine reversed = getSrvOrm ( ) . retrieveEntityById ( pAddParam , GoodsLossLine . class , pEntity . getReversedId ( ) ) ; if ( reversed . getReversedId ( ) != null ) { throw new ExceptionWithCode ( ExceptionWithCode . FORBIDDEN , "attempt_to_reverse_reversed::" + pAddParam . get ( "user" ) ) ; } reversed . setReversedId ( pEntity . getItsId ( ) ) ; getSrvOrm ( ) . updateEntity ( pAddParam , reversed ) ; srvWarehouseEntry . reverseDraw ( pAddParam , pEntity ) ; srvCogsEntry . reverseDraw ( pAddParam , pEntity , pEntity . getItsOwner ( ) . getItsDate ( ) , pEntity . getItsOwner ( ) . getItsId ( ) ) ; } else { srvWarehouseEntry . withdrawal ( pAddParam , pEntity , pEntity . getWarehouseSiteFo ( ) ) ; srvCogsEntry . withdrawal ( pAddParam , pEntity , pEntity . getItsOwner ( ) . getItsDate ( ) , pEntity . getItsOwner ( ) . getItsId ( ) ) ; } String query = "select sum(ITSTOTAL) as ITSTOTAL from COGSENTRY where REVERSEDID" + " is null and DRAWINGTYPE=1005 and DRAWINGOWNERID=" + pEntity . getItsOwner ( ) . getItsId ( ) ; Double total = getSrvDatabase ( ) . evalDoubleResult ( query , "ITSTOTAL" ) ; if ( total == null ) { total = 0.0 ; } pEntity . getItsOwner ( ) . setItsTotal ( BigDecimal . valueOf ( total ) . setScale ( getSrvAccSettings ( ) . lazyGetAccSettings ( pAddParam ) . getCostPrecision ( ) , getSrvAccSettings ( ) . lazyGetAccSettings ( pAddParam ) . getRoundingMode ( ) ) ) ; getSrvOrm ( ) . updateEntity ( pAddParam , pEntity . getItsOwner ( ) ) ; pAddParam . put ( "nextEntity" , pEntity . getItsOwner ( ) ) ; pAddParam . put ( "nameOwnerEntity" , GoodsLoss . class . getSimpleName ( ) ) ; return null ; } else { throw new ExceptionWithCode ( ExceptionWithCode . FORBIDDEN , "edit_not_allowed::" + pAddParam . get ( "user" ) ) ; }
|
public class Choice8 { /** * Static factory method for wrapping a value of type < code > D < / code > in a { @ link Choice8 } .
* @ param d the value
* @ param < A > the first possible type
* @ param < B > the second possible type
* @ param < C > the third possible type
* @ param < D > the fourth possible type
* @ param < E > the fifth possible type
* @ param < F > the sixth possible type
* @ param < G > the seventh possible type
* @ param < H > the eighth possible type
* @ return the wrapped value as a { @ link Choice8 } & lt ; A , B , C , D , E , F , G , H & gt ; */
public static < A , B , C , D , E , F , G , H > Choice8 < A , B , C , D , E , F , G , H > d ( D d ) { } }
|
return new _D < > ( d ) ;
|
public class CachedInfo { /** * Get the ending time of this service . */
public Date getEndDate ( ) { } }
|
if ( ( m_startTime != null ) && ( m_endTime != null ) ) { if ( m_endTime . before ( m_startTime ) ) return m_startTime ; } return m_endTime ;
|
public class CmsJspImageBean { /** * Creates a ratio scaled version of the current image . < p >
* @ param ratioStr the rato variation to generate , for example " 4-3 " or " 1-1 " . < p >
* @ return a ratio scaled version of the current image */
public CmsJspImageBean createRatioVariation ( String ratioStr ) { } }
|
CmsJspImageBean result = null ; try { int i = ratioStr . indexOf ( '-' ) ; if ( i > 0 ) { ratioStr = ratioStr . replace ( ',' , '.' ) ; double ratioW = Double . valueOf ( ratioStr . substring ( 0 , i ) ) . doubleValue ( ) ; double ratioH = Double . valueOf ( ratioStr . substring ( i + 1 ) ) . doubleValue ( ) ; int targetWidth , targetHeight ; double ratioFactorW = getScaler ( ) . getWidth ( ) / ratioW ; targetWidth = getScaler ( ) . getWidth ( ) ; targetHeight = ( int ) Math . round ( ratioH * ratioFactorW ) ; if ( targetHeight > getScaler ( ) . getHeight ( ) ) { double ratioFactorH = getScaler ( ) . getHeight ( ) / ratioH ; targetWidth = ( int ) Math . round ( ratioW * ratioFactorH ) ; targetHeight = getScaler ( ) . getHeight ( ) ; } CmsImageScaler targetScaler = createVariation ( getWidth ( ) , getHeight ( ) , getBaseScaler ( ) , targetWidth , targetHeight , getQuality ( ) ) ; if ( targetScaler != null ) { result = createVariation ( targetScaler ) ; result . m_ratio = ratioStr ; result . m_ratioHeightPercentage = calcRatioHeightPercentage ( ratioW , ratioH ) ; } } } catch ( NumberFormatException e ) { if ( LOG . isWarnEnabled ( ) ) { LOG . warn ( String . format ( "Illegal ratio format: '%s' not usable for image scaling" , ratioStr ) ) ; } } return result ;
|
public class AbstractAmazonSNSAsync { /** * Simplified method form for invoking the SetSubscriptionAttributes operation with an AsyncHandler .
* @ see # setSubscriptionAttributesAsync ( SetSubscriptionAttributesRequest , com . amazonaws . handlers . AsyncHandler ) */
@ Override public java . util . concurrent . Future < SetSubscriptionAttributesResult > setSubscriptionAttributesAsync ( String subscriptionArn , String attributeName , String attributeValue , com . amazonaws . handlers . AsyncHandler < SetSubscriptionAttributesRequest , SetSubscriptionAttributesResult > asyncHandler ) { } }
|
return setSubscriptionAttributesAsync ( new SetSubscriptionAttributesRequest ( ) . withSubscriptionArn ( subscriptionArn ) . withAttributeName ( attributeName ) . withAttributeValue ( attributeValue ) , asyncHandler ) ;
|
public class ExceptionUtils { /** * Create an install exception from a repository exception and feature names
* @ param e
* @ param featureNames
* @ param installingAsset
* @ param proxy
* @ param defaultRepo
* @ return */
static InstallException create ( RepositoryException e , Collection < String > featureNames , boolean installingAsset , RestRepositoryConnectionProxy proxy , boolean defaultRepo , boolean isOpenLiberty ) { } }
|
Throwable cause = e ; Throwable rootCause = e ; // Check the list of causes of the exception for connection issues
while ( ( rootCause = cause . getCause ( ) ) != null && cause != rootCause ) { if ( rootCause instanceof UnknownHostException || rootCause instanceof FileNotFoundException || rootCause instanceof ConnectException ) { return create ( e , rootCause , proxy , defaultRepo ) ; } cause = rootCause ; } if ( featureNames != null ) { if ( isCertPathBuilderException ( cause ) ) return createByKey ( InstallException . CONNECTION_FAILED , e , defaultRepo ? "ERROR_FAILED_TO_CONNECT_CAUSED_BY_CERT" : "ERROR_FAILED_TO_CONNECT_REPOS_CAUSED_BY_CERT" ) ; String featuresListStr = InstallUtils . getFeatureListOutput ( featureNames ) ; InstallException ie ; if ( isOpenLiberty ) { ie = create ( Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( installingAsset ? "ERROR_FAILED_TO_RESOLVE_ASSETS" : "ERROR_FAILED_TO_RESOLVE_FEATURES_FOR_OPEN_LIBERTY" , featuresListStr ) , e ) ; } else { ie = create ( Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( installingAsset ? "ERROR_FAILED_TO_RESOLVE_ASSETS" : "ERROR_FAILED_TO_RESOLVE_FEATURES" , featuresListStr ) , e ) ; } ie . setData ( featuresListStr ) ; return ie ; } else return create ( e ) ;
|
public class Credentials { /** * The resulting string is base64 encoded ( YWxhZGRpbjpvcGVuc2VzYW1l ) .
* @ return encoded string */
public String encode ( ) { } }
|
byte [ ] credentialsBytes = combine ( ) . getBytes ( UTF_8 ) ; return Base64 . getEncoder ( ) . encodeToString ( credentialsBytes ) ;
|
public class FessMessages { /** * Add the created action message for the key ' constraints . Min . message ' with parameters .
* < pre >
* message : { item } must be greater than or equal to { value } .
* < / pre >
* @ param property The property name for the message . ( NotNull )
* @ param value The parameter value for message . ( NotNull )
* @ return this . ( NotNull ) */
public FessMessages addConstraintsMinMessage ( String property , String value ) { } }
|
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( CONSTRAINTS_Min_MESSAGE , value ) ) ; return this ;
|
public class RelationalOperationsMatrix { /** * the geometry and / or a boundary index of the geometry . */
private static void markClusterEndPoints_ ( int geometry , TopoGraph topoGraph , int clusterIndex ) { } }
|
int id = topoGraph . getGeometryID ( geometry ) ; for ( int cluster = topoGraph . getFirstCluster ( ) ; cluster != - 1 ; cluster = topoGraph . getNextCluster ( cluster ) ) { int cluster_parentage = topoGraph . getClusterParentage ( cluster ) ; if ( ( cluster_parentage & id ) == 0 ) continue ; int first_half_edge = topoGraph . getClusterHalfEdge ( cluster ) ; if ( first_half_edge == - 1 ) { topoGraph . setClusterUserIndex ( cluster , clusterIndex , 0 ) ; continue ; } int next_half_edge = first_half_edge ; int index = 0 ; do { int half_edge = next_half_edge ; int half_edge_parentage = topoGraph . getHalfEdgeParentage ( half_edge ) ; if ( ( half_edge_parentage & id ) != 0 ) index ++ ; next_half_edge = topoGraph . getHalfEdgeNext ( topoGraph . getHalfEdgeTwin ( half_edge ) ) ; } while ( next_half_edge != first_half_edge ) ; topoGraph . setClusterUserIndex ( cluster , clusterIndex , index ) ; } return ;
|
public class RTMPHandler { /** * Create and send SO message stating that a SO could not be created .
* @ param conn
* @ param message
* Shared object message that incurred the failure */
private void sendSOCreationFailed ( RTMPConnection conn , SharedObjectMessage message ) { } }
|
log . debug ( "sendSOCreationFailed - message: {} conn: {}" , message , conn ) ; // reset the object so we can re - use it
message . reset ( ) ; // add the error event
message . addEvent ( new SharedObjectEvent ( ISharedObjectEvent . Type . CLIENT_STATUS , "error" , SO_CREATION_FAILED ) ) ; if ( conn . isChannelUsed ( 3 ) ) { // XXX Paul : I dont like this direct write stuff , need to move to event - based
conn . getChannel ( 3 ) . write ( message ) ; } else { log . warn ( "Channel is not in-use and cannot handle SO event: {}" , message , new Exception ( "SO event handling failure" ) ) ; // XXX Paul : I dont like this direct write stuff , need to move to event - based
conn . getChannel ( 3 ) . write ( message ) ; }
|
public class HBaseMenuScreen { /** * Code to display a Menu .
* @ param out The html out stream .
* @ param iHtmlAttributes The HTML attributes .
* @ return true If fields have been found .
* @ exception DBException File exception . */
public boolean printData ( PrintWriter out , int iHtmlAttributes ) { } }
|
boolean bFieldsFound = false ; Record recMenu = ( ( BaseMenuScreen ) this . getScreenField ( ) ) . getMainRecord ( ) ; String strCellFormat = this . getHtmlString ( recMenu ) ; XMLParser parser = ( ( BaseMenuScreen ) this . getScreenField ( ) ) . getXMLParser ( recMenu ) ; parser . parseHtmlData ( out , strCellFormat ) ; parser . free ( ) ; parser = null ; return bFieldsFound ;
|
public class ByteArrayUtil { /** * Write a double to the byte array at the given offset .
* @ param array Array to write to
* @ param offset Offset to write to
* @ param v data
* @ return number of bytes written */
public static int writeDouble ( byte [ ] array , int offset , double v ) { } }
|
return writeLong ( array , offset , Double . doubleToLongBits ( v ) ) ;
|
public class StartRserve { /** * R batch to check Rserve is installed
* @ param Rcmd command necessary to start R
* @ return Rserve is already installed */
public static boolean isRserveInstalled ( String Rcmd ) { } }
|
Process p = doInR ( "is.element(set=installed.packages(lib.loc='" + RserveDaemon . app_dir ( ) + "'),el='Rserve')" , Rcmd , "--vanilla --silent" , false ) ; if ( p == null ) { Log . Err . println ( "Failed to ask if Rserve is installed" ) ; return false ; } try { StringBuffer result = new StringBuffer ( ) ; // we need to fetch the output - some platforms will die if you don ' t . . .
StreamHog error = new StreamHog ( p . getErrorStream ( ) , true ) ; StreamHog output = new StreamHog ( p . getInputStream ( ) , true ) ; error . join ( ) ; output . join ( ) ; if ( ! RserveDaemon . isWindows ( ) ) /* on Windows the process will never return , so we cannot wait */
{ p . waitFor ( ) ; } else { Thread . sleep ( 2000 ) ; } result . append ( output . getOutput ( ) ) ; result . append ( error . getOutput ( ) ) ; if ( result . toString ( ) . contains ( "[1] TRUE" ) ) { Log . Out . println ( "Rserve is already installed." ) ; return true ; } else if ( result . toString ( ) . contains ( "[1] FALSE" ) ) { Log . Out . println ( "Rserve is not yet installed." ) ; return false ; } else { Log . Err . println ( "Cannot check if Rserve is installed: " + result . toString ( ) ) ; return false ; } } catch ( InterruptedException e ) { return false ; }
|
public class ConfigUtils { /** * reset cookieName to default value if it is not valid
* @ param cookieName
* @ param quiet
* don ' t emit any error messages
* @ return original name or default if original was invalid */
public String validateCookieName ( String cookieName , boolean quiet ) { } }
|
if ( cookieName == null || cookieName . length ( ) == 0 ) { if ( ! quiet ) { Tr . error ( tc , "COOKIE_NAME_CANT_BE_EMPTY" ) ; } return CFG_DEFAULT_COOKIENAME ; } String cookieNameUc = cookieName . toUpperCase ( ) ; boolean valid = true ; for ( int i = 0 ; i < cookieName . length ( ) ; i ++ ) { String eval = cookieNameUc . substring ( i , i + 1 ) ; if ( ! validCookieChars . contains ( eval ) ) { if ( ! quiet ) { Tr . error ( tc , "COOKIE_NAME_INVALID" , new Object [ ] { cookieName , eval } ) ; } valid = false ; } } if ( ! valid ) { return CFG_DEFAULT_COOKIENAME ; } else { return cookieName ; }
|
public class Logger { /** * Log . */
public void trace ( String message , Throwable t ) { } }
|
if ( getLevel ( ) > Level . TRACE . ordinal ( ) ) return ; logMessage ( Level . TRACE , message , t ) ;
|
public class appqoeaction { /** * Use this API to update appqoeaction . */
public static base_response update ( nitro_service client , appqoeaction resource ) throws Exception { } }
|
appqoeaction updateresource = new appqoeaction ( ) ; updateresource . name = resource . name ; updateresource . priority = resource . priority ; updateresource . altcontentsvcname = resource . altcontentsvcname ; updateresource . altcontentpath = resource . altcontentpath ; updateresource . polqdepth = resource . polqdepth ; updateresource . priqdepth = resource . priqdepth ; updateresource . maxconn = resource . maxconn ; updateresource . delay = resource . delay ; updateresource . dostrigexpression = resource . dostrigexpression ; updateresource . dosaction = resource . dosaction ; return updateresource . update_resource ( client ) ;
|
public class BooleanCondition { /** * { @ inheritDoc } */
public Set < String > postProcessingFields ( ) { } }
|
Set < String > fields = new LinkedHashSet < > ( ) ; must . forEach ( condition -> fields . addAll ( condition . postProcessingFields ( ) ) ) ; should . forEach ( condition -> fields . addAll ( condition . postProcessingFields ( ) ) ) ; return fields ;
|
public class SPSMMappingFilter { /** * Increments by 1 the Integer of the given list of integers at the index position .
* @ param array array list of integers .
* @ param index index of the element to be incremented . */
private void inc ( ArrayList < Integer > array , int index ) { } }
|
array . set ( index , array . get ( index ) + 1 ) ;
|
public class TimeMetaData { /** * Is the given object valid for this column ,
* given the column type and any
* restrictions given by the
* ColumnMetaData object ?
* @ param input object to check
* @ return true if value , false if invalid */
@ Override public boolean isValid ( Object input ) { } }
|
long epochMillisec ; try { epochMillisec = Long . parseLong ( input . toString ( ) ) ; } catch ( NumberFormatException e ) { return false ; } if ( minValidTime != null && epochMillisec < minValidTime ) return false ; return ! ( maxValidTime != null && epochMillisec > maxValidTime ) ;
|
public class DateField { /** * Converts a millisecond time to a string suitable for indexing .
* Supported date range is : 30 BC - 3189
* @ throws IllegalArgumentException if the given < code > time < / code > is not
* within the supported date range . */
public static String timeToString ( long time ) { } }
|
time += DATE_SHIFT ; if ( time < 0 ) { throw new IllegalArgumentException ( "time too early" ) ; } String s = Long . toString ( time , Character . MAX_RADIX ) ; if ( s . length ( ) > DATE_LEN ) { throw new IllegalArgumentException ( "time too late" ) ; } // Pad with leading zeros
if ( s . length ( ) < DATE_LEN ) { StringBuilder sb = new StringBuilder ( s ) ; while ( sb . length ( ) < DATE_LEN ) { sb . insert ( 0 , 0 ) ; } s = sb . toString ( ) ; } return s ;
|
public class ODatabaseRecordAbstract { /** * Deletes the record without checking the version . */
public ODatabaseRecord delete ( final ORID iRecord ) { } }
|
executeDeleteRecord ( iRecord , - 1 , true , true , OPERATION_MODE . SYNCHRONOUS ) ; return this ;
|
public class MergedParameterization { /** * Rewind the configuration to the initial situation */
public void rewind ( ) { } }
|
synchronized ( used ) { for ( ParameterPair pair : used ) { current . addParameter ( pair ) ; } used . clear ( ) ; }
|
public class BuilderSyncSetup { /** * Method unlocks the write lock and notifies the change to the internal data holder .
* In case the thread is externally interrupted , no InterruptedException is thrown but instead the interrupted flag is set for the corresponding thread .
* Please use the service method Thread . currentThread ( ) . isInterrupted ( ) to get informed about any external interruption .
* @ param notifyChange */
public void unlockWrite ( boolean notifyChange ) { } }
|
logger . debug ( "order write unlock" ) ; writeLockTimeout . cancel ( ) ; writeLock . unlock ( ) ; writeLockConsumer = "Unknown" ; logger . debug ( "write unlocked" ) ; if ( notifyChange ) { try { try { holder . notifyChange ( ) ; } catch ( InterruptedException ex ) { Thread . currentThread ( ) . interrupt ( ) ; } } catch ( CouldNotPerformException ex ) { ExceptionPrinter . printHistory ( new CouldNotPerformException ( "Could not inform builder holder about data update!" , ex ) , logger , LogLevel . ERROR ) ; } }
|
public class MatrixFunctions { /** * Element - wise power function . Replaces each element with its
* power of < tt > d < / tt > . Note that this is an in - place operation .
* @ param d the exponent
* @ see MatrixFunctions # pow ( DoubleMatrix , double )
* @ return this matrix */
public static DoubleMatrix powi ( DoubleMatrix x , double d ) { } }
|
if ( d == 2.0 ) return x . muli ( x ) ; else { for ( int i = 0 ; i < x . length ; i ++ ) x . put ( i , ( double ) Math . pow ( x . get ( i ) , d ) ) ; return x ; }
|
public class Converter { /** * Converts the value parameter to a Date . If the value is null or invalid , it returns null . If the value is a String ,
* it has to have one of the following syntax :
* < ul >
* < li > yyyy - MM - dd < / li >
* < li > yyyy - MM - dd ' T ' HH : mmZ < / li >
* < li > yyyy - MM - dd ' T ' HH : mm : ssZ < / li >
* < li > yyyy - MM - dd ' T ' HH : mm : ss . SSSZ < / li >
* < / ul >
* If the value is a Long number , it has to have the time in milliseconds .
* @ param value Accepts String , Long and Date
* @ return an Integer */
public static Date getAsDate ( Object value ) { } }
|
Date result = null ; try { if ( value instanceof String ) { String date = ( ( String ) value ) . toUpperCase ( ) ; for ( Matcher matcher : mapMatcherDateFormat . keySet ( ) ) { if ( matcher . reset ( date ) . matches ( ) ) { SimpleDateFormat sdf = mapMatcherDateFormat . get ( matcher ) ; if ( sdf != null ) { if ( date . endsWith ( "Z" ) ) { date = date . substring ( 0 , date . length ( ) - 1 ) + "GMT-00:00" ; } else { if ( date . indexOf ( 'T' ) > - 1 ) { int index = date . indexOf ( '+' ) ; index = index > - 1 ? index : date . lastIndexOf ( '-' ) ; if ( index > - 1 ) { String left = date . substring ( 0 , index ) ; String right = date . substring ( index , date . length ( ) ) ; date = left + "GMT" + right ; } } } sdf . setLenient ( false ) ; result = sdf . parse ( date ) ; break ; } } } } else if ( value instanceof Long ) { calendar . setTimeInMillis ( ( Long ) value ) ; result = calendar . getTime ( ) ; } else if ( value instanceof Date ) { result = ( Date ) value ; } else { result = null ; } } catch ( Exception e ) { result = null ; } return result ;
|
public class MessagingUtils { /** * Removes unnecessary slashes and transforms the others into dots .
* @ param instancePath an instance path
* @ return a non - null string */
public static String escapeInstancePath ( String instancePath ) { } }
|
String result ; if ( Utils . isEmptyOrWhitespaces ( instancePath ) ) result = "" ; else result = instancePath . replaceFirst ( "^/*" , "" ) . replaceFirst ( "/*$" , "" ) . replaceAll ( "/+" , "." ) ; return result ;
|
public class SSLWriteServiceContext { /** * Reuse the buffers used to send data out to the network . If existing buffer
* is available , grow the array by one .
* @ throws IOException - if allocation failed */
protected void increaseEncryptedBuffer ( ) throws IOException { } }
|
final int packetSize = getConnLink ( ) . getPacketBufferSize ( ) ; if ( null == this . encryptedAppBuffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Allocating encryptedAppBuffer, size=" + packetSize ) ; } this . encryptedAppBuffer = SSLUtils . allocateByteBuffer ( packetSize , getConfig ( ) . getEncryptBuffersDirect ( ) ) ; } else { // The existing buffer isn ' t big enough , add another packet size to it
final int cap = this . encryptedAppBuffer . capacity ( ) ; final int newsize = cap + packetSize ; if ( 0 > newsize ) { // wrapped over max - int
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Unable to increase encrypted buffer beyond " + cap ) ; } throw new IOException ( "Unable to increase buffer beyond " + cap ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Increasing encryptedAppBuffer to " + newsize ) ; } WsByteBuffer temp = SSLUtils . allocateByteBuffer ( newsize , this . encryptedAppBuffer . isDirect ( ) ) ; this . encryptedAppBuffer . flip ( ) ; SSLUtils . copyBuffer ( this . encryptedAppBuffer , temp , this . encryptedAppBuffer . remaining ( ) ) ; this . encryptedAppBuffer . release ( ) ; this . encryptedAppBuffer = temp ; }
|
public class UnicodeSet { /** * for internal use , after checkFrozen has been called */
private UnicodeSet add_unchecked ( int start , int end ) { } }
|
if ( start < MIN_VALUE || start > MAX_VALUE ) { throw new IllegalArgumentException ( "Invalid code point U+" + Utility . hex ( start , 6 ) ) ; } if ( end < MIN_VALUE || end > MAX_VALUE ) { throw new IllegalArgumentException ( "Invalid code point U+" + Utility . hex ( end , 6 ) ) ; } if ( start < end ) { add ( range ( start , end ) , 2 , 0 ) ; } else if ( start == end ) { add ( start ) ; } return this ;
|
public class AbstractXbaseSemanticSequencer { /** * Contexts :
* XExpression returns XWhileExpression
* XAssignment returns XWhileExpression
* XAssignment . XBinaryOperation _ 1_1_0_0_0 returns XWhileExpression
* XOrExpression returns XWhileExpression
* XOrExpression . XBinaryOperation _ 1_0_0_0 returns XWhileExpression
* XAndExpression returns XWhileExpression
* XAndExpression . XBinaryOperation _ 1_0_0_0 returns XWhileExpression
* XEqualityExpression returns XWhileExpression
* XEqualityExpression . XBinaryOperation _ 1_0_0_0 returns XWhileExpression
* XRelationalExpression returns XWhileExpression
* XRelationalExpression . XInstanceOfExpression _ 1_0_0_0_0 returns XWhileExpression
* XRelationalExpression . XBinaryOperation _ 1_1_0_0_0 returns XWhileExpression
* XOtherOperatorExpression returns XWhileExpression
* XOtherOperatorExpression . XBinaryOperation _ 1_0_0_0 returns XWhileExpression
* XAdditiveExpression returns XWhileExpression
* XAdditiveExpression . XBinaryOperation _ 1_0_0_0 returns XWhileExpression
* XMultiplicativeExpression returns XWhileExpression
* XMultiplicativeExpression . XBinaryOperation _ 1_0_0_0 returns XWhileExpression
* XUnaryOperation returns XWhileExpression
* XCastedExpression returns XWhileExpression
* XCastedExpression . XCastedExpression _ 1_0_0_0 returns XWhileExpression
* XPostfixOperation returns XWhileExpression
* XPostfixOperation . XPostfixOperation _ 1_0_0 returns XWhileExpression
* XMemberFeatureCall returns XWhileExpression
* XMemberFeatureCall . XAssignment _ 1_0_0_0_0 returns XWhileExpression
* XMemberFeatureCall . XMemberFeatureCall _ 1_1_0_0_0 returns XWhileExpression
* XPrimaryExpression returns XWhileExpression
* XParenthesizedExpression returns XWhileExpression
* XWhileExpression returns XWhileExpression
* XExpressionOrVarDeclaration returns XWhileExpression
* Constraint :
* ( predicate = XExpression body = XExpression ) */
protected void sequence_XWhileExpression ( ISerializationContext context , XWhileExpression semanticObject ) { } }
|
if ( errorAcceptor != null ) { if ( transientValues . isValueTransient ( semanticObject , XbasePackage . Literals . XABSTRACT_WHILE_EXPRESSION__PREDICATE ) == ValueTransient . YES ) errorAcceptor . accept ( diagnosticProvider . createFeatureValueMissing ( semanticObject , XbasePackage . Literals . XABSTRACT_WHILE_EXPRESSION__PREDICATE ) ) ; if ( transientValues . isValueTransient ( semanticObject , XbasePackage . Literals . XABSTRACT_WHILE_EXPRESSION__BODY ) == ValueTransient . YES ) errorAcceptor . accept ( diagnosticProvider . createFeatureValueMissing ( semanticObject , XbasePackage . Literals . XABSTRACT_WHILE_EXPRESSION__BODY ) ) ; } SequenceFeeder feeder = createSequencerFeeder ( context , semanticObject ) ; feeder . accept ( grammarAccess . getXWhileExpressionAccess ( ) . getPredicateXExpressionParserRuleCall_3_0 ( ) , semanticObject . getPredicate ( ) ) ; feeder . accept ( grammarAccess . getXWhileExpressionAccess ( ) . getBodyXExpressionParserRuleCall_5_0 ( ) , semanticObject . getBody ( ) ) ; feeder . finish ( ) ;
|
public class SystemProperties { /** * Set a system property value under consideration of an eventually present
* { @ link SecurityManager } .
* @ param sKey
* The key of the system property . May not be < code > null < / code > .
* @ param sValue
* The value of the system property . If the value is < code > null < / code >
* the property is removed .
* @ return { @ link EChange } */
@ Nonnull public static EChange setPropertyValue ( @ Nonnull final String sKey , @ Nullable final String sValue ) { } }
|
boolean bChanged ; if ( sValue == null ) { // Was something removed ?
bChanged = removePropertyValue ( sKey ) != null ; } else { final String sOld = IPrivilegedAction . systemSetProperty ( sKey , sValue ) . invokeSafe ( ) ; bChanged = sOld != null && ! sValue . equals ( sOld ) ; if ( LOGGER . isDebugEnabled ( ) && bChanged ) LOGGER . debug ( "Set system property '" + sKey + "' to '" + sValue + "'" ) ; } return EChange . valueOf ( bChanged ) ;
|
public class ResourceAssignment { /** * Generates timephased costs from timephased work where multiple cost rates
* apply to the assignment .
* @ param standardWorkList timephased work
* @ param overtimeWorkList timephased work
* @ return timephased cost */
private List < TimephasedCost > getTimephasedCostMultipleRates ( List < TimephasedWork > standardWorkList , List < TimephasedWork > overtimeWorkList ) { } }
|
List < TimephasedWork > standardWorkResult = new LinkedList < TimephasedWork > ( ) ; List < TimephasedWork > overtimeWorkResult = new LinkedList < TimephasedWork > ( ) ; CostRateTable table = getCostRateTable ( ) ; ProjectCalendar calendar = getCalendar ( ) ; Iterator < TimephasedWork > iter = overtimeWorkList . iterator ( ) ; for ( TimephasedWork standardWork : standardWorkList ) { TimephasedWork overtimeWork = iter . hasNext ( ) ? iter . next ( ) : null ; int startIndex = getCostRateTableEntryIndex ( standardWork . getStart ( ) ) ; int finishIndex = getCostRateTableEntryIndex ( standardWork . getFinish ( ) ) ; if ( startIndex == finishIndex ) { standardWorkResult . add ( standardWork ) ; if ( overtimeWork != null ) { overtimeWorkResult . add ( overtimeWork ) ; } } else { standardWorkResult . addAll ( splitWork ( table , calendar , standardWork , startIndex ) ) ; if ( overtimeWork != null ) { overtimeWorkResult . addAll ( splitWork ( table , calendar , overtimeWork , startIndex ) ) ; } } } return getTimephasedCostSingleRate ( standardWorkResult , overtimeWorkResult ) ;
|
public class RtedAlgorithm { /** * Computes an array where preorder / rev . preorder of a subforest of given
* subtree is stored and can be accessed for given i and j .
* @ param it
* @ param subtreePreorder
* @ param subtreeRevPreorder
* @ param subtreeSize
* @ param aStrategy
* @ param treeSize */
private void computeIJTable ( InfoTree it , int subtreePreorder , int subtreeRevPreorder , int subtreeSize , int aStrategy , int treeSize ) { } }
|
int change ; int [ ] post2pre = it . info [ POST2_PRE ] ; int [ ] rpost2post = it . info [ RPOST2_POST ] ; if ( aStrategy == LEFT ) { for ( int x = 0 ; x < subtreeSize ; x ++ ) { ij [ 0 ] [ x ] = x + subtreePreorder ; } for ( int x = 1 ; x < subtreeSize ; x ++ ) { change = post2pre [ ( treeSize - 1 - ( x - 1 + subtreeRevPreorder ) ) ] ; for ( int z = 0 ; z < subtreeSize ; z ++ ) { if ( ij [ x - 1 ] [ z ] >= change ) { ij [ x ] [ z ] = ij [ x - 1 ] [ z ] + 1 ; } else { ij [ x ] [ z ] = ij [ x - 1 ] [ z ] ; } } } } else { // if ( aStrategy = = RIGHT ) {
for ( int x = 0 ; x < subtreeSize ; x ++ ) { ij [ 0 ] [ x ] = x + subtreeRevPreorder ; } for ( int x = 1 ; x < subtreeSize ; x ++ ) { change = treeSize - 1 - rpost2post [ ( treeSize - 1 - ( x - 1 + subtreePreorder ) ) ] ; for ( int z = 0 ; z < subtreeSize ; z ++ ) { if ( ij [ x - 1 ] [ z ] >= change ) { ij [ x ] [ z ] = ij [ x - 1 ] [ z ] + 1 ; } else { ij [ x ] [ z ] = ij [ x - 1 ] [ z ] ; } } } }
|
public class ObjectEditorTable { /** * Change the value of the specified row . */
public void updateDatum ( Object element , int row ) { } }
|
_data . set ( row , element ) ; _model . fireTableRowsUpdated ( row , row ) ;
|
public class SdkComponentInstaller { /** * Install a component .
* @ param component component to install
* @ param progressListener listener to action progress feedback
* @ param consoleListener listener to process console feedback */
public void installComponent ( SdkComponent component , ProgressListener progressListener , ConsoleListener consoleListener ) throws InterruptedException , CommandExitException , CommandExecutionException { } }
|
progressListener . start ( "Installing " + component . toString ( ) , ProgressListener . UNKNOWN ) ; Map < String , String > environment = null ; if ( pythonCopier != null ) { environment = pythonCopier . copyPython ( ) ; } Path workingDirectory = gcloudPath . getRoot ( ) ; List < String > command = Arrays . asList ( gcloudPath . toString ( ) , "components" , "install" , component . toString ( ) , "--quiet" ) ; commandRunner . run ( command , workingDirectory , environment , consoleListener ) ; progressListener . done ( ) ;
|
public class DrawableUtils { /** * Enlarge value from startValue to endValue
* @ param startValue start size
* @ param endValue end size
* @ param time time of animation
* @ return new size value */
public static float enlarge ( float startValue , float endValue , float time ) { } }
|
if ( startValue > endValue ) throw new IllegalArgumentException ( "Start size can't be larger than end size." ) ; return startValue + ( endValue - startValue ) * time ;
|
public class GenericMessageImpl { /** * Marshall a message .
* @ return WsByteBuffer [ ]
* @ throws MessageSentException */
public WsByteBuffer [ ] marshallMessage ( ) throws MessageSentException { } }
|
final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; if ( bTrace && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "marshallMessage" ) ; } preMarshallMessage ( ) ; WsByteBuffer [ ] marshalledObj = hasFirstLineChanged ( ) ? marshallLine ( ) : null ; headerComplianceCheck ( ) ; marshalledObj = marshallHeaders ( marshalledObj ) ; postMarshallMessage ( ) ; if ( bTrace && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "marshallMessage" ) ; } return marshalledObj ;
|
public class CmsWidgetDialog { /** * Returns the html for a button to add an optional element . < p >
* @ param elementName name of the element
* @ param insertAfter the index of the element after which the new element should be created
* @ param enabled if true , the button to add an element is shown , otherwise a spacer is returned
* @ return the html for a button to add an optional element */
public String buildAddElement ( String elementName , int insertAfter , boolean enabled ) { } }
|
if ( enabled ) { StringBuffer href = new StringBuffer ( 4 ) ; href . append ( "javascript:addElement('" ) ; href . append ( elementName ) ; href . append ( "', " ) ; href . append ( insertAfter ) ; href . append ( ");" ) ; return button ( href . toString ( ) , null , "new.png" , Messages . GUI_DIALOG_BUTTON_ADDNEW_0 , 0 ) ; } else { return "" ; }
|
public class UIUtils { /** * helper method to set the background depending on the android version
* @ param v
* @ param d */
@ SuppressLint ( "NewApi" ) public static void setBackground ( View v , Drawable d ) { } }
|
if ( Build . VERSION . SDK_INT < Build . VERSION_CODES . JELLY_BEAN ) { v . setBackgroundDrawable ( d ) ; } else { v . setBackground ( d ) ; }
|
public class UICommands { /** * A name of the form " foo - bar - whatnot " is turned into " Foo : Bar Whatnot " */
public static String unshellifyName ( String name ) { } }
|
if ( Strings . isNotBlank ( name ) ) { if ( name . indexOf ( '-' ) >= 0 && name . toLowerCase ( ) . equals ( name ) ) { String [ ] split = name . split ( "-" ) ; StringBuffer buffer = new StringBuffer ( ) ; int idx = 0 ; for ( String part : split ) { if ( idx == 1 ) { buffer . append ( ": " ) ; } else if ( idx > 1 ) { buffer . append ( " " ) ; } buffer . append ( capitalize ( part ) ) ; idx ++ ; } return buffer . toString ( ) ; } } return name ;
|
public class CollationRuleParser { /** * Sets str to a contraction of U + FFFE and ( U + 2800 + Position ) .
* @ return rule index after the special reset position
* @ throws ParseException */
private int parseSpecialPosition ( int i , StringBuilder str ) throws ParseException { } }
|
int j = readWords ( i + 1 , rawBuilder ) ; if ( j > i && rules . charAt ( j ) == 0x5d && rawBuilder . length ( ) != 0 ) { // words end with ]
++ j ; String raw = rawBuilder . toString ( ) ; str . setLength ( 0 ) ; for ( int pos = 0 ; pos < positions . length ; ++ pos ) { if ( raw . equals ( positions [ pos ] ) ) { str . append ( POS_LEAD ) . append ( ( char ) ( POS_BASE + pos ) ) ; return j ; } } if ( raw . equals ( "top" ) ) { str . append ( POS_LEAD ) . append ( ( char ) ( POS_BASE + Position . LAST_REGULAR . ordinal ( ) ) ) ; return j ; } if ( raw . equals ( "variable top" ) ) { str . append ( POS_LEAD ) . append ( ( char ) ( POS_BASE + Position . LAST_VARIABLE . ordinal ( ) ) ) ; return j ; } } setParseError ( "not a valid special reset position" ) ; return i ;
|
public class GetDevEndpointsRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetDevEndpointsRequest getDevEndpointsRequest , ProtocolMarshaller protocolMarshaller ) { } }
|
if ( getDevEndpointsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDevEndpointsRequest . getMaxResults ( ) , MAXRESULTS_BINDING ) ; protocolMarshaller . marshall ( getDevEndpointsRequest . getNextToken ( ) , NEXTTOKEN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; }
|
public class FuncSum { /** * Execute the function . The function must return
* a valid object .
* @ param xctxt The current execution context .
* @ return A valid XObject .
* @ throws javax . xml . transform . TransformerException */
public XObject execute ( XPathContext xctxt ) throws javax . xml . transform . TransformerException { } }
|
DTMIterator nodes = m_arg0 . asIterator ( xctxt , xctxt . getCurrentNode ( ) ) ; double sum = 0.0 ; int pos ; while ( DTM . NULL != ( pos = nodes . nextNode ( ) ) ) { DTM dtm = nodes . getDTM ( pos ) ; XMLString s = dtm . getStringValue ( pos ) ; if ( null != s ) sum += s . toDouble ( ) ; } nodes . detach ( ) ; return new XNumber ( sum ) ;
|
public class Reflect { /** * Create reflect .
* @ param types the types
* @ param args the args
* @ return the reflect
* @ throws ReflectionException the reflection exception */
public Reflect create ( Class [ ] types , Object ... args ) throws ReflectionException { } }
|
try { return on ( clazz . getConstructor ( types ) , accessAll , args ) ; } catch ( NoSuchMethodException e ) { for ( Constructor constructor : getConstructors ( ) ) { if ( ReflectionUtils . typesMatch ( constructor . getParameterTypes ( ) , types ) ) { return on ( constructor , accessAll , args ) ; } } throw new ReflectionException ( e ) ; }
|
public class Request { /** * Creates a new Request configured to delete a resource through the Graph API .
* @ param session
* the Session to use , or null ; if non - null , the session must be in an opened state
* @ param id
* the id of the object to delete
* @ param callback
* a callback that will be called when the request is completed to handle success or error conditions
* @ return a Request that is ready to execute */
public static Request newDeleteObjectRequest ( Session session , String id , Callback callback ) { } }
|
return new Request ( session , id , null , HttpMethod . DELETE , callback ) ;
|
public class Triangle { /** * determinates if this triangle contains the point p .
* @ param p the query point
* @ return true iff p is not null and is inside this triangle ( Note : on boundary is considered inside ! ! ) . */
public boolean contains ( Vector3 p ) { } }
|
boolean ans = false ; if ( this . halfplane || p == null ) return false ; if ( isCorner ( p ) ) { return true ; } PointLinePosition a12 = PointLineTest . pointLineTest ( a , b , p ) ; PointLinePosition a23 = PointLineTest . pointLineTest ( b , c , p ) ; PointLinePosition a31 = PointLineTest . pointLineTest ( c , a , p ) ; if ( ( a12 == PointLinePosition . LEFT && a23 == PointLinePosition . LEFT && a31 == PointLinePosition . LEFT ) || ( a12 == PointLinePosition . RIGHT && a23 == PointLinePosition . RIGHT && a31 == PointLinePosition . RIGHT ) || ( a12 == PointLinePosition . ON_SEGMENT || a23 == PointLinePosition . ON_SEGMENT || a31 == PointLinePosition . ON_SEGMENT ) ) { ans = true ; } return ans ;
|
public class ProxyReceiveListener { /** * This method will process a message that has been received by the listener . Essentially , we
* must get the session ID - this tells us which proxy queue to put the message on and then put
* the message there . For async messages we must also get the flags and pass them to the proxy
* queue as well .
* If the chunk parameter is set to true this data is not an entire message , it is a message
* chunk . This is passed onto the Proxy Queue to indicate that it should place the data with
* other chunks until the message is complete .
* @ param buffer
* @ param asyncMessage
* @ param enableReadAhead
* @ param conversation
* @ param chunk */
private void processMessage ( CommsByteBuffer buffer , boolean asyncMessage , boolean enableReadAhead , Conversation conversation , boolean chunk ) { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "processMessage" , new Object [ ] { buffer , asyncMessage , enableReadAhead , conversation , chunk } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) buffer . dump ( this , tc , CommsByteBuffer . ENTIRE_BUFFER ) ; // Connection object ID - not needed by us
short connectionObjectID = buffer . getShort ( ) ; // Client session ID ( proxy ID )
short clientSessionID = buffer . getShort ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( this , tc , "connectionObjectId: " , "" + connectionObjectID ) ; SibTr . debug ( this , tc , "clientSessionID: " , "" + clientSessionID ) ; } boolean lastInBatch = false ; if ( asyncMessage ) { // Flags
short flags = buffer . getShort ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "lastInBatchFlag: " , "" + flags ) ; if ( flags == 0x0001 ) lastInBatch = true ; } // Message Batch
short messageBatch = buffer . getShort ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "messageBatch: " , "" + messageBatch ) ; // Data length for debug purposes only
if ( chunk ) { // Get the next 8 bytes which will contain 1 byte of flags , 4 bytes of length and then some
// message data
long next8bytes = buffer . peekLong ( ) ; // Chop the message data
long messageLength = next8bytes >> 24 ; // Chop off the 5th byte
messageLength &= ~ 0xFF00000000L ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Received a message chunk of length: " + messageLength ) ; } else { int messageLength = ( int ) buffer . peekLong ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "Received a message of length: " + messageLength ) ; } // Now pass the info off to the proxy queue
// Get the conversation state and the get the proxy group from it
ProxyQueueConversationGroup pqcg = ( ( ClientConversationState ) conversation . getAttachment ( ) ) . getProxyQueueConversationGroup ( ) ; // If this is null , something has gone wrong here
if ( pqcg == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "NO_PROXY_CONV_GROUP_SICO1011" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".processAsyncMessage" , CommsConstants . PROXYRECEIVELISTENER_PROCESSMSG_01 , this ) ; SibTr . error ( tc , "NO_PROXY_CONV_GROUP_SICO1011" , e ) ; throw e ; } // Otherwise get the proxy queue
ProxyQueue proxyQueue = pqcg . find ( clientSessionID ) ; if ( proxyQueue == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "UNABLE_TO_FIND_PROXY_QUEUE_SICO1012" , null , null ) ) ; FFDCFilter . processException ( e , CLASS_NAME + ".processAsyncMessage" , CommsConstants . PROXYRECEIVELISTENER_PROCESSMSG_01 , this ) ; SibTr . error ( tc , "UNABLE_TO_FIND_PROXY_QUEUE_SICO1012" , e ) ; throw e ; } // and put the message
proxyQueue . put ( buffer , messageBatch , lastInBatch , chunk ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "processMessage" ) ;
|
public class LogImpl { /** * / * ( non - Javadoc )
* @ see org . apache . commons . logging . Log # error ( java . lang . Object , java . lang . Throwable ) */
public void error ( Object arg0 , Throwable arg1 ) { } }
|
message ( ERROR , new Object [ ] { arg0 , arg1 } , new Frame ( 1 ) ) ;
|
public class PercentNumberFormatTextValue { /** * Checks the given value if it is between 0 to 100 quietly . If not a default value from 50 will
* be set .
* @ param name
* the name
* @ param value
* the value
* @ return the integer */
private static Integer checkQuietly ( final String name , final Integer value ) { } }
|
Integer val = 50 ; try { val = Args . withinRange ( 0 , 100 , value , name ) ; } catch ( final IllegalArgumentException e ) { LOGGER . error ( String . format ( "Given argument '%s' must have a value within [%s,%s], but was %s. Default value 50% will be set." , name , 0 , 100 , value ) ) ; } return val ;
|
public class DynamicSettingsActivity { /** * Dynamically adds a new navigation preference to the activity . */
private void addNavigationPreference ( ) { } }
|
NavigationPreference navigationPreference = new NavigationPreference ( this ) ; navigationPreference . setTitle ( getPreferenceHeaderTitle ( ) ) ; navigationPreference . setFragment ( NewPreferenceHeaderFragment . class . getName ( ) ) ; getNavigationFragment ( ) . getPreferenceScreen ( ) . addPreference ( navigationPreference ) ; invalidateOptionsMenu ( ) ;
|
public class InvertibleCryptographer { /** * alphabet */
protected char [ ] encodeHex ( byte [ ] data ) { } }
|
final int len = data . length ; final char [ ] out = new char [ len << 1 ] ; for ( int i = 0 , j = 0 ; i < len ; i ++ ) { out [ j ++ ] = DIGITS_LOWER [ ( 0xF0 & data [ i ] ) >>> 4 ] ; out [ j ++ ] = DIGITS_LOWER [ 0x0F & data [ i ] ] ; } return out ;
|
public class PutMetricFilterRequest { /** * A collection of information that defines how metric data gets emitted .
* @ param metricTransformations
* A collection of information that defines how metric data gets emitted . */
public void setMetricTransformations ( java . util . Collection < MetricTransformation > metricTransformations ) { } }
|
if ( metricTransformations == null ) { this . metricTransformations = null ; return ; } this . metricTransformations = new com . amazonaws . internal . SdkInternalList < MetricTransformation > ( metricTransformations ) ;
|
public class StringUtil { /** * Normalize a SQL identifer , up - casing if < regular identifer > ,
* and handling of < delimited identifer > ( SQL 2003 , section 5.2 ) .
* The normal form is used internally in Derby .
* @ param id syntacically correct SQL identifier */
public static String normalizeSQLIdentifier ( String id ) { } }
|
if ( id . length ( ) == 0 ) { return id ; } if ( id . charAt ( 0 ) == '"' && id . length ( ) >= 3 && id . charAt ( id . length ( ) - 1 ) == '"' ) { // assume syntax is OK , thats is , any quotes inside are doubled :
return StringUtil . compressQuotes ( id . substring ( 1 , id . length ( ) - 1 ) , "\"\"" ) ; } else { return StringUtil . SQLToUpperCase ( id ) ; }
|
public class PutMetricDataRequest { /** * The data for the metric . The array can include no more than 20 metrics per call .
* @ param metricData
* The data for the metric . The array can include no more than 20 metrics per call . */
public void setMetricData ( java . util . Collection < MetricDatum > metricData ) { } }
|
if ( metricData == null ) { this . metricData = null ; return ; } this . metricData = new com . amazonaws . internal . SdkInternalList < MetricDatum > ( metricData ) ;
|
public class AnnotationUtil { /** * Attempts to get a key from < code > domainObject < / code > by looking for a
* { @ literal @ RiakKey } annotated member . If non - present it simply returns
* < code > defaultKey < / code >
* @ param < T > the type of < code > domainObject < / code >
* @ param domainObject the object to search for a key
* @ param defaultKey the pass through value that will get returned if no key
* found on < code > domainObject < / code >
* @ return either the value found on < code > domainObject < / code > ; s
* { @ literal @ RiakKey } member or < code > defaultkey < / code > */
public static < T > BinaryValue getKey ( T domainObject , BinaryValue defaultKey ) { } }
|
BinaryValue key = getKey ( domainObject ) ; if ( key == null ) { key = defaultKey ; } return key ;
|
public class VpnSitesConfigurationsInner { /** * Gives the sas - url to download the configurations for vpn - sites in a resource group .
* @ param resourceGroupName The resource group name .
* @ param virtualWANName The name of the VirtualWAN for which configuration of all vpn - sites is needed .
* @ param request Parameters supplied to download vpn - sites configuration .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws ErrorException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDownload ( String resourceGroupName , String virtualWANName , GetVpnSitesConfigurationRequest request ) { } }
|
beginDownloadWithServiceResponseAsync ( resourceGroupName , virtualWANName , request ) . toBlocking ( ) . single ( ) . body ( ) ;
|
public class ExcelModuleDemoToDoItemBulkUpdateManager { /** * region > toDoItems ( derived collection ) */
@ SuppressWarnings ( "unchecked" ) @ Collection public List < ExcelModuleDemoToDoItem > getToDoItems ( ) { } }
|
return container . allMatches ( ExcelModuleDemoToDoItem . class , Predicates . and ( ExcelModuleDemoToDoItem . Predicates . thoseOwnedBy ( currentUserName ( ) ) , ExcelModuleDemoToDoItem . Predicates . thoseCompleted ( isComplete ( ) ) , ExcelModuleDemoToDoItem . Predicates . thoseCategorised ( getCategory ( ) , getSubcategory ( ) ) ) ) ;
|
public class Introspector { /** * < p > getGetter . < / p >
* @ param name a { @ link java . lang . String } object .
* @ return a { @ link java . lang . reflect . Method } object . */
public Method getGetter ( String name ) { } }
|
for ( PropertyDescriptor descriptor : getPropertyDescriptors ( target ) ) { Method getter = descriptor . getReadMethod ( ) ; if ( getter == null ) continue ; if ( compare ( descriptor . getName ( ) , name ) ) return getter ; } return null ;
|
public class tmsessionpolicy_binding { /** * Use this API to fetch tmsessionpolicy _ binding resource of given name . */
public static tmsessionpolicy_binding get ( nitro_service service , String name ) throws Exception { } }
|
tmsessionpolicy_binding obj = new tmsessionpolicy_binding ( ) ; obj . set_name ( name ) ; tmsessionpolicy_binding response = ( tmsessionpolicy_binding ) obj . get_resource ( service ) ; return response ;
|
public class JavacParser { /** * Block = " { " BlockStatements " } " */
JCBlock block ( int pos , long flags ) { } }
|
accept ( LBRACE ) ; List < JCStatement > stats = blockStatements ( ) ; JCBlock t = F . at ( pos ) . Block ( flags , stats ) ; while ( token . kind == CASE || token . kind == DEFAULT ) { syntaxError ( "orphaned" , token . kind ) ; switchBlockStatementGroups ( ) ; } // the Block node has a field " endpos " for first char of last token , which is
// usually but not necessarily the last char of the last token .
t . endpos = token . pos ; accept ( RBRACE ) ; return toP ( t ) ;
|
public class FXMLShowCaseView { /** * { @ inheritDoc } */
@ Override protected void initView ( ) { } }
|
this . showEmbedded = new ToggleButton ( "Embedded" ) ; this . showStandalone = new ToggleButton ( "Standalone" ) ; this . showHybrid = new ToggleButton ( "Hybrid" ) ; this . showIncluded = new ToggleButton ( "Included" ) ; final ToggleGroup group = new PersistentButtonToggleGroup ( ) ; group . getToggles ( ) . addAll ( this . showEmbedded , this . showStandalone , this . showHybrid , this . showIncluded ) ; final FlowPane fp = new FlowPane ( ) ; fp . setStyle ( "-fx-background-color: #2f4f4f;" ) ; fp . setAlignment ( Pos . CENTER ) ; fp . setHgap ( 4 ) ; fp . getChildren ( ) . addAll ( this . showEmbedded , this . showStandalone , this . showIncluded , this . showHybrid ) ; node ( ) . setTop ( fp ) ;
|
public class UpdateFunctionConfigurationResult { /** * The function ' s < a href = " https : / / docs . aws . amazon . com / lambda / latest / dg / configuration - layers . html " > layers < / a > .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setLayers ( java . util . Collection ) } or { @ link # withLayers ( java . util . Collection ) } if you want to override the
* existing values .
* @ param layers
* The function ' s < a href = " https : / / docs . aws . amazon . com / lambda / latest / dg / configuration - layers . html " >
* layers < / a > .
* @ return Returns a reference to this object so that method calls can be chained together . */
public UpdateFunctionConfigurationResult withLayers ( Layer ... layers ) { } }
|
if ( this . layers == null ) { setLayers ( new com . amazonaws . internal . SdkInternalList < Layer > ( layers . length ) ) ; } for ( Layer ele : layers ) { this . layers . add ( ele ) ; } return this ;
|
public class WebSiteRequest { /** * Determines if the request is for a BlackBerry browser */
public boolean isBlackBerry ( ) { } }
|
if ( ! isBlackBerryDone ) { String agent = req . getHeader ( "user-agent" ) ; isBlackBerry = agent != null && agent . startsWith ( "BlackBerry" ) ; isBlackBerryDone = true ; } return isBlackBerry ;
|
public class clusterinstance { /** * Use this API to disable clusterinstance resources of given names . */
public static base_responses disable ( nitro_service client , Long clid [ ] ) throws Exception { } }
|
base_responses result = null ; if ( clid != null && clid . length > 0 ) { clusterinstance disableresources [ ] = new clusterinstance [ clid . length ] ; for ( int i = 0 ; i < clid . length ; i ++ ) { disableresources [ i ] = new clusterinstance ( ) ; disableresources [ i ] . clid = clid [ i ] ; } result = perform_operation_bulk_request ( client , disableresources , "disable" ) ; } return result ;
|
public class BaseClient { /** * Gets the active session data .
* @ return Active session data . */
@ Override public Session getSession ( ) { } }
|
return state . get ( ) > GlobalState . INITIALISING ? new Session ( dataMgr . getSessionDAO ( ) . session ( ) ) : new Session ( ) ;
|
public class Canon { /** * Compute the canonical labels for the provided structure . The labelling
* does not consider isomer information or stereochemistry . The current
* implementation does not fully distinguish all structure topologies
* but in practise performs well in the majority of cases . A complete
* canonical labelling can be obtained using the { @ link InChINumbersTools }
* but is computationally much more expensive .
* @ param container structure
* @ param g adjacency list graph representation
* @ return the canonical labelling
* @ see EquivalentClassPartitioner
* @ see InChINumbersTools */
public static long [ ] label ( IAtomContainer container , int [ ] [ ] g ) { } }
|
return label ( container , g , basicInvariants ( container , g ) ) ;
|
public class Radial2Top { /** * < editor - fold defaultstate = " collapsed " desc = " Initialization " > */
@ Override public final AbstractGauge init ( final int WIDTH , final int HEIGHT ) { } }
|
final int GAUGE_WIDTH = isFrameVisible ( ) ? WIDTH : getGaugeBounds ( ) . width ; final int GAUGE_HEIGHT = isFrameVisible ( ) ? HEIGHT : getGaugeBounds ( ) . height ; if ( GAUGE_WIDTH <= 1 || GAUGE_HEIGHT <= 1 ) { return this ; } if ( ! isFrameVisible ( ) ) { setFramelessOffset ( - getGaugeBounds ( ) . width * 0.0841121495 , - getGaugeBounds ( ) . width * 0.0841121495 ) ; } else { setFramelessOffset ( getGaugeBounds ( ) . x , getGaugeBounds ( ) . y ) ; } // Create Background Image
if ( bImage != null ) { bImage . flush ( ) ; } bImage = UTIL . createImage ( GAUGE_WIDTH , GAUGE_WIDTH , Transparency . TRANSLUCENT ) ; // Create Foreground Image
if ( fImage != null ) { fImage . flush ( ) ; } fImage = UTIL . createImage ( GAUGE_WIDTH , GAUGE_WIDTH , Transparency . TRANSLUCENT ) ; if ( isFrameVisible ( ) ) { create_FRAME_Image ( GAUGE_WIDTH , bImage ) ; } if ( isBackgroundVisible ( ) ) { create_BACKGROUND_Image ( GAUGE_WIDTH , "" , "" , bImage ) ; } if ( isGlowVisible ( ) ) { if ( glowImageOff != null ) { glowImageOff . flush ( ) ; } glowImageOff = create_GLOW_Image ( GAUGE_WIDTH , getGlowColor ( ) , false ) ; if ( glowImageOn != null ) { glowImageOn . flush ( ) ; } glowImageOn = create_GLOW_Image ( GAUGE_WIDTH , getGlowColor ( ) , true ) ; } else { setGlowPulsating ( false ) ; } create_POSTS_Image ( GAUGE_WIDTH , fImage ) ; TRACK_OFFSET . setLocation ( 0 , 0 ) ; CENTER . setLocation ( getGaugeBounds ( ) . getCenterX ( ) - getInsets ( ) . left , getGaugeBounds ( ) . getCenterX ( ) - getInsets ( ) . top ) ; if ( isTrackVisible ( ) ) { create_TRACK_Image ( GAUGE_WIDTH , getFreeAreaAngle ( ) , getTickmarkOffset ( ) , getMinValue ( ) , getMaxValue ( ) , getAngleStep ( ) , getTrackStart ( ) , getTrackSection ( ) , getTrackStop ( ) , getTrackStartColor ( ) , getTrackSectionColor ( ) , getTrackStopColor ( ) , 0.38f , CENTER , getTickmarkDirection ( ) , TRACK_OFFSET , bImage ) ; } if ( ! getAreas ( ) . isEmpty ( ) ) { // Create the sections 3d effect gradient overlay
if ( area3DEffectVisible ) { // Create the sections 3d effect gradient overlay
area3DEffect = createArea3DEffectGradient ( GAUGE_WIDTH , 0.38f ) ; } createAreas ( bImage ) ; } if ( ! getSections ( ) . isEmpty ( ) ) { // Create the sections 3d effect gradient overlay
if ( section3DEffectVisible ) { // Create the sections 3d effect gradient overlay
section3DEffect = createSection3DEffectGradient ( GAUGE_WIDTH , 0.38f ) ; } createSections ( bImage ) ; } TICKMARK_FACTORY . create_RADIAL_TICKMARKS_Image ( GAUGE_WIDTH , getModel ( ) . getNiceMinValue ( ) , getModel ( ) . getNiceMaxValue ( ) , getModel ( ) . getMaxNoOfMinorTicks ( ) , getModel ( ) . getMaxNoOfMajorTicks ( ) , getModel ( ) . getMinorTickSpacing ( ) , getModel ( ) . getMajorTickSpacing ( ) , getGaugeType ( ) , getCustomGaugeType ( ) , getMinorTickmarkType ( ) , getMajorTickmarkType ( ) , isTickmarksVisible ( ) , isTicklabelsVisible ( ) , getModel ( ) . isMinorTickmarksVisible ( ) , getModel ( ) . isMajorTickmarksVisible ( ) , getLabelNumberFormat ( ) , isTickmarkSectionsVisible ( ) , getBackgroundColor ( ) , getTickmarkColor ( ) , isTickmarkColorFromThemeEnabled ( ) , getTickmarkSections ( ) , isSectionTickmarksOnly ( ) , getSections ( ) , 0.38f , 0.09f , CENTER , new Point2D . Double ( 0 , 0 ) , Orientation . NORTH , getModel ( ) . getTicklabelOrientation ( ) , getModel ( ) . isNiceScale ( ) , getModel ( ) . isLogScale ( ) , bImage ) ; create_TITLE_Image ( GAUGE_WIDTH , getTitle ( ) , getUnitString ( ) , bImage ) ; if ( pointerImage != null ) { pointerImage . flush ( ) ; } pointerImage = create_POINTER_Image ( GAUGE_WIDTH , getPointerType ( ) ) ; if ( pointerShadowImage != null ) { pointerShadowImage . flush ( ) ; } if ( getModel ( ) . isPointerShadowVisible ( ) ) { pointerShadowImage = create_POINTER_SHADOW_Image ( GAUGE_WIDTH , getPointerType ( ) ) ; } else { pointerShadowImage = null ; } if ( isForegroundVisible ( ) ) { FOREGROUND_FACTORY . createRadialForeground ( GAUGE_WIDTH , false , getForegroundType ( ) , fImage ) ; } if ( thresholdImage != null ) { thresholdImage . flush ( ) ; } thresholdImage = create_THRESHOLD_Image ( GAUGE_WIDTH ) ; if ( minMeasuredImage != null ) { minMeasuredImage . flush ( ) ; } minMeasuredImage = create_MEASURED_VALUE_Image ( GAUGE_WIDTH , new Color ( 0 , 23 , 252 , 255 ) ) ; if ( maxMeasuredImage != null ) { maxMeasuredImage . flush ( ) ; } maxMeasuredImage = create_MEASURED_VALUE_Image ( GAUGE_WIDTH , new Color ( 252 , 29 , 0 , 255 ) ) ; if ( disabledImage != null ) { disabledImage . flush ( ) ; } disabledImage = create_DISABLED_Image ( GAUGE_WIDTH ) ; setCurrentLedImage ( getLedImageOff ( ) ) ; return this ;
|
public class csvserver_responderpolicy_binding { /** * Use this API to fetch csvserver _ responderpolicy _ binding resources of given name . */
public static csvserver_responderpolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { } }
|
csvserver_responderpolicy_binding obj = new csvserver_responderpolicy_binding ( ) ; obj . set_name ( name ) ; csvserver_responderpolicy_binding response [ ] = ( csvserver_responderpolicy_binding [ ] ) obj . get_resources ( service ) ; return response ;
|
public class HashtableOnDisk { /** * getNextRangeIndex The range index for walkHash ( ) . */
public int getNextRangeIndex ( ) { } }
|
int length = rangeIndexList . size ( ) ; if ( length > 0 ) { Integer rindex = rangeIndexList . get ( length - 1 ) ; return rindex . intValue ( ) ; } return 0 ;
|
public class CmsDetailNameCache { /** * Loads the complete URL name data into the cache . < p > */
private void reload ( ) { } }
|
CmsManyToOneMap < String , CmsUUID > newMap = new CmsManyToOneMap < String , CmsUUID > ( ) ; try { List < CmsUrlNameMappingEntry > mappings = m_cms . readUrlNameMappings ( CmsUrlNameMappingFilter . ALL ) ; LOG . info ( "Initializing detail name cache with " + mappings . size ( ) + " entries" ) ; for ( CmsUrlNameMappingEntry entry : mappings ) { newMap . put ( entry . getName ( ) , entry . getStructureId ( ) ) ; } m_detailIdCache = newMap ; } catch ( Exception e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; }
|
public class ConfigFromObject { /** * Parses a string into duration type safe spec format if possible .
* @ param path property path
* @ param durationString duration string using " 10 seconds " , " 10 days " , etc . format from type safe .
* @ return Duration parsed from typesafe config format . */
private Duration parseDurationUsingTypeSafeSpec ( final String path , final String durationString ) { } }
|
/* Check to see if any of the postfixes are at the end of the durationString . */
final Optional < Map . Entry < TimeUnit , List < String > > > entry = timeUnitMap . entrySet ( ) . stream ( ) . filter ( timeUnitListEntry -> /* Go through values in map and see if there are any matches . */
timeUnitListEntry . getValue ( ) . stream ( ) . anyMatch ( durationString :: endsWith ) ) . findFirst ( ) ; /* if we did not match any postFixes then exit early with an exception . */
if ( ! entry . isPresent ( ) ) { throw new IllegalArgumentException ( "Path " + path + " does not resolve to a duration " + durationString ) ; } /* Convert the value to a Duration . */
Optional < Duration > optional = entry . map ( timeUnitListEntry -> { /* Find the prefix that matches the best . Prefixes are ordered by length .
* Biggest prefixes are matched first . */
final Optional < String > postFix = timeUnitListEntry . getValue ( ) . stream ( ) . filter ( durationString :: endsWith ) . findFirst ( ) ; if ( postFix . isPresent ( ) ) { /* Remove the prefix from the string so only the unit remains . */
final String unitString = durationString . replace ( postFix . get ( ) , "" ) . trim ( ) ; /* Try to parse the units , if the units do not parse than they gave us a bad prefix . */
try { long unit = Long . parseLong ( unitString ) ; return Duration . ofNanos ( timeUnitListEntry . getKey ( ) . toNanos ( unit ) ) ; } catch ( NumberFormatException nfe ) { throw new IllegalArgumentException ( "Path does not resolve to a duration " + durationString ) ; } } else { throw new IllegalArgumentException ( "Path does not resolve to a duration " + durationString ) ; } } ) ; if ( optional . isPresent ( ) ) { return optional . get ( ) ; } else { throw new IllegalArgumentException ( "Path does not resolve to a duration " + durationString ) ; }
|
public class DRUMSParameterSet { /** * Initialises all Parameters .
* @ throws FileNotFoundException */
private void initParameters ( ) throws FileNotFoundException { } }
|
InputStream fileStream ; if ( new File ( parameterfile ) . exists ( ) ) { logger . info ( "Try reading properties directly from {}." , parameterfile ) ; fileStream = new FileInputStream ( new File ( parameterfile ) ) ; } else { logger . info ( "Try reading properties from Resources" ) ; fileStream = this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( parameterfile ) ; } Properties props = new Properties ( ) ; try { props . load ( fileStream ) ; } catch ( IOException ex ) { throw new RuntimeException ( ex ) ; } DATABASE_DIRECTORY = props . getProperty ( "DATABASE_DIRECTORY" ) ; BUCKET_MEMORY = parseSize ( props . getProperty ( "BUCKET_MEMORY" , "1G" ) ) ; MEMORY_CHUNK = ( int ) parseSize ( props . getProperty ( "MEMORY_CHUNK" , "10K" ) ) ; MAX_MEMORY_PER_BUCKET = parseSize ( props . getProperty ( "MAX_MEMORY_PER_BUCKET" , "100M" ) ) ; SYNC_CHUNK_SIZE = parseSize ( props . getProperty ( "SYNC_CHUNK_SIZE" , "2M" ) ) ; FILE_CHUNK_SIZE = parseSize ( props . getProperty ( "FILE_CHUNK_SIZE" , "32K" ) ) ; // determine exact index size
FILE_CHUNK_SIZE = FILE_CHUNK_SIZE - FILE_CHUNK_SIZE % prototype . getSize ( ) ; NUMBER_OF_SYNCHRONIZER_THREADS = Integer . valueOf ( props . getProperty ( "NUMBER_OF_SYNCHRONIZER_THREADS" , "1" ) ) ; MAX_BUCKET_STORAGE_TIME = Long . valueOf ( props . getProperty ( "MAX_BUCKET_STORAGE_TIME" , "84000000" ) ) ; MIN_ELEMENT_IN_BUCKET_BEFORE_SYNC = Integer . valueOf ( props . getProperty ( "MIN_ELEMENT_IN_BUCKET_BEFORE_SYNC" , "1" ) ) ; HEADER_FILE_LOCK_RETRY = Integer . valueOf ( props . getProperty ( "HEADER_FILE_LOCK_RETRY" , "100" ) ) ; INITIAL_FILE_SIZE = ( int ) parseSize ( props . getProperty ( "INITIAL_FILE_SIZE" , "16M" ) ) ; INITIAL_INCREMENT_SIZE = ( int ) parseSize ( props . getProperty ( "INITIAL_INCREMENT_SIZE" , "16M" ) ) ; configToLogInfo ( ) ;
|
public class SettingManager { /** * Generate a simple key for the given name . This method normalises the name by
* converting to lower case and replacing spaces with ' . ' ( e . g . " Buffer Size " is
* converted to " buffer . size " ) .
* @ param name the name of a setting
* @ return keyed setting name */
private static String key ( String name ) { } }
|
return WHITE_SPACE . matcher ( name ) . replaceAll ( "." ) . toLowerCase ( Locale . ENGLISH ) ;
|
public class Criteria { /** * Crates new { @ link Predicate } with leading and trailing wildcards for each entry < br / >
* < strong > NOTE : < / strong > mind your schema as leading wildcards may not be supported and / or execution might be slow .
* @ param values
* @ return
* @ throws InvalidDataAccessApiUsageException for strings with whitespace */
public Criteria contains ( String ... values ) { } }
|
assertValuesPresent ( ( Object [ ] ) values ) ; return contains ( Arrays . asList ( values ) ) ;
|
public class CFMLEngineFactory { /** * updates the engine when a update is available
* @ return has updated
* @ throws IOException
* @ throws ServletException */
private boolean removeUpdate ( ) throws IOException , ServletException { } }
|
final File patchDir = getPatchDirectory ( ) ; final File [ ] patches = patchDir . listFiles ( new ExtensionFilter ( new String [ ] { "rc" , "rcs" } ) ) ; for ( int i = 0 ; i < patches . length ; i ++ ) if ( ! patches [ i ] . delete ( ) ) patches [ i ] . deleteOnExit ( ) ; _restart ( ) ; return true ;
|
public class HessianInput { /** * Reads a byte array from the stream . */
public int readBytes ( byte [ ] buffer , int offset , int length ) throws IOException { } }
|
int readLength = 0 ; if ( _chunkLength == END_OF_DATA ) { _chunkLength = 0 ; return - 1 ; } else if ( _chunkLength == 0 ) { int tag = read ( ) ; switch ( tag ) { case 'N' : return - 1 ; case 'B' : case 'b' : _isLastChunk = tag == 'B' ; _chunkLength = ( read ( ) << 8 ) + read ( ) ; break ; default : throw new IOException ( "expected 'B' at " + ( char ) tag ) ; } } while ( length > 0 ) { if ( _chunkLength > 0 ) { buffer [ offset ++ ] = ( byte ) read ( ) ; _chunkLength -- ; length -- ; readLength ++ ; } else if ( _isLastChunk ) { if ( readLength == 0 ) return - 1 ; else { _chunkLength = END_OF_DATA ; return readLength ; } } else { int tag = read ( ) ; switch ( tag ) { case 'B' : case 'b' : _isLastChunk = tag == 'B' ; _chunkLength = ( read ( ) << 8 ) + read ( ) ; break ; default : throw new IOException ( "expected 'B' at " + ( char ) tag ) ; } } } if ( readLength == 0 ) return - 1 ; else if ( _chunkLength > 0 || ! _isLastChunk ) return readLength ; else { _chunkLength = END_OF_DATA ; return readLength ; }
|
public class EmailWithAttachments { /** * Adds an attachment to the EmailMessage .
* @ param file
* The file to add to the EmailMessage .
* @ throws MessagingException
* is thrown if the underlying implementation does not support modification of
* existing values */
public void addAttachment ( final File file ) throws MessagingException { } }
|
DataSource dataSource ; dataSource = new FileDataSource ( file ) ; final DataHandler dataHandler = new DataHandler ( dataSource ) ; addAttachment ( dataHandler , file . getName ( ) ) ;
|
public class AmazonLightsailClient { /** * Attaches a block storage disk to a running or stopped Lightsail instance and exposes it to the instance with the
* specified disk name .
* The < code > attach disk < / code > operation supports tag - based access control via resource tags applied to the
* resource identified by diskName . For more information , see the < a
* href = " https : / / lightsail . aws . amazon . com / ls / docs / en / articles / amazon - lightsail - controlling - access - using - tags "
* > Lightsail Dev Guide < / a > .
* @ param attachDiskRequest
* @ return Result of the AttachDisk operation returned by the service .
* @ throws ServiceException
* A general service exception .
* @ throws InvalidInputException
* Lightsail throws this exception when user input does not conform to the validation rules of an input
* field . < / p > < note >
* Domain - related APIs are only available in the N . Virginia ( us - east - 1 ) Region . Please set your AWS Region
* configuration to us - east - 1 to create , view , or edit these resources .
* @ throws NotFoundException
* Lightsail throws this exception when it cannot find a resource .
* @ throws OperationFailureException
* Lightsail throws this exception when an operation fails to execute .
* @ throws AccessDeniedException
* Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to
* access a resource .
* @ throws AccountSetupInProgressException
* Lightsail throws this exception when an account is still in the setup in progress state .
* @ throws UnauthenticatedException
* Lightsail throws this exception when the user has not been authenticated .
* @ sample AmazonLightsail . AttachDisk
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / lightsail - 2016-11-28 / AttachDisk " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public AttachDiskResult attachDisk ( AttachDiskRequest request ) { } }
|
request = beforeClientExecution ( request ) ; return executeAttachDisk ( request ) ;
|
public class FastMathCalc { /** * Compute ( a [ 0 ] + a [ 1 ] ) * ( b [ 0 ] + b [ 1 ] ) in extended precision .
* @ param a first term of the multiplication
* @ param b second term of the multiplication
* @ param result placeholder where to put the result */
private static void quadMult ( final double a [ ] , final double b [ ] , final double result [ ] ) { } }
|
final double xs [ ] = new double [ 2 ] ; final double ys [ ] = new double [ 2 ] ; final double zs [ ] = new double [ 2 ] ; /* a [ 0 ] * b [ 0] */
split ( a [ 0 ] , xs ) ; split ( b [ 0 ] , ys ) ; splitMult ( xs , ys , zs ) ; result [ 0 ] = zs [ 0 ] ; result [ 1 ] = zs [ 1 ] ; /* a [ 0 ] * b [ 1] */
split ( b [ 1 ] , ys ) ; splitMult ( xs , ys , zs ) ; double tmp = result [ 0 ] + zs [ 0 ] ; result [ 1 ] = result [ 1 ] - ( tmp - result [ 0 ] - zs [ 0 ] ) ; result [ 0 ] = tmp ; tmp = result [ 0 ] + zs [ 1 ] ; result [ 1 ] = result [ 1 ] - ( tmp - result [ 0 ] - zs [ 1 ] ) ; result [ 0 ] = tmp ; /* a [ 1 ] * b [ 0] */
split ( a [ 1 ] , xs ) ; split ( b [ 0 ] , ys ) ; splitMult ( xs , ys , zs ) ; tmp = result [ 0 ] + zs [ 0 ] ; result [ 1 ] = result [ 1 ] - ( tmp - result [ 0 ] - zs [ 0 ] ) ; result [ 0 ] = tmp ; tmp = result [ 0 ] + zs [ 1 ] ; result [ 1 ] = result [ 1 ] - ( tmp - result [ 0 ] - zs [ 1 ] ) ; result [ 0 ] = tmp ; /* a [ 1 ] * b [ 0] */
split ( a [ 1 ] , xs ) ; split ( b [ 1 ] , ys ) ; splitMult ( xs , ys , zs ) ; tmp = result [ 0 ] + zs [ 0 ] ; result [ 1 ] = result [ 1 ] - ( tmp - result [ 0 ] - zs [ 0 ] ) ; result [ 0 ] = tmp ; tmp = result [ 0 ] + zs [ 1 ] ; result [ 1 ] = result [ 1 ] - ( tmp - result [ 0 ] - zs [ 1 ] ) ; result [ 0 ] = tmp ;
|
public class JSONSerializer { /** * Recursively serialize an Object ( or array , list , map or set of objects ) to JSON , skipping transient and final
* fields .
* @ param obj
* The root object of the object graph to serialize .
* @ param indentWidth
* If indentWidth = = 0 , no prettyprinting indentation is performed , otherwise this specifies the
* number of spaces to indent each level of JSON .
* @ param onlySerializePublicFields
* If true , only serialize public fields .
* @ return The object graph in JSON form .
* @ throws IllegalArgumentException
* If anything goes wrong during serialization . */
public static String serializeObject ( final Object obj , final int indentWidth , final boolean onlySerializePublicFields ) { } }
|
return serializeObject ( obj , indentWidth , onlySerializePublicFields , new ClassFieldCache ( /* resolveTypes = */
false , /* onlySerializePublicFields = */
false ) ) ;
|
public class TreeMap { /** * Returns the last ( highest ) key currently in this sorted map .
* @ param transaction which controls visibilty of the Entry mapped by the key .
* @ return the last ( highest ) key currently in this sorted map .
* @ throws ObjectManagerException */
public synchronized Object lastKey ( Transaction transaction ) throws ObjectManagerException { } }
|
if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "lastKey" , new Object [ ] { transaction } ) ; Entry entry = lastEntry ( transaction ) ; Object returnKey = entry . getKey ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "lastKey" , new Object [ ] { returnKey } ) ; return returnKey ;
|
public class LibertyValidatorBean { /** * Override this method so that a LibertyValidatorBean is stored in the WELD
* Bean Store keyed on its classname . This allows an injected Validator Bean to
* be retrieved in both local and server failover scenarios as per defect 774504. */
@ Override public String getId ( ) { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getId" ) ; if ( id == null ) { // Set id to the class name
id = this . getClass ( ) . getName ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getId" , new Object [ ] { id } ) ; return id ;
|
public class Permission { /** * The permission that you want to give to the AWS user that is listed in Grantee . Valid values include :
* < ul >
* < li >
* < code > READ < / code > : The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds
* to the Amazon S3 bucket .
* < / li >
* < li >
* < code > READ _ ACP < / code > : The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the
* Amazon S3 bucket .
* < / li >
* < li >
* < code > WRITE _ ACP < / code > : The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the
* Amazon S3 bucket .
* < / li >
* < li >
* < code > FULL _ CONTROL < / code > : The grantee has READ , READ _ ACP , and WRITE _ ACP permissions for the thumbnails that
* Elastic Transcoder adds to the Amazon S3 bucket .
* < / li >
* < / ul >
* @ return The permission that you want to give to the AWS user that is listed in Grantee . Valid values include :
* < ul >
* < li >
* < code > READ < / code > : The grantee can read the thumbnails and metadata for thumbnails that Elastic
* Transcoder adds to the Amazon S3 bucket .
* < / li >
* < li >
* < code > READ _ ACP < / code > : The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to
* the Amazon S3 bucket .
* < / li >
* < li >
* < code > WRITE _ ACP < / code > : The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to
* the Amazon S3 bucket .
* < / li >
* < li >
* < code > FULL _ CONTROL < / code > : The grantee has READ , READ _ ACP , and WRITE _ ACP permissions for the thumbnails
* that Elastic Transcoder adds to the Amazon S3 bucket .
* < / li > */
public java . util . List < String > getAccess ( ) { } }
|
if ( access == null ) { access = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return access ;
|
public class ns_clusternode { /** * < pre >
* Use this operation to remove node from cluster in bulk .
* < / pre > */
public static ns_clusternode [ ] remove_node ( nitro_service client , ns_clusternode [ ] resources ) throws Exception { } }
|
if ( resources == null ) throw new Exception ( "Null resource array" ) ; if ( resources . length == 1 ) return ( ( ns_clusternode [ ] ) resources [ 0 ] . perform_operation ( client , "remove_node" ) ) ; return ( ( ns_clusternode [ ] ) perform_operation_bulk_request ( client , resources , "remove_node" ) ) ;
|
public class MyProxy { /** * Generates a hex X509 _ NAME hash ( like openssl x509 - hash - in cert . pem )
* Based on openssl ' s crypto / x509 / x509 _ cmp . c line 321 */
protected static String openssl_X509_NAME_hash ( X500Principal p ) throws Exception { } }
|
// This code replicates OpenSSL ' s hashing function
// DER - encode the Principal , MD5 hash it , then extract the first 4 bytes and reverse their positions
byte [ ] derEncodedSubject = p . getEncoded ( ) ; byte [ ] md5 = MessageDigest . getInstance ( "MD5" ) . digest ( derEncodedSubject ) ; // Reduce the MD5 hash to a single unsigned long
byte [ ] result = new byte [ ] { md5 [ 3 ] , md5 [ 2 ] , md5 [ 1 ] , md5 [ 0 ] } ; return toHex ( result ) ;
|
public class MvpDelegate { /** * < p > Detach delegated object from their presenters . < / p > */
public void onDetach ( ) { } }
|
for ( MvpPresenter < ? super Delegated > presenter : mPresenters ) { if ( ! mIsAttached && ! presenter . getAttachedViews ( ) . contains ( mDelegated ) ) { continue ; } presenter . detachView ( mDelegated ) ; } mIsAttached = false ; for ( MvpDelegate < ? > childDelegate : mChildDelegates ) { childDelegate . onDetach ( ) ; }
|
public class CacheRegistration { /** * Method that gets invoked when the server comes up
* Load all the cache objects when the server starts
* @ throws StartupException */
public void onStartup ( ) { } }
|
try { preloadCaches ( ) ; SpringAppContext . getInstance ( ) . loadPackageContexts ( ) ; // trigger dynamic context loading
preloadDynamicCaches ( ) ; // implementor cache relies on kotlin from preloadDynamicCaches ( )
ImplementorCache implementorCache = new ImplementorCache ( ) ; implementorCache . loadCache ( ) ; allCaches . put ( ImplementorCache . class . getSimpleName ( ) , implementorCache ) ; } catch ( Exception ex ) { String message = "Failed to load caches" ; logger . severeException ( message , ex ) ; throw new StartupException ( message , ex ) ; }
|
public class URLConnection { /** * Media types are in the format : type / subtype * ( ; parameter ) .
* For looking up the content handler , we should ignore those
* parameters . */
private String stripOffParameters ( String contentType ) { } }
|
if ( contentType == null ) return null ; int index = contentType . indexOf ( ';' ) ; if ( index > 0 ) return contentType . substring ( 0 , index ) ; else return contentType ;
|
public class RegistriesInner { /** * Schedules a new run based on the request parameters and add it to the run queue .
* @ param resourceGroupName The name of the resource group to which the container registry belongs .
* @ param registryName The name of the container registry .
* @ param runRequest The parameters of a run that needs to scheduled .
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the { @ link ServiceFuture } object */
public ServiceFuture < RunInner > scheduleRunAsync ( String resourceGroupName , String registryName , RunRequest runRequest , final ServiceCallback < RunInner > serviceCallback ) { } }
|
return ServiceFuture . fromResponse ( scheduleRunWithServiceResponseAsync ( resourceGroupName , registryName , runRequest ) , serviceCallback ) ;
|
public class NGBeanAttributeInfo { /** * Read the JSR 303 annotations from a bean \ " s attribute .
* @ param component */
private void readJSR303Annotations ( UIComponent component ) { } }
|
coreExpression = ELTools . getCoreValueExpression ( component ) ; // Annotation [ ] annotations = ELTools . readAnnotations ( component ) ;
// if ( null ! = annotations ) {
// for ( Annotation a : annotations ) {
// if ( a instanceof Max ) {
// long maximum = ( ( Max ) a ) . value ( ) ;
// max = maximum ;
// hasMax = true ;
// } else if ( a instanceof Min ) {
// long minimum = ( ( Min ) a ) . value ( ) ;
// hasMin = true ;
// min = minimum ;
// } else if ( a instanceof Size ) {
// maxSize = ( ( Size ) a ) . max ( ) ;
// hasMaxSize = maxSize > 0;
// minSize = ( ( Size ) a ) . min ( ) ;
// hasMinSize = minSize > 0;
// } else if ( a instanceof NotNull ) {
// isRequired = true ;
// } else if ( a . annotationType ( ) . getSimpleName ( ) . equals ( " NotEmpty " ) ) {
// isRequired = true ;
clazz = ELTools . getType ( component ) ; if ( ( clazz == Integer . class ) || ( clazz == int . class ) || ( clazz == Byte . class ) || ( clazz == byte . class ) || ( clazz == Short . class ) || ( clazz == short . class ) || ( clazz == Long . class ) || ( clazz == long . class ) ) { isInteger = true ; isNumeric = true ; } else if ( ( clazz == Double . class ) || ( clazz == double . class ) || ( clazz == Float . class ) || ( clazz == float . class ) ) { isFloat = true ; isNumeric = true ; } else if ( ( clazz == Date . class ) || ( clazz == java . util . Date . class ) ) { isDate = true ; } else if ( ( clazz == Boolean . class ) || ( clazz == boolean . class ) ) { isBoolean = true ; }
|
public class AbstractIntSet { /** * from IntSet */
public boolean contains ( int value ) { } }
|
// dumb implementation . You should override .
for ( Interator it = interator ( ) ; it . hasNext ( ) ; ) { if ( it . nextInt ( ) == value ) { return true ; } } return false ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.