signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class CmsSendEmailDialog { /** * Returns a semicolon separated list of user names . < p >
* @ return a semicolon separated list of user names */
@ Override protected String getToNames ( ) { } } | List < String > excluded = new ArrayList < String > ( ) ; List < String > users = new ArrayList < String > ( ) ; Iterator < String > itIds = idsList ( ) . iterator ( ) ; while ( itIds . hasNext ( ) ) { String id = itIds . next ( ) ; CmsSessionInfo session = OpenCms . getSessionManager ( ) . getSessionInfo ( id ) ; if (... |
public class QueryBuilder { /** * 对SQL语句进行转义
* @ param param SQL语句
* @ return 转义后的字符串 */
private static String escapeSQLParam ( final String param ) { } } | int stringLength = param . length ( ) ; StringBuilder buf = new StringBuilder ( ( int ) ( stringLength * 1.1 ) ) ; for ( int i = 0 ; i < stringLength ; ++ i ) { char c = param . charAt ( i ) ; switch ( c ) { case 0 : /* Must be escaped for ' mysql ' */
buf . append ( '\\' ) ; buf . append ( '0' ) ; break ; case '\n' : ... |
public class FileSystemDatasets { /** * Convert a URI for a partition directory in a filesystem dataset to a { @ link View }
* object representing that partition .
* @ param dataset the ( partitioned ) filesystem dataset
* @ param uri the path to the partition directory
* @ return a view of the partition */
pub... | if ( dataset instanceof FileSystemDataset ) { return ( ( FileSystemDataset < E > ) dataset ) . viewForUri ( uri ) ; } throw new IllegalArgumentException ( "Not a file system dataset: " + dataset ) ; |
public class CommonOps_DDRM { /** * Performs the following operation : < br >
* < br >
* c = c + & alpha ; * a * b < br >
* c < sub > ij < / sub > = c < sub > ij < / sub > + & alpha ; * & sum ; < sub > k = 1 : n < / sub > { a < sub > ik < / sub > * b < sub > kj < / sub > }
* @ param alpha scaling factor .
* @... | // TODO add a matrix vectory multiply here
if ( b . numCols >= EjmlParameters . MULT_COLUMN_SWITCH ) { MatrixMatrixMult_DDRM . multAdd_reorder ( alpha , a , b , c ) ; } else { MatrixMatrixMult_DDRM . multAdd_small ( alpha , a , b , c ) ; } |
public class AFactoryAppBeans { /** * < p > Get FctBnCnvIbnToColumnValues in lazy mode . < / p >
* @ return FctBnCnvIbnToColumnValues - FctBnCnvIbnToColumnValues
* @ throws Exception - an exception */
public final FctBnCnvIbnToColumnValues lazyGetFctBnCnvIbnToColumnValues ( ) throws Exception { } } | String beanName = getFctBnCnvIbnToColumnValuesName ( ) ; FctBnCnvIbnToColumnValues fctBnCnvIbnToColumnValues = ( FctBnCnvIbnToColumnValues ) this . beansMap . get ( beanName ) ; if ( fctBnCnvIbnToColumnValues == null ) { fctBnCnvIbnToColumnValues = new FctBnCnvIbnToColumnValues ( ) ; fctBnCnvIbnToColumnValues . setUtlR... |
public class RetryerFactory { /** * Creates new instance of retryer based on the config .
* Accepted config keys are defined in RetryerFactory as static member variable .
* You can use State along with ConfigBuilder and config prefix to build config .
* @ param config
* @ return */
public static < T > Retryer <... | config = config . withFallback ( DEFAULTS ) ; RetryType type = RetryType . valueOf ( config . getString ( RETRY_TYPE ) . toUpperCase ( ) ) ; switch ( type ) { case EXPONENTIAL : return newExponentialRetryer ( config ) ; case FIXED : return newFixedRetryer ( config ) ; default : throw new IllegalArgumentException ( type... |
public class syslog_ui_cmd { /** * < pre >
* Converts API response of bulk operation into object and returns the object array in case of get request .
* < / pre > */
protected base_resource [ ] get_nitro_bulk_response ( nitro_service service , String response ) throws Exception { } } | syslog_ui_cmd_responses result = ( syslog_ui_cmd_responses ) service . get_payload_formatter ( ) . string_to_resource ( syslog_ui_cmd_responses . class , response ) ; if ( result . errorcode != 0 ) { if ( result . errorcode == SESSION_NOT_EXISTS ) service . clear_session ( ) ; throw new nitro_exception ( result . messa... |
public class VersionNumber { /** * Interprets a string with version information . The last version number in the string will be searched and
* processed .
* @ param text
* string with version information
* @ return an object of { @ code VersionNumber } , never { @ code null } */
public static VersionNumber pars... | return VersionParser . parseLastVersionNumber ( Check . notNull ( text , "text" ) ) ; |
public class BufferingXmlWriter { /** * Internal methods , buffering */
private final void flushBuffer ( ) throws IOException { } } | if ( mOutputPtr > 0 && mOutputBuffer != null ) { int ptr = mOutputPtr ; // Need to update location info , to keep it in sync
mLocPastChars += ptr ; mLocRowStartOffset -= ptr ; mOutputPtr = 0 ; mOut . write ( mOutputBuffer , 0 , ptr ) ; } |
public class StaticMessageSource { /** * Adds a message to the default locale .
* @ param locale The locale
* @ param code The code
* @ param message The the message
* @ return This message source */
public @ Nonnull StaticMessageSource addMessage ( @ Nonnull Locale locale , @ Nonnull String code , @ Nonnull St... | ArgumentUtils . requireNonNull ( "locale" , locale ) ; if ( StringUtils . isNotEmpty ( code ) && StringUtils . isNotEmpty ( message ) ) { messageMap . put ( new MessageKey ( locale , code ) , message ) ; } return this ; |
public class ContextManager { /** * Is the address an IPv6 Address .
* @ param host The host string to check .
* @ return True if the string is in the format of an IPv6 address . */
private static boolean isIPv6Addr ( String host ) { } } | if ( host != null ) { if ( host . contains ( "[" ) && host . contains ( "]" ) ) host = host . substring ( host . indexOf ( "[" ) + 1 , host . indexOf ( "]" ) ) ; host = host . toLowerCase ( ) ; Pattern p1 = Pattern . compile ( "^(?:(?:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9](?::|$)){7,})(?:[a-f0-9]... |
public class CrocEyeNotificationHandler { @ Override public void onCommunicationException ( Throwable error ) { } } | addMessage ( MESSAGES . commandCommunicationError ( ) + error . getMessage ( ) , ERRORMESSAGE_STYLE ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcUShapeProfileDef ( ) { } } | if ( ifcUShapeProfileDefEClass == null ) { ifcUShapeProfileDefEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 741 ) ; } return ifcUShapeProfileDefEClass ; |
public class JcValue { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div >
* < div color = ' red ' style = " font - size : 18px ; color : red " > < i > return the receiver as a JcNumber < / i > < / div >
* < br / > */
public JcNumber... | JcNumber ret = new JcNumber ( null , this , null ) ; QueryRecorder . recordInvocationConditional ( this , "asNumber" , ret ) ; return ret ; |
public class AIStream { /** * Mark each tick in the list as delivered . We assume the list contains TickRange objects corresponding to
* V / U ( value ) ticks .
* @ param list A list assumed to contain TickRange objects */
public void markListDelivered ( List list ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "markListDelivered" , list ) ; int len = list . size ( ) ; for ( int i = 0 ; i < len ; i ++ ) { AIValueTick valueTick = ( AIValueTick ) list . get ( i ) ; valueTick . setDelivered ( true ) ; } if ( TraceComponent . isAnyTrac... |
public class CmsObject { /** * Returns all child groups of a group . < p >
* @ param groupname the name of the group
* @ param includeSubChildren if set also returns all sub - child groups of the given group
* @ return a list of all child < code > { @ link CmsGroup } < / code > objects or < code > null < / code >... | return m_securityManager . getChildren ( m_context , groupname , includeSubChildren ) ; |
public class PdfDictionary { /** * Associates the specified < CODE > PdfObject < / CODE > as value to the
* specified < CODE > PdfName < / CODE > as key in this map .
* If the < VAR > value < / VAR > is a < CODE > PdfNull < / CODE > , it is treated just as
* any other < CODE > PdfObject < / CODE > . If the < VAR ... | if ( value == null ) { return ; } put ( key , value ) ; |
public class AbstractDependenceMeasure { /** * Compute ranks of all objects , ranging from 1 to len .
* Ties are given the average rank .
* @ param adapter Data adapter
* @ param data Data array
* @ param idx Data index
* @ return Array of scores */
protected static < A > double [ ] ranks ( final NumberArrayA... | final int len = idx . length ; double [ ] ret = new double [ len ] ; for ( int i = 0 ; i < len ; ) { final int start = i ++ ; final double val = adapter . getDouble ( data , idx [ start ] ) ; // Include ties :
while ( i < len && adapter . getDouble ( data , idx [ i ] ) <= val ) { i ++ ; } final double score = ( start +... |
public class RandomMatrices_DSCC { /** * Creates a random symmetric matrix . The entire matrix will be filled in , not just a triangular
* portion .
* @ param N Number of rows and columns
* @ param nz _ total Number of nonzero elements in the triangular portion of the matrix
* @ param min Minimum element value ... | // compute the number of elements in the triangle , including diagonal
int Ntriagle = ( N * N + N ) / 2 ; // create a list of open elements
int open [ ] = new int [ Ntriagle ] ; for ( int row = 0 , index = 0 ; row < N ; row ++ ) { for ( int col = row ; col < N ; col ++ , index ++ ) { open [ index ] = row * N + col ; } ... |
public class ConverterServerBuilder { /** * Enables the given { @ link com . documents4j . conversion . IExternalConverter } . Any converter that is shipped with
* this library is discovered automatically but can be disabled by invoking this method .
* @ param externalConverter The converter to be disabled .
* @ ... | converterConfiguration . put ( externalConverter , Boolean . FALSE ) ; return this ; |
public class LabelOperationMetadata { /** * < code >
* . google . cloud . datalabeling . v1beta1 . LabelImagePolylineOperationMetadata image _ polyline _ details = 12;
* < / code > */
public com . google . cloud . datalabeling . v1beta1 . LabelImagePolylineOperationMetadata getImagePolylineDetails ( ) { } } | if ( detailsCase_ == 12 ) { return ( com . google . cloud . datalabeling . v1beta1 . LabelImagePolylineOperationMetadata ) details_ ; } return com . google . cloud . datalabeling . v1beta1 . LabelImagePolylineOperationMetadata . getDefaultInstance ( ) ; |
public class CommonOps_ZDRM { /** * Performs the following operation : < br >
* < br >
* c = c + & alpha ; * a * b < br >
* c < sub > ij < / sub > = c < sub > ij < / sub > + & alpha ; * & sum ; < sub > k = 1 : n < / sub > { a < sub > ik < / sub > * b < sub > kj < / sub > }
* @ param realAlpha real component of ... | if ( b . numCols >= EjmlParameters . CMULT_COLUMN_SWITCH ) { MatrixMatrixMult_ZDRM . multAdd_reorder ( realAlpha , imgAlpha , a , b , c ) ; } else { MatrixMatrixMult_ZDRM . multAdd_small ( realAlpha , imgAlpha , a , b , c ) ; } |
public class BoxApiBookmark { /** * Gets a request that copies a bookmark
* @ param id id of the bookmark to copy
* @ param parentId id of the parent folder to copy the bookmark into
* @ return request to copy a bookmark */
public BoxRequestsBookmark . CopyBookmark getCopyRequest ( String id , String parentId ) {... | BoxRequestsBookmark . CopyBookmark request = new BoxRequestsBookmark . CopyBookmark ( id , parentId , getBookmarkCopyUrl ( id ) , mSession ) ; return request ; |
public class BuildDatabase { /** * Add a SpecTopic to the database .
* @ param specTopic The SpecTopic object to be added .
* @ param key A key that represents the Topic mapped to the SpecTopic */
public void add ( final ITopicNode specTopic , final String key ) { } } | if ( specTopic == null ) return ; final Integer topicId = specTopic . getDBId ( ) ; if ( ! topics . containsKey ( topicId ) ) { topics . put ( topicId , new LinkedList < ITopicNode > ( ) ) ; } // Make sure the key exists
if ( ! topicsKeys . containsKey ( key ) ) { topicsKeys . put ( key , new LinkedList < ITopicNode > ... |
public class Compaction { /** * before processing " internal _ key " . */
public boolean shouldStopBefore ( InternalKey internalKey ) { } } | // Scan to find earliest grandparent file that contains key .
InternalKeyComparator internalKeyComparator = inputVersion . getInternalKeyComparator ( ) ; while ( grandparentIndex < grandparents . size ( ) && internalKeyComparator . compare ( internalKey , grandparents . get ( grandparentIndex ) . getLargest ( ) ) > 0 )... |
public class ModelMetricsBinomial { /** * Build a Binomial ModelMetrics object from target - class probabilities , from actual labels , and a given domain for both labels ( and domain [ 1 ] is the target class )
* @ param targetClassProbs A Vec containing target class probabilities
* @ param actualLabels A Vec cont... | return make ( targetClassProbs , actualLabels , actualLabels . domain ( ) ) ; |
public class SecurityServletConfiguratorHelper { /** * Gets a list of zero or more web resource collection objects that represent the
* web - resource - collection elements in web . xml and / or web - fragment . xml files .
* @ param archiveConstraint the security - constraint
* @ return a list of web resource co... | List < WebResourceCollection > webResourceCollections = new ArrayList < WebResourceCollection > ( ) ; List < com . ibm . ws . javaee . dd . web . common . WebResourceCollection > archiveWebResourceCollections = archiveConstraint . getWebResourceCollections ( ) ; for ( com . ibm . ws . javaee . dd . web . common . WebRe... |
public class DefaultDispatchChallengeHandler { /** * Locate a challenge handler factory to serve the given location and challenge type .
* @ param challengeRequest A challenge string from the server .
* @ return a challenge handler registered to handle the challenge at the location ,
* or < code > null < / code >... | ChallengeHandler result = null ; String location = challengeRequest . getLocation ( ) ; if ( location != null ) { Node < ChallengeHandler , UriElement > resultNode = findBestMatchingNode ( location ) ; // If we found an exact or wildcard match , try to find a handler
// for the requested challenge .
if ( resultNode != ... |
public class WritableUtils { /** * / * Ugly utility , maybe someone else can do this better */
public static String readCompressedString ( DataInput in ) throws IOException { } } | byte [ ] bytes = readCompressedByteArray ( in ) ; if ( bytes == null ) return null ; return new String ( bytes , "UTF-8" ) ; |
public class FieldInfo { /** * / * ( non - Javadoc )
* @ see io . github . classgraph . ScanResultObject # setScanResult ( io . github . classgraph . ScanResult ) */
@ Override void setScanResult ( final ScanResult scanResult ) { } } | super . setScanResult ( scanResult ) ; if ( this . typeSignature != null ) { this . typeSignature . setScanResult ( scanResult ) ; } if ( this . typeDescriptor != null ) { this . typeDescriptor . setScanResult ( scanResult ) ; } if ( this . annotationInfo != null ) { for ( final AnnotationInfo ai : this . annotationInf... |
public class Datatype_Builder { /** * Sets the value to be returned by { @ link Datatype # getType ( ) } .
* @ return this { @ code Builder } object
* @ throws NullPointerException if { @ code type } is null */
public Datatype . Builder setType ( TypeClass type ) { } } | this . type = Objects . requireNonNull ( type ) ; _unsetProperties . remove ( Property . TYPE ) ; return ( Datatype . Builder ) this ; |
public class CassandraClientBase { /** * Executes Update / Delete CQL query .
* @ param cqlQuery
* the cql query
* @ return the int */
public int executeUpdateDeleteQuery ( String cqlQuery ) { } } | if ( log . isDebugEnabled ( ) ) { log . debug ( "Executing cql query {}." , cqlQuery ) ; } try { CqlResult result = ( CqlResult ) executeCQLQuery ( cqlQuery , true ) ; return result . getNum ( ) ; } catch ( Exception e ) { log . error ( "Error while executing updated query: {}, Caused by: . " , cqlQuery , e ) ; return ... |
public class FuncCount { /** * 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... | // DTMIterator nl = m _ arg0 . asIterator ( xctxt , xctxt . getCurrentNode ( ) ) ;
// / / We should probably make a function on the iterator for this ,
// / / as a given implementation could optimize .
// int i = 0;
// while ( DTM . NULL ! = nl . nextNode ( ) )
// nl . detach ( ) ;
DTMIterator nl = m_arg0 . asIterator ... |
public class UriEscape { /** * Perform am URI path segment < strong > escape < / strong > operation
* on a < tt > String < / tt > input .
* The following are the only allowed chars in an URI path segment ( will not be escaped ) :
* < ul >
* < li > < tt > A - Z a - z 0-9 < / tt > < / li >
* < li > < tt > - . _... | if ( encoding == null ) { throw new IllegalArgumentException ( "Argument 'encoding' cannot be null" ) ; } return UriEscapeUtil . escape ( text , UriEscapeUtil . UriEscapeType . PATH_SEGMENT , encoding ) ; |
public class RedmineManager { /** * deletes a new { @ link Version } from the { @ link Project } contained . < br / >
* @ param version the { @ link Version } .
* @ throws RedmineAuthenticationException thrown in case something went wrong while trying to login
* @ throws RedmineException thrown in case something ... | transport . deleteObject ( Version . class , Integer . toString ( version . getId ( ) ) ) ; |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EEnum getIfcBeamTypeEnum ( ) { } } | if ( ifcBeamTypeEnumEEnum == null ) { ifcBeamTypeEnumEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 784 ) ; } return ifcBeamTypeEnumEEnum ; |
public class GetRateCardsByStatement { /** * Runs the example .
* @ param adManagerServices the services factory .
* @ param session the session .
* @ throws ApiException if the API request failed with one or more service errors .
* @ throws RemoteException if the API request failed due to other errors . */
pub... | // Get the RateCardService .
RateCardServiceInterface rateCardService = adManagerServices . get ( session , RateCardServiceInterface . class ) ; // Create a statement to get all rate cards using USD as currency .
StatementBuilder statementBuilder = new StatementBuilder ( ) . where ( "currencyCode = 'USD'" ) . orderBy (... |
public class ClassDescriptorDef { /** * Returns an iterator of all direct and indirect extents of this class .
* @ return The extents iterator */
public Iterator getAllExtentClasses ( ) { } } | ArrayList subTypes = new ArrayList ( ) ; subTypes . addAll ( _extents ) ; for ( int idx = 0 ; idx < subTypes . size ( ) ; idx ++ ) { ClassDescriptorDef curClassDef = ( ClassDescriptorDef ) subTypes . get ( idx ) ; for ( Iterator it = curClassDef . getExtentClasses ( ) ; it . hasNext ( ) ; ) { ClassDescriptorDef curSubT... |
public class TypefaceHelper { /** * Return spannable string with typeface in certain style
* see : http : / / stackoverflow . com / questions / 8607707 / how - to - set - a - custom - font - in - the - actionbar - title
* @ param context to obtain string resource
* @ param strResId string resource id , content
... | return typeface ( context . getString ( strResId ) , collection , style ) ; |
public class DateTime { /** * Returns a copy of this datetime minus the specified number of months .
* The calculation will do its best to only change the month field
* retaining the same day of month .
* However , in certain circumstances , it may be necessary to alter
* smaller fields . For example , 2007-05-... | if ( months == 0 ) { return this ; } long instant = getChronology ( ) . months ( ) . subtract ( getMillis ( ) , months ) ; return withMillis ( instant ) ; |
public class UploadMediaBundle { /** * Runs the example .
* @ param adWordsServices the services factory .
* @ param session the session .
* @ throws ApiException if the API request failed with one or more service errors .
* @ throws RemoteException if the API request failed due to other errors .
* @ throws I... | // Get the MediaService .
MediaServiceInterface mediaService = adWordsServices . get ( session , MediaServiceInterface . class ) ; // Create HTML5 media .
byte [ ] html5Zip = com . google . api . ads . common . lib . utils . Media . getMediaDataFromUrl ( "https://goo.gl/9Y7qI2" ) ; // Create a media bundle containing t... |
public class MultiVertexGeometryImpl { /** * Checked vs . Jan 11 , 2011 */
public void setXY ( int index , double x , double y ) { } } | if ( index < 0 || index >= m_pointCount ) // TODO exc
throw new IndexOutOfBoundsException ( ) ; _verifyAllStreams ( ) ; // AttributeStreamOfDbl v = ( AttributeStreamOfDbl )
// m _ vertexAttributes [ 0 ] ;
// TODO ask sergey about casts
AttributeStreamOfDbl v = ( AttributeStreamOfDbl ) m_vertexAttributes [ 0 ] ; v . wri... |
public class JSONArray { /** * Append a double value . This increases the array ' s length by one .
* @ param value
* A double value .
* @ throws JSONException
* if the value is not finite .
* @ return this . */
public JSONArray put ( double value ) throws JSONException { } } | Double d = new Double ( value ) ; JSONObject . testValidity ( d ) ; this . put ( d ) ; return this ; |
public class Journal { /** * Return an iterable to replay the journal by going through all records
* locations .
* @ return
* @ throws IOException
* @ throws ClosedJournalException
* @ throws CompactedDataFileException */
public Iterable < Location > redo ( ) throws ClosedJournalException , CompactedDataFileE... | Entry < Integer , DataFile > firstEntry = dataFiles . firstEntry ( ) ; if ( firstEntry == null ) { return new Redo ( null ) ; } return new Redo ( goToFirstLocation ( firstEntry . getValue ( ) , Location . USER_RECORD_TYPE , true ) ) ; |
public class WindowsJNIFaxClientSpi { /** * This function will cancel an existing fax job .
* @ param serverName
* The fax server name
* @ param faxJobID
* The fax job ID */
private void winCancelFaxJob ( String serverName , int faxJobID ) { } } | synchronized ( WindowsFaxClientSpiHelper . NATIVE_LOCK ) { // pre native call
this . preNativeCall ( ) ; // invoke native
WindowsJNIFaxClientSpi . cancelFaxJobNative ( serverName , faxJobID ) ; } |
public class UnlimitedConcurrentCache { /** * Replying on the ConcurrentHashMap thread - safe iteration implementation the method will remove all entries holding
* SoftReferences to gc - evicted objects . */
@ Override public void cleanUpNullReferences ( ) { } } | for ( Map . Entry < K , V > entry : map . entrySet ( ) ) { Object entryVal = entry . getValue ( ) ; if ( entryVal instanceof SoftReference && ( ( SoftReference ) entryVal ) . get ( ) == null ) { map . remove ( entry . getKey ( ) , entryVal ) ; } } |
public class FullDuplexHttpService { /** * This is where we receive inputs from the client . */
public synchronized void upload ( StaplerRequest req , StaplerResponse rsp ) throws InterruptedException , IOException { } } | rsp . setStatus ( HttpServletResponse . SC_OK ) ; InputStream in = req . getInputStream ( ) ; if ( DIY_CHUNKING ) { in = new ChunkedInputStream ( in ) ; } // publish the upload channel
upload = in ; LOGGER . log ( Level . FINE , "Recording upload stream {0} for {1}: {2}" , new Object [ ] { upload , uuid , this } ) ; no... |
public class RegistryService { private boolean imageRequiresPull ( boolean hasImage , ImagePullPolicy pullPolicy , String imageName ) throws MojoExecutionException { } } | // The logic here is like this ( see also # 96 ) :
// otherwise : don ' t pull
if ( pullPolicy == ImagePullPolicy . Never ) { if ( ! hasImage ) { throw new MojoExecutionException ( String . format ( "No image '%s' found and pull policy 'Never' is set. Please chose another pull policy or pull the image yourself)" , imag... |
public class SqlTask { /** * this is a separate method to ensure that the ` this ` reference is not leaked during construction */
private void initialize ( Function < SqlTask , ? > onDone , CounterStat failedTasks ) { } } | requireNonNull ( onDone , "onDone is null" ) ; requireNonNull ( failedTasks , "failedTasks is null" ) ; taskStateMachine . addStateChangeListener ( new StateChangeListener < TaskState > ( ) { @ Override public void stateChanged ( TaskState newState ) { if ( ! newState . isDone ( ) ) { return ; } // Update failed tasks ... |
public class KryoInitializer { /** * See { @ link KryoSerializer # registerSerializableClass ( Class , Serializer ) } .
* @ param clazz see { @ link KryoSerializer # registerSerializableClass ( Class , Serializer ) } .
* @ param serializer see { @ link KryoSerializer # registerSerializableClass ( Class , Serializer... | synchronized ( customSerializers ) { customSerializers . add ( new CustomSerializers < > ( clazz , serializer ) ) ; } |
public class PortFile { /** * Unlock the port file . */
public void unlock ( ) throws IOException { } } | if ( lock == null ) { return ; } lock . release ( ) ; lock = null ; lockSem . release ( ) ; |
public class XPointerEngine { /** * Setting the base uri for the pointer resolution
* The base uri is used for xml : base calculations
* @ param baseURI of the parent xml
* @ return the XPointerEngine for fluent api usage */
public XPointerEngine setBaseURI ( final String baseURI ) { } } | if ( baseURI == null ) { this . baseURIValue = XdmEmptySequence . getInstance ( ) ; } else { this . baseURIValue = new XdmAtomicValue ( baseURI ) ; } return this ; |
public class CassandraStorage { /** * define the schema */
public ResourceSchema getSchema ( String location , Job job ) throws IOException { } } | setLocation ( location , job ) ; CfInfo cfInfo = getCfInfo ( loadSignature ) ; CfDef cfDef = cfInfo . cfDef ; if ( cfDef . column_type . equals ( "Super" ) ) return null ; /* Our returned schema should look like this :
( key , index1 : ( name , value ) , index2 : ( name , value ) , columns : { ( name , value ) } )
... |
public class AbstractSliding { /** * Returns new oldLen ring buffer
* @ param old
* @ param oldLen
* @ param arr
* @ return */
protected Object newArray ( Object old , int oldLen , Object arr ) { } } | int sb = Math . floorMod ( begin , oldLen ) ; int se = Math . floorMod ( end , oldLen ) ; if ( sb < se ) { System . arraycopy ( old , sb , arr , sb , se - sb ) ; } else { System . arraycopy ( old , sb , arr , sb , oldLen - sb ) ; System . arraycopy ( old , 0 , arr , 0 , se ) ; } return arr ; |
public class RegexUtils { /** * Returns true if the string matches ( full match ) any of the specified regexes .
* @ param str the string to match
* @ param regexes the regexes used for matching
* @ return true if the string matches ( full match ) one or more of the regexes */
public static boolean matchesAny ( S... | return matchesAny ( str , regexes , true ) ; |
public class EasyBind { /** * Creates a thin wrapper around an observable value to make it monadic .
* @ param o ObservableValue to wrap
* @ return { @ code o } if { @ code o } is already monadic , or a thin monadic
* wrapper around { @ code o } otherwise . */
public static < T > MonadicObservableValue < T > mona... | if ( o instanceof MonadicObservableValue ) { return ( MonadicObservableValue < T > ) o ; } else { return new MonadicWrapper < > ( o ) ; } |
public class AttributeHelper { /** * Set value with an object on Attribute
* @ param value
* the value to set on Attribute of JServer , possibles Class :
* Short , String , Long , Float , Boolean , Integer , Double ,
* DevState .
* @ param attribute
* the attribute to set
* @ throws DevFailed */
public st... | try { if ( value instanceof Short ) { attribute . set_value ( ( ( Short ) value ) . shortValue ( ) ) ; } else if ( value instanceof Byte ) { attribute . set_value ( ( ( Byte ) value ) . shortValue ( ) ) ; } else if ( value instanceof String ) { attribute . set_value ( ( String ) value ) ; } else if ( value instanceof I... |
public class WebServiceConnector { /** * { @ inheritDoc }
* @ param oclass
* @ param options
* @ return */
@ Override public FilterTranslator < Operand > createFilterTranslator ( final ObjectClass oclass , final OperationOptions options ) { } } | if ( oclass == null || ( ! oclass . equals ( ObjectClass . ACCOUNT ) ) ) { throw new IllegalArgumentException ( "Invalid objectclass" ) ; } return new WebServiceFilterTranslator ( ) ; |
public class LicenseClient { /** * Gets the access control policy for a resource . May be empty if no such policy or resource
* exists .
* < p > Sample code :
* < pre > < code >
* try ( LicenseClient licenseClient = LicenseClient . create ( ) ) {
* ProjectGlobalLicenseResourceName resource = ProjectGlobalLice... | GetIamPolicyLicenseHttpRequest request = GetIamPolicyLicenseHttpRequest . newBuilder ( ) . setResource ( resource == null ? null : resource . toString ( ) ) . build ( ) ; return getIamPolicyLicense ( request ) ; |
public class JDBCResultSet { /** * < ! - - start generic documentation - - >
* Updates the designated column with a < code > java . sql . Timestamp < / code >
* value .
* The updater methods are used to update column values in the
* current row or the insert row . The updater methods do not
* update the under... | updateTimestamp ( findColumn ( columnLabel ) , x ) ; |
public class ConfigurableEmitter { /** * Check if this emitter has completed it ' s cycle
* @ return True if the emitter has completed it ' s cycle */
public boolean completed ( ) { } } | if ( engine == null ) { return false ; } if ( length . isEnabled ( ) ) { if ( timeout > 0 ) { return false ; } return completed ; } if ( emitCount . isEnabled ( ) ) { if ( leftToEmit > 0 ) { return false ; } return completed ; } if ( wrapUp ) { return completed ; } return false ; |
public class RequestsTracker { /** * Clones this tracker and zeroizes out it afterwards if the ' reset ' is
* true .
* @ param reset
* zero out this tracker
* @ return clone of this tracker */
public synchronized RequestsTracker snapshot ( boolean reset ) { } } | long t = executing . getCount ( ) ; long r = rejected . getCount ( ) ; long f = failed . getCount ( ) ; TimeCounter c = counter . snapshot ( reset ) ; IntervalHistogram h = histogram . snapshot ( reset ) ; if ( reset ) { executing . reset ( ) ; rejected . reset ( ) ; failed . reset ( ) ; succeeded . reset ( ) ; } retur... |
public class SegmentAggregator { /** * Attempts to reconcile the attributes for a given operation . There is no verification done ; this operation simply
* re - writes all the attributes to the index , which is much more efficient than trying to read the values from the
* index and then comparing them .
* @ param... | // This operation must have previously succeeded if any of the following are true :
// - If the Attribute Index is sealed , and so is our Segment .
// - If the Attribute Index does not exist ( deleted ) , and our Segment is deleted or a merged Transaction .
return handleAttributeException ( this . dataSource . persistA... |
public class ReadOperationHandler { /** * / * ( non - Javadoc )
* @ see org . jboss . as . cli . OperationCommand # buildRequest ( org . jboss . as . cli . CommandContext ) */
@ Override public ModelNode buildRequestWithoutHeaders ( CommandContext ctx ) throws CommandFormatException { } } | final ParsedCommandLine parsedCmd = ctx . getParsedCommandLine ( ) ; final String name = this . name . getValue ( parsedCmd ) ; if ( name == null || name . isEmpty ( ) ) { final OperationRequestAddress address = getAddress ( ctx ) ; final ModelNode request = Util . buildRequest ( ctx , address , Util . READ_OPERATION_N... |
public class CollectionUtils { /** * Partitions a list into the specified number of partitions as evenly as is possible . The final
* " extra " elements that cannot be evenly distributed are distributed starting with the first
* partitions . For example , three partitions of ( 1 , 2 , 3 , 4 ) results in ( ( 1 , 4 )... | checkNotNull ( list ) ; checkArgument ( partitions > 0 , "Number of partitions must be positive" ) ; checkArgument ( partitions <= list . size ( ) , "Cannot request more partitions than there are list items" ) ; // Divide into partitions , with the remainder falling into the extra partitions
final List < List < E > > p... |
public class Solo { /** * Scrolls a ListView matching the specified index to the top .
* @ param index the index of the { @ link ListView } to scroll . { @ code 0 } if only one list is available
* @ return { @ code true } if more scrolling can be performed */
public boolean scrollListToTop ( int index ) { } } | if ( config . commandLogging ) { Log . d ( config . commandLoggingTag , "scrollListToTop(" + index + ")" ) ; } return scroller . scrollList ( waiter . waitForAndGetView ( index , ListView . class ) , Scroller . UP , true ) ; |
public class CollectionUtil { /** * < p > toPrimitiveLongArray . < / p >
* @ param values a { @ link java . util . List } object .
* @ return a { @ link java . lang . Object } object . */
public static Object toPrimitiveLongArray ( List < ? > values ) { } } | long [ ] array = new long [ values . size ( ) ] ; int cursor = 0 ; for ( Object o : values ) { array [ cursor ] = ( Long ) o ; cursor ++ ; } return array ; |
public class ModifyColumnFamiliesRequest { /** * Configures the name and GcRule of the new ColumnFamily to be created
* @ param familyId
* @ param gcRule
* @ return */
public ModifyColumnFamiliesRequest addFamily ( String familyId , GCRule gcRule ) { } } | Preconditions . checkNotNull ( gcRule ) ; Modification . Builder modification = Modification . newBuilder ( ) . setId ( familyId ) ; modification . getCreateBuilder ( ) . setGcRule ( gcRule . toProto ( ) ) ; modFamilyRequest . addModifications ( modification . build ( ) ) ; return this ; |
public class CmsExtendedWorkflowManager { /** * Helper method to check whether a project exists . < p >
* @ param projectName the project name
* @ return true if the project exists */
protected boolean existsProject ( String projectName ) { } } | try { m_adminCms . readProject ( projectName ) ; return true ; } catch ( CmsException e ) { return false ; } |
public class SOD { /** * Compute the per - dimension variances for the given neighborhood and center .
* @ param relation Data relation
* @ param center Center vector
* @ param neighborhood Neighbors
* @ return Per - dimension variances . */
private static double [ ] computePerDimensionVariances ( Relation < ? ... | final int dim = center . length ; double [ ] variances = new double [ dim ] ; for ( DBIDIter iter = neighborhood . iter ( ) ; iter . valid ( ) ; iter . advance ( ) ) { NumberVector databaseObject = relation . get ( iter ) ; for ( int d = 0 ; d < dim ; d ++ ) { final double deviation = databaseObject . doubleValue ( d )... |
public class BitmapUtil { /** * Calculates the sample size , which should be used to downsample an image to a maximum width
* and height .
* @ param imageDimensions
* A pair , which contains the width and height of the image , which should be
* downsampled , as an instance of the class Pair . The pair may not b... | Condition . INSTANCE . ensureNotNull ( imageDimensions , "The image dimensions may not be null" ) ; Condition . INSTANCE . ensureAtLeast ( maxWidth , 1 , "The maximum width must be at least 1" ) ; Condition . INSTANCE . ensureAtLeast ( maxHeight , 1 , "The maximum height must be at least 1" ) ; int width = imageDimensi... |
public class CreateTypeRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( CreateTypeRequest createTypeRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( createTypeRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( createTypeRequest . getApiId ( ) , APIID_BINDING ) ; protocolMarshaller . marshall ( createTypeRequest . getDefinition ( ) , DEFINITION_BINDING ) ; protocolMarshaller ... |
public class ReceivedMessageRequestInfo { /** * / * ( non - Javadoc )
* @ see com . ibm . ws . sib . processor . runtime . AbstractControllable # dereferenceControllable ( ) */
public void dereferenceControllable ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "dereferenceControllable" ) ; _issueTime = 0 ; _timeout = 0 ; _selectionCriterias = null ; _ackingDME = 0 ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "dereferenceControlla... |
public class RedisClusterClient { /** * Create a connection to a redis socket address .
* @ param codec Use this codec to encode / decode keys and values , must not be { @ literal null }
* @ param nodeId the nodeId
* @ param clusterWriter global cluster writer
* @ param socketAddressSupplier supplier for the so... | assertNotNull ( codec ) ; assertNotEmpty ( initialUris ) ; LettuceAssert . notNull ( socketAddressSupplier , "SocketAddressSupplier must not be null" ) ; ClusterNodeEndpoint endpoint = new ClusterNodeEndpoint ( clientOptions , getResources ( ) , clusterWriter ) ; RedisChannelWriter writer = endpoint ; if ( CommandExpir... |
public class CFEndPointSerializer { /** * Determine the type of the Object passed in and add the XML format
* for the result .
* @ param type
* @ param name
* @ param o
* @ return StringBuilder */
static private StringBuilder determineType ( String name , Object o ) { } } | String value = null ; if ( o instanceof String || o instanceof StringBuffer || o instanceof java . nio . CharBuffer || o instanceof Integer || o instanceof Long || o instanceof Byte || o instanceof Double || o instanceof Float || o instanceof Short || o instanceof BigInteger || o instanceof java . math . BigDecimal ) {... |
public class Distance { /** * Gets the Correlation distance between two points .
* @ param p A point in space .
* @ param q A point in space .
* @ return The Correlation distance between x and y . */
public static double Correlation ( double [ ] p , double [ ] q ) { } } | double x = 0 ; double y = 0 ; for ( int i = 0 ; i < p . length ; i ++ ) { x += - p [ i ] ; y += - q [ i ] ; } x /= p . length ; y /= q . length ; double num = 0 ; double den1 = 0 ; double den2 = 0 ; for ( int i = 0 ; i < p . length ; i ++ ) { num += ( p [ i ] + x ) * ( q [ i ] + y ) ; den1 += Math . abs ( Math . pow ( ... |
public class GzipOutputHandler { /** * Create the output bytebuffer based on the output compressed storage .
* @ param len
* @ return WsByteBuffer */
private WsByteBuffer makeBuffer ( int len ) { } } | WsByteBuffer buffer = HttpDispatcher . getBufferManager ( ) . allocateDirect ( len ) ; buffer . put ( this . buf , 0 , len ) ; buffer . flip ( ) ; return buffer ; |
public class AvatarStorageSetup { /** * Shared image needs to be in file storage , or QJM providing that QJM also
* stores edits . */
private static String checkImageStorage ( URI sharedImage , URI sharedEdits ) { } } | if ( sharedImage . getScheme ( ) . equals ( NNStorage . LOCAL_URI_SCHEME ) ) { // shared image is stored in file storage
return "" ; } else if ( sharedImage . getScheme ( ) . equals ( QuorumJournalManager . QJM_URI_SCHEME ) && sharedImage . equals ( sharedEdits ) ) { // image is stored in qjm together with edits
return... |
public class AstyanaxTableDAO { /** * MaintenanceDAO */
@ Override public Iterator < Map . Entry < String , MaintenanceOp > > listMaintenanceOps ( ) { } } | final Iterator < Map < String , Object > > tableIter = _backingStore . scan ( _systemTable , null , LimitCounter . max ( ) , ReadConsistency . STRONG ) ; return new AbstractIterator < Map . Entry < String , MaintenanceOp > > ( ) { @ Override protected Map . Entry < String , MaintenanceOp > computeNext ( ) { while ( tab... |
public class PathsDocumentExtension { /** * Returns title level offset from 1 to apply to content
* @ param context context
* @ return title level offset */
protected int levelOffset ( Context context ) { } } | // TODO : Unused method , make sure this is never used and then remove it .
int levelOffset ; switch ( context . position ) { case DOCUMENT_BEFORE : case DOCUMENT_AFTER : levelOffset = 0 ; break ; case DOCUMENT_BEGIN : case DOCUMENT_END : case OPERATION_BEFORE : case OPERATION_AFTER : levelOffset = 1 ; break ; case OPE... |
public class ExactQPathEntryFilter { /** * { @ inheritDoc } */
public boolean accept ( ItemData item ) { } } | QPathEntry itemEntry = item . getQPath ( ) . getEntries ( ) [ item . getQPath ( ) . getDepth ( ) ] ; return entry . equals ( itemEntry ) ; |
public class FrequencyCap { /** * Sets the timeUnit value for this FrequencyCap .
* @ param timeUnit * The unit of time for specifying the time period . */
public void setTimeUnit ( com . google . api . ads . admanager . axis . v201808 . TimeUnit timeUnit ) { } } | this . timeUnit = timeUnit ; |
public class JobInProgressTraits { /** * Return a vector of setup TaskInProgress objects */
public Vector < TaskInProgress > reportSetupTIPs ( boolean shouldBeComplete ) { } } | Vector < TaskInProgress > results = new Vector < TaskInProgress > ( ) ; for ( int i = 0 ; i < setup . length ; i ++ ) { if ( setup [ i ] . isComplete ( ) == shouldBeComplete ) { results . add ( setup [ i ] ) ; } } return results ; |
public class XForLoopExpressionImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case XbasePackage . XFOR_LOOP_EXPRESSION__FOR_EXPRESSION : return getForExpression ( ) ; case XbasePackage . XFOR_LOOP_EXPRESSION__EACH_EXPRESSION : return getEachExpression ( ) ; case XbasePackage . XFOR_LOOP_EXPRESSION__DECLARED_PARAM : return getDeclaredParam ( ) ; } return super . eGet ( feat... |
public class PageFlowRequestProcessor { /** * An opportunity to process a page forward in a different way than performing a server forward . The default
* implementation looks for a file on classpath called
* META - INF / pageflow - page - servlets / < i > path - to - page < / i > . properties ( e . g . ,
* " / M... | Class pageServletClass = ( Class ) _pageServletClasses . get ( pagePath ) ; if ( pageServletClass == null ) { pageServletClass = Void . class ; ClassLoader cl = DiscoveryUtils . getClassLoader ( ) ; String path = "META-INF/pageflow-page-servlets" + pagePath + ".properties" ; InputStream in = cl . getResourceAsStream ( ... |
public class ExceptionDestinationHandlerImpl { /** * This method contains the routine used to handle an undeliverable message . The
* method examines the attributes of a message to determine what to do with it .
* It is possible for a message to be discarded , blocked , or sent to an exception
* destination .
*... | // F001333-14610
// Delegate down onto the new method passing a null
// subscription ID .
return handleUndeliverableMessage ( message , tran , exceptionReason , exceptionStrings , null ) ; |
public class ObjectAreaSizeImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } } | switch ( featureID ) { case AfplibPackage . OBJECT_AREA_SIZE__SIZE_TYPE : return getSizeType ( ) ; case AfplibPackage . OBJECT_AREA_SIZE__XOA_SIZE : return getXoaSize ( ) ; case AfplibPackage . OBJECT_AREA_SIZE__YOA_SIZE : return getYoaSize ( ) ; } return super . eGet ( featureID , resolve , coreType ) ; |
public class GetAllImagesAndVideos { /** * Runs the example .
* @ param adWordsServices the services factory .
* @ param session the session .
* @ throws ApiException if the API request failed with one or more service errors .
* @ throws RemoteException if the API request failed due to other errors . */
public ... | // Get the MediaService .
MediaServiceInterface mediaService = adWordsServices . get ( session , MediaServiceInterface . class ) ; int offset = 0 ; // Create selector .
SelectorBuilder builder = new SelectorBuilder ( ) ; Selector selector = builder . fields ( MediaField . MediaId , MediaField . Width , MediaField . Hei... |
public class AggregateVocab { /** * Returns a vocabulary composed of the union of the vocabularies given as
* parameter . The given vocabularies must have the same base URI .
* @ param vocabs
* the vocabularies to aggregate .
* @ return the aggregated vocabulary . */
public static Vocab of ( Vocab ... vocabs ) ... | return new AggregateVocab ( new ImmutableList . Builder < Vocab > ( ) . add ( vocabs ) . build ( ) ) ; |
public class WebcamLock { /** * Lock webcam . */
public void lock ( ) { } } | if ( disabled . get ( ) ) { return ; } if ( isLocked ( ) ) { throw new WebcamLockException ( String . format ( "Webcam %s has already been locked" , webcam . getName ( ) ) ) ; } if ( ! locked . compareAndSet ( false , true ) ) { return ; } LOG . debug ( "Lock {}" , webcam ) ; update ( ) ; updater = new LockUpdater ( ) ... |
public class TCPMasterConnection { /** * Opens this < tt > TCPMasterConnection < / tt > .
* @ param useRtuOverTcp True if the RTU protocol should be used over TCP
* @ throws Exception if there is a network failure . */
public void connect ( boolean useRtuOverTcp ) throws Exception { } } | if ( ! isConnected ( ) ) { logger . debug ( "connect()" ) ; // Create a socket without auto - connecting
socket = new Socket ( ) ; socket . setReuseAddress ( true ) ; socket . setSoLinger ( true , 1 ) ; socket . setKeepAlive ( true ) ; setTimeout ( timeout ) ; // Connect - only wait for the timeout number of millisecon... |
public class RelaxNGDefaultsComponent { /** * Check and add defaults
* @ param name The element name
* @ param atts The attributes */
private void checkAndAddDefaults ( QName name , XMLAttributes atts ) { } } | List < RelaxNGDefaultValues . Attribute > def = defaults . getDefaultAttributes ( name . localpart , name . uri ) ; if ( def != null ) { for ( RelaxNGDefaultValues . Attribute a : def ) { // EXM - 24143 it is possible that the namespace of the default attribute is empty
// and the namespace of the attribute declared in... |
public class DbgpXmlEntityParser { /** * $ NON - NLS - 1 $ */
protected static String getEncodedValue ( Element element ) { } } | String encoding = ENCODING_NONE ; if ( element . hasAttribute ( ATTR_ENCODING ) ) { encoding = element . getAttribute ( ATTR_ENCODING ) ; } if ( ENCODING_NONE . equals ( encoding ) ) { return parseContent ( element ) ; } if ( ENCODING_BASE64 . equals ( encoding ) ) { return parseBase64Content ( element ) ; } throw new ... |
public class FileCopier { /** * 执行拷贝 < br >
* 拷贝规则为 :
* < pre >
* 1 、 源为文件 , 目标为已存在目录 , 则拷贝到目录下 , 文件名不变
* 2 、 源为文件 , 目标为不存在路径 , 则目标以文件对待 ( 自动创建父级目录 ) 比如 : / dest / aaa , 如果aaa不存在 , 则aaa被当作文件名
* 3 、 源为文件 , 目标是一个已存在的文件 , 则当 { @ link # setOverride ( boolean ) } 设为true时会被覆盖 , 默认不覆盖
* 4 、 源为目录 , 目标为已存在目录 , 当 { @... | final File src = this . src ; final File dest = this . dest ; // check
Assert . notNull ( src , "Source File is null !" ) ; if ( false == src . exists ( ) ) { throw new IORuntimeException ( "File not exist: " + src ) ; } Assert . notNull ( dest , "Destination File or directiory is null !" ) ; if ( FileUtil . equals ( s... |
public class MOEA { /** * Collector of { @ link Phenotype } objects , who ' s ( multi - objective ) fitness
* value is part of the < a href = " https : / / en . wikipedia . org / wiki / Pareto _ efficiency " >
* pareto front < / a > .
* @ param size the allowed size range of the returned pareto set . If the
* s... | return toParetoSet ( size , Vec < T > :: dominance , Vec < T > :: compare , Vec < T > :: distance , Vec < T > :: length ) ; |
public class InternalXtextParser { /** * InternalXtext . g : 2627:1 : entryRuleCrossReference returns [ EObject current = null ] : iv _ ruleCrossReference = ruleCrossReference EOF ; */
public final EObject entryRuleCrossReference ( ) throws RecognitionException { } } | EObject current = null ; EObject iv_ruleCrossReference = null ; try { // InternalXtext . g : 2627:55 : ( iv _ ruleCrossReference = ruleCrossReference EOF )
// InternalXtext . g : 2628:2 : iv _ ruleCrossReference = ruleCrossReference EOF
{ newCompositeNode ( grammarAccess . getCrossReferenceRule ( ) ) ; pushFollow ( Fol... |
public class FilenameUtil { /** * Splits a string into a number of tokens .
* The text is split by ' ? ' and ' * ' .
* Where multiple ' * ' occur consecutively they are collapsed into a single ' * ' .
* @ param text the text to split
* @ return the array of tokens , never null */
static String [ ] splitOnTokens... | // used by wildcardMatch
// package level so a unit test may run on this
if ( text . indexOf ( '?' ) == NOT_FOUND && text . indexOf ( '*' ) == NOT_FOUND ) { return new String [ ] { text } ; } final char [ ] array = text . toCharArray ( ) ; final ArrayList < String > list = new ArrayList < String > ( ) ; final StringBui... |
public class Predictor { /** * The METHOD command defines the analysis task to be performed for a
* particular system configuration .
* @ param method
* @ return */
public Predictor method ( int method , int startPage ) { } } | input . add ( new CommandLine < > ( METHOD , 5 , method , startPage ) ) ; return this ; |
public class StringFunctions { /** * Returned expression results in a split of the string into an array of substrings separated by sep . */
public static Expression split ( Expression expression , String sep ) { } } | return x ( "SPLIT(" + expression . toString ( ) + ", \"" + sep + "\")" ) ; |
public class HadoopCompatLoader { /** * TODO add threadsafe caching that is aware of the string argument and instantiates a compat for each argument at most once ( assuming the instantiation succeeds ) */
public static HadoopCompat getCompat ( ) { } } | String ver = VersionInfo . getVersion ( ) ; log . debug ( "Read Hadoop VersionInfo string {}" , ver ) ; final String pkgName = HadoopCompatLoader . class . getPackage ( ) . getName ( ) ; final String className ; if ( ver . startsWith ( "1." ) ) { className = pkgName + ".h1.Hadoop1Compat" ; } else { className = pkgName ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.