signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class VirtualNetworkGatewaysInner { /** * This operation retrieves a list of routes the virtual network gateway has learned , including routes learned from BGP peers . * @ param resourceGroupName The name of the resource group . * @ param virtualNetworkGatewayName The name of the virtual network gateway . ...
return getLearnedRoutesWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName ) . map ( new Func1 < ServiceResponse < GatewayRouteListResultInner > , GatewayRouteListResultInner > ( ) { @ Override public GatewayRouteListResultInner call ( ServiceResponse < GatewayRouteListResultInner > response ) { re...
public class GeneratedAnnotationSpecs { /** * Returns { @ code @ Generated ( " processorClass " } if either { @ code * javax . annotation . processing . Generated } or { @ code javax . annotation . Generated } is { @ linkplain * GeneratedAnnotations # generatedAnnotation ( Elements ) available at compile time } . ...
return generatedAnnotationSpecBuilder ( elements , processorClass ) . map ( AnnotationSpec . Builder :: build ) ;
public class ForkJoinPool { /** * Constructs and tries to install a new external queue , * failing if the workQueues array already has a queue at * the given index . * @ param index the index of the new queue */ private void tryCreateExternalQueue ( int index ) { } }
AuxState aux ; if ( ( aux = auxState ) != null && index >= 0 ) { WorkQueue q = new WorkQueue ( this , null ) ; q . config = index ; q . scanState = ~ UNSIGNALLED ; q . qlock = 1 ; // lock queue boolean installed = false ; aux . lock ( ) ; try { // lock pool to install WorkQueue [ ] ws ; if ( ( ws = workQueues ) != null...
public class AtomContainerManipulator { /** * Get the summed natural abundance of all atoms in an AtomContainer * @ param atomContainer The IAtomContainer to manipulate * @ return The summed natural abundance of all atoms in this AtomContainer . */ public static double getTotalNaturalAbundance ( IAtomContainer atom...
try { Isotopes isotopes = Isotopes . getInstance ( ) ; double abundance = 1.0 ; double hAbundance = isotopes . getMajorIsotope ( 1 ) . getNaturalAbundance ( ) ; int nImplH = 0 ; for ( IAtom atom : atomContainer . atoms ( ) ) { if ( atom . getImplicitHydrogenCount ( ) == null ) throw new IllegalArgumentException ( "an a...
public class MonitoringProxyActivator { /** * Reflectively locate the { @ code setClassAvailableTarget } method on * the proxy at runtime . * @ return the { @ code setProcessCandidateTarget } method instance * @ throws Exception if a reflection error occurred */ Method findClassAvailableProxySetClassAvailableTarg...
Class < ? > proxyClass = Class . forName ( CLASS_AVAILABLE_PROXY_CLASS_NAME ) ; Method method = ReflectionHelper . getDeclaredMethod ( proxyClass , "setClassAvailableTarget" , Object . class , Method . class ) ; ReflectionHelper . setAccessible ( method , true ) ; return method ;
public class BTreeLeaf { /** * Returns the schema of the B - tree leaf records . * @ param keyType * the type of the indexed field * @ return the schema of the index records */ static Schema schema ( SearchKeyType keyType ) { } }
Schema sch = new Schema ( ) ; for ( int i = 0 ; i < keyType . length ( ) ; i ++ ) sch . addField ( keyFieldName ( i ) , keyType . get ( i ) ) ; sch . addField ( SCH_RID_BLOCK , BIGINT ) ; sch . addField ( SCH_RID_ID , INTEGER ) ; return sch ;
public class ReflectionConfig { /** * { @ link Reflections } bean . * @ return bean */ @ Bean public Reflections reflections ( ) { } }
return new Reflections ( new ConfigurationBuilder ( ) . setUrls ( ClasspathHelper . forPackage ( scanPackage ) ) . setScanners ( new MethodAnnotationsScanner ( ) ) ) ;
public class Packer { /** * Get String stored in UTF - 8 format ( encoded as : Int32 - Length + bytes ) * @ return * @ see # putString ( String ) */ public String getStringF ( ) { } }
int len = getInt ( ) ; byte [ ] utf = new byte [ len ] ; System . arraycopy ( buf , bufPosition , utf , 0 , utf . length ) ; bufPosition += utf . length ; return new String ( utf , 0 , len , charsetUTF8 ) ;
public class DCFields { /** * Ensure the dc : identifiers include the pid of the target object * @ param targetPid * @ return String xml */ public String getAsXML ( String targetPid ) { } }
ReadableCharArrayWriter out = new ReadableCharArrayWriter ( 512 ) ; try { getAsXML ( targetPid , out ) ; } catch ( IOException wonthappen ) { throw new RuntimeException ( wonthappen ) ; } return out . getString ( ) ;
public class DrizzleConnection { /** * Creates a default < code > PreparedStatement < / code > object capable of returning the auto - generated keys designated * by the given array . This array contains the names of the columns in the target table that contain the * auto - generated keys that should be returned . T...
if ( columnNames != null && columnNames . length == 1 && columnNames [ 0 ] . equals ( "insert_id" ) ) { return prepareStatement ( sql ) ; } throw SQLExceptionMapper . getSQLException ( "Only one auto generated key is supported, and it is called insert_id" ) ;
public class SimonUtils { /** * Returns min / max counter values in human readable form - if the value is max or min long value * it is considered unused and string " undef " is returned . * @ param minmax counter extreme value * @ return counter value or " undef " if counter contains { @ code Long . MIN _ VALUE ...
if ( minmax == Long . MAX_VALUE || minmax == Long . MIN_VALUE ) { return UNDEF_STRING ; } return String . valueOf ( minmax ) ;
public class DepictionGenerator { /** * Specifies that reactions with atom - atom mappings should have their reactants / product * coordinates aligned . Default : true . * @ param val setting value * @ return new generator for method chaining */ public DepictionGenerator withMappedRxnAlign ( boolean val ) { } }
DepictionGenerator copy = new DepictionGenerator ( this ) ; copy . alignMappedReactions = val ; return copy ;
public class WebSockets { /** * Sends a complete close message , invoking the callback when complete * @ param closeMessage The close message * @ param wsChannel The web socket channel * @ param callback The callback to invoke on completion */ public static void sendClose ( final CloseMessage closeMessage , final...
sendClose ( closeMessage , wsChannel , callback , null ) ;
public class JavaParser { /** * src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 392:1 : interfaceBodyDeclaration : ( ( modifier ) * interfaceMemberDecl | ' ; ' ) ; */ public final void interfaceBodyDeclaration ( ) throws RecognitionException { } }
int interfaceBodyDeclaration_StartIndex = input . index ( ) ; try { if ( state . backtracking > 0 && alreadyParsedRule ( input , 27 ) ) { return ; } // src / main / resources / org / drools / compiler / semantics / java / parser / Java . g : 393:5 : ( ( modifier ) * interfaceMemberDecl | ' ; ' ) int alt40 = 2 ; int LA4...
public class Gauge { /** * Defines if the knob is visible . * @ param VISIBLE */ public void setKnobVisible ( final boolean VISIBLE ) { } }
if ( null == knobVisible ) { _knobVisible = VISIBLE ; fireUpdateEvent ( VISIBILITY_EVENT ) ; } else { knobVisible . set ( VISIBLE ) ; }
public class WListRenderer { /** * Paints the given WList . * @ param component the WList to paint . * @ param renderContext the RenderContext to paint to . */ @ Override public void doRender ( final WComponent component , final WebXmlRenderContext renderContext ) { } }
WList list = ( WList ) component ; XmlStringBuilder xml = renderContext . getWriter ( ) ; WList . Type type = list . getType ( ) ; WList . Separator separator = list . getSeparator ( ) ; Size gap = list . getSpace ( ) ; String gapString = gap == null ? null : gap . toString ( ) ; xml . appendTagOpen ( "ui:panel" ) ; xm...
public class FeatureShapes { /** * Remove all map shapes in the database and table from the map , excluding shapes with the excluded types * @ param database GeoPackage database * @ param table table name * @ param excludedTypes Google Map Shape Types to exclude from map removal * @ return count of removed feat...
int count = 0 ; Map < Long , FeatureShape > featureIds = getFeatureIds ( database , table ) ; if ( featureIds != null ) { Iterator < Long > iterator = featureIds . keySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { long featureId = iterator . next ( ) ; FeatureShape featureShape = getFeatureShape ( featureI...
public class ViewManager { /** * / / created for GH352 * Returns a Template instance by given path * @ param path * the path to the template * @ return * A template found by path or null if not found */ @ SuppressWarnings ( "unused" ) public Template getTemplate ( String path ) { } }
ActContext . Base ctx = ActContext . Base . currentContext ( ) ; if ( null != ctx ) { String curPath = ctx . templatePath ( ) ; ctx . templateLiteral ( path ) ; try { return load ( ctx ) ; } finally { ctx . templatePath ( curPath ) ; } } final String templatePath = S . ensureStartsWith ( path , '/' ) ; Template templat...
public class GVRAudioSource { /** * Preloads a sound file . * @ param soundFile path / name of the file to be played . */ public void load ( String soundFile ) { } }
if ( mSoundFile != null ) { unload ( ) ; } mSoundFile = soundFile ; if ( mAudioListener != null ) { mAudioListener . getAudioEngine ( ) . preloadSoundFile ( soundFile ) ; Log . d ( "SOUND" , "loaded audio file %s" , getSoundFile ( ) ) ; }
public class Eigen { /** * Computes the eigenvalues and eigenvectors of a general matrix . * @ return an array of ComplexDoubleMatrix objects containing the eigenvectors * stored as the columns of the first matrix , and the eigenvalues as the * diagonal elements of the second matrix . */ public static ComplexDoub...
A . assertSquare ( ) ; // setting up result arrays DoubleMatrix WR = new DoubleMatrix ( A . rows ) ; DoubleMatrix WI = WR . dup ( ) ; DoubleMatrix VR = new DoubleMatrix ( A . rows , A . rows ) ; SimpleBlas . geev ( 'N' , 'V' , A . dup ( ) , WR , WI , dummyDouble , VR ) ; // transferring the result ComplexDoubleMatrix E...
public class TangoEventsAdapter { public void removeTangoQualityChangeListener ( ITangoQualityChangeListener listener , String attrName ) throws DevFailed { } }
synchronized ( moni ) { TangoQualityChange tangoQualityChange ; String key = deviceName + "/" + attrName ; if ( ( tangoQualityChange = tango_quality_change_source . get ( key ) ) != null ) tangoQualityChange . removeTangoQualityChangeListener ( listener ) ; }
public class AsynchronousRequest { /** * For more info on WvW matches API go < a href = " https : / / wiki . guildwars2 . com / wiki / API : 2 / wvw / matches " > here < / a > < br / > * Give user the access to { @ link Callback # onResponse ( Call , Response ) } and { @ link Callback # onFailure ( Call , Throwable )...
gw2API . getWvWMatchOverviewUsingWorld ( Integer . toString ( worldID ) ) . enqueue ( callback ) ;
public class PaymentSummaryBuilder { /** * Adds a { @ link PriceLabel } to the { @ link PaymentSummary } . * @ param label * the { @ link PriceLabel # label } . * @ param amount * the { @ link PriceLabel # amount } . * @ return this builder . */ public PaymentSummaryBuilder addPriceLabel ( String label , Stri...
PriceLabel priceLabel = new PriceLabel ( label , amount ) ; return addPriceLabel ( priceLabel ) ;
public class ConfusionMatrix { /** * Confusion matrix printed to text by toString can be parsed back * @ param text input text * @ return confusion matrix * @ throws IllegalArgumentException if input is malformed */ public static ConfusionMatrix parseFromText ( String text ) throws IllegalArgumentException { } }
try { String [ ] lines = text . split ( "\n" ) ; String [ ] l = lines [ 0 ] . split ( "\\s+" ) ; List < String > labels = new ArrayList < > ( ) ; for ( String aL : l ) { if ( ! aL . isEmpty ( ) ) { labels . add ( aL ) ; } } ConfusionMatrix result = new ConfusionMatrix ( ) ; for ( int i = 1 ; i < lines . length ; i ++ )...
public class ViewUtils { /** * Get position of center child in X Axes */ public static int getCenterXChildPosition ( RecyclerView recyclerView ) { } }
int childCount = recyclerView . getChildCount ( ) ; for ( int i = 0 ; i < childCount ; i ++ ) { View child = recyclerView . getChildAt ( i ) ; if ( isChildInCenterX ( recyclerView , child ) ) { return recyclerView . getChildAdapterPosition ( child ) ; } } return childCount ;
public class ClassHierarchyImpl { /** * A helper method that returns the parsed default value of a given * NamedParameter . * @ return null or an empty set if there is no default value , the default value ( or set of values ) otherwise . * @ throws ClassHierarchyException if a default value was specified , but co...
final String [ ] vals = name . getDefaultInstanceAsStrings ( ) ; final T [ ] ret = ( T [ ] ) new Object [ vals . length ] ; for ( int i = 0 ; i < vals . length ; i ++ ) { final String val = vals [ i ] ; try { ret [ i ] = parse ( name , val ) ; } catch ( final ParseException e ) { throw new ClassHierarchyException ( "Co...
public class MiniTemplatorParser { /** * The main block is an implicitly defined block that covers the whole template . */ private void beginMainBlock ( ) { } }
int blockNo = registerBlock ( null ) ; BlockTabRec btr = blockTab [ blockNo ] ; btr . tPosBegin = 0 ; btr . tPosContentsBegin = 0 ; openBlocksTab [ currentNestingLevel ] = blockNo ; currentNestingLevel ++ ;
public class PosTagger { /** * < p > Part - of - speech tag a string passed in on the command line . For * example : * < p > java opennlp . tools . lang . spanish . PosTagger - test " Sr . Smith da el auto a sus hermano en Lunes . " */ public static void main ( String [ ] args ) throws IOException { } }
if ( args . length == 0 ) { System . err . println ( "Usage: PosTaggerME [-td tagdict] model < tokenized_sentences" ) ; System . err . println ( " PosTaggerME -test model \"sentence\"" ) ; System . exit ( 1 ) ; } int ai = 0 ; boolean test = false ; String tagdict = null ; while ( ai < args . length && args [ ai ]...
public class RedirectSupport { /** * gets the right value , encodes it , and prints or stores it */ @ Override public int doEndTag ( ) throws JspException { } }
String result ; // the eventual result // add ( already encoded ) parameters String baseUrl = UrlSupport . resolveUrl ( url , context , pageContext ) ; result = params . aggregateParams ( baseUrl ) ; // if the URL is relative , rewrite it with ' redirect ' encoding rules HttpServletResponse response = ( ( HttpServletRe...
public class ExecutionGroupVertex { /** * Creates the initial execution vertices managed by this group vertex . * @ param initialNumberOfVertices * the initial number of execution vertices * @ throws GraphConversionException * thrown if the number of execution vertices for this group vertex cannot be set to the...
// If the requested number of group vertices does not change , do nothing if ( initalNumberOfVertices == this . getCurrentNumberOfGroupMembers ( ) ) { return ; } // Make sure the method is only called for the initial setup of the graph if ( this . getCurrentNumberOfGroupMembers ( ) != 1 ) { throw new IllegalStateExcept...
public class JsonPropertyExpander { /** * Populates the embedded object property with the relevant field values . * @ param entity the entity * @ param currentNode the current node to to process * @ param property the embedded object property * @ param field the Java field * @ param node the node * @ param ...
for ( Map . Entry < String , Object > entry : ( ( Map < String , Object > ) currentNode ) . entrySet ( ) ) { if ( findAppropriateElement ( entity , property , field , node , map , entry ) ) { break ; } }
public class ConcurrentLinkedHashMap { /** * Drains the read buffer up to an amortized threshold . */ @ GuardedBy ( "evictionLock" ) void drainWriteBuffer ( ) { } }
for ( int i = 0 ; i < WRITE_BUFFER_DRAIN_THRESHOLD ; i ++ ) { final Runnable task = writeBuffer . poll ( ) ; if ( task == null ) { break ; } task . run ( ) ; }
public class OpenPgpContact { /** * Return a { @ link Set } of { @ link OpenPgpV4Fingerprint } s of all keys of the contact , which have the trust state * { @ link OpenPgpStore . Trust # undecided } . * @ return undecided fingerprints * @ throws IOException IO error * @ throws PGPException PGP error */ public S...
return getFingerprintsOfKeysWithState ( getAnyPublicKeys ( ) , OpenPgpTrustStore . Trust . undecided ) ;
public class Unchecked { /** * Wrap a { @ link CheckedToIntFunction } in a { @ link ToIntFunction } . * Example : * < code > < pre > * map . computeIfAbsent ( " key " , Unchecked . toIntFunction ( k - > { * if ( k . length ( ) > 10) * throw new Exception ( " Only short strings allowed " ) ; * return 42; *...
return toIntFunction ( function , THROWABLE_TO_RUNTIME_EXCEPTION ) ;
public class AbstractJsonProvider { /** * Removes a value in an object or array * @ param obj an array or an object * @ param key a String key or a numerical index to remove */ @ SuppressWarnings ( "unchecked" ) public void removeProperty ( Object obj , Object key ) { } }
if ( isMap ( obj ) ) ( ( Map ) obj ) . remove ( key . toString ( ) ) ; else { List list = ( List ) obj ; int index = key instanceof Integer ? ( Integer ) key : Integer . parseInt ( key . toString ( ) ) ; list . remove ( index ) ; }
public class DeleteParametersResult { /** * The names of the deleted parameters . * @ param deletedParameters * The names of the deleted parameters . */ public void setDeletedParameters ( java . util . Collection < String > deletedParameters ) { } }
if ( deletedParameters == null ) { this . deletedParameters = null ; return ; } this . deletedParameters = new com . amazonaws . internal . SdkInternalList < String > ( deletedParameters ) ;
public class MappeableBitmapContainer { /** * Counts how many runs there is in the bitmap , up to a maximum * @ param mustNotExceed maximum of runs beyond which counting is pointless * @ return estimated number of courses */ public int numberOfRunsLowerBound ( int mustNotExceed ) { } }
int numRuns = 0 ; if ( BufferUtil . isBackedBySimpleArray ( bitmap ) ) { long [ ] b = bitmap . array ( ) ; for ( int blockOffset = 0 ; blockOffset < b . length ; blockOffset += BLOCKSIZE ) { for ( int i = blockOffset ; i < blockOffset + BLOCKSIZE ; i ++ ) { long word = b [ i ] ; numRuns += Long . bitCount ( ( ~ word ) ...
public class QueueContainer { /** * Polls an item on the backup replica . The item ID is predetermined * when executing the poll operation on the partition owner . * Executed on the backup replica * @ param itemId the item ID as determined by the primary replica */ public void pollBackup ( long itemId ) { } }
QueueItem item = getBackupMap ( ) . remove ( itemId ) ; if ( item != null ) { // for stats age ( item , Clock . currentTimeMillis ( ) ) ; }
public class ns_ssl_certkey { /** * < pre > * Performs generic data validation for the operation to be performed * < / pre > */ protected void validate ( String operationType ) throws Exception { } }
super . validate ( operationType ) ; MPSString id_validator = new MPSString ( ) ; id_validator . setConstraintIsReq ( MPSConstants . DELETE_CONSTRAINT , true ) ; id_validator . setConstraintIsReq ( MPSConstants . MODIFY_CONSTRAINT , true ) ; id_validator . validate ( operationType , id , "\"id\"" ) ; MPSString ssl_cert...
public class JdbcUtil { /** * Imports the data from < code > DataSet < / code > to database . * @ param dataset * @ param conn * @ param insertSQL the column order in the sql must be consistent with the column order in the DataSet . Here is sample about how to create the sql : * < pre > < code > * List < Stri...
return importData ( dataset , 0 , dataset . size ( ) , conn , insertSQL , stmtSetter ) ;
public class FileAccessPermissions { /** * This method sets the flag ( s ) given by { @ code bitMask } of this this { @ link # getMaskBits ( ) mask } for the given * { @ code fileModeClass } to the given value ( { @ code flag } ) . * @ param fileModeClass is the class of access ( { @ link FileAccessClass # USER } ,...
setBits ( shiftMask ( fileModeClass , bitMask ) , flag ) ;
public class ServerCore { /** * Removes a client from the internal data structures . This also removes * the client from all the events to which he subscribed . * @ param clientId the client ' s id for the client we want to remove * @ return true if the client was present in the internal data structures , * fal...
ClientData clientData = clientsData . get ( clientId ) ; if ( clientData == null ) { return false ; } dispatcher . removeClient ( clientId ) ; // Iterate over all the sets in which this client figures as subscribed // and remove it synchronized ( subscriptions ) { for ( Set < Long > subscribedSet : clientData . subscri...
public class ConnectionUtility { /** * Destroy a data source got from or created by ConnectionUtility before . * If any exception occurred , it will be logged but never propagated . * @ param dataSource the data source to be destroyed * @ param force Whether try to destroy the data source even if it was created u...
synchronized ( dataSourcesStructureLock ) { String dsName = null ; for ( Map . Entry < String , DataSource > dsEntry : dataSources . entrySet ( ) ) { DataSource ds = dsEntry . getValue ( ) ; if ( ds == dataSource ) { dsName = dsEntry . getKey ( ) ; break ; } } if ( force || dsName != null ) { for ( Map . Entry < String...
public class Job { /** * Signal exceptional cancellation of this job . * @ param ex exception causing the termination of job . */ public void cancel ( Throwable ex ) { } }
if ( ex instanceof JobCancelledException || ex . getMessage ( ) != null && ex . getMessage ( ) . contains ( "job was cancelled" ) ) return ; if ( ex instanceof IllegalArgumentException || ex . getCause ( ) instanceof IllegalArgumentException ) { cancel ( "Illegal argument: " + ex . getMessage ( ) ) ; return ; } StringW...
public class UploadNotificationConfig { /** * Sets the same notification icon for all the notification statuses . * @ param resourceID Resource ID of the icon to use * @ return { @ link UploadNotificationConfig } */ public final UploadNotificationConfig setIconForAllStatuses ( int resourceID ) { } }
progress . iconResourceID = resourceID ; completed . iconResourceID = resourceID ; error . iconResourceID = resourceID ; cancelled . iconResourceID = resourceID ; return this ;
public class ByteBufPool { /** * Appends one ByteBuf to another ByteBuf . If target ByteBuf * can ' t accommodate the ByteBuf to be appended , a new ByteBuf * is created which contains both target and source ByteBufs data . * The source ByteBuf is recycled after append . * If target ByteBuf has no readable byte...
assert ! to . isRecycled ( ) && ! from . isRecycled ( ) ; if ( to . readRemaining ( ) == 0 ) { to . recycle ( ) ; return from ; } to = ensureWriteRemaining ( to , from . readRemaining ( ) ) ; to . put ( from ) ; from . recycle ( ) ; return to ;
public class DRL5Expressions { /** * src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 588:1 : identifierSuffix : ( ( LEFT _ SQUARE RIGHT _ SQUARE ) = > ( LEFT _ SQUARE RIGHT _ SQUARE ) + DOT class _ key | ( ( LEFT _ SQUARE ) = > LEFT _ SQUARE expression RIGHT _ SQUARE ) + | arguments ) ; ...
Token LEFT_SQUARE16 = null ; Token RIGHT_SQUARE17 = null ; Token DOT18 = null ; Token LEFT_SQUARE19 = null ; Token RIGHT_SQUARE20 = null ; try { // src / main / resources / org / drools / compiler / lang / DRL5Expressions . g : 589:5 : ( ( LEFT _ SQUARE RIGHT _ SQUARE ) = > ( LEFT _ SQUARE RIGHT _ SQUARE ) + DOT class ...
public class KnowledgeOperations { /** * Gets a list map . * @ param message the message * @ param expressionMappings the expression mappings * @ param expand whether to expand * @ param undefinedVariable the undefined variable name * @ return the list map */ public static Map < String , List < Object > > get...
return getListMap ( message , expressionMappings , expand , undefinedVariable , null ) ;
public class CredentialsInner { /** * Retrieve the credential identified by credential name . * @ param resourceGroupName Name of an Azure Resource group . * @ param automationAccountName The name of the automation account . * @ param credentialName The name of credential . * @ throws IllegalArgumentException t...
return getWithServiceResponseAsync ( resourceGroupName , automationAccountName , credentialName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CommerceSubscriptionEntryUtil { /** * Returns the last commerce subscription entry in the ordered set where subscriptionStatus = & # 63 ; . * @ param subscriptionStatus the subscription status * @ param orderByComparator the comparator to order the set by ( optionally < code > null < / code > ) * @ r...
return getPersistence ( ) . fetchBySubscriptionStatus_Last ( subscriptionStatus , orderByComparator ) ;
public class DefaultMobicentsCluster { /** * ( non - Javadoc ) * @ see MobicentsCluster # isSingleMember ( ) */ public boolean isSingleMember ( ) { } }
final Address localAddress = getLocalAddress ( ) ; if ( localAddress != null ) { final List < Address > clusterMembers = getClusterMembers ( ) ; return clusterMembers . size ( ) == 1 ; } else { return true ; }
public class PactDslJsonRootValue { /** * Value that must match the provided date format * @ param format date format to match */ public static PactDslJsonRootValue date ( String format ) { } }
FastDateFormat instance = FastDateFormat . getInstance ( format ) ; PactDslJsonRootValue value = new PactDslJsonRootValue ( ) ; value . generators . addGenerator ( Category . BODY , "" , new DateGenerator ( format ) ) ; value . setValue ( instance . format ( new Date ( DATE_2000 ) ) ) ; value . setMatcher ( value . mat...
public class AbstractChorusOutputWriter { /** * This is an extension point to change Chorus output * The user can provider their own OutputWriter which extends the default and * overrides getPrintWriter ( ) to return a writer configured for a different output stream * n . b . this method will be called frequently...
if ( printWriter == null || printStream != ChorusOut . out ) { printWriter = new PrintWriter ( ChorusOut . out ) ; printStream = ChorusOut . out ; } return printWriter ;
public class BaseMessageItemStream { /** * Gets the destination low messages limit currently being used by this localization . * @ return */ public long getDestLowMsgs ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestLowMsgs" ) ; SibTr . exit ( tc , "getDestLowMsgs" , Long . valueOf ( _destLowMsgs ) ) ; } return _destLowMsgs ;
public class Datamodel { /** * Creates a { @ link TimeValue } for a given date and time . The precision is * automatically set to { @ link TimeValue # PREC _ SECOND } . * @ param year * a year number , where 0 refers to 1BCE * @ param month * a month number between 1 and 12 * @ param day * a day number be...
return factory . getTimeValue ( year , month , day , hour , minute , second , TimeValue . PREC_SECOND , 0 , 0 , timezoneOffset , calendarModel ) ;
public class DefaultGroovyMethods { /** * Iterates over the collection returning each element that matches * using the IDENTITY Closure as a filter - effectively returning all elements which satisfy Groovy truth . * Example : * < pre class = " groovyTestCase " > * def items = [ 1 , 2 , 0 , false , true , ' ' , ...
return grep ( self , Closure . IDENTITY ) ;
public class ReactiveMongoOperationsSessionRepository { /** * Gets the { @ link MongoSession } by the { @ link MongoSession # getId ( ) } or { @ link Mono # empty ( ) } if no * { @ link MongoSession } is found . * @ param id the { @ link MongoSession # getId ( ) } to lookup * @ return the { @ link MongoSession } ...
return findSession ( id ) . map ( document -> convertToSession ( this . mongoSessionConverter , document ) ) . filter ( mongoSession -> ! mongoSession . isExpired ( ) ) . switchIfEmpty ( Mono . defer ( ( ) -> this . deleteById ( id ) . then ( Mono . empty ( ) ) ) ) ;
public class DualInputOperator { /** * Add to the second input the union of the given operators . * @ param input The operator ( s ) to be unioned with the second input . * @ deprecated This method will be removed in future versions . Use the { @ link Union } operator instead . */ @ Deprecated public void addSecond...
this . input2 = Operator . createUnionCascade ( this . input2 , input ) ;
public class VisitStateSet { /** * Adds a visit state to the set , if necessary . * @ param v the state to be added . * @ return true if the state set changed as a result of this operation . */ public boolean add ( final VisitState v ) { } }
// The starting point . int pos = ( int ) ( MurmurHash3 . hash ( v . schemeAuthority ) & mask ) ; // There ' s always an unused entry . while ( visitState [ pos ] != null ) { if ( Arrays . equals ( visitState [ pos ] . schemeAuthority , v . schemeAuthority ) ) return false ; pos = ( pos + 1 ) & mask ; } visitState [ po...
public class ScheduledEventMonitor { /** * Invoked periodically by the timer thread */ @ Override public void run ( ) { } }
try { ScheduledEventQueue queue = ScheduledEventQueue . getSingleton ( ) ; int batch_size = PropertyManager . getIntegerProperty ( PropertyNames . SCHEDULED_EVENTS_BATCH_SIZE , 1000 ) ; int count = 0 ; Date now = new Date ( DatabaseAccess . getCurrentTime ( ) ) ; logger . log ( LogLevel . TRACE , "Processing scheduled ...
public class ProcessorExsltFunction { /** * Must include ; super doesn ' t suffice ! */ protected void appendAndPush ( StylesheetHandler handler , ElemTemplateElement elem ) throws SAXException { } }
// System . out . println ( " ProcessorFunction appendAndPush ( ) " + elem ) ; super . appendAndPush ( handler , elem ) ; // System . out . println ( " originating node " + handler . getOriginatingNode ( ) ) ; elem . setDOMBackPointer ( handler . getOriginatingNode ( ) ) ; handler . getStylesheet ( ) . setTemplate ( ( ...
public class HashUtil { /** * Zobrist Hashing * @ param key 字节数组 * @ param mask 掩码 * @ param tab tab * @ return hash值 */ public static int zobrist ( char [ ] key , int mask , int [ ] [ ] tab ) { } }
int hash , i ; for ( hash = key . length , i = 0 ; i < key . length ; ++ i ) { hash ^= tab [ i ] [ key [ i ] ] ; } return ( hash & mask ) ;
public class StoryFinder { /** * Finds paths from a source URL , allowing for includes / excludes patterns . * Paths found are normalised by { @ link StoryFinder # normalise ( List < String > ) } * @ param searchIn the source URL to search in * @ param includes the Array of include patterns , or < code > null < /...
return findPaths ( CodeLocations . getPathFromURL ( searchIn ) , asList ( includes ) , asList ( excludes ) ) ;
public class SessionImpl { /** * { @ inheritDoc } */ public String [ ] getNamespacePrefixes ( ) throws RepositoryException { } }
Collection < String > allPrefixes = new LinkedList < String > ( ) ; allPrefixes . addAll ( namespaces . keySet ( ) ) ; String [ ] permanentPrefixes = workspace . getNamespaceRegistry ( ) . getPrefixes ( ) ; for ( int i = 0 ; i < permanentPrefixes . length ; i ++ ) { if ( ! prefixes . containsKey ( workspace . getNamesp...
public class Component { /** * Callback for the start tag of this component . Should the body be * evaluated again ? * < b > NOTE : < / b > has a parameter to determine to pop the component stack . * @ param writer the output writer . * @ param body the rendered body . * @ param popComponentStack * should t...
assert ( body != null ) ; try { writer . write ( body ) ; } catch ( IOException e ) { throw new StrutsException ( "IOError while writing the body: " + e . getMessage ( ) , e ) ; } if ( popComponentStack ) popComponentStack ( ) ; return false ;
public class BNFHeadersImpl { /** * Print debug information on the headers to the RAS tracing log . */ public void debug ( ) { } }
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "*** Begin Header Debug ***" ) ; HeaderElement elem = this . hdrSequence ; while ( null != elem ) { Tr . debug ( tc , elem . getName ( ) + ": " + elem . getDebugValue ( ) ) ; elem = elem . nextSequence ; } Tr . debug ( tc , "...
public class DivSufSort { /** * Returns the pivot element . */ private int trPivot ( int ISAd , int first , int last ) { } }
int middle ; int t ; t = last - first ; middle = first + t / 2 ; if ( t <= 512 ) { if ( t <= 32 ) { return trMedian3 ( ISAd , first , middle , last - 1 ) ; } else { t >>= 2 ; return trMedian5 ( ISAd , first , first + t , middle , last - 1 - t , last - 1 ) ; } } t >>= 3 ; first = trMedian3 ( ISAd , first , first + t , f...
public class Matrix4f { /** * / * ( non - Javadoc ) * @ see org . joml . Matrix4fc # scaleAround ( float , float , float , float , org . joml . Matrix4f ) */ public Matrix4f scaleAround ( float factor , float ox , float oy , float oz , Matrix4f dest ) { } }
return scaleAround ( factor , factor , factor , ox , oy , oz , dest ) ;
public class AmazonEC2Client { /** * Import single or multi - volume disk images or EBS snapshots into an Amazon Machine Image ( AMI ) . For more * information , see < a * href = " https : / / docs . aws . amazon . com / vm - import / latest / userguide / vmimport - image - import . html " > Importing a VM as an ...
request = beforeClientExecution ( request ) ; return executeImportImage ( request ) ;
public class OutputStreamResponseExtractor { public OutputStream extractData ( final ClientHttpResponse response ) throws IOException { } }
IoUtil . copy ( response . getBody ( ) , _output ) ; return _output ;
public class Period { /** * Returns the duration of this period . If an explicit duration is not * specified , the duration is derived from the end date . * @ return the duration of this period in milliseconds . */ public final TemporalAmount getDuration ( ) { } }
if ( duration == null ) { return TemporalAmountAdapter . fromDateRange ( getStart ( ) , getEnd ( ) ) . getDuration ( ) ; } return duration . getDuration ( ) ;
public class UriBasedVehicleInterfaceMixin { /** * Determine if two URIs refer to the same resource . * The function safely attempts to convert the otherResource parameter to a * URI object before comparing . * @ return true if the address and port match the current in - use values . */ public static boolean same...
try { return createUri ( otherResource ) . equals ( uri ) ; } catch ( DataSourceException e ) { return false ; }
public class location { /** * Use this API to delete location of given name . */ public static base_response delete ( nitro_service client , String ipfrom ) throws Exception { } }
location deleteresource = new location ( ) ; deleteresource . ipfrom = ipfrom ; return deleteresource . delete_resource ( client ) ;
public class ZipUtil { /** * Extracts the specified zip file to the specified location . If { @ code selector } is specified , * then only the entry specified by { @ code selector } ( if { @ code selector } is a filename ) or the * contents of the directory specified by { @ code selector } ( if { @ code selector } ...
final String sourceMethod = "unzip" ; // $ NON - NLS - 1 $ final boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( sourceClass , sourceMethod , new Object [ ] { zipFile , destDir } ) ; } boolean selectorIsFolder = selector != null && selector . charAt ( selector . le...
public class HFCAClient { /** * Generate certificate revocation list . * @ param registrar admin user configured in CA - server * @ param revokedBefore Restrict certificates returned to revoked before this date if not null . * @ param revokedAfter Restrict certificates returned to revoked after this date if not n...
if ( cryptoSuite == null ) { throw new InvalidArgumentException ( "Crypto primitives not set." ) ; } if ( registrar == null ) { throw new InvalidArgumentException ( "registrar is not set" ) ; } try { setUpSSL ( ) ; JsonObjectBuilder factory = Json . createObjectBuilder ( ) ; if ( revokedBefore != null ) { factory . add...
public class Months { /** * Returns a new instance with the specified number of months added . * This instance is immutable and unaffected by this method call . * @ param months the amount of months to add , may be negative * @ return the new period plus the specified number of months * @ throws ArithmeticExcep...
if ( months == 0 ) { return this ; } return Months . months ( FieldUtils . safeAdd ( getValue ( ) , months ) ) ;
public class MapCache { /** * Initialize and start watching the cache . */ @ Override public void start ( boolean block ) throws InterruptedException , ExecutionException { } }
Future < ? > task = m_es . submit ( new ParentEvent ( null ) ) ; if ( block ) { task . get ( ) ; }
public class SwaptionAnalyticApproximation { /** * This function calculate the partial derivative < i > d log ( S ) / d log ( L < sub > k < / sub > ) < / i > for * a given swap rate with respect to a vector of forward rates ( on a given forward rate tenor ) . * It also returns some useful other quantities like the ...
/* * We cache the calculation of the log swaprate derivative . In a calibration this method might be called quite often with the same arguments . */ synchronized ( cachedLogSwaprateDerivativeLock ) { if ( cachedLogSwaprateDerivative != null && liborPeriodDiscretization == cachedLogSwaprateDerivativeTimeDiscretization ....
public class FctBnCnvBnFromRs { /** * < p > Get CnvBnRsToLong ( create and put into map ) . < / p > * @ return requested CnvBnRsToLong * @ throws Exception - an exception */ protected final CnvBnRsToLong < RS > createPutCnvBnRsToLong ( ) throws Exception { } }
CnvBnRsToLong < RS > convrt = new CnvBnRsToLong < RS > ( ) ; // assigning fully initialized object : this . convertersMap . put ( CnvBnRsToLong . class . getSimpleName ( ) , convrt ) ; return convrt ;
public class RelationalOperations { /** * Returns true if the segments of multipathA intersects env _ b */ private static boolean linearPathIntersectsEnvelope_ ( MultiPath multipath_a , Envelope2D env_b , double tolerance , ProgressTracker progress_tracker ) { } }
if ( ! multipath_a . hasNonLinearSegments ( ) ) { Envelope2D env_b_inflated = new Envelope2D ( ) ; env_b_inflated . setCoords ( env_b ) ; env_b_inflated . inflate ( tolerance , tolerance ) ; MultiPathImpl mimpl_a = ( MultiPathImpl ) multipath_a . _getImpl ( ) ; AttributeStreamOfDbl xy = ( AttributeStreamOfDbl ) ( mimpl...
public class JavaScriptScanner { /** * Read general text content of an inline tag , including HTML entities and elements . * Matching pairs of { } are skipped ; the text is terminated by the first * unmatched } . It is an error if the beginning of the next tag is detected . */ @ SuppressWarnings ( "fallthrough" ) p...
skipWhitespace ( ) ; int pos = bp ; int depth = 1 ; loop : while ( bp < buflen ) { switch ( ch ) { case '\n' : case '\r' : case '\f' : newline = true ; // fall through case ' ' : case '\t' : nextChar ( ) ; break ; case '&' : entity ( null ) ; break ; case '<' : newline = false ; html ( ) ; break ; case '{' : newline = ...
public class ApplicationSecurityGroupsInner { /** * Deletes the specified application security group . * @ param resourceGroupName The name of the resource group . * @ param applicationSecurityGroupName The name of the application security group . * @ throws IllegalArgumentException thrown if parameters fail the ...
beginDeleteWithServiceResponseAsync ( resourceGroupName , applicationSecurityGroupName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class ConnectionFactory { /** * Gets the connection . * @ return the connection */ Connection getSingleConnection ( ) { } }
Connection connection = null ; try { Class . forName ( driver ) ; connection = DriverManager . getConnection ( url , user , password ) ; } catch ( SQLException e ) { throw new InitializationException ( "Could not initialize the connection" , e ) ; } catch ( ClassNotFoundException e ) { throw new InitializationException...
public class ServersInner { /** * Updates an existing server . The request body can contain one to many of the properties present in the normal server definition . * @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or t...
return beginUpdateWithServiceResponseAsync ( resourceGroupName , serverName , parameters ) . map ( new Func1 < ServiceResponse < ServerInner > , ServerInner > ( ) { @ Override public ServerInner call ( ServiceResponse < ServerInner > response ) { return response . body ( ) ; } } ) ;
public class FessMessages { /** * Add the created action message for the key ' errors . app . db . already . deleted ' with parameters . * < pre > * message : others might be updated , so retry . * < / pre > * @ param property The property name for the message . ( NotNull ) * @ return this . ( NotNull ) */ pu...
assertPropertyNotNull ( property ) ; add ( property , new UserMessage ( ERRORS_APP_DB_ALREADY_DELETED ) ) ; return this ;
public class HtmlTool { /** * Reorders elements in HTML content so that selected elements are found at the top of the * content . Can be limited to a certain amount , e . g . to bring just the first of selected * elements to the top . * @ param content * HTML content to reorder * @ param selector * CSS sele...
// extract the elements and then prepend them to the remaining body List < Element > extracted = extractElements ( content , selector , amount ) ; if ( extracted . size ( ) > 1 ) { Element body = extracted . get ( 0 ) ; if ( wrapRemaining != null ) { wrapInner ( body , wrapRemaining ) ; } List < Element > elements = ex...
public class KeyStoreManager { /** * This method returns the mapped certificate for a hostname , or generates a " standard " * SSL server certificate issued by the CA to the supplied subject if no mapping has been * created . This is not a true duplication , just a shortcut method * that is adequate for web brows...
String subject = getSubjectForHostname ( hostname ) ; String thumbprint = _subjectMap . get ( subject ) ; if ( thumbprint == null ) { KeyPair kp = getRSAKeyPair ( ) ; X509Certificate newCert = CertificateCreator . generateStdSSLServerCertificate ( kp . getPublic ( ) , getSigningCert ( ) , getSigningPrivateKey ( ) , sub...
public class ToolTip { /** * Add content to the tooltip and show it with the given parameters . * @ param content a list of Labels * @ param left the left position of the tooltip * @ param top the top position of the tooltip */ public void addContentAndShow ( List < Label > content , int left , int top , boolean ...
// Add a closeButton when showCloseButton is true . if ( showCloseButton ) { Label closeButtonLabel = new Label ( " X " ) ; closeButtonLabel . addStyleName ( ToolTipResource . INSTANCE . css ( ) . toolTipCloseButton ( ) ) ; contentPanel . add ( closeButtonLabel ) ; closeButtonLabel . addClickHandler ( new ClickHandler ...
public class HOTSAXImplementation { /** * Hash - table backed implementation ( in contrast to trie ) . Time series is converted into a * SAXRecords data structure first , Hash - table backed magic array created second . HOTSAX applied * third . Nearest neighbors are searched only among the subsequences which were p...
// fix the start time Date start = new Date ( ) ; // get the SAX transform done NormalAlphabet normalA = new NormalAlphabet ( ) ; SAXRecords sax = sp . ts2saxViaWindow ( series , windowSize , paaSize , normalA . getCuts ( alphabetSize ) , strategy , nThreshold ) ; Date saxEnd = new Date ( ) ; LOGGER . debug ( "discreti...
public class UriComponentsBuilder { /** * Append the given query parameter to the existing query parameters . The * given name or any of the values may contain URI template variables . If no * values are given , the resulting URI will contain the query parameter name * only ( i . e . { @ code ? foo } instead of {...
Assert . notNull ( name , "'name' must not be null" ) ; if ( ! ObjectUtils . isEmpty ( values ) ) { for ( Object value : values ) { String valueAsString = ( value != null ? value . toString ( ) : null ) ; this . queryParams . add ( name , valueAsString ) ; } } else { this . queryParams . add ( name , null ) ; } resetSc...
public class StreamUtils { /** * Cycles through a set of items indefinitely . * @ param items The items to cycle through . * @ param < T > The type of the items . * @ return An infinite stream cycling through the supplied items . */ public static < T > Stream < T > cycle ( T ... items ) { } }
return IntStream . iterate ( 0 , i -> i == items . length - 1 ? 0 : i + 1 ) . mapToObj ( i -> items [ i ] ) ;
public class GroovyMBean { /** * The values of each of the attributes on the MBean * @ return list of values of each attribute */ public List < String > listAttributeValues ( ) { } }
List < String > list = new ArrayList < String > ( ) ; Collection < String > names = listAttributeNames ( ) ; for ( String name : names ) { try { Object val = this . getProperty ( name ) ; if ( val != null ) { list . add ( name + " : " + val . toString ( ) ) ; } } catch ( Exception e ) { throwException ( "Could not list...
public class AbsComparator { /** * Factory method to implement the comparator . * @ param paramRtx * rtx for accessing data * @ param paramOperandOne * operand one to be compared * @ param paramOperandTwo * operand two to be compared * @ param paramKind * kind of comparison * @ param paramVal * stri...
if ( "eq" . equals ( paramVal ) || "lt" . equals ( paramVal ) || "le" . equals ( paramVal ) || "gt" . equals ( paramVal ) || "ge" . equals ( paramVal ) ) { return new ValueComp ( paramRtx , paramOperandOne , paramOperandTwo , paramKind ) ; } else if ( "=" . equals ( paramVal ) || "!=" . equals ( paramVal ) || "<" . equ...
public class Collections { /** * Checks whether any of an array ' s elements are also in the provided set . * @ param aSet a { @ link Set } . * @ param arr an array . * @ return < code > true < / code > or < code > false < / code > . */ public static < K > boolean containsAny ( Set < K > aSet , K [ ] arr ) { } }
for ( K obj : arr ) { if ( aSet . contains ( obj ) ) { return true ; } } return false ;
public class LinkAttributeUpdateMarshaller { /** * Marshall the given parameter object . */ public void marshall ( LinkAttributeUpdate linkAttributeUpdate , ProtocolMarshaller protocolMarshaller ) { } }
if ( linkAttributeUpdate == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( linkAttributeUpdate . getAttributeKey ( ) , ATTRIBUTEKEY_BINDING ) ; protocolMarshaller . marshall ( linkAttributeUpdate . getAttributeAction ( ) , ATTRIBUTEACTION_B...
public class ResolutionIterator { /** * check whether answers available , if answers not fully computed compute more answers * @ return true if answers available */ @ Override public boolean hasNext ( ) { } }
nextAnswer = findNextAnswer ( ) ; if ( nextAnswer != null ) return true ; // iter finished if ( reiterationRequired ) { long dAns = answers . size ( ) - oldAns ; if ( dAns != 0 || iter == 0 ) { LOG . debug ( "iter: {} answers: {} dAns = {}" , iter , answers . size ( ) , dAns ) ; iter ++ ; states . push ( query . subGoa...
public class ClusterHeartbeatManager { /** * Send heartbeats and calculate clock drift . This method is expected to be called periodically because it calculates * the clock drift based on the expected and actual invocation period . */ void heartbeat ( ) { } }
if ( ! clusterService . isJoined ( ) ) { return ; } checkClockDrift ( heartbeatIntervalMillis ) ; final long clusterTime = clusterClock . getClusterTime ( ) ; if ( clusterService . isMaster ( ) ) { heartbeatWhenMaster ( clusterTime ) ; } else { heartbeatWhenSlave ( clusterTime ) ; }
public class JDateChooser { /** * Listens for a " date " property change or a " day " property change event * from the JCalendar . Updates the date editor and closes the popup . * @ param evt * the event */ public void propertyChange ( PropertyChangeEvent evt ) { } }
if ( evt . getPropertyName ( ) . equals ( "day" ) ) { if ( popup . isVisible ( ) && jcalendar . getCalendar ( ) . get ( Calendar . MONTH ) == jcalendar . monthChooser . getMonth ( ) ) { dateSelected = true ; popup . setVisible ( false ) ; setDate ( jcalendar . getCalendar ( ) . getTime ( ) ) ; } } else if ( evt . getPr...
public class InkView { /** * Returns the bitmap of the drawing with the specified background color * @ param backgroundColor The background color for the bitmap * @ return The bitmap */ public Bitmap getBitmap ( int backgroundColor ) { } }
// create new bitmap Bitmap bitmap = Bitmap . createBitmap ( getWidth ( ) , getHeight ( ) , Bitmap . Config . ARGB_8888 ) ; Canvas bitmapCanvas = new Canvas ( bitmap ) ; // draw background if not transparent if ( backgroundColor != 0 ) { bitmapCanvas . drawColor ( backgroundColor ) ; } // draw bitmap bitmapCanvas . dra...
public class RecountOnValidHandler { /** * Constructor . * @ param record My owner ( usually passed as null , and set on addListener in setOwner ( ) ) . * @ param recordSub The sub - record . */ public void init ( Record record , Record recordSub , boolean bRestoreCurrentRecord ) { } }
m_recordSub = recordSub ; m_bRestoreCurrentRecord = bRestoreCurrentRecord ; super . init ( record ) ;