signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class OsUtils { /** * Executes the given command , redirecting stdout to the given file * and stderr to the given stream * @ param command array of commands to run * @ param file file to write stdout * @ param stderr output stream for stderr * @ return error code from system * @ throws java . io . IO...
return executeToStreams ( command , new FileOutputStream ( file ) , stderr ) ;
public class RedirectRule { /** * Sets the redirect path . * @ param path the redirect path */ public void setPath ( String path ) { } }
this . path = path ; List < Token > tokens = Tokenizer . tokenize ( path , true ) ; int tokenCount = 0 ; for ( Token t : tokens ) { if ( t . getType ( ) != TokenType . TEXT ) { tokenCount ++ ; } } if ( tokenCount > 0 ) { this . pathTokens = tokens . toArray ( new Token [ 0 ] ) ; } else { this . pathTokens = null ; }
public class Closure { /** * Support for Closure currying at a given index . * Parameters are supplied from index position " n " . * Typical usage : * < pre > * def caseInsensitive = { a , b { @ code - > } a . toLowerCase ( ) { @ code < = > } b . toLowerCase ( ) } as Comparator * def caseSensitive = { a , b {...
return new CurriedClosure < V > ( n , this , arguments ) ;
public class AnalysisScreen { /** * Just before the view prints out the screen . * This is a good time to adjust the variables or screen fields before printing . * ( Called from the view in the printScreen method ) . */ public void prePrintReport ( ) { } }
// First step - Get the source and analysis files . Record recBasis = this . getBasisRecord ( ) ; // Record to analyze Record recSummary = this . getSummaryRecord ( ) ; // Record to summarize the data into if ( recSummary == null ) recSummary = this . makeDefaultAnalysisRecord ( recBasis ) ; if ( recSummary . getCounte...
public class A_CmsImport { /** * Writes already imported access control entries for a given resource . < p > * @ param resource the resource assigned to the access control entries * @ param aceList the access control entries to create */ protected void importAccessControlEntries ( CmsResource resource , List < CmsA...
if ( aceList . size ( ) == 0 ) { // no ACE in the list return ; } try { m_cms . importAccessControlEntries ( resource , aceList ) ; } catch ( CmsException exc ) { m_report . println ( Messages . get ( ) . container ( Messages . RPT_IMPORT_ACL_DATA_FAILED_0 ) , I_CmsReport . FORMAT_WARNING ) ; }
public class FormMappingOption { public OptionalThing < Function < Map < String , Object > , Map < String , Object > > > getRequestParameterMapFilter ( ) { } }
return requestParameterMapFilter ;
public class WSManagedConnectionFactoryImpl { /** * Get the log writer for this ManagedConnectionFactory instance . * The log writer is a character output stream to which all logging and tracing * messages for this ManagedConnectionFactory instance will be printed * ApplicationServer manages the association of ou...
if ( dataSourceOrDriver == null ) { return logWriter ; } try { if ( ! Driver . class . equals ( type ) ) { return ( ( CommonDataSource ) dataSourceOrDriver ) . getLogWriter ( ) ; } // Return null for Driver since that is the default value which can ' t be modified return null ; } catch ( SQLException se ) { FFDCFilter ...
public class DateFormat { /** * Returns the current value for the specified BooleanAttribute for this instance * if attribute is missing false is returned . * @ see BooleanAttribute */ public boolean getBooleanAttribute ( BooleanAttribute key ) { } }
if ( key == DateFormat . BooleanAttribute . PARSE_PARTIAL_MATCH ) { key = DateFormat . BooleanAttribute . PARSE_PARTIAL_LITERAL_MATCH ; } return booleanAttributes . contains ( key ) ;
public class DateUtil { /** * Creates a label of the form " 9:15am " . TODO : support 24 hour time for people who go for that * sort of thing . If date is null the empty string is returned . */ public static String formatTime ( Date date ) { } }
return ( date == null ) ? "" : _tfmt . format ( date ) . toLowerCase ( ) ;
public class JobsInner { /** * List all directories and files inside the given directory of the output directory ( Only if the output directory is on Azure File Share or Azure Storage container ) . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentEx...
ServiceResponse < Page < FileInner > > response = listOutputFilesNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) ; return new PagedList < FileInner > ( response . body ( ) ) { @ Override public Page < FileInner > nextPage ( String nextPageLink ) { return listOutputFilesNextSinglePageAsync ( nextPageL...
public class AdGroupEstimateRequest { /** * Gets the keywordEstimateRequests value for this AdGroupEstimateRequest . * @ return keywordEstimateRequests * The keywords to estimate . * < span class = " constraint ContentsDistinct " > This * field must contain distinct elements . < / span > * < span class = " cons...
return keywordEstimateRequests ;
public class CmsToolBar { /** * Updates the app indicator site and project info . < p > */ public void updateAppIndicator ( ) { } }
if ( CmsAppWorkplaceUi . isOnlineProject ( ) ) { m_appIndicator . addStyleName ( OpenCmsTheme . TOOLABER_APP_INDICATOR_ONLINE ) ; } else { m_appIndicator . removeStyleName ( OpenCmsTheme . TOOLABER_APP_INDICATOR_ONLINE ) ; } CmsObject cms = A_CmsUI . getCmsObject ( ) ; String siteRoot = cms . getRequestContext ( ) . ge...
public class WalkingIterator { /** * Detaches the iterator from the set which it iterated over , releasing * any computational resources and placing the iterator in the INVALID * state . After < code > detach < / code > has been invoked , calls to * < code > nextNode < / code > or < code > previousNode < / code >...
if ( m_allowDetach ) { AxesWalker walker = m_firstWalker ; while ( null != walker ) { walker . detach ( ) ; walker = walker . getNextWalker ( ) ; } m_lastUsedWalker = null ; // Always call the superclass detach last ! super . detach ( ) ; }
public class HuobiAdapters { /** * Huobi currently doesn ' t have trade history API . We simulate it by using the orders history . * @ param order * @ return */ private static UserTrade adaptTrade ( LimitOrder order ) { } }
BigDecimal feeAmount = order . getCumulativeAmount ( ) . multiply ( order . getLimitPrice ( ) ) . multiply ( fee ) . setScale ( 8 , RoundingMode . DOWN ) ; return new UserTrade ( order . getType ( ) , order . getCumulativeAmount ( ) , order . getCurrencyPair ( ) , order . getLimitPrice ( ) , order . getTimestamp ( ) , ...
public class AmazonGameLiftClient { /** * Updates the current run - time configuration for the specified fleet , which tells Amazon GameLift how to launch * server processes on instances in the fleet . You can update a fleet ' s run - time configuration at any time after the * fleet is created ; it does not need to...
request = beforeClientExecution ( request ) ; return executeUpdateRuntimeConfiguration ( request ) ;
public class ActivityServiceLocator { /** * For the given interface , get the stub implementation . * If this service has no port for the given interface , * then ServiceException is thrown . */ public java . rmi . Remote getPort ( Class serviceEndpointInterface ) throws javax . xml . rpc . ServiceException { } }
try { if ( com . google . api . ads . admanager . axis . v201805 . ActivityServiceInterface . class . isAssignableFrom ( serviceEndpointInterface ) ) { com . google . api . ads . admanager . axis . v201805 . ActivityServiceSoapBindingStub _stub = new com . google . api . ads . admanager . axis . v201805 . ActivityServi...
public class ListAccountAliasesResult { /** * A list of aliases associated with the account . AWS supports only one alias per account . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setAccountAliases ( java . util . Collection ) } or { @ link # withAccountA...
if ( this . accountAliases == null ) { setAccountAliases ( new com . amazonaws . internal . SdkInternalList < String > ( accountAliases . length ) ) ; } for ( String ele : accountAliases ) { this . accountAliases . add ( ele ) ; } return this ;
public class DescribeRecordResult { /** * Information about the product created as the result of a request . For example , the output for a * CloudFormation - backed product that creates an S3 bucket would include the S3 bucket URL . * @ param recordOutputs * Information about the product created as the result of...
if ( recordOutputs == null ) { this . recordOutputs = null ; return ; } this . recordOutputs = new java . util . ArrayList < RecordOutput > ( recordOutputs ) ;
public class AbstractQueryBuilderFactory { /** * add parser after * @ param parser * @ param afterParser */ public void addRuleParserAfter ( IRuleParser parser , Class < ? extends IRuleParser > afterParser ) { } }
int index = getIndexOfClass ( ruleParsers , afterParser ) ; if ( index == - 1 ) { throw new ParserAddException ( "parser " + afterParser . getSimpleName ( ) + " has not been added" ) ; } ruleParsers . add ( index + 1 , parser ) ;
public class Log { /** * Simple method for logging a single information exception . */ public void info ( Throwable t ) { } }
if ( isEnabled ( ) && isInfoEnabled ( ) ) { dispatchLogException ( new LogEvent ( this , LogEvent . INFO_TYPE , t ) ) ; }
public class AbstractJacksonContext { /** * / * ( non - Javadoc ) * @ see com . abubusoft . kripton . AbstractContext # createSerializer ( java . io . OutputStream , com . fasterxml . jackson . core . JsonEncoding ) */ @ Override public JacksonWrapperSerializer createSerializer ( OutputStream out , JsonEncoding encod...
try { JsonGenerator generator = innerFactory . createGenerator ( out , encoding ) ; // generator . setPrettyPrinter ( new MinimalPrettyPrinter ( ) ) ; return new JacksonWrapperSerializer ( generator , getSupportedFormat ( ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; throw new KriptonRuntimeException ( e ...
public class POSTagger { /** * 设置词典 , 参数指定是否同时设置分词词典 * @ param dict 词典 */ public void setDictionary ( Dictionary dict , boolean isSetSegDict ) { } }
removeDictionary ( isSetSegDict ) ; if ( cws != null && isSetSegDict ) cws . setDictionary ( dict ) ; dictPipe = null ; dictPipe = new DictPOSLabel ( dict , labels ) ; oldfeaturePipe = featurePipe ; featurePipe = new SeriesPipes ( new Pipe [ ] { dictPipe , featurePipe } ) ; LinearViterbi dv = new ConstraintViterbi ( ( ...
public class Util { /** * Cancels then closes a { @ link PreparedStatement } and logs exceptions * without throwing . Does nothing if ps is null . * @ param ps */ static void closeQuietly ( PreparedStatement ps ) { } }
try { boolean isClosed ; try { if ( ps != null ) isClosed = ps . isClosed ( ) ; else isClosed = true ; } catch ( SQLException e ) { log . debug ( e . getMessage ( ) ) ; isClosed = true ; } if ( ps != null && ! isClosed ) { try { ps . cancel ( ) ; log . debug ( "cancelled {}" , ps ) ; } catch ( SQLException e ) { log . ...
public class PresenceNotifySender { /** * This method creates a NOTIFY message using the given parameters and sends it to the subscriber . * The request will be resent if challenged . Use this method only if you have previously called * processSubscribe ( ) . Use this method if you don ' t care about checking the r...
return sendNotify ( subscriptionState , termReason , body , timeLeft , null , null , null , null , viaProxy ) ;
public class CamelEndpointDeployerService { /** * Exposes an HTTP endpoint that will be served by the given { @ link HttpHandler } under the given { @ link URI } ' s path . * @ param uri determines the path and protocol under which the HTTP endpoint should be exposed * @ param routingHandler an { @ link HttpHandler...
final Set < Deployment > availableDeployments = hostSupplier . getValue ( ) . getDeployments ( ) ; if ( ! availableDeployments . stream ( ) . anyMatch ( deployment -> deployment . getHandler ( ) instanceof CamelEndpointDeployerHandler && ( ( CamelEndpointDeployerHandler ) deployment . getHandler ( ) ) . getRoutingHandl...
public class TableCellBox { /** * Set the total width of the cell . The content width is computed automatically . * @ param width the width to be set */ public void setWidth ( int width ) { } }
content . width = width - border . left - padding . left - padding . right - border . right ; bounds . width = width ; wset = true ; updateChildSizes ( ) ;
public class ExceptionUtils { /** * Converts MjdbcException into MjdbcSQLException . * Useful in cases when internal logic thrown MjdbcException during processing of Query output . * This allows for user to catch only SQLException instead of SQLException and MjdbcException * @ param cause original MjdbcException ...
MjdbcSQLException ex = new MjdbcSQLException ( cause . getMessage ( ) ) ; ex . setStackTrace ( cause . getStackTrace ( ) ) ; throw ex ;
public class StringUtil { /** * FOO _ BAR _ BAZ → fooBarBaz */ public static String camelize ( String targetStr ) { } }
if ( targetStr == null ) { return null ; } Pattern p = Pattern . compile ( "_([a-z])" ) ; Matcher m = p . matcher ( targetStr . toLowerCase ( ) ) ; StringBuffer sb = new StringBuffer ( targetStr . length ( ) ) ; while ( m . find ( ) ) { m . appendReplacement ( sb , m . group ( 1 ) . toUpperCase ( ) ) ; } m . appendTail...
public class BindDataSourceSubProcessor { /** * Analyze second round . * @ param annotations * the annotations * @ param roundEnv * the round env * @ return true , if successful */ public boolean analyzeSecondRound ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { } }
parseBindType ( roundEnv ) ; // Put all @ BindTable elements in beanElements for ( Element item : roundEnv . getElementsAnnotatedWith ( BindSqlType . class ) ) { if ( item . getKind ( ) != ElementKind . CLASS ) { String msg = String . format ( "%s %s, only class can be annotated with @%s annotation" , item . getKind ( ...
public class DictionaryMatcher { /** * Gets the substitutions for the password . * @ param password the password to get leet substitutions for . * @ param unleet _ password the password to get leet substitutions for . * @ return a { @ code List } of { @ code Character [ ] } that are the leet substitutions for the...
List < Character [ ] > leet_subs = new ArrayList < > ( ) ; for ( int i = 0 ; i < unleet_password . length ( ) ; i ++ ) { if ( password . charAt ( i ) != unleet_password . charAt ( i ) ) { leet_subs . add ( new Character [ ] { password . charAt ( i ) , unleet_password . charAt ( i ) } ) ; } } return leet_subs ;
public class ExamplePointFeatureTracker { /** * Draw tracked features in blue , or red if they were just spawned . */ private void updateGUI ( SimpleImageSequence < T > sequence ) { } }
BufferedImage orig = sequence . getGuiImage ( ) ; Graphics2D g2 = orig . createGraphics ( ) ; // draw tracks with semi - unique colors so you can track individual points with your eyes for ( PointTrack p : tracker . getActiveTracks ( null ) ) { int red = ( int ) ( 2.5 * ( p . featureId % 100 ) ) ; int green = ( int ) (...
public class ConsumerLogMessages { /** * Logs an error . * @ param logger * reference to the logger * @ param e * reference to the error */ public static void logError ( final Logger logger , final Error e ) { } }
logger . logError ( Level . ERROR , "Unexpected Error" , e ) ;
public class TableSession { /** * Move the current position and read the record ( optionally read several records ) . * @ param iRelPosition relative Position to read the next record . * @ param iRecordCount Records to read . * @ return If I read 1 record , this is the record ' s data . * @ return If I read sev...
try { synchronized ( this . getTask ( ) ) { FieldList record = this . getMainRecord ( ) . move ( iRelPosition ) ; int iRecordStatus = DBConstants . RECORD_NORMAL ; if ( record == null ) { if ( iRelPosition >= 0 ) iRecordStatus = DBConstants . RECORD_AT_EOF ; else iRecordStatus = DBConstants . RECORD_AT_BOF ; } if ( iRe...
public class BaseCommandTask { /** * { @ inheritDoc } */ @ Override public void execute ( ExecutionContext context ) { } }
try { if ( ! validateArguments ( context ) ) { return ; } if ( ! populateCommonOptions ( context ) ) { return ; } doExecute ( context ) ; } finally { cleanUp ( context ) ; }
public class UBL20ValidatorBuilder { /** * Create a new validation builder . * @ param aClass * The UBL class to be validated . May not be < code > null < / code > . * @ return The new validation builder . Never < code > null < / code > . * @ param < T > * The UBL 2.0 document implementation type */ @ Nonnull...
return new UBL20ValidatorBuilder < > ( aClass ) ;
public class HeronClient { /** * Handle the timeout for a particular REQID */ protected void handleTimeout ( REQID rid ) { } }
if ( contextMap . containsKey ( rid ) ) { Object ctx = contextMap . get ( rid ) ; contextMap . remove ( rid ) ; responseMessageMap . remove ( rid ) ; onResponse ( StatusCode . TIMEOUT_ERROR , ctx , null ) ; } else { // Since we dont do cancel timer , this is because we already have // the response . So just disregard t...
public class AppiumDriverLocalService { /** * Stops this service is it is currently running . This method will attempt to block until the * server has been fully shutdown . * @ see # start ( ) */ @ Override public void stop ( ) { } }
lock . lock ( ) ; try { if ( process != null ) { destroyProcess ( ) ; } process = null ; } finally { lock . unlock ( ) ; }
public class RowTypeInfo { /** * Creates a { @ link RowTypeInfo } with projected fields . * @ param rowType The original RowTypeInfo whose fields are projected * @ param fieldMapping The field mapping of the projection * @ return A RowTypeInfo with projected fields . */ public static RowTypeInfo projectFields ( R...
TypeInformation [ ] fieldTypes = new TypeInformation [ fieldMapping . length ] ; String [ ] fieldNames = new String [ fieldMapping . length ] ; for ( int i = 0 ; i < fieldMapping . length ; i ++ ) { fieldTypes [ i ] = rowType . getTypeAt ( fieldMapping [ i ] ) ; fieldNames [ i ] = rowType . getFieldNames ( ) [ fieldMap...
public class ClassGraph { /** * Print a class ' s relations */ public void printRelations ( ClassDoc c ) { } }
Options opt = optionProvider . getOptionsFor ( c ) ; if ( hidden ( c ) || c . name ( ) . equals ( "" ) ) // avoid phantom classes , they may pop up when the source uses annotations return ; // Print generalization ( through the Java superclass ) Type s = c . superclassType ( ) ; ClassDoc sc = s != null && ! s . qualifi...
public class ObjectType { /** * Checks that the prototype is an implicit prototype of this object . Since each object has an * implicit prototype , an implicit prototype ' s implicit prototype is also this implicit * prototype ' s . * @ param prototype any prototype based object * @ return { @ code true } if { ...
for ( ObjectType current = this ; current != null ; current = current . getImplicitPrototype ( ) ) { if ( current . isTemplatizedType ( ) ) { current = current . toMaybeTemplatizedType ( ) . getReferencedType ( ) ; } current = deeplyUnwrap ( current ) ; // The prototype should match exactly . // NOTE : the use of " = =...
public class A_CmsStaticExportHandler { /** * Add the link sources of moved resources to the list of published resources . < p > * @ param cms the cms context * @ param publishedResources the published resources * @ return the list of published resources included the link sources of moved resources */ protected L...
long timer = System . currentTimeMillis ( ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( Messages . get ( ) . getBundle ( ) . key ( Messages . LOG_SCRUB_EXPORT_START_MOVED_SOURCES_0 ) ) ; } publishedResources = new ArrayList < CmsPublishedResource > ( publishedResources ) ; Set < String > pubResources = new HashSe...
public class CommonDatabaseMetaData { /** * Retrieves a description of the given catalog ' s system or user function parameters and return type . * < P > Only descriptions matching the schema , function and parameter name criteria are returned . They are ordered by * < code > FUNCTION _ CAT < / code > , < code > FU...
throw SQLExceptionMapper . getSQLException ( "uh7" ) ;
public class BitZTradeServiceRaw { /** * 取消委托单 * @ param entrustSheetId * @ return * @ throws IOException */ public BitZTradeCancelResult cancelEntrustSheet ( String entrustSheetId ) throws IOException { } }
return bitz . cancelEntrustSheet ( apiKey , getTimeStamp ( ) , nonce , signer , entrustSheetId ) ;
public class Ifc4FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcStructuralSurfaceMemberTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class XDMClientChildSbb { /** * ( non - Javadoc ) * @ see javax . slee . Sbb # setSbbContext ( javax . slee . SbbContext ) */ public void setSbbContext ( SbbContext sbbContext ) { } }
this . sbbContext = ( SbbContextExt ) sbbContext ; if ( tracer == null ) { tracer = sbbContext . getTracer ( XDMClientChildSbb . class . getSimpleName ( ) ) ; } try { Context context = ( Context ) new InitialContext ( ) . lookup ( "java:comp/env" ) ; xcapClientSbbInterface = ( XCAPClientResourceAdaptorSbbInterface ) co...
public class DataSet { /** * Inserts the currently contained data objects into the database . * @ param platform The ( connected ) database platform for inserting data * @ param model The database model * @ param batchSize The batch size ; use 1 for not using batch mode */ public void insert ( Platform platform ,...
if ( batchSize <= 1 ) { for ( Iterator it = _beans . iterator ( ) ; it . hasNext ( ) ; ) { platform . insert ( model , ( DynaBean ) it . next ( ) ) ; } } else { for ( int startIdx = 0 ; startIdx < _beans . size ( ) ; startIdx += batchSize ) { platform . insert ( model , _beans . subList ( startIdx , startIdx + batchSiz...
public class InstanceGroup { /** * A list of configurations that were successfully applied for an instance group last time . * @ return A list of configurations that were successfully applied for an instance group last time . */ public java . util . List < Configuration > getLastSuccessfullyAppliedConfigurations ( ) ...
if ( lastSuccessfullyAppliedConfigurations == null ) { lastSuccessfullyAppliedConfigurations = new com . amazonaws . internal . SdkInternalList < Configuration > ( ) ; } return lastSuccessfullyAppliedConfigurations ;
public class DeleteEvaluationRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteEvaluationRequest deleteEvaluationRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteEvaluationRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteEvaluationRequest . getEvaluationId ( ) , EVALUATIONID_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to ...
public class RemoteServiceProxy { /** * Returns a { @ link com . google . gwt . user . client . rpc . SerializationStreamWriter * SerializationStreamWriter } that has had * { @ link ClientSerializationStreamWriter # prepareToWrite ( ) } called on it and * it has already had had the name of the remote service inte...
ClientSerializationStreamWriter clientSerializationStreamWriter = new ClientSerializationStreamWriter ( serializer , moduleBaseURL , serializationPolicyName ) ; clientSerializationStreamWriter . prepareToWrite ( ) ; return clientSerializationStreamWriter ;
public class FileSystem { /** * The src file is on the local disk . Add it to FS at * the given dst name . * delSrc indicates if the source should be removed */ @ Deprecated public void copyFromLocalFile ( boolean delSrc , boolean overwrite , Path src , Path dst ) throws IOException { } }
copyFromLocalFile ( delSrc , overwrite , false , src , dst ) ;
public class SelectableVirtualCircuit { /** * Start virtual circuit * @ param executorFactory * @ throws IOException */ @ Override public void start ( Supplier < ExecutorService > executorFactory ) throws IOException { } }
future = executorFactory . get ( ) . submit ( this ) ;
public class QueryBuilder { /** * Sets a named parameter . If name is null throws a * { @ link NullPointerException } . If value is instance of Observable then * throws an { @ link IllegalArgumentException } . * @ param name * the parameter name . Cannot be null . * @ param value * the parameter value */ vo...
Preconditions . checkNotNull ( name , "parameter name cannot be null" ) ; if ( value instanceof Observable ) throw new IllegalArgumentException ( "use parameters() method not the parameter() method for an Observable" ) ; this . parameters = parameters . concatWith ( Observable . just ( new Parameter ( name , value ) ) ...
public class JSONArray { /** * Put or replace a long value . If the index is greater than the length of * the JSONArray , then null elements will be added as necessary to pad * it out . * @ param index The subscript . * @ param value A long value . * @ return this * @ throws JSONException If the index is ne...
put ( index , Long . valueOf ( value ) ) ; return this ;
public class ConditionDateFormatterFactory { /** * 日時の書式かどうか判定する 。 * @ param store * @ return */ public boolean isDatePattern ( final TokenStore store ) { } }
if ( store . containsInFactor ( "General" ) ) { return false ; } if ( store . containsAnyInFactorIgnoreCase ( DATE_DECISTION_CHARS ) ) { return true ; } // [ h ] [ m ] [ s ] の形式のチェック for ( Token token : store . getTokens ( ) ) { if ( ! ( token instanceof Token . Condition ) ) { continue ; } final Token . Condition cond...
public class ClusterHeartbeatManager { /** * Initializes the { @ link ClusterHeartbeatManager } . It will schedule the * heartbeat operation to the { @ link # getHeartbeatInterval ( HazelcastProperties ) } interval . */ void init ( ) { } }
ExecutionService executionService = nodeEngine . getExecutionService ( ) ; executionService . scheduleWithRepetition ( CLUSTER_EXECUTOR_NAME , this :: heartbeat , heartbeatIntervalMillis , heartbeatIntervalMillis , TimeUnit . MILLISECONDS ) ; if ( icmpParallelMode ) { startPeriodicPinger ( ) ; }
public class CPFriendlyURLEntryUtil { /** * Returns all the cp friendly url entries where groupId = & # 63 ; and classNameId = & # 63 ; and classPK = & # 63 ; and main = & # 63 ; . * @ param groupId the group ID * @ param classNameId the class name ID * @ param classPK the class pk * @ param main the main * @...
return getPersistence ( ) . findByG_C_C_M ( groupId , classNameId , classPK , main ) ;
public class NLMS { /** * { @ inheritDoc } */ @ Override public Prediction _predictRecord ( Record r ) { } }
Map < Object , Double > thitas = knowledgeBase . getModelParameters ( ) . getThitas ( ) ; double yPredicted = hypothesisFunction ( r . getX ( ) , thitas ) ; return new Prediction ( yPredicted , null ) ;
public class TypedValue { /** * Converts a DOM into a string representation , after " normalizing " it . * @ param n DOM Node to convert . */ public void setValueAsJava ( org . w3c . dom . Node n ) { } }
DOMProcessing . trimNode ( n ) ; try { this . value = DOMProcessing . writeToString ( n ) ; } catch ( TransformerConfigurationException e ) { this . value = n . toString ( ) ; // TODO : not the most compelling handling } catch ( TransformerException e ) { this . value = n . toString ( ) ; // TODO : not the most compell...
public class KeyVaultClientBaseImpl { /** * Updates the specified certificate issuer . * The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity . This operation requires the certificates / setissuers permission . * @ param vaultBaseUrl The vault name , for example https ...
return ServiceFuture . fromResponse ( updateCertificateIssuerWithServiceResponseAsync ( vaultBaseUrl , issuerName , provider , credentials , organizationDetails , attributes ) , serviceCallback ) ;
public class ProcessClosurePrimitives { /** * Reports an incorrect use of super - method calling . */ private void reportBadGoogBaseUse ( Node n , String extraMessage ) { } }
compiler . report ( JSError . make ( n , GOOG_BASE_CLASS_ERROR , extraMessage ) ) ;
public class ContentSpecParser { /** * Creates an empty Level using the LevelType to determine which Level subclass to instantiate . * @ param lineNumber The line number of the level . * @ param levelType The Level Type . * @ param input The string that represents the level , if one exists , * @ return The empt...
// Create the level based on the type switch ( levelType ) { case APPENDIX : return new Appendix ( null , lineNumber , input ) ; case CHAPTER : return new Chapter ( null , lineNumber , input ) ; case SECTION : return new Section ( null , lineNumber , input ) ; case PART : return new Part ( null , lineNumber , input ) ;...
public class DiskFileItem { /** * Returns the contents of the file as an array of bytes . If the contents of * the file were not yet cached in memory , they will be loaded from the disk * storage and cached . * @ return The contents of the file as an array of bytes . */ @ ReturnsMutableObject ( "Speed" ) @ Suppre...
if ( isInMemory ( ) ) { _ensureCachedContentIsPresent ( ) ; return m_aCachedContent ; } return SimpleFileIO . getAllFileBytes ( m_aDFOS . getFile ( ) ) ;
public class JobSchedulesImpl { /** * Updates the properties of the specified job schedule . * This replaces only the job schedule properties specified in the request . For example , if the schedule property is not specified with this request , then the Batch service will keep the existing schedule . Changes to a job...
return ServiceFuture . fromHeaderResponse ( patchWithServiceResponseAsync ( jobScheduleId , jobSchedulePatchParameter , jobSchedulePatchOptions ) , serviceCallback ) ;
public class StandardDdlParser { /** * Method to parse fully qualified schema , table and column names that are defined with ' . ' separator and optionally bracketed * with square brackets Example : partsSchema . supplier Example : [ partsSchema ] . [ supplier ] * @ param tokens the { @ link DdlTokenStream } repres...
// Basically we want to construct a name that could have the form : // [ schemaName ] . [ tableName ] . [ columnName ] // NOTE : " [ ] " brackets are optional StringBuilder sb = new StringBuilder ( ) ; if ( tokens . matches ( '[' ) ) { // We have the bracketed case , so assume all brackets while ( true ) { tokens . con...
public class AbcGrammar { /** * dots are ignored - for legibility only * parts - play - order : : = 1 * ( ALPHA / ( " ( " parts - play - order " ) " ) * DIGIT ) / " . " */ Rule PartsPlayOrder ( ) { } }
return OneOrMore ( FirstOfS ( CharRange ( 'A' , 'Z' ) . label ( "ALPHA" ) . suppressSubnodes ( ) , DIGITS ( ) , String ( "(" ) , String ( ")" ) , suppr ( "." ) , suppr ( "\"" ) , // found P : " AABBCCAA " . . . suppr ( WSPS ( ) ) ) ) . label ( PartsPlayOrder ) ; // return OneOrMore ( AnyOf ( " 1234567890 ( ) . ABCDEFGH...
public class KpiSkin { /** * * * * * * Methods * * * * * */ @ Override protected void handleEvents ( final String EVENT_TYPE ) { } }
super . handleEvents ( EVENT_TYPE ) ; if ( "RECALC" . equals ( EVENT_TYPE ) ) { angleRange = Helper . clamp ( 90.0 , 180.0 , gauge . getAngleRange ( ) ) ; minValue = gauge . getMinValue ( ) ; range = gauge . getRange ( ) ; angleStep = angleRange / range ; redraw ( ) ; }
public class BucketWriteTrx { /** * { @ inheritDoc } */ @ Override public void removeData ( final IData pData ) throws TTException { } }
checkState ( ! mDelegate . isClosed ( ) , "Transaction already closed" ) ; checkNotNull ( pData ) ; final long dataBucketKey = pData . getDataKey ( ) >> IConstants . INDIRECT_BUCKET_COUNT [ 3 ] ; LogValue container = prepareDataBucket ( pData . getDataKey ( ) ) ; final IData delData = new DeletedData ( pData . getDataK...
public class DecoratingDynamicTypeBuilder { /** * { @ inheritDoc } */ public DynamicType . Builder < T > annotateType ( Collection < ? extends AnnotationDescription > annotations ) { } }
return attribute ( new TypeAttributeAppender . Explicit ( new ArrayList < AnnotationDescription > ( annotations ) ) ) ;
public class ActivePlanRepository { /** * Get the site - local fragment id for a given plan identified by 20 - byte sha - 1 hash * If the plan isn ' t known to this SPC , load it up . Otherwise addref it . */ public static long loadOrAddRefPlanFragment ( byte [ ] planHash , byte [ ] plan , String stmtText ) { } }
Sha1Wrapper key = new Sha1Wrapper ( planHash ) ; synchronized ( FragInfo . class ) { FragInfo frag = m_plansByHash . get ( key ) ; if ( frag == null ) { frag = new FragInfo ( key , plan , m_nextFragId ++ , stmtText ) ; m_plansByHash . put ( frag . hash , frag ) ; m_plansById . put ( frag . fragId , frag ) ; if ( m_plan...
public class UsersInner { /** * Gets the properties of the specified user . * @ param deviceName The device name . * @ param name The user name . * @ param resourceGroupName The resource group name . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ return the observable to the ...
return getWithServiceResponseAsync ( deviceName , name , resourceGroupName ) . map ( new Func1 < ServiceResponse < UserInner > , UserInner > ( ) { @ Override public UserInner call ( ServiceResponse < UserInner > response ) { return response . body ( ) ; } } ) ;
public class WsCommandContextFactory { /** * Creates a new { @ link WsCommandContext } with the given { @ code session } . * @ param session the session the present request came from * @ return a new { @ link WsCommandContext } */ public WsCommandContext newCommandContext ( Session session ) { } }
return new WsCommandContext ( connectionFactoryProvider . getConnectionFactory ( ) , session , wsEndpoints . getUiClientSessions ( ) , wsEndpoints . getFeedSessions ( ) ) ;
public class FilePolicyIndex { /** * ( non - Javadoc ) * @ see org . fcrepo . server . security . xacml . pdp . data . PolicyDataManager # getPolicy ( java . lang . String ) */ @ Override public AbstractPolicy getPolicy ( String name , PolicyFinder policyFinder ) throws PolicyIndexException { } }
readLock . lock ( ) ; try { logger . debug ( "Getting policy named: " + name ) ; if ( policies . containsKey ( name ) ) { return handleDocument ( m_policyReader . readPolicy ( policies . get ( name ) ) , policyFinder ) ; } else { throw new PolicyIndexException ( "Attempting to get non-existent policy " + name ) ; } } c...
public class ConfigValidation { /** * Returns a new NestableFieldValidator for a given class . * @ param cls the Class the field should be a type of * @ param nullAllowed whether or not a value of null is valid * @ return a NestableFieldValidator for that class */ public static NestableFieldValidator fv ( final C...
return new NestableFieldValidator ( ) { @ Override public void validateField ( String pd , String name , Object field ) throws IllegalArgumentException { if ( nullAllowed && field == null ) { return ; } if ( ! cls . isInstance ( field ) ) { throw new IllegalArgumentException ( pd + name + " must be a " + cls . getName ...
public class ByteBuffer { /** * { @ inheritDoc } */ @ Override public Buffer slice ( final int start , final int stop ) { } }
if ( start == stop ) { return Buffers . EMPTY_BUFFER ; } checkIndex ( this . lowerBoundary + start ) ; checkIndex ( this . lowerBoundary + stop - 1 ) ; final int upperBoundary = this . lowerBoundary + stop ; final int writerIndex = upperBoundary ; return new ByteBuffer ( 0 , this . lowerBoundary + start , upperBoundary...
public class ThriftConnectionPool { /** * 异步获取连接的方法 * @ return 连接代理对象 */ public ListenableFuture < ThriftConnection < T > > getAsyncConnection ( ) { } }
return this . asyncExecutor . submit ( new Callable < ThriftConnection < T > > ( ) { public ThriftConnection < T > call ( ) throws Exception { return getConnection ( ) ; } } ) ;
public class TenantService { /** * Search for the first { @ link TenantDefinition } that is selected by the given filter . * All current tenant definitions are searched . * @ param filter { @ link TenantFilter } that decides selection criteria . * @ return First { @ link TenantDefinition } selected by the filter ...
checkServiceState ( ) ; for ( TenantDefinition tenantDef : getAllTenantDefs ( ) . values ( ) ) { if ( filter . selectTenant ( tenantDef ) ) { return tenantDef ; } } return null ;
public class ActionButton { /** * Calculates shadow width in actual pixels * @ return shadow width in actual pixels */ private int calculateShadowWidth ( ) { } }
float mShadowRadius = isShadowResponsiveEffectEnabled ( ) ? ( ( ShadowResponsiveDrawer ) shadowResponsiveDrawer ) . getMaxShadowRadius ( ) : getShadowRadius ( ) ; int shadowWidth = hasShadow ( ) ? ( int ) ( ( mShadowRadius + Math . abs ( getShadowXOffset ( ) ) ) * 2 ) : 0 ; LOGGER . trace ( "Calculated Action Button sh...
public class OClusterLocalHole { /** * Append the hole to the end of segment * @ throws IOException */ public long pushPosition ( final long iPosition ) throws IOException { } }
final int position = getHoles ( ) * RECORD_SIZE ; file . allocateSpace ( RECORD_SIZE ) ; file . writeLong ( position , iPosition ) ; if ( OLogManager . instance ( ) . isDebugEnabled ( ) ) OLogManager . instance ( ) . debug ( this , "Pushed new hole %s/#%d -> #%d:%d" , owner . getName ( ) , position / RECORD_SIZE , owne...
public class ReflectUtil { /** * Visits parameterized types to collect package names . * @ see { @ link # getTypePackageNames } . */ private static void getParameterizedTypePackageNames ( ParameterizedType type , Map < String , Class < ? > > packageNames ) { } }
for ( Type argumentType : type . getActualTypeArguments ( ) ) { getTypePackageNames ( argumentType , packageNames ) ; } getTypePackageNames ( type . getRawType ( ) , packageNames ) ; Type ownerType = type . getOwnerType ( ) ; if ( ownerType != null ) { getTypePackageNames ( ownerType , packageNames ) ; }
public class Utils { /** * Write the given long value as a 4 byte unsigned integer . Overflow is * ignored . * @ param buffer The buffer to write to * @ param index The position in the buffer at which to begin writing * @ param value The value to write */ public static void putUnsignedInt ( ByteBuffer buffer , ...
buffer . putInt ( index , ( int ) ( value & 0xffffffffL ) ) ;
public class SingleDeletionNeighbourhood { /** * Generates a random deletion move for the given subset solution that removes a single ID from the selection . * Possible fixed IDs are not considered to be removed and the minimum subset size is taken into account . * If no deletion move can be generated , < code > nu...
// check minimum size if ( minSizeReached ( solution ) ) { return null ; } // get set of candidate IDs for deletion ( possibly fixed IDs are discarded ) Set < Integer > removeCandidates = getRemoveCandidates ( solution ) ; // check if removal is possible if ( removeCandidates . isEmpty ( ) ) { return null ; } // select...
public class ItemStreamLink { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . msgstore . ItemCollection # removeFirstMatching ( com . ibm . ws . sib . msgstore . Filter , com . ibm . ws . sib . msgstore . Transaction ) */ public AbstractItem removeFirstMatchingItem ( Filter filter , Transaction transaction...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeFirstMatching" , new Object [ ] { filter , transaction } ) ; PrioritizedList items = _items ( ) ; AbstractItem item = items . removeFirstMatching ( filter , ( PersistentTransaction ) transaction ) ; if ( TraceC...
public class DurableOutputHandler { /** * Attempt to create a new durable subscription and send back either a * ControlDurableConfirm giving the result . * @ param msg The ControlCreateDurable request message . */ protected static void handleCreateDurable ( DestinationManager DM , ControlCreateDurable msg , Message...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleCreateDurable" , new Object [ ] { DM , msg , MP } ) ; int status = STATUS_SUB_GENERAL_ERROR ; SIBUuid12 handlerID = msg . getGuaranteedTargetDestinationDefinitionUUID ( ) ; // create requests require a target dest ID ...
public class HttpClientBuilder { /** * Begins SSL configuration < em > for the given host < / em > . Actual * configuration must follow ( see { @ link # trustKeyStore ( URL , String ) } , * { @ link # keyStore ( URL , String ) } , { @ link # secureSchema ( String ) } , * { @ link # securePort ( int ) } ) . * Al...
if ( sslHostConfig != null ) { sslHostConfigs . put ( secureHost , sslHostConfig ) ; } secureHost = host ; sslHostConfig = new SslHostConfig ( ) ; return this ;
public class SmsMfaConfigTypeMarshaller { /** * Marshall the given parameter object . */ public void marshall ( SmsMfaConfigType smsMfaConfigType , ProtocolMarshaller protocolMarshaller ) { } }
if ( smsMfaConfigType == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( smsMfaConfigType . getSmsAuthenticationMessage ( ) , SMSAUTHENTICATIONMESSAGE_BINDING ) ; protocolMarshaller . marshall ( smsMfaConfigType . getSmsConfiguration ( ) , S...
public class H2DbConfig { /** * H2 Data source . * jdbc : h2 : mem : test * @ return data source . */ @ Bean public DataSource dataSource ( ) { } }
DriverManagerDataSource dataSource = new DriverManagerDataSource ( dbUrl , userName , password ) ; dataSource . setDriverClassName ( Driver . class . getName ( ) ) ; // no need shutdown , EmbeddedDatabaseFactoryBean will take care of this // EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder ( ) ; // Embedde...
public class MgcpCall { /** * Unregisters a connection from the call . * @ param endpointId The identifier of the endpoint that owns the connection . * @ param connectionId The connection identifier . * @ return Returns < code > true < / code > if connection was removed successfully . Returns < code > false < / c...
boolean removed = this . entries . remove ( endpointId , connectionId ) ; if ( removed && log . isDebugEnabled ( ) ) { int left = this . entries . get ( endpointId ) . size ( ) ; log . debug ( "Call " + getCallIdHex ( ) + " unregistered connection " + Integer . toHexString ( connectionId ) + " from endpoint " + endpoin...
public class ComponentCollision { /** * HandlerListener */ @ Override public void notifyHandlableAdded ( Featurable featurable ) { } }
if ( featurable . hasFeature ( Collidable . class ) ) { final Transformable transformable = featurable . getFeature ( Transformable . class ) ; transformable . addListener ( this ) ; }
public class UIViewRoot { /** * Broadcast all events in the specified collection , stopping the at any time an AbortProcessingException * is thrown . * @ param context the current JSF context * @ param events the events to broadcast * @ return * @ return < code > true < / code > if the broadcast was completed...
assert events != null ; for ( int i = 0 ; i < events . size ( ) ; i ++ ) { FacesEvent event = events . get ( i ) ; UIComponent source = event . getComponent ( ) ; UIComponent compositeParent = UIComponent . getCompositeComponentParent ( source ) ; if ( compositeParent != null ) { pushComponentToEL ( context , composite...
public class MethodInvocationProcessor { /** * - - - - - AbstractProcessor implementation - - - - - */ @ Override public Object process ( InvocableMap . Entry entry ) { } }
ReflectionExtractor extractor = new ReflectionExtractor ( name , args ) ; if ( mutator ) { Object value = entry . getValue ( ) ; Object result = extractor . extract ( value ) ; entry . setValue ( value ) ; return result ; } else { return entry . extract ( extractor ) ; }
public class AWSWAFRegionalClient { /** * Permanently deletes a < a > ByteMatchSet < / a > . You can ' t delete a < code > ByteMatchSet < / code > if it ' s still used in any * < code > Rules < / code > or if it still includes any < a > ByteMatchTuple < / a > objects ( any filters ) . * If you just want to remove a...
request = beforeClientExecution ( request ) ; return executeDeleteByteMatchSet ( request ) ;
public class ContainerTracker { /** * Remove a container from this container ( if stored ) and return its descriptor * @ param containerId id to remove * @ return descriptor of the container removed or < code > null < / code > */ public synchronized ContainerShutdownDescriptor removeContainer ( String containerId )...
ContainerShutdownDescriptor descriptor = shutdownDescriptorPerContainerMap . remove ( containerId ) ; if ( descriptor != null ) { removeContainerIdFromLookupMaps ( containerId ) ; removeDescriptorFromPomLabelMap ( descriptor ) ; } return descriptor ;
public class Pattern { /** * Starts a new pattern sequence . The provided pattern is the initial pattern * of the new sequence . * @ param group the pattern to begin with * @ param afterMatchSkipStrategy the { @ link AfterMatchSkipStrategy . SkipStrategy } to use after each match . * @ return The first pattern ...
return new GroupPattern < > ( null , group , ConsumingStrategy . STRICT , afterMatchSkipStrategy ) ;
public class UpdatePreferencesServlet { /** * Move a tab left or right . * @ param sourceId node ID of tab to move * @ param method insertBefore or appendAfter . If appendAfter , tab is added as last tab ( parent * of destinationId ) . * @ param destinationId insertBefore : node ID of tab to move sourceId befor...
IUserInstance ui = userInstanceManager . getUserInstance ( request ) ; UserPreferencesManager upm = ( UserPreferencesManager ) ui . getPreferencesManager ( ) ; IUserLayoutManager ulm = upm . getUserLayoutManager ( ) ; final Locale locale = RequestContextUtils . getLocale ( request ) ; // If we ' re moving this element ...
public class Gauge { /** * Defines if an inner shadow should be drawn on the gauge * background . * @ param ENABLED */ public void setInnerShadowEnabled ( final boolean ENABLED ) { } }
if ( null == innerShadowEnabled ) { _innerShadowEnabled = ENABLED ; fireUpdateEvent ( REDRAW_EVENT ) ; } else { innerShadowEnabled . set ( ENABLED ) ; }
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcRelConnectsWithEccentricity ( ) { } }
if ( ifcRelConnectsWithEccentricityEClass == null ) { ifcRelConnectsWithEccentricityEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 540 ) ; } return ifcRelConnectsWithEccentricityEClass ;
public class UpgradeInputByteBufferUtil { /** * Sets the ReadListener provided by the application to this stream * Once the ReadListener is set we will kick off the initial read * @ param readListenerl */ public void setupReadListener ( ReadListener readListenerl , SRTUpgradeInputStream31 srtUpgradeStream ) { } }
if ( readListenerl == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isErrorEnabled ( ) ) Tr . error ( tc , "readlistener.is.null" ) ; throw new NullPointerException ( Tr . formatMessage ( tc , "readlistener.is.null" ) ) ; } if ( _rl != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEr...
public class DistributedFileSystem { /** * Returns the stat information about the file . * @ throws FileNotFoundException if the file does not exist . */ public FileStatus getFileStatus ( Path f ) throws IOException { } }
FileStatus fi = dfs . getFileInfo ( getPathName ( f ) ) ; if ( fi != null ) { fi . makeQualified ( this ) ; return fi ; } else { throw new FileNotFoundException ( "File does not exist: " + f ) ; }
public class SiteSwitcherHandlerInterceptor { /** * Creates a site switcher that redirects to a < code > m . < / code > domain for normal site requests that either * originate from a mobile device or indicate a mobile site preference . * Uses a { @ link CookieSitePreferenceRepository } that saves a cookie that is s...
return new SiteSwitcherHandlerInterceptor ( StandardSiteSwitcherHandlerFactory . mDot ( serverName , tabletIsMobile ) ) ;
public class ClientEvents { /** * Register a client listener that uses a query DSL based filter . The listener is expected to be annotated such that * { @ link org . infinispan . client . hotrod . annotation . ClientListener # useRawData } = true and { @ link * org . infinispan . client . hotrod . annotation . Clie...
ClientListener l = ReflectionUtil . getAnnotation ( listener . getClass ( ) , ClientListener . class ) ; if ( l == null ) { throw log . missingClientListenerAnnotation ( listener . getClass ( ) . getName ( ) ) ; } if ( ! l . useRawData ( ) ) { throw log . clientListenerMustUseRawData ( listener . getClass ( ) . getName...