signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class LevenbergMarquardt { /** * / * ( non - Javadoc )
* @ see net . finmath . optimizer . Optimizer # run ( ) */
@ Override public void run ( ) throws SolverException { } } | // Create an executor for concurrent evaluation of derivatives
if ( numberOfThreads > 1 ) { if ( executor == null ) { executor = Executors . newFixedThreadPool ( numberOfThreads ) ; executorShutdownWhenDone = true ; } } try { // Allocate memory
int numberOfParameters = initialParameters . length ; int numberOfValues = ... |
public class AuthenticationApi { /** * Get OpenID user information by access token
* Get information about a user by their OAuth 2 access token .
* @ param authorization The OAuth 2 bearer access token you received from [ / auth / v3 / oauth / token ] ( / reference / authentication / Authentication / index . html #... | com . squareup . okhttp . Call call = getInfoValidateBeforeCall ( authorization , null , null ) ; Type localVarReturnType = new TypeToken < OpenIdUserInfo > ( ) { } . getType ( ) ; return apiClient . execute ( call , localVarReturnType ) ; |
public class Runnables { /** * Returns a wrapped runnable that logs and rethrows uncaught exceptions . */
static Runnable logFailure ( final Runnable runnable , Logger logger ) { } } | return ( ) -> { try { runnable . run ( ) ; } catch ( Throwable t ) { if ( ! ( t instanceof RejectedExecutionException ) ) { logger . error ( "An uncaught exception occurred" , t ) ; } throw t ; } } ; |
public class ValueUtil { /** * Create a string representation repeating a character
* sequence the requested number of times .
* @ param prefix an optional prefix to prepend
* @ param charSequence the character sequence to repeat
* @ param times how many times the character sequence should be repeated
* @ ret... | if ( times < 1 ) { return "" ; } StringBuilder sb = new StringBuilder ( ) ; if ( prefix != null ) { sb . append ( prefix ) ; } for ( int i = 0 ; i < times ; i ++ ) { sb . append ( charSequence ) ; } return sb . toString ( ) ; |
public class DERBitString { /** * return a Bit String from the passed in object
* @ exception IllegalArgumentException if the object cannot be converted . */
public static DERBitString getInstance ( Object obj ) { } } | if ( obj == null || obj instanceof DERBitString ) { return ( DERBitString ) obj ; } if ( obj instanceof ASN1OctetString ) { byte [ ] bytes = ( ( ASN1OctetString ) obj ) . getOctets ( ) ; int padBits = bytes [ 0 ] ; byte [ ] data = new byte [ bytes . length - 1 ] ; System . arraycopy ( bytes , 1 , data , 0 , bytes . len... |
public class TimeBasedRegisteredServiceAccessStrategy { /** * Does starting time allow service access boolean .
* @ return true / false */
protected boolean doesStartingTimeAllowServiceAccess ( ) { } } | if ( this . startingDateTime != null ) { val st = DateTimeUtils . zonedDateTimeOf ( this . startingDateTime ) ; if ( st != null ) { val now = ZonedDateTime . now ( ZoneOffset . UTC ) ; if ( now . isBefore ( st ) ) { LOGGER . warn ( "Service access not allowed because it starts at [{}]. Zoned now is [{}]" , this . start... |
public class Sneaky { /** * Wrap a { @ link CheckedIntFunction } in a { @ link IntFunction } .
* Example :
* < code > < pre >
* IntStream . of ( 1 , 2 , 3 ) . mapToObj ( Unchecked . intFunction ( i - > {
* if ( i & lt ; 0)
* throw new Exception ( " Only positive numbers allowed " ) ;
* return " " + i ;
* ... | return Unchecked . intFunction ( function , Unchecked . RETHROW_ALL ) ; |
public class OperationProcessor { /** * region Queue Processing */
private CompletableFuture < Void > throttle ( ) { } } | val delay = new AtomicReference < ThrottlerCalculator . DelayResult > ( this . throttlerCalculator . getThrottlingDelay ( ) ) ; if ( ! delay . get ( ) . isMaximum ( ) ) { // We are not delaying the maximum amount . We only need to do this once .
return throttleOnce ( delay . get ( ) . getDurationMillis ( ) , delay . ge... |
public class ResourceFinder { /** * Assumes the class specified points to a directory in the classpath that holds files
* containing the name of a class that implements or is a subclass of the specfied class .
* Any class that cannot be loaded or are not assignable to the specified class will be
* skipped and pla... | resourcesNotLoaded . clear ( ) ; Map < String , Class > implementations = new HashMap < > ( ) ; Map < String , String > map = mapAvailableStrings ( interfase . getName ( ) ) ; for ( Iterator iterator = map . entrySet ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { Map . Entry entry = ( Map . Entry ) iterator . next (... |
public class RaidNode { /** * Get the job id from the configuration */
public static String getJobID ( Configuration conf ) { } } | String jobId = conf . get ( "mapred.job.id" , null ) ; if ( jobId == null ) { jobId = "localRaid" + df . format ( new Date ( ) ) ; conf . set ( "mapred.job.id" , jobId ) ; } return jobId ; |
public class GraphUtils { /** * Fetch all of the dependents of the given target vertex
* @ return mutable snapshot of the source vertices of all incoming edges */
public static < V > Set < V > getIncomingVertices ( DirectedGraph < V , DefaultEdge > graph , V target ) { } } | Set < DefaultEdge > edges = graph . incomingEdgesOf ( target ) ; Set < V > sources = new LinkedHashSet < V > ( ) ; for ( DefaultEdge edge : edges ) { sources . add ( graph . getEdgeSource ( edge ) ) ; } return sources ; |
public class JdbcRow { /** * Returns the column as a String .
* @ param index 1 - based
* @ return column as a String */
public String getString ( int index ) { } } | Object value = _values [ index - 1 ] ; if ( value != null ) { return value . toString ( ) ; } else { return null ; } |
public class DateUtils { /** * Formats the specified date as an RFC 822 string .
* @ param date
* The date to format .
* @ return The RFC 822 string representing the specified date . */
public static String formatRFC822Date ( Date date ) { } } | try { return rfc822DateFormat . print ( date . getTime ( ) ) ; } catch ( RuntimeException ex ) { throw handleException ( ex ) ; } |
public class Utils { /** * Return the number of invalid characters in sequence .
* @ param sequence
* protein sequence to count for invalid characters .
* @ param cSet
* the set of characters that are deemed valid .
* @ param ignoreCase
* indicates if cases should be ignored
* @ return
* the number of i... | int total = 0 ; char [ ] cArray ; if ( ignoreCase ) cArray = sequence . toUpperCase ( ) . toCharArray ( ) ; else cArray = sequence . toCharArray ( ) ; if ( cSet == null ) cSet = PeptideProperties . standardAASet ; for ( char c : cArray ) { if ( ! cSet . contains ( c ) ) total ++ ; } return total ; |
public class LinkedBlockingQueue { /** * Signals a waiting put . Called only from take / poll . */
private void signalNotFull ( ) { } } | final ReentrantLock putLock = this . putLock ; putLock . lock ( ) ; try { notFull . signal ( ) ; } finally { putLock . unlock ( ) ; } |
public class AWSIotClient { /** * Updates a Device Defender security profile .
* @ param updateSecurityProfileRequest
* @ return Result of the UpdateSecurityProfile operation returned by the service .
* @ throws InvalidRequestException
* The request is not valid .
* @ throws ResourceNotFoundException
* The ... | request = beforeClientExecution ( request ) ; return executeUpdateSecurityProfile ( request ) ; |
public class Lexer { /** * Throws an exception if the current token is not an identifier . Otherwise ,
* returns the identifier string and moves to the next token .
* @ return the string value of the current token */
public String eatId ( ) { } } | if ( ! matchId ( ) ) throw new BadSyntaxException ( ) ; String s = tok . sval ; nextToken ( ) ; return s ; |
public class AhrefPageURLParser { /** * Get all ahref links within this page response .
* @ param theResponse the response from the request to this page
* @ return the urls . */
public Set < CrawlerURL > get ( HTMLPageResponse theResponse ) { } } | final String url = theResponse . getUrl ( ) ; Set < CrawlerURL > ahrefs = new HashSet < CrawlerURL > ( ) ; // only populate if we have a valid response , else return empty set
if ( theResponse . getResponseCode ( ) == HttpStatus . SC_OK ) { ahrefs = fetch ( AHREF , ABS_HREF , theResponse . getBody ( ) , url ) ; } retur... |
public class X509CertImpl { /** * Gets the notBefore date from the validity period of the certificate .
* @ return the start date of the validity period . */
public Date getNotBefore ( ) { } } | if ( info == null ) return null ; try { Date d = ( Date ) info . get ( CertificateValidity . NAME + DOT + CertificateValidity . NOT_BEFORE ) ; return d ; } catch ( Exception e ) { return null ; } |
public class ResourceGroovyMethods { /** * Create a new ObjectInputStream for this file and pass it to the closure .
* This method ensures the stream is closed after the closure returns .
* @ param file a File
* @ param closure a closure
* @ return the value returned by the closure
* @ throws IOException if a... | return IOGroovyMethods . withStream ( newObjectInputStream ( file ) , closure ) ; |
public class LocalWorkspaceDataManagerStub { /** * { @ inheritDoc } */
@ Override public List < NodeData > getChildNodesData ( NodeData nodeData ) throws RepositoryException { } } | return Collections . unmodifiableList ( super . getChildNodesData ( nodeData ) ) ; |
public class SimpleMessageFormatter { /** * Formats a log message which contains placeholders ( i . e . when a template context exists ) . This
* does not format only metadata , only the message and its arguments . */
private static StringBuilder formatMessage ( LogData logData ) { } } | SimpleMessageFormatter formatter = new SimpleMessageFormatter ( logData . getTemplateContext ( ) , logData . getArguments ( ) ) ; StringBuilder out = formatter . build ( ) ; if ( logData . getArguments ( ) . length > formatter . getExpectedArgumentCount ( ) ) { // TODO ( dbeaumont ) : Do better and look at adding forma... |
public class PortletDescriptorImpl { /** * If not already created , a new < code > user - attribute < / code > element will be created and returned .
* Otherwise , the first existing < code > user - attribute < / code > element will be returned .
* @ return the instance defined for the element < code > user - attri... | List < Node > nodeList = model . get ( "user-attribute" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new UserAttributeTypeImpl < PortletDescriptor > ( this , "user-attribute" , model , nodeList . get ( 0 ) ) ; } return createUserAttribute ( ) ; |
public class MinHash { /** * Create a target data which has analyzer , text and the number of bits .
* @ param analyzer
* @ param text
* @ param numOfBits
* @ return */
public static Data newData ( final Analyzer analyzer , final String text , final int numOfBits ) { } } | return new Data ( analyzer , text , numOfBits ) ; |
public class BaseRichMediaStudioCreative { /** * Sets the creativeFormat value for this BaseRichMediaStudioCreative .
* @ param creativeFormat * The creative format of the Rich Media Studio creative . This
* attribute is readonly . */
public void setCreativeFormat ( com . google . api . ads . admanager . axis . v20... | this . creativeFormat = creativeFormat ; |
public class RedBlackTree { /** * delete the key - value pair with the maximum key rooted at h */
private RedBlackTreeNode < Key , Value > deleteMax ( RedBlackTreeNode < Key , Value > h ) { } } | if ( isRed ( h . getLeft ( ) ) ) h = rotateRight ( h ) ; if ( h . getRight ( ) == null ) return null ; if ( ! isRed ( h . getRight ( ) ) && ! isRed ( h . getRight ( ) . getLeft ( ) ) ) h = moveRedRight ( h ) ; h . setRight ( deleteMax ( h . getRight ( ) ) ) ; return balance ( h ) ; |
public class VariantAggregatedStatsCalculator { /** * returns in alleles [ ] the genotype specified in index in the sequence :
* 0/0 , 0/1 , 1/1 , 0/2 , 1/2 , 2/2 , 0/3 . . .
* @ param index in this sequence , starting in 0
* @ param alleles returned genotype . */
public static void getGenotype ( int index , Inte... | // index + + ;
// double value = ( - 3 + Math . sqrt ( 1 + 8 * index ) ) / 2 ; / / slower than the iterating version , right ?
// alleles [ 1 ] = new Double ( Math . ceil ( value ) ) . intValue ( ) ;
// alleles [ 0 ] = alleles [ 1 ] - ( ( alleles [ 1 ] + 1 ) * ( alleles [ 1 ] + 2 ) / 2 - index ) ;
int cursor = 0 ; fina... |
public class TasksInner { /** * Get the properties of a specified task .
* @ param resourceGroupName The name of the resource group to which the container registry belongs .
* @ param registryName The name of the container registry .
* @ param taskName The name of the container registry task .
* @ throws Illega... | return getWithServiceResponseAsync ( resourceGroupName , registryName , taskName ) . map ( new Func1 < ServiceResponse < TaskInner > , TaskInner > ( ) { @ Override public TaskInner call ( ServiceResponse < TaskInner > response ) { return response . body ( ) ; } } ) ; |
public class ClassUtils { /** * Returns a list of class fields . Supports inheritance and doesn ' t return synthetic fields .
* @ param beanClass class to be searched for
* @ return a list of found fields */
public static List < Field > getClassFields ( Class < ? > beanClass ) { } } | Map < String , Field > resultMap = new HashMap < > ( ) ; LinkedList < Field > results = new LinkedList < > ( ) ; Class < ? > currentClass = beanClass ; while ( currentClass != null && currentClass != Object . class ) { for ( Field field : currentClass . getDeclaredFields ( ) ) { if ( ! field . isSynthetic ( ) ) { Field... |
public class Vector3i { /** * / * ( non - Javadoc )
* @ see org . joml . Vector3ic # mul ( int , org . joml . Vector3i ) */
public Vector3i mul ( int scalar , Vector3i dest ) { } } | dest . x = x * scalar ; dest . y = y * scalar ; dest . z = z * scalar ; return dest ; |
public class Mapper1_0 { /** * / * ( non - Javadoc )
* @ see com . att . authz . certman . mapper . Mapper # toReq ( com . att . authz . env . AuthzTrans , java . lang . Object ) */
@ Override public Result < CertReq > toReq ( AuthzTrans trans , BaseRequest req ) { } } | CertificateRequest in ; try { in = ( CertificateRequest ) req ; } catch ( ClassCastException e ) { return Result . err ( Result . ERR_BadData , "Request is not a CertificateRequest" ) ; } CertReq out = new CertReq ( ) ; Validator v = new Validator ( ) ; if ( v . isNull ( "CertRequest" , req ) . nullOrBlank ( "MechID" ,... |
public class RedisClient { /** * Get the object represented by the given serialized bytes . */
protected Object jsonDeserialize ( byte [ ] in , Class < ? > cls ) { } } | if ( in == null || in . length == 0 ) { return null ; } Object res = null ; try { res = JsonUtils . json2Object ( new String ( in , "utf-8" ) , cls ) ; } catch ( UnsupportedEncodingException e ) { logger . error ( "DeSerialize object fail " , e ) ; } return res ; |
public class AbstractRemoteClient { /** * Method reinitialize this remote . If the remote was previously active the activation state will be recovered .
* This method can be used in case of a broken connection or if the participant config has been changed .
* Note : After reinit the data remains the same but a new ... | // to not reinit if shutdown is in progress !
if ( shutdownInitiated ) { return ; } final StackTraceElement [ ] stackTraceElement = Thread . currentThread ( ) . getStackTrace ( ) ; try { synchronized ( maintainerLock ) { reinitStackTraces . add ( stackTraceElement ) ; try { if ( reinitStackTraces . size ( ) > 1 ) { for... |
public class DoubleValueData { /** * { @ inheritDoc } */
@ Override protected Calendar getDate ( ) { } } | Calendar calendar = Calendar . getInstance ( ) ; calendar . setTimeInMillis ( new Double ( value ) . longValue ( ) ) ; return calendar ; |
public class InternalSimpleAntlrParser { /** * InternalSimpleAntlr . g : 1077:1 : entryRuleNotExpression returns [ EObject current = null ] : iv _ ruleNotExpression = ruleNotExpression EOF ; */
public final EObject entryRuleNotExpression ( ) throws RecognitionException { } } | EObject current = null ; EObject iv_ruleNotExpression = null ; try { // InternalSimpleAntlr . g : 1078:2 : ( iv _ ruleNotExpression = ruleNotExpression EOF )
// InternalSimpleAntlr . g : 1079:2 : iv _ ruleNotExpression = ruleNotExpression EOF
{ if ( state . backtracking == 0 ) { newCompositeNode ( grammarAccess . getNo... |
public class ChannelDeserializer { /** * endregion */
@ Override protected void produce ( AsyncProduceController async ) { } } | async . begin ( ) ; ByteBuf firstBuf ; while ( isReceiverReady ( ) && ( firstBuf = queue . peekBuf ( ) ) != null ) { int dataSize ; int headerSize ; int size ; int firstBufRemaining = firstBuf . readRemaining ( ) ; if ( firstBufRemaining >= 3 ) { byte [ ] array = firstBuf . array ( ) ; int pos = firstBuf . head ( ) ; b... |
public class XWikiSyntaxChainingRenderer { /** * { @ inheritDoc }
* @ since 1.6M2 */
@ Override public void beginDefinitionTerm ( ) { } } | if ( getBlockState ( ) . getDefinitionListItemIndex ( ) > 0 ) { getPrinter ( ) . print ( "\n" ) ; } if ( this . listStyle . length ( ) > 0 ) { print ( this . listStyle . toString ( ) ) ; if ( this . listStyle . charAt ( 0 ) == '1' ) { print ( "." ) ; } } print ( StringUtils . repeat ( ':' , getBlockState ( ) . getDefin... |
public class LogRepositoryComponent { /** * Sets memory destination for trace messages .
* @ param location the base directory to use for trace file repository when in - memory records are dumped to the disk . Value ' null ' means
* to keep using current directory .
* @ param maxSize the maximum size of the in - ... | LogRepositoryWriter old = getBinaryHandler ( ) . getTraceWriter ( ) ; LogRepositoryWriterCBuffImpl writer ; // Check if trace writer need to be changed .
if ( location == null && old instanceof LogRepositoryWriterCBuffImpl ) { writer = ( LogRepositoryWriterCBuffImpl ) old ; } else { // Get the repository manager to use... |
public class SparseVector { /** * Add other vector . */
void add_vector ( SparseVector vec ) { } } | for ( Map . Entry < Integer , Double > entry : vec . entrySet ( ) ) { Double v = get ( entry . getKey ( ) ) ; if ( v == null ) v = 0. ; put ( entry . getKey ( ) , v + entry . getValue ( ) ) ; } |
public class ModuleRoles { /** * Create a new role .
* This method will override the configuration specified through
* { @ link CMAClient . Builder # setSpaceId ( String ) } and will ignore
* { @ link CMAClient . Builder # setEnvironmentId ( String ) } .
* @ param spaceId the space id to host the role .
* @ p... | assertNotNull ( spaceId , "spaceId" ) ; assertNotNull ( role , "role" ) ; final CMASystem sys = role . getSystem ( ) ; role . setSystem ( null ) ; try { return service . create ( spaceId , role ) . blockingFirst ( ) ; } finally { role . setSystem ( sys ) ; } |
public class OgnlFactory { /** * Get an OGNL Evaluator for a particular expression with a given input
* @ param root
* an example instance of the root object that will be passed to this OGNL evaluator
* @ param expression
* the OGNL expression
* @ return
* @ see < a href = " https : / / commons . apache . o... | final OgnlEvaluatorCollection collection = INSTANCE . getEvaluators ( getRootClass ( root ) ) ; return collection . get ( expression ) ; |
public class NNDescent { /** * Process new neighbors .
* This is a complex join , because we do not need to join old neighbors with
* old neighbors , and we have forward - and reverse neighbors each .
* @ param flag Flags to mark new neighbors .
* @ param newFwd New forward neighbors
* @ param oldFwd Old forw... | int counter = 0 ; // nn _ new
if ( ! newFwd . isEmpty ( ) ) { for ( DBIDIter sniter = newFwd . iter ( ) ; sniter . valid ( ) ; sniter . advance ( ) ) { // nn _ new X nn _ new
for ( DBIDIter niter2 = newFwd . iter ( ) ; niter2 . valid ( ) ; niter2 . advance ( ) ) { if ( DBIDUtil . compare ( sniter , niter2 ) < 0 ) { // ... |
public class AbstractDBOutlier { /** * Runs the algorithm in the timed evaluation part .
* @ param database Database to process
* @ param relation Relation to process
* @ return Outlier result */
public OutlierResult run ( Database database , Relation < O > relation ) { } } | // Run the actual score process
DoubleDataStore dbodscore = computeOutlierScores ( database , relation , d ) ; // Build result representation .
DoubleRelation scoreResult = new MaterializedDoubleRelation ( "Density-Based Outlier Detection" , "db-outlier" , dbodscore , relation . getDBIDs ( ) ) ; OutlierScoreMeta scoreM... |
public class FactoryBuilderSupport { /** * A hook to allow names to be converted into some other object such as a
* QName in XML or ObjectName in JMX .
* @ param methodName the name of the desired method
* @ return the object representing the name */
public Object getName ( String methodName ) { } } | if ( getProxyBuilder ( ) . nameMappingClosure != null ) { return getProxyBuilder ( ) . nameMappingClosure . call ( methodName ) ; } return methodName ; |
public class MapperFactory { /** * Creates a new mapper for the given type .
* @ param type
* the type for which a mapper is to be created
* @ return a mapper that can handle the mapping of given type to / from the Cloud Datastore . */
private Mapper createMapper ( Type type ) { } } | lock . lock ( ) ; try { Mapper mapper = cache . get ( type ) ; if ( mapper != null ) { return mapper ; } if ( type instanceof Class ) { mapper = createMapper ( ( Class < ? > ) type ) ; } else if ( type instanceof ParameterizedType ) { mapper = createMapper ( ( ParameterizedType ) type ) ; } else { throw new IllegalArgu... |
public class JsMessageImpl { /** * Return a ' safe copy ' of the JsMessage .
* This method must be called by the Message processor during ' receive '
* processing for a pub / sub message . It must be called BEFORE the headers are
* set for the receive . The Message Processor should then return this
* ' copy ' t... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getReceived" ) ; /* Now get the JsMessage to return */
JsMessage newMsg = createNew ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getReceived" , newMsg )... |
public class Blog { /** * Create a new post of a given type for this blog
* @ param klass the class of the post to make
* @ param < T > the class of the post to make
* @ return new post
* @ throws IllegalAccessException if class instantiation fails
* @ throws InstantiationException if class instantiation fail... | return client . newPost ( name , klass ) ; |
public class SecurityContextInitializer { /** * Initialize and register the contexts for modules that , by default ,
* are initialized with the security context
* @ param context The Security Context to perform initialzation routines */
private static void initializeDefaultModules ( SecurityContext context ) { } } | if ( context . isInitialized ( ) ) { return ; } if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "SecurityContext default module initializer starting" ) ; } String moduleName ; // Loop through the module names
for ( int i = 0 ; i < DEFAULT_MODULES . length ; i ++ ) { moduleName = DEFAULT_MODULES [ i ] ; try { LOGG... |
public class CodecUtils { /** * 将一个长度为8的boolean数组 ( 每bit代表一个boolean值 ) 转换为byte
* @ param array boolean数组
* @ return byte */
public static byte booleansToByte ( boolean [ ] array ) { } } | if ( array != null && array . length > 0 ) { byte b = 0 ; for ( int i = 0 ; i <= 7 ; i ++ ) { if ( array [ i ] ) { int nn = ( 1 << ( 7 - i ) ) ; b += nn ; } } return b ; } return 0 ; |
public class BshClassPath { /** * Search Archive for classes .
* @ param the archive file location
* @ return array of class names found
* @ throws IOException */
static String [ ] searchArchiveForClasses ( URL url ) throws IOException { } } | List < String > list = new ArrayList < > ( ) ; ZipInputStream zip = new ZipInputStream ( url . openStream ( ) ) ; ZipEntry ze ; while ( zip . available ( ) == 1 ) if ( ( ze = zip . getNextEntry ( ) ) != null && isClassFileName ( ze . getName ( ) ) ) list . add ( canonicalizeClassName ( ze . getName ( ) ) ) ; zip . clos... |
public class HostParser { /** * Accepts a comma separated list of host / ports .
* For example
* www . example . com , www2 . example . com : 123 , 192.0.2.1 , 192.0.2.2:123 , 2001 : db8 : : ff00:42:8329 , [ 2001 : db8 : : ff00:42:8329 ] : 123 */
public static Hosts parse ( String hostString , Integer explicitGloba... | List < String > hosts = new ArrayList < > ( ) ; List < Integer > ports = new ArrayList < > ( ) ; if ( hostString == null || hostString . trim ( ) . isEmpty ( ) ) { return Hosts . NO_HOST ; } // for each element between commas
String [ ] splits = hostString . split ( "," ) ; for ( String rawSplit : splits ) { // remove ... |
public class BaseMonetaryCurrenciesSingletonSpi { /** * Allows to check if a { @ link javax . money . CurrencyUnit } instance is
* defined , i . e . accessible from { @ link # getCurrency ( String , String . . . ) } .
* @ param locale the target { @ link java . util . Locale } , not { @ code null } .
* @ param pr... | return ! getCurrencies ( CurrencyQueryBuilder . of ( ) . setCountries ( locale ) . setProviderNames ( providers ) . build ( ) ) . isEmpty ( ) ; |
public class RxLifecycle { /** * Binds the given source to a lifecycle .
* When the lifecycle event occurs , the source will cease to emit any notifications .
* @ param lifecycle the lifecycle sequence
* @ param event the event which should conclude notifications from the source
* @ return a reusable { @ link L... | checkNotNull ( lifecycle , "lifecycle == null" ) ; checkNotNull ( event , "event == null" ) ; return bind ( takeUntilEvent ( lifecycle , event ) ) ; |
public class AreaOfInterest { /** * Tests that the area is valid geojson , the style ref is valid or null and the display is non - null . */
public void postConstruct ( ) { } } | parseGeometry ( ) ; Assert . isTrue ( this . polygon != null , "Polygon is null. 'area' string is: '" + this . area + "'" ) ; Assert . isTrue ( this . display != null , "'display' is null" ) ; Assert . isTrue ( this . style == null || this . display == AoiDisplay . RENDER , "'style' does not make sense unless 'display'... |
public class AttributeSet { /** * Method to get the type from the cache . Searches if not found in the type
* hierarchy .
* @ param _ typeName name of the type
* @ param _ name name of the attribute
* @ return AttributeSet
* @ throws CacheReloadException on error */
public static AttributeSet find ( final Str... | AttributeSet ret = ( AttributeSet ) Type . get ( AttributeSet . evaluateName ( _typeName , _name ) ) ; if ( ret == null ) { if ( Type . get ( _typeName ) . getParentType ( ) != null ) { ret = AttributeSet . find ( Type . get ( _typeName ) . getParentType ( ) . getName ( ) , _name ) ; } } return ret ; |
public class SQLiteConnection { /** * Called by SQLiteConnectionPool only . */
static SQLiteConnection open ( SQLiteConnectionPool pool , SQLiteDatabaseConfiguration configuration , int connectionId , boolean primaryConnection ) { } } | SQLiteConnection connection = new SQLiteConnection ( pool , configuration , connectionId , primaryConnection ) ; try { connection . open ( ) ; return connection ; } catch ( SQLiteException ex ) { connection . dispose ( false ) ; throw ex ; } |
public class SerializationUtil { /** * Writes a nullable { @ link PartitionIdSet } to the given data output .
* @ param partitionIds
* @ param out
* @ throws IOException */
public static void writeNullablePartitionIdSet ( PartitionIdSet partitionIds , ObjectDataOutput out ) throws IOException { } } | if ( partitionIds == null ) { out . writeInt ( - 1 ) ; return ; } out . writeInt ( partitionIds . getPartitionCount ( ) ) ; out . writeInt ( partitionIds . size ( ) ) ; PrimitiveIterator . OfInt intIterator = partitionIds . intIterator ( ) ; while ( intIterator . hasNext ( ) ) { out . writeInt ( intIterator . nextInt (... |
public class DeleteTapeRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DeleteTapeRequest deleteTapeRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( deleteTapeRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( deleteTapeRequest . getGatewayARN ( ) , GATEWAYARN_BINDING ) ; protocolMarshaller . marshall ( deleteTapeRequest . getTapeARN ( ) , TAPEARN_BINDING ) ; } catch ( Excep... |
public class MolecularFormulaManipulator { /** * Get a list of all Elements which are contained
* molecular .
* @ param formula The MolecularFormula to check
* @ return The list with the IElements in this molecular formula */
public static List < IElement > elements ( IMolecularFormula formula ) { } } | List < IElement > elementList = new ArrayList < IElement > ( ) ; List < String > stringList = new ArrayList < String > ( ) ; for ( IIsotope isotope : formula . isotopes ( ) ) { if ( ! stringList . contains ( isotope . getSymbol ( ) ) ) { elementList . add ( isotope ) ; stringList . add ( isotope . getSymbol ( ) ) ; } }... |
public class AbstractApitraryClient { /** * doPost .
* @ param request
* a { @ link com . apitrary . api . request . Request } object .
* @ param < T >
* a T object .
* @ return a { @ link com . apitrary . api . response . Response } object . */
protected < T > Response < T > doPost ( Request < T > request ) ... | String payload = RequestUtil . getRequestPayload ( request ) ; URI uri = buidURI ( request ) ; Timer timer = Timer . tic ( ) ; TransportResult result = getApiClientTransportFactory ( ) . newTransport ( api ) . doPost ( uri , payload ) ; timer . toc ( ) ; log . trace ( result . getStatusCode ( ) + " " + uri . toString (... |
public class ParamTaglet { /** * Convert the individual ParamTag into Content .
* @ param isNonTypeParams true if this is just a regular param tag . False
* if this is a type param tag .
* @ param writer the taglet writer for output writing .
* @ param paramTag the tag whose inline tags will be printed .
* @ ... | Content result = writer . getOutputInstance ( ) ; String header = writer . configuration ( ) . getText ( isNonTypeParams ? "doclet.Parameters" : "doclet.TypeParameters" ) ; if ( isFirstParam ) { result . addContent ( writer . getParamHeader ( header ) ) ; } result . addContent ( writer . paramTagOutput ( paramTag , nam... |
public class CorpusUtil { /** * 编译单词
* @ param word
* @ return */
public static IWord compile ( IWord word ) { } } | String label = word . getLabel ( ) ; if ( "nr" . equals ( label ) ) return new Word ( word . getValue ( ) , TAG_PEOPLE ) ; else if ( "m" . equals ( label ) || "mq" . equals ( label ) ) return new Word ( word . getValue ( ) , TAG_NUMBER ) ; else if ( "t" . equals ( label ) ) return new Word ( word . getValue ( ) , TAG_T... |
public class PipelineServiceImpl { /** * 用于Model对象转化为DO对象
* @ param pipeline
* @ return PipelineDO */
private PipelineDO modelToDo ( Pipeline pipeline ) { } } | PipelineDO pipelineDO = new PipelineDO ( ) ; try { pipelineDO . setId ( pipeline . getId ( ) ) ; pipelineDO . setName ( pipeline . getName ( ) ) ; pipelineDO . setParameters ( pipeline . getParameters ( ) ) ; pipelineDO . setDescription ( pipeline . getDescription ( ) ) ; pipelineDO . setChannelId ( pipeline . getChann... |
public class UserApi { /** * Search users by Email or username
* < pre > < code > GitLab Endpoint : GET / users ? search = : email _ or _ username < / code > < / pre >
* @ param emailOrUsername the email or username to search for
* @ return the User List with the email or username like emailOrUsername
* @ throw... | return ( findUsers ( emailOrUsername , getDefaultPerPage ( ) ) . all ( ) ) ; |
public class Database { /** * Saves a document in the database similarly to { @ link Database # save ( Object ) } but using a
* specific write quorum .
* @ param object the object to save
* @ param writeQuorum the write quorum
* @ return { @ link com . cloudant . client . api . model . Response }
* @ throws D... | Response couchDbResponse = client . couchDbClient . put ( getDBUri ( ) , object , true , writeQuorum ) ; com . cloudant . client . api . model . Response response = new com . cloudant . client . api . model . Response ( couchDbResponse ) ; return response ; |
public class CPFriendlyURLEntryPersistenceImpl { /** * Returns the last cp friendly url entry in the ordered set where groupId = & # 63 ; and classNameId = & # 63 ; and classPK = & # 63 ; and main = & # 63 ; .
* @ param groupId the group ID
* @ param classNameId the class name ID
* @ param classPK the class pk
... | int count = countByG_C_C_M ( groupId , classNameId , classPK , main ) ; if ( count == 0 ) { return null ; } List < CPFriendlyURLEntry > list = findByG_C_C_M ( groupId , classNameId , classPK , main , count - 1 , count , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ; |
public class TextMateGenerator2 { /** * Generate the rules for the type declaration keywords .
* @ param declarators the type declaration keywords .
* @ return the rules . */
protected List < Map < String , ? > > generateTypeDeclarations ( Set < String > declarators ) { } } | final List < Map < String , ? > > list = new ArrayList < > ( ) ; if ( ! declarators . isEmpty ( ) ) { list . add ( pattern ( it -> { it . matches ( keywordRegex ( declarators ) ) ; it . style ( TYPE_DECLARATION_STYLE ) ; it . comment ( "Type Declarations" ) ; // $ NON - NLS - 1 $
} ) ) ; } return list ; |
public class CombinedWriter { /** * { @ inheritDoc } */
@ Override public IBucket read ( final long pKey ) throws TTIOException { } } | Future < IBucket > secondReturn = mService . submit ( new Callable < IBucket > ( ) { @ Override public IBucket call ( ) throws Exception { return mSecondWriter . read ( pKey ) ; } } ) ; IBucket returnVal = mFirstWriter . read ( pKey ) ; try { if ( returnVal == null ) { return secondReturn . get ( ) ; } else { return re... |
public class BaseRTMPTConnection { /** * Real close */
public void realClose ( ) { } } | if ( isClosing ( ) ) { if ( buffer != null ) { buffer . free ( ) ; buffer = null ; } state . setState ( RTMP . STATE_DISCONNECTED ) ; pendingMessages . clear ( ) ; super . close ( ) ; } |
public class DefaultAuthorizationStrategy { /** * Add a new FoxHttpAuthorization to the AuthorizationStrategy
* @ param foxHttpAuthorizationScope scope in which the authorization is used
* @ param foxHttpAuthorization authorization itself */
@ Override public void addAuthorization ( FoxHttpAuthorizationScope foxHtt... | if ( foxHttpAuthorizations . containsKey ( foxHttpAuthorizationScope . toString ( ) ) ) { foxHttpAuthorizations . get ( foxHttpAuthorizationScope . toString ( ) ) . add ( foxHttpAuthorization ) ; } else { foxHttpAuthorizations . put ( foxHttpAuthorizationScope . toString ( ) , new ArrayList < > ( Collections . singleto... |
public class JpaSource { /** * { @ inheritDoc } */
@ Override public void beginExport ( ) { } } | if ( m_emf == null ) { m_emf = Persistence . createEntityManagerFactory ( m_persistenceUnitName ) ; } m_em = m_emf . createEntityManager ( ) ; |
public class AssetsInner { /** * Get an Asset .
* Get the details of an Asset in the Media Services account .
* @ param resourceGroupName The name of the resource group within the Azure subscription .
* @ param accountName The Media Services account name .
* @ param assetName The Asset name .
* @ throws Illeg... | return getWithServiceResponseAsync ( resourceGroupName , accountName , assetName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class EstimateSceneCalibrated { /** * Sets the a _ to _ b transform for the motion given . */
void decomposeEssential ( Motion motion ) { } } | List < Se3_F64 > candidates = MultiViewOps . decomposeEssential ( motion . F ) ; int bestScore = 0 ; Se3_F64 best = null ; PositiveDepthConstraintCheck check = new PositiveDepthConstraintCheck ( ) ; for ( int i = 0 ; i < candidates . size ( ) ; i ++ ) { Se3_F64 a_to_b = candidates . get ( i ) ; int count = 0 ; for ( in... |
public class ConsumerSessionProxy { /** * This method returns the id for this consumer session that was assigned to it by the
* message processor on the server . This is needed when creating a bifurcated consumer session .
* @ return Returns the id . */
public long getId ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getId" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getId" , "" + messageProcessorId ) ; return messageProcessorId ; |
public class ParsedElement { /** * Just like makeFloat ( ) , but creates a float primitive value instead of a
* Float object . Much more efficient if you don ' t need the object .
* @ param obj Any float convertible object
* @ return The float primitive value . */
public static float makeFloatValue ( Object obj )... | if ( obj == null ) { return Float . NaN ; } return CommonServices . getCoercionManager ( ) . makePrimitiveFloatFrom ( obj ) ; |
public class GetParametersRequest { /** * Names of the parameters for which you want to query information .
* @ return Names of the parameters for which you want to query information . */
public java . util . List < String > getNames ( ) { } } | if ( names == null ) { names = new com . amazonaws . internal . SdkInternalList < String > ( ) ; } return names ; |
public class Conversation { /** * region Payloads */
public void addPayload ( Payload payload ) { } } | // TODO : figure out a better way of detecting new events
if ( payload instanceof EventPayload ) { notifyEventGenerated ( ( EventPayload ) payload ) ; } payload . setLocalConversationIdentifier ( notNull ( getLocalIdentifier ( ) ) ) ; payload . setConversationId ( getConversationId ( ) ) ; payload . setToken ( getConve... |
public class DirectoryClient { /** * { @ inheritDoc }
* @ throws BadVersionException
* @ throws IOException */
@ Override protected Asset readJson ( final String assetId ) throws IOException , BadVersionException { } } | FileInputStream fis = null ; try { fis = DirectoryUtils . createFileInputStream ( createFromRelative ( assetId + ".json" ) ) ; Asset ass = processJSON ( fis ) ; return ass ; } finally { if ( fis != null ) { fis . close ( ) ; } } |
public class DirectoryBrowserApplication { /** * Create the stateful context for the given request / response . */
@ Override public Object createContext ( ApplicationRequest request , ApplicationResponse response ) { } } | mLog . debug ( "Creating DirectoryBrowserContext..." ) ; return new DirectoryBrowserContext ( request , response , this ) ; |
public class Vector3f { /** * / * ( non - Javadoc )
* @ see org . joml . Vector3fc # sub ( org . joml . Vector3fc , org . joml . Vector3f ) */
public Vector3f sub ( Vector3fc v , Vector3f dest ) { } } | dest . x = x - v . x ( ) ; dest . y = y - v . y ( ) ; dest . z = z - v . z ( ) ; return dest ; |
public class BoxCollaborationWhitelistExemptTarget { /** * Creates a collaboration whitelist for a Box User with a given ID .
* @ param api the API connection to be used by the collaboration whitelist .
* @ param userID the ID of the Box User to add to the collaboration whitelist .
* @ return information about th... | URL url = COLLABORATION_WHITELIST_EXEMPT_TARGET_ENTRIES_URL_TEMPLATE . build ( api . getBaseURL ( ) ) ; BoxJSONRequest request = new BoxJSONRequest ( api , url , HttpMethod . POST ) ; JsonObject requestJSON = new JsonObject ( ) . add ( "user" , new JsonObject ( ) . add ( "type" , "user" ) . add ( "id" , userID ) ) ; re... |
public class ArtifactoryServer { /** * This method might run on slaves , this is why we provide it with a proxy from the master config */
public ArtifactoryDependenciesClient createArtifactoryDependenciesClient ( String userName , String password , ProxyConfiguration proxyConfiguration , TaskListener listener ) { } } | ArtifactoryDependenciesClient client = new ArtifactoryDependenciesClient ( url , userName , password , new JenkinsBuildInfoLog ( listener ) ) ; client . setConnectionTimeout ( timeout ) ; setRetryParams ( client ) ; if ( ! bypassProxy && proxyConfiguration != null ) { client . setProxyConfiguration ( proxyConfiguration... |
public class Call { /** * Abbreviation for { { @ link # methodForString ( String , Object . . . ) } .
* @ since 1.1
* @ param methodName the name of the method
* @ param optionalParameters the ( optional ) parameters of the method .
* @ return the result of the method execution */
public static Function < Objec... | return methodForString ( methodName , optionalParameters ) ; |
public class GitHubHookRegisterProblemMonitor { /** * This web method requires POST , admin rights and nonnull repo .
* Responds with redirect to monitor page
* @ param repo to be disignored . Never null */
@ RequirePOST @ ValidateRepoName @ RequireAdminRights @ RespondWithRedirect public void doDisignore ( @ Nonnu... | ignored . remove ( repo ) ; |
public class ConversionAnalyzer { /** * Analyzes classes given as input and returns the type of conversion that has to be done .
* @ param destination class to analyze
* @ param source class to analyze
* @ return type of Conversion */
public static ConversionType getConversionType ( final Class < ? > destination ... | if ( destination == String . class ) return toStringConversion ( source ) ; if ( destination == Byte . class ) return toByteConversion ( source ) ; if ( destination == byte . class ) return tobyteConversion ( source ) ; if ( destination == Short . class ) return toShortConversion ( source ) ; if ( destination == short ... |
public class CmsUgcSession { /** * Unmarshal the XML content with auto - correction .
* @ param file the file that contains the XML
* @ return the XML read from the file
* @ throws CmsXmlException thrown if the XML can ' t be read . */
private CmsXmlContent unmarshalXmlContent ( CmsFile file ) throws CmsXmlExcept... | CmsXmlContent content = CmsXmlContentFactory . unmarshal ( m_cms , file ) ; content . setAutoCorrectionEnabled ( true ) ; content . correctXmlStructure ( m_cms ) ; return content ; |
public class GwFacadeImpl { /** * / * ( non - Javadoc )
* @ see com . att . authz . facade . AuthzFacade # error ( com . att . authz . env . AuthzTrans , javax . servlet . http . HttpServletResponse , int )
* Note : Conforms to AT & T TSS RESTful Error Structure */
@ Override public void error ( AuthzTrans trans , ... | String msg = result . details == null ? "" : result . details . trim ( ) ; String [ ] detail ; if ( result . variables == null ) { detail = new String [ 1 ] ; } else { int l = result . variables . length ; detail = new String [ l + 1 ] ; System . arraycopy ( result . variables , 0 , detail , 1 , l ) ; } error ( trans ,... |
public class AmazonElastiCacheClient { /** * Returns information about all provisioned clusters if no cluster identifier is specified , or about a specific
* cache cluster if a cluster identifier is supplied .
* By default , abbreviated information about the clusters is returned . You can use the optional
* < i >... | request = beforeClientExecution ( request ) ; return executeDescribeCacheClusters ( request ) ; |
public class CompletableFuture { /** * Android - changed : hidden */
public CompletableFuture < T > orTimeout ( long timeout , TimeUnit unit ) { } } | if ( unit == null ) throw new NullPointerException ( ) ; if ( result == null ) whenComplete ( new Canceller ( Delayer . delay ( new Timeout ( this ) , timeout , unit ) ) ) ; return this ; |
public class ImageUtil { /** * Obtains the default graphics configuration for this VM . If the JVM is in headless mode ,
* this method will return null . */
protected static GraphicsConfiguration getDefGC ( ) { } } | if ( _gc == null ) { // obtain information on our graphics environment
try { GraphicsEnvironment env = GraphicsEnvironment . getLocalGraphicsEnvironment ( ) ; GraphicsDevice gd = env . getDefaultScreenDevice ( ) ; _gc = gd . getDefaultConfiguration ( ) ; } catch ( HeadlessException e ) { // no problem , just return nul... |
public class AbstractContextBuilder { /** * Sets an attribute , using { @ code attribute . getClass ( ) } as attribute
* < i > type < / i > .
* @ param value the attribute value , not null .
* @ param key the attribute ' s key , not { @ code null }
* @ return this Builder , for chaining */
public < T > B set ( ... | Object old = set ( key . getName ( ) , Objects . requireNonNull ( value ) ) ; if ( old != null && old . getClass ( ) . isAssignableFrom ( value . getClass ( ) ) ) { return ( B ) old ; } return ( B ) this ; |
public class HttpChannelConfig { /** * Check the input configuration for the maximum allowed requests per socket
* setting .
* @ param props */
private void parseMaxPersist ( Map < Object , Object > props ) { } } | // -1 means unlimited
// 0 . . 1 means 1
// X means X
Object value = props . get ( HttpConfigConstants . PROPNAME_MAX_PERSIST ) ; if ( null != value ) { try { this . maxPersistRequest = minLimit ( convertInteger ( value ) , HttpConfigConstants . MIN_PERSIST_REQ ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . ... |
public class SessionManager { /** * Copyright 2009 NetApp , contribution by Eric Forgette
* Modified by Steve Jin ( sjin @ vmware . com )
* This constructor builds a new ServiceInstance based on a ServiceInstance .
* The new ServiceInstance is effectively a clone of the first . This clone will
* NOT become inva... | ServiceInstance oldsi = getServerConnection ( ) . getServiceInstance ( ) ; ServerConnection oldsc = oldsi . getServerConnection ( ) ; String ticket = oldsi . getSessionManager ( ) . acquireCloneTicket ( ) ; VimPortType vimService = new VimPortType ( oldsc . getUrl ( ) . toString ( ) , ignoreCert ) ; vimService . getWsc... |
public class SubmitTaskStateChangeRequest { /** * Any attachments associated with the state change request .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setAttachments ( java . util . Collection ) } or { @ link # withAttachments ( java . util . Collection... | if ( this . attachments == null ) { setAttachments ( new com . amazonaws . internal . SdkInternalList < AttachmentStateChange > ( attachments . length ) ) ; } for ( AttachmentStateChange ele : attachments ) { this . attachments . add ( ele ) ; } return this ; |
public class AmazonEC2Waiters { /** * Builds a SubnetAvailable waiter by using custom parameters waiterParameters and other parameters defined in the
* waiters specification , and then polls until it determines whether the resource entered the desired state or not ,
* where polling criteria is bound by either defau... | return new WaiterBuilder < DescribeSubnetsRequest , DescribeSubnetsResult > ( ) . withSdkFunction ( new DescribeSubnetsFunction ( client ) ) . withAcceptors ( new SubnetAvailable . IsAvailableMatcher ( ) ) . withDefaultPollingStrategy ( new PollingStrategy ( new MaxAttemptsRetryStrategy ( 40 ) , new FixedDelayStrategy ... |
public class ByteBufUtil { /** * Returns a multi - line hexadecimal dump of the specified { @ link ByteBuf } that is easy to read by humans ,
* starting at the given { @ code offset } using the given { @ code length } . */
public static String prettyHexDump ( ByteBuf buffer , int offset , int length ) { } } | return HexUtil . prettyHexDump ( buffer , offset , length ) ; |
public class DatabaseTaskStore { /** * Returns the persistence service unit , lazily initializing if necessary .
* @ return the persistence service unit .
* @ throws Exceptin if an error occurs .
* @ throws IllegalStateException if this instance has been destroyed . */
public final PersistenceServiceUnit getPersi... | lock . readLock ( ) . lock ( ) ; try { if ( destroyed ) throw new IllegalStateException ( ) ; if ( persistenceServiceUnit == null ) { // Switch to write lock for lazy initialization
lock . readLock ( ) . unlock ( ) ; lock . writeLock ( ) . lock ( ) ; try { if ( destroyed ) throw new IllegalStateException ( ) ; if ( per... |
public class AggregateBinder { /** * Perform binding for the aggregate .
* @ param name the configuration property name to bind
* @ param target the target to bind
* @ param elementBinder an element binder
* @ return the bound aggregate or null */
@ SuppressWarnings ( "unchecked" ) public final Object bind ( Co... | Object result = bindAggregate ( name , target , elementBinder ) ; Supplier < ? > value = target . getValue ( ) ; if ( result == null || value == null ) { return result ; } return merge ( ( Supplier < T > ) value , ( T ) result ) ; |
public class NtlmAuthenticator { /** * Used internally by jCIFS when an < tt > SmbAuthException < / tt > is trapped to retrieve new user credentials .
* @ param url
* @ param sae
* @ return credentials returned by prompt */
public static NtlmPasswordAuthenticator requestNtlmPasswordAuthentication ( String url , S... | return requestNtlmPasswordAuthentication ( auth , url , sae ) ; |
public class ProxyUgiManager { /** * save an ugi to cache , only for junit testing purposes */
static synchronized void saveToCache ( UnixUserGroupInformation ugi ) { } } | ugiCache . put ( ugi . getUserName ( ) , new CachedUgi ( ugi , System . currentTimeMillis ( ) ) ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.