signature
stringlengths 43
39.1k
| implementation
stringlengths 0
450k
|
|---|---|
public class FuncLocalPart { /** * Execute the function . The function must return
* a valid object .
* @ param xctxt The current execution context .
* @ return A valid XObject .
* @ throws javax . xml . transform . TransformerException */
public XObject execute ( XPathContext xctxt ) throws javax . xml . transform . TransformerException { } }
|
int context = getArg0AsNode ( xctxt ) ; if ( DTM . NULL == context ) return XString . EMPTYSTRING ; DTM dtm = xctxt . getDTM ( context ) ; String s = ( context != DTM . NULL ) ? dtm . getLocalName ( context ) : "" ; if ( s . startsWith ( "#" ) || s . equals ( "xmlns" ) ) return XString . EMPTYSTRING ; return new XString ( s ) ;
|
public class MetadataService { /** * Updates { @ link Permission } s for the { @ link Token } of the specified { @ code appId } of the specified
* { @ code repoName } in the specified { @ code projectName } . */
public CompletableFuture < Revision > updatePerTokenPermission ( Author author , String projectName , String repoName , String appId , Collection < Permission > permission ) { } }
|
requireNonNull ( author , "author" ) ; requireNonNull ( projectName , "projectName" ) ; requireNonNull ( repoName , "repoName" ) ; requireNonNull ( appId , "appId" ) ; requireNonNull ( permission , "permission" ) ; return replacePermissionAtPointer ( author , projectName , perTokenPermissionPointer ( repoName , appId ) , permission , "Update permission of the token '" + appId + "' as '" + permission + "' for the project " + projectName ) ;
|
public class PathwayWSServerMongo { @ GET @ Path ( "/help" ) public Response help ( ) { } }
|
StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Input:\n" ) ; sb . append ( "all id formats are accepted.\n\n\n" ) ; sb . append ( "Resources:\n" ) ; sb . append ( "- list: This subcategory is an informative WS that show the complete list of available pathways. This is an special " + "resource which does not need a pathway name as input.\n" ) ; sb . append ( " Output columns: internal ID, pathway name, description.\n\n" ) ; sb . append ( "- info: Prints descriptive information about a pathway.\n" ) ; sb . append ( " Output columns: internal ID, pathway name, description.\n\n" ) ; sb . append ( "- image: Download an image of the selected pathway.\n\n\n" ) ; sb . append ( "Documentation:\n" ) ; sb . append ( "http://docs.bioinfo.cipf.es/projects/cellbase/wiki/Network_rest_ws_api#Pathway" ) ; return createOkResponse ( sb . toString ( ) ) ;
|
public class XAbstractWhileExpressionImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } }
|
switch ( featureID ) { case XbasePackage . XABSTRACT_WHILE_EXPRESSION__PREDICATE : setPredicate ( ( XExpression ) newValue ) ; return ; case XbasePackage . XABSTRACT_WHILE_EXPRESSION__BODY : setBody ( ( XExpression ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ;
|
public class ImageLoader { /** * Loads an image and returns when a frame is done , the image is done , an error occurs , or the image is aborted . */
public void loadImage ( ) throws InterruptedException { } }
|
synchronized ( this ) { status = 0 ; image . getSource ( ) . startProduction ( this ) ; while ( ( status & ( IMAGEABORTED | IMAGEERROR | SINGLEFRAMEDONE | STATICIMAGEDONE ) ) == 0 ) { wait ( ) ; } }
|
public class WSJdbcUtil { /** * Performs special handling for stale statements , such as clearing the statement cache
* and marking existing statements non - poolable .
* @ param jdbcWrapper the JDBC wrapper on which the error occurred . */
public static void handleStaleStatement ( WSJdbcWrapper jdbcWrapper ) { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "Encountered a Stale Statement: " + jdbcWrapper ) ; if ( jdbcWrapper instanceof WSJdbcObject ) try { WSJdbcConnection connWrapper = ( WSJdbcConnection ) ( ( WSJdbcObject ) jdbcWrapper ) . getConnectionWrapper ( ) ; WSRdbManagedConnectionImpl mc = connWrapper . managedConn ; // Instead of closing the statements , mark them as
// not poolable so that they are prevented from being cached again when closed .
connWrapper . markStmtsAsNotPoolable ( ) ; // Clear out the cache .
if ( mc != null ) mc . clearStatementCache ( ) ; } catch ( NullPointerException nullX ) { // No FFDC code needed ; probably closed by another thread .
if ( ! ( ( WSJdbcObject ) jdbcWrapper ) . isClosed ( ) ) throw nullX ; }
|
public class StringUtil { /** * Justify the contents of the string .
* @ param justify the way in which the string is to be justified
* @ param str the string to be right justified ; if null , an empty string is used
* @ param width the desired width of the string ; must be positive
* @ param padWithChar the character to use for padding , if needed
* @ return the right justified string */
public static String justify ( Justify justify , String str , final int width , char padWithChar ) { } }
|
switch ( justify ) { case LEFT : return justifyLeft ( str , width , padWithChar ) ; case RIGHT : return justifyRight ( str , width , padWithChar ) ; case CENTER : return justifyCenter ( str , width , padWithChar ) ; } assert false ; return null ;
|
public class KernelBootstrap { /** * Build the nested classloader containing the OSGi framework , and the log provider .
* @ param urlList
* @ param verifyJarProperty
* @ return */
protected ClassLoader buildClassLoader ( final List < URL > urlList , String verifyJarProperty ) { } }
|
if ( libertyBoot ) { // for liberty boot we just use the class loader that loaded this class
return AccessController . doPrivileged ( new PrivilegedAction < ClassLoader > ( ) { @ Override public ClassLoader run ( ) { return getClass ( ) . getClassLoader ( ) ; } } ) ; } final boolean verifyJar ; if ( System . getSecurityManager ( ) == null ) { // do not perform verification if SecurityManager is not installed
// unless explicitly enabled .
verifyJar = "true" . equalsIgnoreCase ( verifyJarProperty ) ; } else { // always perform verification if SecurityManager is installed .
verifyJar = true ; } enableJava2SecurityIfSet ( this . bootProps , urlList ) ; ClassLoader loader = AccessController . doPrivileged ( new PrivilegedAction < ClassLoader > ( ) { @ Override public ClassLoader run ( ) { ClassLoader parent = getClass ( ) . getClassLoader ( ) ; URL [ ] urls = urlList . toArray ( new URL [ urlList . size ( ) ] ) ; if ( verifyJar ) { return new BootstrapChildFirstURLClassloader ( urls , parent ) ; } else { try { return new BootstrapChildFirstJarClassloader ( urls , parent ) ; } catch ( RuntimeException e ) { // fall back to URLClassLoader in case something went wrong
return new BootstrapChildFirstURLClassloader ( urls , parent ) ; } } } } ) ; return loader ;
|
public class GrpcServiceBuilder { /** * Adds a gRPC { @ link BindableService } to this { @ link GrpcServiceBuilder } . Most gRPC service
* implementations are { @ link BindableService } s . */
public GrpcServiceBuilder addService ( BindableService bindableService ) { } }
|
if ( bindableService instanceof ProtoReflectionService ) { checkState ( protoReflectionService == null , "Attempting to add a ProtoReflectionService but one is already present. " + "ProtoReflectionService must only be added once." ) ; protoReflectionService = ( ProtoReflectionService ) bindableService ; } return addService ( bindableService . bindService ( ) ) ;
|
public class CmsPublishDialog { /** * Gets the workflow action parameters to which the workflow action should be applied . < p >
* @ return the workflow action parameters */
protected CmsWorkflowActionParams getWorkflowActionParams ( ) { } }
|
if ( m_publishSelectPanel . isShowResources ( ) ) { List < CmsUUID > resourcesToPublish = new ArrayList < CmsUUID > ( m_publishSelectPanel . getResourcesToPublish ( ) ) ; List < CmsUUID > resourcesToRemove = new ArrayList < CmsUUID > ( m_publishSelectPanel . getResourcesToRemove ( ) ) ; CmsWorkflowActionParams actionParams = new CmsWorkflowActionParams ( resourcesToPublish , resourcesToRemove ) ; return actionParams ; } else { CmsPublishOptions options = getPublishOptions ( ) ; CmsWorkflow workflow = getSelectedWorkflow ( ) ; return new CmsWorkflowActionParams ( new CmsPublishListToken ( workflow , options ) ) ; }
|
public class CmsReport { /** * Returns the Thread id to display in this report . < p >
* @ return the Thread id to display in this report */
public String getParamThread ( ) { } }
|
if ( ( m_paramThread != null ) && ( ! m_paramThread . equals ( CmsUUID . getNullUUID ( ) ) ) ) { return m_paramThread . toString ( ) ; } else { return null ; }
|
public class ScmProvider { /** * Return a map between paths given as argument and the corresponding line numbers which are new compared to the provided target branch .
* If null is returned or if a path is not included in the map , an imprecise fallback mechanism will be used to detect which lines
* are new ( based on SCM dates ) .
* @ param files Absolute path of files of interest
* @ return null if the SCM provider was not able to compute the new lines
* @ since 7.4 */
@ CheckForNull public Map < Path , Set < Integer > > branchChangedLines ( String targetBranchName , Path rootBaseDir , Set < Path > files ) { } }
|
return null ;
|
public class ParameterChecker { /** * Check the fragment . Must be able to resolve references like ' foo . bar ' - > ' foo ' where ' foo ' is a method param
* of a type which contains a public getter or field named ' getBar ( ) ' or ' bar ' respectively .
* @ param fragment The reflection fragment to check .
* @ param paramMap The method parameters , keyed by name .
* @ param method The method declaration which was annotated . */
private static void checkReflectionFragment ( ReflectionFragment fragment , HashMap < String , ParameterDeclaration > paramMap , MethodDeclaration method ) { } }
|
final String [ ] paramNameQualifiers = ( ( ReflectionFragment ) fragment ) . getParameterNameQualifiers ( ) ; final String parameterName = ( ( ReflectionFragment ) fragment ) . getParameterName ( ) ; if ( paramMap . containsKey ( paramNameQualifiers [ 0 ] ) == false ) { throw new ControlException ( buildMessage ( parameterName , method . getSimpleName ( ) ) ) ; } ParameterDeclaration tpd = paramMap . get ( paramNameQualifiers [ 0 ] ) ; TypeMirror type = tpd . getType ( ) ; MethodDeclaration getterMethod = null ; FieldDeclaration field = null ; for ( int i = 1 ; i < paramNameQualifiers . length ; i ++ ) { getterMethod = null ; field = null ; // loop through superclasses until we find a match or run out of superclasses
while ( type != null ) { if ( type instanceof DeclaredType == false ) { throw new ControlException ( buildMessage ( parameterName , method . getSimpleName ( ) ) ) ; } TypeDeclaration td = ( ( DeclaredType ) type ) . getDeclaration ( ) ; // abort if Map ! ! ! No further checking can be done .
if ( td . getQualifiedName ( ) . equals ( "java.util.Map" ) ) { return ; } Collection < ? extends MethodDeclaration > methods = DeclarationFilter . FILTER_PUBLIC . filter ( td . getMethods ( ) ) ; for ( MethodDeclaration m : methods ) { String upperFirst = paramNameQualifiers [ i ] . substring ( 0 , 1 ) . toUpperCase ( ) ; if ( paramNameQualifiers [ i ] . length ( ) > 1 ) { upperFirst = upperFirst + paramNameQualifiers [ i ] . substring ( 1 ) ; } if ( m . getSimpleName ( ) . equals ( "get" + upperFirst ) || m . getSimpleName ( ) . equals ( "is" + upperFirst ) ) { getterMethod = m ; } } if ( getterMethod == null ) { Collection < FieldDeclaration > fields = DeclarationFilter . FILTER_PUBLIC . filter ( td . getFields ( ) ) ; for ( FieldDeclaration fd : fields ) { if ( fd . getSimpleName ( ) . equals ( paramNameQualifiers [ i ] ) ) { field = fd ; } } } // try the super - class
if ( getterMethod == null && field == null ) { if ( td instanceof ClassDeclaration ) { type = ( ( ClassDeclaration ) td ) . getSuperclass ( ) ; continue ; } } break ; } // while
// found a match , get its type and continue within the for loop
if ( getterMethod != null ) { type = getterMethod . getReturnType ( ) ; } else if ( field != null ) { type = field . getType ( ) ; } else { throw new ControlException ( buildMessage ( parameterName , method . getSimpleName ( ) ) ) ; } }
|
public class SparseIntHashArray { /** * { @ inheritDoc } */
@ SuppressWarnings ( "unchecked" ) public < E > E [ ] toArray ( E [ ] array ) { } }
|
for ( int i = 0 ; i < array . length ; ++ i ) { Integer j = indexToValue . get ( i ) ; if ( j != null ) array [ i ] = ( E ) j ; } return array ;
|
public class Tokenizer { /** * scan identifier .
* @ return identifier token */
public Token scanIdentifier ( ) { } }
|
if ( '`' == charAt ( offset ) ) { int length = getLengthUntilTerminatedChar ( '`' ) ; return new Token ( Literals . IDENTIFIER , input . substring ( offset , offset + length ) , offset + length ) ; } if ( '"' == charAt ( offset ) ) { int length = getLengthUntilTerminatedChar ( '"' ) ; return new Token ( Literals . IDENTIFIER , input . substring ( offset , offset + length ) , offset + length ) ; } if ( '[' == charAt ( offset ) ) { int length = getLengthUntilTerminatedChar ( ']' ) ; return new Token ( Literals . IDENTIFIER , input . substring ( offset , offset + length ) , offset + length ) ; } int length = 0 ; while ( isIdentifierChar ( charAt ( offset + length ) ) ) { length ++ ; } String literals = input . substring ( offset , offset + length ) ; if ( isAmbiguousIdentifier ( literals ) ) { return new Token ( processAmbiguousIdentifier ( offset + length , literals ) , literals , offset + length ) ; } return new Token ( dictionary . findTokenType ( literals , Literals . IDENTIFIER ) , literals , offset + length ) ;
|
public class MarshallUtil { /** * Unmarshall an integer .
* @ param in { @ link ObjectInput } to read .
* @ return The integer value or { @ link # NULL _ VALUE } if the original value was negative .
* @ throws IOException If any of the usual Input / Output related exceptions occur .
* @ see # marshallSize ( ObjectOutput , int ) . */
public static int unmarshallSize ( ObjectInput in ) throws IOException { } }
|
byte b = in . readByte ( ) ; if ( ( b & 0x80 ) != 0 ) { return NULL_VALUE ; // negative value
} int i = b & 0x3F ; if ( ( b & 0x40 ) == 0 ) { return i ; } int shift = 6 ; do { b = in . readByte ( ) ; i |= ( b & 0x7F ) << shift ; shift += 7 ; } while ( ( b & 0x80 ) != 0 ) ; return i ;
|
public class AbstractParser { /** * Returns true if mediaType falls withing the given range ( pattern ) , false otherwise */
private boolean isMimeTypeMatch ( MediaType mediaType , MediaType rangePattern ) { } }
|
String WILDCARD = "*" ; String rangePatternType = rangePattern . getType ( ) ; String rangePatternSubtype = rangePattern . getSubtype ( ) ; return ( rangePatternType . equals ( WILDCARD ) || rangePatternType . equals ( mediaType . getType ( ) ) ) && ( rangePatternSubtype . equals ( WILDCARD ) || rangePatternSubtype . equals ( mediaType . getSubtype ( ) ) ) ;
|
public class Notifier { /** * Asynchronously sends a Notice to Airbrake . */
public Future < Notice > send ( Notice notice ) { } }
|
notice = this . filterNotice ( notice ) ; CompletableFuture < Notice > future = this . asyncSender . send ( notice ) ; final Notice finalNotice = notice ; future . whenComplete ( ( value , exception ) -> { this . applyHooks ( finalNotice ) ; } ) ; return future ;
|
public class BaseTransport { /** * This method does initialization of Transport instance
* @ param voidConfiguration
* @ param clipboard
* @ param role
* @ param localIp
* @ param localPort
* @ param shardIndex */
@ Override public void init ( VoidConfiguration voidConfiguration , Clipboard clipboard , NodeRole role , String localIp , int localPort , short shardIndex ) { } }
|
// Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( ( ) - > shutdownSilent ( ) ) ) ;
|
public class CStrChunk { /** * Optimized lstrip ( ) & rstrip ( ) methods to operate across the entire CStrChunk buffer in one pass .
* NewChunk is the same size as the original , despite trimming .
* @ param nc NewChunk to be filled with strip version of strings in this chunk
* @ param chars chars to strip , treated as ASCII
* @ return Filled NewChunk */
public NewChunk asciiLStrip ( NewChunk nc , String chars ) { } }
|
SetOfBytes set = new SetOfBytes ( chars ) ; // update offsets and byte array
for ( int i = 0 ; i < _len ; i ++ ) { int off = intAt ( i ) ; if ( off != NA ) { while ( set . contains ( byteAt ( off ) ) ) off ++ ; int len = lengthAtOffset ( off ) ; nc . addStr ( new BufferedString ( _mem , _valstart + off , len ) ) ; } else nc . addNA ( ) ; } return nc ;
|
public class SmoothieMap { /** * Removes all of the entries of this map that satisfy the given predicate . Errors or runtime
* exceptions thrown during iteration or by the predicate are relayed to the caller .
* < p > Note the order in which this method visits entries is < i > different < / i > from the iteration
* and { @ link # forEach ( BiConsumer ) } order .
* @ param filter a predicate which returns { @ code true } for entries to be removed
* @ return { @ code true } if any entries were removed
* @ throws NullPointerException if the specified { @ code filter } is { @ code null }
* @ throws ConcurrentModificationException if any structural modification of the map ( new entry
* insertion or an entry removal ) is detected during iteration */
public final boolean removeIf ( BiPredicate < ? super K , ? super V > filter ) { } }
|
Objects . requireNonNull ( filter ) ; if ( isEmpty ( ) ) return false ; Segment < K , V > segment ; int mc = this . modCount ; int initialModCount = mc ; for ( long segmentIndex = 0 ; segmentIndex >= 0 ; segmentIndex = nextSegmentIndex ( segmentIndex , segment ) ) { mc = ( segment = segment ( segmentIndex ) ) . removeIf ( this , filter , mc ) ; } if ( mc != modCount ) throw new ConcurrentModificationException ( ) ; return mc != initialModCount ;
|
public class CommandFactory { /** * Trainer only command .
* Checks the current status of the ball . */
public void addCheckBallCommand ( ) { } }
|
StringBuilder buf = new StringBuilder ( ) ; buf . append ( "(check_ball)" ) ; fifo . add ( fifo . size ( ) , buf . toString ( ) ) ;
|
public class ThreadPool { /** * Called when an executor task completes */
public void completeExecutorTask ( ) { } }
|
ExecutorQueueItem item = null ; synchronized ( _executorLock ) { _executorTaskCount -- ; assert ( _executorTaskCount >= 0 ) ; if ( _executorQueueHead != null ) { item = _executorQueueHead ; _executorQueueHead = item . _next ; if ( _executorQueueHead == null ) _executorQueueTail = null ; } } if ( item != null ) { Runnable task = item . getRunnable ( ) ; ClassLoader loader = item . getLoader ( ) ; boolean isPriority = false ; boolean isQueue = true ; boolean isWake = true ; scheduleImpl ( task , loader , MAX_EXPIRE , isPriority , isQueue , isWake ) ; }
|
public class PointerHierarchyRepresentationBuilder { /** * Set the cluster size of an object .
* @ param id Object to set
* @ param size Cluster size */
public void setSize ( DBIDRef id , int size ) { } }
|
if ( csize == null ) { csize = DataStoreUtil . makeIntegerStorage ( ids , DataStoreFactory . HINT_HOT | DataStoreFactory . HINT_TEMP , 1 ) ; } csize . putInt ( id , size ) ;
|
public class Controller { /** * Like { @ link # postAction ( ActionEvent ) } except that it constructs a
* { @ link CommandEvent } with the supplied source component , string
* command and argument . */
public static void postAction ( Component source , String command , Object argument ) { } }
|
// slip things onto the event queue for later
CommandEvent event = new CommandEvent ( source , command , argument ) ; EventQueue . invokeLater ( new ActionInvoker ( event ) ) ;
|
public class JmsMsgProducerImpl { /** * Validates the timeToLive field and throws an exception if there is a problem .
* @ param timeToLive
* @ throws JMSException */
private void validateTimeToLive ( long timeToLive ) throws JMSException { } }
|
if ( ( timeToLive < 0 ) || ( timeToLive > MfpConstants . MAX_TIME_TO_LIVE ) ) { throw ( JMSException ) JmsErrorUtils . newThrowable ( JMSException . class , "INVALID_VALUE_CWSIA0068" , new Object [ ] { "timeToLive" , "" + timeToLive } , tc ) ; }
|
public class RetryInterceptorBuilder { /** * Apply the backoff options . Cannot be used if a custom retry operations , or back off
* policy has been set .
* @ param initialInterval The initial interval .
* @ param multiplier The multiplier .
* @ param maxInterval The max interval .
* @ return this . */
public RetryInterceptorBuilder < T > backOffOptions ( long initialInterval , double multiplier , long maxInterval ) { } }
|
Assert . isNull ( this . retryOperations , "cannot set the back off policy when a custom retryOperations has been set" ) ; Assert . isTrue ( ! this . backOffPolicySet , "cannot set the back off options when a back off policy has been set" ) ; ExponentialBackOffPolicy policy = new ExponentialBackOffPolicy ( ) ; policy . setInitialInterval ( initialInterval ) ; policy . setMultiplier ( multiplier ) ; policy . setMaxInterval ( maxInterval ) ; this . retryTemplate . setBackOffPolicy ( policy ) ; this . backOffOptionsSet = true ; this . templateAltered = true ; return this ;
|
public class AdapterUtil { /** * Display the javax . xa . XAResource recover flag constant corresponding to the
* value supplied .
* @ param level a valid javax . xa . XAResource recover flag constant .
* @ return the name of the constant , or a string indicating the constant is unknown . */
public static String getXAResourceRecoverFlagString ( int flag ) { } }
|
switch ( flag ) { case XAResource . TMENDRSCAN : return "TMENDRSCAN (" + flag + ')' ; case XAResource . TMNOFLAGS : return "TMNOFLAGS (" + flag + ')' ; case XAResource . TMSTARTRSCAN : return "TMSTARTRSCAN (" + flag + ')' ; case XAResource . TMSTARTRSCAN + XAResource . TMENDRSCAN : return "TMSTARTRSCAN + TMENDRSCAN (" + flag + ')' ; } return "UNKNOWN XA RESOURCE RECOVER FLAG (" + flag + ')' ;
|
public class XpathUtils { /** * Used to optimize performance by avoiding expensive file access every time
* a DocumentBuilderFactory is constructed as a result of constructing a
* Xalan document factory . */
private static void speedUpDcoumentBuilderFactory ( ) { } }
|
if ( System . getProperty ( DOCUMENT_BUILDER_FACTORY_PROP_NAME ) == null ) { DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; if ( DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME . equals ( factory . getClass ( ) . getName ( ) ) ) { // This would avoid the file system to be accessed every time
// the internal DocumentBuilderFactory is instantiated .
System . setProperty ( DOCUMENT_BUILDER_FACTORY_PROP_NAME , DOCUMENT_BUILDER_FACTORY_IMPL_CLASS_NAME ) ; } }
|
public class DiagnosticsInner { /** * Execute Analysis .
* Execute Analysis .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param siteName Site Name
* @ param diagnosticCategory Category Name
* @ param analysisName Analysis Resource Name
* @ param startTime Start Time
* @ param endTime End Time
* @ param timeGrain Time Grain
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the { @ link ServiceFuture } object */
public ServiceFuture < DiagnosticAnalysisInner > executeSiteAnalysisAsync ( String resourceGroupName , String siteName , String diagnosticCategory , String analysisName , DateTime startTime , DateTime endTime , String timeGrain , final ServiceCallback < DiagnosticAnalysisInner > serviceCallback ) { } }
|
return ServiceFuture . fromResponse ( executeSiteAnalysisWithServiceResponseAsync ( resourceGroupName , siteName , diagnosticCategory , analysisName , startTime , endTime , timeGrain ) , serviceCallback ) ;
|
public class WSURI { /** * Convert to HTTP < code > http < / code > or < code > https < / code > scheme URIs .
* Converting < code > ws < / code > and < code > wss < / code > URIs to their HTTP equivalent
* @ param inputUri the input URI
* @ return the HTTP scheme URI for the input URI .
* @ throws URISyntaxException if unable to convert the input URI */
public static URI toHttp ( final URI inputUri ) throws URISyntaxException { } }
|
Objects . requireNonNull ( inputUri , "Input URI must not be null" ) ; String wsScheme = inputUri . getScheme ( ) ; if ( "http" . equalsIgnoreCase ( wsScheme ) || "https" . equalsIgnoreCase ( wsScheme ) ) { // leave alone
return inputUri ; } if ( "ws" . equalsIgnoreCase ( wsScheme ) ) { // convert to http
return new URI ( "http" + inputUri . toString ( ) . substring ( wsScheme . length ( ) ) ) ; } if ( "wss" . equalsIgnoreCase ( wsScheme ) ) { // convert to https
return new URI ( "https" + inputUri . toString ( ) . substring ( wsScheme . length ( ) ) ) ; } throw new URISyntaxException ( inputUri . toString ( ) , "Unrecognized WebSocket scheme" ) ;
|
public class RemoteMongoCollectionImpl { /** * Update a single document in the collection according to the specified arguments .
* @ param filter a document describing the query filter , which may not be null .
* @ param update a document describing the update , which may not be null . The update to apply
* must include only update operators .
* @ return the result of the update one operation */
public RemoteUpdateResult updateOne ( final Bson filter , final Bson update ) { } }
|
return proxy . updateOne ( filter , update ) ;
|
public class AppServiceCertificateOrdersInner { /** * List all certificates associated with a certificate order .
* List all certificates associated with a certificate order .
* @ param nextPageLink The NextLink from the previous successful call to List operation .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ throws DefaultErrorResponseException thrown if the request is rejected by server
* @ throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @ return the PagedList & lt ; AppServiceCertificateResourceInner & gt ; object if successful . */
public PagedList < AppServiceCertificateResourceInner > listCertificatesNext ( final String nextPageLink ) { } }
|
ServiceResponse < Page < AppServiceCertificateResourceInner > > response = listCertificatesNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) ; return new PagedList < AppServiceCertificateResourceInner > ( response . body ( ) ) { @ Override public Page < AppServiceCertificateResourceInner > nextPage ( String nextPageLink ) { return listCertificatesNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) . body ( ) ; } } ;
|
public class SDMath { /** * Compute the 2d confusion matrix of size [ numClasses , numClasses ] from a pair of labels and predictions , both of
* which are represented as integer values . < br >
* For example , if labels = [ 0 , 1 , 1 ] , predicted = [ 0 , 2 , 1 ] , and numClasses = 4 then output is : < br >
* [ 1 , 0 , 0 , 0 ] < br >
* [ 0 , 1 , 1 , 0 ] < br >
* [ 0 , 0 , 0 , 0 ] < br >
* [ 0 , 0 , 0 , 0 ] < br >
* @ param name Name of the output variable
* @ param labels Labels - 1D array of integer values representing label values
* @ param pred Predictions - 1D array of integer values representing predictions . Same length as labels
* @ param numClasses Number of classes
* @ return Output variable ( 2D , shape [ numClasses , numClasses } ) */
public SDVariable confusionMatrix ( String name , SDVariable labels , SDVariable pred , Integer numClasses ) { } }
|
validateInteger ( "confusionMatrix" , "labels" , labels ) ; validateInteger ( "confusionMatrix" , "prediction" , pred ) ; SDVariable result = f ( ) . confusionMatrix ( labels , pred , numClasses ) ; return updateVariableNameAndReference ( result , name ) ;
|
public class CmsImportVersion7 { /** * Sets the resourceId . < p >
* @ param resourceId the resourceId to set
* @ see # N _ UUIDRESOURCE
* @ see # addResourceAttributesRules ( Digester , String ) */
public void setResourceId ( String resourceId ) { } }
|
try { if ( ! m_type . isFolder ( ) ) { m_resourceId = new CmsUUID ( resourceId ) ; } else { m_resourceId = new CmsUUID ( ) ; } } catch ( Throwable e ) { setThrowable ( e ) ; }
|
public class Ifc2x3tc1FactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public IfcElectricHeaterTypeEnum createIfcElectricHeaterTypeEnumFromString ( EDataType eDataType , String initialValue ) { } }
|
IfcElectricHeaterTypeEnum result = IfcElectricHeaterTypeEnum . get ( initialValue ) ; if ( result == null ) throw new IllegalArgumentException ( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType . getName ( ) + "'" ) ; return result ;
|
public class CmsLoginController { /** * Logs the current user out by invalidating the session an reloading the current URI . < p >
* Important : This works only within vaadin apps . < p > */
public static void logout ( ) { } }
|
CmsObject cms = A_CmsUI . getCmsObject ( ) ; if ( UI . getCurrent ( ) instanceof CmsAppWorkplaceUi ) { ( ( CmsAppWorkplaceUi ) UI . getCurrent ( ) ) . onWindowClose ( ) ; } String loggedInUser = cms . getRequestContext ( ) . getCurrentUser ( ) . getName ( ) ; UI . getCurrent ( ) . getSession ( ) . close ( ) ; String loginLink = OpenCms . getLinkManager ( ) . substituteLinkForUnknownTarget ( cms , CmsWorkplaceLoginHandler . LOGIN_HANDLER , false ) ; VaadinService . getCurrentRequest ( ) . getWrappedSession ( ) . invalidate ( ) ; Page . getCurrent ( ) . setLocation ( loginLink ) ; // logout was successful
if ( LOG . isInfoEnabled ( ) ) { LOG . info ( org . opencms . jsp . Messages . get ( ) . getBundle ( ) . key ( org . opencms . jsp . Messages . LOG_LOGOUT_SUCCESFUL_3 , loggedInUser , "{workplace logout option}" , cms . getRequestContext ( ) . getRemoteAddress ( ) ) ) ; }
|
public class TableReader { /** * Reads a single record from the table .
* @ param buffer record data
* @ param table parent table */
private void readRecord ( byte [ ] buffer , Table table ) { } }
|
// System . out . println ( ByteArrayHelper . hexdump ( buffer , true , 16 , " " ) ) ;
int deletedFlag = getShort ( buffer , 0 ) ; if ( deletedFlag != 0 ) { Map < String , Object > row = new HashMap < String , Object > ( ) ; for ( ColumnDefinition column : m_definition . getColumns ( ) ) { Object value = column . read ( 0 , buffer ) ; // System . out . println ( column . getName ( ) + " : " + value ) ;
row . put ( column . getName ( ) , value ) ; } table . addRow ( m_definition . getPrimaryKeyColumnName ( ) , row ) ; }
|
public class ConvexHull { /** * Calculate the intersection of two lines described by the points ( x1 , y1 - > x2 , y2 ) and ( x3 , y3
* - > x4 , y4 ) .
* @ param x1 first x coordinate of line 1
* @ param y1 first y coordinate of line 1
* @ param x2 second x coordinate of line 1
* @ param y2 second y coordinate of line 1
* @ param x3 first x coordinate of line 2
* @ param y3 first y coordinate of line 2
* @ param x4 first x coordinate of line 2
* @ param y4 first y coordinate of line 2
* @ return the point where the two lines intersect ( or null )
* @ see < a href = " http : / / en . wikipedia . org / wiki / Line – line _ intersection " > Line - line intersection ,
* Wikipedia < / a > */
static Point2D lineLineIntersect ( final double x1 , final double y1 , final double x2 , final double y2 , final double x3 , final double y3 , final double x4 , final double y4 ) { } }
|
final double x = ( ( x2 - x1 ) * ( x3 * y4 - x4 * y3 ) - ( x4 - x3 ) * ( x1 * y2 - x2 * y1 ) ) / ( ( x1 - x2 ) * ( y3 - y4 ) - ( y1 - y2 ) * ( x3 - x4 ) ) ; final double y = ( ( y3 - y4 ) * ( x1 * y2 - x2 * y1 ) - ( y1 - y2 ) * ( x3 * y4 - x4 * y3 ) ) / ( ( x1 - x2 ) * ( y3 - y4 ) - ( y1 - y2 ) * ( x3 - x4 ) ) ; return new Point2D . Double ( x , y ) ;
|
public class Leader { /** * Waits for synchronization to followers complete .
* @ throws TimeoutException in case of timeout .
* @ throws InterruptedException in case of interrupt . */
void waitNewLeaderAckFromQuorum ( ) throws TimeoutException , InterruptedException , IOException { } }
|
LOG . debug ( "Waiting for synchronization to followers complete." ) ; int completeCount = 0 ; Zxid lastZxid = persistence . getLatestZxid ( ) ; while ( completeCount < this . quorumMap . size ( ) ) { // Here we should use sync _ timeout .
MessageTuple tuple = filter . getExpectedMessage ( MessageType . ACK , null , getSyncTimeoutMs ( ) ) ; ZabMessage . Ack ack = tuple . getMessage ( ) . getAck ( ) ; String source = tuple . getServerId ( ) ; Zxid zxid = MessageBuilder . fromProtoZxid ( ack . getZxid ( ) ) ; if ( ! this . quorumMap . containsKey ( source ) ) { LOG . warn ( "Quorum set doesn't contain {}, a bug?" , source ) ; continue ; } if ( zxid . compareTo ( lastZxid ) != 0 ) { LOG . error ( "The follower {} is not correctly synchronized." , source ) ; throw new RuntimeException ( "The synchronized follower's last zxid" + "doesn't match last zxid of current leader." ) ; } PeerHandler ph = this . quorumMap . get ( source ) ; ph . setLastAckedZxid ( zxid ) ; completeCount ++ ; }
|
public class IonReaderTextRawTokensX { /** * peeks into the input stream to see if we have an
* unquoted symbol that resolves to one of the ion
* types . If it does it consumes the input and
* returns the type keyword id . If not is unreads
* the non - whitespace characters and the dot , which
* the input argument ' c ' should be . */
public final int peekNullTypeSymbol ( ) throws IOException { } }
|
// the ' . ' has to follow the ' null ' immediately
int c = read_char ( ) ; if ( c != '.' ) { unread_char ( c ) ; return IonTokenConstsX . KEYWORD_none ; } // we have a dot , start reading through the following non - whitespace
// and we ' ll collect it so that we can unread it in the event
// we don ' t actually see a type name
int [ ] read_ahead = new int [ IonTokenConstsX . TN_MAX_NAME_LENGTH + 1 ] ; int read_count = 0 ; int possible_names = IonTokenConstsX . KW_ALL_BITS ; while ( read_count < IonTokenConstsX . TN_MAX_NAME_LENGTH + 1 ) { c = read_char ( ) ; read_ahead [ read_count ++ ] = c ; int letter_idx = IonTokenConstsX . typeNameLetterIdx ( c ) ; if ( letter_idx < 1 ) { if ( IonTokenConstsX . isValidTerminatingCharForInf ( c ) ) { // it ' s not a letter we care about but it is
// a valid end of const , so maybe we have a keyword now
// we always exit the loop here since we look
// too far so any letter is invalid at pos 10
break ; } return peekNullTypeSymbolUndo ( read_ahead , read_count ) ; } int mask = IonTokenConstsX . typeNamePossibilityMask ( read_count - 1 , letter_idx ) ; possible_names &= mask ; if ( possible_names == 0 ) { // in this case it can ' t be a valid keyword since
// it has identifier chars ( letters ) at 1 past the
// last possible end ( at least )
return peekNullTypeSymbolUndo ( read_ahead , read_count ) ; } } // now lets get the keyword value from our bit mask
// at this point we can fail since we may have hit
// a valid terminator before we ' re done with all key
// words . We even have to check the length .
// for example " in ) " matches both letters to the
// typename int and terminates validly - but isn ' t
// long enough , but with length we have enough to be sure
// with the actual type names we ' re using in 1.0
int kw = IonTokenConstsX . typeNameKeyWordFromMask ( possible_names , read_count - 1 ) ; if ( kw == IonTokenConstsX . KEYWORD_unrecognized ) { peekNullTypeSymbolUndo ( read_ahead , read_count ) ; } else { // since we ' re accepting the rest we aren ' t unreading anything
// else - but we still have to unread the character that stopped us
unread_char ( c ) ; } return kw ;
|
public class OHLCChart { /** * Update a series by updating the X - Axis and Y - Axis
* @ param seriesName
* @ param newXData - set null to be automatically generated as a list of increasing Integers
* starting from 1 and ending at the size of the new Y - Axis data list .
* @ param newOpenData
* @ param newHighData
* @ param newLowData
* @ param newCloseData
* @ return */
public OHLCSeries updateOHLCSeries ( String seriesName , double [ ] newXData , double [ ] newOpenData , double [ ] newHighData , double [ ] newLowData , double [ ] newCloseData ) { } }
|
sanityCheck ( seriesName , newOpenData , newHighData , newLowData , newCloseData ) ; Map < String , OHLCSeries > seriesMap = getSeriesMap ( ) ; OHLCSeries series = seriesMap . get ( seriesName ) ; if ( series == null ) { throw new IllegalArgumentException ( "Series name >" + seriesName + "< not found!!!" ) ; } final double [ ] xDataToUse ; if ( newXData != null ) { // Sanity check
checkDataLengths ( seriesName , "X-Axis" , "Close" , newXData , newCloseData ) ; xDataToUse = newXData ; } else { xDataToUse = Utils . getGeneratedDataAsArray ( newCloseData . length ) ; } series . replaceData ( xDataToUse , newOpenData , newHighData , newLowData , newCloseData ) ; return series ;
|
public class FlowController { /** * Get the flow - scoped form bean member associated with the given ActionMapping . This is a framework - invoked
* method that should not normally be called directly . */
public ActionForm getFormBean ( ActionMapping mapping ) { } }
|
if ( mapping instanceof PageFlowActionMapping ) { PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping ; String formMember = pfam . getFormMember ( ) ; if ( formMember == null ) return null ; Field field = null ; try { field = getClass ( ) . getDeclaredField ( formMember ) ; } catch ( NoSuchFieldException e ) { // try finding a non - private field from the class hierarchy
field = InternalUtils . lookupField ( getClass ( ) , formMember ) ; if ( field == null || Modifier . isPrivate ( field . getModifiers ( ) ) ) { _log . error ( "Could not find member field " + formMember + " as the form bean." ) ; return null ; } } try { field . setAccessible ( true ) ; return InternalUtils . wrapFormBean ( field . get ( this ) ) ; } catch ( Exception e ) { _log . error ( "Could not use member field " + formMember + " as the form bean." , e ) ; } } return null ;
|
public class BuySr { /** * < p > Get authorized buyer . It refresh authorized buyer last time
* and set request variable " buyr " . < / p >
* @ param pRqVs request scoped vars
* @ param pRqDt Request Data
* @ return authorized buyer or null
* @ throws Exception - an exception */
@ Override public final OnlineBuyer getAuthBuyr ( final Map < String , Object > pRqVs , final IRequestData pRqDt ) throws Exception { } }
|
String buyerIdStr = pRqDt . getCookieValue ( "cBuyerId" ) ; if ( buyerIdStr == null ) { this . spamHnd . handle ( pRqVs , pRqDt , 1 , "Buyer. has no cBuyerId!" ) ; return null ; } Long buyerId = Long . valueOf ( buyerIdStr ) ; OnlineBuyer buyer = getSrvOrm ( ) . retrieveEntityById ( pRqVs , OnlineBuyer . class , buyerId ) ; if ( buyer == null ) { this . spamHnd . handle ( pRqVs , pRqDt , 1 , "Buyer. DB has no cBuyerId: " + buyerIdStr ) ; return null ; } if ( buyer . getRegEmail ( ) == null || buyer . getBuSeId ( ) == null ) { this . spamHnd . handle ( pRqVs , pRqDt , 1 , "Buyer. Unauthorized cBuyerId: " + buyerIdStr ) ; return null ; } String buSeId = pRqDt . getCookieValue ( "buSeId" ) ; if ( ! buyer . getBuSeId ( ) . equals ( buSeId ) ) { this . spamHnd . handle ( pRqVs , pRqDt , 1000 , "Buyer. Authorized invasion cBuyerId: " + buyerIdStr ) ; return null ; } long now = new Date ( ) . getTime ( ) ; if ( now - buyer . getLsTm ( ) > 1800000L ) { this . spamHnd . handle ( pRqVs , pRqDt , 0 , "Buyer. Authorized exceed cBuyerId/ms: " + buyerIdStr + "/" + ( now - buyer . getLsTm ( ) ) ) ; return null ; } buyer . setLsTm ( now ) ; String [ ] fieldsNames = new String [ ] { "itsId" , "itsVersion" , "lsTm" } ; pRqVs . put ( "fieldsNames" , fieldsNames ) ; buyer . setLsTm ( now ) ; this . srvOrm . updateEntity ( pRqVs , buyer ) ; pRqVs . remove ( "fieldsNames" ) ; pRqDt . setAttribute ( "buyr" , buyer ) ; return buyer ;
|
public class Application { /** * Provide custom system messages to make sure the application is reloaded when the session expires . */
@ Bean SystemMessagesProvider systemMessagesProvider ( ) { } }
|
return new SystemMessagesProvider ( ) { @ Override public SystemMessages getSystemMessages ( SystemMessagesInfo systemMessagesInfo ) { CustomizedSystemMessages systemMessages = new CustomizedSystemMessages ( ) ; systemMessages . setSessionExpiredNotificationEnabled ( false ) ; return systemMessages ; } } ;
|
public class Record { /** * Set column to record .
* @ param column the column name
* @ param value the value of the column */
public Record set ( String column , Object value ) { } }
|
getColumns ( ) . put ( column , value ) ; return this ;
|
public class DefaultGroovyMethods { /** * Extend object with category methods .
* All methods for given class and all super classes will be added to the object .
* @ param self any Class
* @ param categoryClasses a category classes to use
* @ since 1.6.0 */
public static void mixin ( MetaClass self , List < Class > categoryClasses ) { } }
|
MixinInMetaClass . mixinClassesToMetaClass ( self , categoryClasses ) ;
|
public class AccountManager { /** * Decodes a list of favorites urls from a series of & lt ; url1 & gt ; , & lt ; url2 & gt ; . . .
* Will then put them into the list of favorites , optionally clearing first
* @ param encodedUrlList - String encoded version of the list
* @ param clearFirst - clear the list of favorites first */
public void decodeFavoritesUrls ( String encodedUrlList , boolean clearFirst ) { } }
|
int start = 0 ; int end = encodedUrlList . length ( ) ; if ( encodedUrlList . startsWith ( "<" ) ) start ++ ; if ( encodedUrlList . endsWith ( ">" ) ) end -- ; encodedUrlList = encodedUrlList . substring ( start , end ) ; if ( clearFirst ) favoriteUrls . clear ( ) ; for ( String url : Splitter . on ( ">,<" ) . omitEmptyStrings ( ) . split ( encodedUrlList ) ) { favoriteUrls . add ( url ) ; }
|
public class ParagraphBuilder { /** * Create a link in the current paragraph .
* @ param text the text
* @ param table the destination
* @ return this for fluent style */
public ParagraphBuilder link ( final String text , final Table table ) { } }
|
final ParagraphElement paragraphElement = Link . create ( text , table ) ; this . paragraphElements . add ( paragraphElement ) ; return this ;
|
public class HypergraphSorter { /** * Sorts the edges of a random 3 - hypergraph in & ldquo ; leaf peeling & rdquo ; order .
* @ return true if the sorting procedure succeeded . */
private boolean sort ( ) { } }
|
// We cache all variables for faster access
final int [ ] d = this . d ; // System . err . println ( " Visiting . . . " ) ;
if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "Peeling hypergraph..." ) ; top = 0 ; for ( int i = 0 ; i < numVertices ; i ++ ) if ( d [ i ] == 1 ) peel ( i ) ; if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( top == numEdges ? "Peeling completed." : "Visit failed: peeled " + top + " edges out of " + numEdges + "." ) ; return top == numEdges ;
|
public class Block { /** * default for testing */
void writeHeader ( OutputStream stream ) throws IOException { } }
|
// try for cached write first
if ( headerBytesValid && payload != null && payload . length >= offset + HEADER_SIZE ) { stream . write ( payload , offset , HEADER_SIZE ) ; return ; } // fall back to manual write
Utils . uint32ToByteStreamLE ( version , stream ) ; stream . write ( prevBlockHash . getReversedBytes ( ) ) ; stream . write ( getMerkleRoot ( ) . getReversedBytes ( ) ) ; Utils . uint32ToByteStreamLE ( time , stream ) ; Utils . uint32ToByteStreamLE ( difficultyTarget , stream ) ; Utils . uint32ToByteStreamLE ( nonce , stream ) ;
|
public class NonBlockingClient { /** * Creates a new instance of the < code > NonBlockingClient < / code > in starting state . This is equivalent to calling :
* < code > create ( service , ClientOptions . create , listener , context ) ; < / code >
* @ param service a URI for the service to connect to , for example : < code > amqp : / / example . org : 5672 < / code > .
* This URI can start with either < code > amqp : / / < / code > or < code > amqps : / / < / code > ( for SSL / TLS based
* connections ) . User names and passwords may be embedded into the URL - for example :
* < code > amqp : / / user : pass @ example . com < / code > . If a value of < code > null < / code > is specified then
* the client will attempt to locate a suitable service based on its environment . Currently it
* is capable of locating services in this way when run in the IBM Bluemix environment .
* @ param listener a listener that is notified of major life - cycle events for the client .
* @ param context a context object that is passed into the listener . This can be used within the listener code to
* identify the specific instance of the create method relating to the listener invocation .
* @ param < T > the type of the context , used to propagate an arbitrary object between method calls on an
* instance of this object , and the various listeners that are used to provide notification
* of client related events .
* @ return a new instance of < code > NonBlockingClient < / code >
* @ see NonBlockingClient # create ( String , ClientOptions , NonBlockingClientListener , Object ) */
public static < T > NonBlockingClient create ( String service , NonBlockingClientListener < T > listener , T context ) { } }
|
return create ( service , defaultClientOptions , listener , context ) ;
|
public class TypefaceManager { /** * Load a typeface from the specified font data .
* @ param assets The application ' s asset manager .
* @ param path The file name of the font data in the assets directory . */
static Typeface load ( AssetManager assets , String path ) { } }
|
synchronized ( sTypefaces ) { Typeface typeface ; if ( sTypefaces . containsKey ( path ) ) { typeface = sTypefaces . get ( path ) ; } else { typeface = Typeface . createFromAsset ( assets , path ) ; sTypefaces . put ( path , typeface ) ; } return typeface ; }
|
public class CastorDao { /** * Template method :
* Copies the properties . */
protected void _syncProperties ( final T object , final T p_object ) { } }
|
BeansUtil . copyPropertiesExcept ( p_object , object , new String [ ] { "persistentID" } ) ;
|
public class FieldInfo { /** * Set the data in this field to true or false . */
public int setState ( boolean bState , boolean bDisplayOption , int iMoveMode ) { } }
|
Boolean objData = new Boolean ( bState ) ; if ( this . getDataClass ( ) == Boolean . class ) return this . setData ( objData , bDisplayOption , iMoveMode ) ; else if ( Number . class . isAssignableFrom ( this . getDataClass ( ) ) ) return this . setValue ( objData . booleanValue ( ) ? 1 : 0 , bDisplayOption , iMoveMode ) ; else if ( this . getDataClass ( ) == String . class ) return this . setString ( objData . booleanValue ( ) ? Constants . TRUE : Constants . FALSE , bDisplayOption , iMoveMode ) ; return super . setState ( bState , bDisplayOption , iMoveMode ) ;
|
public class Database { /** * Returns a new Database that uses { @ link DataSource } with given JNDI - name . */
public static @ NotNull Database forJndiDataSource ( @ NotNull String jndiName ) { } }
|
return forDataSource ( JndiUtils . lookupJndiDataSource ( jndiName ) ) ;
|
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcRelAggregates ( ) { } }
|
if ( ifcRelAggregatesEClass == null ) { ifcRelAggregatesEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 517 ) ; } return ifcRelAggregatesEClass ;
|
public class CmsStringTemplateRenderer { /** * Renders the given string template . < p >
* @ param cms the cms context
* @ param template the template
* @ param content the content
* @ param contextObjects additional context objects made available to the template
* @ return the rendering result */
public static String renderTemplate ( CmsObject cms , String template , CmsJspContentAccessBean content , Map < String , Object > contextObjects ) { } }
|
STGroup group = new STGroup ( '%' , '%' ) ; group . registerRenderer ( Date . class , new DateRenderer ( ) ) ; CompiledST cST = group . defineTemplate ( "main" , template ) ; cST . addArg ( new FormalArgument ( "content" ) ) ; if ( contextObjects != null ) { for ( Entry < String , Object > entry : contextObjects . entrySet ( ) ) { cST . addArg ( new FormalArgument ( entry . getKey ( ) ) ) ; } } ST st = group . getInstanceOf ( "main" ) ; st . add ( "content" , content ) ; if ( contextObjects != null ) { for ( Entry < String , Object > entry : contextObjects . entrySet ( ) ) { st . add ( entry . getKey ( ) , entry . getValue ( ) ) ; } } return st . render ( cms . getRequestContext ( ) . getLocale ( ) ) ;
|
public class RequestTemplate { /** * Set the Body for this request .
* @ param body to send .
* @ return a RequestTemplate for chaining . */
public RequestTemplate body ( Request . Body body ) { } }
|
this . body = body ; header ( CONTENT_LENGTH ) ; if ( body . length ( ) > 0 ) { header ( CONTENT_LENGTH , String . valueOf ( body . length ( ) ) ) ; } return this ;
|
public class GenCallCodeUtils { /** * If the param node had a content kind specified , it was autoescaped in the corresponding
* context . Hence the result of evaluating the param block is wrapped in a SanitizedContent
* instance of the appropriate kind .
* < p > The expression for the constructor of SanitizedContent of the appropriate kind ( e . g . , " new
* SanitizedHtml " ) , or null if the node has no ' kind ' attribute . This uses the variant used in
* internal blocks . */
protected Expression maybeWrapContent ( CodeChunk . Generator generator , CallParamContentNode node , Expression content ) { } }
|
if ( node . getContentKind ( ) == null ) { return content ; } // Use the internal blocks wrapper , to maintain falsiness of empty string
return sanitizedContentOrdainerFunctionForInternalBlocks ( node . getContentKind ( ) ) . call ( content ) ;
|
public class TimeBasedSubDirDatasetsFinder { /** * Each subdir in { @ link DatasetsFinder # inputDir } is considered a dataset , if it satisfies blacklist and whitelist . */
@ Override public Set < Dataset > findDistinctDatasets ( ) throws IOException { } }
|
Set < Dataset > datasets = Sets . newHashSet ( ) ; for ( FileStatus datasetsFileStatus : this . fs . globStatus ( new Path ( inputDir , subDirPattern ) ) ) { log . info ( "Scanning directory : " + datasetsFileStatus . getPath ( ) . toString ( ) ) ; if ( datasetsFileStatus . isDirectory ( ) ) { String datasetName = getDatasetName ( datasetsFileStatus . getPath ( ) . toString ( ) , inputDir ) ; if ( DatasetFilterUtils . survived ( datasetName , this . blacklist , this . whitelist ) ) { log . info ( "Found dataset: " + datasetName ) ; Path inputPath = new Path ( this . inputDir , new Path ( datasetName , this . inputSubDir ) ) ; Path inputLatePath = new Path ( this . inputDir , new Path ( datasetName , this . inputLateSubDir ) ) ; Path outputPath = new Path ( this . destDir , new Path ( datasetName , this . destSubDir ) ) ; Path outputLatePath = new Path ( this . destDir , new Path ( datasetName , this . destLateSubDir ) ) ; Path outputTmpPath = new Path ( this . tmpOutputDir , new Path ( datasetName , this . destSubDir ) ) ; double priority = this . getDatasetPriority ( datasetName ) ; String folderStructure = getFolderStructure ( ) ; for ( FileStatus status : this . fs . globStatus ( new Path ( inputPath , folderStructure ) ) ) { Path jobInputPath = status . getPath ( ) ; DateTime folderTime = null ; try { folderTime = getFolderTime ( jobInputPath , inputPath ) ; } catch ( RuntimeException e ) { log . warn ( "{} is not a valid folder. Will be skipped due to exception." , jobInputPath , e ) ; continue ; } if ( folderWithinAllowedPeriod ( jobInputPath , folderTime ) ) { Path jobInputLatePath = appendFolderTime ( inputLatePath , folderTime ) ; Path jobOutputPath = appendFolderTime ( outputPath , folderTime ) ; Path jobOutputLatePath = appendFolderTime ( outputLatePath , folderTime ) ; Path jobOutputTmpPath = appendFolderTime ( outputTmpPath , folderTime ) ; Dataset timeBasedDataset = new Dataset . Builder ( ) . withPriority ( priority ) . withDatasetName ( datasetName ) . addInputPath ( this . recompactDatasets ? jobOutputPath : jobInputPath ) . addInputLatePath ( this . recompactDatasets ? jobOutputLatePath : jobInputLatePath ) . withOutputPath ( jobOutputPath ) . withOutputLatePath ( jobOutputLatePath ) . withOutputTmpPath ( jobOutputTmpPath ) . build ( ) ; // Stores the extra information for timeBasedDataset
timeBasedDataset . setJobProp ( MRCompactor . COMPACTION_JOB_DEST_PARTITION , folderTime . toString ( this . timeFormatter ) ) ; timeBasedDataset . setJobProp ( MRCompactor . COMPACTION_INPUT_PATH_TIME , folderTime . getMillis ( ) ) ; datasets . add ( timeBasedDataset ) ; } } } } } return datasets ;
|
public class MapModel { /** * Add a layer to the map , but do not fire an event for update .
* @ param layerInfo the client layer info */
private void addLayerWithoutFireEvent ( ClientLayerInfo layerInfo ) { } }
|
switch ( layerInfo . getLayerType ( ) ) { case RASTER : if ( layerInfo instanceof ClientWmsLayerInfo ) { InternalClientWmsLayer internalClientWmsLayer = new InternalClientWmsLayer ( this , ( ClientWmsLayerInfo ) layerInfo ) ; layers . add ( internalClientWmsLayer ) ; } else { RasterLayer rasterLayer = new RasterLayer ( this , ( ClientRasterLayerInfo ) layerInfo ) ; layers . add ( rasterLayer ) ; } break ; default : VectorLayer vectorLayer = new VectorLayer ( this , ( ClientVectorLayerInfo ) layerInfo ) ; layers . add ( vectorLayer ) ; vectorLayer . addFeatureSelectionHandler ( selectionPropagator ) ; break ; }
|
public class VirtualNetworkLinksInner { /** * Gets a virtual network link to the specified Private DNS zone .
* @ param resourceGroupName The name of the resource group .
* @ param privateZoneName The name of the Private DNS zone ( without a terminating dot ) .
* @ param virtualNetworkLinkName The name of the virtual network link .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the VirtualNetworkLinkInner object */
public Observable < VirtualNetworkLinkInner > getAsync ( String resourceGroupName , String privateZoneName , String virtualNetworkLinkName ) { } }
|
return getWithServiceResponseAsync ( resourceGroupName , privateZoneName , virtualNetworkLinkName ) . map ( new Func1 < ServiceResponse < VirtualNetworkLinkInner > , VirtualNetworkLinkInner > ( ) { @ Override public VirtualNetworkLinkInner call ( ServiceResponse < VirtualNetworkLinkInner > response ) { return response . body ( ) ; } } ) ;
|
public class LoginCommand { /** * Execute the login command . Display the dialog and attempt authentication . */
protected void doExecuteCommand ( ) { } }
|
if ( ! ValkyrieRepository . getInstance ( ) . getApplicationConfig ( ) . applicationSecurityManager ( ) . isSecuritySupported ( ) ) { return ; } CompositeDialogPage tabbedPage = new TabbedDialogPage ( "loginForm" ) ; final LoginForm loginForm = createLoginForm ( ) ; tabbedPage . addForm ( loginForm ) ; if ( getDefaultUserName ( ) != null ) { loginForm . setUserName ( getDefaultUserName ( ) ) ; } dialog = new TitledPageApplicationDialog ( tabbedPage ) { protected boolean onFinish ( ) { loginForm . commit ( ) ; Authentication authentication = loginForm . getAuthentication ( ) ; // Hand this token to the security manager to actually attempt the login
ApplicationSecurityManager sm = getApplicationConfig ( ) . applicationSecurityManager ( ) ; try { sm . doLogin ( authentication ) ; postLogin ( ) ; return true ; } finally { if ( isClearPasswordOnFailure ( ) ) { loginForm . setPassword ( "" ) ; } loginForm . requestFocusInWindow ( ) ; } } protected void onCancel ( ) { super . onCancel ( ) ; // Close the dialog
// Now exit if configured
if ( isCloseOnCancel ( ) ) { ApplicationSecurityManager sm = getApplicationConfig ( ) . applicationSecurityManager ( ) ; Authentication authentication = sm . getAuthentication ( ) ; if ( authentication == null ) { LoginCommand . this . logger . info ( "User canceled login; close the application." ) ; getApplicationConfig ( ) . application ( ) . close ( ) ; } } } protected ActionCommand getCallingCommand ( ) { return LoginCommand . this ; } protected void onAboutToShow ( ) { loginForm . requestFocusInWindow ( ) ; } } ; dialog . setDisplayFinishSuccessMessage ( displaySuccessMessage ) ; dialog . showDialog ( ) ;
|
public class MithraNotificationEventManagerImpl { /** * this is called from batch ( I / U / D ) database operations */
public void addMithraNotificationEvent ( String databaseIdentifier , String classname , byte databaseOperation , List mithraObjects , Object sourceAttribute ) { } }
|
MithraDataObject [ ] dataObjects = new MithraDataObject [ mithraObjects . size ( ) ] ; MithraDataObject dataObject ; for ( int i = 0 ; i < mithraObjects . size ( ) ; i ++ ) { dataObject = ( ( MithraTransactionalObject ) mithraObjects . get ( i ) ) . zGetTxDataForRead ( ) ; dataObjects [ i ] = dataObject ; } createAndAddNotificationEvent ( databaseIdentifier , classname , databaseOperation , dataObjects , null , null , sourceAttribute ) ;
|
public class ZipFileArtifactNotifier { /** * Add a path to the covering paths collection .
* Do nothing if a path in the collection covers the new path .
* Add the path and remove any paths covered by the new path
* if the path is not covered by a path in the collection .
* @ param newPath The path to add to the covering paths collection .
* @ return Answer true or false telling if the covering paths collection
* was modified . */
private boolean addCoveringPath ( String newPath ) { } }
|
int newLen = newPath . length ( ) ; Iterator < String > useCoveringPaths = coveringPaths . iterator ( ) ; boolean isCovered = false ; boolean isCovering = false ; while ( ! isCovered && useCoveringPaths . hasNext ( ) ) { String coveringPath = useCoveringPaths . next ( ) ; int coveringLen = coveringPath . length ( ) ; if ( coveringLen < newLen ) { if ( isCovering ) { continue ; // Can ' t be covered .
} else { if ( newPath . regionMatches ( 0 , coveringPath , 0 , coveringLen ) ) { if ( newPath . charAt ( coveringLen ) == '/' ) { isCovered = true ; // Covered : " covering / child " vs " covering "
break ; // No need to continue : Can ' t be any additional relationships to find .
} else { continue ; // Dissimilar : " coveringX " vs " covering "
} } else { continue ; // Dissimilar : " coverXngX " vs " covering "
} } } else if ( coveringLen == newLen ) { if ( isCovering ) { continue ; // Can ' t be covered
} else { if ( newPath . regionMatches ( 0 , coveringPath , 0 , coveringLen ) ) { isCovered = true ; // Covered : " covering " vs " covering "
break ; // No need to continue : Can ' t be any additional relationships to find .
} else { continue ; // " covering " vs " coverXng "
} } } else { // coveringLen > newLen
if ( newPath . regionMatches ( 0 , coveringPath , 0 , newLen ) ) { if ( coveringPath . charAt ( newLen ) == '/' ) { isCovering = true ; useCoveringPaths . remove ( ) ; // Covering : " covering " vs " covering / child "
continue ; // Look for other independent children : " covering / child1 " and " covering / child2"
} else { continue ; // Dissimilar : " covering " vs " coveringX "
} } else { continue ; // Dissimilar : " covering " vs " coverXngX "
} } } if ( ! isCovered ) { coveringPaths . add ( newPath ) ; } return ! isCovered ;
|
public class TokenService { /** * Method to create BankAccount
* @ param token
* @ return
* @ throws BaseException */
public Token createToken ( Token token ) throws BaseException { } }
|
logger . debug ( "Enter TokenService::createToken" ) ; // prepare API url
String apiUrl = requestContext . getBaseUrl ( ) + "tokens" ; logger . info ( "apiUrl - " + apiUrl ) ; // assign TypeReference for deserialization
TypeReference < Token > typeReference = new TypeReference < Token > ( ) { } ; // prepare service request
Request request = new Request . RequestBuilder ( MethodType . POST , apiUrl ) . ignoreAuthHeader ( true ) . requestObject ( token ) . typeReference ( typeReference ) . context ( requestContext ) . build ( ) ; // make API call
Response response = sendRequest ( request ) ; // retrieve response
Token tokenResponse = ( Token ) response . getResponseObject ( ) ; // set additional attributes
prepareResponse ( request , response , tokenResponse ) ; return tokenResponse ;
|
public class AbstractContext { /** * / * ( non - Javadoc )
* @ see com . abubusoft . kripton . BinderContext # serialize ( java . lang . Object , java . io . Writer ) */
@ SuppressWarnings ( "unchecked" ) @ Override public < E > void serialize ( E object , Writer output ) { } }
|
if ( object == null ) return ; try ( SerializerWrapper serializer = createSerializer ( output ) ) { mapperFor ( ( Class < E > ) object . getClass ( ) ) . serialize ( this , serializer , object ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw new KriptonRuntimeException ( e ) ; }
|
public class LongTupleIterables { /** * Returns an iterable returning an iterator that returns
* { @ link MutableLongTuple } s in the specified range , in
* lexicographical order . < br >
* < br >
* Copies of the given tuples will be stored internally . < br >
* < br >
* Also see < a href = " . . / . . / package - summary . html # IterationOrder " >
* Iteration Order < / a >
* @ param min The minimum values , inclusive
* @ param max The maximum values , exclusive
* @ return The iterable
* @ throws IllegalArgumentException If the given tuples do not
* have the same { @ link Tuple # getSize ( ) size } */
public static Iterable < MutableLongTuple > lexicographicalIterable ( LongTuple min , LongTuple max ) { } }
|
return iterable ( Order . LEXICOGRAPHICAL , min , max ) ;
|
public class JmsBytesMessageImpl { /** * Write a < code > boolean < / code > to the stream message as a 1 - byte value .
* The value < code > true < / code > is written out as the value
* < code > ( byte ) 1 < / code > ; the value < code > false < / code > is written out as
* the value < code > ( byte ) 0 < / code > .
* @ param value the < code > boolean < / code > value to be written .
* @ exception MessageNotWriteableException if message in read - only mode .
* @ exception JMSException if JMS fails to write message due to
* some internal JMS error . */
@ Override public void writeBoolean ( boolean value ) throws JMSException { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "writeBoolean" , value ) ; // Check if the producer has promised not to modify the payload after it ' s been set
checkProducerPromise ( "writeBoolean(boolean)" , "JmsBytesMessageImpl.writeBoolean#1" ) ; // Check that we are in write mode . Need to do this here ( as well as in
// writeByte ) otherwise we get a misleading error message .
checkBodyWriteable ( "writeBoolean" ) ; // Convert the boolean to a 1 - byte value as described above .
writeByte ( ( byte ) ( value ? 1 : 0 ) ) ; // Invalidate the cached toString object .
cachedBytesToString = null ; // Ensure that the new data gets exported when the time comes .
bodySetInJsMsg = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "writeBoolean" ) ;
|
public class ISPNQuotaPersister { /** * { @ inheritDoc } */
public void removeWorkspaceQuota ( String repositoryName , String workspaceName ) { } }
|
String wsUniqueName = composeWorkspaceUniqueName ( repositoryName , workspaceName ) ; CacheKey key = new WorkspaceQuotaKey ( wsUniqueName ) ; cache . remove ( key ) ;
|
public class Packet { /** * Queues this { @ link Packet } to one ( or more ) { @ link Client } ( s ) .
* < br > < br >
* No { @ link Client } will receive this { @ link Packet } until { @ link Client # flush ( ) } is called for that respective
* { @ link Client } .
* @ param clients A { @ link Collection } of { @ link Client } s . */
public final void write ( Collection < ? extends Client > clients ) { } }
|
if ( clients . isEmpty ( ) ) { throw new IllegalArgumentException ( "You must send this packet to at least one client!" ) ; } clients . forEach ( this :: write ) ;
|
public class TableInformation { /** * Fetches all foreign keys for this table .
* @ param _ fkName name of foreign key
* @ param _ colName name of column name
* @ param _ refTableName name of referenced SQL table
* @ param _ refColName name of column within referenced SQL table
* @ param _ cascade delete cascade activated
* @ see # fkMap */
public void addForeignKey ( final String _fkName , final String _colName , final String _refTableName , final String _refColName , final boolean _cascade ) { } }
|
this . fkMap . put ( _fkName . toUpperCase ( ) , new ForeignKeyInformation ( _fkName , _colName , _refTableName , _refColName , _cascade ) ) ;
|
public class ObjectFactory { /** * Create an instance of { @ link JAXBElement } { @ code < } { @ link AbstractTimeTopologyPrimitiveType } { @ code > }
* @ param value
* Java instance representing xml element ' s value .
* @ return
* the new instance of { @ link JAXBElement } { @ code < } { @ link AbstractTimeTopologyPrimitiveType } { @ code > } */
@ XmlElementDecl ( namespace = "http://www.opengis.net/gml" , name = "_TimeTopologyPrimitive" , substitutionHeadNamespace = "http://www.opengis.net/gml" , substitutionHeadName = "_TimePrimitive" ) public JAXBElement < AbstractTimeTopologyPrimitiveType > create_TimeTopologyPrimitive ( AbstractTimeTopologyPrimitiveType value ) { } }
|
return new JAXBElement < AbstractTimeTopologyPrimitiveType > ( __TimeTopologyPrimitive_QNAME , AbstractTimeTopologyPrimitiveType . class , null , value ) ;
|
public class GrpcSslContexts { /** * Returns OpenSSL if available , otherwise returns the JDK provider . */
private static SslProvider defaultSslProvider ( ) { } }
|
if ( OpenSsl . isAvailable ( ) ) { logger . log ( Level . FINE , "Selecting OPENSSL" ) ; return SslProvider . OPENSSL ; } Provider provider = findJdkProvider ( ) ; if ( provider != null ) { logger . log ( Level . FINE , "Selecting JDK with provider {0}" , provider ) ; return SslProvider . JDK ; } logger . log ( Level . INFO , "netty-tcnative unavailable (this may be normal)" , OpenSsl . unavailabilityCause ( ) ) ; logger . log ( Level . INFO , "Conscrypt not found (this may be normal)" ) ; logger . log ( Level . INFO , "Jetty ALPN unavailable (this may be normal)" , JettyTlsUtil . getJettyAlpnUnavailabilityCause ( ) ) ; throw new IllegalStateException ( "Could not find TLS ALPN provider; " + "no working netty-tcnative, Conscrypt, or Jetty NPN/ALPN available" ) ;
|
public class RpcInvokeContext { /** * 放入响应透传数据
* @ param key Key
* @ param value Value */
public void putResponseBaggage ( String key , String value ) { } }
|
if ( BAGGAGE_ENABLE && key != null && value != null ) { responseBaggage . put ( key , value ) ; }
|
public class MethodUtil { /** * Process the immediate interfaces of this class or interface . */
private static void getInterfaceMethods ( Class < ? > cls , Map < Signature , Method > sigs ) { } }
|
Class < ? > [ ] intfs = cls . getInterfaces ( ) ; for ( int i = 0 ; i < intfs . length ; i ++ ) { Class < ? > intf = intfs [ i ] ; boolean done = getInternalPublicMethods ( intf , sigs ) ; if ( ! done ) { getInterfaceMethods ( intf , sigs ) ; } }
|
public class FaxReader { /** * Add the requested query string arguments to the Request .
* @ param request Request to add query string arguments to */
private void addQueryParams ( final Request request ) { } }
|
if ( from != null ) { request . addQueryParam ( "From" , from ) ; } if ( to != null ) { request . addQueryParam ( "To" , to ) ; } if ( dateCreatedOnOrBefore != null ) { request . addQueryParam ( "DateCreatedOnOrBefore" , dateCreatedOnOrBefore . toString ( ) ) ; } if ( dateCreatedAfter != null ) { request . addQueryParam ( "DateCreatedAfter" , dateCreatedAfter . toString ( ) ) ; } if ( getPageSize ( ) != null ) { request . addQueryParam ( "PageSize" , Integer . toString ( getPageSize ( ) ) ) ; }
|
public class CPTaxCategoryServiceBaseImpl { /** * Sets the cp option category remote service .
* @ param cpOptionCategoryService the cp option category remote service */
public void setCPOptionCategoryService ( com . liferay . commerce . product . service . CPOptionCategoryService cpOptionCategoryService ) { } }
|
this . cpOptionCategoryService = cpOptionCategoryService ;
|
public class SeaGlassInternalFrameTitlePane { /** * Create the system menu . */
private void assembleSystemMenu ( ) { } }
|
systemPopupMenu = new JPopupMenuUIResource ( ) ; addSystemMenuItems ( systemPopupMenu ) ; enableActions ( ) ; menuButton = new NoFocusButton ( "InternalFrameTitlePane.menuButtonAccessibleName" ) ; updateMenuIcon ( ) ; menuButton . addMouseListener ( new MouseAdapter ( ) { public void mousePressed ( MouseEvent e ) { try { frame . setSelected ( true ) ; } catch ( PropertyVetoException pve ) { } showSystemMenu ( ) ; } } ) ; JPopupMenu p = frame . getComponentPopupMenu ( ) ; if ( p == null || p instanceof UIResource ) { frame . setComponentPopupMenu ( systemPopupMenu ) ; } if ( frame . getDesktopIcon ( ) != null ) { p = frame . getDesktopIcon ( ) . getComponentPopupMenu ( ) ; if ( p == null || p instanceof UIResource ) { frame . getDesktopIcon ( ) . setComponentPopupMenu ( systemPopupMenu ) ; } } setInheritsPopupMenu ( true ) ;
|
public class SubscriptionService { /** * Change the offer of a subscription . < br >
* < br >
* The plan will be changed immediately . The next _ capture _ at date will remain unchanged . A refund will be given if
* due . < br >
* If the new amount is higher than the old one , there will be no additional charge . The next charge date will not
* change . If the new amount is less then the old one , a refund happens . The next charge date will not change . < br >
* < strong > IMPORTANT < / strong > < br >
* Permitted up only until one day ( 24 hours ) before the next charge date . < br >
* @ param subscription the subscription
* @ param offer the new offer
* @ return the updated subscription */
public Subscription changeOfferKeepCaptureDateAndRefund ( String subscription , Offer offer ) { } }
|
return changeOfferKeepCaptureDateAndRefund ( new Subscription ( subscription ) , offer ) ;
|
public class ZipUtil { /** * 对流中的数据加入到压缩文件 < br >
* 路径列表和流列表长度必须一致
* @ param zipFile 生成的Zip文件 , 包括文件名 。 注意 : zipPath不能是srcPath路径下的子文件夹
* @ param paths 流数据在压缩文件中的路径或文件名
* @ param ins 要压缩的源
* @ param charset 编码
* @ return 压缩文件
* @ throws UtilException IO异常
* @ since 3.0.9 */
public static File zip ( File zipFile , String [ ] paths , InputStream [ ] ins , Charset charset ) throws UtilException { } }
|
if ( ArrayUtil . isEmpty ( paths ) || ArrayUtil . isEmpty ( ins ) ) { throw new IllegalArgumentException ( "Paths or ins is empty !" ) ; } if ( paths . length != ins . length ) { throw new IllegalArgumentException ( "Paths length is not equals to ins length !" ) ; } ZipOutputStream out = null ; try { out = getZipOutputStream ( zipFile , charset ) ; for ( int i = 0 ; i < paths . length ; i ++ ) { addFile ( ins [ i ] , paths [ i ] , out ) ; } } finally { IoUtil . close ( out ) ; } return zipFile ;
|
public class GrailsDomainBinder { /** * Obtains a mapping object for the given domain class nam
* @ param domainClass The domain class in question
* @ return A Mapping object or null */
public static Mapping getMapping ( PersistentEntity domainClass ) { } }
|
return domainClass == null ? null : AbstractGrailsDomainBinder . getMapping ( domainClass . getJavaClass ( ) ) ;
|
public class JasperClassLoader { /** * Scans the imported and required bundles for matching resources . Can be
* used to obtain references to TLD files , XML definition files , etc .
* @ param directory the directory within the imported / required bundle where to
* perform the lookup ( e . g . " META - INF / " )
* @ param filePattern the file pattern to lookup ( e . g . " * . tld " )
* @ param recursive indicates whether the lookup should be recursive , i . e . if it
* will drill into child directories
* @ return list of matching resources , URLs as returned by the framework ' s
* { @ link Bundle # findEntries ( String , String , boolean ) } method */
public List < URL > scanBundlesInClassSpace ( String directory , String filePattern , boolean recursive ) { } }
|
Set < Bundle > bundlesInClassSpace = ClassPathUtil . getBundlesInClassSpace ( bundleClassLoader . getBundle ( ) , new HashSet < > ( ) ) ; List < URL > matching = new ArrayList < > ( ) ; for ( Bundle bundle : bundlesInClassSpace ) { @ SuppressWarnings ( "rawtypes" ) Enumeration e = bundle . findEntries ( directory , filePattern , recursive ) ; if ( e == null ) { continue ; } while ( e . hasMoreElements ( ) ) { URL u = ( URL ) e . nextElement ( ) ; matching . add ( u ) ; } } return matching ;
|
public class TripletImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setFileOffset ( long newFileOffset ) { } }
|
long oldFileOffset = fileOffset ; fileOffset = newFileOffset ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , BasePackage . TRIPLET__FILE_OFFSET , oldFileOffset , fileOffset ) ) ;
|
public class BatchTranslateTextRequest { /** * Use { @ link # getModelsMap ( ) } instead . */
@ java . lang . Deprecated public java . util . Map < java . lang . String , java . lang . String > getModels ( ) { } }
|
return getModelsMap ( ) ;
|
public class ImageBandMath { /** * Computes the standard deviation for each pixel across all bands in the { @ link Planar }
* image .
* @ param input Planar image - not modified
* @ param output Gray scale image containing average pixel values - modified
* @ param avg Input Gray scale image containing average image . Can be null
* @ param startBand First band to be included in the projection
* @ param lastBand Last band to be included in the projection */
public static void stdDev ( Planar < GrayU16 > input , GrayU16 output , @ Nullable GrayU16 avg , int startBand , int lastBand ) { } }
|
checkInput ( input , startBand , lastBand ) ; output . reshape ( input . width , input . height ) ; if ( avg == null ) { avg = new GrayU16 ( input . width , input . height ) ; average ( input , avg , startBand , lastBand ) ; } if ( BoofConcurrency . USE_CONCURRENT ) { ImplImageBandMath_MT . stdDev ( input , output , avg , startBand , lastBand ) ; } else { ImplImageBandMath . stdDev ( input , output , avg , startBand , lastBand ) ; }
|
public class PackingPlan { /** * Return a map containing the count of all of the components , keyed by name */
public Map < String , Integer > getComponentCounts ( ) { } }
|
Map < String , Integer > componentCounts = new HashMap < > ( ) ; for ( ContainerPlan containerPlan : getContainers ( ) ) { for ( InstancePlan instancePlan : containerPlan . getInstances ( ) ) { Integer count = 0 ; if ( componentCounts . containsKey ( instancePlan . getComponentName ( ) ) ) { count = componentCounts . get ( instancePlan . getComponentName ( ) ) ; } componentCounts . put ( instancePlan . getComponentName ( ) , ++ count ) ; } } return componentCounts ;
|
public class ThreadPoolJobManager { /** * Add a file to notify the script that asked to stop the print that it is now done processing the remain
* jobs . */
private void notifyIfStopped ( ) { } }
|
if ( isAcceptingNewJobs ( ) || ! this . runningTasksFutures . isEmpty ( ) ) { return ; } final File stoppedFile = new File ( this . workingDirectories . getWorking ( ) , "stopped" ) ; try { LOGGER . info ( "The print has finished processing jobs and can now stop" ) ; stoppedFile . createNewFile ( ) ; } catch ( IOException e ) { LOGGER . warn ( "Cannot create the {} file" , stoppedFile , e ) ; }
|
public class JPATxEntityManager { /** * ( non - Javadoc )
* @ see com . ibm . ws . jpa . management . JPAEntityManager # getEMInvocationInfo ( TransactionRequirement , LockModeType ) */
@ Override EntityManager getEMInvocationInfo ( boolean requireTx , LockModeType mode ) { } }
|
UOWCoordinator uowCoord = ivAbstractJPAComponent . getUOWCurrent ( ) . getUOWCoord ( ) ; SynchronizationRegistryUOWScope uowSyncRegistry = getSynchronizationRegistryUOWScope ( uowCoord ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getEMInvocationInfo : " + requireTx + " : tid=" + txIdToString ( uowCoord ) ) ; boolean globalTx = uowCoord . isGlobal ( ) ; // The container must throw the TransactionRequiredException if a transaction - scoped
// persistence context is used , and the EntityManager persist , remove , merge , or refresh
// method is invoked when no transaction is active .
if ( ! globalTx && ( requireTx || ( mode != null && ! LockModeType . NONE . equals ( mode ) ) ) ) // d597764
{ if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getEMInvocationInfo : TransactionRequiredException: " + "No active transaction for " + ivPuRefId ) ; // The provider is not responsible to throw this exception for
// persist , remove , refresh and merge methods since these methods are supported in
// extend - scoped persistence context . The " container " must enforced this
// rule per JPA spec .
throw new TransactionRequiredException ( "No active transaction for " + ivPuRefId ) ; } // ( JPA 5.6.3.1 Requirements for Persistence Context Propagation )
// Persistence contexts are propagated by the container across component invocations as follows .
// If a component is called and there is no JTA transaction or the JTA transaction is not
// propagated , the persistence context is not propagated .
// * If an entity manager is then invoked from within the component :
// * Invocation of an entity manager defined with PersistenceContext - Type . TRANSACTION will
// result in use of a new persistence context ( as described in section 5.6.1 ) .
// * Invocation of an entity manager defined with PersistenceContext - Type . EXTENDED will
// result in the use of the existing extended persistence context bound to that component .
// * If the entity manager is invoked within a JTA transaction , the persistence context will
// be bound to the JTA transaction .
// If a component is called and the JTA transaction is propagated into that component :
// * If the component is a stateful session bean to which an extended persistence context
// has been bound and there is a different persistence context bound to the JTA transaction ,
// an EJBException is thrown by the container .
// * Otherwise , if there is a persistence context bound to the JTA transaction , that
// persistence context is propagated and used .
JPAExEmInvocation invocationEm = getInvocation ( uowSyncRegistry , ivTxKeyPuId ) ; // d683375 , d689596
if ( invocationEm == null ) { EntityManager em = ivEntityManagerPool . getEntityManager ( globalTx , ivUnsynchronized ) ; // d510184
if ( globalTx ) { // 5.9.1 Container Responsibilities
// For the management of a transaction - scoped persistence context , if there is no
// EntityManager already associated with the JTA transaction :
// * The container creates a new entity manager by calling EntityManagerFactory . createEntityManager
// when the first invocation of an entity manager with PersistenceContextType . TRANSACTION
// occurs within the scope of a business method executing in the JTA transaction .
// When the container creates an entity manager , it may pass a map of properties to the
// persistence provider by using the EntityManagerFactory . createEntityManager ( Map map )
// method . If properties have been specified in the PersistenceContext annotation or
// the persistence - context - ref deployment descriptor element , this method must be
// used and the map must include the specified properties .
JPATxEmInvocation txEmInvocation = createJPATxEmInvocation ( uowCoord , em ) ; // Register invocation object to transaction manager for clean up on commit / rollback .
registerEmInvocation ( uowCoord , txEmInvocation ) ; // d638095.2
invocationEm = txEmInvocation ; } else { // 5.6.3.1 Requirements for Persistence Context Propagation
// Persistence contexts are propagated by the container across component invocations as follows .
// If a component is called and there is no JTA transaction or the JTA transaction is not propagated ,
// the persistence context is not propagated .
// * If an entity manager is then invoked from within the component :
// * Invocation of an entity manager defined with PersistenceContext - Type . TRANSACTION will
// result in use of a new persistence context ( as described in section 5.6.1 ) .
// 5.9.1 Container Responsibilities
// [39 ] The container may choose to pool EntityManagers and instead of creating and
// closing in each case acquire one from its pool and call clear ( ) on it .
// For a specific UnitOfWork a new JPANoTxEmInvocation object and
// Entity Manager instance will be created .
// The invocation objects will be registered with the UOW and held
// in a map keyed by the UnitOfWork id so that the same invocation
// and entity manager are used for the entire LTC or Activity Session .
// Both the invocation object and Entity Manager instance will be pooled
// or closed during afterCompletion processing of the UOW .
JPANoTxEmInvocation noTxEmInvocation = createJPANoTxEmInvocation ( uowCoord , em ) ; // Register invocation object to transaction manager for clean up on commit / rollback .
// Currently registration for local transactions is not Tiered . This may need to change
// if conflicts arise . / / d638095.4
LocalTransactionCoordinator ltCoord = ( LocalTransactionCoordinator ) uowCoord ; ltCoord . enlistSynchronization ( noTxEmInvocation ) ; // F61571
invocationEm = noTxEmInvocation ; } setInvocation ( uowSyncRegistry , ivTxKeyPuId , invocationEm ) ; // d683375 , d689596
} else { // JPA 2.1 : 7.6.4.1 Requirements for Persistence Context Propagation
// If a component is called and the JTA transaction is propagated into that component :
// * If there is a persistence context of type SynchronizationType . UNSYNCHRONIZED associated with the
// JTA transaction and the target component specifies a persistence context of type
// SynchronizationType . SYNCHRONIZED , the IllegalStateException is thrown by the container .
if ( invocationEm . isTxUnsynchronized ( ) && ! isTxUnsynchronized ( ) ) { Tr . error ( tc , "JPATXSYNC_ILLEGAL_PROPAGATION_CWWJP0046E" ) ; String msgTxt = "CWWJP0046E: An UNSYNCHRONIZED JPA persistence context cannot be propagated into a SYNCHRONIZED EntityManager." ; throw new IllegalStateException ( msgTxt ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getEMInvocationInfo : " + invocationEm ) ; return invocationEm ;
|
public class HtmlGraphicImage { /** * < p > Return the value of the < code > longdesc < / code > property . < / p >
* < p > Contents : URI to a long description of the image
* represented by this element . */
public java . lang . String getLongdesc ( ) { } }
|
return ( java . lang . String ) getStateHelper ( ) . eval ( PropertyKeys . longdesc ) ;
|
public class Vector2f { /** * / * ( non - Javadoc )
* @ see org . joml . Vector2fc # angle ( org . joml . Vector2fc ) */
public float angle ( Vector2fc v ) { } }
|
float dot = x * v . x ( ) + y * v . y ( ) ; float det = x * v . y ( ) - y * v . x ( ) ; return ( float ) Math . atan2 ( det , dot ) ;
|
public class MapApi { /** * Get map value by path .
* @ param < A > map key type
* @ param < B > map value type
* @ param map subject
* @ param path nodes to walk in map
* @ return value */
public static < A , B > Optional < Map < A , B > > getMap ( final Map map , final Object ... path ) { } }
|
return get ( map , Map . class , path ) . map ( m -> ( Map < A , B > ) m ) ;
|
public class VirtualNetworkPeeringsInner { /** * Gets the specified virtual network peering .
* @ param resourceGroupName The name of the resource group .
* @ param virtualNetworkName The name of the virtual network .
* @ param virtualNetworkPeeringName The name of the virtual network peering .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the observable to the VirtualNetworkPeeringInner object */
public Observable < VirtualNetworkPeeringInner > getAsync ( String resourceGroupName , String virtualNetworkName , String virtualNetworkPeeringName ) { } }
|
return getWithServiceResponseAsync ( resourceGroupName , virtualNetworkName , virtualNetworkPeeringName ) . map ( new Func1 < ServiceResponse < VirtualNetworkPeeringInner > , VirtualNetworkPeeringInner > ( ) { @ Override public VirtualNetworkPeeringInner call ( ServiceResponse < VirtualNetworkPeeringInner > response ) { return response . body ( ) ; } } ) ;
|
public class SipSession { /** * This method is the same as the basic sendRequestWithTransaction ( String , . . . ) method except that
* it allows the caller to specify a message body and / or additional JAIN - SIP API message headers
* to add to or replace in the outbound message . Use of this method requires knowledge of the
* JAIN - SIP API .
* The extra parameters supported by this method are :
* @ param additionalHeaders ArrayList of javax . sip . header . Header , each element a SIP header to add
* to the outbound message . These headers are added to the message after a correct message
* has been constructed . Note that if you try to add a header that there is only supposed
* to be one of in a message , and it ' s already there and only one single value is allowed
* for that header , then this header addition attempt will be ignored . Use the
* ' replaceHeaders ' parameter instead if you want to replace the existing header with your
* own . Use null for no additional message headers .
* @ param replaceHeaders ArrayList of javax . sip . header . Header , each element a SIP header to add to
* the outbound message , replacing existing header ( s ) of that type if present in the
* message . These headers are applied to the message after a correct message has been
* constructed . Use null for no replacement of message headers .
* @ param body A String to be used as the body of the message . The additionalHeaders parameter
* must contain a ContentTypeHeader for this body to be included in the message . Use null
* for no body bytes . */
public SipTransaction sendRequestWithTransaction ( String reqMessage , boolean viaProxy , Dialog dialog , ArrayList < Header > additionalHeaders , ArrayList < Header > replaceHeaders , String body ) throws ParseException { } }
|
Request request = parent . getMessageFactory ( ) . createRequest ( reqMessage ) ; return sendRequestWithTransaction ( request , viaProxy , dialog , additionalHeaders , replaceHeaders , body ) ;
|
public class ImmutableRoaringBitmap { /** * Create a new Roaring bitmap containing at most maxcardinality integers .
* @ param maxcardinality maximal cardinality
* @ return a new bitmap with cardinality no more than maxcardinality */
@ Override public MutableRoaringBitmap limit ( int maxcardinality ) { } }
|
MutableRoaringBitmap answer = new MutableRoaringBitmap ( ) ; int currentcardinality = 0 ; for ( int i = 0 ; ( currentcardinality < maxcardinality ) && ( i < this . highLowContainer . size ( ) ) ; i ++ ) { MappeableContainer c = this . highLowContainer . getContainerAtIndex ( i ) ; if ( c . getCardinality ( ) + currentcardinality <= maxcardinality ) { ( ( MutableRoaringArray ) answer . highLowContainer ) . append ( this . highLowContainer . getKeyAtIndex ( i ) , c . clone ( ) ) ; currentcardinality += c . getCardinality ( ) ; } else { int leftover = maxcardinality - currentcardinality ; MappeableContainer limited = c . limit ( leftover ) ; ( ( MutableRoaringArray ) answer . highLowContainer ) . append ( this . highLowContainer . getKeyAtIndex ( i ) , limited ) ; break ; } } return answer ;
|
public class TypeSafeMatching { /** * Returns the type of { @ link ArgumentMatcher # matches ( Object ) } of the given
* { @ link ArgumentMatcher } implementation . */
private static Class < ? > getArgumentType ( ArgumentMatcher < ? > argumentMatcher ) { } }
|
Method [ ] methods = argumentMatcher . getClass ( ) . getMethods ( ) ; for ( Method method : methods ) { if ( isMatchesMethod ( method ) ) { return method . getParameterTypes ( ) [ 0 ] ; } } throw new NoSuchMethodError ( "Method 'matches(T)' not found in ArgumentMatcher: " + argumentMatcher + " !\r\n Please file a bug with this stack trace at: https://github.com/mockito/mockito/issues/new " ) ;
|
public class BaseDestinationHandler { /** * Do we have a local localisation ? */
public void setLocal ( ) { } }
|
if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setLocal" ) ; getLocalisationManager ( ) . setLocal ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setLocal" ) ;
|
public class Calc { /** * Calculate the psi angle .
* @ param a
* an AminoAcid object
* @ param b
* an AminoAcid object
* @ return a double
* @ throws StructureException
* if aminoacids not connected or if any of the 4 needed atoms
* missing */
public static final double getPsi ( AminoAcid a , AminoAcid b ) throws StructureException { } }
|
if ( ! isConnected ( a , b ) ) { throw new StructureException ( "can not calc Psi - AminoAcids are not connected!" ) ; } Atom a_N = a . getN ( ) ; Atom a_CA = a . getCA ( ) ; Atom a_C = a . getC ( ) ; Atom b_N = b . getN ( ) ; // C and N were checked in isConnected already
if ( a_CA == null ) throw new StructureException ( "Can not calculate Psi, CA atom is missing" ) ; return torsionAngle ( a_N , a_CA , a_C , b_N ) ;
|
public class SourceUnit { /** * Returns a sampling of the source at the specified line and column ,
* of null if it is unavailable . */
public String getSample ( int line , int column , Janitor janitor ) { } }
|
String sample = null ; String text = source . getLine ( line , janitor ) ; if ( text != null ) { if ( column > 0 ) { String marker = Utilities . repeatString ( " " , column - 1 ) + "^" ; if ( column > 40 ) { int start = column - 30 - 1 ; int end = ( column + 10 > text . length ( ) ? text . length ( ) : column + 10 - 1 ) ; sample = " " + text . substring ( start , end ) + Utilities . eol ( ) + " " + marker . substring ( start , marker . length ( ) ) ; } else { sample = " " + text + Utilities . eol ( ) + " " + marker ; } } else { sample = text ; } } return sample ;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.