signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class HttpSerializer { /** * Format the list of implemented aggregators
* @ param aggregators The list of aggregation functions
* @ return A ChannelBuffer object to pass on to the caller
* @ throws BadRequestException if the plugin has not implemented this method */
public ChannelBuffer formatAggregatorsV1... | throw new BadRequestException ( HttpResponseStatus . NOT_IMPLEMENTED , "The requested API endpoint has not been implemented" , this . getClass ( ) . getCanonicalName ( ) + " has not implemented formatAggregatorsV1" ) ; |
public class SystemPropertyUtils { /** * Search the System properties and environment variables for a value with the
* provided key . Environment variables in { @ code UPPER _ CASE } style are allowed where
* System properties would normally be { @ code lower . case } .
* @ param key the key to resolve
* @ para... | try { String propVal = System . getProperty ( key ) ; if ( propVal == null ) { // Fall back to searching the system environment .
propVal = System . getenv ( key ) ; } if ( propVal == null ) { // Try with underscores .
String name = key . replace ( '.' , '_' ) ; propVal = System . getenv ( name ) ; } if ( propVal == nu... |
public class RestService { /** * For audit logging . */
protected UserAction getUserAction ( User user , String path , Object content , Map < String , String > headers ) { } } | Action action = getAction ( path , content , headers ) ; Entity entity = getEntity ( path , content , headers ) ; Long entityId = getEntityId ( path , content , headers ) ; String descrip = getEntityDescription ( path , content , headers ) ; if ( descrip . length ( ) > 1000 ) descrip = descrip . substring ( 0 , 999 ) ;... |
public class LegacySpy { /** * Alias for { @ link # expectBetween ( int , int , Threads , Query ) } with arguments 0 , 1 , { @ code threads } , { @ code queryType }
* @ since 2.2 */
@ Deprecated public C expectAtMostOnce ( Threads threadMatcher , Query query ) { } } | return expect ( SqlQueries . atMostOneQuery ( ) . threads ( threadMatcher ) . type ( adapter ( query ) ) ) ; |
public class KuznechikCipher { /** * Converting binary representation of a key to internal format
* @ param key raw key
* @ return key in internal format */
static KuzIntKey convertKey ( byte [ ] key ) { } } | if ( key . length != 32 ) { throw new RuntimeException ( "Key might be 32 bytes length" ) ; } KuzIntKey kuz = new KuzIntKey ( ) ; // w128 _ t c , x , y , z ;
Kuz128 c = new Kuz128 ( ) , x = new Kuz128 ( ) , y = new Kuz128 ( ) , z = new Kuz128 ( ) ; for ( int i = 0 ; i < 16 ; i ++ ) { // this will be have to changed for... |
public class KvResponseBase { /** * Get a single , resolved object from this response .
* The values will be converted to the supplied class using the
* { @ link com . basho . riak . client . api . convert . Converter } returned from the { @ link com . basho . riak . client . api . convert . ConverterFactory } .
... | Converter < T > converter = ConverterFactory . getInstance ( ) . getConverter ( clazz ) ; List < T > convertedValues = convertValues ( converter ) ; ConflictResolver < T > resolver = ConflictResolverFactory . getInstance ( ) . getConflictResolver ( clazz ) ; T resolved = resolver . resolve ( convertedValues ) ; if ( ha... |
public class SnackBar { /** * Set the text that the ActionButton is to display .
* @ param text If null , then the ActionButton will be hidden .
* @ return This SnackBar for chaining methods . */
public SnackBar actionText ( CharSequence text ) { } } | if ( TextUtils . isEmpty ( text ) ) mAction . setVisibility ( View . INVISIBLE ) ; else { mAction . setVisibility ( View . VISIBLE ) ; mAction . setText ( text ) ; } return this ; |
public class CollatorHelper { /** * Create a collator that is based on the standard collator but sorts spaces
* before dots , because spaces are more important word separators than dots .
* Another example is the correct sorting of things like " 1.1 a " vs . " 1.1.1 b "
* . This is the default collator used for s... | // Ensure to not pass null locale in
final Locale aRealLocale = aLocale == null ? SystemHelper . getSystemLocale ( ) : aLocale ; // Always create a clone !
return ( Collator ) s_aCache . getFromCache ( aRealLocale ) . clone ( ) ; |
public class UnsignedNumeric { /** * Writes an int in a variable - length format . Writes between one and five bytes . Smaller values take fewer bytes .
* Negative numbers are not supported .
* @ param i int to write */
public static void writeUnsignedInt ( ObjectOutput out , int i ) throws IOException { } } | while ( ( i & ~ 0x7F ) != 0 ) { out . writeByte ( ( byte ) ( ( i & 0x7f ) | 0x80 ) ) ; i >>>= 7 ; } out . writeByte ( ( byte ) i ) ; |
public class NvdCveUpdater { /** * Initialize the executor services for download and processing of the NVD
* CVE XML data . */
protected void initializeExecutorServices ( ) { } } | final int downloadPoolSize ; final int max = settings . getInt ( Settings . KEYS . MAX_DOWNLOAD_THREAD_POOL_SIZE , 3 ) ; if ( DOWNLOAD_THREAD_POOL_SIZE > max ) { downloadPoolSize = max ; } else { downloadPoolSize = DOWNLOAD_THREAD_POOL_SIZE ; } downloadExecutorService = Executors . newFixedThreadPool ( downloadPoolSize... |
public class ImageMiscOps { /** * Sets each value in the image to a value drawn from an uniform distribution that has a range of min & le ; X & lt ; max .
* @ param img Image which is to be filled . Modified ,
* @ param rand Random number generator
* @ param min Minimum value of the distribution , inclusive
* @... | float range = max - min ; float [ ] data = img . data ; for ( int y = 0 ; y < img . height ; y ++ ) { int index = img . getStartIndex ( ) + y * img . getStride ( ) ; for ( int x = 0 ; x < img . width ; x ++ ) { data [ index ++ ] = rand . nextFloat ( ) * range + min ; } } |
public class TimerServiceRegistry { /** * Registers timerServie under given id . In case timer service is already registered
* with this id it will be overridden .
* @ param id key used to get hold of the timer service instance
* @ param timerService fully initialized TimerService instance */
public void register... | if ( timerService instanceof GlobalTimerService ) { ( ( GlobalTimerService ) timerService ) . setTimerServiceId ( id ) ; } this . registeredServices . put ( id , timerService ) ; |
public class RequestFactory { /** * Create new Check policies request .
* @ param orgToken WhiteSource organization token .
* @ param userKey user key uniquely identifying the account at white source .
* @ param projects Projects status statement to check .
* @ param product Name or WhiteSource service token of... | return ( CheckPoliciesRequest ) prepareRequest ( new CheckPoliciesRequest ( projects ) , orgToken , requesterEmail , product , productVersion , userKey , false , false , null , null , null , null , null , null ) ; |
public class SimpleModule { /** * Add the given { @ link PagingBehavior } to the module
* @ param pagingBehavior the paging behavior */
public void addPagingBehavior ( PagingBehavior pagingBehavior ) { } } | checkInitialized ( ) ; // avoid adding the same type ( ! ) of behavior twice , error out if that ' s the case
boolean behaviorTypeAdded = pagingBehaviors . stream ( ) . anyMatch ( pbh -> pbh . getClass ( ) . equals ( pagingBehavior . getClass ( ) ) ) ; if ( ! behaviorTypeAdded ) { pagingBehaviors . add ( pagingBehavior... |
public class Logger { /** * Logs the specified message at the WARN level .
* @ param msg the specified message */
public void warn ( final String msg ) { } } | if ( proxy . isWarnEnabled ( ) ) { if ( proxy instanceof LocationAwareLogger ) { ( ( LocationAwareLogger ) proxy ) . log ( null , FQCN , LocationAwareLogger . WARN_INT , msg , null , null ) ; } else { proxy . warn ( msg ) ; } } |
public class CacheMapUtil { /** * retrial all the keys of the cached map
* @ param key cache key
* @ param kClazz the key ' s class
* @ return all the keys of the cached map , or null if the key does not exist */
public static < T > Maybe < Set < T > > keys ( String key , Class < T > kClazz ) { } } | return keys ( CacheService . CACHE_CONFIG_BEAN , key , kClazz ) ; |
public class Closeables { /** * Creates a stream that when closed will also close the underlying spliterator
* @ param spliterator spliterator to back the stream and subsequently close
* @ param parallel whether or not the returned stream is parallel or not
* @ param < E > the type of the stream
* @ return the ... | Stream < E > stream = StreamSupport . stream ( spliterator , parallel ) ; stream . onClose ( spliterator :: close ) ; return stream ; |
public class PerfectHashDictionaryStateCard { /** * Give the Graphviz dot representation of this automaton . States will also list the
* number of suffixes ' under ' that state .
* @ return */
@ Override public String toDot ( ) { } } | StringBuilder dotBuilder = new StringBuilder ( ) ; dotBuilder . append ( "digraph G {\n" ) ; for ( int state = 0 ; state < d_stateOffsets . size ( ) ; ++ state ) { for ( int trans = d_stateOffsets . get ( state ) ; trans < transitionsUpperBound ( state ) ; ++ trans ) dotBuilder . append ( String . format ( "%d -> %d [l... |
public class TimeUnit { /** * 该方法用于更新timeBase使之具有上下文关联性 */
public void modifyTimeBase ( ) { } } | String [ ] time_grid = new String [ 6 ] ; time_grid = timeBaseText . split ( "-" ) ; String s = "" ; if ( _tp . tunit [ 0 ] != - 1 ) { s += Integer . toString ( _tp . tunit [ 0 ] ) ; } else { s += time_grid [ 0 ] ; } for ( int i = 1 ; i < 6 ; i ++ ) { s += "-" ; if ( _tp . tunit [ i ] != - 1 ) { s += Integer . toString... |
public class AWSDirectoryServiceClient { /** * Stops the directory sharing between the directory owner and consumer accounts .
* @ param unshareDirectoryRequest
* @ return Result of the UnshareDirectory operation returned by the service .
* @ throws EntityDoesNotExistException
* The specified entity could not b... | request = beforeClientExecution ( request ) ; return executeUnshareDirectory ( request ) ; |
public class CmsJspDateSeriesBean { /** * Returns the last event of this series . < p >
* In case this is just a single event and not a series , this is identical to the date of the event . < p >
* @ return the last event of this series */
public CmsJspInstanceDateBean getLast ( ) { } } | if ( ( m_lastEvent == null ) && ( m_dates != null ) && ( ! m_dates . isEmpty ( ) ) ) { m_lastEvent = new CmsJspInstanceDateBean ( ( Date ) m_dates . last ( ) . clone ( ) , CmsJspDateSeriesBean . this ) ; } return m_lastEvent ; |
public class JobsImpl { /** * Lists the jobs that have been created under the specified job schedule .
* @ param jobScheduleId The ID of the job schedule from which you want to get a list of jobs .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the PagedList & lt ; CloudJo... | if ( this . client . batchUrl ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.batchUrl() is required and cannot be null." ) ; } if ( jobScheduleId == null ) { throw new IllegalArgumentException ( "Parameter jobScheduleId is required and cannot be null." ) ; } if ( this . client . apiVersion ... |
public class ContextUtils { /** * < p > Takes the generic { @ link Object } of a context and returns
* the actual { @ link Context } instance as a { @ link Fragment } if
* it conforms .
* @ param context
* the { @ link Object } whose { @ link Context } instance is
* to be discovered
* < br > < br >
* @ re... | if ( ContextUtils . isFragment ( context ) ) return Fragment . class . cast ( context ) ; throw new ContextNotFoundException ( context . getClass ( ) , Fragment . class ) ; |
public class ShowUserListMembership { /** * Usage : java twitter4j . examples . list . ShowUserListMembership [ list id ] [ user id ]
* @ param args message */
public static void main ( String [ ] args ) { } } | if ( args . length < 2 ) { System . out . println ( "Usage: java twitter4j.examples.list.ShowUserListMembership [list id] [user id]" ) ; System . exit ( - 1 ) ; } try { Twitter twitter = new TwitterFactory ( ) . getInstance ( ) ; long listId = Long . parseLong ( args [ 0 ] ) ; UserList list = twitter . showUserList ( l... |
public class RawScale2x { /** * Get the scale image data . Note this is the method that does the work
* so it might take some time to process .
* @ return An array of pixels 4 times the size of the input array containing
* the smoothly scaled image */
public int [ ] getScaledData ( ) { } } | for ( int x = 0 ; x < width ; x ++ ) { for ( int y = 0 ; y < height ; y ++ ) { process ( x , y ) ; } } return dstImage ; |
public class Base64 { /** * Decodes a char [ ] containing characters in the Base - N alphabet .
* @ param pArray A byte array containing Base - N character data
* @ param offset offset in the input array where the data starts
* @ param length length of the data , starting at offset in the input array
* @ param ... | if ( pArray == null || pArray . length == 0 ) { return null ; } decodeImpl ( pArray , offset , length , ctx ) ; decodeImpl ( pArray , 0 , EOF , ctx ) ; // Notify decoder of EOF .
return ctx ; |
public class HiveUtils { /** * Selects an appropriate field from the given Hive table schema to insert JSON data into if the feature is enabled
* @ param settings Settings to read schema information from
* @ return A FieldAlias object that projects the json source field into the select destination field */
static S... | Set < String > virtualColumnsToBeRemoved = new HashSet < String > ( HiveConstants . VIRTUAL_COLUMNS . length ) ; Collections . addAll ( virtualColumnsToBeRemoved , HiveConstants . VIRTUAL_COLUMNS ) ; List < String > columnNames = StringUtils . tokenize ( settings . getProperty ( HiveConstants . COLUMNS ) , "," ) ; Iter... |
public class spilloverpolicy { /** * Use this API to fetch all the spilloverpolicy resources that are configured on netscaler . */
public static spilloverpolicy [ ] get ( nitro_service service , options option ) throws Exception { } } | spilloverpolicy obj = new spilloverpolicy ( ) ; spilloverpolicy [ ] response = ( spilloverpolicy [ ] ) obj . get_resources ( service , option ) ; return response ; |
public class UtlInvBase { /** * < p > Update invoice totals after its line has been changed / deleted
* and taxes lines has been made
* or after tax line has been changed ( Invoice basis ) . < / p >
* @ param < T > invoice type
* @ param pReqVars additional param
* @ param pInv Invoice
* @ param pAs account... | String query = pInvTxMeth . lazyGetQuTotals ( ) ; query = query . replace ( ":ITSOWNER" , pInv . getItsId ( ) . toString ( ) ) ; if ( pInvTxMeth . getTblNmsTot ( ) . length == 5 ) { // sales / purchase :
query = query . replace ( ":TGOODLN" , pInvTxMeth . getTblNmsTot ( ) [ 0 ] ) ; query = query . replace ( ":TSERVICEL... |
public class QVarXQueryGenerator { /** * Uses the qvar map to generate a XQuery string containing qvar constraints ,
* and the qvar map variable which maps qvar names to their respective formula ID ' s in the result . */
private void generateQvarConstraints ( ) { } } | final StringBuilder qvarConstrBuilder = new StringBuilder ( ) ; final StringBuilder qvarMapStrBuilder = new StringBuilder ( ) ; final Iterator < Map . Entry < String , ArrayList < String > > > entryIterator = qvar . entrySet ( ) . iterator ( ) ; if ( entryIterator . hasNext ( ) ) { qvarMapStrBuilder . append ( "declare... |
public class IotHubResourcesInner { /** * Create or update the metadata of an IoT hub .
* Create or update the metadata of an Iot hub . The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata , and then combine them with the modified values in a new body to update the IoT hub ... | return ServiceFuture . fromResponse ( createOrUpdateWithServiceResponseAsync ( resourceGroupName , resourceName , iotHubDescription , ifMatch ) , serviceCallback ) ; |
public class KnowledgeOperations { /** * Gets the input .
* @ param message the message
* @ param operation the operation
* @ param runtime the runtime engine
* @ return the input */
public static Object getInput ( Message message , KnowledgeOperation operation , KnowledgeRuntimeEngine runtime ) { } } | List < Object > list = getList ( message , operation . getInputExpressionMappings ( ) ) ; switch ( list . size ( ) ) { case 0 : return filterRemoteDefaultInputContent ( message . getContent ( ) , runtime ) ; case 1 : return list . get ( 0 ) ; default : return list ; } |
public class RandomMultiDataSetIterator { /** * Generate a random array with the specified shape and order
* @ param shape Shape of the array
* @ param order Order of array ( ' c ' or ' f ' )
* @ param values Values to fill the array with
* @ return Random array of specified shape + contents */
public static IN... | switch ( values ) { case RANDOM_UNIFORM : return Nd4j . rand ( Nd4j . createUninitialized ( shape , order ) ) ; case RANDOM_NORMAL : return Nd4j . randn ( Nd4j . createUninitialized ( shape , order ) ) ; case ONE_HOT : Random r = new Random ( Nd4j . getRandom ( ) . nextLong ( ) ) ; INDArray out = Nd4j . create ( shape ... |
public class StatementBuilder { /** * Returns the list of { @ link Snak } objects for a given qualifier property .
* @ param propertyIdValue
* @ return */
protected ArrayList < Snak > getQualifierList ( PropertyIdValue propertyIdValue ) { } } | ArrayList < Snak > result = this . qualifiers . get ( propertyIdValue ) ; if ( result == null ) { result = new ArrayList < Snak > ( ) ; this . qualifiers . put ( propertyIdValue , result ) ; } return result ; |
public class FlatTreeNode { /** * Return a sequence of all < em > mapped < / em > nodes of the whole underlying
* tree . This is a convenient method for
* < pre > { @ code
* final ISeq < B > seq = stream ( )
* . map ( mapper )
* . collect ( ISeq . toISeq ( ) )
* } < / pre >
* @ param mapper the mapper fun... | return stream ( ) . map ( mapper ) . collect ( ISeq . toISeq ( ) ) ; |
public class CacheHandler { /** * 缓存字段查询到idkey
* @ param fieldCacheKey
* @ param idCacheKey
* @ param expired */
private void cacheFieldRefKey ( String fieldCacheKey , String idCacheKey , long expired ) { } } | if ( nullValueCache ) { getCacheProvider ( ) . set ( fieldCacheKey , idCacheKey , expired ) ; } else { getCacheProvider ( ) . setStr ( fieldCacheKey , idCacheKey , expired ) ; } |
public class StaticTypeCheckingSupport { /** * Checks that arguments and parameter types match .
* @ param params method parameters
* @ param args type arguments
* @ return - 1 if arguments do not match , 0 if arguments are of the exact type and > 0 when one or more argument is
* not of the exact type but still... | if ( params == null ) { params = Parameter . EMPTY_ARRAY ; } int dist = 0 ; if ( args . length < params . length ) return - 1 ; // we already know the lengths are equal
for ( int i = 0 ; i < params . length ; i ++ ) { ClassNode paramType = params [ i ] . getType ( ) ; ClassNode argType = args [ i ] ; if ( ! isAssignabl... |
public class TcasesOpenApiIO { /** * Returns a { @ link SystemInputDef system input definition } for the API requests defined by the given
* OpenAPI specification . Returns null if the given spec defines no API requests to model . */
public static SystemInputDef getRequestInputModel ( InputStream api , ModelOptions o... | try ( OpenApiReader reader = new OpenApiReader ( api ) ) { return TcasesOpenApi . getRequestInputModel ( reader . read ( ) , options ) ; } |
public class EntryBuffer { /** * Returns the buffer index for the given offset . */
private int offset ( long index ) { } } | int offset = ( int ) ( index % buffer . length ) ; if ( offset < 0 ) { offset += buffer . length ; } return offset ; |
public class AnnotationTargetsImpl_Targets { /** * PostCondition : haveScannedDirectClasses = = true */
protected void doScanDirectClasses ( ) throws AnnotationTargets_Exception { } } | if ( haveScannedDirectClasses ) { return ; } haveScannedDirectClasses = true ; if ( rootClassSource == null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Call to scan direct classes before activation" ) ; } } else { if ( directClassSourceCount == 0 ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Stran... |
public class PdfChunk { /** * Gets the width of the < CODE > PdfChunk < / CODE > taking into account the
* extra character and word spacing .
* @ param charSpacing the extra character spacing
* @ param wordSpacing the extra word spacing
* @ return the calculated width */
public float getWidthCorrected ( float c... | if ( image != null ) { return image . getScaledWidth ( ) + charSpacing ; } int numberOfSpaces = 0 ; int idx = - 1 ; while ( ( idx = value . indexOf ( ' ' , idx + 1 ) ) >= 0 ) ++ numberOfSpaces ; return width ( ) + ( value . length ( ) * charSpacing + numberOfSpaces * wordSpacing ) ; |
public class Graphics { /** * Draw a rounded rectangle
* @ param x
* The x coordinate of the top left corner of the rectangle
* @ param y
* The y coordinate of the top left corner of the rectangle
* @ param width
* The width of the rectangle
* @ param height
* The height of the rectangle
* @ param cor... | if ( cornerRadius < 0 ) throw new IllegalArgumentException ( "corner radius must be > 0" ) ; if ( cornerRadius == 0 ) { drawRect ( x , y , width , height ) ; return ; } int mr = ( int ) Math . min ( width , height ) / 2 ; // make sure that w & h are larger than 2 * cornerRadius
if ( cornerRadius > mr ) { cornerRadius =... |
public class CallStack { /** * See above for why we can ' t implement jsonToken */
public HashMap < String , Object > getJsonToken ( ) throws Exception { } } | HashMap < String , Object > jRTObject = new HashMap < String , Object > ( ) ; ArrayList < Object > jThreads = new ArrayList < Object > ( ) ; for ( CallStack . Thread thread : threads ) { jThreads . add ( thread . jsonToken ( ) ) ; } jRTObject . put ( "threads" , jThreads ) ; jRTObject . put ( "threadCounter" , threadCo... |
public class ConcurrentHashMultiset { /** * Sets the number of occurrences of { @ code element } to { @ code newCount } , but only if
* the count is currently { @ code expectedOldCount } . If { @ code element } does not appear
* in the multiset exactly { @ code expectedOldCount } times , no changes will be made .
... | checkNotNull ( element ) ; checkNonnegative ( expectedOldCount , "oldCount" ) ; checkNonnegative ( newCount , "newCount" ) ; AtomicInteger existingCounter = Maps . safeGet ( countMap , element ) ; if ( existingCounter == null ) { if ( expectedOldCount != 0 ) { return false ; } else if ( newCount == 0 ) { return true ; ... |
public class CmsJspTagJQuery { /** * Opens the direct edit tag , if manual mode is set then the next
* start HTML for the direct edit buttons is printed to the page . < p >
* @ return { @ link # EVAL _ BODY _ INCLUDE }
* @ throws JspException in case something goes wrong */
@ Override public int doStartTag ( ) th... | ServletRequest req = pageContext . getRequest ( ) ; // This will always be true if the page is called through OpenCms
if ( ! CmsFlexController . isCmsRequest ( req ) ) { return SKIP_BODY ; } if ( getJs ( ) == null ) { if ( isDynamic ( ) ) { // in case we want to include the needed js functions
try { pageContext . getOu... |
public class MathUtil { /** * Replies if the given values are near .
* @ param v1 first value .
* @ param v2 second value .
* @ return < code > true < / code > if the given { @ code v1}
* is near { @ code v2 } , otherwise < code > false < / code > .
* @ see Math # ulp ( double ) */
@ Pure @ Inline ( value = "... | MathUtil . class } ) public static boolean isEpsilonEqual ( double v1 , double v2 ) { return isEpsilonEqual ( v1 , v2 , Double . NaN ) ; |
public class ClosedHashingUtil { /** * Gets the next twin prime that is near a power of 2 and greater than or
* equal to the given value
* @ param m the integer to get a twine prime larger than
* @ return the a twin prime greater than or equal to */
public static int getNextPow2TwinPrime ( int m ) { } } | int pos = Arrays . binarySearch ( twinPrimesP2 , m + 1 ) ; if ( pos >= 0 ) return twinPrimesP2 [ pos ] ; else return twinPrimesP2 [ - pos - 1 ] ; |
public class MtasDataItemDoubleFull { /** * ( non - Javadoc )
* @ see java . lang . Comparable # compareTo ( java . lang . Object ) */
@ SuppressWarnings ( { } } | "rawtypes" , "unchecked" } ) public int compareTo ( MtasDataItem < Double , Double > o ) { int compare = 0 ; if ( o instanceof MtasDataItemDoubleFull ) { MtasDataItemDoubleFull to = ( MtasDataItemDoubleFull ) o ; MtasDataItemNumberComparator c1 = getComparableValue ( ) ; MtasDataItemNumberComparator c2 = to . getCompar... |
public class PathBuilder { /** * Create a new DateTime path
* @ param < A >
* @ param path existing path
* @ return property path */
@ SuppressWarnings ( "unchecked" ) public < A extends Comparable < ? > > DateTimePath < A > get ( DateTimePath < A > path ) { } } | DateTimePath < A > newPath = getDateTime ( toString ( path ) , ( Class < A > ) path . getType ( ) ) ; return addMetadataOf ( newPath , path ) ; |
public class ExtensionLoader { /** * Tells whether or not an { @ code Extension } with the given
* { @ code extensionName } is enabled .
* @ param extensionName the name of the extension
* @ return { @ code true } if the extension is enabled , { @ code false }
* otherwise .
* @ throws IllegalArgumentException... | if ( extensionName == null ) { throw new IllegalArgumentException ( "Parameter extensionName must not be null." ) ; } Extension extension = getExtension ( extensionName ) ; if ( extension == null ) { return false ; } return extension . isEnabled ( ) ; |
public class CooccurrenceKeywordExtractor { /** * Returns a given number of top keywords .
* @ param text A single document .
* @ return The top keywords . */
public ArrayList < NGram > extract ( String text , int maxNumKeywords ) { } } | ArrayList < String [ ] > sentences = new ArrayList < > ( ) ; SimpleTokenizer tokenizer = new SimpleTokenizer ( ) ; PorterStemmer stemmer = new PorterStemmer ( ) ; // Split text into sentences . Stem words by Porter algorithm .
int ntotal = 0 ; for ( String paragraph : SimpleParagraphSplitter . getInstance ( ) . split (... |
public class X509CRLImpl { /** * Parses an X . 509 CRL , should be used only by constructors . */
private void parse ( DerValue val ) throws CRLException , IOException { } } | // check if can over write the certificate
if ( readOnly ) throw new CRLException ( "cannot over-write existing CRL" ) ; if ( val . getData ( ) == null || val . tag != DerValue . tag_Sequence ) throw new CRLException ( "Invalid DER-encoded CRL data" ) ; signedCRL = val . toByteArray ( ) ; DerValue seq [ ] = new DerValu... |
public class Ifc2x3tc1PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public EClass getIfcStairFlightType ( ) { } } | if ( ifcStairFlightTypeEClass == null ) { ifcStairFlightTypeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc2x3tc1Package . eNS_URI ) . getEClassifiers ( ) . get ( 533 ) ; } return ifcStairFlightTypeEClass ; |
public class AABBUtils { /** * Gets an identity { @ link AxisAlignedBB } ( size 1x1x1 ) at { @ link BlockPos } position ;
* @ param pos the pos
* @ return the axis aligned bb */
public static AxisAlignedBB identity ( BlockPos pos ) { } } | return new AxisAlignedBB ( pos . getX ( ) , pos . getY ( ) , pos . getZ ( ) , pos . getX ( ) + 1 , pos . getY ( ) + 1 , pos . getZ ( ) + 1 ) ; |
public class Model { /** * Delete this model within the given transaction
* @ param t
* The transaction to delete this model in */
final public void delete ( Transaction t ) { } } | t . delete ( Utils . getTableName ( getClass ( ) ) , Utils . getWhereStatement ( this ) ) ; t . addOnTransactionCommittedListener ( new OnTransactionCommittedListener ( ) { @ Override public void onTransactionCommitted ( ) { Sprinkles . sInstance . mContext . getContentResolver ( ) . notifyChange ( Utils . getNotificat... |
public class PayloadElementParser { /** * Static parse method taking care of payload element .
* @ param payloadElement */
public static String parseMessagePayload ( Element payloadElement ) { } } | if ( payloadElement == null ) { return "" ; } try { Document payload = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) . newDocument ( ) ; payload . appendChild ( payload . importNode ( payloadElement , true ) ) ; String payloadData = XMLUtils . serialize ( payload ) ; // temporary quickfix for unwant... |
public class TiffITProfile { /** * Check required tag is present , and its cardinality and value is correct .
* @ param metadata the metadata
* @ param tagName the name of the mandatory tag
* @ param cardinality the mandatory cardinality
* @ param possibleValues the possible tag values
* @ return true , if ta... | boolean ok = true ; int tagid = TiffTags . getTagId ( tagName ) ; if ( ! metadata . containsTagId ( tagid ) ) { validation . addErrorLoc ( "Missing required tag for TiffIT" + profile + " " + tagName , "IFD" + currentIfd ) ; ok = false ; } else if ( cardinality != - 1 && metadata . get ( tagid ) . getCardinality ( ) != ... |
public class RepositoryModule { /** * Configures repository annotations interceptor . */
protected void configureAop ( ) { } } | final RepositoryMethodInterceptor proxy = new RepositoryMethodInterceptor ( ) ; requestInjection ( proxy ) ; // repository specific method annotations ( query , function , delegate , etc . )
bindInterceptor ( Matchers . any ( ) , new AbstractMatcher < Method > ( ) { @ Override public boolean matches ( final Method meth... |
public class NicInterfaceCriteria { /** * { @ inheritDoc }
* @ return < code > address < / code > if the { @ link # getAcceptableName ( ) acceptable name }
* equals < code > networkInterface < / code > ' s { @ link NetworkInterface # getName ( ) name } . */
@ Override protected InetAddress isAcceptable ( NetworkInt... | if ( name . equals ( networkInterface . getName ( ) ) ) return address ; return null ; |
public class UserFeedback { /** * Add a Info UserFeedbackEvent and log . */
public void info ( UserFeedbackEvent . Stage stage , String message ) { } } | Log . info ( stage + ": " + message ) ; addEvent ( new UserFeedbackEvent ( autoML , UserFeedbackEvent . Level . Info , stage , message ) ) ; |
public class ApiOvhDomain { /** * Delete a SMD file
* REST : DELETE / domain / data / smd / { smdId }
* @ param smdId [ required ] SMD ID */
public void data_smd_smdId_DELETE ( Long smdId ) throws IOException { } } | String qPath = "/domain/data/smd/{smdId}" ; StringBuilder sb = path ( qPath , smdId ) ; exec ( qPath , "DELETE" , sb . toString ( ) , null ) ; |
public class BaseApplet { /** * Display the status text .
* @ param strMessage The message to display . */
public Object setStatus ( int iStatus , Object comp , Object cursor ) { } } | Cursor oldCursor = null ; if ( comp instanceof Component ) if ( SwingUtilities . isEventDispatchThread ( ) ) // Just being careful
{ oldCursor = ( ( Component ) comp ) . getCursor ( ) ; if ( cursor == null ) cursor = ( Cursor ) Cursor . getPredefinedCursor ( iStatus ) ; ( ( Component ) comp ) . setCursor ( ( Cursor ) c... |
public class JinxUtils { /** * Convert a { @ link net . jeremybrooks . jinx . JinxConstants . PrivacyFilter } enum into the corresponding Flickr
* privacy filter id .
* @ param privacyFilter privacy filter enum to convert .
* @ return Flickr privacy filter id , or 0 if argument is null . */
public static int priv... | if ( privacyFilter == null ) { return - 1 ; } int level ; switch ( privacyFilter ) { case privacyPublic : level = 1 ; break ; case privacyFriends : level = 2 ; break ; case privacyFamily : level = 3 ; break ; case privacyFriendsAndFamily : level = 4 ; break ; case privacyPrivate : level = 5 ; break ; default : level = ... |
public class ClientSideHandlerGeneratorImpl { /** * Creates a javascript object that represents a bundle
* @ param bundle
* the bundle
* @ param variants
* the variant map
* @ param buf
* the buffer
* @ param useGzip
* the flag indicating if we use gzip compression or not . */
private void appendBundle ... | buf . append ( "r(" ) . append ( JavascriptStringUtil . quote ( bundle . getId ( ) ) ) . append ( "," ) ; String path = bundle . getURLPrefix ( variants ) ; if ( useGzip ) { if ( path . charAt ( 0 ) == '/' ) { path = path . substring ( 1 ) ; // remove leading ' / '
} buf . append ( JavascriptStringUtil . quote ( Bundle... |
public class DigestCredentials { /** * generate digest token based on RFC 2069 and RFC 2617 guidelines
* @ return digest token */
private String generateDigest ( boolean passwordAlreadyEncoded , String username , String realm , String password , String httpMethod , String uri , String qop , String nonce , String nc ,... | String ha1 ; String a2 = httpMethod + ":" + uri ; String ha2 = CredentialUtil . encryptMD5 ( a2 ) ; if ( passwordAlreadyEncoded ) { ha1 = password ; } else { ha1 = CredentialUtil . encryptMD5 ( username + ":" + realm + ":" + password ) ; } String digest ; if ( qop == null ) { digest = CredentialUtil . encryptMD5 ( ha1 ... |
public class VariableNumPattern { /** * Gets a { @ code VariableNumPattern } which uses the names in { @ code templateVars }
* as the name templates for matching variables . The names are specified in a
* rudimentary pattern language : if a name contains a " ? ( x ) " , this portion is
* allowed to match any inte... | int [ ] plateStarts = new int [ templateVariables . size ( ) ] ; int [ ] plateEnds = new int [ templateVariables . size ( ) ] ; int [ ] plateReplicationSizes = new int [ templateVariables . size ( ) ] ; int [ ] plateVarOffsets = new int [ templateVariables . size ( ) ] ; int [ ] plateMatchIndexOffsets = new int [ templ... |
public class SkillDetails { /** * The list of reviews for the skill , including Key and Value pair .
* @ param reviews
* The list of reviews for the skill , including Key and Value pair .
* @ return Returns a reference to this object so that method calls can be chained together . */
public SkillDetails withReview... | setReviews ( reviews ) ; return this ; |
public class ToolsAwt { /** * Get the image transparency equivalence .
* @ param transparency The transparency type ( must not be < code > null < / code > ) .
* @ return The transparency value .
* @ throws LionEngineException If invalid argument . */
public static int getTransparency ( Transparency transparency )... | Check . notNull ( transparency ) ; final int value ; if ( Transparency . OPAQUE == transparency ) { value = java . awt . Transparency . OPAQUE ; } else if ( Transparency . BITMASK == transparency ) { value = java . awt . Transparency . BITMASK ; } else if ( Transparency . TRANSLUCENT == transparency ) { value = java . ... |
public class VirtualNetworkGatewaysInner { /** * Resets the VPN client shared key of the virtual network gateway in the specified resource group .
* @ param resourceGroupName The name of the resource group .
* @ param virtualNetworkGatewayName The name of the virtual network gateway .
* @ throws IllegalArgumentEx... | beginResetVpnClientSharedKeyWithServiceResponseAsync ( resourceGroupName , virtualNetworkGatewayName ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class DDataSource { /** * Use this to force asynchronous mode ( indexer tasks ) . You can then call
* { @ link DDataSource # pollIndexerTaskStatus ( java . lang . String ) } to poll and find
* status . Hard limit on any task is 2 hours . See { @ link OverlordAccessor } for more .
* @ param sqlOrJsonQuery
... | if ( "json" . equals ( queryMode ) ) { // TODO : # 19
Either < String , Either < Mapper4All , JSONArray > > result = broker . fireQuery ( sqlOrJsonQuery , reqHeaders , true ) ; if ( result . isLeft ( ) ) return new Left < > ( result . left ( ) . get ( ) ) ; if ( printToConsole ) { println ( result . right ( ) . get ( )... |
public class StreamUtils { /** * Retry copy attempts from input stream to output stream . Does * not * check to make sure data was intact during the transfer
* @ param byteSource Supplier for input streams to copy from . The stream is closed on every retry .
* @ param byteSink Supplier for output streams . The stre... | try { return RetryUtils . retry ( ( ) -> { try ( InputStream inputStream = byteSource . openStream ( ) ) { try ( OutputStream outputStream = byteSink . openStream ( ) ) { final long retval = ByteStreams . copy ( inputStream , outputStream ) ; // Workarround for http : / / hg . openjdk . java . net / jdk8 / jdk8 / jdk /... |
public class DirectLogFetcher { /** * Connect MySQL master to fetch binlog . */
public void open ( Connection conn , String fileName , final int serverId , boolean nonBlocking ) throws IOException { } } | open ( conn , fileName , BIN_LOG_HEADER_SIZE , serverId , nonBlocking ) ; |
public class IndentingXMLStreamWriter { /** * Prepare to end an element , by writing a new line and indentation . */
protected void beforeEndElement ( ) { } } | if ( depth > 0 && stack [ depth ] == WROTE_MARKUP ) { // but not data
try { writeNewLine ( depth - 1 ) ; } catch ( Exception ignored ) { ignored . printStackTrace ( ) ; } } |
public class PropertiesManager { /** * Notify all listeners that a property has changed .
* @ param property
* the property whose value has changed */
private void firePropertyChanged ( T property ) { } } | PropertyEvent < T > event = null ; for ( PropertyListener < T > l : listeners ) { if ( event == null ) { event = new PropertyEvent < T > ( this , property ) ; } l . changed ( event ) ; } |
public class RepresentationModelProcessorHandlerMethodReturnValueHandler { /** * Re - wraps the result of the post - processing work into an { @ link HttpEntity } or { @ link ResponseEntity } if the
* original value was one of those two types . Copies headers and status code from the original value but uses the new
... | if ( ! ( originalValue instanceof HttpEntity ) ) { return rootLinksAsHeaders ? HeaderLinksResponseEntity . wrap ( newBody ) : newBody ; } HttpEntity < RepresentationModel < ? > > entity = null ; if ( originalValue instanceof ResponseEntity ) { ResponseEntity < ? > source = ( ResponseEntity < ? > ) originalValue ; entit... |
public class DOInstance { /** * TODO : remove this soon */
public @ Nonnull Iterable < VirtualMachineProduct > listProducts ( @ Nonnull VirtualMachineProductFilterOptions options , @ Nullable Architecture architecture ) throws InternalException , CloudException { } } | String cacheName = "ALL" ; if ( architecture != null ) { cacheName = architecture . name ( ) ; } Cache < VirtualMachineProduct > cache = Cache . getInstance ( getProvider ( ) , "products" + cacheName , VirtualMachineProduct . class , CacheLevel . REGION , new TimePeriod < Day > ( 1 , TimePeriod . DAY ) ) ; Iterable < V... |
public class Filters { /** * Equivalent to { @ link # replaceInString ( java . util . regex . Pattern ,
* String ) } but takes the regular expression
* as string and default overlap in 80 characters .
* @ param regexp the regular expression
* @ param replacement the string to be substituted for each match
* @... | return replaceInString ( Pattern . compile ( regexp ) , replacement , DEFAULT_FILTER_OVERLAP ) ; |
public class DebMaker { /** * Validates the input parameters . */
public void validate ( ) throws PackagingException { } } | if ( control == null || ! control . isDirectory ( ) ) { throw new PackagingException ( "The 'control' attribute doesn't point to a directory. " + control ) ; } if ( changesIn != null ) { if ( changesIn . exists ( ) && ( ! changesIn . isFile ( ) || ! changesIn . canRead ( ) ) ) { throw new PackagingException ( "The 'cha... |
public class DynamicServerListLoadBalancer { /** * Update the AllServer list in the LoadBalancer if necessary and enabled
* @ param ls */
protected void updateAllServerList ( List < T > ls ) { } } | // other threads might be doing this - in which case , we pass
if ( serverListUpdateInProgress . compareAndSet ( false , true ) ) { try { for ( T s : ls ) { s . setAlive ( true ) ; // set so that clients can start using these
// servers right away instead
// of having to wait out the ping cycle .
} setServersList ( ls ... |
public class StreamingKafkaSpecConsumer { /** * This method returns job specs receive from Kafka . It will block if there are no job specs .
* @ return list of ( verb , jobspecs ) pairs . */
@ Override public Future < ? extends List < Pair < SpecExecutor . Verb , Spec > > > changedSpecs ( ) { } } | List < Pair < SpecExecutor . Verb , Spec > > changesSpecs = new ArrayList < > ( ) ; try { Pair < SpecExecutor . Verb , Spec > specPair = _jobSpecQueue . take ( ) ; _metrics . jobSpecDeqCount . incrementAndGet ( ) ; do { changesSpecs . add ( specPair ) ; // if there are more elements then pass them along in this call
sp... |
public class ClassUtility { /** * Return the method that exactly match the action name . The name must be unique into the class .
* @ param cls the class which contain the searched method
* @ param action the name of the method to find
* @ return the method
* @ throws NoSuchMethodException if no method was meth... | for ( final Method m : cls . getMethods ( ) ) { if ( m . getName ( ) . equals ( action ) ) { return m ; } } throw new NoSuchMethodException ( action ) ; |
public class JvmShutdownSafeguard { /** * Installs the safeguard shutdown hook . The maximum time that the JVM is allowed to spend
* on shutdown before being killed is the given number of milliseconds .
* @ param logger The logger to log errors to .
* @ param delayMillis The delay ( in milliseconds ) to wait afte... | checkArgument ( delayMillis >= 0 , "delay must be >= 0" ) ; // install the blocking shutdown hook
Thread shutdownHook = new JvmShutdownSafeguard ( delayMillis ) ; ShutdownHookUtil . addShutdownHookThread ( shutdownHook , JvmShutdownSafeguard . class . getSimpleName ( ) , logger ) ; |
public class AmazonAlexaForBusinessClient { /** * Lists conference providers under a specific AWS account .
* @ param listConferenceProvidersRequest
* @ return Result of the ListConferenceProviders operation returned by the service .
* @ sample AmazonAlexaForBusiness . ListConferenceProviders
* @ see < a href =... | request = beforeClientExecution ( request ) ; return executeListConferenceProviders ( request ) ; |
public class TypeConverter { /** * Convert the passed source value to long
* @ param aSrcValue
* The source value . May be < code > null < / code > .
* @ param nDefault
* The default value to be returned if an error occurs during type
* conversion .
* @ return The converted value .
* @ throws RuntimeExcep... | final Long aValue = convert ( aSrcValue , Long . class , null ) ; return aValue == null ? nDefault : aValue . longValue ( ) ; |
public class HexableEncryptor { /** * { @ inheritDoc }
* @ throws InvalidKeyException
* the invalid key exception is thrown if initialization of the cypher object fails .
* @ throws UnsupportedEncodingException
* is thrown by get the byte array of the private key String object fails or if the
* named charset ... | final byte [ ] utf8 = string . getBytes ( "UTF-8" ) ; final byte [ ] encrypt = getModel ( ) . getCipher ( ) . doFinal ( utf8 ) ; final char [ ] original = Hex . encodeHex ( encrypt , false ) ; return new String ( original ) ; |
public class Node { /** * clear counts for all direct dependents of this node .
* also clear the dependent write counter */
protected void clearDependentsWriteCount ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "clearDependentsWriteCount entry: for this node: " + this ) ; } dependentWriteCount = 0 ; if ( ( dependents == null ) || ( dependents . size ( ) == 0 ) ) { return ; } for ( int i = 0 ; i < dependents . size ( ) ; i ++ ) { dep... |
public class ConstraintAdapter { /** * Gets the chain of Control , staring from the given Control , leading to the given Interaction .
* Use this method only if you are sure that there is a link from the control to conversion .
* Otherwise a RuntimeException is thrown . This assumes that there is only one control c... | LinkedList < Control > list = new LinkedList < Control > ( ) ; list . add ( control ) ; boolean found = search ( list , inter ) ; if ( ! found ) throw new RuntimeException ( "No link from Control to Conversion." ) ; return list ; |
public class SQLUtils { /** * select count ( * ) from t _ table , 不包含where子句及以后的语句
* @ param clazz
* @ return */
public static String getSelectCountSQL ( Class < ? > clazz ) { } } | StringBuilder sql = new StringBuilder ( ) ; sql . append ( "SELECT count(*)" ) ; // 处理join方式clazz
JoinTable joinTable = DOInfoReader . getJoinTable ( clazz ) ; if ( joinTable != null ) { Field leftTableField = DOInfoReader . getJoinLeftTable ( clazz ) ; Field rightTableField = DOInfoReader . getJoinRightTable ( clazz )... |
public class LdapTemplate { /** * { @ inheritDoc } */
@ Override public boolean authenticate ( String base , String filter , String password ) { } } | return authenticate ( LdapUtils . newLdapName ( base ) , filter , password , new NullAuthenticatedLdapEntryContextCallback ( ) , new NullAuthenticationErrorCallback ( ) ) ; |
public class DescribeTasksResult { /** * Any failures associated with the call .
* @ return Any failures associated with the call . */
public java . util . List < Failure > getFailures ( ) { } } | if ( failures == null ) { failures = new com . amazonaws . internal . SdkInternalList < Failure > ( ) ; } return failures ; |
public class MSSQLConnectionFactory { /** * { @ inheritDoc } */
@ Override public WorkspaceStorageConnection openConnection ( boolean readOnly ) throws RepositoryException { } } | try { if ( this . containerConfig . dbStructureType . isMultiDatabase ( ) ) { return new MSSQLMultiDbJDBCConnection ( getJdbcConnection ( readOnly ) , readOnly , containerConfig ) ; } return new MSSQLSingleDbJDBCConnection ( getJdbcConnection ( readOnly ) , readOnly , containerConfig ) ; } catch ( SQLException e ) { th... |
public class ScreenshotState { /** * Verifies whether the state of the screenshot provided by stateProvider lambda function
* is not changed within the given timeout .
* @ param timeout timeout value
* @ param minScore the value in range ( 0.0 , 1.0)
* @ return self instance for chaining
* @ throws Screenshot... | return checkState ( ( x ) -> x >= minScore , timeout ) ; |
public class JoinPoint { /** * Shortcut method to create a JoinPoint waiting for the given synchronization points , < b > the JoinPoint is started by this method . < / b >
* If some given synchronization points are null , they are just skipped . */
@ SafeVarargs public static < T extends Exception > JoinPoint < T > f... | JoinPoint < T > jp = new JoinPoint < > ( ) ; for ( int i = 0 ; i < synchPoints . length ; ++ i ) if ( synchPoints [ i ] != null ) jp . addToJoin ( synchPoints [ i ] ) ; jp . start ( ) ; return jp ; |
public class Admin { /** * @ throws PageException */
private void doGetTimeZones ( ) throws PageException { } } | String strLocale = getString ( "locale" , "english (united kingdom)" ) ; Locale locale = LocaleFactory . getLocale ( strLocale ) ; String [ ] timeZones = TimeZone . getAvailableIDs ( ) ; lucee . runtime . type . Query qry = new QueryImpl ( new String [ ] { "id" , "display" } , new String [ ] { "varchar" , "varchar" } ,... |
public class InternalServiceProviders { /** * Accessor for method . */
@ VisibleForTesting public static < T > Iterable < T > getCandidatesViaHardCoded ( Class < T > klass , Iterable < Class < ? > > hardcoded ) { } } | return ServiceProviders . getCandidatesViaHardCoded ( klass , hardcoded ) ; |
public class ImmutableSubstitutionTools { /** * Returns a substitution theta ( if it exists ) such as :
* theta ( s ) = t
* with
* s : source term
* t : target term */
public Optional < ImmutableSubstitution < ImmutableTerm > > computeUnidirectionalSubstitution ( ImmutableTerm sourceTerm , ImmutableTerm targetT... | /* * Variable */
if ( sourceTerm instanceof Variable ) { Variable sourceVariable = ( Variable ) sourceTerm ; // Constraint
if ( ( ! sourceVariable . equals ( targetTerm ) ) && ( targetTerm instanceof ImmutableFunctionalTerm ) && ( ( ImmutableFunctionalTerm ) targetTerm ) . getVariables ( ) . contains ( sourceVariable )... |
public class Client { /** * Retrieves state and metrics information for individual node .
* @ param name node name
* @ return node information */
public NodeInfo getNode ( String name ) { } } | final URI uri = uriWithPath ( "./nodes/" + encodePathSegment ( name ) ) ; return this . rt . getForObject ( uri , NodeInfo . class ) ; |
public class ConstantValuePropertyAccessor { /** * Build a { @ link ConstantValuePropertyAccessor } , given a raw Object to cast and return .
* @ param rawValue object value to use directly as the constant / default value
* @ return a new instance of { @ link ConstantValuePropertyAccessor } */
public static Constan... | checkNotNull ( rawValue ) ; return new ConstantValuePropertyAccessor ( Optional . of ( rawValue . toString ( ) ) , Optional . of ( rawValue ) ) ; |
public class InsertBench { @ Bench public void blocked262144 ( ) throws TTException { } } | insert ( 262144 , true ) ; mTrx . close ( ) ; System . out . println ( "262144" ) ; |
public class JDBCOutputFormat { /** * Adds a record to the prepared statement .
* When this method is called , the output format is guaranteed to be opened .
* @ param record The records to add to the output .
* @ throws IOException Thrown , if the records could not be added due to an
* I / O problem . */
@ Ove... | try { for ( int x = 0 ; x < record . getNumFields ( ) ; x ++ ) { Value temp = record . getField ( x , fieldClasses [ x ] ) ; addValue ( x + 1 , temp ) ; } upload . addBatch ( ) ; batchCount ++ ; if ( batchCount >= batchInterval ) { upload . executeBatch ( ) ; batchCount = 0 ; } } catch ( SQLException sqe ) { throw new ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.