signature
stringlengths
43
39.1k
implementation
stringlengths
0
450k
public class CtClassUtil { /** * 获取方法的参数名称 . * @ param clazz * @ param method * @ return */ public static String [ ] getParameterNames ( Method method ) { } }
// AssertUtil . assertNotNull ( method , " 参数method不能为空 . " ) ; Class < ? > clazz = method . getDeclaringClass ( ) ; return getParameterNames ( clazz , method ) ;
public class Types { /** * Are corresponding elements of ts subtypes of ss ? If lists are * of different length , return false . */ public boolean isSubtypes ( List < Type > ts , List < Type > ss ) { } }
while ( ts . tail != null && ss . tail != null /* inlined : ts . nonEmpty ( ) & & ss . nonEmpty ( ) */ && isSubtype ( ts . head , ss . head ) ) { ts = ts . tail ; ss = ss . tail ; } return ts . tail == null && ss . tail == null ; /* inlined : ts . isEmpty ( ) & & ss . isEmpty ( ) ; */
public class KeyUtil { /** * Returns the key size of the given key object in bits . * @ param key the key object , cannot be null * @ return the key size of the given key object in bits , or - 1 if the * key size is not accessible */ public static final int getKeySize ( Key key ) { } }
int size = - 1 ; if ( key instanceof Length ) { try { Length ruler = ( Length ) key ; size = ruler . length ( ) ; } catch ( UnsupportedOperationException usoe ) { // ignore the exception } if ( size >= 0 ) { return size ; } } // try to parse the length from key specification if ( key instanceof SecretKey ) { SecretKey ...
public class Config { /** * Returns the map event journal config for the given name , creating one * if necessary and adding it to the collection of known configurations . * The configuration is found by matching the configuration name * pattern to the provided { @ code name } without the partition qualifier * ...
return ConfigUtils . getConfig ( configPatternMatcher , mapEventJournalConfigs , name , EventJournalConfig . class , new BiConsumer < EventJournalConfig , String > ( ) { @ Override public void accept ( EventJournalConfig eventJournalConfig , String name ) { eventJournalConfig . setMapName ( name ) ; if ( "default" . eq...
public class CommandLineLinker { /** * Performs a link using a command line linker */ public void link ( final CCTask task , final File outputFile , final String [ ] sourceFiles , final CommandLineLinkerConfiguration config ) throws BuildException { } }
final File parentDir = new File ( outputFile . getParent ( ) ) ; String parentPath ; try { parentPath = parentDir . getCanonicalPath ( ) ; } catch ( final IOException ex ) { parentPath = parentDir . getAbsolutePath ( ) ; } String [ ] execArgs = prepareArguments ( task , parentPath , outputFile . getName ( ) , sourceFil...
public class ConnectionFactoryDefinitionProcessor { /** * ( non - Javadoc ) * @ see com . ibm . wsspi . injectionengine . InjectionProcessor # createInjectionBinding ( java . lang . annotation . Annotation , java . lang . Class , java . lang . reflect . Member , java . lang . String ) */ @ Override public InjectionBi...
InjectionBinding < ConnectionFactoryDefinition > injectionBinding = new ConnectionFactoryDefinitionInjectionBinding ( jndiName , ivNameSpaceConfig ) ; injectionBinding . merge ( annotation , instanceClass , null ) ; return injectionBinding ;
public class SofaRegistry { /** * 反注册服务信息 * @ param appName 应用 * @ param serviceName 服务关键字 * @ param group 服务分组 */ protected void doUnRegister ( String appName , String serviceName , String group ) { } }
SofaRegistryClient . getRegistryClient ( appName , registryConfig ) . unregister ( serviceName , group , RegistryType . PUBLISHER ) ;
public class CadmiumCli { /** * Sets up the ssh configuration that git will use to communicate with the remote git repositories . * @ param noPrompt True if there should be authentication prompts for the users username and password . * If false , the program will fail with an exit code of 1 if not authorized . */ p...
File sshDir = new File ( System . getProperty ( "user.home" ) , ".ssh" ) ; if ( sshDir . exists ( ) ) { GitService . setupLocalSsh ( sshDir . getAbsolutePath ( ) , noPrompt ) ; }
public class XmlParser { /** * Parse an element , with its tags . * < pre > * [ 39 ] element : : = EmptyElementTag | STag content ETag * [ 40 ] STag : : = ' & lt ; ' Name ( S Attribute ) * S ? ' & gt ; ' * [ 44 ] EmptyElementTag : : = ' & lt ; ' Name ( S Attribute ) * S ? ' / & gt ; ' * < / pre > * ( The ' ...
String gi ; char c ; int oldElementContent = currentElementContent ; String oldElement = currentElement ; ElementDecl element ; // This is the ( global ) counter for the // array of specified attributes . tagAttributePos = 0 ; // Read the element type name . gi = readNmtoken ( true ) ; // If we saw no DTD , and this is...
public class BaseMessageTransport { /** * Get the external message container for this Internal message . * Typically , the overriding class supplies a default format for the transport type . * < br / > NOTE : The message header from the internal message is copies , but not the message itself . * @ param The inter...
String strMessageClass = this . getProperty ( trxMessageHeader , TrxMessageHeader . EXTERNAL_MESSAGE_CLASS ) ; String strPackage = ( String ) trxMessageHeader . get ( TrxMessageHeader . BASE_PACKAGE ) ; strMessageClass = ClassServiceUtility . getFullClassName ( strPackage , strMessageClass ) ; return strMessageClass ;
public class AbstractProducerBean { /** * Initializes the bean and its metadata */ @ Override public void internalInitialize ( BeanDeployerEnvironment environment ) { } }
getDeclaringBean ( ) . initialize ( environment ) ; super . internalInitialize ( environment ) ; initPassivationCapable ( ) ;
public class PDBServerPanel { private JPanel getPDBFilePanel ( int pos , JTextField f , JTextField c ) { } }
JPanel panel = new JPanel ( ) ; panel . setBorder ( BorderFactory . createLineBorder ( Color . black ) ) ; JLabel l01 = new JLabel ( "PDB code " ) ; panel . add ( l01 ) ; Box hBox11 = Box . createHorizontalBox ( ) ; JLabel l11 = new JLabel ( pos + ":" ) ; f . setMaximumSize ( new Dimension ( Short . MAX_VALUE , 30 ) ) ...
public class RabbitMqUtils { /** * Configures the connection factory with the right settings . * @ param factory the connection factory * @ param configuration the messaging configuration * @ throws IOException if something went wrong * @ see RabbitMqConstants */ public static void configureFactory ( Connection...
final Logger logger = Logger . getLogger ( RabbitMqUtils . class . getName ( ) ) ; logger . fine ( "Configuring a connection factory for RabbitMQ." ) ; String messageServerIp = configuration . get ( RABBITMQ_SERVER_IP ) ; if ( messageServerIp != null ) { Map . Entry < String , Integer > entry = Utils . findUrlAndPort (...
public class RunnableCallableFuture { /** * Start a new daemon thread to call the run ( ) method asynchronously , returning this object as a Future ( and not a * RunnableCallableFuture ) * @ return */ public Future < T > asyncRun ( ) { } }
final Thread t = new Thread ( this ) ; { t . setName ( "AsyncRun for " + this ) ; t . setDaemon ( true ) ; t . start ( ) ; } return this ;
public class Redwood { /** * Hide multiple channels . All other channels will be unaffected . * @ param channels The channels to hide */ public static void hideChannels ( Object ... channels ) { } }
// TODO this could share more code with the other show / hide ( Only ) Channels methods for ( LogRecordHandler handler : handlers ) { if ( handler instanceof VisibilityHandler ) { VisibilityHandler visHandler = ( VisibilityHandler ) handler ; for ( Object channel : channels ) { visHandler . alsoHide ( channel ) ; } } }
public class WebSocket { /** * Find a per - message compression extension from among the agreed extensions . */ private PerMessageCompressionExtension findAgreedPerMessageCompressionExtension ( ) { } }
if ( mAgreedExtensions == null ) { return null ; } for ( WebSocketExtension extension : mAgreedExtensions ) { if ( extension instanceof PerMessageCompressionExtension ) { return ( PerMessageCompressionExtension ) extension ; } } return null ;
public class SimpleNotificationDelegate { /** * Shows a notification for the given push message * @ param extras the message extras */ public void showNotification ( Context context , Bundle extras ) { } }
// parse the title and message from the extras String title = getTitle ( context , extras ) ; String message = getMessage ( context , extras ) ; // if the message is empty , bail if ( message == null ) return ; // create the notification NotificationManager mNotificationManager = ( NotificationManager ) context . getSy...
public class Kafka08PartitionDiscoverer { /** * Turn a broker instance into a node instance . * @ param broker broker instance * @ return Node representing the given broker */ private static Node brokerToNode ( Broker broker ) { } }
return new Node ( broker . id ( ) , broker . host ( ) , broker . port ( ) ) ;
public class DiscriminationProcessImpl { /** * @ see * com . ibm . wsspi . channelfw . DiscriminationProcess # discriminate ( com . ibm . wsspi * . channelfw . VirtualConnection , com . ibm . wsspi . channelfw . ConnectionLink , * java . lang . String ) */ @ Override public int discriminate ( VirtualConnection vc...
Channel channel = null ; String channelName = null ; String matchString = ( inputChannelName + ChannelDataImpl . CHILD_STRING ) ; int result = FAILURE ; // Iterate the channels of the current list . for ( int i = 0 ; channelList != null && i < channelList . length ; i ++ ) { channel = channelList [ i ] ; // Find a chan...
public class TimedInterface { /** * Creates a new TimedInterface for a given interface < code > ctype < / code > with a concrete class * < code > concrete < / code > and a specific id . The id can be used to distinguish among multiple * objects with the same concrete class . */ @ SuppressWarnings ( "unchecked" ) pu...
final InvocationHandler handler = new TimedHandler < > ( ctype , concrete , id ) ; final Class < ? > [ ] types = new Class [ ] { ctype , CompositeMonitor . class } ; return ( T ) Proxy . newProxyInstance ( ctype . getClassLoader ( ) , types , handler ) ;
public class Instance { /** * Use { @ link # getRedisConfigsMap ( ) } instead . */ @ java . lang . Deprecated public java . util . Map < java . lang . String , java . lang . String > getRedisConfigs ( ) { } }
return getRedisConfigsMap ( ) ;
public class JSPrimitive { /** * Set the typeCode for the type . Doing this automatically sets all the other type * information implied by the type . */ public void setTypeCode ( int typeCode ) { } }
if ( typeCode <= 0 || typeCode >= JSBaseTypes . baseTypes . length ) throw new IllegalArgumentException ( "TypeCode=" + typeCode ) ; this . typeCode = typeCode ; baseType = JSBaseTypes . baseTypes [ typeCode ] ;
public class BagOfTokens { /** * Weight associated with a token : by default , the number of times * the token appears in the bag . */ double getWeight ( Token tok ) { } }
Double f = ( Double ) weightMap . get ( tok ) ; return f == null ? 0 : f . doubleValue ( ) ;
public class FieldListener { /** * Set the mode this listener responds / doesn ' t respond to . * @ param iMoveMode The type of move being done ( init / read / screen ) . * @ param flag True If this listener should respond to this kind of move . */ public void setRespondsToMode ( int iMoveMode , boolean flag ) { } ...
if ( iMoveMode == DBConstants . SCREEN_MOVE ) m_bScreenMove = flag ; if ( iMoveMode == DBConstants . INIT_MOVE ) m_bInitMove = flag ; if ( iMoveMode == DBConstants . READ_MOVE ) m_bReadMove = flag ;
public class BDDFactory { /** * Sets the variable order for this factory manually . In this case the number of variables has not to be set manually . * @ param varOrder the variable order . */ public void setVariableOrder ( final Variable ... varOrder ) { } }
this . kernel . setNumberOfVars ( varOrder . length ) ; for ( final Variable lit : varOrder ) { final int idx = this . var2idx . size ( ) ; this . var2idx . put ( lit . variable ( ) , idx ) ; this . idx2var . put ( idx , lit . variable ( ) ) ; }
public class MockMethodAdvice { /** * Handle a method entry hook . * @ param instance instance that is mocked * @ param origin method that contains the hook * @ param arguments arguments to the method * @ return A callable that can be called to get the mocked result or null if the method is not * mocked . */ ...
InvocationHandlerAdapter interceptor = interceptors . get ( instance ) ; if ( interceptor == null ) { return null ; } return new ReturnValueWrapper ( interceptor . interceptEntryHook ( instance , origin , arguments , new SuperMethodCall ( selfCallInfo , origin , instance , arguments ) ) ) ;
public class SpringApplication { /** * Convenient alternative to { @ link # setDefaultProperties ( Map ) } . * @ param defaultProperties some { @ link Properties } */ public void setDefaultProperties ( Properties defaultProperties ) { } }
this . defaultProperties = new HashMap < > ( ) ; for ( Object key : Collections . list ( defaultProperties . propertyNames ( ) ) ) { this . defaultProperties . put ( ( String ) key , defaultProperties . get ( key ) ) ; }
public class AbstractSphere3F { /** * { @ inheritDoc } */ @ Pure @ Override public double distanceLinf ( Point3D p ) { } }
Point3D r = getClosestPointTo ( p ) ; return r . getDistanceLinf ( p ) ;
public class LabelingJobDataAttributes { /** * Declares that your content is free of personally identifiable information or adult content . Amazon SageMaker may * restrict the Amazon Mechanical Turk workers that can view your task based on this information . * @ param contentClassifiers * Declares that your conte...
if ( contentClassifiers == null ) { this . contentClassifiers = null ; return ; } this . contentClassifiers = new java . util . ArrayList < String > ( contentClassifiers ) ;
public class PooledByteArray { /** * This method marks this array to be released . * @ return { @ code true } if this array can be released , { @ code false } if there are references left that have to be * released before . */ public boolean release ( ) { } }
if ( this . released ) { // already ( marked as ) released . . . return false ; } this . released = true ; if ( this . childCount == 0 ) { if ( this . parent == null ) { return true ; } else { assert ( this . parent . childCount > 0 ) ; this . parent . childCount -- ; if ( ( this . parent . childCount == 0 ) && ( this ...
public class ConcurrentMultiCache { /** * Returns the object identified by the specified key / value pair if it is currently * in memory in the cache . Just because this value returns < code > null < / code > does * not mean the object does not exist . Instead , it may be that it is simply not * cached in memory ...
return find ( key , val , null ) ;
public class SplittableElementSet { /** * Make a new splittable set from a collection of VM . * We consider the collection does not have duplicated elements . * @ param c the collection to wrap * @ param idx the partition for each VM * @ return the resulting set */ public static SplittableElementSet < VM > newV...
return new SplittableElementSet < > ( c , idx ) ;
public class Call { /** * Convenience method to dials a call from a phone number to a phone number * @ param to the to number * @ param from the from number * @ param callbackUrl the callback URL * @ param tag the call tag * @ return the call * @ throws IOException unexpected error . */ public static Call c...
assert ( to != null && from != null ) ; final Map < String , Object > params = new HashMap < String , Object > ( ) ; params . put ( "to" , to ) ; params . put ( "from" , from ) ; params . put ( "callbackUrl" , callbackUrl ) ; params . put ( "tag" , tag ) ; final Call call = create ( params ) ; return call ;
public class UrlUtils { /** * Gets the absolute filesystem path to the class path root for the specified * resource . The root is either a JAR file or a directory with loose class * files . If the URL does not use a supported protocol , an exception will be * thrown . * @ param url * The URL to the resource ,...
String path = null ; if ( url != null ) { final String spec = url . toExternalForm ( ) ; if ( ( JAR_FILE ) . regionMatches ( true , 0 , spec , 0 , JAR_FILE . length ( ) ) ) { URL jar ; try { jar = new URL ( spec . substring ( JAR . length ( ) , spec . lastIndexOf ( "!/" ) ) ) ; } catch ( final MalformedURLException e )...
public class Request { /** * A private method that handles reading the Responses from the server . * @ return a { @ link Response } from the server . * @ throws IOException */ private Response readResponse ( ) throws IOException { } }
Response response = new Response ( ) ; response . setResponseCode ( connection . getResponseCode ( ) ) ; response . setResponseMessage ( connection . getResponseMessage ( ) ) ; response . setHeaders ( connection . getHeaderFields ( ) ) ; try { response . setBody ( getStringFromStream ( connection . getInputStream ( ) )...
public class AcmoUtil { /** * CSV Escape handling for given string . * @ param str The string will be escaped for CSV format output * @ return Escaped CSV string */ public static String escapeCsvStr ( String str ) { } }
if ( str != null && ! str . equals ( "" ) ) { boolean needQuote = false ; if ( str . contains ( "\"" ) ) { str = str . replaceAll ( "\"" , "\"\"" ) ; needQuote = true ; } if ( ! needQuote && str . contains ( "," ) ) { needQuote = true ; } if ( needQuote ) { str = "\"" + str + "\"" ; } return str ; } else { return "" ; ...
public class CloneableBean { /** * Makes a deep bean clone of the object passed in the constructor . * To be used by classes using CloneableBean in a delegation pattern , * @ return a clone of the object bean . * @ throws CloneNotSupportedException thrown if the object bean could not be cloned . */ public static ...
final Class < ? > clazz = obj . getClass ( ) ; try { final Object clonedBean = clazz . newInstance ( ) ; final List < PropertyDescriptor > propertyDescriptors = BeanIntrospector . getPropertyDescriptorsWithGettersAndSetters ( clazz ) ; for ( final PropertyDescriptor propertyDescriptor : propertyDescriptors ) { final St...
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public String convertIfcCableCarrierSegmentTypeEnumToString ( EDataType eDataType , Object instanceValue ) { } }
return instanceValue == null ? null : instanceValue . toString ( ) ;
public class SchemaManager { /** * Drops the index with the specified name . */ void dropConstraint ( Session session , HsqlName name , boolean cascade ) { } }
Table t = getTable ( session , name . parent . name , name . parent . schema . name ) ; TableWorks tw = new TableWorks ( session , t ) ; tw . dropConstraint ( name . name , cascade ) ;
public class AbstractSerializer { /** * * * * Collection * * * */ protected ISynchronizationPoint < ? extends Exception > serializeCollectionValue ( CollectionContext context , String path , List < SerializationRule > rules ) { } }
ISynchronizationPoint < ? extends Exception > start = startCollectionValue ( context , path , rules ) ; SynchronizationPoint < Exception > result = new SynchronizationPoint < > ( ) ; if ( start . isUnblocked ( ) ) { serializeCollectionElement ( context , context . getIterator ( ) , 0 , path , rules , result ) ; return ...
public class Swift { /** * Create any parent folders if they do not exist , to meet old swift convention . * hubiC requires these objects for the sub - objects to be visible in webapp . As an optimization , we consider that if * folder a / b / c exists , then a / and a / b / also exist so are not checked nor create...
// We check for folder existence before creation , // as in general leaf folder is likely to already exist . // So we walk from leaf to root : CPath path = leafFolderPath ; List < CPath > parentFolders = new LinkedList < CPath > ( ) ; CFile file ; while ( ! path . isRoot ( ) ) { file = getFile ( path ) ; if ( file != n...
public class BitFileFilter { /** * Initialize class fields . */ public void init ( Record record , BaseField fldRecordTarget , String fsTarget , BaseField fldTarget ) { } }
m_fldToCompare = fldTarget ; m_fsRecordTarget = fsTarget ; m_fldRecordTarget = fldRecordTarget ; super . init ( record ) ;
public class DraggableSwipeBack { /** * Called when a drawer animation has successfully completed . */ private void completeAnimation ( ) { } }
mScroller . abortAnimation ( ) ; final int finalX = mScroller . getFinalX ( ) ; setOffsetPixels ( finalX ) ; setDrawerState ( finalX == 0 ? STATE_CLOSED : STATE_OPEN ) ; stopLayerTranslation ( ) ;
public class RuleClassifier { /** * Best value of entropy */ public void mainFindBestValEntropy ( Node root ) { } }
if ( root != null ) { DoubleVector parentClassCL = new DoubleVector ( ) ; DoubleVector classCountL = root . classCountsLeft ; // class count left DoubleVector classCountR = root . classCountsRight ; // class count left double numInst = root . classCountsLeft . sumOfValues ( ) + root . classCountsRight . sumOfValues ( )...
public class KafkaStandaloneGenerator { /** * Entry point to the kafka data producer . */ public static void main ( String [ ] args ) throws Exception { } }
final KafkaCollector [ ] collectors = new KafkaCollector [ NUM_PARTITIONS ] ; // create the generator threads for ( int i = 0 ; i < collectors . length ; i ++ ) { collectors [ i ] = new KafkaCollector ( BROKER_ADDRESS , TOPIC , i ) ; } StandaloneThreadedGenerator . runGenerator ( collectors ) ;
public class AmazonIdentityManagementClient { /** * Retrieves information about the specified server certificate stored in IAM . * For more information about working with server certificates , see < a * href = " https : / / docs . aws . amazon . com / IAM / latest / UserGuide / id _ credentials _ server - certs . h...
request = beforeClientExecution ( request ) ; return executeGetServerCertificate ( request ) ;
public class Morpha { /** * Capitalizes the first letter and lower - cases every consecutive letter . */ private static String capitalise ( String s ) { } }
if ( s . length ( ) == 0 ) { return s ; } StringBuilder s1 = new StringBuilder ( s ) ; if ( Character . isLowerCase ( s1 . charAt ( 0 ) ) ) { s1 . setCharAt ( 0 , Character . toUpperCase ( s1 . charAt ( 0 ) ) ) ; } for ( int j = 1 ; j < s1 . length ( ) ; j ++ ) { if ( Character . isUpperCase ( s1 . charAt ( j ) ) ) { s...
public class SARLValidator { /** * Check the modifiers for the SARL agents . * @ param agent the agent . */ @ Check protected void checkModifiers ( SarlAgent agent ) { } }
this . agentModifierValidator . checkModifiers ( agent , MessageFormat . format ( Messages . SARLValidator_9 , agent . getName ( ) ) ) ;
public class ComputationGraph { /** * Generate the output for all examples / batches in the input iterator , and concatenate them into a single array . * Can only be used with ComputationGraphs with 1 output * @ param iterator Data to pass through the network * @ return output for all examples in the iterator */ ...
Preconditions . checkArgument ( numOutputArrays == 1 , "Cannot use this method with nets that have more" + " than 1 output array. This network has %s outputs" , numOutputArrays ) ; return output ( iterator ) [ 0 ] ;
public class TreeNode { /** * A helper method for the range search used in the interval intersection query in the tree . * This corresponds to the right branch of the range search , once we find a node , whose * midpoint is contained in the query interval . All intervals in the right subtree of that node * are gu...
while ( node != null ) { if ( query . contains ( node . midpoint ) ) { result . addAll ( node . increasing ) ; if ( node . left != null ) { for ( Interval < T > next : node . left ) result . add ( next ) ; } node = node . right ; } else { for ( Interval < T > next : node . increasing ) { if ( next . isRightOf ( query )...
public class IntArrays { /** * Counts the number of times value appears in array . */ public static int count ( int [ ] array , int value ) { } }
int count = 0 ; for ( int i = 0 ; i < array . length ; i ++ ) { if ( array [ i ] == value ) { count ++ ; } } return count ;
public class HibernateLayerUtil { /** * Set session factory . * @ param sessionFactory session factory * @ throws HibernateLayerException could not get class metadata for data source */ public void setSessionFactory ( SessionFactory sessionFactory ) throws HibernateLayerException { } }
try { this . sessionFactory = sessionFactory ; if ( null != layerInfo ) { entityMetadata = sessionFactory . getClassMetadata ( layerInfo . getFeatureInfo ( ) . getDataSourceName ( ) ) ; } } catch ( Exception e ) { // NOSONAR throw new HibernateLayerException ( e , ExceptionCode . HIBERNATE_NO_SESSION_FACTORY ) ; }
public class Money { /** * Write members to a MwsWriter . * @ param w * The writer to write to . */ @ Override public void writeFragmentTo ( MwsWriter w ) { } }
w . write ( "CurrencyCode" , currencyCode ) ; w . write ( "Amount" , amount ) ;
public class PrettyTime { /** * Format the given { @ link Duration } object , using the { @ link TimeFormat } specified by the { @ link TimeUnit } contained * within . If the given { @ link Duration } is < code > null < / code > , the current value of * { @ link System # currentTimeMillis ( ) } will be used instead...
if ( duration == null ) return format ( now ( ) ) ; TimeFormat format = getFormat ( duration . getUnit ( ) ) ; String time = format . format ( duration ) ; return format . decorate ( duration , time ) ;
public class HtmlDocletWriter { /** * Add the annotatation types for the given doc and parameter . * @ param indent the number of spaces to indent the parameters . * @ param doc the doc to write annotations for . * @ param param the parameter to write annotations for . * @ param tree the content tree to which t...
return addAnnotationInfo ( indent , doc , param . annotations ( ) , false , tree ) ;
public class SnowflakeAzureClient { /** * Re - creates the encapsulated storage client with a fresh access token * @ param stageCredentials a Map ( as returned by GS ) which contains the new credential properties * @ throws SnowflakeSQLException failure to renew the client */ @ Override public void renew ( Map stag...
stageInfo . setCredentials ( stageCredentials ) ; setupAzureClient ( stageInfo , encMat ) ;
public class SubscriptionUsagesInner { /** * Gets a subscription usage metric . * @ param locationName The name of the region where the resource is located . * @ param usageName Name of usage metric to return . * @ throws IllegalArgumentException thrown if parameters fail the validation * @ throws CloudExceptio...
return getWithServiceResponseAsync ( locationName , usageName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class StoreConfig { /** * Gets a class property via a string property name . * @ param pName - the property name * @ param defaultValue - the default property value * @ return a { @ link Class } property */ public Class < ? > getClass ( String pName , Class < ? > defaultValue ) { } }
String pValue = _properties . getProperty ( pName ) ; return parseClass ( pName , pValue , defaultValue ) ;
public class LabsInner { /** * Delete lab . This operation can take a while to complete . * @ param resourceGroupName The name of the resource group . * @ param labAccountName The name of the lab Account . * @ param labName The name of the lab . * @ throws IllegalArgumentException thrown if parameters fail the ...
beginDeleteWithServiceResponseAsync ( resourceGroupName , labAccountName , labName ) . toBlocking ( ) . single ( ) . body ( ) ;
public class CronetChannelBuilder { /** * Creates a new builder for the given server host , port and CronetEngine . */ public static CronetChannelBuilder forAddress ( String host , int port , CronetEngine cronetEngine ) { } }
Preconditions . checkNotNull ( cronetEngine , "cronetEngine" ) ; return new CronetChannelBuilder ( host , port , cronetEngine ) ;
public class ArrayUtil { /** * 去除 { @ code null } 或者 " " 或者空白字符串 元素 * @ param array 数组 * @ return 处理后的数组 * @ since 3.2.2 */ public static < T extends CharSequence > T [ ] removeBlank ( T [ ] array ) { } }
return filter ( array , new Filter < T > ( ) { @ Override public boolean accept ( T t ) { return false == StrUtil . isBlank ( t ) ; } } ) ;
public class JNvgraph { /** * < pre > * nvGRAPH spectral clustering * given a graph and solver parameters of struct SpectralClusteringParameter , * assign vertices to groups such as * intra - group connections are strong and / or inter - groups connections are weak * using spectral technique . * < / pre > *...
return checkResult ( nvgraphSpectralClusteringNative ( handle , graph_descr , weight_index , params , clustering , eig_vals , eig_vects ) ) ;
public class BinaryJedis { /** * Increment the number stored at field in the hash at key by value . If key does not exist , a new * key holding a hash is created . If field does not exist or holds a string , the value is set to 0 * before applying the operation . Since the value argument is signed you can use this ...
checkIsInMultiOrPipeline ( ) ; client . hincrBy ( key , field , value ) ; return client . getIntegerReply ( ) ;
public class AVUser { /** * signUpOrLoginByMobilePhone * @ param mobilePhoneNumber * @ param smsCode * @ param clazz * @ param < T > * @ return */ public static < T extends AVUser > T signUpOrLoginByMobilePhone ( String mobilePhoneNumber , String smsCode , Class < T > clazz ) { } }
return signUpOrLoginByMobilePhoneInBackground ( mobilePhoneNumber , smsCode , clazz ) . blockingSingle ( ) ;
public class Searcher { /** * Resets the helper ' s state . * @ return this { @ link Searcher } for chaining . */ @ NonNull @ SuppressWarnings ( { } }
"WeakerAccess" , "unused" } ) // For library users public Searcher reset ( ) { lastResponsePage = 0 ; lastRequestPage = 0 ; lastResponseId = 0 ; endReached = false ; clearFacetRefinements ( ) ; cancelPendingRequests ( ) ; numericRefinements . clear ( ) ; return this ;
public class Object2IntHashMap { /** * { @ inheritDoc } */ public void clear ( ) { } }
if ( size > 0 ) { Arrays . fill ( keys , null ) ; Arrays . fill ( values , missingValue ) ; size = 0 ; }
public class SftpFileAttributes { /** * Determine whether these attributes refer to a block special file . * @ return boolean */ public boolean isBlock ( ) { } }
if ( permissions != null && ( permissions . longValue ( ) & SftpFileAttributes . S_IFBLK ) == SftpFileAttributes . S_IFBLK ) { return true ; } return false ;
public class Boxing { /** * Transforms any array into an array of { @ code long } . * @ param src source array * @ param srcPos start position * @ param len length * @ return long array */ public static long [ ] unboxLongs ( Object src , int srcPos , int len ) { } }
return unboxLongs ( array ( src ) , srcPos , len ) ;
public class Iteration { /** * Set the current { @ link Iteration } payload . */ public static void setCurrentPayload ( Variables stack , String name , WindupVertexFrame frame ) throws IllegalArgumentException { } }
Map < String , Iterable < ? extends WindupVertexFrame > > vars = stack . peek ( ) ; Iterable < ? extends WindupVertexFrame > existingValue = vars . get ( name ) ; if ( ! ( existingValue == null || existingValue instanceof IterationPayload ) ) { throw new IllegalArgumentException ( "Variable \"" + name + "\" has already...
public class CommerceOrderPersistenceImpl { /** * Removes all the commerce orders where groupId = & # 63 ; and commerceAccountId = & # 63 ; and orderStatus = & # 63 ; from the database . * @ param groupId the group ID * @ param commerceAccountId the commerce account ID * @ param orderStatus the order status */ @ ...
for ( CommerceOrder commerceOrder : findByG_C_O ( groupId , commerceAccountId , orderStatus , QueryUtil . ALL_POS , QueryUtil . ALL_POS , null ) ) { remove ( commerceOrder ) ; }
public class KeyManagementServiceClient { /** * Returns metadata for a given [ CryptoKeyVersion ] [ google . cloud . kms . v1 . CryptoKeyVersion ] . * < p > Sample code : * < pre > < code > * try ( KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient . create ( ) ) { * CryptoKeyVer...
GetCryptoKeyVersionRequest request = GetCryptoKeyVersionRequest . newBuilder ( ) . setName ( name ) . build ( ) ; return getCryptoKeyVersion ( request ) ;
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - > * < ! - - end - user - doc - - > * @ generated */ public EEnum getIfcTransformerTypeEnum ( ) { } }
if ( ifcTransformerTypeEnumEEnum == null ) { ifcTransformerTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 918 ) ; } return ifcTransformerTypeEnumEEnum ;
public class CommerceVirtualOrderItemLocalServiceBaseImpl { /** * Returns the commerce virtual order item matching the UUID and group . * @ param uuid the commerce virtual order item ' s UUID * @ param groupId the primary key of the group * @ return the matching commerce virtual order item , or < code > null < / ...
return commerceVirtualOrderItemPersistence . fetchByUUID_G ( uuid , groupId ) ;
public class DeeseAntonymEvaluation { /** * Returns the association of the two words on a scale of 0 to 1. * @ return the assocation or { @ code null } if either { @ code word1 } or { @ code * word2 } are not in the semantic space */ protected Double computeAssociation ( SemanticSpace sspace , String word1 , String...
Vector v1 = sspace . getVector ( word1 ) ; Vector v2 = sspace . getVector ( word2 ) ; if ( v1 == null || v2 == null ) return null ; // Find the ranks of each of the two words to each other double rank1 = findRank ( sspace , word1 , word2 ) ; double rank2 = findRank ( sspace , word2 , word1 ) ; return 2d / ( rank1 + ran...
public class Matrix { /** * Set the value of element [ r , c ] . * @ param r the row index * @ param c the column index * @ param value the value * @ throws numbercruncher . MatrixException for an invalid index */ public void set ( int r , int c , double value ) throws MatrixException { } }
if ( ( r < 0 ) || ( r >= nRows ) || ( c < 0 ) || ( c >= nCols ) ) { throw new MatrixException ( MatrixException . INVALID_INDEX ) ; } values [ r ] [ c ] = value ;
public class Rule { /** * / * checks whether the Rule contains a detection point of the same type and threshold * as the detectionPoint parameter */ public boolean typeAndThresholdContainsDetectionPoint ( DetectionPoint detectionPoint ) { } }
for ( DetectionPoint myPoint : getAllDetectionPoints ( ) ) { if ( detectionPoint . typeAndThresholdMatches ( myPoint ) ) { return true ; } } return false ;
public class ByteUtilities { /** * Converts a hex string representation to a byte array . * @ param hex the string holding the hex values * @ return the resulting byte array */ public static byte [ ] asByteArray ( String hex ) { } }
byte [ ] bts = new byte [ hex . length ( ) / 2 ] ; for ( int i = 0 ; i < bts . length ; i ++ ) { bts [ i ] = ( byte ) Integer . parseInt ( hex . substring ( 2 * i , 2 * i + 2 ) , 16 ) ; } return bts ;
public class ComponentCollision { /** * TransformableListener */ @ Override public void notifyTransformed ( Transformable transformable ) { } }
final Collidable collidable = transformable . getFeature ( Collidable . class ) ; final double oldX = transformable . getOldX ( ) ; final double oldY = transformable . getOldY ( ) ; final int oldMinX = ( int ) Math . floor ( oldX / REDUCE_FACTOR ) ; final int oldMinY = ( int ) Math . floor ( oldY / REDUCE_FACTOR ) ; fi...
public class OnLineStatistics { /** * Adds a data sample the the counts with the provided weight of influence . * @ param x the data value to add * @ param weight the weight to give the value * @ throws ArithmeticException if a negative weight is given */ public void add ( double x , double weight ) { } }
// See http : / / en . wikipedia . org / wiki / Algorithms _ for _ calculating _ variance if ( weight < 0 ) throw new ArithmeticException ( "Can not add a negative weight" ) ; else if ( weight == 0 ) return ; double n1 = n ; n += weight ; double delta = x - mean ; double delta_n = delta * weight / n ; double delta_n2 =...
public class ApplicationLauncherApp { /** * Requests that all active processes be killed . * @ param blockTimeMS If & gt ; 0 then it will block until all processes are killed for the specified number * of milliseconds */ public void killAllProcesses ( long blockTimeMS ) { } }
// remove already dead processes from the GUI SwingUtilities . invokeLater ( new Runnable ( ) { @ Override public void run ( ) { DefaultListModel model = ( DefaultListModel ) processList . getModel ( ) ; for ( int i = model . size ( ) - 1 ; i >= 0 ; i -- ) { ActiveProcess p = ( ActiveProcess ) model . get ( i ) ; remov...
public class StrUtils { /** * Replace all sub strings ignore case < br / > * replaceIgnoreCase ( " AbcDECd " , " Cd " , " FF " ) = " AbFFEFF " */ public static String replaceIgnoreCase ( String text , String findtxt , String replacetxt ) { } }
if ( text == null ) return null ; String str = text ; if ( findtxt == null || findtxt . length ( ) == 0 ) { return str ; } if ( findtxt . length ( ) > str . length ( ) ) { return str ; } int counter = 0 ; String thesubstr ; while ( ( counter < str . length ( ) ) && ( str . substring ( counter ) . length ( ) >= findtxt ...
public class IotHubResourcesInner { /** * Get a list of the consumer groups in the Event Hub - compatible device - to - cloud endpoint in an IoT hub . * Get a list of the consumer groups in the Event Hub - compatible device - to - cloud endpoint in an IoT hub . * @ param nextPageLink The NextLink from the previous ...
return listEventHubConsumerGroupsNextWithServiceResponseAsync ( nextPageLink ) . map ( new Func1 < ServiceResponse < Page < EventHubConsumerGroupInfoInner > > , Page < EventHubConsumerGroupInfoInner > > ( ) { @ Override public Page < EventHubConsumerGroupInfoInner > call ( ServiceResponse < Page < EventHubConsumerGroup...
public class AbstractCsvAnnotationBeanWriter { /** * レコード用の値を検証するValidatorを追加します 。 * @ param validators { @ link CsvValidator } の実装クラスを設定します 。 */ @ SuppressWarnings ( "unchecked" ) public void addValidator ( CsvValidator < T > ... validators ) { } }
this . validators . addAll ( Arrays . asList ( validators ) ) ;
public class H2ONode { /** * InetAddress we use to communicate to this Node . */ public static H2ONode self ( InetAddress local ) { } }
assert H2O . H2O_PORT != 0 ; try { // Figure out which interface matches our IP address List < NetworkInterface > matchingIfs = new ArrayList < > ( ) ; Enumeration < NetworkInterface > netIfs = NetworkInterface . getNetworkInterfaces ( ) ; while ( netIfs . hasMoreElements ( ) ) { NetworkInterface netIf = netIfs . nextE...
public class ns_image { /** * < pre > * Converts API response of bulk operation into object and returns the object array in case of get request . * < / pre > */ protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } }
ns_image_responses result = ( ns_image_responses ) service . get_payload_formatter ( ) . string_to_resource ( ns_image_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . message , result . e...
public class AcpOrd { /** * < p > It half - checks items . Order can has items from several places . < / p > * @ param pRqVs additional request scoped parameters * @ param pOrds S . E . orders * @ return consolidated order with bookable items * @ throws Exception - an exception if checking fail */ public final ...
StringBuffer ordIds = null ; for ( CuOrSe co : pOrds ) { co . setGoods ( new ArrayList < CuOrSeGdLn > ( ) ) ; co . setServs ( new ArrayList < CuOrSeSrLn > ( ) ) ; if ( ordIds == null ) { ordIds = new StringBuffer ( ) ; ordIds . append ( co . getItsId ( ) . toString ( ) ) ; } else { ordIds . append ( "," + co . getItsId...
public class Topicspace { /** * / * ( non - Javadoc ) * @ see com . ibm . ws . sib . processor . runtime . SIMPTopicSpaceControllable # deleteLocalSubscriptionControlByID ( java . lang . String ) */ public void deleteLocalSubscriptionControlByID ( String id ) throws SIMPInvalidRuntimeIDException , SIMPControllableNot...
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteLocalSubscriptionControlByID" , id ) ; assertMessageHandlerNotCorrupt ( ) ; ControllableSubscription sub = getSubscription ( id ) ; if ( ! sub . isDurable ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . ...
public class Msg { /** * Puts a string into the message , prefixed with its length . * Users shall size the message by adding 1 to the length of the string : * It needs to be able to accommodate ( data . length + 1 ) more bytes . * @ param data a string shorter than 256 characters . If null , defaults to a no - o...
if ( data == null ) { return this ; } ByteBuffer dup = buf . duplicate ( ) ; dup . position ( writeIndex ) ; writeIndex += Wire . putShortString ( dup , data ) ; return this ;
public class XMLStreamEventsAsync { /** * Shortcut to move forward to the next START _ ELEMENT . */ public ISynchronizationPoint < Exception > nextStartElement ( ) { } }
ISynchronizationPoint < Exception > next = next ( ) ; if ( next . isUnblocked ( ) ) { if ( next . hasError ( ) ) return next ; if ( Type . START_ELEMENT . equals ( event . type ) ) return next ; return nextStartElement ( ) ; } SynchronizationPoint < Exception > sp = new SynchronizationPoint < > ( ) ; next . listenInlin...
public class WhiteBlackList { /** * Quote list . * @ param coll * the coll * @ param buf * the buf */ private static void quoteList ( final Collection < String > coll , final StringBuilder buf ) { } }
buf . append ( '[' ) ; boolean first = true ; for ( final String item : coll ) { if ( first ) { first = false ; } else { buf . append ( ", " ) ; } buf . append ( '"' ) ; for ( int i = 0 ; i < item . length ( ) ; i ++ ) { final char c = item . charAt ( i ) ; if ( c == '"' ) { buf . append ( "\\\"" ) ; } else { buf . app...
public class DirectConnectGatewayAssociationProposal { /** * The existing Amazon VPC prefixes advertised to the Direct Connect gateway . * @ param existingAllowedPrefixesToDirectConnectGateway * The existing Amazon VPC prefixes advertised to the Direct Connect gateway . */ public void setExistingAllowedPrefixesToDi...
if ( existingAllowedPrefixesToDirectConnectGateway == null ) { this . existingAllowedPrefixesToDirectConnectGateway = null ; return ; } this . existingAllowedPrefixesToDirectConnectGateway = new com . amazonaws . internal . SdkInternalList < RouteFilterPrefix > ( existingAllowedPrefixesToDirectConnectGateway ) ;
public class BackupManagerImpl { /** * { @ inheritDoc } */ public void restore ( RepositoryBackupChainLog log , RepositoryEntry repositoryEntry , boolean asynchronous , boolean removeJobOnceOver ) throws BackupOperationException , BackupConfigurationException , RepositoryException , RepositoryConfigurationException { }...
if ( repositoryEntry == null ) { if ( log . getOriginalRepositoryEntry ( ) == null ) { throw new RepositoryRestoreExeption ( "The backup log is not contains original repository log : " + log . getLogFilePath ( ) ) ; } this . restore ( log , log . getOriginalRepositoryEntry ( ) , asynchronous ) ; return ; } this . resto...
public class AdminSchedulerAction { @ Override protected void setupHtmlData ( final ActionRuntime runtime ) { } }
super . setupHtmlData ( runtime ) ; runtime . registerData ( "helpLink" , systemHelper . getHelpLink ( fessConfig . getOnlineHelpNameScheduler ( ) ) ) ;
public class MetricsClient { /** * Creates or updates a logs - based metric . * < p > Sample code : * < pre > < code > * try ( MetricsClient metricsClient = MetricsClient . create ( ) ) { * MetricName metricName = ProjectMetricName . of ( " [ PROJECT ] " , " [ METRIC ] " ) ; * LogMetric metric = LogMetric . n...
UpdateLogMetricRequest request = UpdateLogMetricRequest . newBuilder ( ) . setMetricName ( metricName == null ? null : metricName . toString ( ) ) . setMetric ( metric ) . build ( ) ; return updateLogMetric ( request ) ;
public class SecurityInterceptor { /** * Intercept execution for event handling . Checks if the security manager allows access before allowing the event . * @ param executionContext the context of the execution being intercepted * @ return the resulting { @ link net . sourceforge . stripes . action . Resolution } ;...
// Before handling the event , check if access is allowed . // If not explicitly allowed , access is denied . Resolution resolution ; if ( Boolean . TRUE . equals ( getAccessAllowed ( executionContext ) ) ) { resolution = executionContext . proceed ( ) ; } else { LOG . debug ( "The security manager has denied access." ...
public class HttpMessage { /** * Set a request attribute . * @ param name Attribute name * @ param attribute Attribute value * @ return Previous Attribute value */ public Object setAttribute ( String name , Object attribute ) { } }
if ( _attributes == null ) _attributes = new HashMap ( 11 ) ; return _attributes . put ( name , attribute ) ;
public class MavenModelScannerPlugin { /** * Adds information about plugin executions . * @ param mavenPluginDescriptor * The descriptor for the plugin . * @ param plugin * The Plugin . * @ param store * The database . */ private void addPluginExecutions ( MavenPluginDescriptor mavenPluginDescriptor , Plugi...
List < PluginExecution > executions = plugin . getExecutions ( ) ; for ( PluginExecution pluginExecution : executions ) { MavenPluginExecutionDescriptor executionDescriptor = store . create ( MavenPluginExecutionDescriptor . class ) ; executionDescriptor . setId ( pluginExecution . getId ( ) ) ; executionDescriptor . s...
public class JtsBinaryParser { /** * Parse the given { @ link org . postgis . binary . ValueGetter } into a JTS * { @ link org . locationtech . jts . geom . MultiPolygon } . * @ param data { @ link org . postgis . binary . ValueGetter } to parse . * @ param srid SRID of the parsed geometries . * @ return The pa...
int count = data . getInt ( ) ; Polygon [ ] polys = new Polygon [ count ] ; this . parseGeometryArray ( data , polys , srid ) ; return JtsGeometry . geofac . createMultiPolygon ( polys ) ;
public class WebGroup { /** * Method getMimeType . * @ param file * @ return String */ public String getMimeType ( String withDot , String withoutDot ) { } }
return ( ( VirtualHost ) parent ) . getMimeType ( withDot , withoutDot ) ;
public class Template { /** * Set the attributes for this template . * @ param attributes the attribute map */ public final void setAttributes ( final Map < String , Attribute > attributes ) { } }
for ( Map . Entry < String , Attribute > entry : attributes . entrySet ( ) ) { Object attribute = entry . getValue ( ) ; if ( ! ( attribute instanceof Attribute ) ) { final String msg = "Attribute: '" + entry . getKey ( ) + "' is not an attribute. It is a: " + attribute ; LOGGER . error ( "Error setting the Attributes:...