signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class DefaultGroovyMethods { /** * Collates this iterable into sub - lists of length < code > size < / code > stepping through the code < code > step < / code >
* elements for each sub - list . Any remaining elements in the iterable after the subdivision will be dropped if
* < code > keepRemainder < / code >... | List < T > selfList = asList ( self ) ; List < List < T > > answer = new ArrayList < List < T > > ( ) ; if ( size <= 0 ) { answer . add ( selfList ) ; } else { if ( step == 0 ) throw new IllegalArgumentException ( "step cannot be zero" ) ; for ( int pos = 0 ; pos < selfList . size ( ) && pos > - 1 ; pos += step ) { if ... |
public class BlockPlacementPolicyConfigurable { /** * Verifies if testing nodes are within right windows of first node
* @ param first first node being considered
* @ param testing1 node we are testing to check if it is within window or not
* @ param testing2 node we are testing to check if it is within window or... | readLock ( ) ; try { if ( ! testing1 . getNetworkLocation ( ) . equals ( testing2 . getNetworkLocation ( ) ) ) { return false ; } RackRingInfo rackInfo = racksMap . get ( first . getNetworkLocation ( ) ) ; assert ( rackInfo != null ) ; Integer machineId = rackInfo . findNode ( first ) ; assert ( machineId != null ) ; f... |
public class Modbus { /** * Shutdown / stop any shared resources that me be in use , blocking until finished or interrupted .
* @ param timeout the duration to wait .
* @ param unit the { @ link TimeUnit } of the { @ code timeout } duration . */
public static void releaseSharedResources ( long timeout , TimeUnit un... | sharedExecutor ( ) . awaitTermination ( timeout , unit ) ; sharedEventLoop ( ) . shutdownGracefully ( ) . await ( timeout , unit ) ; sharedWheelTimer ( ) . stop ( ) ; |
public class HexUtil { /** * 将指定int值转换为Unicode字符串形式 , 常用于特殊字符 ( 例如汉字 ) 转Unicode形式 < br >
* 转换的字符串如果u后不足4位 , 则前面用0填充 , 例如 :
* < pre >
* ' 我 ' = 》 \ u4f60
* < / pre >
* @ param value int值 , 也可以是char
* @ return Unicode表现形式 */
public static String toUnicodeHex ( int value ) { } } | final StringBuilder builder = new StringBuilder ( 6 ) ; builder . append ( "\\u" ) ; String hex = toHex ( value ) ; int len = hex . length ( ) ; if ( len < 4 ) { builder . append ( "0000" , 0 , 4 - len ) ; // 不足4位补0
} builder . append ( hex ) ; return builder . toString ( ) ; |
public class TransmissionData { /** * Sets the layout to use for this transmission to be a primary header only .
* @ param segmentLength
* @ param priority
* @ param isPooled
* @ param isExchange
* @ param packetNumber
* @ param segmentType
* @ param sendListener */
protected void setLayoutToPrimary ( int... | if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setLayoutToPrimary" , new Object [ ] { "" + segmentLength , "" + priority , "" + isPooled , "" + isExchange , "" + packetNumber , "" + segmentType , sendListener } ) ; primaryHeaderFields . segmentLength = segmentLength ; primaryHeaderFields . priority = prior... |
public class PrimitiveParameter { /** * Returns this parameter ' s timestamp ( or other kind of position value ) . A
* < code > null < / code > value means the timestamp is unknown .
* @ return a { @ link Long } . */
public Long getPosition ( ) { } } | Interval interval = getInterval ( ) ; if ( interval != null ) { return interval . getMinStart ( ) ; } else { return null ; } |
public class QOrderBySection { /** * { @ inheritDoc } */
@ Override public QOrderBySection prepare ( final AbstractObjectQuery < ? > _query ) throws EFapsException { } } | for ( final AbstractQPart part : this . parts ) { part . prepare ( _query , null ) ; } return this ; |
public class Job { /** * Check and update the state of this job . The state changes
* depending on its current state and the states of the depending jobs . */
synchronized int checkState ( ) { } } | if ( this . state == Job . RUNNING ) { checkRunningState ( ) ; } if ( this . state != Job . WAITING ) { return this . state ; } if ( this . dependingJobs == null || this . dependingJobs . size ( ) == 0 ) { this . state = Job . READY ; return this . state ; } Job pred = null ; int n = this . dependingJobs . size ( ) ; f... |
public class Strings { /** * 将两个用delimiter串起来的字符串 , 合并成新的串 , 重复的 " 单词 " 只出现一次 .
* 如果第一个字符串以delimiter开头 , 第二个字符串以delimiter结尾 , < br >
* 合并后的字符串仍以delimiter开头和结尾 . < br >
* < blockquote >
* < pre >
* mergeSeq ( & quot ; , 1,2 , & quot ; , & quot ; & quot ; ) = & quot ; , 1,2 , & quot ; ;
* mergeSeq ( & quot ; ... | if ( isNotEmpty ( second ) && isNotEmpty ( first ) ) { List < String > firstSeq = Arrays . asList ( split ( first , delimiter ) ) ; List < String > secondSeq = Arrays . asList ( split ( second , delimiter ) ) ; Collection < String > rs = CollectUtils . union ( firstSeq , secondSeq ) ; StringBuilder buf = new StringBuil... |
public class PresentsSession { /** * Called by the client manager when a new connection arrives that authenticates as this
* already established client . This must only be called from the congmr thread . */
protected void resumeSession ( AuthRequest req , PresentsConnection conn ) { } } | // check to see if we ' ve already got a connection object , in which case it ' s probably stale
Connection oldconn = getConnection ( ) ; if ( oldconn != null && ! oldconn . isClosed ( ) ) { log . info ( "Closing stale connection" , "old" , oldconn , "new" , conn ) ; // close the old connection ( which results in every... |
public class JCuda { /** * [ C + + API ] Binds an array to a texture
* < pre >
* template < class T , int dim , enum cudaTextureReadMode readMode >
* cudaError _ t cudaBindTextureToArray (
* const texture < T ,
* dim ,
* readMode > & tex ,
* cudaArray _ const _ t array ,
* const cudaChannelFormatDesc & ... | return checkResult ( cudaBindTextureToArrayNative ( texref , array , desc ) ) ; |
public class DeepLearning { /** * Compute the actual train _ samples _ per _ iteration size from the user - given parameter
* @ param mp Model parameter ( DeepLearning object )
* @ param numRows number of training rows
* @ param model DL Model
* @ return The total number of training rows to be processed per ite... | long tspi = mp . train_samples_per_iteration ; assert ( tspi == 0 || tspi == - 1 || tspi == - 2 || tspi >= 1 ) ; if ( tspi == 0 || ( ! mp . replicate_training_data && tspi == - 1 ) ) { tspi = numRows ; if ( ! mp . quiet_mode ) Log . info ( "Setting train_samples_per_iteration (" + mp . train_samples_per_iteration + ") ... |
public class Quaternion { /** * Sets this quaternion to one that rotates onto the given unit axes .
* @ return a reference to this quaternion , for chaining . */
public Quaternion fromAxes ( IVector3 nx , IVector3 ny , IVector3 nz ) { } } | double nxx = nx . x ( ) , nyy = ny . y ( ) , nzz = nz . z ( ) ; double x2 = ( 1f + nxx - nyy - nzz ) / 4f ; double y2 = ( 1f - nxx + nyy - nzz ) / 4f ; double z2 = ( 1f - nxx - nyy + nzz ) / 4f ; double w2 = ( 1f - x2 - y2 - z2 ) ; return set ( Math . sqrt ( x2 ) * ( ny . z ( ) >= nz . y ( ) ? + 1f : - 1f ) , Math . sq... |
public class MerkleTree { /** * Find the { @ link Hashable } node that matches the given { @ code range } .
* @ param range Range to find
* @ return { @ link Hashable } found . If nothing found , return { @ link Leaf } with null hash . */
private Hashable find ( Range < Token > range ) { } } | try { return findHelper ( root , new Range < Token > ( fullRange . left , fullRange . right ) , range ) ; } catch ( StopRecursion e ) { return new Leaf ( ) ; } |
public class S3ReferenceDataSourceMarshaller { /** * Marshall the given parameter object . */
public void marshall ( S3ReferenceDataSource s3ReferenceDataSource , ProtocolMarshaller protocolMarshaller ) { } } | if ( s3ReferenceDataSource == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( s3ReferenceDataSource . getBucketARN ( ) , BUCKETARN_BINDING ) ; protocolMarshaller . marshall ( s3ReferenceDataSource . getFileKey ( ) , FILEKEY_BINDING ) ; proto... |
public class FailClosureTarget { /** * Throws { @ link MojoExecutionException } . */
public Object call ( final @ Nullable Object [ ] args ) throws Exception { } } | if ( args == null || args . length == 0 ) { throw new MojoExecutionException ( FAILED ) ; } else if ( args . length == 1 ) { if ( args [ 0 ] instanceof Throwable ) { Throwable cause = ( Throwable ) args [ 0 ] ; throw new MojoExecutionException ( cause . getMessage ( ) , cause ) ; } else { throw new MojoExecutionExcepti... |
public class AssociationValue { /** * Get the primitive attributes for the associated object .
* @ return attributes for associated objects
* @ deprecated replaced by { @ link # getAllAttributes ( ) } after introduction of nested associations */
@ Deprecated @ SuppressWarnings ( { } } | "rawtypes" , "unchecked" } ) public Map < String , PrimitiveAttribute < ? > > getAttributes ( ) { if ( ! isPrimitiveOnly ( ) ) { throw new UnsupportedOperationException ( "Primitive API not supported for nested association values" ) ; } return ( Map ) attributes ; |
public class DefaultContainerDescription { /** * Queries the running container and attempts to lookup the information from the running container .
* @ param client the client used to execute the management operation
* @ return the container description
* @ throws IOException if an error occurs while executing the... | final ModelNode op = Operations . createReadResourceOperation ( new ModelNode ( ) . setEmptyList ( ) ) ; op . get ( ClientConstants . INCLUDE_RUNTIME ) . set ( true ) ; final ModelNode result = client . execute ( op ) ; if ( Operations . isSuccessfulOutcome ( result ) ) { final ModelNode model = Operations . readResult... |
public class JobInProgress { /** * The job is done since all it ' s component tasks are either
* successful or have failed . */
private void jobComplete ( ) { } } | final JobTrackerInstrumentation metrics = jobtracker . getInstrumentation ( ) ; // All tasks are complete , then the job is done !
if ( this . status . getRunState ( ) == JobStatus . RUNNING || this . status . getRunState ( ) == JobStatus . PREP ) { changeStateTo ( JobStatus . SUCCEEDED ) ; this . status . setCleanupPr... |
public class KeyStoreManager { /** * Open the provided filename as an outputstream .
* @ param fileName
* @ return OutputStream
* @ throws MalformedURLException
* @ throws IOException */
public OutputStream getOutputStream ( String fileName ) throws MalformedURLException , IOException { } } | try { GetKeyStoreOutputStreamAction action = new GetKeyStoreOutputStreamAction ( fileName ) ; return AccessController . doPrivileged ( action ) ; } catch ( PrivilegedActionException e ) { Exception ex = e . getException ( ) ; FFDCFilter . processException ( e , getClass ( ) . getName ( ) , "getOutputStream" , new Objec... |
public class ImageManipulation { /** * Method automatically called by browser to handle image manipulations .
* @ param req
* Browser request to servlet res Response sent back to browser after
* image manipulation
* @ throws IOException
* If an input or output exception occurred ServletException If a
* serv... | System . setProperty ( "java.awt.headless" , "true" ) ; // collect all possible parameters for servlet
String url = req . getParameter ( "url" ) ; String op = req . getParameter ( "op" ) ; String newWidth = req . getParameter ( "newWidth" ) ; String brightAmt = req . getParameter ( "brightAmt" ) ; String zoomAmt = req ... |
public class WeakSet { /** * Clear the set
* @ param shrink if true , shrink the set to initial size */
public void clear ( final boolean shrink ) { } } | while ( queue . poll ( ) != null ) { ; } if ( elementCount > 0 ) { elementCount = 0 ; } if ( shrink && ( elementData . length > 1024 ) && ( elementData . length > defaultSize ) ) { elementData = newElementArray ( defaultSize ) ; } else { Arrays . fill ( elementData , null ) ; } computeMaxSize ( ) ; while ( queue . poll... |
public class RequestUtil { /** * 如果客户端通过 request 传递数据 , 那么就可以使用该方法获取数据
* 这种通常是通过 Post方式
* @ param request HttpServletRequest
* @ return 客户端上传的数据
* @ throws IOException 因为是通过IO流读取数据 ,
* 因此很可能读取失败 , 或者NULL , 导致抛出IO异常 , */
public static String getPostData ( HttpServletRequest request ) throws IOException { } } | BufferedReader br = new BufferedReader ( new InputStreamReader ( request . getInputStream ( ) ) ) ; String line ; StringBuilder sb = new StringBuilder ( ) ; while ( ( line = br . readLine ( ) ) != null ) { sb . append ( line ) ; } // return URLDecoder . decode ( sb . toString ( ) , Constant . DEFAULT _ CHATSET ) ;
retu... |
public class CacheNotifierImpl { /** * Configure event data . Currently used for ' expired ' events . */
private void configureEvent ( CacheEntryListenerInvocation listenerInvocation , EventImpl < K , V > e , K key , V value , Metadata metadata ) { } } | e . setKey ( convertKey ( listenerInvocation , key ) ) ; e . setValue ( convertValue ( listenerInvocation , value ) ) ; e . setMetadata ( metadata ) ; e . setOriginLocal ( true ) ; e . setPre ( false ) ; |
public class Nfs3 { /** * / * ( non - Javadoc )
* @ see com . emc . ecs . nfsclient . nfs . Nfs # sendWrite ( com . emc . ecs . nfsclient . nfs . NfsWriteRequest ) */
public Nfs3WriteResponse sendWrite ( NfsWriteRequest request ) throws IOException { } } | Nfs3WriteResponse response = new Nfs3WriteResponse ( ) ; _rpcWrapper . callRpcNaked ( request , response ) ; return response ; |
public class Rank { /** * Set this Entity ahead of the passed in Entity in rank order .
* @ param assetToRankAheadOf The Entity that will come next in order after
* this Entity . */
public void setAbove ( T assetToRankAheadOf ) { } } | instance . rankAbove ( asset , assetToRankAheadOf , rankAttribute ) ; asset . save ( ) ; |
public class RecommendationsInner { /** * Get a recommendation rule for an app .
* Get a recommendation rule for an app .
* @ param resourceGroupName Name of the resource group to which the resource belongs .
* @ param siteName Name of the app .
* @ param name Name of the recommendation .
* @ throws IllegalAr... | if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( siteName == null ) { throw new IllegalArgumentException ( "Parameter siteName is required and cannot be null." ) ; } if ( name == null ) { throw new IllegalArgumentException (... |
public class HiveRegistrationPolicyBase { /** * Obtain Hive table names .
* The returned { @ link Iterable } contains :
* 1 . Table name returned by { @ link # getTableName ( Path ) }
* 2 . Table names specified by < code > additional . hive . table . names < / code >
* In table names above , the { @ value PRIM... | List < String > tableNames = getTableNames ( Optional . < String > absent ( ) , path ) ; Preconditions . checkState ( ! tableNames . isEmpty ( ) , "Hive table name not specified" ) ; return tableNames ; |
public class MultipartByterangesEntity { /** * { @ inheritDoc } */
public void write ( OutputStream ostream ) throws IOException { } } | try { for ( Range range : ranges_ ) { InputStream istream = null ; if ( resource_ instanceof VersionResource ) istream = ( ( VersionResource ) resource_ ) . getContentAsStream ( ) ; else istream = ( ( FileResource ) resource_ ) . getContentAsStream ( ) ; println ( ostream ) ; // boundary
print ( "--" + WebDavConst . BO... |
public class DefaultTraceCollector { /** * This method pops an existing node from the trace fragment .
* @ param location The instrumentation location
* @ param The class to pop
* @ param The optional URI to match
* @ return The node */
protected < T extends Node > T pop ( String location , FragmentBuilder buil... | if ( builder == null ) { if ( log . isLoggable ( Level . WARNING ) ) { log . warning ( "No fragment builder for this thread (" + Thread . currentThread ( ) + ") - trying to pop node of type: " + cls ) ; } return null ; } if ( builder . getCurrentNode ( ) == null ) { if ( log . isLoggable ( Level . FINEST ) ) { log . fi... |
public class FileItem { /** * Defines the file represented by this item .
* @ param file A file . */
public void setFile ( File file ) { } } | if ( file != null ) { this . file = file ; // Replace the label by the file ' s name .
this . setLabel ( file . getName ( ) ) ; // Change the icon , depending if the file is a folder or not .
this . updateIcon ( ) ; } |
public class CyclomaticComplexity { /** * overrides the visitor to store the class context
* @ param context
* the context object for the currently parsed class */
@ Override public void visitClassContext ( final ClassContext context ) { } } | try { classContext = context ; classContext . getJavaClass ( ) . accept ( this ) ; } finally { classContext = null ; } |
public class ThrowUnchecked { /** * Throws the given exception if it is unchecked or an instance of any of
* the given declared types . Otherwise , it is thrown as an
* UndeclaredThrowableException . This method only returns normally if the
* exception is null .
* @ param t exception to throw
* @ param declar... | org . cojen . util . ThrowUnchecked . fireDeclared ( t , declaredTypes ) ; |
public class RangeTombstoneList { /** * Removes all range tombstones whose local deletion time is older than gcBefore . */
public void purge ( int gcBefore ) { } } | int j = 0 ; for ( int i = 0 ; i < size ; i ++ ) { if ( delTimes [ i ] >= gcBefore ) setInternal ( j ++ , starts [ i ] , ends [ i ] , markedAts [ i ] , delTimes [ i ] ) ; } size = j ; |
public class Base32Utils { /** * mask : F8 07 C0 3E 01 F0 0F 80 7C 03 E0 1F F8 07 */
static private void decodeCharacter ( byte chunk , int characterIndex , byte [ ] bytes , int index ) { } } | int byteIndex = index + ( characterIndex * 5 ) / 8 ; int offset = characterIndex % 8 ; switch ( offset ) { case 0 : bytes [ byteIndex ] |= chunk << 3 ; break ; case 1 : bytes [ byteIndex ] |= chunk >>> 2 ; bytes [ byteIndex + 1 ] |= chunk << 6 ; break ; case 2 : bytes [ byteIndex ] |= chunk << 1 ; break ; case 3 : byte... |
public class ImageClient { /** * Creates an image in the specified project using the data included in the request .
* < p > Sample code :
* < pre > < code >
* try ( ImageClient imageClient = ImageClient . create ( ) ) {
* Boolean forceCreate = false ;
* ProjectName project = ProjectName . of ( " [ PROJECT ] "... | InsertImageHttpRequest request = InsertImageHttpRequest . newBuilder ( ) . setForceCreate ( forceCreate ) . setProject ( project == null ? null : project . toString ( ) ) . setImageResource ( imageResource ) . build ( ) ; return insertImage ( request ) ; |
public class FileSystemSafetyNet { /** * Closes the safety net for a thread . This closes all remaining unclosed streams that were opened
* by safety - net - guarded file systems . After this method was called , no streams can be opened any more
* from any FileSystem instance that was obtained while the thread was ... | SafetyNetCloseableRegistry registry = REGISTRIES . get ( ) ; if ( null != registry ) { REGISTRIES . remove ( ) ; IOUtils . closeQuietly ( registry ) ; } |
public class TimeBaseMarshaller { /** * from interface TimeBaseService */
public void getTimeOid ( String arg1 , TimeBaseService . GotTimeBaseListener arg2 ) { } } | TimeBaseMarshaller . GotTimeBaseMarshaller listener2 = new TimeBaseMarshaller . GotTimeBaseMarshaller ( ) ; listener2 . listener = arg2 ; sendRequest ( GET_TIME_OID , new Object [ ] { arg1 , listener2 } ) ; |
public class Stream { /** * Returns a metadata property about the stream . Note that { @ code Stream } wrappers obtained
* through intermediate operations don ' t have their own properties , but instead access the
* metadata properties of the source { @ code Stream } .
* @ param name
* the name of the property ... | Preconditions . checkNotNull ( name ) ; try { Object value = null ; synchronized ( this . state ) { if ( this . state . properties != null ) { value = this . state . properties . get ( name ) ; } } return Data . convert ( value , type ) ; } catch ( final Throwable ex ) { throw Throwables . propagate ( ex ) ; } |
public class FileHdr { /** * Set up the key areas . */
public void setupKeys ( ) { } } | KeyAreaInfo keyArea = null ; keyArea = new KeyAreaInfo ( this , Constants . UNIQUE , ID_KEY ) ; keyArea . addKeyField ( ID , Constants . ASCENDING ) ; keyArea = new KeyAreaInfo ( this , Constants . UNIQUE , FILE_NAME_KEY ) ; keyArea . addKeyField ( FILE_NAME , Constants . ASCENDING ) ; |
public class DatabasesInner { /** * Imports a bacpac into a new database .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param serverName The name of the server .
* @ param parameters The re... | if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( serverN... |
public class ConnectionImpl { /** * ( non - Javadoc )
* @ see com . ibm . wsspi . sib . core . SICoreConnection # createUncoordinatedTransaction ( ) */
@ Override public SIUncoordinatedTransaction createUncoordinatedTransaction ( ) throws SIConnectionUnavailableException , SIConnectionDroppedException , SIErrorExcept... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createUncoordinatedTransaction" ) ; SIUncoordinatedTransaction tran = createUncoordinatedTransaction ( true ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createUncoordin... |
public class FactoryPointTracker { /** * Creates a tracker which detects Shi - Tomasi corner features , describes them with SURF , and
* nominally tracks them using KLT .
* @ see ShiTomasiCornerIntensity
* @ see DescribePointSurf
* @ see boofcv . abst . feature . tracker . DdaManagerDetectDescribePoint
* @ pa... | if ( derivType == null ) derivType = GImageDerivativeOps . getDerivativeType ( imageType ) ; GeneralFeatureDetector < I , D > corner = createShiTomasi ( configExtract , derivType ) ; InterestPointDetector < I > detector = FactoryInterestPoint . wrapPoint ( corner , 1 , imageType , derivType ) ; DescribeRegionPoint < I ... |
public class SelectiveAccessHandler { /** * Returns information which infomations are selected by the actual configuration */
public String getSelectionInfo ( ) { } } | StringBuilder result = new StringBuilder ( ) ; result . append ( "SelectionInfo: " + this . getClass ( ) . toString ( ) + "\n" ) ; result . append ( "Page:" + CITInfo ( pageHandling ) + "\n" ) ; result . append ( "FirstParagraph:" + CITInfo ( firstParagraphHandling ) + "\n" ) ; for ( String key : sectionHandling . keyS... |
public class RoaringBitmap { /** * Complements the bits in the given range , from rangeStart ( inclusive ) rangeEnd ( exclusive ) . The
* given bitmap is unchanged .
* @ param bm bitmap being negated
* @ param rangeStart inclusive beginning of range , in [ 0 , 0xfffff ]
* @ param rangeEnd exclusive ending of ra... | rangeSanityCheck ( rangeStart , rangeEnd ) ; if ( rangeStart >= rangeEnd ) { return bm . clone ( ) ; } RoaringBitmap answer = new RoaringBitmap ( ) ; final int hbStart = Util . toIntUnsigned ( Util . highbits ( rangeStart ) ) ; final int lbStart = Util . toIntUnsigned ( Util . lowbits ( rangeStart ) ) ; final int hbLas... |
public class CmsSerialDateBeanFactory { /** * Factory method for creating a serial date bean .
* @ param widgetValue the value for the series as stored by the { @ link org . opencms . widgets . CmsSerialDateWidget }
* @ return the serial date bean . */
public static I_CmsSerialDateBean createSerialDateBean ( String... | I_CmsSerialDateValue value ; value = new CmsSerialDateValue ( widgetValue ) ; return createSerialDateBean ( value ) ; |
public class PlaybackView { @ Override public void onProgressChanged ( SeekBar seekBar , int progress , boolean fromUser ) { } } | int [ ] secondMinute = getSecondMinutes ( progress ) ; mCurrentTime . setText ( String . format ( getResources ( ) . getString ( R . string . playback_view_time ) , secondMinute [ 0 ] , secondMinute [ 1 ] ) ) ; |
public class IOSMobileCommandHelper { /** * This method forms a { @ link Map } of parameters for the touchId simulator .
* @ param match If true , simulates a successful fingerprint scan . If false , simulates a failed fingerprint scan .
* @ return a key - value pair . The key is the command name . The value is a {... | return new AbstractMap . SimpleEntry < > ( TOUCH_ID , prepareArguments ( "match" , match ) ) ; |
public class ClientConnecter { /** * Thread */
@ Override public void run ( ) { } } | isRunning = true ; while ( isRunning ) { try { server . notifyNewClientConnected ( serverSocket . accept ( ) ) ; } catch ( final SocketException exception ) { Verbose . exception ( exception ) ; isRunning = false ; } catch ( final IOException exception ) { Verbose . exception ( exception ) ; } } |
public class TimeLine { /** * Return the next index into the TIMELINE array */
private static int next_idx ( long [ ] tl ) { } } | // Spin until we can CAS - acquire a fresh index
while ( true ) { int oldidx = ( int ) tl [ 0 ] ; int newidx = ( oldidx + 1 ) & ( MAX_EVENTS - 1 ) ; if ( CAS ( tl , 0 , oldidx , newidx ) ) return oldidx ; } |
public class SparseTensor { /** * Same as { @ link # fromUnorderedKeyValues } , except that neither
* input array is copied . These arrays must not be modified by the
* caller after invoking this method .
* @ param dimensionNumbers
* @ param dimensionSizes
* @ param keyNums
* @ param values */
public static... | ArrayUtils . sortKeyValuePairs ( keyNums , values , 0 , keyNums . length ) ; return new SparseTensor ( dimensionNumbers , dimensionSizes , keyNums , values ) ; |
public class AFPChainer { /** * derive the compabitle AFP lists for AFP - chaining
* this is important for speeding up the process
* for a given AFP ( i1 , j1 ) , there are three regions that could be the starting
* point for the compabitle AFPs of AFP ( i1 , j1)
* a1 a2 a3
* i1 - G i1 - f - c i1 - f + 1 i1
... | int i , j , i1 , j1 , f , G , c , a1 , a2 , a3 , b1 , b2 , b3 , s1 , s2 ; int fragLen = params . getFragLen ( ) ; int maxGapFrag = params . getMaxGapFrag ( ) ; int misCut = params . getMisCut ( ) ; int maxTra = params . getMaxTra ( ) ; List < AFP > afpSet = afpChain . getAfpSet ( ) ; f = fragLen ; G = maxGapFrag ; c = ... |
public class InternalXbaseParser { /** * InternalXbase . g : 5605:1 : ruleJvmParameterizedTypeReference returns [ EObject current = null ] : ( ( ( ruleQualifiedName ) ) ( ( ( ' < ' ) = > otherlv _ 1 = ' < ' ) ( ( lv _ arguments _ 2_0 = ruleJvmArgumentTypeReference ) ) ( otherlv _ 3 = ' , ' ( ( lv _ arguments _ 4_0 = ru... | EObject current = null ; Token otherlv_1 = null ; Token otherlv_3 = null ; Token otherlv_5 = null ; Token otherlv_7 = null ; Token otherlv_9 = null ; Token otherlv_11 = null ; Token otherlv_13 = null ; EObject lv_arguments_2_0 = null ; EObject lv_arguments_4_0 = null ; EObject lv_arguments_10_0 = null ; EObject lv_argu... |
public class TransactionManager { /** * Replay all logged edits from the given transaction logs . */
private void replayLogs ( Collection < TransactionLog > logs ) { } } | for ( TransactionLog log : logs ) { LOG . info ( "Replaying edits from transaction log " + log . getName ( ) ) ; int editCnt = 0 ; try { TransactionLogReader reader = log . getReader ( ) ; // reader may be null in the case of an empty file
if ( reader == null ) { continue ; } TransactionEdit edit = null ; while ( ( edi... |
public class KafkaClient { /** * Removes a topic message listener .
* @ param consumerGroupId
* @ param topic
* @ param messageListener
* @ return { @ code true } if successful , { @ code false } otherwise ( the topic
* may have no such listener added before ) */
public boolean removeMessageListener ( String ... | KafkaMsgConsumer kafkaConsumer = cacheConsumers . get ( consumerGroupId ) ; return kafkaConsumer != null ? kafkaConsumer . removeMessageListener ( topic , messageListener ) : false ; |
public class CommerceNotificationTemplateLocalServiceWrapper { /** * Returns the commerce notification template matching the UUID and group .
* @ param uuid the commerce notification template ' s UUID
* @ param groupId the primary key of the group
* @ return the matching commerce notification template
* @ throw... | return _commerceNotificationTemplateLocalService . getCommerceNotificationTemplateByUuidAndGroupId ( uuid , groupId ) ; |
public class DataModelFactory { /** * Generates a comment regarding the parameters .
* @ param entityId - id of the commented entity
* @ param entityType - type of the entity
* @ param action - the action performed by the user
* @ param commentedText - comment text
* @ param user - comment left by
* @ param... | final Comment comment = new Comment ( ) ; comment . setEntityId ( entityId ) ; comment . setEntityType ( entityType ) ; comment . setAction ( action ) ; comment . setCommentText ( commentedText ) ; comment . setCommentedBy ( user ) ; comment . setCreatedDateTime ( date ) ; return comment ; |
public class GenericDao { /** * 根据查询条件获取结果集列表
* @ param sql
* @ param params 无参数时可以为null
* @ return */
public List < ENTITY > findBySQL ( String sql , List < ? > params ) { } } | RowMapper < ENTITY > mapper = new GenericMapper < ENTITY , KEY > ( orMapping ) ; return findBySQL ( sql , params , mapper ) ; |
public class SchemaTypeChecker { /** * A special check for the magic @ deprecated directive
* @ param errors the list of errors
* @ param directive the directive to check
* @ param errorSupplier the error supplier function */
static void checkDeprecatedDirective ( List < GraphQLError > errors , Directive directiv... | if ( "deprecated" . equals ( directive . getName ( ) ) ) { // it can have zero args
List < Argument > arguments = directive . getArguments ( ) ; if ( arguments . size ( ) == 0 ) { return ; } // but if has more than it must have 1 called " reason " of type StringValue
if ( arguments . size ( ) == 1 ) { Argument arg = ar... |
public class SU { /** * Starts a new privilege - escalated environment , execute a closure , and shut it down . */
public static < V , T extends Throwable > V execute ( TaskListener listener , String rootUsername , String rootPassword , final Callable < V , T > closure ) throws T , IOException , InterruptedException { ... | VirtualChannel ch = start ( listener , rootUsername , rootPassword ) ; try { return ch . call ( closure ) ; } finally { ch . close ( ) ; ch . join ( 3000 ) ; // give some time for orderly shutdown , but don ' t block forever .
} |
public class SARLLabelProvider { /** * Replies the text for the given element .
* @ param element the element .
* @ return the text . */
@ SuppressWarnings ( "static-method" ) protected StyledString text ( SarlCapacityUses element ) { } } | return new StyledString ( Messages . SARLLabelProvider_0 , StyledString . QUALIFIER_STYLER ) ; |
public class PPatternAssistantTC { /** * Get a complete list of all definitions , including duplicates . This method should only be used only by PP */
private List < PDefinition > getAllDefinitions ( PPattern pattern , PType ptype , NameScope scope ) { } } | try { return pattern . apply ( af . getAllDefinitionLocator ( ) , new AllDefinitionLocator . NewQuestion ( ptype , scope ) ) ; } catch ( AnalysisException e ) { return null ; } |
public class LocalFileSystemStateManager { /** * Make utils class protected for easy unit testing */
protected ListenableFuture < Boolean > setData ( String path , byte [ ] data , boolean overwrite ) { } } | final SettableFuture < Boolean > future = SettableFuture . create ( ) ; boolean ret = FileUtils . writeToFile ( path , data , overwrite ) ; safeSetFuture ( future , ret ) ; return future ; |
public class SmartBinder { /** * Terminate this binder by looking up the named static method on the
* given target type . Perform the actual method lookup using the given
* Lookup object .
* @ param lookup the Lookup to use for handle lookups
* @ param target the type on which to find the static method
* @ pa... | return new SmartHandle ( start , binder . invokeStatic ( lookup , target , name ) ) ; |
public class RestBuilder { /** * Creates a provider that delivers type when needed
* @ param provider to be executed when needed
* @ param < T > provided object as argument
* @ return builder */
public < T > RestBuilder addProvider ( Class < T > clazz , Class < ? extends ContextProvider < T > > provider ) { } } | Assert . notNull ( clazz , "Missing provided class type!" ) ; Assert . notNull ( provider , "Missing context provider!" ) ; registeredProviders . put ( clazz , provider ) ; return this ; |
public class Attach { /** * { @ inheritDoc } */
public final void validate ( ) throws ValidationException { } } | /* * ; the following is optional , ; but MUST NOT occur more than once ( " ; " fmttypeparam ) / */
ParameterValidator . getInstance ( ) . assertOneOrLess ( Parameter . FMTTYPE , getParameters ( ) ) ; /* * ; the following is optional , ; and MAY occur more than once ( " ; " xparam ) */
/* * If the value type parameter i... |
public class ZkLeaderElection { /** * 如果参与了选举 , 那么退出主节点选举
* @ deprecated curator的选举算法有问题 , 在最后一个唯一节点 , 同时也是主节点退出选举时 , 它抛出java . lang . InterruptedException 。
* 所以请直接依赖zk断开连接的方式退出节点选举 , 而不是调用本方法来退出选举 */
public static void stop ( ) { } } | synchronized ( lock ) { if ( singleton == null ) return ; LeaderSelector leaderSelector = singleton . leaderSelector ; if ( leaderSelector == null ) { return ; } LOG . info ( "节点退出zk选举" ) ; leaderSelector . close ( ) ; singleton = null ; LOG . info ( "退出选举 完毕" ) ; } |
public class LibUtils { /** * Loads the specified library . < br >
* < br >
* The method will attempt to load the library using the usual
* < code > System . loadLibrary < / code > call . In this case , the specified
* dependent libraries are ignored , because they are assumed to be
* loaded automatically in ... | logger . log ( level , "Loading library: " + libraryName ) ; // First , try to load the specified library as a file
// that is visible in the default search path
Throwable throwableFromFile ; try { logger . log ( level , "Loading library as a file" ) ; System . loadLibrary ( libraryName ) ; logger . log ( level , "Load... |
public class AnnotatedTypes { /** * Returns the declaring { @ link AnnotatedType } of a given annotated .
* For an { @ link AnnotatedMember } , { @ link AnnotatedMember # getDeclaringType ( ) } is returned .
* For an { @ link AnnotatedParameter } , the declaring annotated type of { @ link AnnotatedParameter # getDe... | if ( annotated == null ) { throw new IllegalArgumentException ( "Annotated cannot be null" ) ; } if ( annotated instanceof AnnotatedType < ? > ) { return cast ( annotated ) ; } if ( annotated instanceof AnnotatedMember < ? > ) { return Reflections . < AnnotatedMember < ? > > cast ( annotated ) . getDeclaringType ( ) ; ... |
public class NameSpaceBinderImpl { /** * Creates the binding name used in the java : global lookup . The format is
* < app > / < module > / < ejbname > [ ! < fully qualified interface name ] for modules in an application and
* < module > / < ejbname > [ ! < fully qualified interface name ] for stand alone modules .... | StringBuffer bindingName = new StringBuffer ( ) ; if ( ! moduleMetaData . getEJBApplicationMetaData ( ) . isStandaloneModule ( ) ) { bindingName . append ( moduleMetaData . getEJBApplicationMetaData ( ) . getLogicalName ( ) ) ; bindingName . append ( "/" ) ; } bindingName . append ( moduleMetaData . ivLogicalName ) ; b... |
public class BaseBundleActivator { /** * Copy all the values from one dictionary to another .
* @ param sourceDictionary
* @ param destDictionary
* @ return */
public static Dictionary < String , String > putAll ( Dictionary < String , String > sourceDictionary , Dictionary < String , String > destDictionary ) { ... | if ( destDictionary == null ) destDictionary = new Hashtable < String , String > ( ) ; if ( sourceDictionary != null ) { Enumeration < String > keys = sourceDictionary . keys ( ) ; while ( keys . hasMoreElements ( ) ) { String key = keys . nextElement ( ) ; destDictionary . put ( key , sourceDictionary . get ( key ) ) ... |
public class EventHubConnectionsInner { /** * Returns an Event Hub connection .
* @ param resourceGroupName The name of the resource group containing the Kusto cluster .
* @ param clusterName The name of the Kusto cluster .
* @ param databaseName The name of the database in the Kusto cluster .
* @ param eventHu... | return getWithServiceResponseAsync ( resourceGroupName , clusterName , databaseName , eventHubConnectionName ) . map ( new Func1 < ServiceResponse < EventHubConnectionInner > , EventHubConnectionInner > ( ) { @ Override public EventHubConnectionInner call ( ServiceResponse < EventHubConnectionInner > response ) { retur... |
public class SSTableExport { /** * Enumerate row keys from an SSTableReader and write the result to a PrintStream .
* @ param desc the descriptor of the file to export the rows from
* @ param outs PrintStream to write the output to
* @ param metadata Metadata to print keys in a proper format
* @ throws IOExcept... | KeyIterator iter = new KeyIterator ( desc ) ; try { DecoratedKey lastKey = null ; while ( iter . hasNext ( ) ) { DecoratedKey key = iter . next ( ) ; // validate order of the keys in the sstable
if ( lastKey != null && lastKey . compareTo ( key ) > 0 ) throw new IOException ( "Key out of order! " + lastKey + " > " + ke... |
public class EncryptionProviderFactory { /** * Method which will return a new instance of { @ link EncryptionProvider }
* based on the settings of the key passed in .
* @ param key
* @ return
* @ return
* @ throws UnsupportedAlgorithmException
* @ throws UnsupportedKeySizeException */
public static Encrypti... | String algorithm = key . getAlgorithm ( ) ; SupportedKeyGenAlgorithms keyAlgorithm = getAlgorithm ( algorithm ) ; switch ( keyAlgorithm ) { case AES : return new AESEncryptionProvider ( key ) ; case DES : return new DESEdeEncryptionProvider ( key ) ; default : throw new UnsupportedAlgorithmException ( "Algorithm [" + k... |
public class ModConfigPanel { /** * Never ever call this Method from an event handler for those
* two buttons - endless loop !
* @ param newLoopValue
* @ since 11.01.2012 */
public void setLoopValue ( int newLoopValue ) { } } | if ( newLoopValue == Helpers . PLAYER_LOOP_DEACTIVATED ) { getPlayerSetUp_fadeOutLoops ( ) . setSelected ( false ) ; getPlayerSetUp_ignoreLoops ( ) . setSelected ( false ) ; } else if ( newLoopValue == Helpers . PLAYER_LOOP_FADEOUT ) { getPlayerSetUp_fadeOutLoops ( ) . setSelected ( true ) ; getPlayerSetUp_ignoreLoops ... |
public class AbstractExecutableMemberWriter { /** * Add the summary link for the member .
* @ param context the id of the context where the link will be printed
* @ param cd the classDoc that we should link to
* @ param member the member being linked to
* @ param tdSummary the content tree to which the link wil... | ExecutableMemberDoc emd = ( ExecutableMemberDoc ) member ; String name = emd . name ( ) ; Content memberLink = HtmlTree . SPAN ( HtmlStyle . memberNameLink , writer . getDocLink ( context , cd , ( MemberDoc ) emd , name , false ) ) ; Content code = HtmlTree . CODE ( memberLink ) ; addParameters ( emd , false , code , n... |
public class Http2Ping { /** * Registers a callback that is invoked when the ping operation completes . If this ping operation
* is already completed , the callback is invoked immediately .
* @ param callback the callback to invoke
* @ param executor the executor to use */
public void addCallback ( final ClientTr... | Runnable runnable ; synchronized ( this ) { if ( ! completed ) { callbacks . put ( callback , executor ) ; return ; } // otherwise , invoke callback immediately ( but not while holding lock )
runnable = this . failureCause != null ? asRunnable ( callback , failureCause ) : asRunnable ( callback , roundTripTimeNanos ) ;... |
public class PolicyDefinitionsInner { /** * Creates or updates a policy definition at management group level .
* @ param policyDefinitionName The name of the policy definition to create .
* @ param managementGroupId The ID of the management group .
* @ param parameters The policy definition properties .
* @ thr... | if ( policyDefinitionName == null ) { throw new IllegalArgumentException ( "Parameter policyDefinitionName is required and cannot be null." ) ; } if ( managementGroupId == null ) { throw new IllegalArgumentException ( "Parameter managementGroupId is required and cannot be null." ) ; } if ( parameters == null ) { throw ... |
public class NtlmUtil { /** * Generate the ANSI DES hash for the password associated with these credentials .
* @ param tc
* @ param password
* @ param challenge
* @ return the calculated response
* @ throws GeneralSecurityException */
static public byte [ ] getPreNTLMResponse ( CIFSContext tc , String passwo... | byte [ ] p14 = new byte [ 14 ] ; byte [ ] p21 = new byte [ 21 ] ; byte [ ] p24 = new byte [ 24 ] ; byte [ ] passwordBytes = Strings . getOEMBytes ( password , tc . getConfig ( ) ) ; int passwordLength = passwordBytes . length ; // Only encrypt the first 14 bytes of the password for Pre 0.12 NT LM
if ( passwordLength > ... |
public class PluginSqlMapDao { /** * used in tests */
@ Override public void deleteAllPlugins ( ) { } } | transactionTemplate . execute ( new TransactionCallbackWithoutResult ( ) { @ Override protected void doInTransactionWithoutResult ( TransactionStatus status ) { sessionFactory . getCurrentSession ( ) . createQuery ( "DELETE FROM " + Plugin . class . getSimpleName ( ) ) . executeUpdate ( ) ; } } ) ; |
public class DataSetLookupEditor { /** * View notifications */
void onDataSetSelected ( ) { } } | String selectedUUID = view . getSelectedDataSetId ( ) ; for ( DataSetDef dataSetDef : _dataSetDefList ) { if ( dataSetDef . getUUID ( ) . equals ( selectedUUID ) ) { fetchMetadata ( selectedUUID , new RemoteCallback < DataSetMetadata > ( ) { public void callback ( DataSetMetadata metadata ) { dataSetLookup = lookupCons... |
public class PartitionLevelWatermarker { /** * Return the previous high watermark if found in previous state . Else returns 0
* { @ inheritDoc }
* @ see org . apache . gobblin . data . management . conversion . hive . watermarker . HiveSourceWatermarker # getPreviousHighWatermark ( org . apache . hadoop . hive . ql... | if ( this . previousWatermarks . hasPartitionWatermarks ( tableKey ( partition . getTable ( ) ) ) ) { // If partition has a watermark return .
if ( this . previousWatermarks . get ( tableKey ( partition . getTable ( ) ) ) . containsKey ( partitionKey ( partition ) ) ) { return new LongWatermark ( this . previousWaterma... |
public class Matrix3d { /** * / * ( non - Javadoc )
* @ see org . joml . Matrix3dc # mulComponentWise ( org . joml . Matrix3dc , org . joml . Matrix3d ) */
public Matrix3d mulComponentWise ( Matrix3dc other , Matrix3d dest ) { } } | dest . m00 = m00 * other . m00 ( ) ; dest . m01 = m01 * other . m01 ( ) ; dest . m02 = m02 * other . m02 ( ) ; dest . m10 = m10 * other . m10 ( ) ; dest . m11 = m11 * other . m11 ( ) ; dest . m12 = m12 * other . m12 ( ) ; dest . m20 = m20 * other . m20 ( ) ; dest . m21 = m21 * other . m21 ( ) ; dest . m22 = m22 * other... |
public class Zipper { /** * Write a JSON Array .
* @ param jsonarray The JSONArray to write .
* @ throws JSONException If the write fails . */
private void write ( JSONArray jsonarray ) throws JSONException { } } | // JSONzip has three encodings for arrays :
// The array is empty ( zipEmptyArray ) .
// First value in the array is a string ( zipArrayString ) .
// First value in the array is not a string ( zipArrayValue ) .
boolean stringy = false ; int length = jsonarray . length ( ) ; if ( length == 0 ) { write ( zipEmptyArray , ... |
public class WebservicesType { /** * { @ inheritDoc } */
@ Override public void describe ( Diagnostics diag ) { } } | super . describe ( diag ) ; diag . describe ( "version" , version ) ; diag . describeIfSet ( "webservice-description" , this . webservice_descriptions ) ; |
public class SimpleMatrix { /** * Creates a new vector which is drawn from a multivariate normal distribution with zero mean
* and the provided covariance .
* @ see CovarianceRandomDraw _ DDRM
* @ param covariance Covariance of the multivariate normal distribution
* @ return Vector randomly drawn from the distr... | SimpleMatrix found = new SimpleMatrix ( covariance . numRows ( ) , 1 , covariance . getType ( ) ) ; switch ( found . getType ( ) ) { case DDRM : { CovarianceRandomDraw_DDRM draw = new CovarianceRandomDraw_DDRM ( random , ( DMatrixRMaj ) covariance . getMatrix ( ) ) ; draw . next ( ( DMatrixRMaj ) found . getMatrix ( ) ... |
public class BufferUtils { public static void writeTo ( ByteBuffer buffer , OutputStream out ) throws IOException { } } | if ( buffer . hasArray ( ) ) { out . write ( buffer . array ( ) , buffer . arrayOffset ( ) + buffer . position ( ) , buffer . remaining ( ) ) ; // update buffer position , in way similar to non - array version of writeTo
buffer . position ( buffer . position ( ) + buffer . remaining ( ) ) ; } else { byte [ ] bytes = ne... |
public class AlluxioJobMasterProcess { /** * Starts the gRPC server . The AlluxioMaster registers the Services of registered
* { @ link Master } s and meta services . */
protected void startServingRPCServer ( ) { } } | try { stopRejectingRpcServer ( ) ; LOG . info ( "Starting gRPC server on address {}" , mRpcBindAddress ) ; GrpcServerBuilder serverBuilder = GrpcServerBuilder . forAddress ( mRpcConnectAddress . getHostName ( ) , mRpcBindAddress , ServerConfiguration . global ( ) ) ; registerServices ( serverBuilder , mJobMaster . getS... |
public class InboundTransmissionParser { /** * Invoked to parse a conversation header structure from the supplied buffer .
* May be invoked multiple times to incrementally parse the structure .
* Once the structure has been fully parsed , transitions the state machine
* into the appropriate next state based on th... | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "parseConversationHeader" , contextBuffer ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JFapUtils . debugTraceWsByteBufferInfo ( this , tc , contextBuffer , "contextBuffer" ) ; WsByteB... |
public class PippoSettings { /** * Override the setting at runtime with the specified value .
* This change does not persist .
* @ param name
* @ param value */
public void overrideSetting ( String name , float value ) { } } | overrides . put ( name , Float . toString ( value ) ) ; |
public class TemplateFilter { /** * Method allow to find templates that contains some substring in name .
* Filtering is case insensitive .
* @ param names is not null list of name substrings
* @ return { @ link TemplateFilter }
* @ throws java . lang . NullPointerException if { @ code names } is null */
public... | allItemsNotNull ( names , "Name substrings" ) ; predicate = predicate . and ( combine ( TemplateMetadata :: getName , in ( asList ( names ) , Predicates :: containsIgnoreCase ) ) ) ; return this ; |
public class BaseNeo4jEntityQueries { /** * Example :
* MATCH ( owner : ENTITY : Car { ` carId . maker ` : { 0 } , ` carId . model ` : { 1 } } ) < - [ r : tires ] - ( target )
* OPTIONAL MATCH ( target ) - [ x * 1 . . ] - > ( e : EMBEDDED )
* RETURN id ( target ) , extract ( n IN x | type ( n ) ) , x , e ORDER BY... | StringBuilder queryBuilder = findAssociationPartialQuery ( relationshipType , associationKeyMetadata ) ; queryBuilder . append ( "OPTIONAL MATCH (target) -[x*1..]->(e:EMBEDDED) " ) ; // Should we split this in two Queries ?
queryBuilder . append ( "RETURN id(target), extract(n IN x| type(n)), x, e ORDER BY id(target)" ... |
public class FileColumn { /** * Returns the data type for the given value .
* @ param value The data type value
* @ return The code for the data type */
private short getDataType ( String value ) { } } | short ret = STRING_TYPE ; if ( value . equals ( "number" ) ) ret = NUMBER_TYPE ; else if ( value . equals ( "integer" ) ) ret = INTEGER_TYPE ; else if ( value . equals ( "decimal" ) ) ret = DECIMAL_TYPE ; else if ( value . equals ( "seconds" ) ) ret = SECONDS_TYPE ; else if ( value . equals ( "datetime" ) ) ret = DATET... |
public class SysViewWorkspaceInitializer { /** * { @ inheritDoc } */
public NodeData initWorkspace ( ) throws RepositoryException { } } | if ( isWorkspaceInitialized ( ) ) { return ( NodeData ) dataManager . getItemData ( Constants . ROOT_UUID ) ; } long start = System . currentTimeMillis ( ) ; isRestoreInProgress = true ; try { doRestore ( ) ; } catch ( Throwable e ) // NOSONAR
{ throw new RepositoryException ( e ) ; } finally { isRestoreInProgress = fa... |
public class SimpleCycleBasis { private void minimize ( int startIndex ) { } } | if ( isMinimized ) return ; // Implementation of " Algorithm 1 " from [ BGdV04]
boolean [ ] [ ] a = getCycleEdgeIncidenceMatrix ( ) ; for ( int i = startIndex ; i < cycles . size ( ) ; i ++ ) { // " Subroutine 2"
// Construct kernel vector u
boolean [ ] u = constructKernelVector ( edgeList . size ( ) , a , i ) ; // Con... |
public class JSONAssert { /** * Asserts that the JSONArray provided does not match the expected string . If it is it throws an
* { @ link AssertionError } .
* @ param message Error message to be displayed in case of assertion failure
* @ param expectedStr Expected JSON string
* @ param actualStr String to compa... | JSONCompareResult result = JSONCompare . compareJSON ( expectedStr , actualStr , compareMode ) ; if ( result . passed ( ) ) { throw new AssertionError ( getCombinedMessage ( message , result . getMessage ( ) ) ) ; } |
public class CoreDocumentSynchronizationConfig { /** * Sets that there are some pending writes that occurred at a time for an associated
* locally emitted change event . This variant maintains the last version set .
* @ param atTime the time at which the write occurred .
* @ param changeEvent the description of t... | docLock . writeLock ( ) . lock ( ) ; try { // if we were frozen
if ( isPaused ) { // unfreeze the document due to the local write
setPaused ( false ) ; // and now the unfrozen document is now stale
setStale ( true ) ; } this . lastUncommittedChangeEvent = coalesceChangeEvents ( this . lastUncommittedChangeEvent , chang... |
public class Group { /** * The keys that are included in this group .
* < b > NOTE : < / b > This method appends the values to the existing list ( if any ) . Use
* { @ link # setKeys ( java . util . Collection ) } or { @ link # withKeys ( java . util . Collection ) } if you want to override the
* existing values ... | if ( this . keys == null ) { setKeys ( new java . util . ArrayList < String > ( keys . length ) ) ; } for ( String ele : keys ) { this . keys . add ( ele ) ; } return this ; |
public class Expressions { /** * Create a new NumberExpression
* @ param value Number
* @ return new NumberExpression */
public static < T extends Number & Comparable < ? > > NumberExpression < T > asNumber ( T value ) { } } | return asNumber ( constant ( value ) ) ; |
public class PTBConstituent { /** * setter for ref - sets Th reference from the null constituent to the corresponding lexicalized constituent , O
* @ generated
* @ param v value to set into the feature */
public void setRef ( Constituent v ) { } } | if ( PTBConstituent_Type . featOkTst && ( ( PTBConstituent_Type ) jcasType ) . casFeat_ref == null ) jcasType . jcas . throwFeatMissing ( "ref" , "de.julielab.jules.types.PTBConstituent" ) ; jcasType . ll_cas . ll_setRefValue ( addr , ( ( PTBConstituent_Type ) jcasType ) . casFeatCode_ref , jcasType . ll_cas . ll_getFS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.