signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class FindBugsViewerTask { /** * the plugin list to use .
* @ param src
* plugin list to use */
public void setPluginList ( Path src ) { } } | if ( pluginList == null ) { pluginList = src ; } else { pluginList . append ( src ) ; } |
public class SOAPElementFactory { /** * Creates a new instance of < code > SOAPElementFactory < / code > .
* @ return a new instance of a < code > SOAPElementFactory < / code >
* @ exception SOAPException if there was an error creating the
* default < code > SOAPElementFactory < / code > */
public static SOAPElem... | try { return new SOAPElementFactory ( SOAPFactory . newInstance ( ) ) ; } catch ( Exception ex ) { throw new SOAPException ( "Unable to create SOAP Element Factory: " + ex . getMessage ( ) ) ; } |
public class SegwitAddress { /** * Helper for re - arranging bits into groups . */
private static byte [ ] convertBits ( final byte [ ] in , final int inStart , final int inLen , final int fromBits , final int toBits , final boolean pad ) throws AddressFormatException { } } | int acc = 0 ; int bits = 0 ; ByteArrayOutputStream out = new ByteArrayOutputStream ( 64 ) ; final int maxv = ( 1 << toBits ) - 1 ; final int max_acc = ( 1 << ( fromBits + toBits - 1 ) ) - 1 ; for ( int i = 0 ; i < inLen ; i ++ ) { int value = in [ i + inStart ] & 0xff ; if ( ( value >>> fromBits ) != 0 ) { throw new Ad... |
public class SplunkStormRest { /** * The output format for your data :
* json _ meta - The current default format , where each payload contains a full JSON document . It contains metadata
* and an " interactions " property that has an array of interactions .
* json _ array - The payload is a full JSON document , ... | String strFormat ; switch ( format ) { case JSON_NEW_LINE_TIMESTAMP : strFormat = "json_new_line" ; break ; default : case JSON_NEW_LINE_TIMESTAMP_META : strFormat = "json_new_line_meta" ; break ; } return setParam ( "format" , strFormat ) ; |
public class OptionsImpl { /** * Listener method for being informed of changes to the properties file by another
* instance of this class . Called by other instances of this class for instances
* that use the same properties file when properties are saved .
* @ param updated
* the updated properties
* @ param... | Properties newProps = new Properties ( getDefaultOptions ( ) ) ; Enumeration < ? > propsEnum = updated . propertyNames ( ) ; while ( propsEnum . hasMoreElements ( ) ) { String name = ( String ) propsEnum . nextElement ( ) ; newProps . setProperty ( name , updated . getProperty ( name ) ) ; } setProps ( newProps ) ; upd... |
public class RowCursor { /** * The size includes the dynamic size from any blobs */
public int getSize ( ) { } } | int size = length ( ) ; if ( _blobs == null ) { return size ; } for ( BlobOutputStream blob : _blobs ) { if ( blob != null ) { size += blob . getSize ( ) ; } } return size ; |
public class FavoriteUserProperty { /** * Use { # getAllFavorites ( ) }
* @ return favorites */
@ Deprecated public List < String > getFavorites ( ) { } } | removeFavoritesWhichDoNotExist ( ) ; return ImmutableList . copyOf ( Maps . filterEntries ( data , new Predicate < Entry < String , Boolean > > ( ) { @ Override public boolean apply ( @ Nullable Entry < String , Boolean > input ) { return input != null && input . getValue ( ) ; } } ) . keySet ( ) ) ; |
public class TheMovieDbApi { /** * This method is used to generate a session id for user based
* authentication . User must provide their username and password
* A session id is required in order to use any of the write methods .
* @ param token Session token
* @ param username User ' s username
* @ param pas... | return tmdbAuth . getSessionTokenLogin ( token , username , password ) ; |
public class Cell { /** * Returns the cell value casted to the specified class .
* @ param clazz the expected class
* @ param < T > the return type
* @ return the cell value casted to the specified class */
public < T > T getValue ( Class < T > clazz ) { } } | if ( this . cellValue == null ) { return null ; } else { if ( Number . class . isAssignableFrom ( cellValue . getClass ( ) ) ) { return null ; } else { return ( T ) this . cellValue ; } } |
public class CodecCollector { /** * Compute positions .
* @ param mtasCodecInfo
* the mtas codec info
* @ param r
* the r
* @ param lrc
* the lrc
* @ param field
* the field
* @ param docSet
* the doc set
* @ return the map
* @ throws IOException
* Signals that an I / O exception has occurred ... | HashMap < Integer , Integer > positionsData ; if ( mtasCodecInfo != null ) { // for relatively small numbers , compute only what is needed
if ( docSet . size ( ) < Math . log ( r . maxDoc ( ) ) ) { positionsData = new HashMap < > ( ) ; for ( int docId : docSet ) { positionsData . put ( docId , mtasCodecInfo . getNumber... |
public class PrecisionRecallCurve { /** * Get the point ( index , threshold , precision , recall ) at the given recall . < br >
* Specifically , return the points at the highest threshold that has recall equal to or greater than the
* requested recall .
* @ param recall Recall to get the point for
* @ return po... | Point foundPoint = null ; // Find the HIGHEST threshold that gives the specified recall
for ( int i = this . recall . length - 1 ; i >= 0 ; i -- ) { if ( this . recall [ i ] >= recall ) { if ( foundPoint == null || ( this . recall [ i ] == foundPoint . getRecall ( ) && this . precision [ i ] >= foundPoint . getPrecisio... |
public class VirtualMachinesInner { /** * Shuts down the virtual machine and releases the compute resources . You are not billed for the compute resources that this virtual machine uses .
* @ param resourceGroupName The name of the resource group .
* @ param vmName The name of the virtual machine .
* @ throws Ill... | return deallocateWithServiceResponseAsync ( resourceGroupName , vmName ) . toBlocking ( ) . last ( ) . body ( ) ; |
public class Light { /** * Adds light to specified RayHandler */
public void add ( RayHandler rayHandler ) { } } | this . rayHandler = rayHandler ; if ( active ) { rayHandler . lightList . add ( this ) ; } else { rayHandler . disabledLights . add ( this ) ; } |
public class LongTupleIterators { /** * Returns an iterator that returns { @ link MutableLongTuple } s in the
* given range , incremented in the given { @ link Order } . If the given
* { @ link Order } is < code > null < / code > , then < code > null < / code > will
* be returned . < br >
* < br >
* Also see ... | if ( order == null ) { return null ; } LongTuple localMin = LongTuples . copy ( min ) ; LongTuple localMax = LongTuples . copy ( max ) ; return new LongTupleIterator ( localMin , localMax , LongTupleIncrementors . incrementor ( order ) ) ; |
public class ns_cluster { /** * Use this API to fetch filtered set of ns _ cluster resources .
* filter string should be in JSON format . eg : " vm _ state : DOWN , name : [ a - z ] + " */
public static ns_cluster [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } } | ns_cluster obj = new ns_cluster ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; ns_cluster [ ] response = ( ns_cluster [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class Histogram_F64 { /** * Given a value it returns the corresponding bin index in this histogram for integer values . The discretion
* is taken in account and 1 is added to the range .
* @ param dimension Which dimension the value belongs to
* @ param value Floating point value between min and max , incl... | double min = valueMin [ dimension ] ; double max = valueMax [ dimension ] ; double fraction = ( ( value - min ) / ( max - min + 1.0 ) ) ; return ( int ) ( fraction * length [ dimension ] ) ; |
public class IntlPhoneInput { /** * Set hint number for country */
private void setHint ( ) { } } | if ( mPhoneEdit != null && mSelectedCountry != null && mSelectedCountry . getIso ( ) != null ) { Phonenumber . PhoneNumber phoneNumber = mPhoneUtil . getExampleNumberForType ( mSelectedCountry . getIso ( ) , PhoneNumberUtil . PhoneNumberType . MOBILE ) ; if ( phoneNumber != null ) { mPhoneEdit . setHint ( mPhoneUtil . ... |
public class DefaultShardManagerBuilder { /** * Sets the list of shards the { @ link DefaultShardManager DefaultShardManager } should contain .
* < p > < b > This does not have any effect if the total shard count is set to { @ code - 1 } ( get recommended shards from discord ) . < / b >
* @ param shardIds
* The l... | Checks . notNull ( shardIds , "shardIds" ) ; for ( int id : shardIds ) { Checks . notNegative ( id , "minShardId" ) ; Checks . check ( id < this . shardsTotal , "maxShardId must be lower than shardsTotal" ) ; } this . shards = Arrays . stream ( shardIds ) . boxed ( ) . collect ( Collectors . toSet ( ) ) ; return this ; |
public class TaskRingBuffer { /** * Replaces the task with its response
* If the sequence does not correspond to a task then the call is ignored
* @ param sequence The sequence
* @ param response The response */
void replaceTaskWithResult ( int sequence , Object response ) { } } | int index = toIndex ( sequence ) ; // If sequence is not equal then it is disposed externally
if ( sequences [ index ] != sequence ) { return ; } ringItems [ index ] = response ; isTask [ index ] = false ; callableCounter -- ; |
public class TrustAllSSL { /** * This is an unsafe method and should not be used . It will be removed
* at the next MAJOR release of vSphere
* @ throws NoSuchAlgorithmException
* @ throws KeyManagementException
* @ deprecated */
@ Deprecated public static void trustAllHttpsCertificates ( ) throws NoSuchAlgorith... | TrustManager [ ] trustAllCerts = new TrustManager [ 1 ] ; trustAllCerts [ 0 ] = new TrustAllManager ( ) ; SSLContext sc = SSLContext . getInstance ( "SSL" ) ; sc . init ( null , trustAllCerts , null ) ; HttpsURLConnection . setDefaultSSLSocketFactory ( sc . getSocketFactory ( ) ) ; |
public class GetDocumentationPartsRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( GetDocumentationPartsRequest getDocumentationPartsRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( getDocumentationPartsRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( getDocumentationPartsRequest . getRestApiId ( ) , RESTAPIID_BINDING ) ; protocolMarshaller . marshall ( getDocumentationPartsRequest . getType ( ) , TYPE_BI... |
public class TicketGrantingTicketResource { /** * Create ticket granting ticket for request ticket granting ticket .
* @ param requestBody the request body
* @ param request the request
* @ return the ticket granting ticket */
protected TicketGrantingTicket createTicketGrantingTicketForRequest ( final MultiValueM... | val credential = this . credentialFactory . fromRequest ( request , requestBody ) ; if ( credential == null || credential . isEmpty ( ) ) { throw new BadRestRequestException ( "No credentials are provided or extracted to authenticate the REST request" ) ; } val service = this . serviceFactory . createService ( request ... |
public class bit { /** * Increment the given { @ code data } array .
* @ param data the given { @ code data } array .
* @ return the given { @ code data } array .
* @ throws NullPointerException if the { @ code data } array is { @ code null } . */
public static byte [ ] increment ( final byte [ ] data ) { } } | for ( int i = 0 ; i < data . length && ( data [ i ] += ( byte ) 1 ) == 0 ; ++ i ) ; return data ; |
public class Word { /** * Creates a word from a list of symbols .
* @ param symbolList
* the list of symbols
* @ return the resulting word */
@ Nonnull public static < I > Word < I > fromList ( List < ? extends I > symbolList ) { } } | int siz = symbolList . size ( ) ; if ( siz == 0 ) { return epsilon ( ) ; } if ( siz == 1 ) { return Word . fromLetter ( symbolList . get ( 0 ) ) ; } return new SharedWord < > ( symbolList ) ; |
public class RelationalOperationsMatrix { /** * with the interior of Point B . */
private void exteriorAreaInteriorPoint_ ( int cluster , int id_a ) { } } | if ( m_matrix [ MatrixPredicate . ExteriorInterior ] == 0 ) return ; int clusterParentage = m_topo_graph . getClusterParentage ( cluster ) ; if ( ( clusterParentage & id_a ) == 0 ) { int chain = m_topo_graph . getClusterChain ( cluster ) ; int chainParentage = m_topo_graph . getChainParentage ( chain ) ; if ( ( chainPa... |
public class PatientResourceProvider { /** * Stores a new version of the patient in memory so that it can be retrieved later .
* @ param thePatient
* The patient resource to store
* @ param theId
* The ID of the patient to retrieve */
private void addNewVersion ( Patient thePatient , Long theId ) { } } | InstantDt publishedDate ; if ( ! myIdToPatientVersions . containsKey ( theId ) ) { myIdToPatientVersions . put ( theId , new LinkedList < Patient > ( ) ) ; publishedDate = InstantDt . withCurrentTime ( ) ; } else { Patient currentPatitne = myIdToPatientVersions . get ( theId ) . getLast ( ) ; Map < ResourceMetadataKeyE... |
public class GeoMatchSet { /** * An array of < a > GeoMatchConstraint < / a > objects , which contain the country that you want AWS WAF to search for .
* @ param geoMatchConstraints
* An array of < a > GeoMatchConstraint < / a > objects , which contain the country that you want AWS WAF to search
* for . */
public... | if ( geoMatchConstraints == null ) { this . geoMatchConstraints = null ; return ; } this . geoMatchConstraints = new java . util . ArrayList < GeoMatchConstraint > ( geoMatchConstraints ) ; |
public class PackageIndexWriter { /** * { @ inheritDoc } */
protected void addProfilesList ( Content profileSummary , Content body ) { } } | Content h2 = HtmlTree . HEADING ( HtmlTag . H2 , profileSummary ) ; Content profilesDiv = HtmlTree . DIV ( h2 ) ; Content ul = new HtmlTree ( HtmlTag . UL ) ; String profileName ; for ( int i = 1 ; i < configuration . profiles . getProfileCount ( ) ; i ++ ) { profileName = Profile . lookup ( i ) . name ; // If the prof... |
public class Uris { /** * Returns the entire URL as a string with its raw components normalized
* @ param uri the URI to convert
* @ param strict whether or not to do strict escaping
* @ return the raw string representation of the URI
* @ throws NormalizationException if the given URI doesn ' t meet our stricte... | final StringBuffer sb = new StringBuffer ( getScheme ( uri ) ) . append ( "://" ) ; if ( hasUserInfo ( uri ) ) { sb . append ( getRawUserInfo ( uri ) ) . append ( '@' ) ; } sb . append ( getHost ( uri ) ) . append ( ':' ) . append ( getPort ( uri ) ) . append ( getRawPath ( uri , strict ) ) ; if ( hasQuery ( uri ) ) { ... |
public class RubyBundleAuditAnalyzer { /** * Creates a vulnerability .
* @ param parentName the parent name
* @ param dependency the dependency
* @ param gem the gem name
* @ param nextLine the line to parse
* @ return the vulnerability
* @ throws CpeValidationException thrown if there is an error building ... | Vulnerability vulnerability = null ; if ( null != dependency ) { final String version = nextLine . substring ( VERSION . length ( ) ) ; dependency . addEvidence ( EvidenceType . VERSION , "bundler-audit" , "Version" , version , Confidence . HIGHEST ) ; dependency . setVersion ( version ) ; dependency . setName ( gem ) ... |
public class Version { /** * Create a Version object from a string value
* @ param value the header value
* @ return a Version header or null if the value is not parseable */
public static Version valueOf ( final String value ) { } } | final Optional < Instant > time = parse ( value ) ; if ( time . isPresent ( ) ) { return new Version ( time . get ( ) ) ; } return null ; |
public class UrlUtils { /** * Return everything in the path up to the last slash in a URI .
* @ param baseURI
* @ return the trailing */
public static String getStem ( String baseURI ) { } } | int idx = baseURI . lastIndexOf ( '/' ) ; String result = baseURI ; if ( idx != - 1 ) { result = baseURI . substring ( 0 , idx ) ; } return result ; |
public class AbstractJaxRsProvider { /** * Return the requestbuilder for the server
* @ param requestType
* the type of the request
* @ param restOperation
* the rest operation type
* @ return the requestbuilder */
public Builder getRequest ( final RequestTypeEnum requestType , final RestOperationTypeEnum res... | return getRequest ( requestType , restOperation , null ) ; |
public class AuthzFacadeImpl { /** * / * ( non - Javadoc )
* @ see com . att . authz . facade . AuthzFacade # updAttribForNS ( com . att . authz . env . AuthzTrans , javax . servlet . http . HttpServletResponse , java . lang . String , java . lang . String , java . lang . String ) */
@ Override public Result < Void >... | TimeTaken tt = trans . start ( NS_UPDATE_ATTRIB + ' ' + ns + ':' + key + ':' + value , Env . SUB | Env . ALWAYS ) ; try { Result < ? > rp = service . updateNsAttrib ( trans , ns , key , value ) ; switch ( rp . status ) { case OK : setContentType ( resp , keysDF . getOutType ( ) ) ; resp . getOutputStream ( ) . println ... |
public class TypeUtils { /** * < p > This method strips out the redundant upper bound types in type
* variable types and wildcard types ( or it would with wildcard types if
* multiple upper bounds were allowed ) . < / p > < p > Example , with the variable
* type declaration :
* < pre > & lt ; K extends java . u... | Assert . requireNonNull ( bounds , "bounds" ) ; // don ' t bother if there ' s only one ( or none ) type
if ( bounds . length < 2 ) { return bounds ; } final Set < Type > types = new HashSet < > ( bounds . length ) ; for ( final Type type1 : bounds ) { boolean subtypeFound = false ; for ( final Type type2 : bounds ) { ... |
public class Entity { /** * Gets the value of the requested property
* @ param propName
* allowed object is { @ link String }
* @ return
* returned object is { @ link Object } */
public Object get ( String propName ) { } } | if ( propName . equals ( PROP_IDENTIFIER ) ) { return getIdentifier ( ) ; } if ( propName . equals ( PROP_VIEW_IDENTIFIERS ) ) { return getViewIdentifiers ( ) ; } if ( propName . equals ( PROP_PARENT ) ) { return getParent ( ) ; } if ( propName . equals ( PROP_CHILDREN ) ) { return getChildren ( ) ; } if ( propName . e... |
public class Type { /** * Returns true if this type supports iteration in the reverse direction . */
public boolean isReverseIterationSupported ( ) { } } | return mNaturalClass . isArray ( ) || List . class . isAssignableFrom ( mNaturalClass ) || Set . class . isAssignableFrom ( mNaturalClass ) || Map . class . isAssignableFrom ( mNaturalClass ) ; |
public class CommerceShippingFixedOptionRelPersistenceImpl { /** * Returns the first commerce shipping fixed option rel in the ordered set where commerceShippingFixedOptionId = & # 63 ; .
* @ param commerceShippingFixedOptionId the commerce shipping fixed option ID
* @ param orderByComparator the comparator to orde... | List < CommerceShippingFixedOptionRel > list = findByCommerceShippingFixedOptionId ( commerceShippingFixedOptionId , 0 , 1 , orderByComparator ) ; if ( ! list . isEmpty ( ) ) { return list . get ( 0 ) ; } return null ; |
public class TagService { /** * Writes the JavaScript code describing the tags as Tag classes to given writer . */
public void writeTagsToJavaScript ( Writer writer ) throws IOException { } } | writer . append ( "function fillTagService(tagService) {\n" ) ; writer . append ( "\t// (name, isPrime, isPseudo, color), [parent tags]\n" ) ; for ( Tag tag : definedTags . values ( ) ) { writer . append ( "\ttagService.registerTag(new Tag(" ) ; escapeOrNull ( tag . getName ( ) , writer ) ; writer . append ( ", " ) ; e... |
public class SARLOperationHelper { /** * Test if the given expression has side effects .
* @ param expression the expression .
* @ param context the list of context expressions .
* @ return { @ code true } if the expression has side effects . */
protected Boolean _hasSideEffects ( XVariableDeclaration expression ... | if ( hasSideEffects ( expression . getRight ( ) , context ) ) { return true ; } context . declareVariable ( expression . getIdentifier ( ) , expression . getRight ( ) ) ; return false ; |
public class StoreCallback { /** * Method sessionLastAccessTimeSet
* @ param session
* @ param old
* @ param newaccess
* @ see com . ibm . wsspi . session . IStoreCallback # sessionLastAccessTimeSet ( com . ibm . wsspi . session . ISession , long , long ) */
public void sessionLastAccessTimeSet ( ISession sessi... | _sessionStateEventDispatcher . sessionLastAccessTimeSet ( session , old , newaccess ) ; |
public class DefaultClusterManager { /** * Finds a group in the cluster . */
private void doFindGroup ( final Message < JsonObject > message ) { } } | String group = message . body ( ) . getString ( "group" ) ; if ( group == null ) { message . reply ( new JsonObject ( ) . putString ( "status" , "error" ) . putString ( "message" , "Invalid group name." ) ) ; return ; } final String address = String . format ( "%s.%s" , cluster , group ) ; context . execute ( new Actio... |
public class StorageSnippets { /** * [ VARIABLE " my _ blob _ name " ] */
public Blob createBlob ( String bucketName , String blobName ) { } } | // [ START createBlob ]
BlobId blobId = BlobId . of ( bucketName , blobName ) ; BlobInfo blobInfo = BlobInfo . newBuilder ( blobId ) . setContentType ( "text/plain" ) . build ( ) ; Blob blob = storage . create ( blobInfo ) ; // [ END createBlob ]
return blob ; |
public class SystemKeyspace { /** * Writes the current partition count and size estimates into SIZE _ ESTIMATES _ CF */
public static void updateSizeEstimates ( String keyspace , String table , Map < Range < Token > , Pair < Long , Long > > estimates ) { } } | long timestamp = FBUtilities . timestampMicros ( ) ; CFMetaData estimatesTable = CFMetaData . SizeEstimatesCf ; Mutation mutation = new Mutation ( Keyspace . SYSTEM_KS , UTF8Type . instance . decompose ( keyspace ) ) ; // delete all previous values with a single range tombstone .
mutation . deleteRange ( SIZE_ESTIMATES... |
public class Format { /** * Creates an < code > AttributedCharacterIterator < / code > containg the
* concatenated contents of the passed in
* < code > AttributedCharacterIterator < / code > s .
* @ param iterators AttributedCharacterIterators used to create resulting
* AttributedCharacterIterators
* @ return... | AttributedString as = new AttributedString ( iterators ) ; return as . getIterator ( ) ; |
public class InvocationHandlerAdapter { /** * Returns a list of stack manipulations that loads all arguments of an instrumented method .
* @ param instrumentedMethod The method that is instrumented .
* @ return A list of stack manipulation that loads all arguments of an instrumented method . */
private List < Stack... | TypeList . Generic parameterTypes = instrumentedMethod . getParameters ( ) . asTypeList ( ) ; List < StackManipulation > instruction = new ArrayList < StackManipulation > ( parameterTypes . size ( ) ) ; int currentIndex = 1 ; for ( TypeDescription . Generic parameterType : parameterTypes ) { instruction . add ( new Sta... |
public class WMessages { /** * Adds an error message .
* When setting < code > encodeText < / code > to < code > false < / code > , it then becomes the responsibility of the application
* to ensure that the text does not contain any characters which need to be escaped .
* < b > WARNING : < / b > If you are using ... | Message message = new Message ( Message . ERROR_MESSAGE , code ) ; addMessage ( errorMessages , message , encodeText ) ; |
public class ConversionQuery { /** * Get the rate types set .
* @ return the rate types set , or an empty array , but never null . */
@ SuppressWarnings ( "unchecked" ) public Set < RateType > getRateTypes ( ) { } } | Set < RateType > result = get ( KEY_RATE_TYPES , Set . class ) ; if ( result == null ) { return Collections . emptySet ( ) ; } return result ; |
public class Materials { /** * 获取视频
* @ param mediaId media id
* @ return video */
public Video getVideo ( String mediaId ) { } } | String response = wxClient . get ( String . format ( WxEndpoint . get ( "url.material.binary.get" ) , mediaId ) ) ; Map < String , Object > result = JsonMapper . defaultMapper ( ) . json2Map ( response ) ; if ( result . containsKey ( "title" ) ) { return JsonMapper . defaultMapper ( ) . fromJson ( response , Video . cl... |
public class JKExceptionHandlerFactory { /** * Gets the single instance of ExceptionHandlerFactory .
* @ return single instance of ExceptionHandlerFactory */
public static JKExceptionHandlerFactory getInstance ( ) { } } | if ( JKExceptionHandlerFactory . instance == null ) { JKExceptionHandlerFactory . instance = new JKExceptionHandlerFactory ( ) ; } return JKExceptionHandlerFactory . instance ; |
public class CloneStackRequest { /** * A list of source stack app IDs to be included in the cloned stack .
* @ param cloneAppIds
* A list of source stack app IDs to be included in the cloned stack . */
public void setCloneAppIds ( java . util . Collection < String > cloneAppIds ) { } } | if ( cloneAppIds == null ) { this . cloneAppIds = null ; return ; } this . cloneAppIds = new com . amazonaws . internal . SdkInternalList < String > ( cloneAppIds ) ; |
public class IndexManager { /** * Searches on the index . Note : Query must be in Indexer ' s understandable
* format
* @ param query
* the query
* @ return the list */
public final Map < String , Object > fetchRelation ( Class < ? > clazz , String query ) { } } | // TODO : need to return list .
return search ( clazz , query , Constants . INVALID , Constants . INVALID , true ) ; |
public class BinaryString { /** * Returns the lower case of this string . */
public BinaryString toLowerCase ( ) { } } | if ( javaObject != null ) { return toLowerCaseSlow ( ) ; } if ( sizeInBytes == 0 ) { return EMPTY_UTF8 ; } int size = segments [ 0 ] . size ( ) ; SegmentAndOffset segmentAndOffset = startSegmentAndOffset ( size ) ; byte [ ] bytes = new byte [ sizeInBytes ] ; bytes [ 0 ] = ( byte ) Character . toTitleCase ( segmentAndOf... |
public class ReadAttributeHandler { /** * / * ( non - Javadoc )
* @ see org . jboss . as . cli . OperationCommand # buildRequest ( org . jboss . as . cli . CommandContext ) */
@ Override public ModelNode buildRequestWithoutHeaders ( CommandContext ctx ) throws CommandFormatException { } } | final ParsedCommandLine parsedCmd = ctx . getParsedCommandLine ( ) ; final String name = this . name . getValue ( parsedCmd ) ; if ( name == null || name . isEmpty ( ) ) { throw new CommandFormatException ( "Required argument " + this . name . getFullName ( ) + " is not specified." ) ; } final OperationRequestAddress a... |
public class Scanners { /** * A scanner for a nestable block comment that starts with { @ code begin } and ends with
* { @ code end } .
* @ param begin starts a block comment
* @ param end ends a block comment
* @ param commented the commented pattern except for nested comments .
* @ return the block comment ... | return new NestableBlockCommentScanner ( begin , end , commented ) ; |
public class AbstractApitraryClient { /** * dispatchByMethod .
* @ param request
* a { @ link com . apitrary . api . request . Request } object .
* @ param < T >
* a T object .
* @ return a { @ link com . apitrary . api . response . Response } object . */
protected < T > Response < T > dispatchByMethod ( Requ... | HttpMethod method = HttpMethodUtil . retrieveMethod ( request ) ; switch ( method ) { case GET : return doGet ( request ) ; case POST : return doPost ( request ) ; case PUT : return doPut ( request ) ; case DELETE : return doDelete ( request ) ; default : throw new CommunicationErrorException ( HttpStatus . Not_Impleme... |
public class UrlMap { /** * < pre >
* Executes a script to handle the request that matches this URL
* pattern .
* < / pre >
* < code > . google . appengine . v1 . ScriptHandler script = 3 ; < / code > */
public com . google . appengine . v1 . ScriptHandler getScript ( ) { } } | if ( handlerTypeCase_ == 3 ) { return ( com . google . appengine . v1 . ScriptHandler ) handlerType_ ; } return com . google . appengine . v1 . ScriptHandler . getDefaultInstance ( ) ; |
public class AbstractManagementBean { /** * Send the summary data , returning whether anything actually needed to be sent .
* @ return true iff any summary data needed to be sent */
public boolean sendSummaryData ( ) { } } | if ( clearDirty ( ) ) { // System . out . println ( " # # # # sendSummaryData for " + Utils . getClassName ( this ) ) ;
// we had something that changed , so send the notification of summaryData
String summaryData = getSummaryData ( ) ; for ( SummaryDataListener listener : summaryDataListeners ) { listener . sendSummar... |
public class BSDLXMLStAXParser { /** * Parses an XMLEvent , delegating on the configured parsers .
* The parsersStack is used to hold the ancestor elements whose properties or contained elements are being parsed . */
private ISyntaxElement processXMLEvent ( XMLEvent event , Stack < IElementParser > parsersStack ) thr... | for ( IElementParser parser : parsers ) { if ( parser . canParse ( event ) ) { IElementParser newParser = parser . createNewInstance ( ) ; ISyntaxElement parsedElement = newParser . parse ( event ) ; if ( ! parsersStack . empty ( ) ) { parsersStack . peek ( ) . assignParsedElement ( newParser . name ( ) , parsedElement... |
public class JndiControlImpl { /** * Get the initial context .
* @ return the initial context . */
public InitialContext getInitialContext ( ) throws ControlException { } } | if ( _initialContext != null ) { return _initialContext ; } Properties props = ( Properties ) _context . getControlPropertySet ( Properties . class ) ; String url = nullIfEmpty ( props . url ( ) ) ; String factory = nullIfEmpty ( props . factory ( ) ) ; if ( url == null && factory == null ) { try { return new InitialCo... |
public class CommerceWishListLocalServiceBaseImpl { /** * Deletes the commerce wish list from the database . Also notifies the appropriate model listeners .
* @ param commerceWishList the commerce wish list
* @ return the commerce wish list that was removed */
@ Indexable ( type = IndexableType . DELETE ) @ Overrid... | return commerceWishListPersistence . remove ( commerceWishList ) ; |
public class AbstractCentralAuthenticationService { /** * Validate ticket expiration policy and throws exception if ticket is no longer valid .
* Expired tickets are also deleted from the registry immediately on demand .
* @ param ticket the ticket
* @ param id the original id
* @ param clazz the clazz */
@ Syn... | if ( ticket == null ) { LOGGER . debug ( "Ticket [{}] by type [{}] cannot be found in the ticket registry." , id , clazz != null ? clazz . getSimpleName ( ) : "unspecified" ) ; throw new InvalidTicketException ( id ) ; } if ( ticket . isExpired ( ) ) { deleteTicket ( id ) ; LOGGER . debug ( "Ticket [{}] has expired and... |
public class NNStorage { /** * Return the name of the image file , preferring
* " type " images . Otherwise , return any image .
* @ return The name of the image file . */
public File getFsImageName ( StorageLocationType type , long txid ) { } } | File lastCandidate = null ; for ( Iterator < StorageDirectory > it = dirIterator ( NameNodeDirType . IMAGE ) ; it . hasNext ( ) ; ) { StorageDirectory sd = it . next ( ) ; File fsImage = getStorageFile ( sd , NameNodeFile . IMAGE , txid ) ; if ( sd . getRoot ( ) . canRead ( ) && fsImage . exists ( ) ) { if ( isPreferre... |
public class PKIXParameters { /** * Sets a { @ code List } of additional certification path checkers . If
* the specified { @ code List } contains an object that is not a
* { @ code PKIXCertPathChecker } , it is ignored .
* Each { @ code PKIXCertPathChecker } specified implements
* additional checks on a certif... | if ( checkers != null ) { List < PKIXCertPathChecker > tmpList = new ArrayList < PKIXCertPathChecker > ( ) ; for ( PKIXCertPathChecker checker : checkers ) { tmpList . add ( ( PKIXCertPathChecker ) checker . clone ( ) ) ; } this . certPathCheckers = tmpList ; } else { this . certPathCheckers = new ArrayList < PKIXCertP... |
public class SecureUtil { /** * Creates our RSA cipher . */
public static Cipher getRSACipher ( int mode , Key key ) { } } | try { Cipher cipher = Cipher . getInstance ( "RSA" ) ; cipher . init ( mode , key ) ; return cipher ; } catch ( GeneralSecurityException gse ) { log . warning ( "Failed to create cipher" , gse ) ; } return null ; |
public class OutHampWebSocket { /** * Sends a message to a given address */
@ Override public void reply ( WebSocket session , HeadersAmp headers , String to , long qid , Object value ) throws IOException { } } | /* try ( OutputStream os = session . getBasicRemote ( ) . getSendStream ( ) ) {
queryResult ( os , headers , to , qid , value ) ; */ |
public class StatementsForClassImpl { /** * Prepares a statement with parameters that should work with most RDBMS .
* @ param con the connection to utilize
* @ param sql the sql syntax to use when creating the statement .
* @ param scrollable determines if the statement will be scrollable .
* @ param createPrep... | PreparedStatement result ; // if a JDBC1.0 driver is used the signature
// prepareStatement ( String , int , int ) is not defined .
// we then call the JDBC1.0 variant prepareStatement ( String )
try { // if necessary use JDB1.0 methods
if ( ! FORCEJDBC1_0 ) { if ( createPreparedStatement ) { result = con . prepareStat... |
public class LunarCalendar { /** * 计算指定年份农历有多少天
* @ param year 指定年份
* @ return 指定年份的弄农历有多少天 */
private static int lYearDays ( int year ) { } } | int i , sum = 348 ; for ( i = 0x8000 ; i > 0x8 ; i >>= 1 ) { if ( ( lunarInfo [ year - 1900 ] & i ) != 0 ) sum += 1 ; } return ( sum + leapDays ( year ) ) ; |
public class PAbstractObject { /** * Get a property as a object or throw exception .
* @ param key the property name */
@ Override public final PObject getObject ( final String key ) { } } | PObject result = optObject ( key ) ; if ( result == null ) { throw new ObjectMissingException ( this , key ) ; } return result ; |
public class UpdateUserSecurityProfilesRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( UpdateUserSecurityProfilesRequest updateUserSecurityProfilesRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( updateUserSecurityProfilesRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( updateUserSecurityProfilesRequest . getSecurityProfileIds ( ) , SECURITYPROFILEIDS_BINDING ) ; protocolMarshaller . marshall ( updateUserSecurityProfil... |
public class BasicQueryInputProcessor { /** * Performs actual input SQL / parameters processing
* Used by { @ link # processInput ( String , java . util . Map ) }
* @ param preProcessedSql SQL string with removed blocks ( comments etc . )
* @ param processedInput Processed Input object which would be filled
* @... | ProcessedInput resultProcessedInput = new ProcessedInput ( processedInput ) ; String originalSql = resultProcessedInput . getOriginalSql ( ) ; StringBuilder parsedSql = new StringBuilder ( preProcessedSql . length ( ) ) ; Pattern regexPattern = null ; Matcher regexMatcher = null ; regexPattern = Pattern . compile ( get... |
public class KmeansCalculator { /** * 点リストを用いて重みつき確率分布を算出する 。
* @ param basePoints 算出元となる点リスト
* @ param centroids 現状の中心点リスト
* @ return 重みつき確率分布 */
public static double [ ] computeDxs ( List < KmeansPoint > basePoints , List < KmeansPoint > centroids ) { } } | double [ ] dxs = new double [ basePoints . size ( ) ] ; double sum = 0.0d ; double [ ] nearestCentroid ; for ( int pointIndex = 0 ; pointIndex < basePoints . size ( ) ; pointIndex ++ ) { // 対象点に対する最近傍中心との距離 ( dx ) を算出し 、 二乗に比例する重み付き確率分布値を算出
KmeansPoint targetPoint = basePoints . get ( pointIndex ) ; KmeansResult kmeanR... |
public class BootSector { /** * Gets the offset ( in bytes ) of the fat with the given index
* @ param bs
* @ param fatNr ( 0 . . )
* @ return long
* @ throws IOException */
public final long getFatOffset ( int fatNr ) { } } | long sectSize = this . getBytesPerSector ( ) ; long sectsPerFat = this . getSectorsPerFat ( ) ; long resSects = this . getNrReservedSectors ( ) ; long offset = resSects * sectSize ; long fatSize = sectsPerFat * sectSize ; offset += fatNr * fatSize ; return offset ; |
public class QrCodeUtil { /** * 生成PNG格式的二维码图片 , 以byte [ ] 形式表示
* @ param content 内容
* @ param config 二维码配置 , 包括长 、 宽 、 边距 、 颜色等
* @ return 图片的byte [ ]
* @ since 4.1.2 */
public static byte [ ] generatePng ( String content , QrConfig config ) { } } | final ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; generate ( content , config , ImgUtil . IMAGE_TYPE_PNG , out ) ; return out . toByteArray ( ) ; |
public class BoxPlot { /** * Calculate quantiles . */
private void init ( ) { } } | quantiles = new double [ data . length ] [ 8 ] ; for ( int i = 0 ; i < data . length ; i ++ ) { int n = data [ i ] . length ; Arrays . sort ( data [ i ] ) ; quantiles [ i ] [ 1 ] = data [ i ] [ n / 4 ] ; quantiles [ i ] [ 2 ] = data [ i ] [ n / 2 ] ; quantiles [ i ] [ 3 ] = data [ i ] [ 3 * n / 4 ] ; quantiles [ i ] [ ... |
public class Whitebox { /** * Get all fields assignable from a particular type . This method traverses
* the class hierarchy when checking for the type .
* @ param object
* The object to look for type . Note that if ' re you ' re passing an
* object only instance fields are checked , passing a class will
* on... | return WhiteboxImpl . getFieldsOfType ( object , type ) ; |
public class SimpleCheckBoxControl { /** * Sets up bindings for all checkboxes . */
private void setupCheckboxBindings ( ) { } } | for ( CheckBox checkbox : checkboxes ) { checkbox . disableProperty ( ) . bind ( field . editableProperty ( ) . not ( ) ) ; } |
public class DefaultExceptionPurger { protected boolean containedIn ( Throwable e , List < Class < ? extends Throwable > > throwableClassList ) { } } | for ( Class throwableClass : throwableClassList ) { if ( throwableClass . isInstance ( e ) ) { return true ; } } return false ; |
public class SourceState { /** * Get a { @ link Map } from dataset URNs ( as being specified by { @ link ConfigurationKeys # DATASET _ URN _ KEY }
* to the { @ link WorkUnitState } with the dataset URNs .
* { @ link WorkUnitState } s that do not have { @ link ConfigurationKeys # DATASET _ URN _ KEY } set will be ad... | Map < String , Iterable < WorkUnitState > > previousWorkUnitStatesByDatasetUrns = Maps . newHashMap ( ) ; if ( this . workUnitAndDatasetStateFunctional != null ) { materializeWorkUnitAndDatasetStates ( null ) ; } for ( WorkUnitState workUnitState : this . previousWorkUnitStates ) { String datasetUrn = workUnitState . g... |
public class SparseDirectedEdgeSet { /** * { @ inheritDoc } */
public boolean contains ( Object o ) { } } | if ( o instanceof DirectedEdge ) { DirectedEdge e = ( DirectedEdge ) o ; if ( e . to ( ) == rootVertex ) return inEdges . contains ( e . from ( ) ) ; else if ( e . from ( ) == rootVertex ) return outEdges . contains ( e . to ( ) ) ; } return false ; |
public class Wrapper { /** * 包装字段名 < br >
* 有时字段与SQL的某些关键字冲突 , 导致SQL出错 , 因此需要将字段名用单引号或者反引号包装起来 , 避免冲突
* @ param entity 被包装的实体
* @ return 包装后的字段名 */
public Entity wrap ( Entity entity ) { } } | if ( null == entity ) { return null ; } final Entity wrapedEntity = new Entity ( ) ; // wrap table name
wrapedEntity . setTableName ( wrap ( entity . getTableName ( ) ) ) ; // wrap fields
for ( Entry < String , Object > entry : entity . entrySet ( ) ) { wrapedEntity . set ( wrap ( entry . getKey ( ) ) , entry . getValu... |
public class UCEnterNewProduct { /** * perform this use case */
public void apply ( ) { } } | // this will be our new object
Product newProduct = new Product ( ) ; // thma : attention , no sequence numbers yet for ojb / prevalyer
newProduct . setId ( ( int ) System . currentTimeMillis ( ) ) ; // now read in all relevant information and fill the new object :
System . out . println ( "please enter a new product" ... |
public class CmsGalleryTabConfiguration { /** * Creates a new tab configuration based on this one , but changes its default tab . < P >
* @ param defaultTab the new default tab
* @ return the copy with the changed default tab */
public CmsGalleryTabConfiguration withDefault ( GalleryTabId defaultTab ) { } } | CmsGalleryTabConfiguration result = new CmsGalleryTabConfiguration ( m_tabs ) ; result . m_defaultTab = defaultTab ; return result ; |
public class EJBSecurityCollaboratorImpl { /** * Authorizes the subject to call the given EJB , based on the given method info .
* If the subject is not authorized , an exception is thrown . The following checks are made :
* < li > is the bean method excluded ( denyAll ) < / li >
* < li > are the required roles n... | EJBMethodMetaData methodMetaData = request . getEJBMethodMetaData ( ) ; String authzUserName = subject . getPrincipals ( WSPrincipal . class ) . iterator ( ) . next ( ) . getName ( ) ; String applicationName = getApplicationName ( methodMetaData ) ; String methodName = methodMetaData . getMethodName ( ) ; // TODO : whi... |
public class FmtLocalTime { /** * { @ inheritDoc } */
@ Override protected String format ( final LocalTime jodaType , final DateTimeFormatter formatter ) { } } | return jodaType . toString ( formatter ) ; |
public class TileSizeImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case AfplibPackage . TILE_SIZE__THSIZE : setTHSIZE ( ( Integer ) newValue ) ; return ; case AfplibPackage . TILE_SIZE__TVSIZE : setTVSIZE ( ( Integer ) newValue ) ; return ; case AfplibPackage . TILE_SIZE__RELRES : setRELRES ( ( Integer ) newValue ) ; return ; } super . eSet ( featureID , newValu... |
public class InjectionUtils { /** * Perform the real injection .
* @ param c the object class
* @ param plugin teh plugin instance
* @ param context the context to be injected
* @ throws IllegalAccessException on any error accessing the field */
@ SuppressWarnings ( "rawtypes" ) private static void inject ( fin... | final Field [ ] fields = c . getDeclaredFields ( ) ; for ( final Field f : fields ) { final Annotation an = f . getAnnotation ( Inject . class ) ; if ( an != null ) { final boolean isAccessible = f . isAccessible ( ) ; if ( ! isAccessible ) { // Change accessible flag if necessary
f . setAccessible ( true ) ; } f . set... |
public class RepositoryType { /** * < p > marshallize . < / p >
* @ return a { @ link java . util . Vector } object . */
public Vector < Object > marshallize ( ) { } } | Vector < Object > parameters = new Vector < Object > ( ) ; parameters . add ( REPOSITORY_TYPE_NAME_IDX , StringUtils . defaultString ( name ) ) ; Hashtable < String , String > repoTypeClasses = new Hashtable < String , String > ( ) ; for ( RepositoryTypeClass repoTypeClass : repositoryTypeClasses ) repoTypeClasses . pu... |
public class IntervalTree { /** * / * [ deutsch ]
* < p > Erzeugt einen Intervallbaum auf der Momentachse ( UTC ) gef & uuml ; llt mit den angegebenen Momentintervallen . < / p >
* @ param < I > the type of intervals stored in the tree
* @ param intervals collection of moment intervals
* @ return new interval t... | return IntervalTree . on ( Moment . axis ( ) , intervals ) ; |
public class FileSearchExtensions { /** * Finds all files that match the search pattern . The search is not recursively .
* @ param dir
* The directory to search .
* @ param filenameToSearch
* The search pattern . Allowed wildcards are " * " and " ? " .
* @ return A List with all files that matches the search... | final List < File > foundedFileList = new ArrayList < > ( ) ; final String regex = RegExExtensions . replaceWildcardsWithRE ( filenameToSearch ) ; final String [ ] children = dir . list ( ) ; for ( final String filename : children ) { if ( filename . matches ( regex ) ) { final File foundedFile = new File ( filename ) ... |
public class NlsAccess { /** * This method gets the { @ link NlsMessageFactory } used to create instances of
* { @ link net . sf . mmm . util . nls . api . NlsMessage } .
* @ return the factory instance . */
public static NlsMessageFactory getFactory ( ) { } } | if ( factory == null ) { synchronized ( NlsAccess . class ) { if ( factory == null ) { NlsMessageFactoryImpl factoryImpl = new NlsMessageFactoryImpl ( ) ; factoryImpl . initialize ( ) ; factory = factoryImpl ; } } } return factory ; |
public class A_CmsFileSelectField { /** * Opens the file selector dialog . < p > */
protected void openFileSelector ( ) { } } | try { final Window window = CmsBasicDialog . prepareWindow ( DialogWidth . max ) ; window . setCaption ( m_fileSelectCaption != null ? m_fileSelectCaption : getWindowCaption ( ) ) ; A_CmsUI . get ( ) . addWindow ( window ) ; CmsResourceSelectDialog fileSelect ; // Switch if cms object was set .
if ( m_cms == null ) { f... |
public class PackageServiceLocator { /** * For the given interface , get the stub implementation .
* If this service has no port for the given interface ,
* then ServiceException is thrown . */
public java . rmi . Remote getPort ( Class serviceEndpointInterface ) throws javax . xml . rpc . ServiceException { } } | try { if ( com . google . api . ads . admanager . axis . v201811 . PackageServiceInterface . class . isAssignableFrom ( serviceEndpointInterface ) ) { com . google . api . ads . admanager . axis . v201811 . PackageServiceSoapBindingStub _stub = new com . google . api . ads . admanager . axis . v201811 . PackageServiceS... |
public class PersistentBinaryDeque { /** * Delete a PBD segment that was identified as ' stale ' i . e . produced by earlier VoltDB releases
* Note that this file may be concurrently deleted from multiple instances so we ignore
* NoSuchFileException .
* @ param file
* @ throws IOException */
private void delete... | try { PBDSegment . setFinal ( file , false ) ; if ( m_usageSpecificLog . isDebugEnabled ( ) ) { m_usageSpecificLog . debug ( "Segment " + file . getName ( ) + " (final: " + PBDSegment . isFinal ( file ) + "), will be closed and deleted during init" ) ; } file . delete ( ) ; } catch ( Exception e ) { if ( e instanceof N... |
public class ConfigBase { /** * XML root element must have type attribute if cl is null
* @ param is an input stream
* @ param cl class of object or null
* @ return parsed notification or null
* @ throws ConfigException on error */
public ConfigBase fromXml ( final InputStream is , final Class cl ) throws Confi... | try { return fromXml ( parseXml ( is ) , cl ) ; } catch ( final ConfigException ce ) { throw ce ; } catch ( final Throwable t ) { throw new ConfigException ( t ) ; } |
public class JvmDeclaredTypeBuilder { @ Override public void visit ( final int version , final int access , final String name , final String signature , final String superName , final String [ ] interfaces ) { } } | if ( ( access & ACC_SYNTHETIC ) != 0 ) throw new IllegalStateException ( "Cannot create type for anonymous or synthetic classes" ) ; if ( ( ACC_ENUM & access ) != 0 ) { result = TypesFactory . eINSTANCE . createJvmEnumerationType ( ) ; offset = 2 ; } else if ( ( ACC_ANNOTATION & access ) != 0 ) { result = TypesFactory ... |
public class AbstractContext { /** * Access an attribute .
* @ param type the attribute ' s type , not { @ code null }
* @ param key the attribute ' s key , not { @ code null }
* @ return the attribute value , or { @ code null } . */
public < T > T get ( String key , Class < T > type ) { } } | Object value = this . data . get ( key ) ; if ( value != null && type . isAssignableFrom ( value . getClass ( ) ) ) { return ( T ) value ; } return null ; |
public class Leader { /** * Gets next proposed zxid for leader in broadcasting phase .
* @ return the zxid of next proposed transaction . */
private Zxid getNextProposedZxid ( ) { } } | if ( lastProposedZxid . getEpoch ( ) != establishedEpoch ) { lastProposedZxid = new Zxid ( establishedEpoch , - 1 ) ; } lastProposedZxid = new Zxid ( establishedEpoch , lastProposedZxid . getXid ( ) + 1 ) ; return lastProposedZxid ; |
public class GeographyValue { /** * Serialize this object to a ByteBuffer .
* ( Assumes that the 4 - byte length prefix for variable - length data
* has already been serialized . )
* @ param buf The ByteBuffer into which the serialization will be placed . */
public void flattenToBuffer ( ByteBuffer buf ) { } } | buf . put ( INCOMPLETE_ENCODING_FROM_JAVA ) ; // encoding version
buf . put ( ( byte ) 1 ) ; // owns _ loops _
buf . put ( ( byte ) ( m_loops . size ( ) > 1 ? 1 : 0 ) ) ; // has _ holes _
buf . putInt ( m_loops . size ( ) ) ; int depth = 0 ; for ( List < XYZPoint > loop : m_loops ) { flattenLoopToBuffer ( loop , depth ... |
public class StatisticsQueue { /** * Produces a report sorted by one of the accepted value .
* @ param sortByVal - allowed values : " total " , " avg " , " min " , " max " , " count "
* @ return sorted list of query stats */
public List < QueryStats > getReportSortedBy ( String sortByVal ) { } } | SortBy sortBy ; try { sortBy = SortBy . valueOf ( sortByVal ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( "allowed values are: " + Arrays . toString ( SortBy . values ( ) ) ) ; } List < QueryStats > res = new ArrayList < > ( statsByQuery . values ( ) ) ; Collections . sort ( res , sortBy . getCompa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.