signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class ReservedDBInstance { /** * The recurring price charged to run this reserved DB instance . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRecurringCharges ( java . util . Collection ) } or { @ link # withRecurringCharges ( java . util . Collec...
if ( this . recurringCharges == null ) { setRecurringCharges ( new com . amazonaws . internal . SdkInternalList < RecurringCharge > ( recurringCharges . length ) ) ; } for ( RecurringCharge ele : recurringCharges ) { this . recurringCharges . add ( ele ) ; } return this ;
public class JavaScriptPostAggregator { /** * { @ link # compute } can be called by multiple threads , so this function should be thread - safe to avoid extra * script compilation . */ @ EnsuresNonNull ( "fn" ) private Function getCompiledScript ( ) { } }
// JavaScript configuration should be checked when it ' s actually used because someone might still want Druid // nodes to be able to deserialize JavaScript - based objects even though JavaScript is disabled . Preconditions . checkState ( config . isEnabled ( ) , "JavaScript is disabled" ) ; Function syncedFn = fn ; if...
public class TabbedPaneTabCloseButtonPainter { /** * Draw a border around the graphic . * @ param g the Graphic context . * @ param width the width of the border . * @ param height the height of the border . * @ param color the color of the border . * @ param size the spread of the border from outside in , ex...
int max = ( int ) ( Math . min ( ( height - 2 ) * size , height / 2.0f ) + 0.5 ) ; int alphaDelta = color . getAlpha ( ) / max ; for ( int i = 0 ; i < max ; i ++ ) { Shape s = shapeGenerator . createRoundRectangle ( i , i , width - 2 * i - 1 , height - 2 * i - 1 , CornerSize . CHECKBOX_INTERIOR ) ; Color newColor = new...
public class AmazonLexModelBuildingClient { /** * Starts a job to import a resource to Amazon Lex . * @ param startImportRequest * @ return Result of the StartImport operation returned by the service . * @ throws LimitExceededException * The request exceeded a limit . Try your request again . * @ throws Inter...
request = beforeClientExecution ( request ) ; return executeStartImport ( request ) ;
public class ConstantAverager { /** * / * ( non - Javadoc ) * @ see Averager # addElement ( java . util . Map , java . util . Map ) */ @ Override public void addElement ( Map < String , Object > e , Map < String , AggregatorFactory > a ) { } }
// since we return a constant , no need to read from the event
public class SipServletMessageImpl { /** * ( non - Javadoc ) * @ see javax . servlet . sip . SipServletMessage # setExpires ( int ) */ public void setExpires ( int seconds ) { } }
try { ExpiresHeader expiresHeader = SipFactoryImpl . headerFactory . createExpiresHeader ( seconds ) ; expiresHeader . setExpires ( seconds ) ; this . message . setExpires ( expiresHeader ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( "Error setting expiration header!" , e ) ; }
public class MPSImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EList < MPSRG > getFixedLengthRG ( ) { } }
if ( fixedLengthRG == null ) { fixedLengthRG = new EObjectContainmentEList . Resolving < MPSRG > ( MPSRG . class , this , AfplibPackage . MPS__FIXED_LENGTH_RG ) ; } return fixedLengthRG ;
public class RBBITableBuilder { void build ( ) { } }
// If there were no rules , just return . This situation can easily arise // for the reverse rules . if ( fRB . fTreeRoots [ fRootIx ] == null ) { return ; } // Walk through the tree , replacing any references to $ variables with a copy of the // parse tree for the substition expression . fRB . fTreeRoots [ fRootIx ] =...
public class ConvertUtil { /** * Returns true if the value is any numeric type and has a value of 1 , or * if string type has a value of ' y ' , ' t ' , ' true ' or ' yes ' . Otherwise , return false . * @ param value value to convert * @ return true if the value is any numeric type and has a value of 1 , or * ...
if ( value == null ) { return false ; } else if ( value instanceof Boolean ) { return ( Boolean ) value ; } else if ( value instanceof BigDecimal ) { return value . equals ( BigDecimal . ONE ) ; } else if ( value instanceof Long ) { return value . equals ( 1L ) ; } else if ( value instanceof Integer ) { return value . ...
public class Manager { @ InterfaceAudience . Private private void replaceDatabase ( String databaseName , InputStream databaseStream , Iterator < Map . Entry < String , InputStream > > attachmentStreams ) throws CouchbaseLiteException { } }
try { Database db = getDatabase ( databaseName , false ) ; String dstDbPath = FileDirUtils . getPathWithoutExt ( db . getPath ( ) ) + kV1DBExtension ; String dstAttsPath = FileDirUtils . getPathWithoutExt ( dstDbPath ) + " attachments" ; OutputStream destStream = new FileOutputStream ( new File ( dstDbPath ) ) ; Stream...
public class GitHubHookRegisterProblemMonitor { /** * Save the settings to a file . Called on each change of { @ code ignored } list */ @ Override public synchronized void save ( ) { } }
if ( BulkChange . contains ( this ) ) { return ; } try { getConfigFile ( ) . write ( this ) ; SaveableListener . fireOnChange ( this , getConfigFile ( ) ) ; } catch ( IOException e ) { LOGGER . error ( "{}" , e ) ; }
public class AtomicGrowingSparseMatrix { /** * { @ inheritDoc } */ public void setRow ( int row , double [ ] columns ) { } }
checkIndices ( row , 0 ) ; AtomicSparseVector rowEntry = getRow ( row , columns . length - 1 , true ) ; denseArrayReadLock . lock ( ) ; for ( int i = 0 ; i < columns . length ; ++ i ) rowEntry . set ( i , columns [ i ] ) ; denseArrayReadLock . unlock ( ) ;
public class PaginationHandler { /** * 新建count查询的MappedStatement * @ param ms * @ return */ public MappedStatement getCountMappedStatement ( MappedStatement ms ) { } }
String newMsId = ms . getId ( ) + PAGE_COUNT_SUFFIX ; MappedStatement statement = null ; Configuration configuration = ms . getConfiguration ( ) ; try { statement = configuration . getMappedStatement ( newMsId ) ; if ( statement != null ) return statement ; } catch ( Exception e ) { } synchronized ( configuration ) { i...
public class GenericCriteria { /** * Evalutes AND and OR operators . * @ param container data context * @ param promptValues responses to prompts * @ return operator result */ private boolean evaluateLogicalOperator ( FieldContainer container , Map < GenericCriteriaPrompt , Object > promptValues ) { } }
boolean result = false ; if ( m_criteriaList . size ( ) == 0 ) { result = true ; } else { for ( GenericCriteria criteria : m_criteriaList ) { result = criteria . evaluate ( container , promptValues ) ; if ( ( m_operator == TestOperator . AND && ! result ) || ( m_operator == TestOperator . OR && result ) ) { break ; } }...
public class DFAs { /** * Calculates the implication ( " = & gt ; " ) of two DFA , and stores the result in a given mutable DFA . * @ param dfa1 * the first DFA * @ param dfa2 * the second DFA * @ param inputs * the input symbols to consider * @ param out * a mutable DFA for storing the result * @ ret...
return combine ( dfa1 , dfa2 , inputs , out , AcceptanceCombiner . IMPL ) ;
public class HttpServerHandlerBinder { /** * Bind a new handler into the jetty service . These handlers are bound before the servlet handler and can handle parts * of the URI space before a servlet sees it . * Do not use this method to bind logging handlers as they would be called before any functionality has been ...
final Multibinder < Handler > handlers = Multibinder . newSetBinder ( binder , Handler . class , HANDLER_NAMED ) ; return handlers . addBinding ( ) ;
public class PutInventoryRequest { /** * The inventory items that you want to add or update on instances . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setItems ( java . util . Collection ) } or { @ link # withItems ( java . util . Collection ) } if you wa...
if ( this . items == null ) { setItems ( new com . amazonaws . internal . SdkInternalList < InventoryItem > ( items . length ) ) ; } for ( InventoryItem ele : items ) { this . items . add ( ele ) ; } return this ;
public class SDPWrapper { /** * Convenience method for creating a new { @ link RTPInfo } object . * @ param connection * the connection ( the c - field ) information from the SDP or null * if there were none . * @ param md * the media description from the SDP * @ return a new { @ link RTPInfo } object if th...
final Media m = md . getMedia ( ) ; if ( "RTP/AVP" . equalsIgnoreCase ( m . getProtocol ( ) ) ) { final Connection c = md . getConnection ( ) != null ? null : connection ; return new RTPInfoImpl ( connection , md ) ; } return null ;
public class OneForOneBlockFetcher { /** * Invokes the " onBlockFetchFailure " callback for every listed block id . */ private void failRemainingBlocks ( String [ ] failedBlockIds , Throwable e ) { } }
for ( String blockId : failedBlockIds ) { try { listener . onBlockFetchFailure ( blockId , e ) ; } catch ( Exception e2 ) { logger . error ( "Error in block fetch failure callback" , e2 ) ; } }
public class AbstractFileStorageEngine { /** * Removes recursively all empty parent directories up to and excluding the storage directory . * @ param path * @ throws IOException */ private void cleanEmptyParentDirectory ( Path path ) throws IOException { } }
Path normPath = path . normalize ( ) ; if ( normPath . equals ( Paths . get ( getDirectory ( ) ) . normalize ( ) ) || normPath . equals ( Paths . get ( System . getProperty ( "java.io.tmpdir" ) ) . normalize ( ) ) ) { // stop if we reach the output or temporary directory return ; } try { Files . deleteIfExists ( path )...
public class Matrix4f { /** * Apply an arbitrary perspective projection frustum transformation for a right - handed coordinate system * using the given NDC z range to this matrix and store the result in < code > dest < / code > . * If < code > M < / code > is < code > this < / code > matrix and < code > F < / code ...
if ( ( properties & PROPERTY_IDENTITY ) != 0 ) return dest . setFrustum ( left , right , bottom , top , zNear , zFar , zZeroToOne ) ; return frustumGeneric ( left , right , bottom , top , zNear , zFar , zZeroToOne , dest ) ;
public class Term { /** * Determines if this term is of the form " F & lt ; OP & gt ; E " where F is the * specified field , & lt ; OP & gt ; is an operator , and E is an expression . If * so , the method returns & lt ; OP & gt ; . If not , the method returns null . * @ param fldName * the name of the field *...
if ( lhs . isFieldName ( ) && lhs . asFieldName ( ) . equals ( fldName ) ) return op ; if ( rhs . isFieldName ( ) && rhs . asFieldName ( ) . equals ( fldName ) ) return op . complement ( ) ; return null ;
public class LambdaConfigTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( LambdaConfigType lambdaConfigType , ProtocolMarshaller protocolMarshaller ) { } }
if ( lambdaConfigType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( lambdaConfigType . getPreSignUp ( ) , PRESIGNUP_BINDING ) ; protocolMarshaller . marshall ( lambdaConfigType . getCustomMessage ( ) , CUSTOMMESSAGE_BINDING ) ; protocol...
public class SimpleWeightedDirectedTypedEdge { /** * { @ inheritDoc } */ @ SuppressWarnings ( "unchecked" ) public < E extends Edge > E flip ( ) { } }
return ( E ) ( new SimpleWeightedDirectedTypedEdge < T > ( type , to , from , weight ) ) ;
public class JMStats { /** * Min number . * @ param < N > the type parameter * @ param numberList the number list * @ return the number */ public static < N extends Number > Number min ( List < N > numberList ) { } }
return cal ( numberList , DoubleStream :: min ) ;
public class SLINKHDBSCANLinearMemory { /** * Third step : Determine the values for P and L * @ param id the id of the object to be inserted into the pointer * representation * @ param pi Pi data store * @ param lambda Lambda data store * @ param processedIDs the already processed ids * @ param m Data store...
DBIDVar p_i = DBIDUtil . newVar ( ) ; // for i = 1 . . n for ( DBIDIter it = processedIDs . iter ( ) ; it . valid ( ) ; it . advance ( ) ) { double l_i = lambda . doubleValue ( it ) ; double m_i = m . doubleValue ( it ) ; pi . assignVar ( it , p_i ) ; // p _ i = pi ( it ) double mp_i = m . doubleValue ( p_i ) ; // if L...
public class Configurator { /** * Checks that for every dependency referred , there is a matching property */ static void checkDependencyReferencesPresent ( List < AccessibleObject > objects , Map < String , AccessibleObject > props ) { } }
// iterate overall properties marked by @ Property for ( int i = 0 ; i < objects . size ( ) ; i ++ ) { // get the Property annotation AccessibleObject ao = objects . get ( i ) ; Property annotation = ao . getAnnotation ( Property . class ) ; if ( annotation == null ) { throw new IllegalArgumentException ( "@Property an...
public class ComStmtPrepare { /** * Send directly to socket the sql data . * @ param pos the writer * @ throws IOException if connection error occur */ public void send ( PacketOutputStream pos ) throws IOException { } }
pos . startPacket ( 0 ) ; pos . write ( COM_STMT_PREPARE ) ; pos . write ( this . sql ) ; pos . flush ( ) ;
public class ArchiveExtractor { /** * parse name without directories */ private String getFileName ( String name ) { } }
// check if the environment is linux or windows if ( name . contains ( Constants . FORWARD_SLASH ) ) { name = name . substring ( name . lastIndexOf ( Constants . FORWARD_SLASH ) + 1 , name . length ( ) ) ; } else if ( name . contains ( Constants . BACK_SLASH ) ) { name = name . substring ( name . lastIndexOf ( Constant...
public class MvcStateKeeperHolder { /** * Restore model of all { @ link Bean } s currently live in the { @ link Mvc # graph ( ) } * @ Bundle savedState the saved state */ static void restoreState ( Bundle savedState ) { } }
stateKeeper . bundle = savedState ; MvcComponent root = getRootComponent ( ) ; doRestoreState ( root ) ; stateKeeper . bundle = null ;
public class JobHistoryFileParserBase { /** * parses the - Xmx value from the mapred . child . java . opts * in the job conf usually appears as the * following in the job conf : * " mapred . child . java . opts " : " - Xmx3072M " * or * " mapred . child . java . opts " : " - Xmx1024m - verbose : gc - Xloggc :...
long retVal = 0L ; String valueStr = extractXmxValueStr ( javaChildOptsStr ) ; char lastChar = valueStr . charAt ( valueStr . length ( ) - 1 ) ; try { if ( Character . isLetter ( lastChar ) ) { String xmxValStr = valueStr . substring ( 0 , valueStr . length ( ) - 1 ) ; retVal = Long . parseLong ( xmxValStr ) ; switch (...
public class AbstractGrabber { /** * This method is called by a video frame , when it is being recycled . * @ param frame the frame being recycled . */ final void recycleVideoBuffer ( BaseVideoFrame frame ) { } }
// Make sure we are in started state if ( state . isStarted ( ) ) { enqueueBuffer ( object , frame . getBufferInex ( ) ) ; synchronized ( availableVideoFrames ) { availableVideoFrames . add ( frame ) ; availableVideoFrames . notify ( ) ; } }
public class CertificateValidity { /** * Get the attribute value . */ public Date get ( String name ) throws IOException { } }
if ( name . equalsIgnoreCase ( NOT_BEFORE ) ) { return ( getNotBefore ( ) ) ; } else if ( name . equalsIgnoreCase ( NOT_AFTER ) ) { return ( getNotAfter ( ) ) ; } else { throw new IOException ( "Attribute name not recognized by " + "CertAttrSet: CertificateValidity." ) ; }
public class AbstractRadialBargraph { /** * Returns the bargraph track image * with the given with and height . * @ param WIDTH * @ param START _ ANGLE * @ param ANGLE _ EXTEND * @ param APEX _ ANGLE * @ param BARGRAPH _ OFFSET * @ return buffered image containing the bargraph track image */ protected Buf...
return create_BARGRAPH_TRACK_Image ( WIDTH , START_ANGLE , ANGLE_EXTEND , APEX_ANGLE , BARGRAPH_OFFSET , null ) ;
public class PackageCommand { /** * Determine the default package format for the current operating system . * @ return " pax " on z / OS and " zip " for all others */ private String getDefaultPackageExtension ( ) { } }
// Default package format on z / OS is a pax if ( "z/OS" . equalsIgnoreCase ( bootProps . get ( "os.name" ) ) ) { return "pax" ; } if ( PackageProcessor . IncludeOption . RUNNABLE . matches ( includeOption ) ) { return "jar" ; } return "zip" ;
public class TypeValidator { /** * Expect the type to autobox to be an Iterable . * @ return True if there was no warning , false if there was a mismatch . */ boolean expectAutoboxesToIterable ( Node n , JSType type , String msg ) { } }
// Note : we don ' t just use JSType . autobox ( ) here because that removes null and undefined . // We want to keep null and undefined around . if ( type . isUnionType ( ) ) { for ( JSType alt : type . toMaybeUnionType ( ) . getAlternates ( ) ) { alt = alt . isBoxableScalar ( ) ? alt . autoboxesTo ( ) : alt ; if ( ! a...
public class CmsUserInfo { /** * Shows the user preferences dialog . < p > */ void editUserData ( ) { } }
if ( m_context instanceof CmsEmbeddedDialogContext ) { ( ( CmsEmbeddedDialogContext ) m_context ) . closeWindow ( true ) ; } else { A_CmsUI . get ( ) . closeWindows ( ) ; } CmsUserDataDialog dialog = new CmsUserDataDialog ( m_context ) ; m_context . start ( CmsVaadinUtils . getMessageText ( Messages . GUI_USER_EDIT_0 )...
public class VTensor { /** * Sets the value of the entry corresponding to the given indices . * @ param indices The indices of the multi - dimensional array . * @ param val The value to set . * @ return The previous value . */ public double set ( int [ ] indices , double val ) { } }
checkIndices ( indices ) ; int c = getConfigIdx ( indices ) ; return values . set ( c , val ) ;
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public IfcAssemblyPlaceEnum createIfcAssemblyPlaceEnumFromString ( EDataType eDataType , String initialValue ) { } }
IfcAssemblyPlaceEnum result = IfcAssemblyPlaceEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
public class Matrix4f { /** * / * ( non - Javadoc ) * @ see org . joml . Matrix4fc # mul ( org . joml . Matrix4x3fc , org . joml . Matrix4f ) */ public Matrix4f mul ( Matrix4x3fc right , Matrix4f dest ) { } }
if ( ( properties & PROPERTY_IDENTITY ) != 0 ) return dest . set ( right ) ; else if ( ( right . properties ( ) & PROPERTY_IDENTITY ) != 0 ) return dest . set ( this ) ; else if ( ( properties & PROPERTY_PERSPECTIVE ) != 0 && ( right . properties ( ) & PROPERTY_AFFINE ) != 0 ) return mulPerspectiveAffine ( right , dest...
public class NameExtractor { /** * This method will find all the attached preps of a phrase . */ private static void getAttachedPrep ( final List < Token > sentenceToken , final List < Phrase > sentencePhrase , final int index ) { } }
final String prep ; boolean nameSequenceMeetEnd = true ; final Collection < Phrase > phraseSequence = new HashSet < > ( ) ; int phrasePtr = index ; Phrase currentNamePhrase = sentencePhrase . get ( phrasePtr ) ; int phrasePtrInSentence ; if ( currentNamePhrase . attachedWordMap . get ( "prep" ) != null ) return ; // we...
public class OSSUnderFileSystemFactory { /** * @ param conf optional configuration object for the UFS * @ return true if both access , secret and endpoint keys are present , false otherwise */ private boolean checkOSSCredentials ( UnderFileSystemConfiguration conf ) { } }
return conf . isSet ( PropertyKey . OSS_ACCESS_KEY ) && conf . isSet ( PropertyKey . OSS_SECRET_KEY ) && conf . isSet ( PropertyKey . OSS_ENDPOINT_KEY ) ;
public class MultiLayerNetwork { /** * Set the parameters of the netowrk . Note that the parameter keys must match the format as described in { @ link # getParam ( String ) } * and { @ link # paramTable ( ) } . Note that the values of the parameters used as an argument to this method are copied - * i . e . , it is ...
Map < String , INDArray > currParamTable = paramTable ( ) ; if ( ! currParamTable . keySet ( ) . equals ( paramTable . keySet ( ) ) ) { throw new IllegalArgumentException ( "Cannot set param table: parameter keys do not match.\n" + "Current: " + currParamTable . keySet ( ) + "\nTo set: " + paramTable . keySet ( ) ) ; }...
public class MCF1Impl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public void eUnset ( int featureID ) { } }
switch ( featureID ) { case AfplibPackage . MCF1__RG_LENGTH : setRGLength ( RG_LENGTH_EDEFAULT ) ; return ; case AfplibPackage . MCF1__RG : getRG ( ) . clear ( ) ; return ; } super . eUnset ( featureID ) ;
public class SessionSimpleHashMap { /** * This method puts an entry into the HashMap . It does follow HashMap semantics by checking for * an existing entry and returning that entry when we replace it . However , the session component * ensures there is not an existing entry prior to calling put , so we don ' t expe...
if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && LoggingUtil . SESSION_LOGGER_CORE . isLoggable ( Level . FINER ) ) { // PM16861 StringBuffer sb = new StringBuffer ( "{" ) . append ( key ) . append ( "} " ) . append ( appNameForLogging ) ; LoggingUtil . SESSION_LOGGER_CORE . entering ( methodCla...
public class Gauge { /** * Adds the given Marker to the list of markers . * @ param MARKER */ public void addMarker ( final Marker MARKER ) { } }
if ( null == MARKER ) return ; markers . add ( MARKER ) ; Collections . sort ( markers , new MarkerComparator ( ) ) ; fireUpdateEvent ( REDRAW_EVENT ) ;
public class CPDefinitionPersistenceImpl { /** * Returns the cp definitions before and after the current cp definition in the ordered set where CProductId = & # 63 ; and status = & # 63 ; . * @ param CPDefinitionId the primary key of the current cp definition * @ param CProductId the c product ID * @ param status...
CPDefinition cpDefinition = findByPrimaryKey ( CPDefinitionId ) ; Session session = null ; try { session = openSession ( ) ; CPDefinition [ ] array = new CPDefinitionImpl [ 3 ] ; array [ 0 ] = getByC_S_PrevAndNext ( session , cpDefinition , CProductId , status , orderByComparator , true ) ; array [ 1 ] = cpDefinition ;...
public class NearestNeighborAffinityMatrixBuilder { /** * Check if the index array contains { @ code i } . * TODO : sort arrays , use binary search ! * @ param is Array to search * @ param i Index to search * @ return Position of index i , or { @ code - 1 } if not found . */ protected static int containsIndex (...
for ( int j = 0 ; j < is . length ; j ++ ) { if ( i == is [ j ] ) { return j ; } } return - 1 ;
public class ButterKnife { /** * Returns true when the return value should be propagated . Use a default otherwise . */ private static boolean validateReturnType ( Method method , Class < ? > expected ) { } }
Class < ? > returnType = method . getReturnType ( ) ; if ( returnType == void . class ) { return false ; } if ( returnType != expected ) { String expectedType = "'" + expected . getName ( ) + "'" ; if ( expected != void . class ) { expectedType = "'void' or " + expectedType ; } throw new IllegalStateException ( method ...
public class SubjectAlternativeNameExtension { /** * Get the attribute value . */ public GeneralNames get ( String name ) throws IOException { } }
if ( name . equalsIgnoreCase ( SUBJECT_NAME ) ) { return ( names ) ; } else { throw new IOException ( "Attribute name not recognized by " + "CertAttrSet:SubjectAlternativeName." ) ; }
public class AbstractBindingTypeDef { protected boolean isSimpleNamingAutoBindable ( String propertyName , Class < ? > propertyType , ComponentDef cd ) { } }
final String componentName = cd . getComponentName ( ) ; if ( componentName == null ) { return false ; } if ( componentName . equals ( propertyName ) ) { // e . g . seaLogic for SeaLogic return true ; } if ( componentName . endsWith ( ContainerConstants . PACKAGE_SEP + propertyName ) ) { // e . g . sea [ _ landLogic ] ...
public class CookieHelper { /** * Need to call this by reflection for backwards compatibility with Servlet 2.5 */ static boolean isHttpOnlyReflect ( javax . servlet . http . Cookie servletCookie ) { } }
try { return ( Boolean ) servletCookie . getClass ( ) . getMethod ( "isHttpOnly" ) . invoke ( servletCookie ) ; } catch ( Exception e ) { // Cookie . logger . warn ( " You are trying to get HttpOnly from a cookie , but it appears you are running on Servlet version before 3.0 . Returning false . . which can be false ! "...
public class FatLfnDirectory { /** * { @ inheritDoc } * < / p > < p > * According to the FAT file system specification , leading and trailing * spaces in the { @ code name } are ignored by this method . * @ param name { @ inheritDoc } * @ return { @ inheritDoc } * @ throws IOException { @ inheritDoc } */ @ ...
checkWritable ( ) ; checkUniqueName ( name ) ; name = name . trim ( ) ; final ShortName sn = makeShortName ( name ) ; final FatDirectoryEntry real = dir . createSub ( fat ) ; real . setShortName ( sn ) ; final FatLfnDirectoryEntry e = new FatLfnDirectoryEntry ( this , real , name ) ; try { dir . addEntries ( e . compac...
public class BPMActivator { /** * { @ inheritDoc } */ @ Override public ServiceHandler activateService ( QName name , ComponentModel config ) { } }
return new BPMExchangeHandler ( ( BPMComponentImplementationModel ) config . getImplementation ( ) , getServiceDomain ( ) , name ) ;
public class DurationField { /** * Because parsing done by base class returns a different date than parsing * done by the user or converting duration to a date . But for the * DurationField comparison only the time is important . This function helps * comparing the time and ignores the values for day , month and ...
final LocalTime lt1 = LocalDateTime . ofInstant ( d1 . toInstant ( ) , ZONEID_UTC ) . toLocalTime ( ) ; final LocalTime lt2 = LocalDateTime . ofInstant ( d2 . toInstant ( ) , ZONEID_UTC ) . toLocalTime ( ) ; return lt1 . compareTo ( lt2 ) ;
public class GraphAnalyticBase { /** * Set the parallelism for this analytic ' s operators . This parameter is * necessary because processing a small amount of data with high operator * parallelism is slow and wasteful with memory and buffers . * < p > Operator parallelism should be set to this given value unless...
Preconditions . checkArgument ( parallelism > 0 || parallelism == PARALLELISM_DEFAULT , "The parallelism must be at least one, or ExecutionConfig.PARALLELISM_DEFAULT (use system default)." ) ; this . parallelism = parallelism ; return this ;
public class RoutingSystemBroadcast { /** * with a secure APDU or sync . req / res , the SBC currently has to be checked at an upper layer */ public static boolean isSystemBroadcast ( final CEMI frame ) { } }
if ( frame . getMessageCode ( ) == CEMILData . MC_LDATA_IND && frame instanceof CEMILData ) { final CEMILData ldata = ( CEMILData ) frame ; final KNXAddress dst = ldata . getDestination ( ) ; return ldata . isSystemBroadcast ( ) && dst instanceof GroupAddress && dst . getRawAddress ( ) == 0 ; } return false ;
public class DefaultElementProducer { /** * Calls { @ link # createTableCell ( java . lang . Object , java . util . Collection , boolean ) } * @ param val * @ param style * @ param noWrap * @ return * @ throws com . vectorprint . VectorPrintException */ public PdfPCell createTableCell ( Object val , BaseStyle...
return createTableCell ( val , toCollection ( style ) , noWrap ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EClass getIfcConstructionEquipmentResource ( ) { } }
if ( ifcConstructionEquipmentResourceEClass == null ) { ifcConstructionEquipmentResourceEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 111 ) ; } return ifcConstructionEquipmentResourceEClass ;
public class BaseTaglet { /** * { @ inheritDoc } * @ throws UnsupportedTagletOperationException thrown when the method is * not supported by the taglet . */ public Content getTagletOutput ( Element element , DocTree tag , TagletWriter writer ) { } }
throw new UnsupportedTagletOperationException ( "Method not supported in taglet " + getName ( ) + "." ) ;
public class CreateTableRequest { /** * Adds split at the specified key to the configuration * @ param key */ public CreateTableRequest addSplit ( ByteString key ) { } }
Preconditions . checkNotNull ( key ) ; createTableRequest . addInitialSplitsBuilder ( ) . setKey ( key ) ; return this ;
public class BRGImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } }
switch ( featureID ) { case AfplibPackage . BRG__RGRP_NAME : return getRGrpName ( ) ; case AfplibPackage . BRG__TRIPLETS : return getTriplets ( ) ; } return super . eGet ( featureID , resolve , coreType ) ;
public class SweepHullDelaunay2D { /** * Flip a single triangle , if necessary . * @ param i Triangle number * @ param flipped Bitset to modify * @ return number of other triangle , or - 1 */ int flipTriangle ( int i , long [ ] flipped ) { } }
final Triangle cur = tris . get ( i ) ; // Test edge AB : if ( cur . ab >= 0 ) { final int ot = cur . ab ; Triangle oth = tris . get ( ot ) ; Orientation orient = cur . findOrientation ( oth ) ; final int opp , lef , rig ; switch ( orient ) { case ORIENT_AB_BA : opp = oth . c ; lef = oth . bc ; rig = oth . ca ; break ;...
public class Year { /** * Adjusts the specified temporal object to have this year . * This returns a temporal object of the same observable type as the input * with the year changed to be the same as this . * The adjustment is equivalent to using { @ link Temporal # with ( TemporalField , long ) } * passing { @...
if ( Chronology . from ( temporal ) . equals ( IsoChronology . INSTANCE ) == false ) { throw new DateTimeException ( "Adjustment only supported on ISO date-time" ) ; } return temporal . with ( YEAR , year ) ;
public class CachingOmemoStore { /** * Return the { @ link KeyCache } object of an { @ link OmemoManager } . * @ param device * @ return */ private KeyCache < T_IdKeyPair , T_IdKey , T_PreKey , T_SigPreKey , T_Sess > getCache ( OmemoDevice device ) { } }
KeyCache < T_IdKeyPair , T_IdKey , T_PreKey , T_SigPreKey , T_Sess > cache = caches . get ( device ) ; if ( cache == null ) { cache = new KeyCache < > ( ) ; caches . put ( device , cache ) ; } return cache ;
public class BashTabCompletionDoclet { /** * The Index file in the Bash Completion Doclet is what generates the actual tab - completion script . * This will actually write out the shell completion output file . * The Freemarker instance will see a top - level map that has two keys in it . * The first key is for c...
// Create a root map for all the work units so we can access all the info we need : final Map < String , Object > propertiesMap = new HashMap < > ( ) ; workUnits . stream ( ) . forEach ( workUnit -> propertiesMap . put ( workUnit . getName ( ) , workUnit . getRootMap ( ) ) ) ; // Add everything into a nice package that...
public class SelectorImpl { /** * the constructor of Operator ( to decode operands ) . */ static Selector decodeSubtree ( ObjectInput buf ) throws ClassNotFoundException , IOException { } }
int type = buf . readByte ( ) ; if ( type < IDENTIFIER ) return new LiteralImpl ( buf ) ; else if ( type == IDENTIFIER ) return new IdentifierImpl ( buf ) ; else if ( type == LIKE ) return new LikeOperatorImpl ( buf ) ; else return new OperatorImpl ( buf ) ;
public class BsFileConfigCA { public void filter ( String name , EsAbstractConditionQuery . OperatorCall < BsFileConfigCQ > queryLambda , ConditionOptionCall < FilterAggregationBuilder > opLambda , OperatorCall < BsFileConfigCA > aggsLambda ) { } }
FileConfigCQ cq = new FileConfigCQ ( ) ; if ( queryLambda != null ) { queryLambda . callback ( cq ) ; } FilterAggregationBuilder builder = regFilterA ( name , cq . getQuery ( ) ) ; if ( opLambda != null ) { opLambda . callback ( builder ) ; } if ( aggsLambda != null ) { FileConfigCA ca = new FileConfigCA ( ) ; aggsLamb...
public class VecmathUtil { /** * Create unit vectors from one atom to all other provided atoms . * @ param fromAtom reference atom ( will become 0,0) * @ param toAtoms list of to atoms * @ return unit vectors */ static List < Vector2d > newUnitVectors ( final IAtom fromAtom , final List < IAtom > toAtoms ) { } }
final List < Vector2d > unitVectors = new ArrayList < Vector2d > ( toAtoms . size ( ) ) ; for ( final IAtom toAtom : toAtoms ) { unitVectors . add ( newUnitVector ( fromAtom . getPoint2d ( ) , toAtom . getPoint2d ( ) ) ) ; } return unitVectors ;
public class version_matrix_status { /** * Use this API to fetch filtered set of version _ matrix _ status resources . * filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */ public static version_matrix_status [ ] get_filtered ( nitro_service service , String filter ) throws Exc...
version_matrix_status obj = new version_matrix_status ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; version_matrix_status [ ] response = ( version_matrix_status [ ] ) obj . getfiltered ( service , option ) ; return response ;
public class Visualizer { /** * Returns the entry point of the PE if present and valid , otherwise absent . * A valid entry point is one within a section . * @ return entry point optional if present , absent otherwise */ private Optional < Long > getEntryPoint ( ) { } }
long rva = data . getOptionalHeader ( ) . get ( StandardFieldEntryKey . ADDR_OF_ENTRY_POINT ) ; Optional < SectionHeader > section = new SectionLoader ( data ) . maybeGetSectionHeaderByRVA ( rva ) ; if ( section . isPresent ( ) ) { long phystovirt = section . get ( ) . get ( SectionHeaderKey . VIRTUAL_ADDRESS ) - secti...
public class AmazonDirectConnectClient { /** * Lists the virtual private gateways owned by the AWS account . * You can create one or more AWS Direct Connect private virtual interfaces linked to a virtual private gateway . * @ param describeVirtualGatewaysRequest * @ return Result of the DescribeVirtualGateways op...
request = beforeClientExecution ( request ) ; return executeDescribeVirtualGateways ( request ) ;
public class InternalSARLParser { /** * $ ANTLR start synpred55 _ InternalSARL */ public final void synpred55_InternalSARL_fragment ( ) throws RecognitionException { } }
// InternalSARL . g : 15431:4 : ( ' abstract ' | ' annotation ' | ' class ' | ' create ' | ' def ' | ' dispatch ' | ' enum ' | ' extends ' | ' final ' | ' implements ' | ' import ' | ' interface ' | ' override ' | ' package ' | ' public ' | ' private ' | ' protected ' | ' static ' | ' throws ' | ' strictfp ' | ' native...
public class servicegroup_servicegroupentitymonbindings_binding { /** * Use this API to fetch servicegroup _ servicegroupentitymonbindings _ binding resources of given name . */ public static servicegroup_servicegroupentitymonbindings_binding [ ] get ( nitro_service service , String servicegroupname ) throws Exception ...
servicegroup_servicegroupentitymonbindings_binding obj = new servicegroup_servicegroupentitymonbindings_binding ( ) ; obj . set_servicegroupname ( servicegroupname ) ; servicegroup_servicegroupentitymonbindings_binding response [ ] = ( servicegroup_servicegroupentitymonbindings_binding [ ] ) obj . get_resources ( servi...
public class HelloConfiguration { /** * Returns a custom { @ link ClientFactory } with TLS certificate validation disabled , * which means any certificate received from the server will be accepted without any verification . * It is used for an example which makes the client send an HTTPS request to the server runni...
return new ClientFactoryBuilder ( ) . sslContextCustomizer ( b -> b . trustManager ( InsecureTrustManagerFactory . INSTANCE ) ) . build ( ) ;
public class CLI { /** * Set up the TCP socket for annotation . */ public final void server ( ) { } }
// load parameters into a properties String port = parsedArguments . getString ( "port" ) ; String model = parsedArguments . getString ( "model" ) ; String lemmatizerModel = parsedArguments . getString ( "lemmatizerModel" ) ; final String allMorphology = Boolean . toString ( this . parsedArguments . getBoolean ( "allMo...
public class AccountManager { /** * Same as the other version with username being sent null . * @ param masterPassword master password to use * @ param inputText the input text * @ return the generated password * @ see # generatePassword ( CharSequence , String , String ) */ public SecureCharArray generatePassw...
return generatePassword ( masterPassword , inputText , null ) ;
public class Reporting { /** * Starts all reporters . * @ return The number of configured reporters . * @ throws Exception on start error . */ public int start ( ) throws Exception { } }
if ( isStarted . compareAndSet ( false , true ) ) { try { for ( Reporter reporter : reporters ) { reporter . start ( ) ; } } catch ( Exception e ) { stop ( ) ; throw e ; } } return reporters . size ( ) ;
public class CDATASection { /** * Meant to be called only from within the engine */ static CDATASection asEngineCDATASection ( final ICDATASection cdataSection ) { } }
if ( cdataSection instanceof CDATASection ) { return ( CDATASection ) cdataSection ; } return new CDATASection ( cdataSection . getContent ( ) , cdataSection . getTemplateName ( ) , cdataSection . getLine ( ) , cdataSection . getCol ( ) ) ;
public class QueryParameterValue { /** * Creates a { @ code QueryParameterValue } object with a type of ARRAY the given array element type . */ public static < T > QueryParameterValue array ( T [ ] array , StandardSQLTypeName type ) { } }
List < QueryParameterValue > listValues = new ArrayList < > ( ) ; for ( T obj : array ) { listValues . add ( QueryParameterValue . of ( obj , type ) ) ; } return QueryParameterValue . newBuilder ( ) . setArrayValues ( listValues ) . setType ( StandardSQLTypeName . ARRAY ) . setArrayType ( type ) . build ( ) ;
public class Values { /** * Retrieve values . */ @ Override @ Path ( "/{ownerType}/{ownerId}" ) @ ApiOperation ( value = "Retrieve values for an ownerType and ownerId" , notes = "Response is a generic JSON object with names/values." ) public JSONObject get ( String path , Map < String , String > headers ) throws Servic...
Map < String , String > parameters = getParameters ( headers ) ; String ownerType = getSegment ( path , 1 ) ; if ( ownerType == null ) // fall back to parameter ownerType = parameters . get ( "ownerType" ) ; if ( ownerType == null ) throw new ServiceException ( "Missing path segment: {ownerType}" ) ; String ownerId = g...
public class QueryParameters { /** * When called the first time , all ids are added to the filter . * When called two or more times , the provided id ' s are and ' ed with the those provided in the previous lists . * @ param ids The ids of the elements that should be searched in this query . */ public void addIds (...
if ( this . ids == null ) { this . ids = new ArrayList < > ( ids ) ; } else { this . ids . retainAll ( ids ) ; if ( this . ids . isEmpty ( ) ) { LOGGER . warn ( "No ids remain after addIds. All elements will be filtered out." ) ; } }
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link AttributeDesignatorType } { @ code > } } */ @ XmlElementDecl ( namespace = "urn:oasis:names:tc:xacml:2.0:policy:schema:os" , name = "ResourceAttributeDesignator" , substitutionHeadNamespace = "urn:oasis:names:tc:xacml:...
return new JAXBElement < AttributeDesignatorType > ( _ResourceAttributeDesignator_QNAME , AttributeDesignatorType . class , null , value ) ;
public class QueryParameterValue { /** * Creates a { @ code QueryParameterValue } object with a type of ARRAY , and an array element type * based on the given class . */ public static < T > QueryParameterValue array ( T [ ] array , Class < T > clazz ) { } }
return array ( array , classToType ( clazz ) ) ;
public class ReplyFactory { /** * Adds a Receipt Template to the response . * @ param recipientName * the recipient ' s name . * @ param orderNumber * the order number . Must be unique for each user . * @ param currency * the currency for the price . It can ' t be empty . The currency * must be a three di...
return new ReceiptTemplateBuilder ( recipientName , orderNumber , currency , paymentMethod ) ;
public class VectorMath { /** * Adds two { @ code Vector } s with some scalar weight for each { @ code Vector } . * @ param vector1 The vector values should be added to . * @ param weight1 The weight of values in { @ code vector1} * @ param vector2 The vector values that should be added to { @ code vector1} * @...
if ( vector2 . length ( ) != vector1 . length ( ) ) throw new IllegalArgumentException ( "Vectors of different sizes cannot be added" ) ; int length = vector2 . length ( ) ; for ( int i = 0 ; i < length ; ++ i ) { double value = vector1 . getValue ( i ) . doubleValue ( ) * weight1 + vector2 . getValue ( i ) . doubleVal...
public class RedundentExprEliminator { /** * Assert that the expression is a LocPathIterator , and , if * not , try to give some diagnostic info . */ private final void assertIsLocPathIterator ( Expression expr1 , ExpressionOwner eo ) throws RuntimeException { } }
if ( ! ( expr1 instanceof LocPathIterator ) ) { String errMsg ; if ( expr1 instanceof Variable ) { errMsg = "Programmer's assertion: expr1 not an iterator: " + ( ( Variable ) expr1 ) . getQName ( ) ; } else { errMsg = "Programmer's assertion: expr1 not an iterator: " + expr1 . getClass ( ) . getName ( ) ; } throw new R...
public class HttpOutboundLink { /** * Query whether this outbound link is still actively connected to the * target host . If this returns true , then the link is expected to be * still valid for continued use . If this returns false , then the * connection is inactive and the caller must close down the connection...
// if we haven ' t fully read the incoming message then this // connection should still be valid if ( ! this . myInterface . isIncomingMessageFullyRead ( ) ) { return true ; } try { // if the immediate TCP read works then this connection is // still connected if ( null == this . myInterface . getTSC ( ) . getReadInterf...
public class KeyUtil { /** * 读取Certification文件 < br > * Certification为证书文件 < br > * see : http : / / snowolf . iteye . com / blog / 391931 * @ param type 类型 , 例如X . 509 * @ param in { @ link InputStream } 如果想从文件读取 . cer文件 , 使用 { @ link FileUtil # getInputStream ( java . io . File ) } 读取 * @ param password 密码 ...
final KeyStore keyStore = readKeyStore ( type , in , password ) ; try { return keyStore . getCertificate ( alias ) ; } catch ( KeyStoreException e ) { throw new CryptoException ( e ) ; }
public class CleverTapAPI { /** * If you want to stop recorded events from being sent to the server , use this method to set the SDK instance to offline . * Once offline , events will be recorded and queued locally but will not be sent to the server until offline is disabled . * Calling this method again with offli...
"unused" , "WeakerAccess" } ) public void setOffline ( boolean value ) { offline = value ; if ( offline ) { getConfigLogger ( ) . debug ( getAccountId ( ) , "CleverTap Instance has been set to offline, won't send events queue" ) ; } else { getConfigLogger ( ) . debug ( getAccountId ( ) , "CleverTap Instance has been se...
public class ServerCache { /** * Declarative Services method to activate this component . Best practice : this should be a protected method , not * public or private * @ param context * context for this component */ @ Activate protected void activate ( ComponentContext context ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "activate" , context ) ;
public class PiwikRequest { /** * Set a stored parameter that is a boolean . This value will be stored as " 1" * for true and " 0 " for false . * @ param key the parameter ' s key * @ param value the parameter ' s value . Removes the parameter if null */ private void setBooleanParameter ( String key , Boolean val...
if ( value == null ) { parameters . remove ( key ) ; } else if ( value ) { parameters . put ( key , 1 ) ; } else { parameters . put ( key , 0 ) ; }
public class SetupUtil { /** * check a list of bundles ( symbolic name , version ) for the right version and active state * @ param ctx the package install context * @ param bundlesToCheck the ' list ' to check ; key : symbolic name , value : version * @ param waitToStartSeconds the seconds to wait to check start...
try { // wait to give the bundle installer a chance to install bundles Thread . sleep ( waitToStartSeconds * 1000 ) ; } catch ( InterruptedException ignore ) { } LOG . info ( "Check bundles..." ) ; BundleContext bundleContext = FrameworkUtil . getBundle ( ctx . getSession ( ) . getClass ( ) ) . getBundleContext ( ) ; i...
public class JarScanner { /** * Scans the specified jars for packages and returns a list of all packages found in that jar . The scanner makes no * distinction between packages and folders . * @ return a collection of all package names found in the jar */ public Collection < String > scanPackages ( ) { } }
return scanJar ( p -> Files . isDirectory ( p ) && ! isIgnored ( p . toAbsolutePath ( ) ) ) ;
public class DocBookXMLPreProcessor { /** * Insert a itemized list into the start of the topic , below the title with any PREVIOUS relationships that exists for the * Spec Topic . The title for the list is set to " Previous Step ( s ) in < TOPIC _ PARENT _ NAME > " . * @ param topic The topic to process the injecti...
if ( topic . getPrevTopicRelationships ( ) . isEmpty ( ) ) return ; // Get the title element so that it can be used later to add the prev topic node Element titleEle = null ; final NodeList titleList = doc . getDocumentElement ( ) . getElementsByTagName ( "title" ) ; for ( int i = 0 ; i < titleList . getLength ( ) ; i ...
public class GVRSceneObject { /** * Visits all the components attached to * the descendants of this scene object . * The ComponentVisitor . visit function is called for every * component of each descendant until it returns false . * This allows you to traverse the scene graph safely without copying it . * Thi...
synchronized ( mComponents ) { for ( GVRComponent comp : mComponents . values ( ) ) { if ( ! visitor . visit ( comp ) ) { return ; } } } synchronized ( mChildren ) { for ( int i = 0 ; i < mChildren . size ( ) ; ++ i ) { GVRSceneObject child = mChildren . get ( i ) ; child . forAllComponents ( visitor ) ; } }
public class ExecutorUtil { /** * 执行自动生成的 count 查询 * @ param dialect * @ param executor * @ param countMs * @ param parameter * @ param boundSql * @ param rowBounds * @ param resultHandler * @ return * @ throws SQLException */ public static Long executeAutoCount ( Dialect dialect , Executor executor ,...
Map < String , Object > additionalParameters = getAdditionalParameter ( boundSql ) ; // 创建 count 查询的缓存 key CacheKey countKey = executor . createCacheKey ( countMs , parameter , RowBounds . DEFAULT , boundSql ) ; // 调用方言获取 count sql String countSql = dialect . getCountSql ( countMs , boundSql , parameter , rowBounds , c...
public class Split { /** * Gets the value of the flows property . * This accessor method returns a reference to the live list , * not a snapshot . Therefore any modification you make to the * returned list will be present inside the JAXB object . * This is why there is not a < CODE > set < / CODE > method for t...
if ( flows == null ) { flows = new ArrayList < Flow > ( ) ; } return this . flows ;
public class PersonGroupsImpl { /** * Create a new person group with specified personGroupId , name and user - provided userData . * @ param personGroupId Id referencing a particular person group . * @ param createOptionalParameter the object representing the optional parameters to be set before calling this API ...
createWithServiceResponseAsync ( personGroupId , createOptionalParameter ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CommerceWarehousePersistenceImpl { /** * Returns the first commerce warehouse in the ordered set where groupId = & # 63 ; and commerceCountryId = & # 63 ; and primary = & # 63 ; . * @ param groupId the group ID * @ param commerceCountryId the commerce country ID * @ param primary the primary * @ pa...
CommerceWarehouse commerceWarehouse = fetchByG_C_P_First ( groupId , commerceCountryId , primary , orderByComparator ) ; if ( commerceWarehouse != null ) { return commerceWarehouse ; } StringBundler msg = new StringBundler ( 8 ) ; msg . append ( _NO_SUCH_ENTITY_WITH_KEY ) ; msg . append ( "groupId=" ) ; msg . append ( ...