signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class NetworkInterface { /** * Convenience method to search for a network interface that * has the specified Internet Protocol ( IP ) address bound to * it . * If the specified IP address is bound to multiple network * interfaces it is not defined which network interface is * returned . * @ param add...
if ( addr == null ) { throw new NullPointerException ( ) ; } if ( ! ( addr instanceof Inet4Address || addr instanceof Inet6Address ) ) { throw new IllegalArgumentException ( "invalid address type" ) ; } return getByInetAddress0 ( addr ) ;
public class SQSMessageConsumerPrefetch { /** * Call < code > receiveMessage < / code > with long - poll wait time of 20 seconds * with available prefetch batch size and potential re - tries . */ protected List < Message > getMessages ( int prefetchBatchSize ) throws InterruptedException { } }
assert prefetchBatchSize > 0 ; ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest ( queueUrl ) . withMaxNumberOfMessages ( prefetchBatchSize ) . withAttributeNames ( ALL ) . withMessageAttributeNames ( ALL ) . withWaitTimeSeconds ( WAIT_TIME_SECONDS ) ; // if the receive request is for FIFO queue ,...
public class WebhooksInner { /** * Updates a webhook with the specified parameters . * @ param resourceGroupName The name of the resource group to which the container registry belongs . * @ param registryName The name of the container registry . * @ param webhookName The name of the webhook . * @ param webhookU...
return ServiceFuture . fromResponse ( updateWithServiceResponseAsync ( resourceGroupName , registryName , webhookName , webhookUpdateParameters ) , serviceCallback ) ;
public class ErrorCollector { /** * Adds to the table the exception , if any , thrown from { @ code callable } . * Execution continues , but the test will fail at the end if * { @ code callable } threw an exception . */ public < T > T checkSucceeds ( Callable < T > callable ) { } }
try { return callable . call ( ) ; } catch ( Throwable e ) { addError ( e ) ; return null ; }
public class SarlActionBuilderImpl { /** * Add an annotation . * @ param type the qualified name of the annotation */ public void addAnnotation ( String type ) { } }
if ( ! Strings . isEmpty ( type ) ) { XAnnotation annotation = XAnnotationsFactory . eINSTANCE . createXAnnotation ( ) ; annotation . setAnnotationType ( newTypeRef ( getSarlAction ( ) , type ) . getType ( ) ) ; getSarlAction ( ) . getAnnotations ( ) . add ( annotation ) ; }
public class JBlinkLabel { /** * Creates new JBlinkLabel . * @ param obj Undefined . */ public void init ( Object obj ) { } }
for ( int i = 0 ; i < MAX_ICONS ; i ++ ) { ImageIcon icon = this . getImageIcon ( i ) ; if ( icon == null ) break ; this . addIcon ( icon , i ) ; }
public class servicegroup { /** * Use this API to disable servicegroup . */ public static base_response disable ( nitro_service client , servicegroup resource ) throws Exception { } }
servicegroup disableresource = new servicegroup ( ) ; disableresource . servicegroupname = resource . servicegroupname ; disableresource . servername = resource . servername ; disableresource . port = resource . port ; disableresource . delay = resource . delay ; disableresource . graceful = resource . graceful ; retur...
public class AbstractTemplateView { /** * Create an Launch the animation between two sub slides . * @ param nextSlide the next subSlide to show */ private void performStepAnimation ( final Node nextSlide ) { } }
// setSlideLocked ( true ) ; this . slideStepAnimation = ParallelTransitionBuilder . create ( ) . onFinished ( new EventHandler < ActionEvent > ( ) { @ Override public void handle ( final ActionEvent event ) { AbstractTemplateView . this . currentSubSlide = nextSlide ; // AbstractTemplateView . this . setSlideLocked ( ...
public class AbstractExternalHighlightingFragment2 { /** * Replies the mime types for the SARL source code . * @ return the mime type for SARL . */ @ Pure public List < String > getMimeTypes ( ) { } }
if ( this . mimeTypes . isEmpty ( ) ) { return Arrays . asList ( "text/x-" + getLanguageSimpleName ( ) . toLowerCase ( ) ) ; // $ NON - NLS - 1 $ } return this . mimeTypes ;
public class MariaDbStatement { /** * Reset timeout after query , re - throw SQL exception . * @ param sqle current exception * @ return SQLException exception with new message in case of timer timeout . */ protected SQLException executeExceptionEpilogue ( SQLException sqle ) { } }
// if has a failover , closing the statement if ( sqle . getSQLState ( ) != null && sqle . getSQLState ( ) . startsWith ( "08" ) ) { try { close ( ) ; } catch ( SQLException sqlee ) { // eat exception } } if ( isTimedout ) { return new SQLTimeoutException ( "(conn:" + getServerThreadId ( ) + ") Query timed out" , "JZ00...
public class ProxyEndpoint { /** * Override to track your own request stats * @ return */ protected RequestStat createRequestStat ( ) { } }
BasicRequestStat basicRequestStat = new BasicRequestStat ( origin . getName ( ) ) ; RequestStat . putInSessionContext ( basicRequestStat , context ) ; return basicRequestStat ;
public class MetaDataSlotServiceImpl { /** * declarative service */ public synchronized void deactivate ( ) { } }
// Allow garbage collection of all slots reserved by this component . // Clean up all the metadata used by the slots . for ( MetaDataSlotImpl slot : slots ) { MetaDataManager < ? , ? > manager = ( MetaDataManager < ? , ? > ) slot . getManager ( ) ; manager . destroyMetaDataSlot ( slot ) ; } slots = null ;
public class Http { /** * = = = = = POST SYNC = = = = = */ public static String postSync ( String url , List < StrParam > strParams ) { } }
return postSync ( String . class , url , null , Util . listToParams ( strParams , StrParam . class ) ) ;
public class DialChart { /** * Add a series for a Dial type chart * @ param seriesName * @ param value * @ param annotation * @ return */ public DialSeries addSeries ( String seriesName , double value , String annotation ) { } }
// Sanity checks sanityCheck ( seriesName , value ) ; DialSeries series = new DialSeries ( seriesName , value , annotation ) ; seriesMap . put ( seriesName , series ) ; return series ;
public class StringUtil { /** * Generates a camel case version of a phrase from underscore . * < pre > * if { @ code capitalicapitalizeFirstChar } * " alice _ in _ wonderland " becomes : " AliceInWonderLand " * else * " alice _ in _ wonderland " becomes : " aliceInWonderLand " * < / pre > * @ param unders...
String result = "" ; StringTokenizer st = new StringTokenizer ( underscored , "_" ) ; while ( st . hasMoreTokens ( ) ) { result += capitalize ( st . nextToken ( ) ) ; } return capitalizeFirstChar ? result : result . substring ( 0 , 1 ) . toLowerCase ( ) + result . substring ( 1 ) ;
public class AbstractGwtValidatorFactory { /** * initialize factory . * @ param configState ConfigurationState */ public final void init ( final ConfigurationState configState ) { } }
final ConstraintValidatorFactory configConstraintValidatorFactory = configState . getConstraintValidatorFactory ( ) ; constraintValidatorFactory = configConstraintValidatorFactory == null ? GWT . < ConstraintValidatorFactory > create ( ConstraintValidatorFactory . class ) : configConstraintValidatorFactory ; final Trav...
public class CanalEmbedSelector { /** * 处理无数据的情况 , 避免空循环挂死 */ private void applyWait ( int emptyTimes ) { } }
int newEmptyTimes = emptyTimes > maxEmptyTimes ? maxEmptyTimes : emptyTimes ; if ( emptyTimes <= 3 ) { // 3次以内 Thread . yield ( ) ; } else { // 超过3次 , 最多只sleep 10ms LockSupport . parkNanos ( 1000 * 1000L * newEmptyTimes ) ; }
public class CacheingMatcher { /** * Delegate put */ public void put ( Conjunction selector , MatchTarget object , InternTable subExpr ) throws MatchingException { } }
if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "put" , new Object [ ] { selector , object , subExpr } ) ; vacantChild = Factory . createMatcher ( ordinalPosition , selector , vacantChild ) ; vacantChild . put ( selector , object , subExpr ) ; if ( tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "put"...
public class AmazonPinpointClient { /** * Returns a list of export jobs for a specific segment . * @ param getSegmentExportJobsRequest * @ return Result of the GetSegmentExportJobs operation returned by the service . * @ throws BadRequestException * 400 response * @ throws InternalServerErrorException * 500...
request = beforeClientExecution ( request ) ; return executeGetSegmentExportJobs ( request ) ;
public class QueryBasedExtractor { /** * build schema , record count and high water mark */ public Extractor < S , D > build ( ) throws ExtractPrepareException { } }
String watermarkColumn = this . workUnitState . getProp ( ConfigurationKeys . EXTRACT_DELTA_FIELDS_KEY ) ; long lwm = partition . getLowWatermark ( ) ; long hwm = partition . getHighWatermark ( ) ; log . info ( "Low water mark: " + lwm + "; and High water mark: " + hwm ) ; WatermarkType watermarkType ; if ( StringUtils...
public class Jav { /** * Returns a String capable for java identifier . Throws IllegalArgumentException * if same id was already created . * < p > Same id returns always the same java id . * @ param id * @ return */ public String makeJavaIdentifier ( String id ) { } }
String jid = makeJavaId ( id ) ; String old = map . put ( jid , id ) ; if ( old != null && ! old . equals ( id ) ) { throw new IllegalArgumentException ( "both " + id + " and " + old + " makes the same java id " + jid ) ; } return jid ;
public class BeanUtil { /** * 对象转Map < br > * 通过实现 { @ link Editor } 可以自定义字段值 , 如果这个Editor返回null则忽略这个字段 , 以便实现 : * < pre > * 1 . 字段筛选 , 可以去除不需要的字段 * 2 . 字段变换 , 例如实现驼峰转下划线 * 3 . 自定义字段前缀或后缀等等 * < / pre > * @ param bean bean对象 * @ param targetMap 目标的Map * @ param ignoreNullValue 是否忽略值为空的字段 * @ param ke...
if ( bean == null ) { return null ; } final Collection < PropDesc > props = BeanUtil . getBeanDesc ( bean . getClass ( ) ) . getProps ( ) ; String key ; Method getter ; Object value ; for ( PropDesc prop : props ) { key = prop . getFieldName ( ) ; // 过滤class属性 // 得到property对应的getter方法 getter = prop . getGetter ( ) ; if...
public class EndpointBatchRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( EndpointBatchRequest endpointBatchRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( endpointBatchRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( endpointBatchRequest . getItem ( ) , ITEM_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessa...
public class DummyTransaction { /** * Rolls back this transaction . * @ throws IllegalStateException If the transaction is in a state where it cannot be rolled back . This could be * because the transaction is no longer active , or because it is in the { @ link * Status # STATUS _ PREPARED prepared state } . * ...
if ( trace ) { log . tracef ( "Transaction.rollback() invoked in transaction with Xid=%s" , xid ) ; } if ( isDone ( ) ) { throw new IllegalStateException ( "Transaction is done. Cannot rollback transaction" ) ; } try { status = Status . STATUS_MARKED_ROLLBACK ; endResources ( ) ; runCommit ( false ) ; } catch ( Heurist...
public class LogFileCompressor { /** * Starts the compressor . */ final void begin ( ) { } }
if ( LogFileCompressionStrategy . existsFor ( this . properties ) ) { final Thread thread = new Thread ( this , "Log4J File Compressor" ) ; thread . setDaemon ( true ) ; thread . start ( ) ; this . threadRef = thread ; }
public class ZuulProxyAutoConfiguration { /** * route filters */ @ Bean @ ConditionalOnMissingBean ( RibbonRoutingFilter . class ) public RibbonRoutingFilter ribbonRoutingFilter ( ProxyRequestHelper helper , RibbonCommandFactory < ? > ribbonCommandFactory ) { } }
RibbonRoutingFilter filter = new RibbonRoutingFilter ( helper , ribbonCommandFactory , this . requestCustomizers ) ; return filter ;
public class AlluxioFuseFileSystem { /** * Flushes cached data on Alluxio . * Called on explicit sync ( ) operation or at close ( ) . * @ param path The path on the FS of the file to close * @ param fi FileInfo data struct kept by FUSE * @ return 0 on success , a negative value on error */ @ Override public int...
LOG . trace ( "flush({})" , path ) ; final long fd = fi . fh . get ( ) ; OpenFileEntry oe = mOpenFiles . getFirstByField ( ID_INDEX , fd ) ; if ( oe == null ) { LOG . error ( "Cannot find fd for {} in table" , path ) ; return - ErrorCodes . EBADFD ( ) ; } if ( oe . getOut ( ) != null ) { try { oe . getOut ( ) . flush (...
public class ApiOvhVrack { /** * Get this object properties * REST : GET / vrack / { serviceName } / cloudProject / { project } * @ param serviceName [ required ] The internal name of your vrack * @ param project [ required ] publicCloud project */ public OvhCloudProject serviceName_cloudProject_project_GET ( Str...
String qPath = "/vrack/{serviceName}/cloudProject/{project}" ; StringBuilder sb = path ( qPath , serviceName , project ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhCloudProject . class ) ;
public class DataSet { /** * Create a new { @ code DataSet } object with the given number of parameters * and the data set names . * @ param parameterCount the number of parameters one data sample consist of * @ param dataSetNames the names of the created { @ code Data } sets * @ return a new data set object */...
return new DataSet ( Arrays . stream ( dataSetNames ) . map ( name -> Data . of ( name , parameterCount ) ) . collect ( ISeq . toISeq ( ) ) ) ;
public class DefaultLoginWebflowConfigurer { /** * Create default global exception handlers . * @ param flow the flow */ protected void createDefaultEndStates ( final Flow flow ) { } }
createRedirectUnauthorizedServiceUrlEndState ( flow ) ; createServiceErrorEndState ( flow ) ; createRedirectEndState ( flow ) ; createPostEndState ( flow ) ; createInjectHeadersActionState ( flow ) ; createGenericLoginSuccessEndState ( flow ) ; createServiceWarningViewState ( flow ) ; createEndWebflowEndState ( flow ) ...
public class AppServicePlansInner { /** * Get all App Service plans in a resource group . * Get all App Service plans in a resource group . * @ param nextPageLink The NextLink from the previous successful call to List operation . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ r...
return listByResourceGroupNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < AppServicePlanInner > > , Page < AppServicePlanInner > > ( ) { @ Override public Page < AppServicePlanInner > call ( ServiceResponse < Page < AppServicePlanInner > > response ) { return response . body (...
public class AsteriskQueueImpl { /** * Creates a new AsteriskQueueEntry , adds it to this queue . < p > * Fires : * < ul > * < li > PCE on channel < / li > * < li > NewEntry on this queue < / li > * < li > PCE on other queue entries if shifted ( never happens ) < / li > * < li > NewQueueEntry on server < / ...
AsteriskQueueEntryImpl qe = new AsteriskQueueEntryImpl ( server , this , channel , reportedPosition , dateReceived ) ; long delay = serviceLevel * 1000L ; if ( delay > 0 ) { ServiceLevelTimerTask timerTask = new ServiceLevelTimerTask ( qe ) ; timer . schedule ( timerTask , delay ) ; synchronized ( serviceLevelTimerTask...
public class StreamInfoMarshaller { /** * Marshall the given parameter object . */ public void marshall ( StreamInfo streamInfo , ProtocolMarshaller protocolMarshaller ) { } }
if ( streamInfo == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( streamInfo . getDeviceName ( ) , DEVICENAME_BINDING ) ; protocolMarshaller . marshall ( streamInfo . getStreamName ( ) , STREAMNAME_BINDING ) ; protocolMarshaller . marshall ...
public class LabelSausage { /** * Paints the label sausage . */ protected void paint ( Graphics2D gfx , int x , int y , Color background , Object cliData ) { } }
// turn on anti - aliasing ( for our sausage lines ) Object oalias = SwingUtil . activateAntiAliasing ( gfx ) ; // draw the base sausage gfx . setColor ( background ) ; drawBase ( gfx , x , y ) ; // render our icon if we ' ve got one drawIcon ( gfx , x , y , cliData ) ; drawLabel ( gfx , x , y ) ; drawBorder ( gfx , x ...
public class OObjectProxyMethodHandler { /** * Method that detaches all fields contained in the document to the given object * @ param self * : - The object containing this handler instance * @ throws InvocationTargetException * @ throws IllegalAccessException * @ throws NoSuchMethodException */ public void d...
for ( String fieldName : doc . fieldNames ( ) ) { Object value = getValue ( self , fieldName , false , null ) ; if ( value instanceof OLazyObjectMultivalueElement ) ( ( OLazyObjectMultivalueElement ) value ) . detach ( ) ; OObjectEntitySerializer . setFieldValue ( getField ( fieldName , self . getClass ( ) ) , self , v...
public class TldTaglibTypeImpl { /** * Returns all < code > taglib - extension < / code > elements * @ return list of < code > taglib - extension < / code > */ public List < TldExtensionType < TldTaglibType < T > > > getAllTaglibExtension ( ) { } }
List < TldExtensionType < TldTaglibType < T > > > list = new ArrayList < TldExtensionType < TldTaglibType < T > > > ( ) ; List < Node > nodeList = childNode . get ( "taglib-extension" ) ; for ( Node node : nodeList ) { TldExtensionType < TldTaglibType < T > > type = new TldExtensionTypeImpl < TldTaglibType < T > > ( th...
public class InternalPureXbaseParser { /** * InternalPureXbase . g : 1235:1 : ruleXEqualityExpression returns [ EObject current = null ] : ( this _ XRelationalExpression _ 0 = ruleXRelationalExpression ( ( ( ( ( ) ( ( ruleOpEquality ) ) ) ) = > ( ( ) ( ( ruleOpEquality ) ) ) ) ( ( lv _ rightOperand _ 3_0 = ruleXRelatio...
EObject current = null ; EObject this_XRelationalExpression_0 = null ; EObject lv_rightOperand_3_0 = null ; enterRule ( ) ; try { // InternalPureXbase . g : 1241:2 : ( ( this _ XRelationalExpression _ 0 = ruleXRelationalExpression ( ( ( ( ( ) ( ( ruleOpEquality ) ) ) ) = > ( ( ) ( ( ruleOpEquality ) ) ) ) ( ( lv _ righ...
public class DeleteByteMatchSetRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DeleteByteMatchSetRequest deleteByteMatchSetRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( deleteByteMatchSetRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteByteMatchSetRequest . getByteMatchSetId ( ) , BYTEMATCHSETID_BINDING ) ; protocolMarshaller . marshall ( deleteByteMatchSetRequest . getChangeToken ( ) ,...
public class MethodInfo { /** * Get the names of any classes in the type descriptor or type signature . * @ param classNames * the class names */ @ Override protected void findReferencedClassNames ( final Set < String > classNames ) { } }
final MethodTypeSignature methodSig = getTypeSignature ( ) ; if ( methodSig != null ) { methodSig . findReferencedClassNames ( classNames ) ; } final MethodTypeSignature methodDesc = getTypeDescriptor ( ) ; if ( methodDesc != null ) { methodDesc . findReferencedClassNames ( classNames ) ; } if ( annotationInfo != null ...
public class FontFileReader { /** * Read 4 bytes . * @ return One unsigned integer * @ throws IOException If EOF is reached */ public final long readTTFULong ( ) throws IOException { } }
long ret = readTTFUByte ( ) ; ret = ( ret << 8 ) + readTTFUByte ( ) ; ret = ( ret << 8 ) + readTTFUByte ( ) ; ret = ( ret << 8 ) + readTTFUByte ( ) ; return ret ;
public class ChineseCalendar { /** * Compute fields for the Chinese calendar system . This method can * either set all relevant fields , as required by * < code > handleComputeFields ( ) < / code > , or it can just set the MONTH and * IS _ LEAP _ MONTH fields , as required by * < code > handleComputeMonthStart ...
// Find the winter solstices before and after the target date . // These define the boundaries of this Chinese year , specifically , // the position of month 11 , which always contains the solstice . // We want solsticeBefore < = date < solsticeAfter . int solsticeBefore ; int solsticeAfter = winterSolstice ( gyear ) ;...
public class DescribeProtectedResourceRequestMarshaller { /** * Marshall the given parameter object . */ public void marshall ( DescribeProtectedResourceRequest describeProtectedResourceRequest , ProtocolMarshaller protocolMarshaller ) { } }
if ( describeProtectedResourceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeProtectedResourceRequest . getResourceArn ( ) , RESOURCEARN_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to mars...
public class StoryFinder { /** * Finds paths from a source path , allowing for include / exclude patterns . * Paths found are normalised by { @ link StoryFinder # normalise ( List < String > ) } * @ param searchIn the source path to search in * @ param includes the List of include patterns , or < code > null < / ...
return normalise ( sort ( scan ( searchIn , includes , excludes ) ) ) ;
public class GodHandableAction { protected Object invokeExecuteMethod ( Method executeMethod , Object [ ] requestArgs ) { } }
Object result = null ; try { result = executeMethod . invoke ( action , requestArgs ) ; // # to _ action just here redCardableAssist . checkValidatorCalled ( ) ; } catch ( InvocationTargetException e ) { // e . g . exception in the method return handleExecuteMethodInvocationTargetException ( executeMethod , requestArgs...
public class GraniteUi { /** * Get current content resource * If it does not exist , go up the content path and return the first resource that exists . * @ param request Request * @ return Current content resource or the first existing parent / ancestor . */ public static @ Nullable Resource getContentResourceOrP...
String contentPath = getContentPath ( request ) ; return getContentResourceOrParentFromPath ( ( SlingHttpServletRequest ) request , contentPath ) ;
public class SynchronousRequest { /** * For more info on continents API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / continents " > here < / a > < br / > * Get continent info for the given continent floor id ( s ) * @ param continentID { @ link Continent # id } * @ param ids list of cont...
isParamValid ( new ParamChecker ( ids ) ) ; try { Response < List < ContinentFloor > > response = gw2API . getContinentFloorInfo ( Integer . toString ( continentID ) , processIds ( ids ) , GuildWars2 . lang . getValue ( ) ) . execute ( ) ; if ( ! response . isSuccessful ( ) ) throwError ( response . code ( ) , response...
public class UnixSshPath { /** * { @ inheritDoc } */ @ Override public UnixSshPath getParent ( ) { } }
// if ( parts . length = = 0 & & ! isAbsolute ( ) ) { if ( parts . length == 0 || ( parts . length == 1 && ! isAbsolute ( ) ) ) { return null ; } if ( parts . length <= 1 ) { return new UnixSshPath ( getFileSystem ( ) , isAbsolute ( ) ) ; } return new UnixSshPath ( getFileSystem ( ) , isAbsolute ( ) , Arrays . copyOfRa...
public class IntCounter { /** * Adds the counts in the given Counter to the counts in this Counter . * To copy the values from another Counter rather than adding them , use */ public void addAll ( IntCounter < E > counter ) { } }
for ( E key : counter . keySet ( ) ) { int count = counter . getIntCount ( key ) ; incrementCount ( key , count ) ; }
public class TextFidelityImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setStpTxtEx ( Integer newStpTxtEx ) { } }
Integer oldStpTxtEx = stpTxtEx ; stpTxtEx = newStpTxtEx ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . TEXT_FIDELITY__STP_TXT_EX , oldStpTxtEx , stpTxtEx ) ) ;
public class Meeting { public String roomToken ( String roomName , String userId , String perm , Date expireAt ) throws Exception { } }
RoomAccess access = new RoomAccess ( roomName , userId , perm , expireAt ) ; String json = gson . toJson ( access ) ; return this . cli . getMac ( ) . signRoomToken ( json ) ;
public class Compiler { /** * Returns the module type for the provided namespace . */ @ Override @ Nullable CompilerInput . ModuleType getModuleTypeByName ( String moduleName ) { } }
return moduleTypesByName . get ( moduleName ) ;
public class JvmTypeParameterImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public void setName ( String newName ) { } }
String oldName = name ; name = newName ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , TypesPackage . JVM_TYPE_PARAMETER__NAME , oldName , name ) ) ;
public class PLTable { /** * Add a new table row . All contained elements are added with the specified * width in the constructor . < code > null < / code > elements are represented as * empty cells . * @ param aCells * The cells to add . May not be < code > null < / code > . * @ param aHeight * Row height ...
addAndReturnRow ( aCells , aHeight ) ; return this ;
public class Element { /** * ( non - Javadoc ) * @ see qc . automation . framework . widget . IElement # waitForText ( java . lang . Long ) */ @ Override public void waitForText ( long time ) throws WidgetException , WidgetTimeoutException { } }
waitForCommand ( new ITimerCallback ( ) { @ Override public boolean execute ( ) throws WidgetException { String val = getText ( ) ; if ( val == null || val . equals ( "" ) ) return false ; return true ; } @ Override public String toString ( ) { return "Waiting for text on the element with the " + "locator: " + locator ...
public class CommerceCountryPersistenceImpl { /** * Returns a range of all the commerce countries where groupId = & # 63 ; . * Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes...
return findByGroupId ( groupId , start , end , null ) ;
public class AhoCorasickDoubleArrayTrie { /** * 持久化 * @ param out 一个ObjectOutputStream * @ throws IOException 可能的IO异常 */ public void save ( ObjectOutputStream out ) throws IOException { } }
out . writeObject ( base ) ; out . writeObject ( check ) ; out . writeObject ( fail ) ; out . writeObject ( output ) ; out . writeObject ( l ) ;
public class BigtableTableAdminGCJClient { /** * { @ inheritDoc } */ @ Override public ApiFuture < Operation > createTableFromSnapshotAsync ( CreateTableFromSnapshotRequest request ) { } }
return baseAdminClient . createTableFromSnapshotCallable ( ) . futureCall ( request ) ;
public class AtomContainer { /** * { @ inheritDoc } */ @ Override public void removeAllBonds ( ) { } }
for ( int f = 0 ; f < getBondCount ( ) ; f ++ ) { getBond ( f ) . removeListener ( this ) ; } bonds = new IBond [ growArraySize ] ; bondCount = 0 ; notifyChanged ( ) ;
public class RoleManager { /** * Sets the { @ link net . dv8tion . jda . core . Permission Permissions } of the selected { @ link net . dv8tion . jda . core . entities . Role Role } . * < p > Permissions may only include already present Permissions for the currently logged in account . * < br > You are unable to gi...
long selfPermissions = PermissionUtil . getEffectivePermission ( getGuild ( ) . getSelfMember ( ) ) ; setupPermissions ( ) ; long missingPerms = perms ; // include permissions we want to set to missingPerms &= ~ selfPermissions ; // exclude permissions we have missingPerms &= ~ this . permissions ; // exclude permissio...
public class JodaBeanSimpleJsonWriter { /** * write map with complex keys */ private void writeMapComplex ( SerIterator itemIterator ) throws IOException { } }
output . writeObjectStart ( ) ; while ( itemIterator . hasNext ( ) ) { itemIterator . next ( ) ; Object key = itemIterator . key ( ) ; if ( key == null ) { throw new IllegalArgumentException ( "Unable to write map key as it cannot be null" ) ; } String str = settings . getConverter ( ) . convertToString ( itemIterator ...
public class CssReader { /** * Reads forward and returns the the next n characters in the stream . Escapes * are returned verbatim . At return , the reader is at positioned such that * next ( ) will return n + 1 or EOF ( - 1 ) . * @ param n the number of characters to read * @ return An array with guaranteed le...
int [ ] buf = new int [ n ] ; boolean seenEOF = false ; for ( int i = 0 ; i < buf . length ; i ++ ) { if ( seenEOF ) { buf [ i ] = - 1 ; } else { buf [ i ] = next ( ) ; if ( curChar == - 1 ) { seenEOF = true ; } } } return buf ;
public class JavacFileManager { /** * Converts a relative file name to a relative URI . This is * different from File . toURI as this method does not canonicalize * the file before creating the URI . Furthermore , no schema is * used . * @ param file a relative file name * @ return a relative URI * @ throws...
if ( ! file . isAbsolute ( ) ) { String result = file . getPath ( ) . replace ( File . separatorChar , '/' ) ; if ( isRelativeUri ( result ) ) return result ; } throw new IllegalArgumentException ( "Invalid relative path: " + file ) ;
public class XNElement { /** * Store the element ' s content and recursively call itself for children . * @ param stream the stream output * @ throws XMLStreamException if an error occurs */ protected void saveInternal ( XMLStreamWriter stream ) throws XMLStreamException { } }
if ( namespace != null ) { stream . writeStartElement ( prefix , namespace , name ) ; } else { stream . writeStartElement ( name ) ; } for ( Map . Entry < XAttributeName , String > a : attributes . entrySet ( ) ) { XAttributeName an = a . getKey ( ) ; if ( an . namespace != null ) { stream . writeAttribute ( an . prefi...
public class ExpressRouteCircuitPeeringsInner { /** * Creates or updates a peering in the specified express route circuits . * @ param resourceGroupName The name of the resource group . * @ param circuitName The name of the express route circuit . * @ param peeringName The name of the peering . * @ param peerin...
return ServiceFuture . fromResponse ( beginCreateOrUpdateWithServiceResponseAsync ( resourceGroupName , circuitName , peeringName , peeringParameters ) , serviceCallback ) ;
public class RelationID { /** * creates relation id from the database record ( as though it is quoted ) * @ param schema as is in DB ( possibly null ) * @ param table as is in DB * @ return */ public static RelationID createRelationIdFromDatabaseRecord ( QuotedIDFactory idfac , String schema , String table ) { } ...
// both IDs are as though they are quoted - - DB stores names as is return new RelationID ( QuotedID . createIdFromDatabaseRecord ( idfac , schema ) , QuotedID . createIdFromDatabaseRecord ( idfac , table ) ) ;
public class PackageSummaryBuilder { /** * Build the package documentation . * @ param node the XML element that specifies which components to document * @ param contentTree the content tree to which the documentation will be added */ public void buildPackageDoc ( XMLNode node , Content contentTree ) throws Excepti...
contentTree = packageWriter . getPackageHeader ( Util . getPackageName ( packageDoc ) ) ; buildChildren ( node , contentTree ) ; packageWriter . addPackageFooter ( contentTree ) ; packageWriter . printDocument ( contentTree ) ; packageWriter . close ( ) ; Util . copyDocFiles ( configuration , packageDoc ) ;
public class IdGenerator { /** * Extracts the ( UNIX ) timestamp from a tiny ascii id ( radix * { @ link Character # MAX _ RADIX } ) . * @ param idTinyAscii * @ return the UNIX timestamp ( milliseconds ) * @ throws NumberFormatException */ public static long extractTimestampTinyAscii ( String idTinyAscii ) thro...
return extractTimestampTiny ( Long . parseLong ( idTinyAscii , Character . MAX_RADIX ) ) ;
public class StatusCodes { /** * Initialize this status code with the input information . * @ param code * @ param phrase * @ param isError */ protected void init ( int code , String phrase , boolean isError ) { } }
this . myPhrase = phrase ; this . myPhraseBytes = HttpChannelUtils . getEnglishBytes ( phrase ) ; this . myIntCode = code ; if ( isError ) { this . myError = new HttpError ( code , this . myPhrase ) ; } initSpecialArrays ( ) ; checkForAllowedBody ( ) ;
public class BaseDfuImpl { /** * Writes the operation code to the characteristic . * This method is SYNCHRONOUS and wait until the * { @ link android . bluetooth . BluetoothGattCallback # onCharacteristicWrite ( android . bluetooth . BluetoothGatt , android . bluetooth . BluetoothGattCharacteristic , int ) } * wi...
if ( mAborted ) throw new UploadAbortedException ( ) ; mReceivedData = null ; mError = 0 ; mRequestCompleted = false ; /* * Sending a command that will make the DFU target to reboot may cause an error 133 * ( 0x85 - Gatt Error ) . If so , with this flag set , the error will not be shown to the user * as the periphe...
public class RichByteBufferImpl { /** * Resets the buffer with a new underlying buffer . * @ param buff * @ param p */ void reset ( com . ibm . wsspi . bytebuffer . WsByteBuffer buff , RichByteBufferPool p ) { } }
this . buffer = buff ; this . pool = p ;
public class ShutdownUtil { /** * TODO : make wait time configurable ? */ public static void shutdownExecutor ( ExecutorService executor , final String name ) { } }
executor . shutdown ( ) ; try { log . info ( "Waiting for %s to shutdown" , name ) ; if ( ! executor . awaitTermination ( 5 , TimeUnit . SECONDS ) ) { log . warn ( "%s did not shutdown properly" , name ) ; } } catch ( InterruptedException e ) { log . warn ( "Interrupted while waiting for %s to shutdown" , name ) ; Thre...
public class ClosureOptimizePrimitives { /** * Converts all of the given call nodes to object literals that are safe to * do so . */ private void processObjectCreateCall ( Node callNode ) { } }
Node curParam = callNode . getSecondChild ( ) ; if ( canOptimizeObjectCreate ( curParam ) ) { Node objNode = IR . objectlit ( ) . srcref ( callNode ) ; while ( curParam != null ) { Node keyNode = curParam ; Node valueNode = curParam . getNext ( ) ; curParam = valueNode . getNext ( ) ; callNode . removeChild ( keyNode )...
public class TagletWriterImpl { /** * { @ inheritDoc } */ public Content returnTagOutput ( Tag returnTag ) { } }
ContentBuilder result = new ContentBuilder ( ) ; result . addContent ( HtmlTree . DT ( HtmlTree . SPAN ( HtmlStyle . returnLabel , new StringContent ( configuration . getText ( "doclet.Returns" ) ) ) ) ) ; result . addContent ( HtmlTree . DD ( htmlWriter . commentTagsToContent ( returnTag , null , returnTag . inlineTag...
public class Strings { /** * Return { @ code true } if the given string is surrounded by the quote character given , and { @ code * false } otherwise . * @ param value The string to inspect . * @ return { @ code true } if the given string is surrounded by the quote character , and { @ code * false } otherwise ....
return value != null && value . length ( ) > 1 && value . charAt ( 0 ) == quoteChar && value . charAt ( value . length ( ) - 1 ) == quoteChar ;
public class LikeFunctions { /** * TODO : this should not be callable from SQL */ @ ScalarFunction ( value = "like" , hidden = true ) @ LiteralParameters ( "x" ) @ SqlType ( StandardTypes . BOOLEAN ) public static boolean likeVarchar ( @ SqlType ( "varchar(x)" ) Slice value , @ SqlType ( LikePatternType . NAME ) Regex ...
// Joni can infinite loop with UTF8Encoding when invalid UTF - 8 is encountered . // NonStrictUTF8Encoding must be used to avoid this issue . byte [ ] bytes = value . getBytes ( ) ; return regexMatches ( pattern , bytes ) ;
public class SimpleAsyncManager { protected Runnable createRunnable ( ConcurrentAsyncCall call , String keyword ) { } }
// in caller thread final Map < String , Object > threadCacheMap = inheritThreadCacheContext ( call ) ; final AccessContext accessContext = inheritAccessContext ( call ) ; final CallbackContext callbackContext = inheritCallbackContext ( call ) ; final Map < String , Object > variousContextMap = findCallerVariousContext...
public class HessianSkeleton { /** * Invoke the object with the request from the input stream . * @ param in the Hessian input stream * @ param out the Hessian output stream */ public void invoke ( AbstractHessianInput in , AbstractHessianOutput out ) throws Exception { } }
invoke ( _service , in , out ) ;
public class AddConversionTrackers { /** * Runs the example . * @ param adWordsServices the services factory . * @ param session the session . * @ throws ApiException if the API request failed with one or more service errors . * @ throws RemoteException if the API request failed due to other errors . */ public ...
// Get the ConversionTrackerService . ConversionTrackerServiceInterface service = adWordsServices . get ( session , ConversionTrackerServiceInterface . class ) ; List < ConversionTracker > conversionTrackers = new ArrayList < > ( ) ; // Create an AdWords conversion tracker . AdWordsConversionTracker adWordsConversionTr...
public class ReconfigurationServlet { /** * { @ inheritDoc } */ @ SuppressWarnings ( "unchecked" ) @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws ServletException , IOException { } }
LOG . info ( "POST from address: " + req . getRemoteAddr ( ) + " Values trying to set: " + mapToString ( req . getParameterMap ( ) ) ) ; PrintWriter out = resp . getWriter ( ) ; Reconfigurable reconf = getReconfigurable ( req ) ; String nodeName = reconf . getClass ( ) . getCanonicalName ( ) ; printHeader ( out , nodeN...
public class ConfigRESTHandler { /** * Compute the unique identifier from the id and config . displayId . * If a top level configuration element has an id , the id is the unique identifier . * Otherwise , the config . displayId is the unique identifier . * @ param configDisplayId config . displayId of configurati...
return id == null || configDisplayId . matches ( ".*/.*\\[.*\\].*" ) ? configDisplayId : id ;
public class Search { /** * Removes a stop criterion . In case this stop criterion had not been added , < code > false < / code > is returned . * Note that this method may only be called when the search is idle . * @ param stopCriterion stop criterion to be removed * @ return < code > true < / code > if the stop ...
// acquire status lock synchronized ( statusLock ) { // assert idle assertIdle ( "Cannot remove stop criterion." ) ; // remove from checker if ( stopCriterionChecker . remove ( stopCriterion ) ) { // log LOGGER . debug ( "{}: removed stop criterion {}" , this , stopCriterion ) ; return true ; } else { return false ; } ...
public class NetworkEndpointGroupClient { /** * Retrieves the list of network endpoint groups that are located in the specified project and * zone . * < p > Sample code : * < pre > < code > * try ( NetworkEndpointGroupClient networkEndpointGroupClient = NetworkEndpointGroupClient . create ( ) ) { * ProjectZon...
ListNetworkEndpointGroupsHttpRequest request = ListNetworkEndpointGroupsHttpRequest . newBuilder ( ) . setZone ( zone == null ? null : zone . toString ( ) ) . build ( ) ; return listNetworkEndpointGroups ( request ) ;
public class HotdeployBehavior { @ Override protected ComponentDef getComponentDef ( LaContainer container , Object key ) { } }
synchronized ( this ) { // to avoid too - many registration of async hot - deploy ( basically job ) return doGetComponentDef ( container , key ) ; }
public class Telemetry { /** * Initialize the telemetry connector * @ param conn connection with the session to use for the connector * @ param flushSize maximum size of telemetry batch before flush * @ return a telemetry connector */ public static Telemetry createTelemetry ( Connection conn , int flushSize ) { }...
try { return createTelemetry ( conn . unwrap ( SnowflakeConnectionV1 . class ) . getSfSession ( ) , flushSize ) ; } catch ( SQLException ex ) { logger . debug ( "input connection is not a SnowflakeConnection" ) ; return null ; }
public class GeoPackageTextOutput { /** * Text output from a Contents * @ param contents * contents * @ return text */ public String textOutput ( Contents contents ) { } }
StringBuilder output = new StringBuilder ( ) ; output . append ( "\t" + Contents . COLUMN_TABLE_NAME + ": " + contents . getTableName ( ) ) ; output . append ( "\n\t" + Contents . COLUMN_DATA_TYPE + ": " + contents . getDataType ( ) ) ; output . append ( "\n\t" + Contents . COLUMN_IDENTIFIER + ": " + contents . getIden...
public class ValueMatcherBuilder { /** * 处理数组形式表达式 < br > * 处理的形式包括 : * < ul > * < li > < strong > a < / strong > 或 < strong > * < / strong > < / li > * < li > < strong > a , b , c , d < / strong > < / li > * < / ul > * @ param value 子表达式值 * @ param parser 针对这个字段的解析器 * @ return 值列表 */ private static Lis...
final List < Integer > values = new ArrayList < > ( ) ; final List < String > parts = StrUtil . split ( value , StrUtil . C_COMMA ) ; for ( String part : parts ) { CollectionUtil . addAllIfNotContains ( values , parseStep ( part , parser ) ) ; } return values ;
public class JmsJcaManagedConnectionFactoryImpl { /** * Returns the map of properties required by TRM . * @ return the map of TRM properties */ Map getTrmProperties ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "getTrmProperties" ) ; } final Map trmProperties = new HashMap ( ) ; final String trmBusName = getBusName ( ) ; if ( ( trmBusName != null ) && ( ! trmBusName . equals ( "" ) ) ) { trmProperties . put ( SibTrmC...
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ @ Override public EClass getIfcMemberStandardCase ( ) { } }
if ( ifcMemberStandardCaseEClass == null ) { ifcMemberStandardCaseEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 381 ) ; } return ifcMemberStandardCaseEClass ;
public class ContinuedFraction { /** * Evaluates the continued fraction at the value x . * The implementation of this method is based on the modified Lentz algorithm as described * on page 18 ff . in : * < ul > * < li > * I . J . Thompson , A . R . Barnett . " Coulomb and Bessel Functions of Complex Arguments...
final double small = 1e-50 ; double hPrev = getA ( 0 , x ) ; // use the value of small as epsilon criteria for zero checks if ( Precision . isEquals ( hPrev , 0.0 , small ) ) { hPrev = small ; } int n = 1 ; double dPrev = 0.0 ; double cPrev = hPrev ; double hN = hPrev ; while ( n < maxIterations ) { final double a = ge...
public class BitReader { /** * Reads the next length - bits from the input . * The maximum value of bits that could be read is 31 . ( Maximum value of a * positive number that could be stored in an integer without any * conversion . ) * @ param length * number of bits to read * @ return content as integer v...
if ( length > 31 ) { throw ErrorFactory . createDecodingException ( ErrorKeys . DIFFTOOL_DECODING_VALUE_OUT_OF_RANGE , "more than maximum length: " + length ) ; } int v , b = 0 ; for ( int i = length - 1 ; i >= 0 ; i -- ) { v = readBit ( ) ; if ( v == - 1 ) { if ( i != length - 1 ) { throw ErrorFactory . createDecoding...
public class HttpRequestBuilder { /** * How many times to retry if the intial attempt fails ? */ public HttpRequestBuilder withRetries ( int n ) { } }
Preconditions . checkArg ( n >= 0 , "number of retries must be >= 0" ) ; this . numAttempts = n + 1 ; entry . withMaxAttempts ( numAttempts ) ; return this ;
public class CmsExplorerTypeSettings { /** * Sets the basic attributes of the type settings . < p > * @ param name the name of the type setting * @ param key the key name of the explorer type setting * @ param icon the icon path and file name of the explorer type setting */ public void setTypeAttributes ( String ...
setName ( name ) ; setKey ( key ) ; setIcon ( icon ) ;
public class AppServiceCertificateOrdersInner { /** * Create or update a certificate purchase order . * Create or update a certificate purchase order . * @ param resourceGroupName Name of the resource group to which the resource belongs . * @ param certificateOrderName Name of the certificate order . * @ param ...
return updateWithServiceResponseAsync ( resourceGroupName , certificateOrderName , certificateDistinguishedName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class BindingsProcessor { /** * Create an explicit binding for the Ginjector . */ private void registerGinjectorBinding ( ) { } }
Key < ? extends Ginjector > ginjectorKey = Key . get ( ginjectorInterface ) ; rootGinjectorBindings . addBinding ( ginjectorKey , bindingFactory . getGinjectorBinding ( ) ) ;
public class EditText { /** * < p > Sets the listener that will be notified when the user selects an item * in the drop down list . < / p > * < p > Only work when autoComplete mode is { @ link # AUTOCOMPLETE _ MODE _ SINGLE } or { @ link # AUTOCOMPLETE _ MODE _ MULTI } < / p > * @ param l the item selected listen...
if ( mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE ) return ; ( ( AutoCompleteTextView ) mInputView ) . setOnItemSelectedListener ( l ) ;
public class Bindable { /** * Create a new { @ link Bindable } { @ link Set } of the specified element type . * @ param < E > the element type * @ param elementType the set element type * @ return a { @ link Bindable } instance */ public static < E > Bindable < Set < E > > setOf ( Class < E > elementType ) { } }
return of ( ResolvableType . forClassWithGenerics ( Set . class , elementType ) ) ;
public class PutLogEventsRequest { /** * The log events . * < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use * { @ link # setLogEvents ( java . util . Collection ) } or { @ link # withLogEvents ( java . util . Collection ) } if you want to * override the existing values . ...
if ( this . logEvents == null ) { setLogEvents ( new com . amazonaws . internal . SdkInternalList < InputLogEvent > ( logEvents . length ) ) ; } for ( InputLogEvent ele : logEvents ) { this . logEvents . add ( ele ) ; } return this ;
public class GeometryExpression { /** * Returns 1 ( TRUE ) if this geometric object “ spatially overlaps ” anotherGeometry . * @ param geometry other geometry * @ return true , if overlaps */ public BooleanExpression overlaps ( Expression < ? extends Geometry > geometry ) { } }
return Expressions . booleanOperation ( SpatialOps . OVERLAPS , mixin , geometry ) ;
public class VirtualMachineScaleSetsInner { /** * Perform maintenance on one or more virtual machines in a VM scale set . * @ param resourceGroupName The name of the resource group . * @ param vmScaleSetName The name of the VM scale set . * @ param instanceIds The virtual machine scale set instance ids . Omitting...
return ServiceFuture . fromResponse ( performMaintenanceWithServiceResponseAsync ( resourceGroupName , vmScaleSetName , instanceIds ) , serviceCallback ) ;
public class TrackedTorrent { /** * Remove unfresh peers from this torrent . * Collect and remove all non - fresh peers from this torrent . This is * usually called by the periodic peer collector of the BitTorrent tracker . */ public void collectUnfreshPeers ( int expireTimeoutSec ) { } }
for ( TrackedPeer peer : this . peers . values ( ) ) { if ( ! peer . isFresh ( expireTimeoutSec ) ) { this . peers . remove ( new PeerUID ( peer . getAddress ( ) , this . getHexInfoHash ( ) ) ) ; } }