signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class SDVariable { /** * See { @ link # std ( String , boolean , boolean , int . . . ) } */ public SDVariable std ( String name , boolean biasCorrected , int ... dimensions ) { } }
return sameDiff . standardDeviation ( name , this , biasCorrected , dimensions ) ;
public class Router { /** * in CBL _ Router + Handlers . m * - ( CBLStatus ) update : ( CBLDatabase * ) db * docID : ( NSString * ) docID * body : ( CBL _ Body * ) body * deleting : ( BOOL ) deleting * error : ( NSError * * ) outError */ private Status update ( Database _db , String docID , Body body , boolea...
Status status = new Status ( ) ; if ( docID != null && docID . isEmpty ( ) == false ) { // On PUT / DELETE , get revision ID from either ? rev = query or doc body : String revParam = getQuery ( "rev" ) ; String ifMatch = getRequestHeaderValue ( "If-Match" ) ; if ( ifMatch != null ) { if ( revParam == null ) revParam = ...
public class JobHistory { /** * Parse a single line of history . * @ param line * @ param l * @ throws IOException */ private static void parseLine ( String line , Listener l , boolean isEscaped ) throws IOException { } }
// extract the record type int idx = line . indexOf ( ' ' ) ; String recType = line . substring ( 0 , idx ) ; String data = line . substring ( idx + 1 , line . length ( ) ) ; Matcher matcher = pattern . matcher ( data ) ; Map < Keys , String > parseBuffer = new HashMap < Keys , String > ( ) ; while ( matcher . find ( )...
public class AbstractModule { /** * Registers a controller component with the module . The name of the * component is derived from the class name , e . g . * < pre > * / / Derived name is " com . example . MyController " . * controller ( com . example . MyController . class ) ; * < / pre > * @ param klass C...
String name = klass . getName ( ) ; JSClosure constructor = JSClosure . create ( new DefaultControllerConstructor < C > ( name , klass ) ) ; ControllerDependencyInspector inspector = GWT . create ( ControllerDependencyInspector . class ) ; JSArray < String > dependencies = JSArray . create ( inspector . inspect ( klass...
public class Shape { /** * Fills the Shape using the passed attributes . * This method will silently also fill the Shape to its unique rgb color if the context is a buffer . * @ param context * @ param attr */ protected boolean fill ( final Context2D context , final Attributes attr , double alpha ) { } }
final boolean filled = attr . hasFill ( ) ; if ( ( filled ) || ( attr . isFillShapeForSelection ( ) ) ) { alpha = alpha * attr . getFillAlpha ( ) ; if ( alpha <= 0 ) { return false ; } if ( context . isSelection ( ) ) { final String color = getColorKey ( ) ; if ( null == color ) { return false ; } context . save ( ) ; ...
public class ListRegexPatternSetsResult { /** * An array of < a > RegexPatternSetSummary < / a > objects . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setRegexPatternSets ( java . util . Collection ) } or { @ link # withRegexPatternSets ( java . util . Co...
if ( this . regexPatternSets == null ) { setRegexPatternSets ( new java . util . ArrayList < RegexPatternSetSummary > ( regexPatternSets . length ) ) ; } for ( RegexPatternSetSummary ele : regexPatternSets ) { this . regexPatternSets . add ( ele ) ; } return this ;
public class AbstractCommand { /** * Returns the defaultFaceDescriptor . Creates one if needed . */ private CommandFaceDescriptor getOrCreateFaceDescriptor ( ) { } }
if ( ! isFaceConfigured ( ) ) { if ( logger . isInfoEnabled ( ) ) { logger . info ( "Lazily instantiating default face descriptor on behalf of caller to prevent npe; " + "command is being configured manually, right?" ) ; } if ( ValkyrieRepository . isCurrentlyRunningInContext ( ) ) { ValkyrieRepository . getInstance ( ...
public class CmsSetupBean { /** * Returns the key of the selected database server ( e . g . " mysql " , " generic " or " oracle " ) . < p > * @ return the key of the selected database server ( e . g . " mysql " , " generic " or " oracle " ) */ public String getDatabase ( ) { } }
if ( m_databaseKey == null ) { m_databaseKey = getExtProperty ( "db.name" ) ; } if ( CmsStringUtil . isEmpty ( m_databaseKey ) ) { m_databaseKey = getSortedDatabases ( ) . get ( 0 ) ; } return m_databaseKey ;
public class ParsePackage { /** * Method getProcessName . The process name is normally enclosed in quotes * but it might be omitted in which case we generate a unique one . * @ return String * @ throws ParserException */ private String getProcessName ( ProcessTextProvider textProvider ) { } }
if ( ! quotedString ( '"' , textProvider ) ) { return "P" + ( textProvider . incrementProcessCount ( ) ) ; } if ( textProvider . getLastToken ( ) . contains ( "_" ) ) { throw new ParserException ( "Process names nust not include underbar: " + textProvider . getLastToken ( ) ) ; } return textProvider . getLastToken ( ) ...
public class DictionaryMaker { /** * 从磁盘加载 * @ param path * @ return */ public static DictionaryMaker load ( String path ) { } }
DictionaryMaker dictionaryMaker = new DictionaryMaker ( ) ; dictionaryMaker . addAll ( DictionaryMaker . loadAsItemList ( path ) ) ; return dictionaryMaker ;
public class ClustersInner { /** * Gets information about a Cluster . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param workspaceName The name of the workspace . Workspace names can only contain a combination of alphanumeric characters along with dash ( - ) and undersc...
return getWithServiceResponseAsync ( resourceGroupName , workspaceName , clusterName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class FieldMarshaller { /** * Marshall the given parameter object . */ public void marshall ( Field field , ProtocolMarshaller protocolMarshaller ) { } }
if ( field == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( field . getKey ( ) , KEY_BINDING ) ; protocolMarshaller . marshall ( field . getStringValue ( ) , STRINGVALUE_BINDING ) ; protocolMarshaller . marshall ( field . getRefValue ( ) ,...
public class CompareFacesResult { /** * An array of faces in the target image that did not match the source image face . * @ param unmatchedFaces * An array of faces in the target image that did not match the source image face . */ public void setUnmatchedFaces ( java . util . Collection < ComparedFace > unmatchedF...
if ( unmatchedFaces == null ) { this . unmatchedFaces = null ; return ; } this . unmatchedFaces = new java . util . ArrayList < ComparedFace > ( unmatchedFaces ) ;
public class Get { /** * Retrieves the rows in the element . If the element isn ' t present or a * table , a null value will be returned . The rows will be returned in one element * and they can be iterated through , or selecting using the ` setMatch ` method * @ return List : a list of the table rows as WebEleme...
if ( ! element . is ( ) . present ( ) ) { return null ; // returning an empty array could be confused with no rows } if ( ! element . is ( ) . table ( ) ) { return null ; // returning an empty array could be confused with no rows } return element . findChild ( app . newElement ( Locator . TAGNAME , "tr" ) ) ;
public class JsIterables { /** * Given a type , if it is an iterable or async iterable , will return its template . If not a * subtype of Iterable | AsyncIterable , returns an object that has no match , and will indicate the * mismatch . e . g . both { @ code number } and { @ code number | Iterable } are not subtyp...
List < JSType > templatedTypes = new ArrayList < > ( ) ; // Note : we don ' t just use JSType . autobox ( ) here because that removes null and undefined . // We want to keep null and undefined around because they should cause a mismatch . if ( type . isUnionType ( ) ) { for ( JSType alt : type . toMaybeUnionType ( ) . ...
public class Solo { /** * Waits for a View matching the specified class . * @ param viewClass the { @ link View } class to wait for * @ param minimumNumberOfMatches the minimum number of matches that are expected to be found . { @ code 0 } means any number of matches * @ param timeout the amount of time in millis...
if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "waitForView(" + viewClass + ", " + minimumNumberOfMatches + ", " + timeout + ")" ) ; } int index = minimumNumberOfMatches - 1 ; if ( index < 1 ) index = 0 ; return waiter . waitForView ( viewClass , index , timeout , true ) ;
public class ComponentDisplayable { /** * Remove displayable and its layer . * @ param layer The layer index . * @ param displayable The displayable to remove . */ private void remove ( Integer layer , Displayable displayable ) { } }
final Collection < Displayable > displayables = getLayer ( layer ) ; displayables . remove ( displayable ) ; if ( displayables . isEmpty ( ) ) { indexs . remove ( layer ) ; }
public class UriComponentEncoder { /** * Encodes an HTTP URI Path . * @ param path * @ return * @ throws NullPointerException */ public static String encodePath ( String path ) throws NullPointerException { } }
return new String ( encode ( path , UriComponentEncoderBitSets . allowed_abs_path ) ) ;
public class DeadboltAnalyzer { /** * Check the pattern for equality against the { @ link Permission } s of the user . * @ param subjectOption an option for the subject * @ param patternValueOption an option for the pattern value * @ return true iff the pattern is equal to at least one of the subject ' s permissi...
final boolean [ ] roleOk = { false } ; subjectOption . ifPresent ( subject -> patternValueOption . ifPresent ( patternValue -> { final List < ? extends Permission > permissions = subject . getPermissions ( ) ; if ( permissions != null ) { for ( Iterator < ? extends Permission > iterator = permissions . iterator ( ) ; !...
public class ClientCookieEncoder { /** * Encodes the specified cookie into a Cookie header value . * @ param name the cookie name * @ param value the cookie value * @ return a Rfc6265 style Cookie header value */ @ Deprecated public static String encode ( String name , String value ) { } }
return io . netty . handler . codec . http . cookie . ClientCookieEncoder . LAX . encode ( name , value ) ;
public class DatabasesInner { /** * Remove Database principals permissions . * @ param resourceGroupName The name of the resource group containing the Kusto cluster . * @ param clusterName The name of the Kusto cluster . * @ param databaseName The name of the database in the Kusto cluster . * @ throws IllegalAr...
return removePrincipalsWithServiceResponseAsync ( resourceGroupName , clusterName , databaseName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class Jar { /** * Adds a class entry to this JAR . * @ param clazz the class to add to the JAR . * @ return { @ code this } */ public Jar addClass ( Class < ? > clazz ) throws IOException { } }
final String resource = clazz . getName ( ) . replace ( '.' , '/' ) + ".class" ; return addEntry ( resource , clazz . getClassLoader ( ) . getResourceAsStream ( resource ) ) ;
public class StorageSnippets { /** * [ VARIABLE " my _ unique _ bucket " ] */ public Acl updateBucketAcl ( String bucketName ) { } }
// [ START updateBucketAcl ] Acl acl = storage . updateAcl ( bucketName , Acl . of ( User . ofAllAuthenticatedUsers ( ) , Role . OWNER ) ) ; // [ END updateBucketAcl ] return acl ;
public class SystemSecurityContext { /** * Exception squid : S2221 - Callable declares Exception */ @ SuppressWarnings ( "squid:S2221" ) public < T > T runAsSystem ( final Callable < T > callable ) { } }
return runAsSystemAsTenant ( callable , tenantAware . getCurrentTenant ( ) ) ;
public class MessageTemplate { /** * Build and get message as a string * @ return String the final message */ public String build ( ) { } }
this . message_string = "{" ; if ( this . recipient_id != null ) { this . message_string += "\"recipient\": {\"id\": \"" + this . recipient_id + "\"}," ; } if ( ( this . message_text != null ) || ( ! this . message_attachment . isEmpty ( ) ) || ( ! this . message_quick_replies . isEmpty ( ) ) || ( this . message_metada...
public class Parser { /** * Converts digit at position { @ code pos } in string { @ code s } to integer or throws . * @ param s input string * @ param pos position ( 0 - based ) * @ return integer value of a digit at position pos * @ throws NumberFormatException if character at position pos is not an integer */...
int c = s . charAt ( pos ) - '0' ; if ( c < 0 || c > 9 ) { throw new NumberFormatException ( "Input string: \"" + s + "\", position: " + pos ) ; } return c ;
public class EditScript { /** * Adds a change to the edit script . * @ param paramChange * { @ link Diff } reference * @ return the change */ public Diff add ( final Diff paramChange ) { } }
assert paramChange != null ; final ITreeData item = paramChange . getDiff ( ) == EDiff . DELETED ? paramChange . getOldNode ( ) : paramChange . getNewNode ( ) ; if ( mChangeByNode . containsKey ( item ) ) { return paramChange ; } mChanges . add ( paramChange ) ; return mChangeByNode . put ( item , paramChange ) ;
public class MtasTokenizerFactory { /** * Creates the . * @ param configuration the configuration * @ return the mtas tokenizer * @ throws IOException Signals that an I / O exception has occurred . */ public MtasTokenizer create ( String configuration , String defaultConfiguration ) throws IOException { } }
return create ( TokenStream . DEFAULT_TOKEN_ATTRIBUTE_FACTORY , configuration , defaultConfiguration ) ;
public class MPDAdmin { /** * Sends the appropriate { @ link MPDChangeEvent } to all registered * { @ link MPDChangeListener } s . * @ param event the { @ link MPDChangeEvent . Event } to send */ protected synchronized void fireMPDChangeEvent ( MPDChangeEvent . Event event ) { } }
MPDChangeEvent mce = new MPDChangeEvent ( this , event ) ; for ( MPDChangeListener mcl : listeners ) { mcl . mpdChanged ( mce ) ; }
public class BaseRTMPClientHandler { /** * Creates the default connection parameters collection . Many implementations of this handler will create a tcUrl if not found , it is * created with the current server url . * @ param server * the server location * @ param port * the port for the protocol * @ param ...
Map < String , Object > params = new ObjectMap < > ( ) ; params . put ( "app" , application ) ; params . put ( "objectEncoding" , Integer . valueOf ( 0 ) ) ; params . put ( "fpad" , Boolean . FALSE ) ; params . put ( "flashVer" , "WIN 11,2,202,235" ) ; params . put ( "audioCodecs" , Integer . valueOf ( 3575 ) ) ; param...
public class DwgObject { /** * Reads the header of an object in a DWG file Version 15 * @ param data Array of unsigned bytes obtained from the DWG binary file * @ param offset The current bit offset where the value begins * @ return int New offset * @ throws Exception If an unexpected bit value is found in the ...
int bitPos = offset ; Integer mode = ( Integer ) DwgUtil . getBits ( data , 2 , bitPos ) ; bitPos = bitPos + 2 ; setMode ( mode . intValue ( ) ) ; Vector v = DwgUtil . getBitLong ( data , bitPos ) ; bitPos = ( ( Integer ) v . get ( 0 ) ) . intValue ( ) ; int rnum = ( ( Integer ) v . get ( 1 ) ) . intValue ( ) ; setNumR...
public class CSSCompressor { /** * Get the rewritten version of the passed CSS code . This is done by * interpreting the CSS and than writing it again with the passed settings . * This can e . g . be used to create a compressed version of a CSS . * @ param sOriginalCSS * The original CSS code to be compressed ....
ValueEnforcer . notNull ( sOriginalCSS , "OriginalCSS" ) ; ValueEnforcer . notNull ( aSettings , "Settings" ) ; final CascadingStyleSheet aCSS = CSSReader . readFromString ( sOriginalCSS , aSettings . getVersion ( ) ) ; if ( aCSS != null ) { try { return new CSSWriter ( aSettings ) . getCSSAsString ( aCSS ) ; } catch (...
public class PageFlowController { /** * Store information about recent pages displayed . This is a framework - invoked method that should not normally be * called directly . */ public void savePreviousPageInfo ( ActionForward forward , ActionForm form , ActionMapping mapping , HttpServletRequest request , ServletCont...
if ( forward != null ) { // If previous - page is disabled ( unused in this pageflow ) , or if we ' ve already saved prevous - page info in // this request ( for example , forward to foo . faces which forwards to foo . jsp ) , just return . if ( request . getAttribute ( SAVED_PREVIOUS_PAGE_INFO_ATTR ) != null || isPrev...
public class GuidCompressor { /** * Converts a compressed String representation of a GUID into an uncompressed one * @ param compressedString the String representation which gets uncompressed * @ return the uncompressed String representation * @ throws InvalidGuidException */ public static String uncompressGuidSt...
Guid guid = new Guid ( ) ; getGuidFromCompressedString ( compressedString , guid ) ; return getUncompressedStringFromGuid ( guid ) ;
public class IdentifierValidator { /** * Check persisted job instance id and throw exception if any ids violate * batch id rule : Cannot be < = 0 */ public static void validatePersistedJobInstanceIds ( JobInstanceEntity instance ) throws PersistenceException { } }
if ( instance . getInstanceId ( ) <= 0 ) { long id = instance . getInstanceId ( ) ; PersistenceException e = new PersistenceException ( new BatchIllegalIDPersistedException ( Long . toString ( id ) ) ) ; logger . log ( Level . SEVERE , "error.invalid.persisted.job.id" , new Object [ ] { Long . toString ( id ) , e } ) ;...
public class FieldData { /** * Add this field in the Record ' s field sequence . */ public BaseField setupField ( int iFieldSeq ) { } }
BaseField field = null ; if ( iFieldSeq == 0 ) { field = new CounterField ( this , ID , Constants . DEFAULT_FIELD_LENGTH , null , null ) ; field . setHidden ( true ) ; } // if ( iFieldSeq = = 1) // field = new RecordChangedField ( this , LAST _ CHANGED , Constants . DEFAULT _ FIELD _ LENGTH , null , null ) ; // field ....
public class CreateColumnFamilyStatement { /** * Column definitions */ private List < ColumnDefinition > getColumns ( CFMetaData cfm ) throws InvalidRequestException { } }
List < ColumnDefinition > columnDefs = new ArrayList < > ( columns . size ( ) ) ; for ( Map . Entry < Term , String > col : columns . entrySet ( ) ) { try { ByteBuffer columnName = cfm . comparator . asAbstractType ( ) . fromStringCQL2 ( col . getKey ( ) . getText ( ) ) ; String validatorClassName = CFPropDefs . compar...
public class SeaGlassSplitPaneUI { /** * Uninstalls the UI defaults . */ protected void uninstallDefaults ( ) { } }
SeaGlassContext context = getContext ( splitPane , ENABLED ) ; style . uninstallDefaults ( context ) ; context . dispose ( ) ; style = null ; context = getContext ( splitPane , Region . SPLIT_PANE_DIVIDER , ENABLED ) ; dividerStyle . uninstallDefaults ( context ) ; context . dispose ( ) ; dividerStyle = null ; super . ...
public class JaspiServletFilter { /** * If a JASPI provider returned request / response wrappers in the MessageInfo object then * use those wrappers instead of the original request / response objects for web request . * @ see javax . servlet . Filter # doFilter ( javax . servlet . ServletRequest , javax . servlet ....
HttpServletRequestWrapper reqestWrapper = ( HttpServletRequestWrapper ) request . getAttribute ( "com.ibm.ws.security.jaspi.servlet.request.wrapper" ) ; HttpServletResponseWrapper responseWrapper = ( HttpServletResponseWrapper ) request . getAttribute ( "com.ibm.ws.security.jaspi.servlet.response.wrapper" ) ; ServletRe...
public class JsHdrsImpl { /** * Get the next Messaging Engine that will store the message . * Javadoc description supplied by CommonMessageHeaders interface . */ public final SIBUuid8 getGuaranteedTargetMessagingEngineUUID ( ) { } }
byte [ ] b = ( byte [ ] ) getHdr2 ( ) . getField ( JsHdr2Access . GUARANTEED_SET_TARGETMEUUID ) ; if ( b != null ) return new SIBUuid8 ( b ) ; return null ;
public class DialogPlus { /** * Invoked when back button is pressed . Automatically dismiss the dialog . */ public void onBackPressed ( @ NonNull DialogPlus dialogPlus ) { } }
if ( onCancelListener != null ) { onCancelListener . onCancel ( DialogPlus . this ) ; } dismiss ( ) ;
public class Database { public static void main ( String [ ] args ) { } }
try { if ( args . length > 0 ) { if ( args [ 0 ] . equals ( "-hosts" ) ) { String [ ] hosts = ApiUtil . get_db_obj ( ) . get_device_member ( "tango/admin/*" ) ; for ( String host : hosts ) { System . out . println ( host ) ; } } } else { System . err . println ( "Parameters ?" ) ; System . err . println ( "\t-hosts: di...
public class DbEntityCache { /** * get an object from the cache * @ param type the type of the object * @ param id the id of the object * @ return the object or ' null ' if the object is not in the cache * @ throws ProcessEngineException if an object for the given id can be found but is of the wrong type . */ @...
Class < ? > cacheKey = cacheKeyMapping . getEntityCacheKey ( type ) ; CachedDbEntity cachedDbEntity = getCachedEntity ( cacheKey , id ) ; if ( cachedDbEntity != null ) { DbEntity dbEntity = cachedDbEntity . getEntity ( ) ; try { return ( T ) dbEntity ; } catch ( ClassCastException e ) { throw LOG . entityCacheLookupExc...
public class Computer { /** * Returns the transient { @ link Action } s associated with the computer . */ @ SuppressWarnings ( "deprecation" ) public List < Action > getActions ( ) { } }
List < Action > result = new ArrayList < > ( ) ; result . addAll ( super . getActions ( ) ) ; synchronized ( this ) { if ( transientActions == null ) { transientActions = TransientComputerActionFactory . createAllFor ( this ) ; } result . addAll ( transientActions ) ; } return Collections . unmodifiableList ( result ) ...
public class DITypeInfo { /** * Retrieves a character sequence representing a CSV list , in * DDL declaraion order , of the create parameters for the type . < p > * @ return a character sequence representing a CSV * list , in DDL declaraion order , of the create * parameters for the type . */ String getCreatePa...
if ( ! locale_set ) { setLocale ( Locale . getDefault ( ) ) ; } String names ; switch ( type ) { case Types . SQL_BINARY : case Types . SQL_CHAR : case Types . SQL_NCHAR : case Types . SQL_CLOB : case Types . NCLOB : case Types . SQL_VARBINARY : case Types . SQL_VARCHAR : case Types . SQL_NVARCHAR : names = "LENGTH" ; ...
public class DynaPluginRepository { /** * Loops through all the directories present inside the JNRPE plugin * directory . * @ param fDirectory * The JNRPE plugins directory * @ throws PluginConfigurationException */ public final void load ( final File fDirectory ) throws PluginConfigurationException { } }
File [ ] vFiles = fDirectory . listFiles ( ) ; if ( vFiles != null ) { for ( File f : vFiles ) { if ( f . isDirectory ( ) ) { configurePlugins ( f ) ; } } }
public class ClassUtils { /** * Get an { @ link Iterable } that can iterate over a class hierarchy in ascending ( subclass to superclass ) order , * excluding interfaces . * @ param type the type to get the class hierarchy from * @ return Iterable an Iterable over the class hierarchy of the given class * @ sinc...
return hierarchy ( type , Interfaces . EXCLUDE ) ;
public class ReflectionUtils { /** * Asserts method is not static . * @ param method to validate * @ param annotation annotation to propagate in exception message */ public static void assertNotStatic ( final Method method , Class < ? extends Annotation > annotation ) { } }
if ( Modifier . isStatic ( method . getModifiers ( ) ) ) { throw annotation == null ? MESSAGES . methodCannotBeStatic ( method ) : MESSAGES . methodCannotBeStatic2 ( method , annotation ) ; }
public class SingletonList { /** * set is implemented purely to allow the List to be sorted , not because this List should be considered mutable . */ public T set ( int index , T element ) { } }
if ( index == 0 ) { T previousElement = this . element1 ; this . element1 = element ; return previousElement ; } throw new IndexOutOfBoundsException ( "Index: " + index + ", Size: " + this . size ( ) ) ;
public class WebSocketConnectionHandler { /** * Called by implementation class once websocket connection established * at networking layer . * @ param context the websocket context */ protected final void _onConnect ( WebSocketContext context ) { } }
if ( null != connectionListener ) { connectionListener . onConnect ( context ) ; } connectionListenerManager . notifyFreeListeners ( context , false ) ; Act . eventBus ( ) . emit ( new WebSocketConnectEvent ( context ) ) ;
public class WriterSubPlanAssembler { /** * Pull a join order out of the join orders deque , compute all possible plans * for that join order , then append them to the computed plans deque . */ @ Override AbstractPlanNode nextPlan ( ) { } }
if ( ! m_generatedPlans ) { assert ( m_parsedStmt . m_joinTree != null ) ; // Clone the node to make make sure that analyze expression is called // only once on the node . JoinNode tableNode = ( JoinNode ) m_parsedStmt . m_joinTree . clone ( ) ; // Analyze join conditions tableNode . analyzeJoinExpressions ( m_parsedSt...
public class JideAbstractView { /** * Activates this view taking care of EDT issues */ public void activateView ( ) { } }
if ( SwingUtilities . isEventDispatchThread ( ) ) { ValkyrieRepository . getInstance ( ) . getApplicationConfig ( ) . windowManager ( ) . getActiveWindow ( ) . getPage ( ) . showView ( getId ( ) ) ; } else { SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { ValkyrieRepository . getInstance ( ) . g...
public class AlertPoliciesDeserializer { /** * Gson invokes this call - back method during deserialization when it encounters a field of the specified type . * @ param element The Json data being deserialized * @ param type The type of the Object to deserialize to * @ param context The JSON deserialization contex...
JsonObject obj = element . getAsJsonObject ( ) ; JsonArray policies = obj . getAsJsonArray ( "policies" ) ; List < AlertPolicy > values = new ArrayList < AlertPolicy > ( ) ; if ( policies != null && policies . isJsonArray ( ) ) { for ( JsonElement policy : policies ) values . add ( gson . fromJson ( policy , AlertPolic...
public class Configuration { /** * Sets all deprecated properties that are not currently set but have a * corresponding new property that is set . Useful for iterating the * properties when all deprecated properties for currently set properties * need to be present . */ public void setDeprecatedProperties ( ) { }...
DeprecationContext deprecations = deprecationContext . get ( ) ; Properties props = getProps ( ) ; Properties overlay = getOverlay ( ) ; for ( Map . Entry < String , DeprecatedKeyInfo > entry : deprecations . getDeprecatedKeyMap ( ) . entrySet ( ) ) { String depKey = entry . getKey ( ) ; if ( ! overlay . contains ( dep...
public class UsagesInner { /** * Fetches the usages of the vault . * @ param resourceGroupName The name of the resource group where the recovery services vault is present . * @ param vaultName The name of the recovery services vault . * @ throws IllegalArgumentException thrown if parameters fail the validation ...
if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( vaultNa...
public class Validate { /** * < p > Validate that the argument condition is { @ code false } ; otherwise throwing an exception with the specified message . This method is useful when validating according to an arbitrary boolean * expression , such as validating a primitive number or using your own custom validation e...
INSTANCE . isFalse ( expression , message , value ) ;
public class DexMaker { /** * Declares a field . * @ param flags a bitwise combination of { @ link Modifier # PUBLIC } , { @ link * Modifier # PRIVATE } , { @ link Modifier # PROTECTED } , { @ link Modifier # STATIC } , * { @ link Modifier # FINAL } , { @ link Modifier # VOLATILE } , and { @ link * Modifier # T...
TypeDeclaration typeDeclaration = getTypeDeclaration ( fieldId . declaringType ) ; if ( typeDeclaration . fields . containsKey ( fieldId ) ) { throw new IllegalStateException ( "already declared: " + fieldId ) ; } int supportedFlags = Modifier . PUBLIC | Modifier . PRIVATE | Modifier . PROTECTED | Modifier . STATIC | M...
public class Grammar { /** * Returns a symbols that can derive the empty word . Also called removable symbols */ public void addNullable ( IntBitSet result ) { } }
IntBitSet remaining ; // indexes of productions boolean modified ; int i ; int prod ; int max ; remaining = new IntBitSet ( ) ; remaining . addRange ( 0 , getProductionCount ( ) - 1 ) ; do { modified = false ; for ( prod = remaining . first ( ) ; prod != - 1 ; prod = remaining . next ( prod ) ) { if ( result . contains...
public class PlaceManager { /** * Called when we transition from having bodies in the place to not having any bodies in the * place . Some places may take this as a sign to pack it in , others may wish to stick * around . In any case , they can override this method to do their thing . */ protected void placeBecameE...
// let our delegates know what ' s up applyToDelegates ( new DelegateOp ( PlaceManagerDelegate . class ) { @ Override public void apply ( PlaceManagerDelegate delegate ) { delegate . placeBecameEmpty ( ) ; } } ) ; // Log . info ( " Place became empty " + where ( ) + " . " ) ; checkShutdownInterval ( ) ;
public class StatementBuilder { /** * exec ( ) . { expression } . endExec ( ) * @ return an expression builder */ final public ExecExpressionBuilder < T > exec ( ) { } }
final int sourceLineNumber = builder . getSourceLineNumber ( ) ; return new ExecExpressionBuilder < T > ( new ExpressionHandler < T > ( ) { public T handleExpression ( Expression e ) { return statementHandler ( ) . handleStatement ( new ExpressionStatement ( sourceLineNumber , e ) ) ; } } ) ;
public class GoogleMapShapeConverter { /** * Convert a { @ link MultiPolygon } to a { @ link MultiPolygonOptions } * @ param multiPolygon multi polygon * @ return multi polygon options */ public MultiPolygonOptions toPolygons ( MultiPolygon multiPolygon ) { } }
MultiPolygonOptions polygons = new MultiPolygonOptions ( ) ; for ( Polygon polygon : multiPolygon . getPolygons ( ) ) { PolygonOptions polygonOptions = toPolygon ( polygon ) ; polygons . add ( polygonOptions ) ; } return polygons ;
public class DefaultClusterContext { /** * Fire member removed event */ private void fireMemberRemoved ( MemberId exMember ) { } }
GL . debug ( GL . CLUSTER_LOGGER_NAME , "Firing member removed for: {}" , exMember ) ; for ( MembershipEventListener listener : membershipEventListeners ) { try { listener . memberRemoved ( exMember ) ; } catch ( Throwable e ) { GL . error ( GL . CLUSTER_LOGGER_NAME , "Error in member removed event {}" , e ) ; } }
public class VarInt { /** * Encodes the value into its minimal representation . * @ return the minimal encoded bytes of the value */ public byte [ ] encode ( ) { } }
byte [ ] bytes ; switch ( sizeOf ( value ) ) { case 1 : return new byte [ ] { ( byte ) value } ; case 3 : bytes = new byte [ 3 ] ; bytes [ 0 ] = ( byte ) 253 ; Utils . uint16ToByteArrayLE ( ( int ) value , bytes , 1 ) ; return bytes ; case 5 : bytes = new byte [ 5 ] ; bytes [ 0 ] = ( byte ) 254 ; Utils . uint32ToByteAr...
public class CollationData { /** * Finds the reordering group which contains the primary weight . * @ return the first script of the group , or - 1 if the weight is beyond the last group */ public int getGroupForPrimary ( long p ) { } }
p >>= 16 ; if ( p < scriptStarts [ 1 ] || scriptStarts [ scriptStarts . length - 1 ] <= p ) { return - 1 ; } int index = 1 ; while ( p >= scriptStarts [ index + 1 ] ) { ++ index ; } for ( int i = 0 ; i < numScripts ; ++ i ) { if ( scriptsIndex [ i ] == index ) { return i ; } } for ( int i = 0 ; i < MAX_NUM_SPECIAL_REOR...
public class TimeBaseProvider { /** * Registers the time provider with the appropriate managers . Called by the presents server at * startup . */ public static void init ( InvocationManager invmgr , RootDObjectManager omgr ) { } }
// we ' ll need these later _invmgr = invmgr ; _omgr = omgr ; // register a provider instance invmgr . registerProvider ( new TimeBaseProvider ( ) , TimeBaseMarshaller . class , GLOBAL_GROUP ) ;
public class Container { /** * The IDs of each GPU assigned to the container . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setGpuIds ( java . util . Collection ) } or { @ link # withGpuIds ( java . util . Collection ) } if you want to override the * exi...
if ( this . gpuIds == null ) { setGpuIds ( new com . amazonaws . internal . SdkInternalList < String > ( gpuIds . length ) ) ; } for ( String ele : gpuIds ) { this . gpuIds . add ( ele ) ; } return this ;
public class JPATxEmInvocation { /** * ( non - Javadoc ) * @ see javax . persistence . EntityManager # createQuery ( java . lang . String ) */ @ Override public Query createQuery ( String qlString ) { } }
try { return ivEm . createQuery ( qlString ) ; } finally { if ( ! inJTATransaction ( ) ) { ivEm . clear ( ) ; } }
public class DefaultBeanContext { /** * Find a concrete candidate for the given qualifier . * @ param beanType The bean type * @ param qualifier The qualifier * @ param throwNonUnique Whether to throw an exception if the bean is not found * @ param includeProvided Whether to include provided resolution * @ pa...
return ( Optional ) beanConcreteCandidateCache . computeIfAbsent ( new BeanKey ( beanType , qualifier ) , beanKey -> ( Optional ) findConcreteCandidateNoCache ( beanType , qualifier , throwNonUnique , includeProvided , true ) ) ;
public class RuntimeUtil { /** * 执行系统命令 , 使用系统默认编码 * @ param charset 编码 * @ param cmds 命令列表 , 每个元素代表一条命令 * @ return 执行结果 , 按行区分 * @ throws IORuntimeException IO异常 * @ since 3.1.2 */ public static List < String > execForLines ( Charset charset , String ... cmds ) throws IORuntimeException { } }
return getResultLines ( exec ( cmds ) , charset ) ;
public class Matrix4x3d { /** * Apply a mirror / reflection transformation to this matrix that reflects about the given plane * specified via the plane normal and a point on the plane . * If < code > M < / code > is < code > this < / code > matrix and < code > R < / code > the reflection matrix , * then the new m...
return reflect ( normal . x ( ) , normal . y ( ) , normal . z ( ) , point . x ( ) , point . y ( ) , point . z ( ) ) ;
public class SheetRowResourcesImpl { /** * Update rows . * It mirrors to the following Smartsheet REST API method : PUT / sheets / { sheetId } / rows * Exceptions : * IllegalArgumentException : if any argument is null * InvalidRequestException : if there is any problem with the REST API request * Authorizatio...
return this . putAndReceiveList ( "sheets/" + sheetId + "/rows" , rows , Row . class ) ;
public class ExecutorQueryServiceImpl { /** * { @ inheritDoc } */ @ Override public List < RequestInfo > getRequestsByStatus ( List < STATUS > statuses ) { } }
return getRequestsByStatus ( statuses , new QueryContext ( 0 , 100 ) ) ;
public class DefaultMultifactorAuthenticationContextValidator { /** * { @ inheritDoc } * If the authentication event is established as part trusted / device browser * such that MFA was skipped , allow for validation to execute successfully . * If authentication event did bypass MFA , let for allow for validation ...
val attributes = authentication . getAttributes ( ) ; val ctxAttr = attributes . get ( this . authenticationContextAttribute ) ; val contexts = CollectionUtils . toCollection ( ctxAttr ) ; LOGGER . trace ( "Attempting to match requested authentication context [{}] against [{}]" , requestedContext , contexts ) ; val pro...
public class NetflixConfig { /** * Create a config to be used in the Netflix Cloud . */ public static Config createConfig ( Config config ) { } }
try { // We cannot use the libraries layer as the nf - archaius2 - platform - bridge // will delegate the Config binding to archaius1 and the libraries layer // then wraps that . So anything added to the libraries layer will not get // picked up by anything injecting Config . // Instead we just create a composite where...
public class CmsUserTable { /** * Checks is it is allown for the current user to see given user . < p > * @ param user to be checked * @ return boolean * @ throws CmsException exception */ private boolean isAllowedUser ( CmsUser user ) throws CmsException { } }
if ( user . getOuFqn ( ) . startsWith ( m_cms . getRequestContext ( ) . getOuFqn ( ) ) ) { return true ; } return OpenCms . getRoleManager ( ) . getRolesOfUser ( m_cms , user . getName ( ) , m_ou , true , true , false ) . size ( ) > 0 ;
public class WebUtils { /** * True if should be shown for this filtering . * @ param user User to check * @ param userFilterSet Set of valid users * @ param poolInfo Pool info to check * @ param poolGroupFilterSet Set of valid pool groups * @ param poolInfoFilterSet Set of valid pool infos * @ return True i...
boolean showUser = false ; if ( userFilterSet . isEmpty ( ) || userFilterSet . contains ( user ) ) { showUser = true ; } return showUser && showPoolInfo ( poolInfo , poolGroupFilterSet , poolInfoFilterSet ) ;
public class NetworkWatchersInner { /** * Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given endpoint including another VM or an arbitrary remote server . * @ param resourceGroupName The name of the network watcher resource group . * @ param networkWatcherName The nam...
if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( networkWatcherName == null ) { throw new IllegalArgumentException ( "Parameter networkWatcherName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ...
public class AndroidEncryptionUtils { /** * Returns the encryption key stored on { @ link SharedPreferences } . If the key is already on memory , it doesn ' t access the file system . * You shouldn ' t call this method in the UI thread . */ private static String getBase64Key ( ) { } }
if ( base64Key == null ) { base64Key = SharedPreferencesHelper . get ( ) . loadPreference ( BASE64_KEY ) ; if ( base64Key == null ) { base64Key = generateBase64Key ( ) ; SharedPreferencesHelper . get ( ) . savePreference ( BASE64_KEY , base64Key ) ; } } return base64Key ;
public class Proxy { /** * Sets SOCKS4 proxy as default . * @ param hostName Host name on which SOCKS4 server is running . * @ param port Port on which SOCKS4 server is running . * @ param user Username to use for communications with proxy . */ public static void setDefaultProxy ( String hostName , int port , Str...
defaultProxy = new Socks4Proxy ( hostName , port , user ) ;
public class Util { /** * Returns a JavaScript representation of the character in a hex escaped * format . * @ param codePoint The code point to append . * @ param out The buffer to which the hex representation should be appended . */ private static void appendHexJavaScriptRepresentation ( int codePoint , Appenda...
if ( Character . isSupplementaryCodePoint ( codePoint ) ) { // Handle supplementary Unicode values which are not representable in // JavaScript . We deal with these by escaping them as two 4B sequences // so that they will round - trip properly when sent from Java to JavaScript // and back . char [ ] surrogates = Chara...
public class JSONParser { /** * by making HTTP POST or GET method */ public JSONObject makeHttpRequest ( String url ) throws IOException { } }
InputStream is = null ; JSONObject jObj = null ; String json = null ; // Making HTTP request try { is = new URL ( url ) . openStream ( ) ; } catch ( Exception ex ) { Log . d ( "Networking" , ex . getLocalizedMessage ( ) ) ; throw new IOException ( "Error connecting" ) ; } try { BufferedReader reader = new BufferedReade...
public class ReleaseAction { /** * Add some of the release build properties to a map . */ public void addVars ( Map < String , String > env ) { } }
if ( tagUrl != null ) { env . put ( "RELEASE_SCM_TAG" , tagUrl ) ; env . put ( RT_RELEASE_STAGING + "SCM_TAG" , tagUrl ) ; } if ( releaseBranch != null ) { env . put ( "RELEASE_SCM_BRANCH" , releaseBranch ) ; env . put ( RT_RELEASE_STAGING + "SCM_BRANCH" , releaseBranch ) ; } if ( releaseVersion != null ) { env . put (...
public class ArgumentParser { /** * Print the option usage list . Essentially printed as a list of options * with the description indented where it overflows the available line * width . * @ param out The output stream . * @ param showHidden Whether to show hidden options . */ public void printUsage ( OutputStr...
printUsage ( new PrintWriter ( new OutputStreamWriter ( out , UTF_8 ) ) , showHidden ) ;
public class SpatialAnchorsAccountsInner { /** * Updating a Spatial Anchors Account . * @ param resourceGroupName Name of an Azure resource group . * @ param spatialAnchorsAccountName Name of an Mixed Reality Spatial Anchors Account . * @ param spatialAnchorsAccount Spatial Anchors Account parameter . * @ param...
return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , spatialAnchorsAccountName , spatialAnchorsAccount ) , serviceCallback ) ;
public class MutableDoubleArrayTrieInteger { /** * 删除键 * @ param key * @ return 值 */ public int delete ( String key ) { } }
if ( key == null ) { return - 1 ; } int curState = 1 ; int [ ] ids = this . charMap . toIdList ( key ) ; int [ ] path = new int [ ids . length + 1 ] ; int i = 0 ; for ( ; i < ids . length ; i ++ ) { int c = ids [ i ] ; if ( ( getBase ( curState ) + c >= getBaseArraySize ( ) ) || ( getCheck ( getBase ( curState ) + c ) ...
public class Intersectiond { /** * Test whether the given sphere with center < code > ( sX , sY , sZ ) < / code > intersects the triangle given by its three vertices , and if they intersect * store the point of intersection into < code > result < / code > . * This method also returns whether the point of intersecti...
int closest = findClosestPointOnTriangle ( v0X , v0Y , v0Z , v1X , v1Y , v1Z , v2X , v2Y , v2Z , sX , sY , sZ , result ) ; double vX = result . x - sX , vY = result . y - sY , vZ = result . z - sZ ; double dot = vX * vX + vY * vY + vZ * vZ ; if ( dot <= sR * sR ) { return closest ; } return 0 ;
public class ProductSearchClient { /** * Formats a string containing the fully - qualified path to represent a reference _ image resource . * @ deprecated Use the { @ link ReferenceImageName } class instead . */ @ Deprecated public static final String formatReferenceImageName ( String project , String location , Stri...
return REFERENCE_IMAGE_PATH_TEMPLATE . instantiate ( "project" , project , "location" , location , "product" , product , "reference_image" , referenceImage ) ;
public class PersistentFieldFactory { private static String getDefaultPersistentFieldClassName ( ) { } }
try { PersistenceBrokerConfiguration config = ( PersistenceBrokerConfiguration ) OjbConfigurator . getInstance ( ) . getConfigurationFor ( null ) ; Class clazz = config . getPersistentFieldClass ( ) ; return clazz . getName ( ) ; } catch ( ConfigurationException e ) { log . error ( "Cannot look-up PersistentField class...
public class PrintWriter { /** * Flushes the stream if it ' s not closed and checks its error state . * @ return < code > true < / code > if the print stream has encountered an error , * either on the underlying output stream or during a format * conversion . */ public boolean checkError ( ) { } }
if ( out != null ) { flush ( ) ; } if ( out instanceof java . io . PrintWriter ) { PrintWriter pw = ( PrintWriter ) out ; return pw . checkError ( ) ; } else if ( psOut != null ) { return psOut . checkError ( ) ; } return trouble ;
public class AWSRAMClient { /** * Gets the associations for the specified resource share . * @ param getResourceShareAssociationsRequest * @ return Result of the GetResourceShareAssociations operation returned by the service . * @ throws UnknownResourceException * A specified resource was not found . * @ thro...
request = beforeClientExecution ( request ) ; return executeGetResourceShareAssociations ( request ) ;
public class TupleUtils { /** * Returns a { @ link Predicate } of { @ link Tuple7 } that wraps a predicate of the component values of the tuple * @ param predicate the component value predicate * @ param < T1 > the type of the first value * @ param < T2 > the type of the second value * @ param < T3 > the type o...
return tuple -> predicate . test ( tuple . getT1 ( ) , tuple . getT2 ( ) , tuple . getT3 ( ) , tuple . getT4 ( ) , tuple . getT5 ( ) , tuple . getT6 ( ) , tuple . getT7 ( ) ) ;
public class Links { /** * / * returns a copy of the link table */ synchronized Link [ ] links ( ) { } }
Link [ ] ret = null ; if ( count != 0 ) { ret = new Link [ count ] ; System . arraycopy ( links , 0 , ret , 0 , count ) ; } return ret ;
public class BaseBuffer { /** * { @ inheritDoc } */ @ Override public final Buffer readUntilSafe ( final int maxBytes , final byte ... bytes ) throws IOException , IllegalArgumentException { } }
final int index = indexOf ( maxBytes , bytes ) ; if ( index == - 1 ) { return null ; } final int size = index - getReaderIndex ( ) ; Buffer result = null ; if ( size == 0 ) { result = Buffers . EMPTY_BUFFER ; } else { result = readBytes ( size ) ; } readByte ( ) ; // consume the one at the index as well return result ;
public class SimpleSortField { /** * Returns the Lucene { @ link org . apache . lucene . search . SortField } representing this { @ link SortField } . * @ param schema the { @ link Schema } to be used * @ return the equivalent Lucene sort field */ @ Override public org . apache . lucene . search . SortField sortFie...
if ( field . equalsIgnoreCase ( "score" ) ) { return FIELD_SCORE ; } Mapper mapper = schema . mapper ( field ) ; if ( mapper == null ) { throw new IndexException ( "No mapper found for sortFields field '{}'" , field ) ; } else if ( ! mapper . docValues ) { throw new IndexException ( "Field '{}' does not support sorting...
public class ManagerConnectionImpl { /** * Implements synchronous sending of event generating actions . */ public ResponseEvents sendEventGeneratingAction ( EventGeneratingAction action , long timeout ) throws IOException , EventTimeoutException , IllegalArgumentException , IllegalStateException { } }
final ResponseEventsImpl responseEvents ; final ResponseEventHandler responseEventHandler ; final String internalActionId ; if ( action == null ) { throw new IllegalArgumentException ( "Unable to send action: action is null." ) ; } else if ( action . getActionCompleteEventClass ( ) == null ) { throw new IllegalArgument...
public class FilesInner { /** * Get file information . * The files resource is a nested , proxy - only resource representing a file stored under the project resource . This method retrieves information about a file . * @ param groupName Name of the resource group * @ param serviceName Name of the service * @ pa...
return getWithServiceResponseAsync ( groupName , serviceName , projectName , fileName ) . map ( new Func1 < ServiceResponse < ProjectFileInner > , ProjectFileInner > ( ) { @ Override public ProjectFileInner call ( ServiceResponse < ProjectFileInner > response ) { return response . body ( ) ; } } ) ;
public class ReviewReport { /** * A list of ReviewResults objects for each action specified in the Review Policy . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setReviewResults ( java . util . Collection ) } or { @ link # withReviewResults ( java . util . ...
if ( this . reviewResults == null ) { setReviewResults ( new java . util . ArrayList < ReviewResultDetail > ( reviewResults . length ) ) ; } for ( ReviewResultDetail ele : reviewResults ) { this . reviewResults . add ( ele ) ; } return this ;
public class RythmEngine { /** * Register { @ link org . rythmengine . extension . IFormatter formatters } * @ param formatterClasses */ public void registerFormatter ( Class < IFormatter > ... formatterClasses ) { } }
for ( Class < IFormatter > cls : formatterClasses ) { try { IFormatter fmt = cls . newInstance ( ) ; extensionManager ( ) . registerFormatter ( fmt ) ; } catch ( Exception e ) { Logger . error ( e , "Error get formatter instance from class[%s]" , cls ) ; } }
public class GroupApi { /** * Adds an LDAP group link . * < pre > < code > GitLab Endpoint : POST / groups / : id / ldap _ group _ links < / code > < / pre > * @ param groupIdOrPath the group ID , path of the group , or a Group instance holding the group ID or path * @ param cn the CN of a LDAP group * @ param ...
GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "cn" , cn , true ) . withParam ( "group_access" , groupAccess , true ) . withParam ( "provider" , provider , true ) ; post ( Response . Status . CREATED , formData , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "ldap_group_links" ) ;
public class SocketBackend { /** * send data from backend to frontend ( export data ) */ public static void receiveStream ( ObjectInputStream ois , OutputStream outputStream ) throws IOException { } }
int b ; while ( ( b = ois . read ( ) ) >= 0 ) { outputStream . write ( b ) ; } return ;