signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class PrimitiveDoubleArraySubject { /** * TODO ( cpovirk ) : Should we make Doubles . asList ( ) . toString ( ) smarter rather than do all this ?
* TODO ( cpovirk ) : Or find a general solution for this and MultimapSubject . IterableEntries . But
* note that here we don ' t use _ exactly _ PrimitiveDoubleArr... | return new Factory < IterableSubject , Iterable < ? > > ( ) { @ Override public IterableSubject createSubject ( FailureMetadata metadata , Iterable < ? > actual ) { return new IterableSubjectWithInheritedToString ( metadata , actual ) ; } } ; |
public class StandardDdlParser { /** * Utility method which parses tokens until a semicolon is found or there are no more tokens .
* @ param tokens the { @ link DdlTokenStream } representing the tokenized DDL content ; may not be null
* @ return the parsed string
* @ throws ParsingException */
protected String pa... | StringBuilder sb = new StringBuilder ( ) ; boolean lastTokenWasPeriod = false ; while ( tokens . hasNext ( ) && ! tokens . matches ( SEMICOLON ) ) { String thisToken = tokens . consume ( ) ; boolean thisTokenIsPeriod = thisToken . equals ( PERIOD ) ; boolean thisTokenIsComma = thisToken . equals ( COMMA ) ; if ( lastTo... |
public class DenseTensorBuilder { /** * Replicates the values in { @ code tensor } across all dimensions of
* { @ code this } , incrementing each key in this appropriately . This function is
* similar to summing two tensors after applying the matlab { @ code repmat }
* function .
* @ param other
* @ return */... | // Maps a key of other into a partial key of this .
int [ ] dimensionMapping = getDimensionMapping ( other . getDimensionNumbers ( ) ) ; int [ ] partialKey = ArrayUtils . copyOf ( getDimensionSizes ( ) , getDimensionSizes ( ) . length ) ; for ( int i = 0 ; i < dimensionMapping . length ; i ++ ) { partialKey [ dimension... |
public class Encryptor { /** * < p > Wraps an < code > InputStream < / code > with a < code > CipherInputStream < / code > using this encryptor ' s cipher . < / p >
* < p > If an < code > ivLength < / code > has been specified and < code > prependIV < / code > is set to < code > true < / code > this method
* will t... | Cipher cipher = getCipher ( true ) ; if ( iv == null && ivLength > 0 ) { if ( prependIV ) { iv = new byte [ ivLength ] ; is . read ( iv ) ; } else { throw new IllegalStateException ( "Could not obtain IV" ) ; } } if ( iv != null ) { cipher . init ( Cipher . DECRYPT_MODE , getKey ( ) , getAlgorithmParameterSpec ( iv ) )... |
public class DatePicker { /** * getBaseline , This returns the baseline value of the dateTextField . */
@ Override public int getBaseline ( int width , int height ) { } } | if ( dateTextField . isVisible ( ) ) { return dateTextField . getBaseline ( width , height ) ; } return super . getBaseline ( width , height ) ; |
public class UnicodeReader { /** * Read - ahead four bytes and check for BOM . Extra bytes are
* unread back to the stream , only BOM bytes are skipped . */
protected void init ( ) throws IOException { } } | if ( internalIn2 != null ) return ; String encoding ; byte bom [ ] = new byte [ BOM_SIZE ] ; int n , unread ; n = internalIn . read ( bom , 0 , bom . length ) ; if ( ( bom [ 0 ] == ( byte ) 0x00 ) && ( bom [ 1 ] == ( byte ) 0x00 ) && ( bom [ 2 ] == ( byte ) 0xFE ) && ( bom [ 3 ] == ( byte ) 0xFF ) ) { encoding = "UTF-3... |
public class JavaSoundPlayer { /** * This is the primary run method of the sound - playing threads . */
protected void spoolerRun ( ) { } } | while ( true ) { try { SoundKey key ; synchronized ( _queue ) { _freeSpoolers ++ ; key = _queue . get ( MAX_WAIT_TIME ) ; _freeSpoolers -- ; if ( key == null || key . cmd == DIE ) { _spoolerCount -- ; // if dying and there are others to kill , do so
if ( key != null && _spoolerCount > 0 ) { _queue . appendLoud ( key ) ... |
public class AzkabanJobHelper { /** * Delete project on Azkaban based on Azkaban config .
* @ param sessionId Session Id .
* @ param azkabanProjectConfig Azkaban Project Config .
* @ throws IOException */
public static void deleteAzkabanJob ( String sessionId , AzkabanProjectConfig azkabanProjectConfig ) throws I... | log . info ( "Deleting Azkaban project for: " + azkabanProjectConfig . getAzkabanProjectName ( ) ) ; // Delete project
AzkabanAjaxAPIClient . deleteAzkabanProject ( sessionId , azkabanProjectConfig ) ; |
public class NonBlockingReader { /** * Returns a new callable for reading strings from a reader with a set timeout of 200ms .
* @ param reader input stream to read from
* @ param emptyPrint a printout to realize on an empty readline string , for prompts , set null if not required
* @ return null if input stream i... | return NonBlockingReader . getCallWTimeout ( reader , 200 , emptyPrint ) ; |
public class WQProjectionField { /** * Helper method that returns True if the provided value should be represented as a String
* @ param value
* @ return */
public static boolean isPrimitive ( final Object value ) { } } | return ( value == null || value instanceof String || value instanceof Number || value instanceof Boolean || value instanceof DateTime || value instanceof Date || value instanceof SampleCount || value instanceof Timecode || value . getClass ( ) . isEnum ( ) || value . getClass ( ) . isPrimitive ( ) ) ; |
public class ValueEnforcer { /** * Check if
* < code > nValue & gt ; nLowerBoundInclusive & amp ; & amp ; nValue & lt ; nUpperBoundInclusive < / code >
* @ param aValue
* Value
* @ param sName
* Name
* @ param aLowerBoundExclusive
* Lower bound
* @ param aUpperBoundExclusive
* Upper bound
* @ return... | if ( isEnabled ( ) ) return isBetweenExclusive ( aValue , ( ) -> sName , aLowerBoundExclusive , aUpperBoundExclusive ) ; return aValue ; |
public class PrcGoodsLossSave { /** * < p > Make save preparations before insert / update block if it ' s need . < / p >
* @ param pAddParam additional param
* @ param pEntity entity
* @ param pRequestData Request Data
* @ throws Exception - an exception */
@ Override public final void makeFirstPrepareForSave (... | // nothing |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EClass getIfcMassFlowRateMeasure ( ) { } } | if ( ifcMassFlowRateMeasureEClass == null ) { ifcMassFlowRateMeasureEClass = ( EClass ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 835 ) ; } return ifcMassFlowRateMeasureEClass ; |
public class Circle { /** * Sets the properties of this circle to the supplied values .
* @ return a reference to this this , for chaining . */
public Circle set ( double x , double y , double radius ) { } } | this . x = x ; this . y = y ; this . radius = radius ; return this ; |
public class DataService { /** * Method to read the query response from QueryResponse and set into QueryResult
* @ param queryResponse
* the query response
* @ return queryResult */
protected QueryResult getQueryResult ( QueryResponse queryResponse ) { } } | QueryResult queryResult = null ; if ( queryResponse != null ) { queryResult = new QueryResult ( ) ; queryResult . setEntities ( getEntities ( queryResponse ) ) ; queryResult . setFault ( queryResponse . getFault ( ) ) ; queryResult . setMaxResults ( queryResponse . getMaxResults ( ) ) ; queryResult . setStartPosition (... |
public class GetDomainDetailResult { /** * An array of domain name status codes , also known as Extensible Provisioning Protocol ( EPP ) status codes .
* ICANN , the organization that maintains a central database of domain names , has developed a set of domain name
* status codes that tell you the status of a varie... | if ( this . statusList == null ) { setStatusList ( new com . amazonaws . internal . SdkInternalList < String > ( statusList . length ) ) ; } for ( String ele : statusList ) { this . statusList . add ( ele ) ; } return this ; |
public class YamlDataProviderImpl { /** * Converts a yaml file into an Object 2D array for < a
* href = " http : / / testng . org / doc / documentation - main . html # parameters - dataproviders " > TestNG Dataprovider < / a >
* consumption .
* < br >
* A proper < a href = " https : / / code . google . com / p ... | logger . entering ( new Object [ ] { yaml , inputStream } ) ; Iterator < ? > documents = yaml . loadAll ( inputStream ) . iterator ( ) ; List < Object > objList = new ArrayList < > ( ) ; while ( documents . hasNext ( ) ) { objList . add ( documents . next ( ) ) ; } logger . exiting ( objList ) ; return objList ; |
public class EntityDataModelUtil { /** * Check if the given entity is a Singleton entity .
* @ param entityDataModel The Entity Data Model .
* @ param entity The given entity .
* @ return true if singleton , false if not
* @ throws ODataEdmException if unable to determine if entity is singleton */
public static... | // Get the entity type
EntityType entityType = getAndCheckEntityType ( entityDataModel , entity . getClass ( ) ) ; boolean isSingletonEntity = false ; for ( Singleton singleton : entityDataModel . getEntityContainer ( ) . getSingletons ( ) ) { if ( singleton . getTypeName ( ) . equals ( entityType . getFullyQualifiedNa... |
public class JQMNavBar { /** * Works , but only partially ! There is no navbar . refresh ( ) in jqm 1.4 . x , so CSS classes are
* not updated properly and navbar doesn ' t reuse free / available space after removal . */
public void remove ( JQMButton button ) { } } | if ( button == null || buttons == null ) return ; int i = buttons . indexOf ( button ) ; if ( i == - 1 ) return ; Widget liPanel = button . getParent ( ) ; ulPanel . remove ( liPanel ) ; buttons . remove ( i ) ; |
public class BigtableClusterUtilities { /** * @ return The instance id associated with the given project , zone and cluster . We expect instance
* and cluster to have one - to - one relationship .
* @ throws IllegalStateException if the cluster is not found */
public static String lookupInstanceId ( String projectI... | BigtableClusterUtilities utils ; try { utils = BigtableClusterUtilities . forAllInstances ( projectId ) ; } catch ( GeneralSecurityException e ) { throw new RuntimeException ( "Could not initialize BigtableClusterUtilities" , e ) ; } try { Cluster cluster = utils . getCluster ( clusterId , zoneId ) ; return new Bigtabl... |
public class WDataTable { /** * Sets the table sort mode . The data model controls which columns are sortable .
* @ param sortMode The sort mode to set . */
public void setSortMode ( final SortMode sortMode ) { } } | getOrCreateComponentModel ( ) . sortMode = SortMode . SERVER . equals ( sortMode ) ? SortMode . DYNAMIC : sortMode ; |
public class JsonRpcHttpAsyncClient { /** * Invokes the given method with the given arguments and returns
* immediately . The { @ code Future < T > } object that is returned can be used to
* retrieve the result .
* @ param methodName the name of the method to invoke
* @ param argument the arguments to the metho... | return invoke ( methodName , argument , returnType , new HashMap < String , String > ( ) ) ; |
public class NodeTypes { /** * Returns the list of node types for the supertypes defined in the given node type .
* @ param nodeType a node type with a non - null array of supertypes
* @ param pendingTypes the list of types that have been processed in this type batch but not yet committed to the repository ' s
* ... | assert nodeType != null ; List < JcrNodeType > supertypes = new LinkedList < JcrNodeType > ( ) ; boolean isMixin = nodeType . isMixin ( ) ; boolean needsPrimaryAncestor = ! isMixin ; String nodeTypeName = nodeType . getName ( ) ; for ( String supertypeNameStr : nodeType . getDeclaredSupertypeNames ( ) ) { Name supertyp... |
public class CPInstanceUtil { /** * Removes the cp instance where CPDefinitionId = & # 63 ; and CPInstanceUuid = & # 63 ; from the database .
* @ param CPDefinitionId the cp definition ID
* @ param CPInstanceUuid the cp instance uuid
* @ return the cp instance that was removed */
public static CPInstance removeBy... | return getPersistence ( ) . removeByC_C ( CPDefinitionId , CPInstanceUuid ) ; |
public class RedisInner { /** * Checks that the redis cache name is valid and is not already in use .
* @ param parameters Parameters supplied to the CheckNameAvailability Redis operation . The only supported resource type is ' Microsoft . Cache / redis '
* @ throws IllegalArgumentException thrown if parameters fai... | return checkNameAvailabilityWithServiceResponseAsync ( parameters ) . map ( new Func1 < ServiceResponse < Void > , Void > ( ) { @ Override public Void call ( ServiceResponse < Void > response ) { return response . body ( ) ; } } ) ; |
public class StaticShutdownCallbackRegistry { /** * Executes the registered shutdown callbacks . */
@ Override public void run ( ) { } } | if ( state . compareAndSet ( State . STARTED , State . STOPPING ) ) { for ( final Runnable hook : hooks ) { try { hook . run ( ) ; } catch ( final Throwable t ) { LOGGER . error ( SHUTDOWN_HOOK_MARKER , "Caught exception executing shutdown hook {}" , hook , t ) ; } } state . set ( State . STOPPED ) ; } |
public class GenericWindows { /** * ~ Methoden - - - - - */
@ Override ChronoInterval < T > newInterval ( Boundary < T > start , Boundary < T > end ) { } } | SimpleInterval . Factory < T > factory = SimpleInterval . on ( this . timeLine ) ; if ( start . isInfinite ( ) ) { T e = end . getTemporal ( ) ; if ( e != null ) { if ( this . timeLine . isCalendrical ( ) ) { if ( end . isOpen ( ) ) { e = this . timeLine . stepBackwards ( e ) ; } } else if ( end . isClosed ( ) ) { e = ... |
public class ScriptableObject { /** * Define a JavaScript property .
* Use this method only if you wish to define getters and setters for
* a given property in a ScriptableObject . To create a property without
* special getter or setter side effects , use
* < code > defineProperty ( String , int ) < / code > . ... | MemberBox getterBox = null ; if ( getter != null ) { getterBox = new MemberBox ( getter ) ; boolean delegatedForm ; if ( ! Modifier . isStatic ( getter . getModifiers ( ) ) ) { delegatedForm = ( delegateTo != null ) ; getterBox . delegateTo = delegateTo ; } else { delegatedForm = true ; // Ignore delegateTo for static ... |
public class AWSIotDataClient { /** * Updates the thing shadow for the specified thing .
* For more information , see < a
* href = " http : / / docs . aws . amazon . com / iot / latest / developerguide / API _ UpdateThingShadow . html " > UpdateThingShadow < / a > in
* the < i > AWS IoT Developer Guide < / i > . ... | request = beforeClientExecution ( request ) ; return executeUpdateThingShadow ( request ) ; |
public class ClassFactory { /** * Get methods in order desired to invoke them one by one until match or fail
* @ param type desired
* @ param names of methods in order
* @ param < T > class to search for methods
* @ return method list to use */
private static < T > List < Method > getMethods ( Class < T > type ... | Assert . notNull ( type , "Missing class to search for methods!" ) ; Assert . notNullOrEmpty ( names , "Missing method names to search for!" ) ; Map < String , Method > candidates = new HashMap < > ( ) ; for ( Method method : type . getMethods ( ) ) { if ( Modifier . isStatic ( method . getModifiers ( ) ) && method . g... |
public class ZipUtil { /** * Scans the given ZIP file and executes the given action for each entry .
* Only the meta - data without the actual data is read . If you want to stop the loop
* then throw a ZipBreakException .
* @ param zip
* input ZIP file .
* @ param action
* action to be called for each entry... | ZipFile zf = null ; try { zf = new ZipFile ( zip ) ; Enumeration < ? extends ZipEntry > en = zf . entries ( ) ; while ( en . hasMoreElements ( ) ) { ZipEntry e = ( ZipEntry ) en . nextElement ( ) ; try { action . process ( e ) ; } catch ( IOException ze ) { throw new ZipException ( "Failed to process zip entry '" + e .... |
public class TransientUserLayoutManagerWrapper { /** * Return an IUserLayoutChannelDescription by way of nodeId
* @ param nodeId the node ( subscribe ) id to get the channel for .
* @ return a < code > IUserLayoutNodeDescription < / code > */
private IUserLayoutChannelDescription getTransientNode ( String nodeId ) ... | // get fname from subscribe id
final String fname = getFname ( nodeId ) ; if ( null == fname || fname . equals ( "" ) ) { return null ; } try { // check cache first
IPortletDefinition chanDef = mChanMap . get ( nodeId ) ; if ( null == chanDef ) { chanDef = PortletDefinitionRegistryLocator . getPortletDefinitionRegistry... |
public class BinaryJedis { /** * Return the specified elements of the list stored at the specified key . Start and end are
* zero - based indexes . 0 is the first element of the list ( the list head ) , 1 the next element and
* so on .
* For example LRANGE foobar 0 2 will return the first three elements of the li... | checkIsInMultiOrPipeline ( ) ; client . lrange ( key , start , stop ) ; return client . getBinaryMultiBulkReply ( ) ; |
public class NodeIteratorImpl { /** * Returns the current position in this < code > NodeIterator < / code > .
* @ return the current position in this < code > NodeIterator < / code > . */
public long getPosition ( ) { } } | initialize ( ) ; long position = scoreNodes . getPosition ( ) - invalid ; // scoreNode . getPosition ( ) is one ahead
// if there is a prefetched node
if ( next != null ) { position -- ; } return position ; |
public class Server { /** * Helper for { @ link # channelRead ( ReadableByteChannel , ByteBuffer ) }
* and { @ link # channelWrite ( WritableByteChannel , ByteBuffer ) } . Only
* one of readCh or writeCh should be non - null .
* @ see # channelRead ( ReadableByteChannel , ByteBuffer )
* @ see # channelWrite ( W... | int originalLimit = buf . limit ( ) ; int initialRemaining = buf . remaining ( ) ; int ret = 0 ; while ( buf . remaining ( ) > 0 ) { try { int ioSize = Math . min ( buf . remaining ( ) , NIO_BUFFER_LIMIT ) ; buf . limit ( buf . position ( ) + ioSize ) ; ret = ( readCh == null ) ? writeCh . write ( buf ) : readCh . read... |
public class SQLPanel { /** * A call of this method should validate the positions of the panels
* components . */
@ Override public void relocate ( ) { } } | int w = 200 , h = 235 ; int x = ( this . getWidth ( ) - w ) / 2 ; int y = ( this . getHeight ( ) - h ) / 2 ; enableSQLDatabaseConnection . setLocation ( x , y ) ; sqlHostLabel . setLocation ( x , y + 40 ) ; sqlHostField . setLocation ( x + 110 , y + 40 ) ; sqlDatabaseLabel . setLocation ( x , y + 70 ) ; sqlDatabaseFiel... |
public class ModeUtils { /** * Applies the default umask for newly created files to this mode .
* @ param mode the mode to update
* @ param authUmask the umask to apply on the file
* @ return the updated object */
public static Mode applyFileUMask ( Mode mode , String authUmask ) { } } | mode = applyUMask ( mode , getUMask ( authUmask ) ) ; mode = applyUMask ( mode , FILE_UMASK ) ; return mode ; |
public class IOB2DataReader { /** * / * ( non - Javadoc )
* @ see jvntextpro . data . DataReader # readFile ( java . lang . String ) */
@ Override public List < Sentence > readFile ( String datafile ) { } } | // TODO Auto - generated method stub
// read all data into a data string
String dataStr = "" ; try { BufferedReader in = new BufferedReader ( new InputStreamReader ( new FileInputStream ( datafile ) , "UTF-8" ) ) ; String line ; int count = 0 ; while ( ( line = in . readLine ( ) ) != null ) { System . out . println ( "... |
public class ResolverUtils { /** * Should the combination of { @ link Device } and { @ link SitePreference } be handled
* as a tablet device
* @ param device the resolved device
* @ param sitePreference the specified site preference
* @ return true if tablet */
public static boolean isTablet ( Device device , S... | return sitePreference == SitePreference . TABLET || device != null && device . isTablet ( ) && sitePreference == null ; |
public class Files { /** * Copy bytes from input to given output stream then close both byte streams . Please be aware this method closes both
* input and output streams . This is especially important if work with ZIP streams ; trying to get / put next ZIP entry
* after this method completes will fail with < em > s... | Params . notNull ( inputStream , "Input stream" ) ; Params . notNull ( outputStream , "Output stream" ) ; Params . isFalse ( inputStream instanceof ZipInputStream , "Input stream is ZIP." ) ; Params . isFalse ( outputStream instanceof ZipOutputStream , "Output stream is ZIP." ) ; if ( ! ( inputStream instanceof Buffere... |
public class BaseDao { /** * Gets an entry from cache .
* @ param cacheName
* @ param key
* @ return */
protected Object getFromCache ( String cacheName , String key ) { } } | try { ICache cache = getCache ( cacheName ) ; return cache != null ? cache . get ( key ) : null ; } catch ( CacheException e ) { LOGGER . warn ( e . getMessage ( ) , e ) ; return null ; } |
public class BeanComparator { /** * Add an order - by property to produce a more refined Comparator . If the
* property does not return a { @ link Comparable } object when
* { @ link # compare compare } is called on the returned comparator , the
* property is ignored . Call { @ link # using using } on the returne... | int dot = propertyName . indexOf ( '.' ) ; String subName ; if ( dot < 0 ) { subName = null ; } else { subName = propertyName . substring ( dot + 1 ) ; propertyName = propertyName . substring ( 0 , dot ) ; } PropertyDescriptor desc = ( PropertyDescriptor ) getProperties ( ) . get ( propertyName ) ; if ( desc == null ) ... |
public class TargetImpl { /** * { @ inheritDoc } */
@ Override public void cleanup ( ) { } } | MDC . put ( DeploymentConstants . TARGET_ID_MDC_KEY , getId ( ) ) ; try { logger . info ( "Cleaning up repo for target {}" , getId ( ) ) ; GitUtils . cleanup ( localRepoPath ) ; } catch ( Exception e ) { logger . warn ( "Error cleaning up repo for target {}" , getId ( ) ) ; } MDC . remove ( DeploymentConstants . TARGET... |
public class HeaderRecyclerViewAdapter { /** * Invokes onBindHeaderViewHolder , onBindItemViewHolder or onBindFooterViewHOlder methods based
* on the position param . */
@ Override public final void onBindViewHolder ( VH holder , int position ) { } } | if ( isHeaderPosition ( position ) ) { onBindHeaderViewHolder ( holder , position ) ; } else if ( isFooterPosition ( position ) ) { onBindFooterViewHolder ( holder , position ) ; } else { onBindItemViewHolder ( holder , position ) ; } |
public class Future { /** * ( non - Javadoc )
* @ see
* com . oath . cyclops . lambda . monads . Transformable # peek ( java . util . function . Consumer ) */
@ Override public Future < T > peek ( final Consumer < ? super T > c ) { } } | return ( Future < T > ) MonadicValue . super . peek ( c ) ; |
public class UpdateRouteResult { /** * The request models for the route .
* @ param requestModels
* The request models for the route .
* @ return Returns a reference to this object so that method calls can be chained together . */
public UpdateRouteResult withRequestModels ( java . util . Map < String , String > ... | setRequestModels ( requestModels ) ; return this ; |
public class PinYinUtils { /** * 获取汉字串拼音首字母 , 英文字符不变
* @ param chinese
* 汉字串
* @ return 汉语拼音首字母 */
public static String getFirstSpell ( String chinese ) { } } | if ( StringUtils . isBlank ( chinese ) ) return "" ; StringBuffer pybf = new StringBuffer ( ) ; char [ ] arr = chinese . toCharArray ( ) ; HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat ( ) ; defaultFormat . setCaseType ( HanyuPinyinCaseType . LOWERCASE ) ; defaultFormat . setToneType ( HanyuPinyin... |
public class HttpHeaderParser { /** * any CHAR , excluding CTLs , SPACE , and " : "
* @ param b
* @ return */
private static boolean isLegalNameByte ( byte b ) { } } | if ( b > 31 ) { if ( b < 128 ) { return b == SP ? false : b != COLON ; } } return false ; |
public class ForwardingDrawable { /** * Gets the transformed bounds of this drawable .
* Note : bounds are not cropped ( otherwise they would likely be the same as drawable ' s bounds ) .
* @ param outBounds rect to fill with bounds */
public void getTransformedBounds ( RectF outBounds ) { } } | getParentTransform ( sTempTransform ) ; // IMPORTANT : { @ code getBounds } should be called after { @ code getParentTransform } ,
// because the parent may have to change our bounds .
outBounds . set ( getBounds ( ) ) ; sTempTransform . mapRect ( outBounds ) ; |
public class FYShuffle { /** * Randomly shuffle the elements in a list
* @ param < E > the type of elements in this list .
* @ param list a list of objects to shuffle . */
public static < E > void shuffle ( List < E > list ) { } } | int swapPlace = - 1 ; for ( int i = 0 ; i < list . size ( ) ; i ++ ) { swapPlace = ( int ) ( Math . random ( ) * ( list . size ( ) - 1 ) ) ; TrivialSwap . swap ( list , i , swapPlace ) ; } |
public class FldExporter { /** * Writes the engine into the given writer
* @ param engine is the engine to export
* @ param writer is the output where the engine will be written to
* @ param values is the number of values to export
* @ param scope indicates the scope of the values
* @ throws IOException if an... | write ( engine , writer , values , scope , engine . getInputVariables ( ) ) ; |
public class ObjectInputStream { /** * Read the next item assuming it is an exception . The exception is not a
* regular instance in the object graph , but the exception instance that
* happened ( if any ) when dumping the original object graph . The set of seen
* objects will be reset just before and just after ... | resetSeenObjects ( ) ; // Now we read the Throwable object that was saved
// WARNING - the grammar says it is a Throwable , but the
// WriteAbortedException constructor takes an Exception . So , we read an
// Exception from the stream
Exception exc = ( Exception ) readObject ( ) ; // We reset the receiver ' s state ( t... |
public class PrintComponentImpl { /** * Calculates the size based constraint width and height if present , otherwise from children sizes . */
public void calculateSize ( PdfContext context ) { } } | float width = 0 ; float height = 0 ; for ( PrintComponent < ? > child : children ) { child . calculateSize ( context ) ; float cw = child . getBounds ( ) . getWidth ( ) + 2 * child . getConstraint ( ) . getMarginX ( ) ; float ch = child . getBounds ( ) . getHeight ( ) + 2 * child . getConstraint ( ) . getMarginY ( ) ; ... |
public class HelperNister5 { /** * See equations 11-13
* K = E - z * F
* L = G - z * H
* M = I - z * J
* ( E , F , G , H , I , J ) = x * ( z ^ 2 + z + 1 ) + y * ( z ^ 2 + z + 1 ) + z ^ 3 + z ^ 2 + z + 1
* @ param A Solution to linear system */
public void setDeterminantVectors ( DMatrixRMaj A ) { } } | int r = A . numCols * 4 ; int t = A . numCols * 5 ; K00 = - A . data [ t ++ ] ; K01 = A . data [ r ++ ] - A . data [ t ++ ] ; K02 = A . data [ r ++ ] - A . data [ t ++ ] ; K03 = A . data [ r ++ ] ; K04 = - A . data [ t ++ ] ; K05 = A . data [ r ++ ] - A . data [ t ++ ] ; K06 = A . data [ r ++ ] - A . data [ t ++ ] ; K0... |
public class OAuth2UserDetailsService { /** * Gets the user id from the JSON object returned by the OAuth Provider . Uses the
* { @ link OAuth2ServiceProperties # getUserIdName ( ) } to obtain the property from the
* map .
* @ param userInfo The JSON string converted into a { @ link Map } .
* @ return The user ... | I id ; String idAsString = ( String ) userInfo . get ( oAuth2ServiceProperties . getUserIdName ( ) ) ; if ( idConverter != null ) { id = idConverter . convert ( idAsString ) ; } else { id = ( I ) idAsString ; } return id ; |
public class Proxy { /** * Sends the request reads reply and returns it
* throws exception if something wrong with IO
* or the reply code is not zero */
protected ProxyMessage exchange ( ProxyMessage request ) throws SocksException { } } | ProxyMessage reply ; try { request . write ( out ) ; reply = formMessage ( in ) ; } catch ( SocksException s_ex ) { throw s_ex ; } catch ( IOException ioe ) { throw ( new SocksException ( SOCKS_PROXY_IO_ERROR , "" + ioe ) ) ; } return reply ; |
public class MBeanServerHandler { /** * Initialize the server handle .
* @ param pConfig configuration passed through to the server detectors
* @ param pLogHandler used for putting out diagnostic messags
* @ param pDetectors all detectors known */
private void initServerHandle ( Configuration pConfig , LogHandler... | serverHandle = detectServers ( pDetectors , pLogHandler ) ; if ( serverHandle != null ) { serverHandle . postDetect ( mBeanServerManager , pConfig , pLogHandler ) ; } |
public class MLEDependencyGrammar { /** * Writes out data from this Object to the Writer w . */
@ Override public void writeData ( PrintWriter out ) throws IOException { } } | // all lines have one rule per line
for ( IntDependency dependency : argCounter . keySet ( ) ) { if ( dependency . head != wildTW && dependency . arg != wildTW && dependency . head . word != - 1 && dependency . arg . word != - 1 ) { double count = argCounter . getCount ( dependency ) ; out . println ( dependency . toSt... |
public class EditController { /** * disables the responses for a given pathname and user id
* @ param model
* @ param path _ id
* @ param clientUUID
* @ return
* @ throws Exception */
@ RequestMapping ( value = "api/edit/disable" , method = RequestMethod . POST ) public @ ResponseBody String disableResponses ... | OverrideService . getInstance ( ) . disableAllOverrides ( path_id , clientUUID ) ; // TODO also need to disable custom override if there is one of those
editService . removeCustomOverride ( path_id , clientUUID ) ; return null ; |
public class ConnectionFactoryAbstractImpl { /** * Returns connection properties for passing to DriverManager , after merging
* JDBC driver - specific configuration settings with name / password from connection
* descriptor .
* @ param jcd the connection descriptor with driver - specific settings
* @ param user... | final Properties jdbcProperties ; jdbcProperties = jcd . getConnectionPoolDescriptor ( ) . getJdbcProperties ( ) ; if ( user != null ) { jdbcProperties . put ( "user" , user ) ; jdbcProperties . put ( "password" , password ) ; } return jdbcProperties ; |
public class BigLines { /** * Returns the line specified by ` lineNumber ` .
* Note the ` lineNumber ` starts with ` 0 ` .
* @ param lineNumber
* specify the line to be returned .
* @ return the line as described above . */
public String fetch ( int lineNumber ) { } } | E . illegalArgumentIf ( lineNumber < 0 , "line number must not be negative number: " + lineNumber ) ; E . illegalArgumentIf ( lineNumber >= lines ( ) , "line number is out of range: " + lineNumber ) ; List < String > list = fetch ( lineNumber , 1 ) ; return list . isEmpty ( ) ? null : list . get ( 0 ) ; |
public class DocumentLoader { /** * Load the { @ code ` beer - sample ` } bucket
* @ param mock The cluster
* @ throws IOException if an I / O error occurs */
public static void loadBeerSample ( CouchbaseMock mock ) throws IOException { } } | InputStream iss = CouchbaseMock . class . getClassLoader ( ) . getResourceAsStream ( "views/beer-sample.serialized.xz" ) ; DocumentLoader . loadFromSerializedXZ ( iss , "beer-sample" , mock ) ; |
public class SequencingRunner { /** * Finds the top nodes which have been created during the sequencing process , based on the original output node . It is
* important that this is called before the session is saved , because it uses the new flag .
* @ param rootOutputNode the node under which the output of the seq... | if ( rootOutputNode . isNew ( ) ) { return Arrays . asList ( rootOutputNode ) ; } // if the node was not new , we need to find the new sequenced nodes
List < AbstractJcrNode > nodes = new ArrayList < AbstractJcrNode > ( ) ; NodeIterator childrenIt = rootOutputNode . getNodesInternal ( ) ; while ( childrenIt . hasNext (... |
public class AbstractTensorBase { /** * Merges the given sets of dimensions , verifying that any dimensions in
* both sets have the same size .
* @ param firstDimensionNums
* @ param firstDimensionSizes
* @ param secondDimensionNums
* @ param secondDimensionSizes
* @ return */
public static final DimensionS... | SortedSet < Integer > first = Sets . newTreeSet ( Ints . asList ( firstDimensionNums ) ) ; SortedSet < Integer > second = Sets . newTreeSet ( Ints . asList ( secondDimensionNums ) ) ; SortedSet < Integer > all = Sets . newTreeSet ( first ) ; all . addAll ( second ) ; int [ ] resultDims = Ints . toArray ( all ) ; int [ ... |
public class DynamicPath { /** * Checks if a partial path to a file is compatible with this dynamic path .
* @ param path
* Full path to file
* @ param pathPosition
* Start position for checking passed path
* @ param segmentIndex
* Index of segment that will be used for check
* @ return { @ code true } if... | Segment segment = segments . get ( segmentIndex ) ; String expectedValue = segment . getStaticText ( ) ; if ( expectedValue == null ) { if ( segmentIndex == segments . size ( ) - 1 ) { return segment . validateToken ( path . substring ( pathPosition ) ) ; } else { String nextValue = segments . get ( segmentIndex + 1 ) ... |
public class GeometryIndexService { /** * Returns a new index that is one level higher than this index . Useful to get the index of a ring for a vertex .
* @ param index
* @ return the parent index */
public GeometryIndex getParent ( GeometryIndex index ) { } } | GeometryIndex parent = new GeometryIndex ( index ) ; GeometryIndex deepestParent = null ; GeometryIndex p = parent ; while ( p . hasChild ( ) ) { deepestParent = p ; p = p . getChild ( ) ; } if ( deepestParent != null ) { deepestParent . setChild ( null ) ; } return parent ; |
public class SQLiteExecutor { /** * Returns a { @ code Nullable } describing the value in the first row / column if it exists , otherwise return an empty { @ code Nullable } .
* Special note for type conversion for { @ code boolean } or { @ code Boolean } type : { @ code true } is returned if the
* { @ code String ... | N . checkArgNotNull ( targetClass , "targetClass" ) ; final Cursor cursor = rawQuery ( sql , parameters ) ; DataSet ds = null ; try { ds = extractData ( cursor , Type . arrayOf ( targetClass ) , 0 , 1 ) ; } finally { cursor . close ( ) ; } return N . isNullOrEmpty ( ds ) ? Nullable . < V > empty ( ) : Nullable . of ( N... |
public class HttpAsyncClientImpl { /** * Prepares the HTTP request object creating a POST or GET request depending on if data
* is supplied or not .
* @ param jsonData json POST data , will use GET if null
* @ return HttpUriRequest object the prepared request */
private < T > HttpUriRequest prepareRequest ( URI u... | HttpUriRequest httpRequest ; if ( jsonData != null ) { // POST data
HttpPost httpPost = new HttpPost ( uri ) ; httpPost . setEntity ( new StringEntity ( jsonData , ContentType . APPLICATION_JSON ) ) ; httpRequest = httpPost ; } else { // GET request
httpRequest = new HttpGet ( uri ) ; } httpRequest . addHeader ( HttpHe... |
public class RemoteProxyController { /** * Translate the operation address .
* @ param op the operation
* @ return the new operation */
public ModelNode translateOperationForProxy ( final ModelNode op ) { } } | return translateOperationForProxy ( op , PathAddress . pathAddress ( op . get ( OP_ADDR ) ) ) ; |
public class JCusparse { /** * Description : This routine takes as input a csr form and compresses it to return a compressed csr form */
public static int cusparseScsr2csr_compress ( cusparseHandle handle , int m , int n , cusparseMatDescr descrA , Pointer csrSortedValA , Pointer csrSortedColIndA , Pointer csrSortedRow... | return checkResult ( cusparseScsr2csr_compressNative ( handle , m , n , descrA , csrSortedValA , csrSortedColIndA , csrSortedRowPtrA , nnzA , nnzPerRow , csrSortedValC , csrSortedColIndC , csrSortedRowPtrC , tol ) ) ; |
public class GenericProblem { /** * Set the objective function . Any objective designed for the solution and data types of the problem ,
* or more general types , is accepted . The objective can not be < code > null < / code > .
* @ param objective objective function
* @ throws NullPointerException if < code > ob... | // check not null
if ( objective == null ) { throw new NullPointerException ( "Error while setting objective: null is not allowed." ) ; } this . objective = objective ; |
public class RecLogServiceImpl { /** * Driven by the runtime during server startup . This ' hook ' is used to perform
* recovery log service initialization . */
public void startRecovery ( RecoveryLogFactory fac ) { } } | if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "startRecovery" , fac ) ; // This is a stand alone server . HA can never effect this server so direct local recovery now .
RecoveryDirector director = null ; try { director = RecoveryDirectorFactory . recoveryDirector ( ) ; /* @ LI1578-22A */
director . setRecoveryLogFac... |
public class Error { /** * set the value template The relative path to the custom error page .
* @ param template value to set
* @ throws MissingIncludeException */
public void setTemplate ( String template ) throws MissingIncludeException { } } | PageSource ps = pageContext . getCurrentPageSource ( ) . getRealPage ( template ) ; if ( ! ps . exists ( ) ) throw new MissingIncludeException ( ps ) ; errorPage . setTemplate ( ps ) ; |
public class CSSLexerState { /** * Checks whether some pair characters are balanced . Modes are :
* < ul >
* < li > BALANCED - everything must be balanced : single and double quotatation marks , curly braces , parentheses
* < li > FUNCTION - within the function arguments : parentheses must be balanced
* < li > ... | if ( mode == RecoveryMode . BALANCED ) return ! aposOpen && ! quotOpen && curlyNest == 0 && parenNest == 0 && sqNest == 0 ; else if ( mode == RecoveryMode . FUNCTION ) return parenNest == 0 && sqNest == 0 ; else if ( mode == RecoveryMode . RULE ) return ! aposOpen && ! quotOpen && parenNest == 0 && sqNest == 0 ; else i... |
public class ZoomBounds { /** * Calculates min , max and " fit " zoom levels for given state and according to current settings .
* @ param state State for which to calculate zoom bounds .
* @ return Current zoom bounds object for calls chaining . */
public ZoomBounds set ( State state ) { } } | float imageWidth = settings . getImageW ( ) ; float imageHeight = settings . getImageH ( ) ; float areaWidth = settings . getMovementAreaW ( ) ; float areaHeight = settings . getMovementAreaH ( ) ; if ( imageWidth == 0f || imageHeight == 0f || areaWidth == 0f || areaHeight == 0f ) { minZoom = maxZoom = fitZoom = 1f ; r... |
public class GVRPose { /** * Calculates the world matrix based on the local matrix . */
protected void calcWorld ( Bone bone , int parentId ) { } } | getWorldMatrix ( parentId , mTempMtxB ) ; // WorldMatrix ( parent ) TempMtxB
mTempMtxB . mul ( bone . LocalMatrix ) ; // WorldMatrix = WorldMatrix ( parent ) * LocalMatrix
bone . WorldMatrix . set ( mTempMtxB ) ; |
public class BoxFolder { /** * Uploads a new file to this folder .
* @ param fileContent a stream containing the contents of the file to upload .
* @ param name the name to give the uploaded file .
* @ return the uploaded file ' s info . */
public BoxFile . Info uploadFile ( InputStream fileContent , String name ... | FileUploadParams uploadInfo = new FileUploadParams ( ) . setContent ( fileContent ) . setName ( name ) ; return this . uploadFile ( uploadInfo ) ; |
public class CalendarRecordItem { /** * Get the status of this object .
* @ param iFieldSeq The field sequence to retrieve .
* @ return The data . */
public Object getFieldData ( int iSFieldSeq ) { } } | ScreenField sField = null ; if ( iSFieldSeq != - 1 ) sField = m_gridScreen . getSField ( this . getRelativeSField ( iSFieldSeq ) ) ; if ( sField != null ) return sField . getConverter ( ) . getData ( ) ; return null ; |
public class MetricForm { /** * Parses the " rate " section of the query string and returns an instance
* of the LocalRateOptions class that contains the values found .
* The format of the rate specification is rate [ { counter [ , # [ , # ] ] } ] .
* If the spec is invalid or we were unable to parse properly , i... | if ( ! rate || spec . length ( ) < 6 ) { return new LocalRateOptions ( ) ; } String [ ] parts = spec . split ( spec . substring ( 5 , spec . length ( ) - 1 ) , ',' ) ; if ( parts . length < 1 || parts . length > 3 ) { return new LocalRateOptions ( ) ; } try { LocalRateOptions options = new LocalRateOptions ( ) ; option... |
public class FlowControllerFactory { /** * Internal APIs */
LinkedHashMap /* < String , SharedFlowController > */
getDefaultSharedFlows ( RequestContext context ) throws ClassNotFoundException , InstantiationException , IllegalAccessException { } } | SharedFlowRefConfig [ ] defaultRefs = ConfigUtil . getConfig ( ) . getSharedFlowRefs ( ) ; if ( defaultRefs != null ) { if ( defaultRefs . length > 0 ) { LinkedHashMap /* < String , SharedFlowController > */
sharedFlows = new LinkedHashMap ( ) ; for ( int i = 0 ; i < defaultRefs . length ; i ++ ) { SharedFlowRefConfig ... |
public class BsfUtils { /** * Shortcut for getting context parameters using an already obtained FacesContext .
* @ param param context parameter name
* @ return value of context parameter , may be null or empty */
public static String getInitParam ( String param , FacesContext context ) { } } | return context . getExternalContext ( ) . getInitParameter ( param ) ; |
public class QuoteManager { /** * Handle a new candle
* @ param symbol
* @ param candle */
public void handleNewTick ( final BitfinexTickerSymbol currencyPair , final BitfinexTick tick ) { } } | updateChannelHeartbeat ( currencyPair ) ; tickerCallbacks . handleEvent ( currencyPair , tick ) ; |
public class Bytes { /** * Dump a byte array into a { @ link PrintStream } in human readable format */
public static void dump ( PrintStream out , byte [ ] b , int off , int len ) { } } | int end = off + len ; int offDiv16 = off / 16 ; int endDiv16 = end / 16 ; if ( offDiv16 == endDiv16 ) { out . println ( dumpLine ( b , offDiv16 , off % 16 , end % 16 ) ) ; } else { out . println ( dumpLine ( b , offDiv16 , off % 16 , 16 ) ) ; for ( int i = offDiv16 + 1 ; i < endDiv16 ; i ++ ) { out . println ( dumpLine... |
public class ThriftUtil { /** * Returns configured thrift message class for the given Kafka topic
* @ param topic
* Kafka topic
* @ return thrift message class used by this utility instance , or
* < code > null < / code > in case valid class couldn ' t be found in the
* configuration . */
@ SuppressWarnings (... | return allTopics ? messageClassForAll : messageClassByTopic . get ( topic ) ; |
public class KeyVaultClientBaseImpl { /** * Lists deleted SAS definitions for the specified vault and storage account .
* The Get Deleted Sas Definitions operation returns the SAS definitions that have been deleted for a vault enabled for soft - delete . This operation requires the storage / listsas permission .
* ... | return getDeletedSasDefinitionsSinglePageAsync ( vaultBaseUrl , storageAccountName ) . concatMap ( new Func1 < ServiceResponse < Page < DeletedSasDefinitionItem > > , Observable < ServiceResponse < Page < DeletedSasDefinitionItem > > > > ( ) { @ Override public Observable < ServiceResponse < Page < DeletedSasDefinition... |
public class TangoEventsAdapter { public void addTangoAttConfigListener ( ITangoAttConfigListener listener , String attrName , boolean stateless ) throws DevFailed { } } | addTangoAttConfigListener ( listener , attrName , new String [ 0 ] , stateless ) ; |
public class WebMvcLinkBuilderFactory { /** * ( non - Javadoc )
* @ see org . springframework . hateoas . MethodLinkBuilderFactory # linkTo ( java . lang . Object ) */
@ Override public WebMvcLinkBuilder linkTo ( Object invocationValue ) { } } | Function < String , UriComponentsBuilder > builderFactory = mapping -> UriComponentsBuilderFactory . getBuilder ( ) . path ( mapping ) ; return WebHandler . linkTo ( invocationValue , WebMvcLinkBuilder :: new , ( builder , invocation ) -> { MethodParameters parameters = MethodParameters . of ( invocation . getMethod ( ... |
public class StaticMockitoSession { /** * { @ inheritDoc }
* < p > < b > Extension : < / b > This also resets all stubbing of static methods set up in the
* { @ link ExtendedMockito # mockitoSession ( ) builder } of the session . */
@ Override public void finishMocking ( Throwable failure ) { } } | try { instanceSession . finishMocking ( failure ) ; } finally { for ( Class < ? > clazz : staticMocks ) { mockingInProgressClass . set ( clazz ) ; try { Mockito . reset ( ExtendedMockito . staticMockMarker ( clazz ) ) ; } finally { mockingInProgressClass . remove ( ) ; } classToMarker . remove ( clazz ) ; } ExtendedMoc... |
public class CDIOperations { /** * Returns all the objects from the given { @ link Project } that support injection point . Most of the Java EE
* components can use @ Inject , except most of the JPA artifacts ( entities , embeddable . . . ) */
public List < JavaResource > getProjectInjectionPointBeans ( Project proje... | final List < JavaResource > beans = new ArrayList < > ( ) ; if ( project != null ) { project . getFacet ( JavaSourceFacet . class ) . visitJavaSources ( new JavaResourceVisitor ( ) { @ Override public void visit ( VisitContext context , JavaResource resource ) { try { JavaSource < ? > javaSource = resource . getJavaTyp... |
public class IssueHistory { /** * 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 . NOT_UNIQUE , ISSUE_ID_KEY ) ; keyArea . addKeyField ( ISSUE_ID , Constants . ASCENDING ) ; |
public class ExpressRouteCircuitsInner { /** * Gets the currently advertised routes table associated with the express route circuit in a resource group .
* @ param resourceGroupName The name of the resource group .
* @ param circuitName The name of the express route circuit .
* @ param peeringName The name of the... | return beginListRoutesTableWithServiceResponseAsync ( resourceGroupName , circuitName , peeringName , devicePath ) . map ( new Func1 < ServiceResponse < ExpressRouteCircuitsRoutesTableListResultInner > , ExpressRouteCircuitsRoutesTableListResultInner > ( ) { @ Override public ExpressRouteCircuitsRoutesTableListResultIn... |
public class TreeMap { /** * method validate ( ) . */
private String indexLabel ( Entry child ) throws ObjectManagerException { } } | // Step up the tree until we reach the root .
String indexLabel = "" ; for ( Entry parent = ( Entry ) child . getParent ( ) ; parent != null ; parent = ( Entry ) child . getParent ( ) ) { if ( parent . getLeft ( ) == child ) indexLabel = "L," + indexLabel ; else if ( parent . getRight ( ) == child ) indexLabel = "R," +... |
public class FunctionLib { /** * Fuegt der FunctionLib eine Funktion ( FunctionLibFunction ) zu .
* @ param function */
public void setFunction ( FunctionLibFunction function ) { } } | function . setFunctionLib ( this ) ; functions . put ( function . getName ( ) , function ) ; |
public class DetourCommon { /** * / @ return The distance between the two points . */
static float vDist ( float [ ] v1 , float [ ] v2 ) { } } | float dx = v2 [ 0 ] - v1 [ 0 ] ; float dy = v2 [ 1 ] - v1 [ 1 ] ; float dz = v2 [ 2 ] - v1 [ 2 ] ; return ( float ) Math . sqrt ( dx * dx + dy * dy + dz * dz ) ; |
public class XmlRpcDataMarshaller { /** * Transforms the Vector of the Specification parameters into a Specification Object . < br >
* Structure of the parameters : < br >
* Vector [ name , Vector [ repository parameters ] , Vector [ SUT parameters ] ]
* @ param xmlRpcParameters a { @ link java . util . Vector } ... | Specification specification = null ; if ( ! xmlRpcParameters . isEmpty ( ) ) { specification = Specification . newInstance ( ( String ) xmlRpcParameters . get ( DOCUMENT_NAME_IDX ) ) ; specification . setRepository ( toRepository ( ( Vector < Object > ) xmlRpcParameters . get ( DOCUMENT_REPOSITORY_IDX ) ) ) ; specifica... |
public class JCloudsHandler { /** * Creates a JCloud context .
* @ param targetProperties the target properties
* @ return a non - null object
* @ throws TargetException if the target properties are invalid */
ComputeService jcloudContext ( Map < String , String > targetProperties ) throws TargetException { } } | validate ( targetProperties ) ; ComputeServiceContext context = ContextBuilder . newBuilder ( targetProperties . get ( PROVIDER_ID ) ) . endpoint ( targetProperties . get ( ENDPOINT ) ) . credentials ( targetProperties . get ( IDENTITY ) , targetProperties . get ( CREDENTIAL ) ) . buildView ( ComputeServiceContext . cl... |
public class RequestHttp1 { /** * Parses headers from the read stream .
* @ param s the input read stream */
private void parseHeaders ( ReadStream s ) throws IOException { } } | int version = version ( ) ; if ( version < HTTP_1_0 ) { return ; } if ( version < HTTP_1_1 ) { killKeepalive ( "http client version less than 1.1: " + version ) ; } byte [ ] readBuffer = s . buffer ( ) ; int readOffset = s . offset ( ) ; int readLength = s . length ( ) ; char [ ] headerBuffer = _headerBuffer ; headerBu... |
public class TileTOCRGImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setDATAPOS ( Integer newDATAPOS ) { } } | Integer oldDATAPOS = datapos ; datapos = newDATAPOS ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . TILE_TOCRG__DATAPOS , oldDATAPOS , datapos ) ) ; |
public class ParetoFront { /** * Inserts an { @ code element } to this pareto front .
* @ apiNote
* Inserting a new element has a time complexity of { @ code O ( n ) } .
* @ param element the element to add
* @ return { @ code true } if this set did not already contain the specified
* element */
@ Override pu... | requireNonNull ( element ) ; boolean updated = false ; final Iterator < T > iterator = _population . iterator ( ) ; while ( iterator . hasNext ( ) ) { final T existing = iterator . next ( ) ; int cmp = _dominance . compare ( element , existing ) ; if ( cmp > 0 ) { iterator . remove ( ) ; updated = true ; } else if ( cm... |
public class FeatureColumn { /** * Create a new geometry column
* @ param index
* index
* @ param name
* name
* @ param type
* geometry type
* @ param notNull
* not null flag
* @ param defaultValue
* default value
* @ return feature column */
public static FeatureColumn createGeometryColumn ( int ... | if ( type == null ) { throw new GeoPackageException ( "Geometry Type is required to create geometry column: " + name ) ; } return new FeatureColumn ( index , name , GeoPackageDataType . BLOB , null , notNull , defaultValue , false , type ) ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.