signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class SAIS { /** * / * String */
public static int suffixsort ( String T , int [ ] SA , int n ) { } } | if ( ( T == null ) || ( SA == null ) || ( T . length ( ) < n ) || ( SA . length < n ) ) { return - 1 ; } if ( n <= 1 ) { if ( n == 1 ) { SA [ 0 ] = 0 ; } return 0 ; } return SA_IS ( new StringArray ( T , 0 ) , SA , 0 , n , 65536 , false ) ; |
public class RelationalOperations { /** * Returns true if the relation holds . */
private static boolean multiPointRelateEnvelope_ ( MultiPoint multipoint_a , Envelope envelope_b , double tolerance , int relation , ProgressTracker progress_tracker ) { } } | switch ( relation ) { case Relation . disjoint : return multiPointDisjointEnvelope_ ( multipoint_a , envelope_b , tolerance , progress_tracker ) ; case Relation . within : return multiPointWithinEnvelope_ ( multipoint_a , envelope_b , tolerance , progress_tracker ) ; case Relation . contains : return multiPointContains... |
public class AbstractNumberPickerPreference { /** * Obtains all attributes from a specific attribute set .
* @ param attributeSet
* The attribute set , the attributes should be obtained from , as an instance of the type
* { @ link AttributeSet } or null , if no attributes should be obtained
* @ param defaultSty... | TypedArray numberPickerTypedArray = getContext ( ) . obtainStyledAttributes ( attributeSet , R . styleable . AbstractNumberPickerPreference , defaultStyle , defaultStyleResource ) ; TypedArray unitTypedArray = getContext ( ) . obtainStyledAttributes ( attributeSet , R . styleable . AbstractUnitPreference , defaultStyle... |
public class A_CmsTabHandler { /** * Selects the given resource and sets its path into the xml - content field or editor link . < p >
* @ param resourcePath the item resource path
* @ param structureId the structure id
* @ param title the resource title
* @ param resourceType the item resource type */
public vo... | m_controller . selectResource ( resourcePath , structureId , title , resourceType ) ; |
public class AbstractStoreResource { /** * Set the info for the file in this store reosurce .
* @ param _ filename name of the file
* @ param _ fileLength length of the file
* @ throws EFapsException on error */
protected void setFileInfo ( final String _filename , final long _fileLength ) throws EFapsException {... | if ( ! _filename . equals ( this . fileName ) || _fileLength != this . fileLength ) { ConnectionResource res = null ; try { res = Context . getThreadContext ( ) . getConnectionResource ( ) ; final AbstractDatabase < ? > db = Context . getDbType ( ) ; final StringBuilder cmd = new StringBuilder ( ) . append ( db . getSQ... |
public class CheckBox { /** * < p > Changes the checked state of this button . < / p >
* @ param checked true to check the button , false to uncheck it */
public void setChecked ( boolean checked ) { } } | setChecked ( checked ? CheckableDrawable . CheckedState . CHECKED : CheckableDrawable . CheckedState . UNCHECKED ) ; |
public class Config { /** * Loads a config file
* @ param resource The config file */
@ SneakyThrows public static void loadConfig ( Resource resource ) { } } | if ( resource == null || ! resource . exists ( ) ) { return ; } if ( resource . path ( ) != null && getInstance ( ) . loaded . contains ( resource . path ( ) ) ) { return ; // Only load once !
} new ConfigParser ( resource ) . parse ( ) ; if ( resource . path ( ) != null ) { getInstance ( ) . loaded . add ( resource . ... |
public class KeyVaultClientBaseImpl { /** * List all versions of the specified secret .
* The full secret identifier and attributes are provided in the response . No values are returned for the secrets . This operations requires the secrets / list permission .
* @ param vaultBaseUrl The vault name , for example htt... | if ( vaultBaseUrl == null ) { throw new IllegalArgumentException ( "Parameter vaultBaseUrl is required and cannot be null." ) ; } if ( secretName == null ) { throw new IllegalArgumentException ( "Parameter secretName is required and cannot be null." ) ; } if ( this . apiVersion ( ) == null ) { throw new IllegalArgument... |
public class TextWrapper { /** * todo eude - merge with com . haulmont . yarg . formatters . impl . DocxFormatterDelegate . handleStringWithAliases ( ) */
public void fillTextWithBandData ( ) { } } | Matcher matcher = AbstractFormatter . ALIAS_WITH_BAND_NAME_PATTERN . matcher ( text . getValue ( ) ) ; while ( matcher . find ( ) ) { String alias = matcher . group ( 1 ) ; String stringFunction = matcher . group ( 2 ) ; AbstractFormatter . BandPathAndParameterName bandAndParameter = docxFormatter . separateBandNameAnd... |
public class Button { /** * Release any acquired resources . */
protected void localRelease ( ) { } } | super . localRelease ( ) ; _state . clear ( ) ; _action = null ; _value = null ; _text = null ; _params = null ; _targetScope = null ; _popupSupport = null ; _disableSecondClick = false ; _renderAsButton = false ; |
public class AsmClassGenerator { public void visitClass ( ClassNode classNode ) { } } | referencedClasses . clear ( ) ; WriterControllerFactory factory = ( WriterControllerFactory ) classNode . getNodeMetaData ( WriterControllerFactory . class ) ; WriterController normalController = new WriterController ( ) ; if ( factory != null ) { this . controller = factory . makeController ( normalController ) ; } el... |
public class CTInboxMessageContent { /** * Returns the text for the JSONObject of Link provided
* The JSONObject of Link provided should be of the type " copy "
* @ param jsonObject of Link
* @ return String */
public String getLinkCopyText ( JSONObject jsonObject ) { } } | if ( jsonObject == null ) return "" ; try { JSONObject copyObject = jsonObject . has ( "copyText" ) ? jsonObject . getJSONObject ( "copyText" ) : null ; if ( copyObject != null ) { return copyObject . has ( "text" ) ? copyObject . getString ( "text" ) : "" ; } else { return "" ; } } catch ( JSONException e ) { Logger .... |
public class MoveOnSelectHandler { /** * Constructor .
* @ param pfldDest tour . field . BaseField The destination field .
* @ param fldSource The source field .
* @ param pCheckMark If is field if false , don ' t move the data .
* @ param bMoveOnNew If true , move on new also .
* @ param bMoveOnValid If true... | super . init ( record , fldDest , fldSource , convCheckMark , bMoveOnNew , bMoveOnValid , bMoveOnSelect , bMoveOnAdd , bMoveOnUpdate , strSource , bDontMoveNullSource ) ; |
public class ServletContextResourceReaderHandler { /** * ( non - Javadoc )
* @ see
* net . jawr . web . resource . handler . reader . ResourceBrowser # getResourceNames
* ( java . lang . String ) */
@ Override public Set < String > getResourceNames ( String dirName ) { } } | Set < String > resourceNames = new TreeSet < > ( ) ; List < ResourceBrowser > list = new ArrayList < > ( ) ; list . addAll ( resourceInfoProviders ) ; for ( ResourceBrowser rsBrowser : list ) { if ( generatorRegistry . isPathGenerated ( dirName ) ) { if ( rsBrowser instanceof ResourceGenerator ) { ResourceGenerator rsG... |
public class AnalyticsItemsInner { /** * Deletes a specific Analytics Items defined within an Application Insights component .
* @ param resourceGroupName The name of the resource group .
* @ param resourceName The name of the Application Insights component resource .
* @ param scopePath Enum indicating if this i... | deleteWithServiceResponseAsync ( resourceGroupName , resourceName , scopePath ) . toBlocking ( ) . single ( ) . body ( ) ; |
public class JspConfigTypeImpl { /** * If not already created , a new < code > taglib < / code > element will be created and returned .
* Otherwise , the first existing < code > taglib < / code > element will be returned .
* @ return the instance defined for the element < code > taglib < / code > */
public TaglibTy... | List < Node > nodeList = childNode . get ( "taglib" ) ; if ( nodeList != null && nodeList . size ( ) > 0 ) { return new TaglibTypeImpl < JspConfigType < T > > ( this , "taglib" , childNode , nodeList . get ( 0 ) ) ; } return createTaglib ( ) ; |
public class JcrGroovyCompiler { /** * Compile Groovy source that located in < code > sourceReferences < / code > .
* Compiled sources can be dependent to each other and dependent to Groovy
* sources that are accessible for this compiler and with additional Groovy
* sources < code > src < / code > . < b > NOTE < ... | SourceFile [ ] files = new SourceFile [ sourceReferences . length ] ; for ( int i = 0 ; i < sourceReferences . length ; i ++ ) files [ i ] = new SourceFile ( sourceReferences [ i ] . getURL ( ) ) ; return doCompile ( ( JcrGroovyClassLoader ) classLoaderProvider . getGroovyClassLoader ( src ) , files ) ; |
public class AbstractXTree { /** * Celebrated by the Profiler as a lot faster than the previous variant : that
* used to calculate all overlaps of the old MBR and the new MBR with all
* other MBRs . Now : The overlaps are only calculated if necessary : < br >
* < ul >
* < li > the new MBR does not have to be te... | ModifiableHyperBoundingBox eiMBR = new ModifiableHyperBoundingBox ( ei ) ; ModifiableHyperBoundingBox testMBRModifiable = new ModifiableHyperBoundingBox ( testMBR ) ; double [ ] lb = eiMBR . getMinRef ( ) ; double [ ] ub = eiMBR . getMaxRef ( ) ; double [ ] lbT = testMBRModifiable . getMinRef ( ) ; double [ ] ubT = tes... |
public class LongTupleIterators { /** * Returns an iterator that returns { @ link MutableLongTuple } s in the
* given range . < br >
* < br >
* Copies of the given tuples will be stored internally . < br >
* < br >
* Also see < a href = " . . / . . / package - summary . html # IterationOrder " >
* Iteration... | Utils . checkForEqualSize ( min , max ) ; LongTuple localMin = LongTuples . copy ( min ) ; LongTuple localMax = LongTuples . copy ( max ) ; return new LongTupleIterator ( localMin , localMax , LongTupleIncrementors . lexicographicalIncrementor ( ) ) ; |
public class PackedMemoryCloneIndex { /** * Performs sorting , if necessary . */
private void ensureSorted ( ) { } } | if ( sorted ) { return ; } ensureCapacity ( ) ; DataUtils . sort ( byBlockHash ) ; for ( int i = 0 ; i < size ; i ++ ) { resourceIdsIndex [ i ] = i ; } DataUtils . sort ( byResourceId ) ; sorted = true ; |
public class ContainerKeyIndex { /** * Looks up a Backpointer offset .
* @ param segment A DirectSegmentAccess providing access to the Segment to search in .
* @ param offset The offset to find a backpointer from .
* @ param timeout Timeout for the operation .
* @ return A CompletableFuture that , when complete... | Exceptions . checkNotClosed ( this . closed . get ( ) , this ) ; // First check the index tail cache .
long cachedBackpointer = this . cache . getBackpointer ( segment . getSegmentId ( ) , offset ) ; if ( cachedBackpointer >= 0 ) { return CompletableFuture . completedFuture ( cachedBackpointer ) ; } if ( offset <= this... |
public class WorkbinsApi { /** * Get the content of a Workbin .
* @ param workbinId Id of the Workbin ( required )
* @ param getWorkbinContentData ( required )
* @ return ApiSuccessResponse
* @ throws ApiException If fail to call the API , e . g . server error or cannot deserialize the response body */
public A... | ApiResponse < ApiSuccessResponse > resp = getWorkbinContentWithHttpInfo ( workbinId , getWorkbinContentData ) ; return resp . getData ( ) ; |
public class DeleteResponseUnmarshaller { /** * { @ inheritDoc } */
@ Override public Object unMarshall ( Response < DeleteResponse > response , Class < ? > entity ) { } } | try { consume ( response . getResult ( ) ) ; return statusMessage ; } catch ( Exception e ) { throw new MappingException ( e ) ; } |
public class AbstractStructuredRenderer { /** * Converts component dependencies to a human - readable text .
* @ param component a component
* @ return a non - null list of component names that match those this component needs */
private List < String > getImportComponents ( Component component ) { } } | List < String > result = new ArrayList < > ( ) ; Map < String , Boolean > map = ComponentHelpers . findComponentDependenciesFor ( component ) ; for ( Map . Entry < String , Boolean > entry : map . entrySet ( ) ) { String s = applyLink ( entry . getKey ( ) , entry . getKey ( ) ) ; s += entry . getValue ( ) ? this . mess... |
public class CmsRadioButtonGroupWidget { /** * Sets the value of the widget . < p >
* @ param value the new value */
public void setFormValue ( Object value ) { } } | if ( value == null ) { value = "" ; } if ( value instanceof String ) { String strValue = ( String ) value ; if ( strValue . equals ( "" ) ) { // interpret empty string as " no radio button selected "
reset ( ) ; } else { CmsRadioButton button = m_radioButtons . get ( value ) ; m_group . selectButton ( button ) ; } } |
public class SeaGlassStyleWrapper { /** * Gets the appropriate background Painter , if there is one , for the state
* specified in the given SynthContext . This method does appropriate
* fallback searching , as described in # get .
* @ param ctx The SynthContext . Must not be null .
* @ return The background pa... | if ( ! ( style instanceof SeaGlassStyle ) ) { return null ; } return new PainterWrapper ( ( ( SeaGlassStyle ) style ) . getBackgroundPainter ( ctx ) ) ; |
public class PdfCopyFieldsImp { /** * Checks if a reference refers to a page object .
* @ paramrefthe reference that needs to be checked
* @ returntrue is the reference refers to a page object . */
protected boolean isPage ( PRIndirectReference ref ) { } } | IntHashtable refs = ( IntHashtable ) pages2intrefs . get ( ref . getReader ( ) ) ; if ( refs != null ) return refs . containsKey ( ref . getNumber ( ) ) ; else return false ; |
public class PlanAssembler { /** * Generate best cost plans for each Subquery expression from the list
* @ param subqueryExprs - list of subquery expressions
* @ return true if a best plan was generated for each subquery , false otherwise */
private boolean getBestCostPlanForExpressionSubQueries ( Set < AbstractExp... | int nextPlanId = m_planSelector . m_planId ; for ( AbstractExpression expr : subqueryExprs ) { assert ( expr instanceof SelectSubqueryExpression ) ; if ( ! ( expr instanceof SelectSubqueryExpression ) ) { continue ; // DEAD CODE ?
} SelectSubqueryExpression subqueryExpr = ( SelectSubqueryExpression ) expr ; StmtSubquer... |
public class TrueTypeFont { /** * Draw a string
* @ param x
* The x position to draw the string
* @ param y
* The y position to draw the string
* @ param whatchars
* The string to draw */
public void drawString ( float x , float y , String whatchars ) { } } | drawString ( x , y , whatchars , org . newdawn . slick . Color . white ) ; |
public class Bytes { /** * Converts a byte array to a long value .
* @ param bytes array of bytes
* @ param offset offset into array
* @ param length length of data ( must be { @ link # SIZEOF _ LONG } )
* @ return the long value
* @ throws IllegalArgumentException if length is not { @ link # SIZEOF _ LONG } ... | if ( length != SIZEOF_LONG || offset + length > bytes . length ) { throw explainWrongLengthOrOffset ( bytes , offset , length , SIZEOF_LONG ) ; } long l = 0 ; for ( int i = offset ; i < offset + length ; i ++ ) { l <<= 8 ; l ^= bytes [ i ] & 0xFF ; } return l ; |
public class Client { /** * Returns virtual host shovels .
* @ return Shovels . */
public List < ShovelStatus > getShovelsStatus ( ) { } } | final URI uri = uriWithPath ( "./shovels/" ) ; return Arrays . asList ( this . rt . getForObject ( uri , ShovelStatus [ ] . class ) ) ; |
public class CloudStorageApi { /** * Get the Cloud Storage Provider configuration for the specified user .
* Retrieves the list of cloud storage providers enabled for the account and the configuration information for the user . The { serviceId } parameter can be either the service name or serviceId .
* @ param acco... | return listProviders ( accountId , userId , null ) ; |
public class JSON { /** * Mutant factory for constructing an instance with specified { @ link TreeCodec } ,
* and returning new instance ( or , if there would be no change , this instance ) . */
public JSON with ( TreeCodec c ) { } } | if ( c == _treeCodec ) { return this ; } return _with ( _features , _streamFactory , c , _reader , _writer . with ( c ) , _prettyPrinter ) ; |
public class BGZFSplitGuesser { /** * Returns a negative number if it doesn ' t find anything . */
private int guessNextBGZFPos ( int p , int end ) throws IOException { } } | for ( ; ; ) { for ( ; ; ) { in . seek ( p ) ; in . read ( buf . array ( ) , 0 , 4 ) ; int n = buf . getInt ( 0 ) ; if ( n == BGZF_MAGIC ) break ; // Skip ahead a bit more than 1 byte if you can .
if ( n >>> 8 == BGZF_MAGIC << 8 >>> 8 ) ++ p ; else if ( n >>> 16 == BGZF_MAGIC << 16 >>> 16 ) p += 2 ; else p += 3 ; if ( p... |
public class WSConfigurationHelperImpl { /** * ( non - Javadoc )
* @ see com . ibm . websphere . config . WSConfigurationHelper # removeDefaultConfiguration ( java . lang . String , java . lang . String ) */
@ Override public boolean removeDefaultConfiguration ( String pid , String id ) throws ConfigUpdateException {... | return bundleProcessor . removeDefaultConfiguration ( pid , id ) ; |
public class GenderRatioProcessor { /** * Prints some basic documentation about this program . */
public static void printDocumentation ( ) { } } | System . out . println ( "********************************************************************" ) ; System . out . println ( "*** Wikidata Toolkit: GenderRatioProcessor" ) ; System . out . println ( "*** " ) ; System . out . println ( "*** This program will download and process dumps from Wikidata." ) ; System . out . ... |
public class DirectBytes { /** * Allocates a new direct byte array .
* @ param size The count of the buffer to allocate ( in bytes ) .
* @ return The direct buffer .
* @ throws IllegalArgumentException If { @ code count } is greater than the maximum allowed count for
* an array on the Java heap - { @ code Integ... | if ( size > MAX_SIZE ) { throw new IllegalArgumentException ( "size cannot for DirectBytes cannot be greater than " + MAX_SIZE ) ; } return new DirectBytes ( ByteBuffer . allocateDirect ( ( int ) size ) ) ; |
public class KeenClient { /** * Adds an event to the default project with no callbacks .
* @ see # addEvent ( KeenProject , String , java . util . Map , java . util . Map , KeenCallback )
* @ param eventCollection The name of the collection in which to publish the event .
* @ param event A Map that consists of ke... | addEventAsync ( null , eventCollection , event , keenProperties , null ) ; |
public class GoogleCloudStorageImpl { /** * Helper for both listObjectNames and listObjectInfo that executes the actual API calls to get
* paginated lists , accumulating the StorageObjects and String prefixes into the params { @ code
* listedObjects } and { @ code listedPrefixes } .
* @ param bucketName bucket na... | logger . atFine ( ) . log ( "listStorageObjectsAndPrefixes(%s, %s, %s, %s, %d)" , bucketName , objectNamePrefix , delimiter , includeTrailingDelimiter , maxResults ) ; checkArgument ( listedObjects != null && listedObjects . isEmpty ( ) , "Must provide a non-null empty container for listedObjects." ) ; checkArgument ( ... |
public class BaseForeignCollection { /** * Add the collection of elements to this collection . This will also them to the associated database table .
* @ return Returns true if any of the items did not already exist in the collection otherwise false . */
@ Override public boolean addAll ( Collection < ? extends T > c... | boolean changed = false ; for ( T data : collection ) { try { if ( addElement ( data ) ) { changed = true ; } } catch ( SQLException e ) { throw new IllegalStateException ( "Could not create data elements in dao" , e ) ; } } return changed ; |
public class LabelsDeserializer { /** * Gson invokes this call - back method during deserialization when it encounters a field of the specified type .
* @ param element The Json data being deserialized
* @ param type The type of the Object to deserialize to
* @ param context The JSON deserialization context
* @... | JsonObject obj = element . getAsJsonObject ( ) ; JsonArray labels = obj . getAsJsonArray ( "labels" ) ; List < Label > values = new ArrayList < Label > ( ) ; if ( labels != null && labels . isJsonArray ( ) ) { for ( JsonElement label : labels ) values . add ( gson . fromJson ( label , Label . class ) ) ; } return value... |
public class DistributedLogSession { /** * Handles a cluster event . */
private void handleClusterEvent ( ClusterMembershipEvent event ) { } } | PrimaryTerm term = this . term ; if ( term != null && event . type ( ) == ClusterMembershipEvent . Type . MEMBER_REMOVED && event . subject ( ) . id ( ) . equals ( term . primary ( ) . memberId ( ) ) ) { changeState ( PrimitiveState . SUSPENDED ) ; } |
public class IntervalHistogram { /** * The starting point of interval that contains the smallest value added to
* this histogram . */
public long getMin ( ) { } } | for ( int i = 0 ; i < hits . length ( ) ; i ++ ) { if ( hits . get ( i ) > 0 ) { return i == 0 ? 0 : 1 + bins [ i - 1 ] ; } } return 0 ; |
public class UpdateGatewayResponseResult { /** * Response templates of the < a > GatewayResponse < / a > as a string - to - string map of key - value pairs .
* @ param responseTemplates
* Response templates of the < a > GatewayResponse < / a > as a string - to - string map of key - value pairs .
* @ return Return... | setResponseTemplates ( responseTemplates ) ; return this ; |
public class ShrinkWrapFileSystemProvider { /** * { @ inheritDoc }
* @ see java . nio . file . spi . FileSystemProvider # checkAccess ( java . nio . file . Path , java . nio . file . AccessMode [ ] ) */
@ Override public void checkAccess ( final Path path , final AccessMode ... modes ) throws IOException { } } | // We support READ , WRITE , and EXECUTE on everything , so long as a file exists
final Archive < ? > archive = this . getArchive ( path ) ; final String desired = path . toString ( ) ; if ( ! archive . contains ( desired ) ) { throw new NoSuchFileException ( desired ) ; } |
public class CmsGalleryDialog { /** * Updates the dialog size according to the requirements of the selected tab . < p >
* @ param tab the selected tab */
public void updateSizeForTab ( A_CmsTab tab ) { } } | if ( tab == m_resultsTab ) { m_resultsTab . updateListSize ( ) ; } if ( ! m_previewVisible ) { int height = tab . getRequiredHeight ( ) + 42 ; int availableHeight = CmsToolbarPopup . getAvailableHeight ( ) ; setDialogSize ( m_width , height < availableHeight ? height : availableHeight ) ; tab . onResize ( ) ; } |
public class UpdateByPrimaryKeySelectiveForceProvider { /** * 判断自动 ! = null的条件结构
* @ param entityName
* @ param column
* @ param contents
* @ param empty
* @ return */
public String getIfNotNull ( String entityName , EntityColumn column , String contents , boolean empty ) { } } | StringBuilder sql = new StringBuilder ( ) ; sql . append ( "<choose>" ) ; sql . append ( "<when test=\"" ) ; if ( StringUtil . isNotEmpty ( entityName ) ) { sql . append ( entityName ) . append ( "." ) ; } sql . append ( column . getProperty ( ) ) . append ( " != null" ) ; if ( empty && column . getJavaType ( ) . equal... |
public class PersistentUserManagedEhcache { /** * { @ inheritDoc } */
@ Override public void destroy ( ) throws CachePersistenceException { } } | StatusTransitioner . Transition st = statusTransitioner . maintenance ( ) ; try { st . succeeded ( ) ; } catch ( Throwable t ) { throw st . failed ( t ) ; } destroyInternal ( ) ; // Exit maintenance mode once # 934 is solved
// statusTransitioner . exitMaintenance ( ) . succeeded ( ) ; |
public class Partitioner { /** * Create a List of Partition objects of the specified size , which span the
* date range specified .
* @ param size of Partitions to create
* @ param start Date of beginning of time range to cover
* @ param end Date of end of time range to cover
* @ return List of Partitions spa... | // logDates ( " Constructing partitions Size ( " + size . name ( ) + " ) " , start , end ) ;
// Date origStart = new Date ( start . getTime ( ) ) ;
List < Partition < T > > partitions = new ArrayList < Partition < T > > ( ) ; Calendar cStart = Calendar . getInstance ( TZ_UTC ) ; cStart . setTime ( start ) ; size . alig... |
public class ScanDynamicStoreAdapter { /** * 扫描更新回调函数 */
public static void scanUpdateCallbacks ( ScanStaticModel scanModel , Registry registry ) { } } | // 扫描出来
ScanDynamicModel scanDynamicModel = analysis4DisconfUpdate ( scanModel , registry ) ; // 写到仓库中
transformUpdateService ( scanDynamicModel . getDisconfUpdateServiceInverseIndexMap ( ) ) ; transformPipelineService ( scanDynamicModel . getDisconfUpdatePipeline ( ) ) ; |
public class J4pClientBuilder { /** * Parse proxy specification and return a proxy object representing the proxy configuration .
* @ param spec specification of for a proxy
* @ return proxy object or null if none is set */
static Proxy parseProxySettings ( String spec ) { } } | try { if ( spec == null || spec . length ( ) == 0 ) { return null ; } return new Proxy ( spec ) ; } catch ( URISyntaxException e ) { return null ; } |
public class ApiOvhMe { /** * Get this object properties
* REST : GET / me / deposit / { depositId } / payment
* @ param depositId [ required ] */
public OvhPayment deposit_depositId_payment_GET ( String depositId ) throws IOException { } } | String qPath = "/me/deposit/{depositId}/payment" ; StringBuilder sb = path ( qPath , depositId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhPayment . class ) ; |
public class BufferedInputStream { /** * Reads bytes from this byte - input stream into the specified byte array ,
* starting at the given offset .
* < p > This method implements the general contract of the corresponding
* < code > { @ link InputStream # read ( byte [ ] , int , int ) read } < / code > method of
... | getBufIfOpen ( ) ; // Check for closed stream
if ( ( off | len | ( off + len ) | ( b . length - ( off + len ) ) ) < 0 ) { throw new IndexOutOfBoundsException ( ) ; } else if ( len == 0 ) { return 0 ; } int n = 0 ; for ( ; ; ) { int nread = read1 ( b , off + n , len - n ) ; if ( nread <= 0 ) return ( n == 0 ) ? nread : ... |
public class HtmlDocletWriter { /** * Return the link to the given package .
* @ param pkg the package to link to .
* @ param label the label for the link .
* @ return a content tree for the package link . */
public Content getPackageLink ( PackageDoc pkg , String label ) { } } | return getPackageLink ( pkg , new StringContent ( label ) ) ; |
public class Triangle3f { /** * { @ inheritDoc } */
@ Override public Vector3f getNormal ( ) { } } | Vector3f v = null ; if ( this . normal != null ) { v = this . normal . get ( ) ; } if ( v == null ) { v = new Vector3f ( ) ; FunctionalVector3D . crossProduct ( this . p2 . getX ( ) - this . p1 . getX ( ) , this . p2 . getY ( ) - this . p1 . getY ( ) , this . p2 . getZ ( ) - this . p1 . getZ ( ) , this . p3 . getX ( ) ... |
public class MessageFilterLexer { /** * $ ANTLR start " OCTAL _ ESC " */
public final void mOCTAL_ESC ( ) throws RecognitionException { } } | try { // MessageFilter . g : 232:5 : ( ' \ \ \ \ ' ( ' 0 ' . . ' 3 ' ) ( ' 0 ' . . ' 7 ' ) ( ' 0 ' . . ' 7 ' ) | ' \ \ \ \ ' ( ' 0 ' . . ' 7 ' ) ( ' 0 ' . . ' 7 ' ) | ' \ \ \ \ ' ( ' 0 ' . . ' 7 ' ) )
int alt18 = 3 ; int LA18_0 = input . LA ( 1 ) ; if ( ( LA18_0 == '\\' ) ) { int LA18_1 = input . LA ( 2 ) ; if ( ( ( LA... |
public class JSONObject { /** * Get an optional int value associated with a key , or the default if there
* is no such key or if the value is not a number . If the value is a string ,
* an attempt will be made to evaluate it as a number .
* @ param key
* A key string .
* @ param defaultValue
* The default .... | final Number val = this . optNumber ( key , null ) ; if ( val == null ) { return defaultValue ; } return val . intValue ( ) ; |
public class CommerceAccountUserRelLocalServiceBaseImpl { /** * Creates a new commerce account user rel with the primary key . Does not add the commerce account user rel to the database .
* @ param commerceAccountUserRelPK the primary key for the new commerce account user rel
* @ return the new commerce account use... | return commerceAccountUserRelPersistence . create ( commerceAccountUserRelPK ) ; |
public class ICUNotifier { /** * Queue a notification on the notification thread for the current
* listeners . When the thread unqueues the notification , notifyListener
* is called on each listener from the notification thread . */
public void notifyChanged ( ) { } } | if ( listeners != null ) { synchronized ( notifyLock ) { if ( listeners != null ) { if ( notifyThread == null ) { notifyThread = new NotifyThread ( this ) ; notifyThread . setDaemon ( true ) ; notifyThread . start ( ) ; } notifyThread . queue ( listeners . toArray ( new EventListener [ listeners . size ( ) ] ) ) ; } } ... |
public class MultiPointCrossover { /** * Package private for testing purpose . */
static < T > void crossover ( final MSeq < T > that , final MSeq < T > other , final int [ ] indexes ) { } } | for ( int i = 0 ; i < indexes . length - 1 ; i += 2 ) { final int start = indexes [ i ] ; final int end = indexes [ i + 1 ] ; that . swap ( start , end , other , start ) ; } if ( indexes . length % 2 == 1 ) { final int index = indexes [ indexes . length - 1 ] ; that . swap ( index , min ( that . length ( ) , other . le... |
public class Journaler { /** * Delegate to the JournalWorker . */
public String [ ] getNextPID ( Context context , int numPIDs , String namespace ) throws ServerException { } } | return worker . getNextPID ( context , numPIDs , namespace ) ; |
public class ByteConverter { /** * Encodes a int value to the byte array .
* @ param target The byte array to encode to .
* @ param idx The starting index in the byte array .
* @ param value The value to encode . */
public static void float8 ( byte [ ] target , int idx , double value ) { } } | int8 ( target , idx , Double . doubleToRawLongBits ( value ) ) ; |
public class StorageAccountsInner { /** * Returns the properties for the specified storage account including but not limited to name , SKU name , location , and account status . The ListKeys operation should be used to retrieve storage keys .
* @ param resourceGroupName The name of the resource group within the user ... | return getByResourceGroupWithServiceResponseAsync ( resourceGroupName , accountName ) . map ( new Func1 < ServiceResponse < StorageAccountInner > , StorageAccountInner > ( ) { @ Override public StorageAccountInner call ( ServiceResponse < StorageAccountInner > response ) { return response . body ( ) ; } } ) ; |
public class PDF417ScanningDecoder { /** * Verify that all is OK with the codeword array . */
private static void verifyCodewordCount ( int [ ] codewords , int numECCodewords ) throws FormatException { } } | if ( codewords . length < 4 ) { // Codeword array size should be at least 4 allowing for
// Count CW , At least one Data CW , Error Correction CW , Error Correction CW
throw FormatException . getFormatInstance ( ) ; } // The first codeword , the Symbol Length Descriptor , shall always encode the total number of data
//... |
public class DeploymentDescriptorIO { /** * Reads XML data from given input stream and produces valid instance of
* < code > DeploymentDescriptor < / code >
* @ param inputStream input stream that comes with xml data of the descriptor
* @ return instance of the descriptor after deserialization */
public static De... | try { Unmarshaller unmarshaller = getContext ( ) . createUnmarshaller ( ) ; unmarshaller . setSchema ( schema ) ; DeploymentDescriptor descriptor = ( DeploymentDescriptor ) unmarshaller . unmarshal ( inputStream ) ; return descriptor ; } catch ( Exception e ) { throw new RuntimeException ( "Unable to read deployment de... |
public class BeatGrid { /** * Get the raw bytes of the beat grid as it was read over the network . This can be used to analyze fields
* that have not yet been reliably understood , and is also used for storing the beat grid in a cache file .
* This is not available when the beat grid was loaded by Crate Digger .
... | if ( rawData != null ) { rawData . rewind ( ) ; return rawData . slice ( ) ; } return null ; |
public class CmsContentEditor { /** * Saves a value in an Xml content . < p >
* @ param contentId the structure id of the content
* @ param contentPath the xpath for which to set the value
* @ param locale the locale for which to set the value
* @ param value the new value
* @ param asyncCallback the callback... | CmsRpcAction < String > action = new CmsRpcAction < String > ( ) { @ Override public void execute ( ) { start ( 0 , false ) ; getService ( ) . saveValue ( contentId , contentPath , locale , value , this ) ; } @ Override protected void onResponse ( String result ) { stop ( false ) ; asyncCallback . onSuccess ( result ) ... |
public class DescribeProvisionedProductRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( DescribeProvisionedProductRequest describeProvisionedProductRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( describeProvisionedProductRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( describeProvisionedProductRequest . getAcceptLanguage ( ) , ACCEPTLANGUAGE_BINDING ) ; protocolMarshaller . marshall ( describeProvisionedProductReques... |
public class XImportDeclarationImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setMemberName ( String newMemberName ) { } } | String oldMemberName = memberName ; memberName = newMemberName ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , XtypePackage . XIMPORT_DECLARATION__MEMBER_NAME , oldMemberName , memberName ) ) ; |
public class LPPrimalDualMethod { /** * Inequality functions values at X .
* This is ( - x + lb ) for all bounded lb and ( x - ub ) for all bounded ub . */
@ Override protected DoubleMatrix1D getFi ( DoubleMatrix1D X ) { } } | double [ ] ret = new double [ getMieq ( ) ] ; for ( int i = 0 ; i < getDim ( ) ; i ++ ) { ret [ i ] = - X . getQuick ( i ) + getLb ( ) . getQuick ( i ) ; ret [ getDim ( ) + i ] = X . getQuick ( i ) - getUb ( ) . getQuick ( i ) ; } return F1 . make ( ret ) ; |
public class ListELResolver { /** * If the base object is a list , returns the value at the given index . The index is specified by
* the property argument , and coerced into an integer . If the coercion could not be performed ,
* an IllegalArgumentException is thrown . If the index is out of bounds , null is retur... | if ( context == null ) { throw new NullPointerException ( "context is null" ) ; } Object result = null ; if ( isResolvable ( base ) ) { int index = toIndex ( null , property ) ; List < ? > list = ( List < ? > ) base ; result = index < 0 || index >= list . size ( ) ? null : list . get ( index ) ; context . setPropertyRe... |
public class Kim { /** * Get a byte from a kim .
* @ param at
* The position of the byte . The first byte is at 0.
* @ return The byte .
* @ throws JSONException
* if there is no byte at that position . */
public int get ( int at ) throws JSONException { } } | if ( at < 0 || at > this . length ) { throw new JSONException ( "Bad character at " + at ) ; } return ( ( int ) this . bytes [ at ] ) & 0xFF ; |
public class WebAppSecurityConfigImpl { /** * { @ inheritDoc } < p >
* This method needs to be maintained when new attributes are added .
* Order should be presented in alphabetical order . */
@ Override public Map < String , String > getChangedPropertiesMap ( WebAppSecurityConfig original ) { } } | // Bail out if it is the same object , or if this isn ' t of the right type .
if ( this == original ) { return null ; } if ( ! ( original instanceof WebAppSecurityConfigImpl ) ) { return null ; } TreeMap < String , String > output = new TreeMap < String , String > ( ) ; WebAppSecurityConfigImpl orig = ( WebAppSecurityC... |
public class EvaluateVarianceRatioCriteria { /** * Evaluate a single clustering .
* @ param db Database
* @ param rel Data relation
* @ param c Clustering
* @ return Variance Ratio Criteria */
public double evaluateClustering ( Database db , Relation < ? extends NumberVector > rel , Clustering < ? > c ) { } } | // FIXME : allow using a precomputed distance matrix !
final SquaredEuclideanDistanceFunction df = SquaredEuclideanDistanceFunction . STATIC ; List < ? extends Cluster < ? > > clusters = c . getAllClusters ( ) ; double vrc = 0. ; int ignorednoise = 0 ; if ( clusters . size ( ) > 1 ) { NumberVector [ ] centroids = new N... |
public class CobolTypeFinder { /** * Lookup for the signature of a Cobol type .
* Attempts at finding the type one byte at a time delegating the matching
* to specialized classes .
* @ param hostData the incoming host data where the matching type might
* appear
* @ param start where to start looking in the in... | int pos = start ; while ( length - pos >= getSignatureLen ( ) ) { if ( match ( hostData , pos , length ) ) { return pos ; } pos ++ ; } return - 1 ; |
public class NativeMethodHelper { /** * Register native methods from the core DLL for the specified class and drive the
* registration hooks .
* @ param clazz the class to link native methods for
* @ param nativeDescriptorName the name of the exported { @ code NativeMethodDescriptor } structure
* @ param extra ... | if ( ! initialized ) { if ( loadFailure != null ) { Error e = new UnsatisfiedLinkError ( ) ; e . initCause ( loadFailure ) ; throw e ; } else { return 0 ; } } return ntv_registerNatives ( clazz , nativeDescriptorName , extraInfo ) ; |
public class Math { /** * Find the third quantile ( p = 3/4 ) of an array of type double . The input array will
* be rearranged . */
public static < T extends Comparable < ? super T > > T q3 ( T [ ] a ) { } } | return QuickSelect . q3 ( a ) ; |
public class Utils { /** * Closes a prepared statement .
* @ param ps
* @ param logger */
public static void closeStatement ( PreparedStatement ps , Logger logger ) { } } | try { if ( ps != null ) ps . close ( ) ; } catch ( SQLException e ) { // Not important .
Utils . logException ( logger , e ) ; } |
public class SharedPreferencesCollector { /** * Checks if the key matches one of the patterns provided by the developer
* to exclude some preferences from reports .
* @ param key the name of the preference to be checked
* @ return true if the key has to be excluded from reports . */
private boolean filteredKey ( ... | for ( String regex : config . excludeMatchingSharedPreferencesKeys ( ) ) { if ( key . matches ( regex ) ) { return true ; } } return false ; |
public class GetterFactory { /** * Search getter for given class and property name .
* @ param type Class
* @ param name Property name
* @ return Getter or null if not found */
@ SuppressWarnings ( "unchecked" ) public static Getter getGetter ( Class type , String name ) { } } | return getGettersAsMap ( type ) . get ( name ) ; |
public class CmsCheckableDatePanel { /** * Set dates with the provided check states .
* @ param datesWithCheckInfo the dates to set , accompanied with the check state to set . */
public void setDatesWithCheckState ( Collection < CmsPair < Date , Boolean > > datesWithCheckInfo ) { } } | SortedSet < Date > dates = new TreeSet < > ( ) ; m_checkBoxes . clear ( ) ; for ( CmsPair < Date , Boolean > p : datesWithCheckInfo ) { addCheckBox ( p . getFirst ( ) , p . getSecond ( ) . booleanValue ( ) ) ; dates . add ( p . getFirst ( ) ) ; } reInitLayoutElements ( ) ; setDatesInternal ( dates ) ; |
public class JmsJcaActivationSpecImpl { /** * ( non - Javadoc )
* @ see com . ibm . ws . sib . api . jmsra . JmsJcaActivationSpec # setSubscriptionDurability ( java . lang . String ) */
@ Override public void setSubscriptionDurability ( final String subscriptionDurability ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isDebugEnabled ( ) ) { SibTr . debug ( this , TRACE , "setSubscriptionDurability" , subscriptionDurability ) ; } _subscriptionDurability = subscriptionDurability ; |
public class SAXParseException { /** * Internal initialization method .
* @ param publicId The public identifier of the entity which generated the exception ,
* or null .
* @ param systemId The system identifier of the entity which generated the exception ,
* or null .
* @ param lineNumber The line number of ... | this . publicId = publicId ; this . systemId = systemId ; this . lineNumber = lineNumber ; this . columnNumber = columnNumber ; |
public class BatcherBuilder { /** * Builds a { @ link Batcher } which will provide batches to the provided { @ code listener } .
* Note : The builder is required to have either a time or size bound to build a batch . */
public < T > Batcher < T > build ( BatchListener < T > listener ) { } } | requireNonNull ( listener ) ; checkState ( maxSize != UNSET_INT || interval != UNSET_INT , "All batchers are required to have either a time or size bound." ) ; ExecutorService handler = ( listenerService == null ? newCachedThreadPool ( ) : listenerService ) ; BlockingQueue < T > backingQueue = ( maxBufferSize == UNSET_... |
public class ElementCollectionCacheManager { /** * Gets the last element collection object count .
* @ param rowKey
* the row key
* @ return the last element collection object count */
public int getLastElementCollectionObjectCount ( Object rowKey ) { } } | if ( getElementCollectionCache ( ) . get ( rowKey ) == null ) { log . debug ( "No element collection object map found in cache for Row key " + rowKey ) ; return - 1 ; } else { Map < Object , String > elementCollectionMap = getElementCollectionCache ( ) . get ( rowKey ) ; Collection < String > elementCollectionObjectNam... |
public class SnapshotManagerImpl { /** * / * ( non - Javadoc )
* @ see org . duracloud . snapshot . service . SnapshotManager # updateHistory ( ) */
@ Override @ Transactional public Snapshot updateHistory ( Snapshot snapshot , String history ) { } } | snapshot = this . snapshotRepo . getOne ( snapshot . getId ( ) ) ; SnapshotHistory newHistory = new SnapshotHistory ( ) ; newHistory . setHistory ( history ) ; newHistory . setSnapshot ( snapshot ) ; snapshot . getSnapshotHistory ( ) . add ( newHistory ) ; return this . snapshotRepo . save ( snapshot ) ; |
public class SVG { /** * Renders this SVG document to a Canvas object .
* @ param canvas the canvas to which the document should be rendered .
* @ param renderOptions options that describe how to render this SVG on the Canvas .
* @ since 1.3 */
@ SuppressWarnings ( { } } | "WeakerAccess" , "unused" } ) public void renderToCanvas ( Canvas canvas , RenderOptions renderOptions ) { if ( renderOptions == null ) renderOptions = new RenderOptions ( ) ; if ( ! renderOptions . hasViewPort ( ) ) { renderOptions . viewPort ( 0f , 0f , ( float ) canvas . getWidth ( ) , ( float ) canvas . getHeight (... |
public class lbvserver_cmppolicy_binding { /** * Use this API to fetch lbvserver _ cmppolicy _ binding resources of given name . */
public static lbvserver_cmppolicy_binding [ ] get ( nitro_service service , String name ) throws Exception { } } | lbvserver_cmppolicy_binding obj = new lbvserver_cmppolicy_binding ( ) ; obj . set_name ( name ) ; lbvserver_cmppolicy_binding response [ ] = ( lbvserver_cmppolicy_binding [ ] ) obj . get_resources ( service ) ; return response ; |
public class VariablesInner { /** * Create a variable .
* @ param resourceGroupName Name of an Azure Resource group .
* @ param automationAccountName The name of the automation account .
* @ param variableName The variable name .
* @ param parameters The parameters supplied to the create or update variable oper... | return createOrUpdateWithServiceResponseAsync ( resourceGroupName , automationAccountName , variableName , parameters ) . map ( new Func1 < ServiceResponse < VariableInner > , VariableInner > ( ) { @ Override public VariableInner call ( ServiceResponse < VariableInner > response ) { return response . body ( ) ; } } ) ; |
public class ExecutionContext { /** * Returns true if the symbol is null or has not been defined .
* @ param name The symbol ' s name
* @ return true if null */
public boolean isSymbolNull ( String name ) { } } | CommandSymbol s = findSymbol ( name ) ; if ( s == null ) return true ; if ( s instanceof VarCommand ) { VarCommand var = ( VarCommand ) s ; Value v = var . getValue ( this ) ; if ( v == null || v . get ( ) == null || v instanceof NilValue ) return true ; } return false ; |
public class DataIO { /** * Parse a table from a given File .
* @ param file
* @ param name
* @ return a CSTable .
* @ throws java . io . IOException */
public static CSTable table ( File file , String name ) throws IOException { } } | return new FileTable ( file , name ) ; |
public class RequestUrlEncodedFormBody { /** * Set the body of the request
* @ param context context of the request
* @ throws FoxHttpRequestException can throw different exception based on input streams and interceptors */
@ Override public void setBody ( FoxHttpRequestBodyContext context ) throws FoxHttpRequestEx... | String formOutputData = QueryBuilder . buildQuery ( formData ) ; writeBody ( context , formOutputData ) ; |
public class CmsModuleImportExportHandler { /** * Writes the messages for finishing an import to the given report . < p >
* @ param report the report to write to */
public static void reportEndImport ( I_CmsReport report ) { } } | report . println ( Messages . get ( ) . container ( Messages . RPT_IMPORT_MODULE_END_0 ) , I_CmsReport . FORMAT_HEADLINE ) ; |
public class UserDetail { /** * A list of IAM groups that the user is in .
* @ param groupList
* A list of IAM groups that the user is in . */
public void setGroupList ( java . util . Collection < String > groupList ) { } } | if ( groupList == null ) { this . groupList = null ; return ; } this . groupList = new com . amazonaws . internal . SdkInternalList < String > ( groupList ) ; |
public class AfplibFactoryImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public String convertResourceLocalIdentifierResTypeToString ( EDataType eDataType , Object instanceValue ) { } } | return instanceValue == null ? null : instanceValue . toString ( ) ; |
public class YamlOrchestrationShardingDataSourceFactory { /** * Create sharding data source .
* @ param yamlBytes YAML bytes for rule configuration of databases and tables sharding with data sources
* @ return sharding data source
* @ throws SQLException SQL exception
* @ throws IOException IO exception */
publ... | YamlOrchestrationShardingRuleConfiguration config = unmarshal ( yamlBytes ) ; return createDataSource ( config . getDataSources ( ) , config . getShardingRule ( ) , config . getProps ( ) , config . getOrchestration ( ) ) ; |
public class ApiOvhDedicatedserver { /** * Get this object properties
* REST : GET / dedicated / server / { serviceName } / statistics / raid / { unit } / volume / { volume } / port / { port }
* @ param serviceName [ required ] The internal name of your dedicated server
* @ param unit [ required ] Raid unit
* @... | String qPath = "/dedicated/server/{serviceName}/statistics/raid/{unit}/volume/{volume}/port/{port}" ; StringBuilder sb = path ( qPath , serviceName , unit , volume , port ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhRtmRaidVolumePort . class ) ; |
public class IdHelper { /** * Helper method that uses reflection to set the ( inaccessible ) id field of
* the given { @ link PersistentObject } .
* @ param persistentObject The object with the inaccessible id field
* @ param id The id to set
* @ throws NoSuchFieldException
* @ throws IllegalAccessException *... | // use reflection to get the inaccessible final field ' id '
Field idField = PersistentObject . class . getDeclaredField ( "id" ) ; // make the field accessible and set the value
idField . setAccessible ( true ) ; idField . set ( persistentObject , id ) ; idField . setAccessible ( false ) ; |
public class GenericBeanInfo { /** * This method returns an image object that can be used to represent the
* bean in toolboxes , toolbars , etc .
* @ param iconKind
* the kind of requested icon
* @ return the icon image */
public Image getIcon ( int iconKind ) { } } | switch ( iconKind ) { case ICON_COLOR_16x16 : return iconColor16 ; case ICON_COLOR_32x32 : return iconColor32 ; case ICON_MONO_16x16 : return iconMono16 ; case ICON_MONO_32x32 : return iconMono32 ; } return null ; |
public class StorePackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getOAuthAuthorizationCode ( ) { } } | if ( oAuthAuthorizationCodeEClass == null ) { oAuthAuthorizationCodeEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( StorePackage . eNS_URI ) . getEClassifiers ( ) . get ( 109 ) ; } return oAuthAuthorizationCodeEClass ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.