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 . trans... | 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 XStrin... |
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 , Stri... | requireNonNull ( author , "author" ) ; requireNonNull ( projectName , "projectName" ) ; requireNonNull ( repoName , "repoName" ) ; requireNonNull ( appId , "appId" ) ; requireNonNull ( permission , "permission" ) ; return replacePermissionAtPointer ( author , projectName , perTokenPermissionPointer ( repoName , appId )... |
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 ... |
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 ( ) ; WSRdbManaged... |
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 ch... | 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 . getSecurit... |
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 addSer... |
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 actionPa... |
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... | 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 .
* @ ... | final String [ ] paramNameQualifiers = ( ( ReflectionFragment ) fragment ) . getParameterNameQualifiers ( ) ; final String parameterName = ( ( ReflectionFragment ) fragment ) . getParameterName ( ) ; if ( paramMap . containsKey ( paramNameQualifiers [ 0 ] ) == false ) { throw new ControlException ( buildMessage ( param... |
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 . IDEN... |
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 ( Obj... | 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 . e... |
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 , Node... | // 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 , trea... | 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 ) ) ; } el... |
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
... | 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 ) ) . removeI... |
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 ) { Runnab... |
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... | 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 .... |
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 ... | 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 (" ... |
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
// th... |
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... | 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 URISyntaxExc... | 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 UR... |
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 ... | 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 pa... | ServiceResponse < Page < AppServiceCertificateResourceInner > > response = listCertificatesNextSinglePageAsync ( nextPageLink ) . toBlocking ( ) . single ( ) ; return new PagedList < AppServiceCertificateResourceInner > ( response . body ( ) ) { @ Override public Page < AppServiceCertificateResourceInner > nextPage ( S... |
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 >
* [ ... | 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 lo... |
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 ... |
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 coordinat... | 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... |
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 , ge... |
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 arg... | // 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... |
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 newHig... | 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 do... |
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 )... |
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 Online... | 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 , buyerI... |
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 < Cla... | 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 fav... | 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 ( ">,<" ) . omitEmpt... |
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 (... |
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 ( ) ) ;... |
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 ... | 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... |
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 stat... | 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 . entr... |
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 SanitizedCon... | 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 = getD... |
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 (... |
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 vir... | return getWithServiceResponseAsync ( resourceGroupName , privateZoneName , virtualNetworkLinkName ) . map ( new Func1 < ServiceResponse < VirtualNetworkLinkInner > , VirtualNetworkLinkInner > ( ) { @ Override public VirtualNetworkLinkInner call ( ServiceResponse < VirtualNetworkLinkInner > response ) { return response ... |
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 ( getDefaultU... |
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 ; } createAndAd... |
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 th... | 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 ( ) ; i... |
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 req... |
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 = " . . / . . / pa... | 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 < / cod... | 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 ... |
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 {... | 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 casc... | 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 AbstractTimeTo... | 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 .... |
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 . addQueryPara... |
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... |
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... | 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 ... | 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 = getZipOutput... |
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 / " ) ... | 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 , fil... |
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 i... | 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 , av... |
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 . g... |
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 ( IOExcept... |
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 +... |
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 Illeg... | return getWithServiceResponseAsync ( resourceGroupName , virtualNetworkName , virtualNetworkPeeringName ) . map ( new Func1 < ServiceResponse < VirtualNetworkPeeringInner > , VirtualNetworkPeeringInner > ( ) { @ Override public VirtualNetworkPeeringInner call ( ServiceResponse < VirtualNetworkPeeringInner > response ) ... |
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 knowl... | 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 ( ) + currentc... |
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 ... |
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... | 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 StructureExcepti... |
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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.