signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class ImmutableRoaringBitmap { /** * Computes XOR between input bitmaps in the given range , from rangeStart ( inclusive ) to rangeEnd
* ( exclusive )
* @ param bitmaps input bitmaps , these are not modified
* @ param rangeStart inclusive beginning of range
* @ param rangeEnd exclusive ending of range
* @ return new result bitmap */
public static MutableRoaringBitmap xor ( final Iterator < ? extends ImmutableRoaringBitmap > bitmaps , final long rangeStart , final long rangeEnd ) { } } | Iterator < ImmutableRoaringBitmap > bitmapsIterator ; bitmapsIterator = selectRangeWithoutCopy ( bitmaps , rangeStart , rangeEnd ) ; return BufferFastAggregation . xor ( bitmapsIterator ) ; |
public class SingletonMap { /** * Check if the given key is in the map , and if so , return the value of { @ link # newInstance ( Object , LogNode ) }
* for that key , or block on the result of { @ link # newInstance ( Object , LogNode ) } if another thread is currently
* creating the new instance .
* If the given key is not currently in the map , store a placeholder in the map for this key , then run
* { @ link # newInstance ( Object , LogNode ) } for the key , store the result in the placeholder ( which unblocks any
* other threads waiting for the value ) , and then return the new instance .
* @ param key
* The key for the singleton .
* @ param log
* The log .
* @ return The non - null singleton instance , if { @ link # newInstance ( Object , LogNode ) } returned a non - null
* instance on this call or a previous call , otherwise throws { @ link NullPointerException } if this call
* or a previous call to { @ link # newInstance ( Object , LogNode ) } returned null .
* @ throws E
* If { @ link # newInstance ( Object , LogNode ) } threw an exception .
* @ throws InterruptedException
* if the thread was interrupted while waiting for the singleton to be instantiated by another
* thread .
* @ throws NullSingletonException
* if { @ link # newInstance ( Object , LogNode ) } returned null . */
public V get ( final K key , final LogNode log ) throws E , InterruptedException , NullSingletonException { } } | final SingletonHolder < V > singletonHolder = map . get ( key ) ; V instance = null ; if ( singletonHolder != null ) { // There is already a SingletonHolder in the map for this key - - get the value
instance = singletonHolder . get ( ) ; } else { // There is no SingletonHolder in the map for this key , need to create one
// ( need to handle race condition , hence the putIfAbsent call )
final SingletonHolder < V > newSingletonHolder = new SingletonHolder < > ( ) ; final SingletonHolder < V > oldSingletonHolder = map . putIfAbsent ( key , newSingletonHolder ) ; if ( oldSingletonHolder != null ) { // There was already a singleton in the map for this key , due to a race condition - -
// return the existing singleton
instance = oldSingletonHolder . get ( ) ; } else { try { // Create a new instance
instance = newInstance ( key , log ) ; } finally { // Initialize newSingletonHolder with the new instance .
// Always need to call . set ( ) even if an exception is thrown by newInstance ( )
// or newInstance ( ) returns null , since . set ( ) calls initialized . countDown ( ) .
// Otherwise threads that call . get ( ) may end up waiting forever .
newSingletonHolder . set ( instance ) ; } } } if ( instance == null ) { throw new NullSingletonException ( key ) ; } else { return instance ; } |
public class PoolManager { /** * Get the maximum map or reduce slots for the given pool .
* @ return the cap set on this pool , or Integer . MAX _ VALUE if not set . */
int getMaxSlots ( String poolName , TaskType taskType ) { } } | Map < String , Integer > maxMap = ( taskType == TaskType . MAP ? poolMaxMaps : poolMaxReduces ) ; if ( maxMap . containsKey ( poolName ) ) { return maxMap . get ( poolName ) ; } else { return Integer . MAX_VALUE ; } |
public class UIComponentClassicTagBase { /** * Creates a transient UIOutput using the Application , with the following characteristics :
* < code > componentType < / code > is < code > javax . faces . HtmlOutputText < / code > .
* < code > transient < / code > is < code > true < / code > .
* < code > escape < / code > is < code > false < / code > .
* < code > id < / code > is < code > FacesContext . getViewRoot ( ) . createUniqueId ( ) < / code > */
protected UIOutput createVerbatimComponent ( ) { } } | UIOutput verbatimComp = ( UIOutput ) getFacesContext ( ) . getApplication ( ) . createComponent ( "javax.faces.HtmlOutputText" ) ; verbatimComp . setTransient ( true ) ; verbatimComp . getAttributes ( ) . put ( "escape" , Boolean . FALSE ) ; verbatimComp . setId ( getFacesContext ( ) . getViewRoot ( ) . createUniqueId ( ) ) ; return verbatimComp ; |
public class GreenPepperXmlRpcClient { /** * { @ inheritDoc } */
@ SuppressWarnings ( "unchecked" ) public Set < Reference > getReferences ( Requirement requirement , String identifier ) throws GreenPepperServerException { } } | Vector params = CollectionUtil . toVector ( requirement . marshallize ( ) ) ; log . debug ( "Retrieving Requirement " + requirement . getName ( ) + " References" ) ; Vector < Object > referencesParams = ( Vector < Object > ) execute ( XmlRpcMethodName . getRequirementReferences , params , identifier ) ; return XmlRpcDataMarshaller . toReferencesList ( referencesParams ) ; |
public class hqlParser { /** * hql . g : 321:1 : alias : i = identifier - > ^ ( ALIAS [ $ i . start ] ) ; */
public final hqlParser . alias_return alias ( ) throws RecognitionException { } } | hqlParser . alias_return retval = new hqlParser . alias_return ( ) ; retval . start = input . LT ( 1 ) ; CommonTree root_0 = null ; ParserRuleReturnScope i = null ; RewriteRuleSubtreeStream stream_identifier = new RewriteRuleSubtreeStream ( adaptor , "rule identifier" ) ; try { // hql . g : 322:2 : ( i = identifier - > ^ ( ALIAS [ $ i . start ] ) )
// hql . g : 322:4 : i = identifier
{ pushFollow ( FOLLOW_identifier_in_alias1537 ) ; i = identifier ( ) ; state . _fsp -- ; stream_identifier . add ( i . getTree ( ) ) ; // AST REWRITE
// elements :
// token labels :
// rule labels : retval
// token list labels :
// rule list labels :
// wildcard labels :
retval . tree = root_0 ; RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream ( adaptor , "rule retval" , retval != null ? retval . getTree ( ) : null ) ; root_0 = ( CommonTree ) adaptor . nil ( ) ; // 323:2 : - > ^ ( ALIAS [ $ i . start ] )
{ // hql . g : 323:5 : ^ ( ALIAS [ $ i . start ] )
{ CommonTree root_1 = ( CommonTree ) adaptor . nil ( ) ; root_1 = ( CommonTree ) adaptor . becomeRoot ( adaptor . create ( ALIAS , ( i != null ? ( i . start ) : null ) ) , root_1 ) ; adaptor . addChild ( root_0 , root_1 ) ; } } retval . tree = root_0 ; } retval . stop = input . LT ( - 1 ) ; retval . tree = ( CommonTree ) adaptor . rulePostProcessing ( root_0 ) ; adaptor . setTokenBoundaries ( retval . tree , retval . start , retval . stop ) ; } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; retval . tree = ( CommonTree ) adaptor . errorNode ( input , retval . start , input . LT ( - 1 ) , re ) ; } finally { // do for sure before leaving
} return retval ; |
public class VersionsImpl { /** * Creates a new version using the current snapshot of the selected application version .
* @ param appId The application ID .
* @ param versionId The version ID .
* @ param cloneOptionalParameter the object representing the optional parameters to be set before calling this API
* @ param serviceCallback the async ServiceCallback to handle successful and failed responses .
* @ throws IllegalArgumentException thrown if parameters fail the validation
* @ return the { @ link ServiceFuture } object */
public ServiceFuture < String > cloneAsync ( UUID appId , String versionId , CloneOptionalParameter cloneOptionalParameter , final ServiceCallback < String > serviceCallback ) { } } | return ServiceFuture . fromResponse ( cloneWithServiceResponseAsync ( appId , versionId , cloneOptionalParameter ) , serviceCallback ) ; |
public class PropertyChangeUtils { /** * Tries to add the given PropertyChangeListener to the given target
* object .
* If the given target object does not
* { @ link # maintainsNamedPropertyChangeListeners ( Class )
* maintain named PropertyChangeListeners } , then nothing is done .
* @ param target The target object
* @ param propertyName The property name
* @ param propertyChangeListener The PropertyChangeListener to add
* @ throws IllegalArgumentException If the attempt to invoke the method
* for removing the given listener failed .
* @ throws NullPointerException If any argument is < code > null < / code > */
public static void tryAddNamedPropertyChangeListenerUnchecked ( Object target , String propertyName , PropertyChangeListener propertyChangeListener ) { } } | Objects . requireNonNull ( target , "The target may not be null" ) ; Objects . requireNonNull ( propertyName , "The propertyName may not be null" ) ; Objects . requireNonNull ( propertyChangeListener , "The propertyChangeListener may not be null" ) ; if ( maintainsNamedPropertyChangeListeners ( target . getClass ( ) ) ) { PropertyChangeUtils . addNamedPropertyChangeListenerUnchecked ( target , propertyName , propertyChangeListener ) ; } |
public class FontLoader { /** * Get a typeface for a given the font name / path
* @ param ctx the context to load the typeface from assets
* @ param fontName the name / path of of the typeface to load
* @ return the loaded typeface , or null */
public static Typeface getTypeface ( Context ctx , String fontName ) { } } | Typeface existing = mLoadedTypefaces . get ( fontName ) ; if ( existing == null ) { existing = Typeface . createFromAsset ( ctx . getAssets ( ) , fontName ) ; mLoadedTypefaces . put ( fontName , existing ) ; } return existing ; |
public class ObjectGraphNode { /** * Calculates the size of a field value obtained using the reflection API .
* @ param fieldType the Field ' s type ( class ) , needed to return the correct values for primitives .
* @ param fieldValue the field ' s value ( primitives are boxed ) .
* @ return an approximation of amount of memory the field occupies , in bytes . */
private int getSize ( final String fieldType , final Object fieldValue ) { } } | Integer fieldSize = SIMPLE_SIZES . get ( fieldType ) ; if ( fieldSize != null ) { if ( PRIMITIVE_TYPES . contains ( fieldType ) ) { return fieldSize ; } return OBJREF_SIZE + fieldSize ; } else if ( fieldValue instanceof String ) { return ( OBJREF_SIZE + OBJECT_SHELL_SIZE ) * 2 // One for the String Object itself , and one for the char [ ] value
+ INT_FIELD_SIZE * 3 // offset , count , hash
+ ( ( String ) fieldValue ) . length ( ) * CHAR_FIELD_SIZE ; } else if ( fieldValue != null ) { return OBJECT_SHELL_SIZE + OBJREF_SIZE ; // plus the size of any nested nodes .
} else { // Null
return OBJREF_SIZE ; } |
public class IndexedDataStoreFactory { /** * Creates a { @ link IndexedDataStore } with keys and values in the form of byte array .
* @ param config - the store configuration
* @ return the newly created IndexedDataStore .
* @ throws IOException if the store cannot be created . */
@ Override public IndexedDataStore create ( StoreConfig config ) throws IOException { } } | try { return StoreFactory . createIndexedDataStore ( config ) ; } catch ( Exception e ) { if ( e instanceof IOException ) { throw ( IOException ) e ; } else { throw new IOException ( e ) ; } } |
public class SAXDriver { /** * make layered SAX2 DTD validation more conformant */
void verror ( String message ) throws SAXException { } } | SAXParseException err ; err = new SAXParseException ( message , this ) ; errorHandler . error ( err ) ; |
public class DefaultServiceGroup { /** * { @ inheritDoc } */
@ Override public void addService ( Service service ) { } } | Preconditions . checkNotNull ( service ) ; services . put ( service . fullName ( ) , service ) ; |
public class CommerceOrderUtil { /** * Returns a range of all the commerce orders where groupId = & # 63 ; .
* Useful when paginating results . Returns a maximum of < code > end - start < / code > instances . < code > start < / code > and < code > end < / code > are not primary keys , they are indexes in the result set . Thus , < code > 0 < / code > refers to the first result in the set . Setting both < code > start < / code > and < code > end < / code > to { @ link QueryUtil # ALL _ POS } will return the full result set . If < code > orderByComparator < / code > is specified , then the query will include the given ORDER BY logic . If < code > orderByComparator < / code > is absent and pagination is required ( < code > start < / code > and < code > end < / code > are not { @ link QueryUtil # ALL _ POS } ) , then the query will include the default ORDER BY logic from { @ link CommerceOrderModelImpl } . If both < code > orderByComparator < / code > and pagination are absent , for performance reasons , the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order .
* @ param groupId the group ID
* @ param start the lower bound of the range of commerce orders
* @ param end the upper bound of the range of commerce orders ( not inclusive )
* @ return the range of matching commerce orders */
public static List < CommerceOrder > findByGroupId ( long groupId , int start , int end ) { } } | return getPersistence ( ) . findByGroupId ( groupId , start , end ) ; |
public class SimpleRandomSampling { /** * Returns the minimum required sample size when we set a specific maximum Xbar STD Error for finite population size .
* @ param maximumXbarStd
* @ param populationStd
* @ param populationN
* @ return */
public static int minimumSampleSizeForMaximumXbarStd ( double maximumXbarStd , double populationStd , int populationN ) { } } | if ( populationN <= 0 ) { throw new IllegalArgumentException ( "The populationN parameter must be positive." ) ; } double minimumSampleN = 1.0 / ( Math . pow ( maximumXbarStd / populationStd , 2 ) + 1.0 / populationN ) ; return ( int ) Math . ceil ( minimumSampleN ) ; |
public class JSONs { /** * Read an expected integer .
* @ param o the object to parse
* @ param id the key in the map that points to an integer
* @ return the int
* @ throws JSONConverterException if the key does not point to a int */
public static int requiredInt ( JSONObject o , String id ) throws JSONConverterException { } } | checkKeys ( o , id ) ; try { return ( Integer ) o . get ( id ) ; } catch ( ClassCastException e ) { throw new JSONConverterException ( "Unable to read a int from string '" + id + "'" , e ) ; } |
public class GraphPath { /** * Remove the path ' s elements before the
* specified one which is starting
* at the specified point . The specified element will
* be removed .
* < p > This function removes until the < i > first occurence < / i >
* of the given object .
* @ param obj is the segment to remove
* @ param pt is the point on which the segment was connected
* as its first point .
* @ return < code > true < / code > on success , otherwise < code > false < / code > */
public boolean removeUntil ( ST obj , PT pt ) { } } | return removeUntil ( indexOf ( obj , pt ) , true ) ; |
public class UpgradeScanner10 { /** * Returns segments for a table in reverse sequence order .
* The reverse order minimizes extra pages reads , because older pages
* don ' t need to be read . */
private ArrayList < Segment10 > tableSegments ( TableEntry10 table ) { } } | ArrayList < Segment10 > tableSegments = new ArrayList < > ( ) ; for ( Segment10 segment : _segments ) { if ( Arrays . equals ( segment . key ( ) , table . key ( ) ) ) { tableSegments . add ( segment ) ; } } Collections . sort ( tableSegments , ( x , y ) -> Long . signum ( y . sequence ( ) - x . sequence ( ) ) ) ; return tableSegments ; |
public class KeywordImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public void eSet ( int featureID , Object newValue ) { } } | switch ( featureID ) { case SimpleAntlrPackage . KEYWORD__VALUE : setValue ( ( String ) newValue ) ; return ; } super . eSet ( featureID , newValue ) ; |
public class HazelcastPortableMessageFormatter { /** * Method to append readPortable from hazelcast _ portable .
* @ param message JMessage with the information .
* < pre >
* { @ code
* public void readPortable ( com . hazelcast . nio . serialization . PortableReader portableReader ) throws java . io . IOException {
* java . util . BitSet _ _ temp _ optionals = java . util . BitSet . valueOf ( portableReader . readByteArray ( " _ _ hzOptionalsForClassOptionalFields " ) ) ;
* < / pre > */
private void appendPortableReader ( JMessage < ? > message ) { } } | writer . appendln ( "@Override" ) . formatln ( "public void readPortable(%s %s) throws %s {" , PortableReader . class . getName ( ) , PORTABLE_READER , IOException . class . getName ( ) ) . begin ( ) ; // TODO : This should be short [ ] instead , as field IDs are restricted to 16bit .
writer . formatln ( "int[] field_ids = %s.readIntArray(\"__fields__\");" , PORTABLE_READER ) . appendln ( ) . appendln ( "for (int id : field_ids) {" ) . begin ( ) . appendln ( "switch (id) {" ) . begin ( ) ; for ( JField field : message . declaredOrderFields ( ) ) { writer . formatln ( "case %d: {" , field . id ( ) ) . begin ( ) ; readPortableField ( field ) ; writer . appendln ( "break;" ) . end ( ) . appendln ( "}" ) ; } writer . end ( ) . appendln ( "}" ) // switch
. end ( ) . appendln ( "}" ) // for loop
. end ( ) . appendln ( "}" ) // readPortable
. newline ( ) ; |
public class EmailIntentSender { /** * Builds an email intent with attachments
* @ param subject the message subject
* @ param body the message body
* @ param attachments the attachments
* @ return email intent */
@ NonNull protected Intent buildAttachmentIntent ( @ NonNull String subject , @ Nullable String body , @ NonNull ArrayList < Uri > attachments ) { } } | final Intent intent = new Intent ( Intent . ACTION_SEND_MULTIPLE ) ; intent . putExtra ( Intent . EXTRA_EMAIL , new String [ ] { mailConfig . mailTo ( ) } ) ; intent . addFlags ( Intent . FLAG_ACTIVITY_NEW_TASK ) ; intent . putExtra ( Intent . EXTRA_SUBJECT , subject ) ; intent . setType ( "message/rfc822" ) ; intent . putParcelableArrayListExtra ( Intent . EXTRA_STREAM , attachments ) ; intent . putExtra ( Intent . EXTRA_TEXT , body ) ; return intent ; |
public class AbstractActivator { /** * Registers a service .
* @ param clazz
* @ param service
* @ param props
* @ return */
@ SuppressWarnings ( "rawtypes" ) protected < S > ServiceRegistration registerService ( Class < S > clazz , S service , Map < String , ? > props ) { } } | if ( service instanceof IBundleAwareService ) { ( ( IBundleAwareService ) service ) . setBundle ( bundle ) ; } Dictionary < String , Object > _p = new Hashtable < String , Object > ( ) ; if ( props != null ) { for ( Entry < String , ? > entry : props . entrySet ( ) ) { _p . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } } ServiceRegistration sr = bundleContext . registerService ( clazz , service , _p ) ; registeredServices . add ( sr ) ; return sr ; |
public class SystemBarTintManager { /** * Apply the specified alpha to the system status bar .
* @ param alpha The alpha to use */
@ TargetApi ( 11 ) public void setStatusBarAlpha ( float alpha ) { } } | if ( mStatusBarAvailable && Build . VERSION . SDK_INT >= Build . VERSION_CODES . HONEYCOMB ) { mStatusBarTintView . setAlpha ( alpha ) ; } |
public class ListenerHelper { /** * A utility method to build process start JMS message .
* @ param processId
* @ param eventInstId
* @ param masterRequestId
* @ param parameters
* @ return */
public InternalEvent buildProcessStartMessage ( Long processId , Long eventInstId , String masterRequestId , Map < String , String > parameters ) { } } | InternalEvent evMsg = InternalEvent . createProcessStartMessage ( processId , OwnerType . DOCUMENT , eventInstId , masterRequestId , null , null , null ) ; evMsg . setParameters ( parameters ) ; evMsg . setCompletionCode ( StartActivity . STANDARD_START ) ; // completion
// code -
// indicating
// standard start
return evMsg ; |
public class FCAlignHelper { /** * record the aligned pairs in alignList [ ] [ 0 ] , alignList [ ] [ 1 ] ;
* return the number of aligned pairs
* @ param alignList
* @ return the number of aligned pairs */
public int getAlignPos ( int [ ] [ ] alignList ) { } } | int i = B1 ; int j = B2 ; int s = 0 ; int a = 0 ; int op ; while ( i <= E1 && j <= E2 ) { op = sapp0 [ s ++ ] ; if ( op == 0 ) { alignList [ 0 ] [ a ] = i - 1 ; // i - 1
alignList [ 1 ] [ a ] = j - 1 ; a ++ ; i ++ ; j ++ ; } else if ( op > 0 ) { j += op ; } else { i -= op ; } } return a ; |
public class ErrorHandler { /** * Record a message signifying an error condition .
* @ param msg signifying an error . */
public void error ( final String msg ) { } } | errors ++ ; if ( ! suppressOutput ) { out . println ( "ERROR: " + msg ) ; } if ( stopOnError ) { throw new IllegalArgumentException ( msg ) ; } |
public class DataProvider { /** * Returns a mock List of Person objects */
public static List < Person > getMockPeopleSet1 ( ) { } } | List < Person > listPeople = new ArrayList < Person > ( ) ; listPeople . add ( new Person ( "Henry Blair" , "07123456789" , R . drawable . male1 ) ) ; listPeople . add ( new Person ( "Jenny Curtis" , "07123456789" , R . drawable . female1 ) ) ; listPeople . add ( new Person ( "Vincent Green" , "07123456789" , R . drawable . male2 ) ) ; listPeople . add ( new Person ( "Ada Underwood" , "07123456789" , R . drawable . female2 ) ) ; listPeople . add ( new Person ( "Daniel Erickson" , "07123456789" , R . drawable . male3 ) ) ; listPeople . add ( new Person ( "Maria Ramsey" , "07123456789" , R . drawable . female3 ) ) ; listPeople . add ( new Person ( "Rosemary Munoz" , "07123456789" , R . drawable . female4 ) ) ; listPeople . add ( new Person ( "John Singleton" , "07123456789" , R . drawable . male4 ) ) ; listPeople . add ( new Person ( "Lorena Bowen" , "07123456789" , R . drawable . female5 ) ) ; listPeople . add ( new Person ( "Kevin Stokes" , "07123456789" , R . drawable . male5 ) ) ; listPeople . add ( new Person ( "Johnny Sanders" , "07123456789" , R . drawable . male6 ) ) ; listPeople . add ( new Person ( "Jim Ramirez" , "07123456789" , R . drawable . male7 ) ) ; listPeople . add ( new Person ( "Cassandra Hunter" , "07123456789" , R . drawable . female6 ) ) ; listPeople . add ( new Person ( "Viola Guerrero" , "07123456789" , R . drawable . female7 ) ) ; return listPeople ; |
public class RelaxedDataBinder { /** * Add aliases to the { @ link DataBinder } .
* @ param name the property name to alias
* @ param alias aliases for the property names
* @ return this instance */
public RelaxedDataBinder withAlias ( String name , String ... alias ) { } } | for ( String value : alias ) { this . nameAliases . add ( name , value ) ; } return this ; |
public class RETURN { /** * < div color = ' red ' style = " font - size : 24px ; color : red " > < b > < i > < u > JCYPHER < / u > < / i > < / b > < / div >
* < div color = ' red ' style = " font - size : 18px ; color : red " > < i > select a named ( identified ) value < / i > < / div >
* < div color = ' red ' style = " font - size : 18px ; color : red " > < i > e . g . < b > RETURN . value ( n ) < / b > < / i > < / div >
* < div color = ' red ' style = " font - size : 18px ; color : red " > < i > or an expression like < b > RETURN . value ( n . property ( " age " ) ) < / b > to be returned < / i > < / div >
* < br / > */
public static RSortable value ( JcValue element ) { } } | RSortable ret = RFactory . value ( element ) ; ASTNode an = APIObjectAccess . getAstNode ( ret ) ; an . setClauseType ( ClauseType . RETURN ) ; return ret ; |
public class AmazonSimpleEmailServiceClient { /** * Creates an empty receipt rule set .
* For information about setting up receipt rule sets , see the < a
* href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / receiving - email - receipt - rule - set . html " > Amazon SES
* Developer Guide < / a > .
* You can execute this operation no more than once per second .
* @ param createReceiptRuleSetRequest
* Represents a request to create an empty receipt rule set . You use receipt rule sets to receive email with
* Amazon SES . For more information , see the < a
* href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / receiving - email - concepts . html " > Amazon SES
* Developer Guide < / a > .
* @ return Result of the CreateReceiptRuleSet operation returned by the service .
* @ throws AlreadyExistsException
* Indicates that a resource could not be created because of a naming conflict .
* @ throws LimitExceededException
* Indicates that a resource could not be created because of service limits . For a list of Amazon SES
* limits , see the < a href = " http : / / docs . aws . amazon . com / ses / latest / DeveloperGuide / limits . html " > Amazon SES
* Developer Guide < / a > .
* @ sample AmazonSimpleEmailService . CreateReceiptRuleSet
* @ see < a href = " http : / / docs . aws . amazon . com / goto / WebAPI / email - 2010-12-01 / CreateReceiptRuleSet " target = " _ top " > AWS API
* Documentation < / a > */
@ Override public CreateReceiptRuleSetResult createReceiptRuleSet ( CreateReceiptRuleSetRequest request ) { } } | request = beforeClientExecution ( request ) ; return executeCreateReceiptRuleSet ( request ) ; |
public class CompatibilityMatrix { /** * Reset all values marked with ( marking ) from row i onwards .
* @ param i row index
* @ param marking the marking to reset ( should be negative ) */
void resetRows ( int i , int marking ) { } } | for ( int j = ( i * mCols ) ; j < data . length ; j ++ ) if ( data [ j ] == marking ) data [ j ] = 1 ; |
public class UserProperties { /** * Set a property with this field ' s name as the key to this field ' s current value .
* ( Utility method ) .
* @ param field The field to save . */
public void saveField ( BaseField field ) { } } | String strFieldName = field . getFieldName ( ) ; // Fieldname only
String strData = field . getString ( ) ; this . setProperty ( strFieldName , strData ) ; |
public class Expressions { /** * Create a new Path expression
* @ param type type of expression
* @ param parent parent path
* @ param property property name
* @ return property path */
public static < T extends Comparable < ? > > TimePath < T > timePath ( Class < ? extends T > type , Path < ? > parent , String property ) { } } | return new TimePath < T > ( type , PathMetadataFactory . forProperty ( parent , property ) ) ; |
public class MainActivity { /** * Request notification permission . */
private void requestNotification ( ) { } } | AndPermission . with ( this ) . notification ( ) . permission ( ) . rationale ( new NotifyRationale ( ) ) . onGranted ( new Action < Void > ( ) { @ Override public void onAction ( Void data ) { toast ( R . string . successfully ) ; } } ) . onDenied ( new Action < Void > ( ) { @ Override public void onAction ( Void data ) { toast ( R . string . failure ) ; } } ) . start ( ) ; |
public class FixedBucketsHistogram { /** * Get a sum of bucket counts from either the start of a histogram ' s range or end , up to a specified cutoff value .
* For example , if I have the following histogram with a range of 0-40 , with 4 buckets and
* per - bucket counts of 5 , 2 , 10 , and 7:
* | 5 | 2 | 24 | 7 |
* 0 10 20 30 40
* Calling this function with a cutoff of 25 and fromStart = true would :
* - Sum the first two bucket counts 5 + 2
* - Since the cutoff falls in the third bucket , multiply the third bucket ' s count by the fraction of the bucket range
* covered by the cutoff , in this case the fraction is ( ( 25 - 20 ) / 10 ) = 0.5
* - The total count returned is 5 + 2 + 12
* @ param cutoff Cutoff point within the histogram ' s range
* @ param fromStart If true , sum the bucket counts starting from the beginning of the histogram range .
* If false , sum from the other direction , starting from the end of the histogram range .
* @ return Sum of bucket counts up to the cutoff point */
private double getCumulativeCount ( double cutoff , boolean fromStart ) { } } | int cutoffBucket = ( int ) ( ( cutoff - lowerLimit ) / bucketSize ) ; double count = 0 ; if ( fromStart ) { for ( int i = 0 ; i <= cutoffBucket ; i ++ ) { if ( i == cutoffBucket ) { double bucketStart = i * bucketSize + lowerLimit ; double partialCount = ( ( cutoff - bucketStart ) / bucketSize ) * histogram [ i ] ; count += partialCount ; } else { count += histogram [ i ] ; } } } else { for ( int i = cutoffBucket ; i < histogram . length ; i ++ ) { if ( i == cutoffBucket ) { double bucketEnd = ( ( i + 1 ) * bucketSize ) + lowerLimit ; double partialCount = ( ( bucketEnd - cutoff ) / bucketSize ) * histogram [ i ] ; count += partialCount ; } else { count += histogram [ i ] ; } } } return count ; |
public class AWTDrawVisitor { /** * { @ inheritDoc } */
@ Override public void setRendererModel ( RendererModel rendererModel ) { } } | this . rendererModel = rendererModel ; if ( rendererModel . hasParameter ( UseAntiAliasing . class ) ) { if ( rendererModel . getParameter ( UseAntiAliasing . class ) . getValue ( ) ) { graphics . setRenderingHint ( RenderingHints . KEY_ANTIALIASING , RenderingHints . VALUE_ANTIALIAS_ON ) ; // g . setStroke ( new BasicStroke ( ( int ) rendererModel . getBondWidth ( ) ) ) ;
} } |
public class ALU { /** * negative */
public static Object negative ( final Object o1 ) { } } | requireNonNull ( o1 ) ; switch ( getTypeMark ( o1 ) ) { case INTEGER : return - ( ( Integer ) o1 ) ; case LONG : return - ( ( Long ) o1 ) ; case DOUBLE : return - ( ( Double ) o1 ) ; case FLOAT : return - ( ( Float ) o1 ) ; case SHORT : return - ( ( Short ) o1 ) ; case BIG_INTEGER : return ( ( BigInteger ) o1 ) . negate ( ) ; case BIG_DECIMAL : return ( ( BigDecimal ) o1 ) . negate ( ) ; case CHAR : return - ( ( Character ) o1 ) ; default : } throw unsupportedTypeException ( o1 ) ; |
public class SecurityIdentityInterceptor { /** * { @ inheritDoc } */
public Object processInvocation ( final InterceptorContext context ) throws Exception { } } | final SecurityIdentity identity = context . getPrivateData ( SecurityIdentity . class ) ; if ( identity != null ) try { return identity . runAs ( context ) ; } catch ( PrivilegedActionException e ) { throw e . getException ( ) ; } else { return context . proceed ( ) ; } |
public class sslfipskey { /** * Use this API to delete sslfipskey resources of given names . */
public static base_responses delete ( nitro_service client , String fipskeyname [ ] ) throws Exception { } } | base_responses result = null ; if ( fipskeyname != null && fipskeyname . length > 0 ) { sslfipskey deleteresources [ ] = new sslfipskey [ fipskeyname . length ] ; for ( int i = 0 ; i < fipskeyname . length ; i ++ ) { deleteresources [ i ] = new sslfipskey ( ) ; deleteresources [ i ] . fipskeyname = fipskeyname [ i ] ; } result = delete_bulk_request ( client , deleteresources ) ; } return result ; |
public class Classpath { /** * Stores the dependencies from the given project into the ' dependencies . json ' file .
* @ param project the project
* @ throws IOException if the file cannot be created . */
public static void store ( MavenProject project ) throws IOException { } } | final File output = new File ( project . getBasedir ( ) , Constants . DEPENDENCIES_FILE ) ; output . getParentFile ( ) . mkdirs ( ) ; ProjectDependencies dependencies = new ProjectDependencies ( project ) ; mapper . writer ( ) . withDefaultPrettyPrinter ( ) . writeValue ( output , dependencies ) ; |
public class FileSystem { /** * Replies if the specified file has the specified extension .
* < p > The test is dependent of the case - sensitive attribute of operating system .
* @ param filename is the filename to parse
* @ param extension is the extension to test .
* @ return < code > true < / code > if the given filename has the given extension ,
* otherwise < code > false < / code > */
@ Pure public static boolean hasExtension ( File filename , String extension ) { } } | if ( filename == null ) { return false ; } assert extension != null ; String extent = extension ; if ( ! "" . equals ( extent ) && ! extent . startsWith ( EXTENSION_SEPARATOR ) ) { // $ NON - NLS - 1 $
extent = EXTENSION_SEPARATOR + extent ; } final String ext = extension ( filename ) ; if ( ext == null ) { return false ; } if ( isCaseSensitiveFilenameSystem ( ) ) { return ext . equals ( extent ) ; } return ext . equalsIgnoreCase ( extent ) ; |
public class OkHttpClientFactory { /** * This method creates an instance of OKHttpClient according to the provided parameters .
* It is used internally and is not intended to be used directly .
* @ param loggingEnabled Enable logging in the created OkHttpClient .
* @ param tls12Enforced Enforce TLS 1.2 in the created OkHttpClient on devices with API 16-21
* @ param connectTimeout Override default connect timeout for OkHttpClient
* @ param readTimeout Override default read timeout for OkHttpClient
* @ param writeTimeout Override default write timeout for OkHttpClient
* @ return new OkHttpClient instance created according to the parameters . */
public OkHttpClient createClient ( boolean loggingEnabled , boolean tls12Enforced , int connectTimeout , int readTimeout , int writeTimeout ) { } } | return modifyClient ( new OkHttpClient ( ) , loggingEnabled , tls12Enforced , connectTimeout , readTimeout , writeTimeout ) ; |
public class Ifc4PackageImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ Override public EEnum getIfcTrimmingPreference ( ) { } } | if ( ifcTrimmingPreferenceEEnum == null ) { ifcTrimmingPreferenceEEnum = ( EEnum ) EPackage . Registry . INSTANCE . getEPackage ( Ifc4Package . eNS_URI ) . getEClassifiers ( ) . get ( 1092 ) ; } return ifcTrimmingPreferenceEEnum ; |
public class LinkUtil { /** * URL encoding for a resource path ( without the encoding for the ' / ' path delimiters ) .
* @ param path the path to encode
* @ return the URL encoded path */
public static String encodePath ( String path ) { } } | if ( path != null ) { path = encodeUrl ( path ) ; path = path . replaceAll ( "/jcr:" , "/_jcr_" ) ; path = path . replaceAll ( "\\?" , "%3F" ) ; path = path . replaceAll ( "=" , "%3D" ) ; path = path . replaceAll ( ";" , "%3B" ) ; path = path . replaceAll ( ":" , "%3A" ) ; path = path . replaceAll ( "\\+" , "%2B" ) ; path = path . replaceAll ( "&" , "%26" ) ; path = path . replaceAll ( "#" , "%23" ) ; } return path ; |
public class HashTimeWheel { /** * add a task
* @ param delay after x milliseconds than execute runnable
* @ param run run task in future
* @ return The task future */
public Future add ( long delay , Runnable run ) { } } | final int curSlot = currentSlot ; final int ticks = delay > interval ? ( int ) ( delay / interval ) : 1 ; // figure out how many ticks need
final int index = ( curSlot + ( ticks % maxTimers ) ) % maxTimers ; // figure out the wheel ' s index
final int round = ( ticks - 1 ) / maxTimers ; // the round number of spin
TimerTask task = new TimerTask ( round , run ) ; timerSlots [ index ] . add ( task ) ; return new Future ( this , index , task ) ; |
public class Visualizer { /** * Creates a buffered image that displays the structure of the PE file .
* @ param file
* the PE file to create an image from
* @ return buffered image
* @ throws IOException
* if sections can not be read */
public BufferedImage createImage ( File file ) throws IOException { } } | resetAvailabilityFlags ( ) ; this . data = PELoader . loadPE ( file ) ; image = new BufferedImage ( fileWidth , height , IMAGE_TYPE ) ; drawSections ( ) ; Overlay overlay = new Overlay ( data ) ; if ( overlay . exists ( ) ) { long overlayOffset = overlay . getOffset ( ) ; drawPixels ( colorMap . get ( OVERLAY ) , overlayOffset , withMinLength ( overlay . getSize ( ) ) ) ; overlayAvailable = true ; } drawPEHeaders ( ) ; drawSpecials ( ) ; drawResourceTypes ( ) ; assert image != null ; assert image . getWidth ( ) == fileWidth ; assert image . getHeight ( ) == height ; return image ; |
public class MapCacheStoreAdapter { /** * { @ inheritDoc } */
public void put ( CacheItem item ) throws Exception { } } | getScopeCache ( item . getScope ( ) ) . put ( item . getKey ( ) , item ) ; |
public class WorkflowBulkResource { /** * Resume the list of workflows .
* @ param workflowIds - list of workflow Ids to perform resume operation on
* @ return bulk response object containing a list of succeeded workflows and a list of failed ones with errors */
@ PUT @ Path ( "/resume" ) @ ApiOperation ( "Resume the list of workflows" ) public BulkResponse resumeWorkflow ( List < String > workflowIds ) { } } | return workflowBulkService . resumeWorkflow ( workflowIds ) ; |
public class ConsoleProgressMonitor { /** * / * ( non - Javadoc )
* @ see ca . eandb . util . progress . ProgressMonitor # notifyProgress ( int , int ) */
public boolean notifyProgress ( int value , int maximum ) { } } | this . progress = ( double ) value / ( double ) maximum ; this . value = value ; this . maximum = maximum ; this . printProgressBar ( ) ; return true ; |
public class BlowfishECB { /** * to clear data in the boxes before an instance is freed */
public void cleanUp ( ) { } } | int nI ; for ( nI = 0 ; nI < PBOX_ENTRIES ; nI ++ ) m_pbox [ nI ] = 0 ; for ( nI = 0 ; nI < SBOX_ENTRIES ; nI ++ ) m_sbox1 [ nI ] = m_sbox2 [ nI ] = m_sbox3 [ nI ] = m_sbox4 [ nI ] = 0 ; |
public class CoverageUtilities { /** * Replace the current internal novalue with a given value .
* @ param renderedImage a { @ link RenderedImage } .
* @ param newValue the value to put in instead of the novalue .
* @ return the rendered image with the substituted novalue . */
public static WritableRaster replaceNovalue ( RenderedImage renderedImage , double newValue ) { } } | WritableRaster tmpWR = ( WritableRaster ) renderedImage . getData ( ) ; RandomIter pitTmpIterator = RandomIterFactory . create ( renderedImage , null ) ; int height = renderedImage . getHeight ( ) ; int width = renderedImage . getWidth ( ) ; for ( int y = 0 ; y < height ; y ++ ) { for ( int x = 0 ; x < width ; x ++ ) { if ( isNovalue ( pitTmpIterator . getSampleDouble ( x , y , 0 ) ) ) { tmpWR . setSample ( x , y , 0 , newValue ) ; } } } pitTmpIterator . done ( ) ; return tmpWR ; |
public class Attribute { /** * Returns the value of the attribute in the given environment .
* @ param in the environment to look up
* @ return the value of the attribute in the given environment */
public Value getValue ( final Environment in ) { } } | log . debug ( "looking up value for " + name + " in " + in ) ; return attributeValue . get ( in ) ; |
public class CameraEncoder { /** * Called from UI thread */
public void startRecording ( ) { } } | if ( mState != STATE . INITIALIZED ) { Log . e ( TAG , "startRecording called in invalid state. Ignoring" ) ; return ; } synchronized ( mReadyForFrameFence ) { mFrameNum = 0 ; mRecording = true ; mState = STATE . RECORDING ; } |
public class AptAnnotationHelper { /** * Returns the value of a particular element as a String */
public String getStringValue ( String elemName ) { } } | if ( _valueMap . containsKey ( elemName ) ) return _valueMap . get ( elemName ) . toString ( ) ; return null ; |
public class BProgramRunner { /** * Adds a listener to the BProgram .
* @ param < R > Actual type of listener .
* @ param aListener the listener to add .
* @ return The added listener , to allow call chaining . */
public < R extends BProgramRunnerListener > R addListener ( R aListener ) { } } | listeners . add ( aListener ) ; return aListener ; |
public class CmsInfoButton { /** * The layout which is shown in window by triggering onclick event of button . < p >
* @ param htmlLines to be shown
* @ param additionalElements further vaadin elements
* @ return vertical layout */
protected VerticalLayout getLayout ( final List < String > htmlLines , final List < InfoElementBean > additionalElements ) { } } | VerticalLayout layout = new VerticalLayout ( ) ; Label label = new Label ( ) ; label . setWidthUndefined ( ) ; layout . setMargin ( true ) ; label . setContentMode ( ContentMode . HTML ) ; layout . addStyleName ( OpenCmsTheme . INFO ) ; String htmlContent = "" ; for ( String line : htmlLines ) { htmlContent += line ; } label . setValue ( htmlContent ) ; layout . addComponent ( label ) ; for ( InfoElementBean infoElement : additionalElements ) { layout . addComponent ( infoElement . getComponent ( ) , infoElement . getPos ( ) ) ; } layout . setWidthUndefined ( ) ; return layout ; |
public class Activator { /** * Perform rollback - time processing for the specified transaction and
* bean . This method should be called for each bean which was
* participating in a transaction which was rolled back .
* Removes the transaction - local instance from the cache .
* @ param tx The transaction which was just rolled back
* @ param bean The bean for rollback processing */
public void rollbackBean ( ContainerTx tx , BeanO bean ) { } } | bean . getActivationStrategy ( ) . atRollback ( tx , bean ) ; |
public class HibernateCRUDTemplate { /** * / * ( non - Javadoc )
* @ see com . jdon . model . crud . DaoCRUDTemplate # loadById ( java . lang . Class , java . lang . String ) */
public Object loadById ( Class entity , Serializable id ) throws Exception { } } | return getHibernateTemplate ( ) . load ( entity , id ) ; |
public class Checks { /** * Performs check with the predicate .
* @ param reference reference to check
* @ param predicate the predicate to use
* @ param throwableType the throwable type to throw
* @ param errorMessageTemplate a template for the exception message should the
* check fail . The message is formed by replacing each { @ code % s }
* placeholder in the template with an argument . These are matched by
* position - the first { @ code % s } gets { @ code errorMessageArgs [ 0 ] } , etc .
* Unmatched arguments will be appended to the formatted message in square
* braces . Unmatched placeholders will be left as - is .
* @ param errorMessageArgs the arguments to be substituted into the message
* template . Arguments are converted to strings using
* { @ link String # valueOf ( Object ) } .
* @ param < T > the reference type
* @ param < E > the exception type
* @ return the original reference
* @ throws IllegalArgumentException if the { @ code reference } , { @ code predicate } or { @ code throwableType } is null
* @ throws IllegalArgumentException if the { @ code throwableType } cannot be instantiated
* @ throws E if the { @ code reference } doesn ' t match provided predicate */
@ Beta public static < T , E extends Throwable > T check ( T reference , Predicate < T > predicate , Class < E > throwableType , @ Nullable String errorMessageTemplate , @ Nullable Object ... errorMessageArgs ) throws E { } } | checkArgument ( reference != null , "Expected non-null reference" ) ; checkArgument ( predicate != null , "Expected non-null predicate" ) ; checkArgument ( throwableType != null , "Expected non-null throwableType" ) ; check ( reference , predicate , ( Supplier < E > ) ( ) -> throwable ( throwableType , parameters ( String . class ) , arguments ( messageFromNullable ( errorMessageTemplate , errorMessageArgs ) ) ) ) ; return reference ; |
public class RegExUtils { /** * < p > Replaces the first substring of the text string that matches the given regular expression pattern
* with the given replacement . < / p >
* This method is a { @ code null } safe equivalent to :
* < ul >
* < li > { @ code pattern . matcher ( text ) . replaceFirst ( replacement ) } < / li >
* < / ul >
* < p > A { @ code null } reference passed to this method is a no - op . < / p >
* < pre >
* StringUtils . replaceFirst ( null , * , * ) = null
* StringUtils . replaceFirst ( " any " , ( Pattern ) null , * ) = " any "
* StringUtils . replaceFirst ( " any " , * , null ) = " any "
* StringUtils . replaceFirst ( " " , Pattern . compile ( " " ) , " zzz " ) = " zzz "
* StringUtils . replaceFirst ( " " , Pattern . compile ( " . * " ) , " zzz " ) = " zzz "
* StringUtils . replaceFirst ( " " , Pattern . compile ( " . + " ) , " zzz " ) = " "
* StringUtils . replaceFirst ( " abc " , Pattern . compile ( " " ) , " ZZ " ) = " ZZabc "
* StringUtils . replaceFirst ( " & lt ; _ _ & gt ; \ n & lt ; _ _ & gt ; " , Pattern . compile ( " & lt ; . * & gt ; " ) , " z " ) = " z \ n & lt ; _ _ & gt ; "
* StringUtils . replaceFirst ( " & lt ; _ _ & gt ; \ n & lt ; _ _ & gt ; " , Pattern . compile ( " ( ? s ) & lt ; . * & gt ; " ) , " z " ) = " z "
* StringUtils . replaceFirst ( " ABCabc123 " , Pattern . compile ( " [ a - z ] " ) , " _ " ) = " ABC _ bc123"
* StringUtils . replaceFirst ( " ABCabc123abc " , Pattern . compile ( " [ ^ A - Z0-9 ] + " ) , " _ " ) = " ABC _ 123abc "
* StringUtils . replaceFirst ( " ABCabc123abc " , Pattern . compile ( " [ ^ A - Z0-9 ] + " ) , " " ) = " ABC123abc "
* StringUtils . replaceFirst ( " Lorem ipsum dolor sit " , Pattern . compile ( " ( + ) ( [ a - z ] + ) " ) , " _ $ 2 " ) = " Lorem _ ipsum dolor sit "
* < / pre >
* @ param text text to search and replace in , may be null
* @ param regex the regular expression pattern to which this string is to be matched
* @ param replacement the string to be substituted for the first match
* @ return the text with the first replacement processed ,
* { @ code null } if null String input
* @ see java . util . regex . Matcher # replaceFirst ( String )
* @ see java . util . regex . Pattern */
public static String replaceFirst ( final String text , final Pattern regex , final String replacement ) { } } | if ( text == null || regex == null || replacement == null ) { return text ; } return regex . matcher ( text ) . replaceFirst ( replacement ) ; |
public class StunMessage { /** * Returns the length of this message ' s body .
* @ return the length of the data in this message . */
public char getDataLength ( ) { } } | char length = 0 ; List < StunAttribute > attrs = getAttributes ( ) ; for ( StunAttribute att : attrs ) { int attLen = att . getDataLength ( ) + StunAttribute . HEADER_LENGTH ; // take attribute padding into account :
attLen += ( 4 - ( attLen % 4 ) ) % 4 ; length += attLen ; } return length ; |
public class Objects2 { /** * Performs emptiness and nullness check . Supports the following types :
* String , CharSequence , Optional , Iterator , Iterable , Collection , Map , Object [ ] , primitive [ ] */
public static < T > T checkNotEmpty ( T reference , String errorMessageTemplate , Object ... errorMessageArgs ) { } } | checkNotNull ( reference , errorMessageTemplate , errorMessageArgs ) ; checkArgument ( not ( Decisions . isEmpty ( ) ) . apply ( reference ) , errorMessageTemplate , errorMessageArgs ) ; return reference ; |
public class CommandTemplate { /** * Provides a message which describes the expected format and arguments
* for this command . This is used to provide user feedback when a command
* request is malformed .
* @ return A message describing the command protocol format . */
protected String getExpectedMessage ( ) { } } | StringBuilder syntax = new StringBuilder ( "<tag> " ) ; syntax . append ( getName ( ) ) ; String args = getArgSyntax ( ) ; if ( args != null && args . length ( ) > 0 ) { syntax . append ( ' ' ) ; syntax . append ( args ) ; } return syntax . toString ( ) ; |
public class HammerWidget { /** * Change initial settings of this widget .
* @ param option { @ link org . geomajas . hammergwt . client . option . GestureOption }
* @ param value T look at { @ link org . geomajas . hammergwt . client . option . GestureOptions }
* interface for all possible types
* @ param < T >
* @ since 1.0.0 */
@ Api public < T > void setOption ( GestureOption < T > option , T value ) { } } | hammertime . setOption ( option , value ) ; |
public class CloseableTab { /** * Adds a { @ link CloseableTab } with the given title and component to
* the given tabbed pane . The given { @ link CloseCallback } will be
* consulted to decide whether the tab may be closed
* @ param tabbedPane The tabbed pane
* @ param title The title of the tab
* @ param component The component in the tab
* @ param closeCallback The { @ link CloseCallback } */
public static void addTo ( JTabbedPane tabbedPane , String title , JComponent component , CloseCallback closeCallback ) { } } | int index = tabbedPane . getTabCount ( ) ; tabbedPane . addTab ( title , component ) ; tabbedPane . setTabComponentAt ( index , new CloseableTab ( tabbedPane , closeCallback ) ) ; tabbedPane . setSelectedIndex ( index ) ; |
public class FBFrame { /** * Helps above method , runs through all components recursively . */
protected void setFontSizeHelper ( float size , Component ... comps ) { } } | for ( Component comp : comps ) { comp . setFont ( comp . getFont ( ) . deriveFont ( size ) ) ; if ( comp instanceof Container ) { setFontSizeHelper ( size , ( ( Container ) comp ) . getComponents ( ) ) ; } } |
public class BucketConfigurationXmlFactory { /** * Converts the specified logging configuration into an XML byte array .
* @ param loggingConfiguration
* The configuration to convert .
* @ return The XML byte array representation . */
public byte [ ] convertToXmlByteArray ( BucketLoggingConfiguration loggingConfiguration ) { } } | // Default log file prefix to the empty string if none is specified
String logFilePrefix = loggingConfiguration . getLogFilePrefix ( ) ; if ( logFilePrefix == null ) logFilePrefix = "" ; XmlWriter xml = new XmlWriter ( ) ; xml . start ( "BucketLoggingStatus" , "xmlns" , Constants . XML_NAMESPACE ) ; if ( loggingConfiguration . isLoggingEnabled ( ) ) { xml . start ( "LoggingEnabled" ) ; xml . start ( "TargetBucket" ) . value ( loggingConfiguration . getDestinationBucketName ( ) ) . end ( ) ; xml . start ( "TargetPrefix" ) . value ( loggingConfiguration . getLogFilePrefix ( ) ) . end ( ) ; xml . end ( ) ; } xml . end ( ) ; return xml . getBytes ( ) ; |
public class CmsJspNavBuilder { /** * Collect all navigation elements from the files in the given folder . < p >
* @ param folder the selected folder
* @ param visibility the visibility mode
* @ param resourceFilter the filter to use reading the resources
* @ return A sorted ( ascending to navigation position ) list of navigation elements */
public List < CmsJspNavElement > getNavigationForFolder ( String folder , Visibility visibility , CmsResourceFilter resourceFilter ) { } } | folder = CmsFileUtil . removeTrailingSeparator ( folder ) ; List < CmsJspNavElement > result = new ArrayList < CmsJspNavElement > ( ) ; List < CmsResource > resources = null ; try { resources = m_cms . getResourcesInFolder ( folder , resourceFilter ) ; } catch ( Exception e ) { // should never happen
LOG . error ( e . getLocalizedMessage ( ) , e ) ; } if ( resources == null ) { return Collections . < CmsJspNavElement > emptyList ( ) ; } boolean includeAll = visibility == Visibility . all ; boolean includeHidden = visibility == Visibility . includeHidden ; for ( CmsResource r : resources ) { CmsJspNavElement element = getNavigationForResource ( m_cms . getSitePath ( r ) , resourceFilter ) ; if ( ( element != null ) && ( includeAll || ( element . isInNavigation ( ) && ( includeHidden || ! element . isHiddenNavigationEntry ( ) ) ) ) ) { element . setNavContext ( new NavContext ( this , visibility , resourceFilter ) ) ; result . add ( element ) ; } } Collections . sort ( result ) ; return result ; |
public class ChainingAttributeReleasePolicy { /** * Add policies .
* @ param policies the policies */
public void addPolicies ( final RegisteredServiceAttributeReleasePolicy ... policies ) { } } | this . policies . addAll ( Arrays . stream ( policies ) . collect ( Collectors . toList ( ) ) ) ; |
public class TrivialSwap { /** * Swap two elements of a char array at the specified positions
* @ param charArray array that will have two of its values swapped .
* @ param index1 one of the indexes of the array .
* @ param index2 other index of the array . */
public static void swap ( char [ ] charArray , int index1 , int index2 ) { } } | TrivialSwap . swap ( charArray , index1 , charArray , index2 ) ; |
public class FloatUtils { /** * Returns next bigger float value considering precision of the argument . */
public static float nextUpF ( float f ) { } } | if ( Float . isNaN ( f ) || f == Float . POSITIVE_INFINITY ) { return f ; } else { f += 0.0f ; return Float . intBitsToFloat ( Float . floatToRawIntBits ( f ) + ( ( f >= 0.0f ) ? + 1 : - 1 ) ) ; } |
public class MetricProcessor { /** * ~ Methods * * * * * */
@ Override public void run ( ) { } } | while ( ! Thread . currentThread ( ) . isInterrupted ( ) ) { try { AsyncBatchedMetricQuery query = batchService . executeNextQuery ( 5000 ) ; if ( query != null ) { LOGGER . info ( "Finished processing " + query . getExpression ( ) + " of batch " + query . getBatchId ( ) ) ; } Thread . sleep ( POLL_INTERVAL_MS ) ; } catch ( InterruptedException ex ) { LOGGER . info ( "Execution was interrupted." ) ; Thread . currentThread ( ) . interrupt ( ) ; break ; } catch ( Throwable ex ) { LOGGER . warn ( "Exception in MetricProcessor: {}" , ex . toString ( ) ) ; } } |
public class IfcComplexNumberImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
@ SuppressWarnings ( "unchecked" ) public EList < String > getWrappedValueAsString ( ) { } } | return ( EList < String > ) eGet ( Ifc2x3tc1Package . Literals . IFC_COMPLEX_NUMBER__WRAPPED_VALUE_AS_STRING , true ) ; |
public class AddressDivisionGrouping { /** * In the case where the prefix sits at a segment boundary , and the prefix sequence is null - null - 0 , this changes to prefix sequence of null - x - 0 , where x is segment bit length .
* Note : We allow both [ null , null , 0 ] and [ null , x , 0 ] where x is segment length . However , to avoid inconsistencies when doing segment replacements ,
* and when getting subsections , in the calling constructor we normalize [ null , null , 0 ] to become [ null , x , 0 ] .
* We need to support [ null , x , 0 ] so that we can create subsections and full addresses ending with [ null , x ] where x is bit length .
* So we defer to that when constructing addresses and sections .
* Also note that in our append / appendNetowrk / insert / replace we have special handling for cases like inserting [ null ] into [ null , 8 , 0 ] at index 2.
* The straight replace would give [ null , 8 , null , 0 ] which is wrong .
* In that code we end up with [ null , null , 8 , 0 ] by doing a special trick :
* We remove the end of [ null , 8 , 0 ] and do an append [ null , 0 ] and we ' d remove prefix from [ null , 8 ] to get [ null , null ] and then we ' d do another append to get [ null , null , null , 0]
* The final step is this normalization here that gives [ null , null , 8 , 0]
* However , when users construct AddressDivisionGrouping or IPAddressDivisionGrouping , either one is allowed : [ null , null , 0 ] and [ null , x , 0 ] .
* Since those objects cannot be further subdivided with getSection / getNetworkSection / getHostSection or grown with appended / inserted / replaced ,
* there are no inconsistencies introduced , we are simply more user - friendly .
* Also note that normalization of AddressDivisionGrouping or IPAddressDivisionGrouping is really not possible without the address creator objects we use for addresses and sections ,
* that allow us to recreate new segments of the correct type .
* @ param sectionPrefixBits
* @ param segments
* @ param segmentBitCount
* @ param segmentByteCount
* @ param segProducer */
protected static < S extends IPAddressSegment > void normalizePrefixBoundary ( int sectionPrefixBits , S segments [ ] , int segmentBitCount , int segmentByteCount , BiFunction < S , Integer , S > segProducer ) { } } | // we ' ve already verified segment prefixes in super constructor . We simply need to check the case where the prefix is at a segment boundary ,
// whether the network side has the correct prefix
int networkSegmentIndex = getNetworkSegmentIndex ( sectionPrefixBits , segmentByteCount , segmentBitCount ) ; if ( networkSegmentIndex >= 0 ) { S segment = segments [ networkSegmentIndex ] ; if ( ! segment . isPrefixed ( ) ) { segments [ networkSegmentIndex ] = segProducer . apply ( segment , segmentBitCount ) ; } } |
public class ProjectUtilities { /** * Removes the FindBugs nature from a project .
* @ param project
* The project the nature will be removed from .
* @ param monitor
* A progress monitor . Must not be null .
* @ throws CoreException */
public static void removeFindBugsNature ( IProject project , IProgressMonitor monitor ) throws CoreException { } } | if ( ! hasFindBugsNature ( project ) ) { return ; } IProjectDescription description = project . getDescription ( ) ; String [ ] prevNatures = description . getNatureIds ( ) ; ArrayList < String > newNaturesList = new ArrayList < > ( ) ; for ( int i = 0 ; i < prevNatures . length ; i ++ ) { if ( ! FindbugsPlugin . NATURE_ID . equals ( prevNatures [ i ] ) ) { newNaturesList . add ( prevNatures [ i ] ) ; } } String [ ] newNatures = newNaturesList . toArray ( new String [ newNaturesList . size ( ) ] ) ; description . setNatureIds ( newNatures ) ; project . setDescription ( description , monitor ) ; |
public class Errors { /** * Converts this { @ code Consumer < Throwable > } to a { @ code Consumer < Optional < Throwable > > } . */
public Consumer < Optional < Throwable > > asTerminal ( ) { } } | return errorOpt -> { if ( errorOpt . isPresent ( ) ) { accept ( errorOpt . get ( ) ) ; } } ; |
public class LongChromosome { /** * Create a new random { @ code LongChromosome } .
* @ param min the min value of the { @ link LongGene } s ( inclusively ) .
* @ param max the max value of the { @ link LongGene } s ( inclusively ) .
* @ param length the length of the chromosome .
* @ return a new { @ code LongChromosome } with the given gene parameters .
* @ throws IllegalArgumentException if the { @ code length } is smaller than
* one . */
public static LongChromosome of ( final long min , final long max , final int length ) { } } | return of ( min , max , IntRange . of ( length ) ) ; |
public class AbstractExtendedSet { /** * { @ inheritDoc } */
@ Override public ExtendedSet < T > difference ( Collection < ? extends T > other ) { } } | ExtendedSet < T > clone = clone ( ) ; clone . removeAll ( other ) ; return clone ; |
public class CompilerInput { /** * Gets a list of namespaces and paths depended on by this input , but does not attempt to
* regenerate the dependency information . Typically this occurs from module rewriting . */
ImmutableCollection < Require > getKnownRequires ( ) { } } | return concat ( dependencyInfo != null ? dependencyInfo . getRequires ( ) : ImmutableList . of ( ) , extraRequires ) ; |
public class Utf16RevReader { /** * Reads into a character buffer using the correct encoding . */
public int read ( char [ ] cbuf , int off , int len ) throws IOException { } } | int i = 0 ; for ( i = 0 ; i < len ; i ++ ) { int ch1 = is . read ( ) ; int ch2 = is . read ( ) ; if ( ch1 < 0 ) return i == 0 ? - 1 : i ; cbuf [ off + i ] = ( char ) ( ( ch2 << 8 ) + ch1 ) ; } return i ; |
public class FieldValueMappingCallback { /** * The fieldType is a collection . However , the component type of
* the collection is a property type , e . g . List & lt ; String & gt ; . We must
* fetch the property with the array - type of the component type ( e . g . String [ ] )
* and add the values to a new instance of Collection & lt ; T & gt ; .
* @ return a collection of the resolved values , or < code > null < / code > if no value could be resolved . */
private Collection < ? > getArrayPropertyAsCollection ( FieldData field ) { } } | Class < ? > arrayType = field . metaData . getArrayTypeOfTypeParameter ( ) ; Object [ ] elements = ( Object [ ] ) resolvePropertyTypedValue ( field , arrayType ) ; if ( elements != null ) { @ SuppressWarnings ( "unchecked" ) Collection < Object > collection = ReflectionUtil . instantiateCollectionType ( ( Class < Collection < Object > > ) field . metaData . getType ( ) ) ; Collections . addAll ( collection , elements ) ; return collection ; } return null ; |
public class XMLPrettyPrinter { protected void write ( Writer writer , String s ) { } } | try { writer . write ( s ) ; } catch ( IOException e ) { throw new DukeException ( e ) ; } |
public class PropertyChangeSupport { /** * Remove a PropertyChangeListener for a specific property .
* If < code > listener < / code > was added more than once to the same event
* source for the specified property , it will be notified one less time
* after being removed .
* If < code > propertyName < / code > is null , no exception is thrown and no
* action is taken .
* If < code > listener < / code > is null , or was never added for the specified
* property , no exception is thrown and no action is taken .
* @ param propertyName The name of the property that was listened on .
* @ param listener The PropertyChangeListener to be removed */
public void removePropertyChangeListener ( String propertyName , PropertyChangeListener listener ) { } } | if ( listener == null || propertyName == null ) { return ; } listener = this . map . extract ( listener ) ; if ( listener != null ) { this . map . remove ( propertyName , listener ) ; } |
public class ScopedAttributeResolver { /** * returns null if not found */
private static Map < String , Object > findScopedMap ( final FacesContext facesContext , final Object property ) { } } | if ( facesContext == null ) { return null ; } final ExternalContext extContext = facesContext . getExternalContext ( ) ; if ( extContext == null ) { return null ; } final boolean startup = ( extContext instanceof StartupServletExternalContextImpl ) ; Map < String , Object > scopedMap ; // request scope ( not available at startup )
if ( ! startup ) { scopedMap = extContext . getRequestMap ( ) ; if ( scopedMap . containsKey ( property ) ) { return scopedMap ; } } // jsf 2.0 view scope
UIViewRoot root = facesContext . getViewRoot ( ) ; if ( root != null ) { scopedMap = root . getViewMap ( false ) ; if ( scopedMap != null && scopedMap . containsKey ( property ) ) { return scopedMap ; } } // session scope ( not available at startup )
if ( ! startup ) { scopedMap = extContext . getSessionMap ( ) ; if ( scopedMap . containsKey ( property ) ) { return scopedMap ; } } // application scope
scopedMap = extContext . getApplicationMap ( ) ; if ( scopedMap . containsKey ( property ) ) { return scopedMap ; } // not found
return null ; |
public class ESRIBounds { /** * Ensure that min and max values are correctly ordered . */
public void ensureMinMax ( ) { } } | double t ; if ( this . maxx < this . minx ) { t = this . minx ; this . minx = this . maxx ; this . maxx = t ; } if ( this . maxy < this . miny ) { t = this . miny ; this . miny = this . maxy ; this . maxy = t ; } if ( this . maxz < this . minz ) { t = this . minz ; this . minz = this . maxz ; this . maxz = t ; } if ( this . maxm < this . minm ) { t = this . minm ; this . minm = this . maxm ; this . maxm = t ; } |
public class BundleBuilderFactory { /** * private static List < String > createExportPackageFromResource ( Resource jar ) { / / get all
* directories List < Resource > dirs = ResourceUtil . listRecursive ( jar , DirectoryResourceFilter . FILTER ) ;
* List < String > rtn = new ArrayList < String > ( ) ; / / remove directories with no files ( of any kind )
* Iterator < Resource > it = dirs . iterator ( ) ; Resource [ ] children ; int count ; while ( it . hasNext ( ) ) {
* Resource r = it . next ( ) ; children = r . listResources ( ) ; count = 0 ; if ( children ! = null ) for ( int
* i = 0 ; i < children . length ; i + + ) { if ( children [ i ] . isFile ( ) ) count + + ; } / / has files if ( count > 0 ) {
* return null ; } */
private boolean isAsterix ( List < String > list ) { } } | if ( list == null ) return false ; Iterator < String > it = list . iterator ( ) ; while ( it . hasNext ( ) ) { if ( "*" . equals ( it . next ( ) ) ) return true ; } return false ; |
public class ZipUtil { /** * 解压
* @ param zipFilePath 压缩文件的路径
* @ param outFileDir 解压到的目录
* @ param charset 编码
* @ return 解压的目录
* @ throws UtilException IO异常 */
public static File unzip ( String zipFilePath , String outFileDir , Charset charset ) throws UtilException { } } | return unzip ( FileUtil . file ( zipFilePath ) , FileUtil . mkdir ( outFileDir ) , charset ) ; |
public class WebSocketConnection { /** * On subscription of the returned { @ link Observable } , writes the passed message stream on the underneath channel
* and flushes the channel , everytime , { @ code flushSelector } returns { @ code true } . Any writes issued before
* subscribing , will also be flushed . However , the returned { @ link Observable } will not capture the result of those
* writes , i . e . if the other writes , fail and this write does not , the returned { @ link Observable } will not fail .
* @ param msgs Message stream to write .
* @ param flushSelector A { @ link Func1 } which is invoked for every item emitted from { @ code msgs } . Channel is
* flushed , iff this function returns , { @ code true } .
* @ return An { @ link Observable } representing the result of this write . Every
* subscription to this { @ link Observable } will write the passed messages and flush all pending writes , when the
* { @ code flushSelector } returns { @ code true } */
public Observable < Void > write ( Observable < WebSocketFrame > msgs , Func1 < WebSocketFrame , Boolean > flushSelector ) { } } | return delegate . write ( msgs , flushSelector ) ; |
public class CompositeDateFormat { /** * { @ inheritDoc } */
@ Override public Date parse ( final String dateStr , final ParsePosition pos ) { } } | final ParsePosition posCopy = new ParsePosition ( pos . getIndex ( ) ) ; Date date = null ; boolean success = false ; for ( final DateFormatFactory dfFactory : DATE_FORMAT_FACTORIES ) { posCopy . setIndex ( pos . getIndex ( ) ) ; posCopy . setErrorIndex ( pos . getErrorIndex ( ) ) ; date = dfFactory . create ( ) . parse ( dateStr , posCopy ) ; if ( date != null ) { success = true ; break ; } } if ( success ) { pos . setIndex ( posCopy . getIndex ( ) ) ; pos . setErrorIndex ( posCopy . getErrorIndex ( ) ) ; } return date ; |
public class KeyExchange { /** * Fetches the secret key from a protocol above us
* @ return The secret key and its version */
protected Tuple < SecretKey , byte [ ] > getSecretKeyFromAbove ( ) { } } | return ( Tuple < SecretKey , byte [ ] > ) up_prot . up ( new Event ( Event . GET_SECRET_KEY ) ) ; |
public class ModelCurator { /** * When refering to self using the same local and reference _ id remove it
* @ param model
* @ param modelList
* @ return */
private void removeUnnecessaryHasManyToSelf ( ) { } } | model . getPrimaryAttributes ( ) ; String [ ] hasMany = model . getHasMany ( ) ; String [ ] hasManyLocalColumn = model . getHasManyLocalColumn ( ) ; String [ ] hasManyReferencedColumn = model . getHasManyReferencedColumn ( ) ; for ( int i = 0 ; i < hasMany . length ; i ++ ) { boolean hasManyLocalInPrimary = CStringUtils . inArray ( model . getPrimaryAttributes ( ) , hasManyLocalColumn [ i ] ) ; boolean hasManyReferencedInPrimary = CStringUtils . inArray ( model . getPrimaryAttributes ( ) , hasManyReferencedColumn [ i ] ) ; if ( hasMany [ i ] . equals ( model . getTableName ( ) ) && hasManyLocalColumn [ i ] . equals ( hasManyReferencedColumn [ i ] ) && hasManyLocalInPrimary && hasManyReferencedInPrimary ) { model = removeFromHasMany ( model , hasMany [ i ] ) ; } } |
public class SecretListEntry { /** * A list of all of the currently assigned < code > SecretVersionStage < / code > staging labels and the
* < code > SecretVersionId < / code > that each is attached to . Staging labels are used to keep track of the different
* versions during the rotation process .
* < note >
* A version that does not have any < code > SecretVersionStage < / code > is considered deprecated and subject to
* deletion . Such versions are not included in this list .
* < / note >
* @ param secretVersionsToStages
* A list of all of the currently assigned < code > SecretVersionStage < / code > staging labels and the
* < code > SecretVersionId < / code > that each is attached to . Staging labels are used to keep track of the
* different versions during the rotation process . < / p > < note >
* A version that does not have any < code > SecretVersionStage < / code > is considered deprecated and subject to
* deletion . Such versions are not included in this list .
* @ return Returns a reference to this object so that method calls can be chained together . */
public SecretListEntry withSecretVersionsToStages ( java . util . Map < String , java . util . List < String > > secretVersionsToStages ) { } } | setSecretVersionsToStages ( secretVersionsToStages ) ; return this ; |
public class ObjectFunctionSetSpecificationImpl { /** * < ! - - begin - user - doc - - >
* < ! - - end - user - doc - - >
* @ generated */
public void setArchVrsn ( Integer newArchVrsn ) { } } | Integer oldArchVrsn = archVrsn ; archVrsn = newArchVrsn ; if ( eNotificationRequired ( ) ) eNotify ( new ENotificationImpl ( this , Notification . SET , AfplibPackage . OBJECT_FUNCTION_SET_SPECIFICATION__ARCH_VRSN , oldArchVrsn , archVrsn ) ) ; |
public class TransactionRomanticMemoriesBuilder { protected void setupResultExp ( StringBuilder sb , TransactionSavedRecentResult result ) { } } | final Class < ? > resultType = result . getResultType ( ) ; // not null
final Map < String , Object > resultMap = result . getResultMap ( ) ; // not null
sb . append ( resultType . getSimpleName ( ) ) . append ( ":" ) . append ( buildResultExp ( resultMap ) ) ; |
public class FileUtils { /** * Converts an file permissions mode integer to a PosixFilePermission set .
* @ param aMode An integer permissions mode .
* @ return A PosixFilePermission set */
public static Set < PosixFilePermission > convertToPermissionsSet ( final int aMode ) { } } | final Set < PosixFilePermission > result = EnumSet . noneOf ( PosixFilePermission . class ) ; if ( isSet ( aMode , 0400 ) ) { result . add ( PosixFilePermission . OWNER_READ ) ; } if ( isSet ( aMode , 0200 ) ) { result . add ( PosixFilePermission . OWNER_WRITE ) ; } if ( isSet ( aMode , 0100 ) ) { result . add ( PosixFilePermission . OWNER_EXECUTE ) ; } if ( isSet ( aMode , 040 ) ) { result . add ( PosixFilePermission . GROUP_READ ) ; } if ( isSet ( aMode , 020 ) ) { result . add ( PosixFilePermission . GROUP_WRITE ) ; } if ( isSet ( aMode , 010 ) ) { result . add ( PosixFilePermission . GROUP_EXECUTE ) ; } if ( isSet ( aMode , 04 ) ) { result . add ( PosixFilePermission . OTHERS_READ ) ; } if ( isSet ( aMode , 02 ) ) { result . add ( PosixFilePermission . OTHERS_WRITE ) ; } if ( isSet ( aMode , 01 ) ) { result . add ( PosixFilePermission . OTHERS_EXECUTE ) ; } return result ; |
public class ComponentImpl { /** * duplicate the datamember in the map , ignores the udfs
* @ param c
* @ param map
* @ param newMap
* @ param deepCopy
* @ return */
public static MapPro duplicateDataMember ( ComponentImpl c , MapPro map , MapPro newMap , boolean deepCopy ) { } } | Iterator it = map . entrySet ( ) . iterator ( ) ; Map . Entry entry ; Object value ; while ( it . hasNext ( ) ) { entry = ( Entry ) it . next ( ) ; value = entry . getValue ( ) ; if ( ! ( value instanceof UDF ) ) { if ( deepCopy ) value = Duplicator . duplicate ( value , deepCopy ) ; newMap . put ( entry . getKey ( ) , value ) ; } } return newMap ; |
public class AvatarStorageSetup { /** * For non - shared storage , we enforce file uris */
private static String checkFileURIScheme ( Collection < URI > uris ) { } } | for ( URI uri : uris ) if ( uri . getScheme ( ) . compareTo ( JournalType . FILE . name ( ) . toLowerCase ( ) ) != 0 ) return "The specified path is not a file." + "Avatar supports file non-shared storage only... " ; return "" ; |
public class ClientConversationState { /** * Gets the proxy queue group associated with this conversation .
* @ return ProxyQueueConversationGroup */
public ProxyQueueConversationGroup getProxyQueueConversationGroup ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProxyQueueConversationGroup" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getProxyQueueConversationGroup" , proxyGroup ) ; return proxyGroup ; |
public class Database { /** * Finds a unique result from database , converting the database row to long using default mechanisms .
* Returns empty if there are no results or if single null result is returned .
* @ throws NonUniqueResultException if there are multiple result rows */
public @ NotNull OptionalLong findOptionalLong ( @ NotNull SqlQuery query ) { } } | Optional < Long > value = findOptional ( Long . class , query ) ; return value . isPresent ( ) ? OptionalLong . of ( value . get ( ) ) : OptionalLong . empty ( ) ; |
public class CertificatesMarshaller { /** * Marshall the given parameter object . */
public void marshall ( Certificates certificates , ProtocolMarshaller protocolMarshaller ) { } } | if ( certificates == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( certificates . getClusterCsr ( ) , CLUSTERCSR_BINDING ) ; protocolMarshaller . marshall ( certificates . getHsmCertificate ( ) , HSMCERTIFICATE_BINDING ) ; protocolMarshaller . marshall ( certificates . getAwsHardwareCertificate ( ) , AWSHARDWARECERTIFICATE_BINDING ) ; protocolMarshaller . marshall ( certificates . getManufacturerHardwareCertificate ( ) , MANUFACTURERHARDWARECERTIFICATE_BINDING ) ; protocolMarshaller . marshall ( certificates . getClusterCertificate ( ) , CLUSTERCERTIFICATE_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall request to JSON: " + e . getMessage ( ) , e ) ; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.